]> CyberLeo.Net >> Repos - FreeBSD/releng/10.3.git/blob - contrib/ntp/configure
Fix multiple vulnerabilities of ntp. [SA-17:03]
[FreeBSD/releng/10.3.git] / contrib / ntp / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for ntp 4.2.8p10.
4 #
5 # Report bugs to <http://bugs.ntp.org./>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20   emulate sh
21   NULLCMD=:
22   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23   # is contrary to our usage.  Disable this feature.
24   alias -g '${1+"$@"}'='"$@"'
25   setopt NO_GLOB_SUBST
26 else
27   case `(set -o) 2>/dev/null` in #(
28   *posix*) :
29     set -o posix ;; #(
30   *) :
31      ;;
32 esac
33 fi
34
35
36 as_nl='
37 '
38 export as_nl
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47   as_echo='print -r --'
48   as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50   as_echo='printf %s\n'
51   as_echo_n='printf %s'
52 else
53   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55     as_echo_n='/usr/ucb/echo -n'
56   else
57     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58     as_echo_n_body='eval
59       arg=$1;
60       case $arg in #(
61       *"$as_nl"*)
62         expr "X$arg" : "X\\(.*\\)$as_nl";
63         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64       esac;
65       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66     '
67     export as_echo_n_body
68     as_echo_n='sh -c $as_echo_n_body as_echo'
69   fi
70   export as_echo_body
71   as_echo='sh -c $as_echo_body as_echo'
72 fi
73
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
76   PATH_SEPARATOR=:
77   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79       PATH_SEPARATOR=';'
80   }
81 fi
82
83
84 # IFS
85 # We need space, tab and new line, in precisely that order.  Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
89 IFS=" ""        $as_nl"
90
91 # Find who we are.  Look in the path if we contain no directory separator.
92 as_myself=
93 case $0 in #((
94   *[\\/]* ) as_myself=$0 ;;
95   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96 for as_dir in $PATH
97 do
98   IFS=$as_save_IFS
99   test -z "$as_dir" && as_dir=.
100     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101   done
102 IFS=$as_save_IFS
103
104      ;;
105 esac
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.
108 if test "x$as_myself" = x; then
109   as_myself=$0
110 fi
111 if test ! -f "$as_myself"; then
112   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113   exit 1
114 fi
115
116 # Unset variables that we do not need and which cause bugs (e.g. in
117 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118 # suppresses any "Segmentation fault" message there.  '((' could
119 # trigger a bug in pdksh 5.2.14.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123 done
124 PS1='$ '
125 PS2='> '
126 PS4='+ '
127
128 # NLS nuisances.
129 LC_ALL=C
130 export LC_ALL
131 LANGUAGE=C
132 export LANGUAGE
133
134 # CDPATH.
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137 # Use a proper internal environment variable to ensure we don't fall
138   # into an infinite loop, continuously re-executing ourselves.
139   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140     _as_can_reexec=no; export _as_can_reexec;
141     # We cannot yet assume a decent shell, so we have to provide a
142 # neutralization value for shells without unset; and this also
143 # works around shells that cannot unset nonexistent variables.
144 # Preserve -v and -x to the replacement shell.
145 BASH_ENV=/dev/null
146 ENV=/dev/null
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148 case $- in # ((((
149   *v*x* | *x*v* ) as_opts=-vx ;;
150   *v* ) as_opts=-v ;;
151   *x* ) as_opts=-x ;;
152   * ) as_opts= ;;
153 esac
154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155 # Admittedly, this is quite paranoid, since all the known shells bail
156 # out after a failed `exec'.
157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158 as_fn_exit 255
159   fi
160   # We don't want this to propagate to other subprocesses.
161           { _as_can_reexec=; unset _as_can_reexec;}
162 if test "x$CONFIG_SHELL" = x; then
163   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164   emulate sh
165   NULLCMD=:
166   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167   # is contrary to our usage.  Disable this feature.
168   alias -g '\${1+\"\$@\"}'='\"\$@\"'
169   setopt NO_GLOB_SUBST
170 else
171   case \`(set -o) 2>/dev/null\` in #(
172   *posix*) :
173     set -o posix ;; #(
174   *) :
175      ;;
176 esac
177 fi
178 "
179   as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
184
185 exitcode=0
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192 else
193   exitcode=1; echo positional parameters were not saved.
194 fi
195 test x\$exitcode = x0 || exit 1
196 test -x / || exit 1"
197   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201 test \$(( 1 + 1 )) = 2 || exit 1
202
203   test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
204     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
205     ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
206     ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
207     PATH=/empty FPATH=/empty; export PATH FPATH
208     test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
209       || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
210   if (eval "$as_required") 2>/dev/null; then :
211   as_have_required=yes
212 else
213   as_have_required=no
214 fi
215   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
216
217 else
218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
219 as_found=false
220 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
221 do
222   IFS=$as_save_IFS
223   test -z "$as_dir" && as_dir=.
224   as_found=:
225   case $as_dir in #(
226          /*)
227            for as_base in sh bash ksh sh5; do
228              # Try only shells that exist, to save several forks.
229              as_shell=$as_dir/$as_base
230              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
231                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
232   CONFIG_SHELL=$as_shell as_have_required=yes
233                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
234   break 2
235 fi
236 fi
237            done;;
238        esac
239   as_found=false
240 done
241 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
242               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
243   CONFIG_SHELL=$SHELL as_have_required=yes
244 fi; }
245 IFS=$as_save_IFS
246
247
248       if test "x$CONFIG_SHELL" != x; then :
249   export CONFIG_SHELL
250              # We cannot yet assume a decent shell, so we have to provide a
251 # neutralization value for shells without unset; and this also
252 # works around shells that cannot unset nonexistent variables.
253 # Preserve -v and -x to the replacement shell.
254 BASH_ENV=/dev/null
255 ENV=/dev/null
256 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
257 case $- in # ((((
258   *v*x* | *x*v* ) as_opts=-vx ;;
259   *v* ) as_opts=-v ;;
260   *x* ) as_opts=-x ;;
261   * ) as_opts= ;;
262 esac
263 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
264 # Admittedly, this is quite paranoid, since all the known shells bail
265 # out after a failed `exec'.
266 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
267 exit 255
268 fi
269
270     if test x$as_have_required = xno; then :
271   $as_echo "$0: This script requires a shell more modern than all"
272   $as_echo "$0: the shells that I found on your system."
273   if test x${ZSH_VERSION+set} = xset ; then
274     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
275     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
276   else
277     $as_echo "$0: Please tell bug-autoconf@gnu.org and
278 $0: http://bugs.ntp.org./ about your system, including any
279 $0: error possibly output before this message. Then install
280 $0: a modern shell, or manually run the script under such a
281 $0: shell if you do have one."
282   fi
283   exit 1
284 fi
285 fi
286 fi
287 SHELL=${CONFIG_SHELL-/bin/sh}
288 export SHELL
289 # Unset more variables known to interfere with behavior of common tools.
290 CLICOLOR_FORCE= GREP_OPTIONS=
291 unset CLICOLOR_FORCE GREP_OPTIONS
292
293 ## --------------------- ##
294 ## M4sh Shell Functions. ##
295 ## --------------------- ##
296 # as_fn_unset VAR
297 # ---------------
298 # Portably unset VAR.
299 as_fn_unset ()
300 {
301   { eval $1=; unset $1;}
302 }
303 as_unset=as_fn_unset
304
305 # as_fn_set_status STATUS
306 # -----------------------
307 # Set $? to STATUS, without forking.
308 as_fn_set_status ()
309 {
310   return $1
311 } # as_fn_set_status
312
313 # as_fn_exit STATUS
314 # -----------------
315 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
316 as_fn_exit ()
317 {
318   set +e
319   as_fn_set_status $1
320   exit $1
321 } # as_fn_exit
322
323 # as_fn_mkdir_p
324 # -------------
325 # Create "$as_dir" as a directory, including parents if necessary.
326 as_fn_mkdir_p ()
327 {
328
329   case $as_dir in #(
330   -*) as_dir=./$as_dir;;
331   esac
332   test -d "$as_dir" || eval $as_mkdir_p || {
333     as_dirs=
334     while :; do
335       case $as_dir in #(
336       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
337       *) as_qdir=$as_dir;;
338       esac
339       as_dirs="'$as_qdir' $as_dirs"
340       as_dir=`$as_dirname -- "$as_dir" ||
341 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
342          X"$as_dir" : 'X\(//\)[^/]' \| \
343          X"$as_dir" : 'X\(//\)$' \| \
344          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
345 $as_echo X"$as_dir" |
346     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
347             s//\1/
348             q
349           }
350           /^X\(\/\/\)[^/].*/{
351             s//\1/
352             q
353           }
354           /^X\(\/\/\)$/{
355             s//\1/
356             q
357           }
358           /^X\(\/\).*/{
359             s//\1/
360             q
361           }
362           s/.*/./; q'`
363       test -d "$as_dir" && break
364     done
365     test -z "$as_dirs" || eval "mkdir $as_dirs"
366   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
367
368
369 } # as_fn_mkdir_p
370
371 # as_fn_executable_p FILE
372 # -----------------------
373 # Test if FILE is an executable regular file.
374 as_fn_executable_p ()
375 {
376   test -f "$1" && test -x "$1"
377 } # as_fn_executable_p
378 # as_fn_append VAR VALUE
379 # ----------------------
380 # Append the text in VALUE to the end of the definition contained in VAR. Take
381 # advantage of any shell optimizations that allow amortized linear growth over
382 # repeated appends, instead of the typical quadratic growth present in naive
383 # implementations.
384 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
385   eval 'as_fn_append ()
386   {
387     eval $1+=\$2
388   }'
389 else
390   as_fn_append ()
391   {
392     eval $1=\$$1\$2
393   }
394 fi # as_fn_append
395
396 # as_fn_arith ARG...
397 # ------------------
398 # Perform arithmetic evaluation on the ARGs, and store the result in the
399 # global $as_val. Take advantage of shells that can avoid forks. The arguments
400 # must be portable across $(()) and expr.
401 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
402   eval 'as_fn_arith ()
403   {
404     as_val=$(( $* ))
405   }'
406 else
407   as_fn_arith ()
408   {
409     as_val=`expr "$@" || test $? -eq 1`
410   }
411 fi # as_fn_arith
412
413
414 # as_fn_error STATUS ERROR [LINENO LOG_FD]
415 # ----------------------------------------
416 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
417 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
418 # script with STATUS, using 1 if that was 0.
419 as_fn_error ()
420 {
421   as_status=$1; test $as_status -eq 0 && as_status=1
422   if test "$4"; then
423     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
424     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
425   fi
426   $as_echo "$as_me: error: $2" >&2
427   as_fn_exit $as_status
428 } # as_fn_error
429
430 if expr a : '\(a\)' >/dev/null 2>&1 &&
431    test "X`expr 00001 : '.*\(...\)'`" = X001; then
432   as_expr=expr
433 else
434   as_expr=false
435 fi
436
437 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
438   as_basename=basename
439 else
440   as_basename=false
441 fi
442
443 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
444   as_dirname=dirname
445 else
446   as_dirname=false
447 fi
448
449 as_me=`$as_basename -- "$0" ||
450 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
451          X"$0" : 'X\(//\)$' \| \
452          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
453 $as_echo X/"$0" |
454     sed '/^.*\/\([^/][^/]*\)\/*$/{
455             s//\1/
456             q
457           }
458           /^X\/\(\/\/\)$/{
459             s//\1/
460             q
461           }
462           /^X\/\(\/\).*/{
463             s//\1/
464             q
465           }
466           s/.*/./; q'`
467
468 # Avoid depending upon Character Ranges.
469 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
470 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
471 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
472 as_cr_digits='0123456789'
473 as_cr_alnum=$as_cr_Letters$as_cr_digits
474
475
476   as_lineno_1=$LINENO as_lineno_1a=$LINENO
477   as_lineno_2=$LINENO as_lineno_2a=$LINENO
478   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
479   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
480   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
481   sed -n '
482     p
483     /[$]LINENO/=
484   ' <$as_myself |
485     sed '
486       s/[$]LINENO.*/&-/
487       t lineno
488       b
489       :lineno
490       N
491       :loop
492       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
493       t loop
494       s/-\n.*//
495     ' >$as_me.lineno &&
496   chmod +x "$as_me.lineno" ||
497     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
498
499   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
500   # already done that, so ensure we don't try to do so again and fall
501   # in an infinite loop.  This has already happened in practice.
502   _as_can_reexec=no; export _as_can_reexec
503   # Don't try to exec as it changes $[0], causing all sort of problems
504   # (the dirname of $[0] is not the place where we might find the
505   # original and so on.  Autoconf is especially sensitive to this).
506   . "./$as_me.lineno"
507   # Exit status is that of the last command.
508   exit
509 }
510
511 ECHO_C= ECHO_N= ECHO_T=
512 case `echo -n x` in #(((((
513 -n*)
514   case `echo 'xy\c'` in
515   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
516   xy)  ECHO_C='\c';;
517   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
518        ECHO_T=' ';;
519   esac;;
520 *)
521   ECHO_N='-n';;
522 esac
523
524 rm -f conf$$ conf$$.exe conf$$.file
525 if test -d conf$$.dir; then
526   rm -f conf$$.dir/conf$$.file
527 else
528   rm -f conf$$.dir
529   mkdir conf$$.dir 2>/dev/null
530 fi
531 if (echo >conf$$.file) 2>/dev/null; then
532   if ln -s conf$$.file conf$$ 2>/dev/null; then
533     as_ln_s='ln -s'
534     # ... but there are two gotchas:
535     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
536     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
537     # In both cases, we have to default to `cp -pR'.
538     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
539       as_ln_s='cp -pR'
540   elif ln conf$$.file conf$$ 2>/dev/null; then
541     as_ln_s=ln
542   else
543     as_ln_s='cp -pR'
544   fi
545 else
546   as_ln_s='cp -pR'
547 fi
548 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
549 rmdir conf$$.dir 2>/dev/null
550
551 if mkdir -p . 2>/dev/null; then
552   as_mkdir_p='mkdir -p "$as_dir"'
553 else
554   test -d ./-p && rmdir ./-p
555   as_mkdir_p=false
556 fi
557
558 as_test_x='test -x'
559 as_executable_p=as_fn_executable_p
560
561 # Sed expression to map a string onto a valid CPP name.
562 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
563
564 # Sed expression to map a string onto a valid variable name.
565 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
566
567 SHELL=${CONFIG_SHELL-/bin/sh}
568
569
570 test -n "$DJDIR" || exec 7<&0 </dev/null
571 exec 6>&1
572
573 # Name of the host.
574 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
575 # so uname gets run too.
576 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
577
578 #
579 # Initializations.
580 #
581 ac_default_prefix=/usr/local
582 ac_clean_files=
583 ac_config_libobj_dir=.
584 LIBOBJS=
585 cross_compiling=no
586 subdirs=
587 MFLAGS=
588 MAKEFLAGS=
589
590 # Identity of this package.
591 PACKAGE_NAME='ntp'
592 PACKAGE_TARNAME='ntp'
593 PACKAGE_VERSION='4.2.8p10'
594 PACKAGE_STRING='ntp 4.2.8p10'
595 PACKAGE_BUGREPORT='http://bugs.ntp.org./'
596 PACKAGE_URL='http://www.ntp.org./'
597
598 # Factoring default headers for most tests.
599 ac_includes_default="\
600 #include <stdio.h>
601 #ifdef HAVE_SYS_TYPES_H
602 # include <sys/types.h>
603 #endif
604 #ifdef HAVE_SYS_STAT_H
605 # include <sys/stat.h>
606 #endif
607 #ifdef STDC_HEADERS
608 # include <stdlib.h>
609 # include <stddef.h>
610 #else
611 # ifdef HAVE_STDLIB_H
612 #  include <stdlib.h>
613 # endif
614 #endif
615 #ifdef HAVE_STRING_H
616 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
617 #  include <memory.h>
618 # endif
619 # include <string.h>
620 #endif
621 #ifdef HAVE_STRINGS_H
622 # include <strings.h>
623 #endif
624 #ifdef HAVE_INTTYPES_H
625 # include <inttypes.h>
626 #endif
627 #ifdef HAVE_STDINT_H
628 # include <stdint.h>
629 #endif
630 #ifdef HAVE_UNISTD_H
631 # include <unistd.h>
632 #endif"
633
634 ac_header_list=
635 enable_option_checking=no
636 ac_subst_vars='am__EXEEXT_FALSE
637 am__EXEEXT_TRUE
638 LTLIBOBJS
639 subdirs
640 PERLLIBDIR
641 NTP_KEYSDIR
642 BUILD_TEST_NTP_SIGND_FALSE
643 BUILD_TEST_NTP_SIGND_TRUE
644 BUILD_TEST_NTP_SCANNER_FALSE
645 BUILD_TEST_NTP_SCANNER_TRUE
646 BUILD_TEST_NTP_RESTRICT_FALSE
647 BUILD_TEST_NTP_RESTRICT_TRUE
648 GTEST_AVAILABLE_FALSE
649 GTEST_AVAILABLE_TRUE
650 GTEST_CPPFLAGS
651 GTEST_CXXFLAGS
652 GTEST_LIBS
653 GTEST_LDFLAGS
654 GTEST_CONFIG
655 UNITYBUILD_AVAILABLE_FALSE
656 UNITYBUILD_AVAILABLE_TRUE
657 PATH_RUBY
658 HAVE_LEAPSMEARINTERVAL
659 SAVECONFIG_ENABLED_FALSE
660 SAVECONFIG_ENABLED_TRUE
661 LSCF
662 MAKE_NTPSNMPD
663 SNMP_CFLAGS
664 SNMP_CPPFLAGS
665 SNMP_LIBS
666 BUILD_SNTP_FALSE
667 BUILD_SNTP_TRUE
668 SNTP
669 MAKE_NTPDSIM
670 MAKE_LIBNTPSIM
671 MAKE_TIMETRIM
672 MAKE_TICKADJ
673 MAKE_NTPTIME
674 MAKE_ADJTIMED
675 CHUTEST
676 PROPDELAY
677 MAKE_PARSEKMODULE
678 DCFD
679 TESTDCF
680 MAKE_CHECK_LAYOUT
681 VER_SUFFIX
682 MAKE_CHECK_Y2K
683 MAKE_LIBPARSE_KERNEL
684 MAKE_LIBPARSE
685 LIBPARSE
686 HAVE_RLIMIT_STACK
687 HAVE_RLIMIT_MEMLOCK
688 LDADD_NLIST
689 PATH_NET_SNMP_CONFIG
690 CONFIG_SHELL
691 PATH_TEST
692 PATH_PERL
693 LIBOBJS
694 PTHREADS_FALSE
695 PTHREADS_TRUE
696 LIBISC_PTHREADS_NOTHREADS
697 PTHREAD_LIBS
698 LTHREAD_LIBS
699 BUILD_THREAD
700 HAVE_INLINE
701 LDADD_LIBUTIL
702 ALLOCA
703 LIBM
704 EDITLINE_LIBS
705 LDADD_LIBNTP
706 NTP_CROSSCOMPILE_FALSE
707 NTP_CROSSCOMPILE_TRUE
708 BUILD_LIBEVENT_FALSE
709 BUILD_LIBEVENT_TRUE
710 LDADD_LIBEVENT
711 CPPFLAGS_LIBEVENT
712 CFLAGS_LIBEVENT
713 PKG_CONFIG
714 LIBOPTS_DIR
715 LIBOPTS_CFLAGS
716 LIBOPTS_LDADD
717 NEED_LIBOPTS_FALSE
718 NEED_LIBOPTS_TRUE
719 INSTALL_LIBOPTS_FALSE
720 INSTALL_LIBOPTS_TRUE
721 POSIX_SHELL
722 GL_GENERATE_STDNORETURN_H_FALSE
723 GL_GENERATE_STDNORETURN_H_TRUE
724 STDNORETURN_H
725 LIBTOOL_DEPS
726 LT_SYS_LIBRARY_PATH
727 OTOOL64
728 OTOOL
729 LIPO
730 NMEDIT
731 DSYMUTIL
732 MANIFEST_TOOL
733 RANLIB
734 DLLTOOL
735 OBJDUMP
736 LN_S
737 NM
738 ac_ct_DUMPBIN
739 DUMPBIN
740 LD
741 FGREP
742 SED
743 LIBTOOL
744 ac_ct_AR
745 AR
746 INSTALL_UPDATE_LEAP_FALSE
747 INSTALL_UPDATE_LEAP_TRUE
748 UPDATE_LEAP_NI
749 UPDATE_LEAP_MS
750 UPDATE_LEAP_DS
751 UPDATE_LEAP_DL
752 UPDATE_LEAP_DB
753 TIMETRIM_NI
754 TIMETRIM_MS
755 TIMETRIM_DS
756 TIMETRIM_DL
757 TIMETRIM_DB
758 TICKADJ_NI
759 TICKADJ_MS
760 TICKADJ_DS
761 TICKADJ_DL
762 TICKADJ_DB
763 SNTP_NI
764 SNTP_MS
765 SNTP_DS
766 SNTP_DL
767 SNTP_DB
768 NTP_WAIT_NI
769 NTP_WAIT_MS
770 NTP_WAIT_DS
771 NTP_WAIT_DL
772 NTP_WAIT_DB
773 NTP_KEYGEN_NI
774 NTP_KEYGEN_MS
775 NTP_KEYGEN_DS
776 NTP_KEYGEN_DL
777 NTP_KEYGEN_DB
778 NTPTRACE_NI
779 NTPTRACE_MS
780 NTPTRACE_DS
781 NTPTRACE_DL
782 NTPTRACE_DB
783 NTPTIME_NI
784 NTPTIME_MS
785 NTPTIME_DS
786 NTPTIME_DL
787 NTPTIME_DB
788 INSTALL_NTPSWEEP_FALSE
789 INSTALL_NTPSWEEP_TRUE
790 NTPSWEEP_NI
791 NTPSWEEP_MS
792 NTPSWEEP_DS
793 NTPSWEEP_DL
794 NTPSWEEP_DB
795 NTPSNMPD_NI
796 NTPSNMPD_MS
797 NTPSNMPD_DS
798 NTPSNMPD_DL
799 NTPSNMPD_DB
800 NTPQ_NI
801 NTPQ_MS
802 NTPQ_DS
803 NTPQ_DL
804 NTPQ_DB
805 NTPD_NI
806 NTPD_MS
807 NTPD_DS
808 NTPD_DL
809 NTPD_DB
810 NTPDSIM_NI
811 NTPDSIM_MS
812 NTPDSIM_DS
813 NTPDSIM_DL
814 NTPDSIM_DB
815 NTPDC_NI
816 NTPDC_MS
817 NTPDC_DS
818 NTPDC_DL
819 NTPDC_DB
820 NTPDATE_NI
821 NTPDATE_MS
822 NTPDATE_DS
823 NTPDATE_DL
824 NTPDATE_DB
825 MANTAGFMT
826 CALC_TICKADJ_NI
827 CALC_TICKADJ_MS
828 CALC_TICKADJ_DS
829 CALC_TICKADJ_DL
830 CALC_TICKADJ_DB
831 WANT_CALC_TICKADJ_MS_FALSE
832 WANT_CALC_TICKADJ_MS_TRUE
833 VPATH_HACK_FALSE
834 VPATH_HACK_TRUE
835 NTP_HARD_LDFLAGS
836 NTP_HARD_CPPFLAGS
837 NTP_HARD_CFLAGS
838 YFLAGS
839 YACC
840 LDFLAGS_NTP
841 LDADD_NTP
842 CPPFLAGS_NTP
843 CFLAGS_NTP
844 EGREP
845 GREP
846 CPP
847 am__fastdepCC_FALSE
848 am__fastdepCC_TRUE
849 CCDEPMODE
850 am__nodep
851 AMDEPBACKSLASH
852 AMDEP_FALSE
853 AMDEP_TRUE
854 am__quote
855 am__include
856 DEPDIR
857 OBJEXT
858 EXEEXT
859 ac_ct_CC
860 CPPFLAGS
861 LDFLAGS
862 CFLAGS
863 CC
864 host_os
865 host_vendor
866 host_cpu
867 host
868 build_os
869 build_vendor
870 build_cpu
871 build
872 AM_BACKSLASH
873 AM_DEFAULT_VERBOSITY
874 AM_DEFAULT_V
875 AM_V
876 am__untar
877 am__tar
878 AMTAR
879 am__leading_dot
880 SET_MAKE
881 AWK
882 mkdir_p
883 MKDIR_P
884 INSTALL_STRIP_PROGRAM
885 STRIP
886 install_sh
887 MAKEINFO
888 AUTOHEADER
889 AUTOMAKE
890 AUTOCONF
891 ACLOCAL
892 VERSION
893 PACKAGE
894 CYGPATH_W
895 am__isrc
896 INSTALL_DATA
897 INSTALL_SCRIPT
898 INSTALL_PROGRAM
899 target_alias
900 host_alias
901 build_alias
902 LIBS
903 ECHO_T
904 ECHO_N
905 ECHO_C
906 DEFS
907 mandir
908 localedir
909 libdir
910 psdir
911 pdfdir
912 dvidir
913 htmldir
914 infodir
915 docdir
916 oldincludedir
917 includedir
918 localstatedir
919 sharedstatedir
920 sysconfdir
921 datadir
922 datarootdir
923 libexecdir
924 sbindir
925 bindir
926 program_transform_name
927 prefix
928 exec_prefix
929 PACKAGE_URL
930 PACKAGE_BUGREPORT
931 PACKAGE_STRING
932 PACKAGE_VERSION
933 PACKAGE_TARNAME
934 PACKAGE_NAME
935 PATH_SEPARATOR
936 SHELL'
937 ac_subst_files='calc_tickadj_opts
938 ntp_wait_opts
939 ntpsweep_opts
940 ntptrace_opts
941 summary_opts
942 plot_summary_opts'
943 ac_user_opts='
944 enable_option_checking
945 enable_silent_rules
946 enable_dependency_tracking
947 with_locfile
948 enable_shared
949 enable_static
950 with_pic
951 enable_fast_install
952 with_aix_soname
953 with_gnu_ld
954 with_sysroot
955 enable_libtool_lock
956 enable_nls
957 enable_local_libopts
958 enable_libopts_install
959 with_autoopts_config
960 enable_local_libevent
961 with_lineeditlibs
962 enable_debugging
963 enable_thread_support
964 with_threads
965 with_yielding_select
966 enable_c99_snprintf
967 enable_clockctl
968 enable_linuxcaps
969 enable_solarisprivs
970 with_arlib
971 with_net_snmp_config
972 enable_libseccomp
973 with_stack_limit
974 with_memlock
975 enable_debug_timing
976 enable_dst_minutes
977 enable_ignore_dns_errors
978 enable_BANCOMM
979 enable_GPSVME
980 enable_all_clocks
981 enable_ACTS
982 enable_ARBITER
983 enable_ARCRON_MSF
984 enable_AS2201
985 enable_ATOM
986 enable_CHRONOLOG
987 enable_CHU
988 enable_AUDIO_CHU
989 enable_DATUM
990 enable_DUMBCLOCK
991 enable_FG
992 enable_HEATH
993 enable_HOPFSERIAL
994 enable_HOPFPCI
995 enable_HPGPS
996 enable_IRIG
997 enable_JJY
998 enable_JUPITER
999 enable_LEITCH
1000 enable_LOCAL_CLOCK
1001 enable_MX4200
1002 enable_NEOCLOCK4X
1003 enable_NMEA
1004 enable_GPSD
1005 enable_ONCORE
1006 enable_PALISADE
1007 enable_PCF
1008 enable_PST
1009 enable_RIPENCC
1010 enable_SHM
1011 enable_SPECTRACOM
1012 enable_TPRO
1013 enable_TRUETIME
1014 enable_TT560
1015 enable_ULINK
1016 enable_TSYNCPCI
1017 enable_WWV
1018 enable_ZYFER
1019 enable_parse_clocks
1020 enable_COMPUTIME
1021 enable_DCF7000
1022 enable_HOPF6021
1023 enable_MEINBERG
1024 enable_RAWDCF
1025 enable_RCC8000
1026 enable_SCHMID
1027 enable_TRIMTAIP
1028 enable_TRIMTSIP
1029 enable_WHARTON
1030 enable_VARITEXT
1031 enable_SEL240X
1032 with_crypto
1033 with_openssl_libdir
1034 with_openssl_incdir
1035 with_rpath
1036 enable_openssl_random
1037 enable_autokey
1038 enable_kmem
1039 enable_accurate_adjtime
1040 enable_tick
1041 enable_tickadj
1042 enable_simulator
1043 with_sntp
1044 with_ntpsnmpd
1045 enable_slew_always
1046 enable_step_slew
1047 enable_ntpdate_step
1048 enable_hourly_todr_sync
1049 enable_kernel_fll_bug
1050 enable_bug1243_fix
1051 enable_bug3020_fix
1052 enable_irig_sawtooth
1053 enable_nist
1054 enable_ntp_signd
1055 enable_ipv6
1056 with_kame
1057 enable_getifaddrs
1058 enable_saveconfig
1059 enable_leap_smear
1060 enable_dynamic_interleave
1061 with_gtest
1062 enable_problem_tests
1063 '
1064       ac_precious_vars='build_alias
1065 host_alias
1066 target_alias
1067 CC
1068 CFLAGS
1069 LDFLAGS
1070 LIBS
1071 CPPFLAGS
1072 CPP
1073 YACC
1074 YFLAGS
1075 LT_SYS_LIBRARY_PATH'
1076 ac_subdirs_all='sntp'
1077
1078 # Initialize some variables set by options.
1079 ac_init_help=
1080 ac_init_version=false
1081 ac_unrecognized_opts=
1082 ac_unrecognized_sep=
1083 # The variables have the same names as the options, with
1084 # dashes changed to underlines.
1085 cache_file=/dev/null
1086 exec_prefix=NONE
1087 no_create=
1088 no_recursion=
1089 prefix=NONE
1090 program_prefix=NONE
1091 program_suffix=NONE
1092 program_transform_name=s,x,x,
1093 silent=
1094 site=
1095 srcdir=
1096 verbose=
1097 x_includes=NONE
1098 x_libraries=NONE
1099
1100 # Installation directory options.
1101 # These are left unexpanded so users can "make install exec_prefix=/foo"
1102 # and all the variables that are supposed to be based on exec_prefix
1103 # by default will actually change.
1104 # Use braces instead of parens because sh, perl, etc. also accept them.
1105 # (The list follows the same order as the GNU Coding Standards.)
1106 bindir='${exec_prefix}/bin'
1107 sbindir='${exec_prefix}/sbin'
1108 libexecdir='${exec_prefix}/libexec'
1109 datarootdir='${prefix}/share'
1110 datadir='${datarootdir}'
1111 sysconfdir='${prefix}/etc'
1112 sharedstatedir='${prefix}/com'
1113 localstatedir='${prefix}/var'
1114 includedir='${prefix}/include'
1115 oldincludedir='/usr/include'
1116 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1117 infodir='${datarootdir}/info'
1118 htmldir='${docdir}'
1119 dvidir='${docdir}'
1120 pdfdir='${docdir}'
1121 psdir='${docdir}'
1122 libdir='${exec_prefix}/lib'
1123 localedir='${datarootdir}/locale'
1124 mandir='${datarootdir}/man'
1125
1126 ac_prev=
1127 ac_dashdash=
1128 for ac_option
1129 do
1130   # If the previous option needs an argument, assign it.
1131   if test -n "$ac_prev"; then
1132     eval $ac_prev=\$ac_option
1133     ac_prev=
1134     continue
1135   fi
1136
1137   case $ac_option in
1138   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1139   *=)   ac_optarg= ;;
1140   *)    ac_optarg=yes ;;
1141   esac
1142
1143   # Accept the important Cygnus configure options, so we can diagnose typos.
1144
1145   case $ac_dashdash$ac_option in
1146   --)
1147     ac_dashdash=yes ;;
1148
1149   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1150     ac_prev=bindir ;;
1151   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1152     bindir=$ac_optarg ;;
1153
1154   -build | --build | --buil | --bui | --bu)
1155     ac_prev=build_alias ;;
1156   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1157     build_alias=$ac_optarg ;;
1158
1159   -cache-file | --cache-file | --cache-fil | --cache-fi \
1160   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1161     ac_prev=cache_file ;;
1162   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1163   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1164     cache_file=$ac_optarg ;;
1165
1166   --config-cache | -C)
1167     cache_file=config.cache ;;
1168
1169   -datadir | --datadir | --datadi | --datad)
1170     ac_prev=datadir ;;
1171   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1172     datadir=$ac_optarg ;;
1173
1174   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1175   | --dataroo | --dataro | --datar)
1176     ac_prev=datarootdir ;;
1177   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1178   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1179     datarootdir=$ac_optarg ;;
1180
1181   -disable-* | --disable-*)
1182     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1183     # Reject names that are not valid shell variable names.
1184     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1185       as_fn_error $? "invalid feature name: $ac_useropt"
1186     ac_useropt_orig=$ac_useropt
1187     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1188     case $ac_user_opts in
1189       *"
1190 "enable_$ac_useropt"
1191 "*) ;;
1192       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1193          ac_unrecognized_sep=', ';;
1194     esac
1195     eval enable_$ac_useropt=no ;;
1196
1197   -docdir | --docdir | --docdi | --doc | --do)
1198     ac_prev=docdir ;;
1199   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1200     docdir=$ac_optarg ;;
1201
1202   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1203     ac_prev=dvidir ;;
1204   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1205     dvidir=$ac_optarg ;;
1206
1207   -enable-* | --enable-*)
1208     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1209     # Reject names that are not valid shell variable names.
1210     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1211       as_fn_error $? "invalid feature name: $ac_useropt"
1212     ac_useropt_orig=$ac_useropt
1213     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1214     case $ac_user_opts in
1215       *"
1216 "enable_$ac_useropt"
1217 "*) ;;
1218       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1219          ac_unrecognized_sep=', ';;
1220     esac
1221     eval enable_$ac_useropt=\$ac_optarg ;;
1222
1223   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1224   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1225   | --exec | --exe | --ex)
1226     ac_prev=exec_prefix ;;
1227   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1228   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1229   | --exec=* | --exe=* | --ex=*)
1230     exec_prefix=$ac_optarg ;;
1231
1232   -gas | --gas | --ga | --g)
1233     # Obsolete; use --with-gas.
1234     with_gas=yes ;;
1235
1236   -help | --help | --hel | --he | -h)
1237     ac_init_help=long ;;
1238   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1239     ac_init_help=recursive ;;
1240   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1241     ac_init_help=short ;;
1242
1243   -host | --host | --hos | --ho)
1244     ac_prev=host_alias ;;
1245   -host=* | --host=* | --hos=* | --ho=*)
1246     host_alias=$ac_optarg ;;
1247
1248   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1249     ac_prev=htmldir ;;
1250   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1251   | --ht=*)
1252     htmldir=$ac_optarg ;;
1253
1254   -includedir | --includedir | --includedi | --included | --include \
1255   | --includ | --inclu | --incl | --inc)
1256     ac_prev=includedir ;;
1257   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1258   | --includ=* | --inclu=* | --incl=* | --inc=*)
1259     includedir=$ac_optarg ;;
1260
1261   -infodir | --infodir | --infodi | --infod | --info | --inf)
1262     ac_prev=infodir ;;
1263   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1264     infodir=$ac_optarg ;;
1265
1266   -libdir | --libdir | --libdi | --libd)
1267     ac_prev=libdir ;;
1268   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1269     libdir=$ac_optarg ;;
1270
1271   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1272   | --libexe | --libex | --libe)
1273     ac_prev=libexecdir ;;
1274   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1275   | --libexe=* | --libex=* | --libe=*)
1276     libexecdir=$ac_optarg ;;
1277
1278   -localedir | --localedir | --localedi | --localed | --locale)
1279     ac_prev=localedir ;;
1280   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1281     localedir=$ac_optarg ;;
1282
1283   -localstatedir | --localstatedir | --localstatedi | --localstated \
1284   | --localstate | --localstat | --localsta | --localst | --locals)
1285     ac_prev=localstatedir ;;
1286   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1287   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1288     localstatedir=$ac_optarg ;;
1289
1290   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1291     ac_prev=mandir ;;
1292   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1293     mandir=$ac_optarg ;;
1294
1295   -nfp | --nfp | --nf)
1296     # Obsolete; use --without-fp.
1297     with_fp=no ;;
1298
1299   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1300   | --no-cr | --no-c | -n)
1301     no_create=yes ;;
1302
1303   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1304   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1305     no_recursion=yes ;;
1306
1307   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1308   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1309   | --oldin | --oldi | --old | --ol | --o)
1310     ac_prev=oldincludedir ;;
1311   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1312   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1313   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1314     oldincludedir=$ac_optarg ;;
1315
1316   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1317     ac_prev=prefix ;;
1318   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1319     prefix=$ac_optarg ;;
1320
1321   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1322   | --program-pre | --program-pr | --program-p)
1323     ac_prev=program_prefix ;;
1324   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1325   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1326     program_prefix=$ac_optarg ;;
1327
1328   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1329   | --program-suf | --program-su | --program-s)
1330     ac_prev=program_suffix ;;
1331   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1332   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1333     program_suffix=$ac_optarg ;;
1334
1335   -program-transform-name | --program-transform-name \
1336   | --program-transform-nam | --program-transform-na \
1337   | --program-transform-n | --program-transform- \
1338   | --program-transform | --program-transfor \
1339   | --program-transfo | --program-transf \
1340   | --program-trans | --program-tran \
1341   | --progr-tra | --program-tr | --program-t)
1342     ac_prev=program_transform_name ;;
1343   -program-transform-name=* | --program-transform-name=* \
1344   | --program-transform-nam=* | --program-transform-na=* \
1345   | --program-transform-n=* | --program-transform-=* \
1346   | --program-transform=* | --program-transfor=* \
1347   | --program-transfo=* | --program-transf=* \
1348   | --program-trans=* | --program-tran=* \
1349   | --progr-tra=* | --program-tr=* | --program-t=*)
1350     program_transform_name=$ac_optarg ;;
1351
1352   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1353     ac_prev=pdfdir ;;
1354   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1355     pdfdir=$ac_optarg ;;
1356
1357   -psdir | --psdir | --psdi | --psd | --ps)
1358     ac_prev=psdir ;;
1359   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1360     psdir=$ac_optarg ;;
1361
1362   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1363   | -silent | --silent | --silen | --sile | --sil)
1364     silent=yes ;;
1365
1366   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1367     ac_prev=sbindir ;;
1368   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1369   | --sbi=* | --sb=*)
1370     sbindir=$ac_optarg ;;
1371
1372   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1373   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1374   | --sharedst | --shareds | --shared | --share | --shar \
1375   | --sha | --sh)
1376     ac_prev=sharedstatedir ;;
1377   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1378   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1379   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1380   | --sha=* | --sh=*)
1381     sharedstatedir=$ac_optarg ;;
1382
1383   -site | --site | --sit)
1384     ac_prev=site ;;
1385   -site=* | --site=* | --sit=*)
1386     site=$ac_optarg ;;
1387
1388   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1389     ac_prev=srcdir ;;
1390   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1391     srcdir=$ac_optarg ;;
1392
1393   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1394   | --syscon | --sysco | --sysc | --sys | --sy)
1395     ac_prev=sysconfdir ;;
1396   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1397   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1398     sysconfdir=$ac_optarg ;;
1399
1400   -target | --target | --targe | --targ | --tar | --ta | --t)
1401     ac_prev=target_alias ;;
1402   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1403     target_alias=$ac_optarg ;;
1404
1405   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1406     verbose=yes ;;
1407
1408   -version | --version | --versio | --versi | --vers | -V)
1409     ac_init_version=: ;;
1410
1411   -with-* | --with-*)
1412     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1413     # Reject names that are not valid shell variable names.
1414     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1415       as_fn_error $? "invalid package name: $ac_useropt"
1416     ac_useropt_orig=$ac_useropt
1417     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1418     case $ac_user_opts in
1419       *"
1420 "with_$ac_useropt"
1421 "*) ;;
1422       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1423          ac_unrecognized_sep=', ';;
1424     esac
1425     eval with_$ac_useropt=\$ac_optarg ;;
1426
1427   -without-* | --without-*)
1428     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1429     # Reject names that are not valid shell variable names.
1430     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1431       as_fn_error $? "invalid package name: $ac_useropt"
1432     ac_useropt_orig=$ac_useropt
1433     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1434     case $ac_user_opts in
1435       *"
1436 "with_$ac_useropt"
1437 "*) ;;
1438       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1439          ac_unrecognized_sep=', ';;
1440     esac
1441     eval with_$ac_useropt=no ;;
1442
1443   --x)
1444     # Obsolete; use --with-x.
1445     with_x=yes ;;
1446
1447   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1448   | --x-incl | --x-inc | --x-in | --x-i)
1449     ac_prev=x_includes ;;
1450   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1451   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1452     x_includes=$ac_optarg ;;
1453
1454   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1455   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1456     ac_prev=x_libraries ;;
1457   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1458   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1459     x_libraries=$ac_optarg ;;
1460
1461   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1462 Try \`$0 --help' for more information"
1463     ;;
1464
1465   *=*)
1466     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1467     # Reject names that are not valid shell variable names.
1468     case $ac_envvar in #(
1469       '' | [0-9]* | *[!_$as_cr_alnum]* )
1470       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1471     esac
1472     eval $ac_envvar=\$ac_optarg
1473     export $ac_envvar ;;
1474
1475   *)
1476     # FIXME: should be removed in autoconf 3.0.
1477     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1478     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1479       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1480     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1481     ;;
1482
1483   esac
1484 done
1485
1486 if test -n "$ac_prev"; then
1487   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1488   as_fn_error $? "missing argument to $ac_option"
1489 fi
1490
1491 if test -n "$ac_unrecognized_opts"; then
1492   case $enable_option_checking in
1493     no) ;;
1494     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1495     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1496   esac
1497 fi
1498
1499 # Check all directory arguments for consistency.
1500 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1501                 datadir sysconfdir sharedstatedir localstatedir includedir \
1502                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1503                 libdir localedir mandir
1504 do
1505   eval ac_val=\$$ac_var
1506   # Remove trailing slashes.
1507   case $ac_val in
1508     */ )
1509       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1510       eval $ac_var=\$ac_val;;
1511   esac
1512   # Be sure to have absolute directory names.
1513   case $ac_val in
1514     [\\/$]* | ?:[\\/]* )  continue;;
1515     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1516   esac
1517   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1518 done
1519
1520 # There might be people who depend on the old broken behavior: `$host'
1521 # used to hold the argument of --host etc.
1522 # FIXME: To remove some day.
1523 build=$build_alias
1524 host=$host_alias
1525 target=$target_alias
1526
1527 # FIXME: To remove some day.
1528 if test "x$host_alias" != x; then
1529   if test "x$build_alias" = x; then
1530     cross_compiling=maybe
1531   elif test "x$build_alias" != "x$host_alias"; then
1532     cross_compiling=yes
1533   fi
1534 fi
1535
1536 ac_tool_prefix=
1537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1538
1539 test "$silent" = yes && exec 6>/dev/null
1540
1541
1542 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1543 ac_ls_di=`ls -di .` &&
1544 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1545   as_fn_error $? "working directory cannot be determined"
1546 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1547   as_fn_error $? "pwd does not report name of working directory"
1548
1549
1550 # Find the source files, if location was not specified.
1551 if test -z "$srcdir"; then
1552   ac_srcdir_defaulted=yes
1553   # Try the directory containing this script, then the parent directory.
1554   ac_confdir=`$as_dirname -- "$as_myself" ||
1555 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1556          X"$as_myself" : 'X\(//\)[^/]' \| \
1557          X"$as_myself" : 'X\(//\)$' \| \
1558          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1559 $as_echo X"$as_myself" |
1560     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1561             s//\1/
1562             q
1563           }
1564           /^X\(\/\/\)[^/].*/{
1565             s//\1/
1566             q
1567           }
1568           /^X\(\/\/\)$/{
1569             s//\1/
1570             q
1571           }
1572           /^X\(\/\).*/{
1573             s//\1/
1574             q
1575           }
1576           s/.*/./; q'`
1577   srcdir=$ac_confdir
1578   if test ! -r "$srcdir/$ac_unique_file"; then
1579     srcdir=..
1580   fi
1581 else
1582   ac_srcdir_defaulted=no
1583 fi
1584 if test ! -r "$srcdir/$ac_unique_file"; then
1585   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1586   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1587 fi
1588 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1589 ac_abs_confdir=`(
1590         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1591         pwd)`
1592 # When building in place, set srcdir=.
1593 if test "$ac_abs_confdir" = "$ac_pwd"; then
1594   srcdir=.
1595 fi
1596 # Remove unnecessary trailing slashes from srcdir.
1597 # Double slashes in file names in object file debugging info
1598 # mess up M-x gdb in Emacs.
1599 case $srcdir in
1600 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1601 esac
1602 for ac_var in $ac_precious_vars; do
1603   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1604   eval ac_env_${ac_var}_value=\$${ac_var}
1605   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1606   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1607 done
1608
1609 #
1610 # Report the --help message.
1611 #
1612 if test "$ac_init_help" = "long"; then
1613   # Omit some internal or obsolete options to make the list less imposing.
1614   # This message is too long to be a string in the A/UX 3.1 sh.
1615   cat <<_ACEOF
1616 \`configure' configures ntp 4.2.8p10 to adapt to many kinds of systems.
1617
1618 Usage: $0 [OPTION]... [VAR=VALUE]...
1619
1620 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1621 VAR=VALUE.  See below for descriptions of some of the useful variables.
1622
1623 Defaults for the options are specified in brackets.
1624
1625 Configuration:
1626   -h, --help              display this help and exit
1627       --help=short        display options specific to this package
1628       --help=recursive    display the short help of all the included packages
1629   -V, --version           display version information and exit
1630   -q, --quiet, --silent   do not print \`checking ...' messages
1631       --cache-file=FILE   cache test results in FILE [disabled]
1632   -C, --config-cache      alias for \`--cache-file=config.cache'
1633   -n, --no-create         do not create output files
1634       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1635
1636 Installation directories:
1637   --prefix=PREFIX         install architecture-independent files in PREFIX
1638                           [$ac_default_prefix]
1639   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1640                           [PREFIX]
1641
1642 By default, \`make install' will install all the files in
1643 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1644 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1645 for instance \`--prefix=\$HOME'.
1646
1647 For better control, use the options below.
1648
1649 Fine tuning of the installation directories:
1650   --bindir=DIR            user executables [EPREFIX/bin]
1651   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1652   --libexecdir=DIR        program executables [EPREFIX/libexec]
1653   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1654   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1655   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1656   --libdir=DIR            object code libraries [EPREFIX/lib]
1657   --includedir=DIR        C header files [PREFIX/include]
1658   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1659   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1660   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1661   --infodir=DIR           info documentation [DATAROOTDIR/info]
1662   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1663   --mandir=DIR            man documentation [DATAROOTDIR/man]
1664   --docdir=DIR            documentation root [DATAROOTDIR/doc/ntp]
1665   --htmldir=DIR           html documentation [DOCDIR]
1666   --dvidir=DIR            dvi documentation [DOCDIR]
1667   --pdfdir=DIR            pdf documentation [DOCDIR]
1668   --psdir=DIR             ps documentation [DOCDIR]
1669 _ACEOF
1670
1671   cat <<\_ACEOF
1672
1673 Program names:
1674   --program-prefix=PREFIX            prepend PREFIX to installed program names
1675   --program-suffix=SUFFIX            append SUFFIX to installed program names
1676   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1677
1678 System types:
1679   --build=BUILD     configure for building on BUILD [guessed]
1680   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1681 _ACEOF
1682 fi
1683
1684 if test -n "$ac_init_help"; then
1685   case $ac_init_help in
1686      short | recursive ) echo "Configuration of ntp 4.2.8p10:";;
1687    esac
1688   cat <<\_ACEOF
1689
1690 Optional Features and Packages:
1691   --disable-option-checking  ignore unrecognized --enable/--with options
1692   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1693   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1694   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1695   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1696   --enable-silent-rules   less verbose build output (undo: "make V=1")
1697   --disable-silent-rules  verbose build output (undo: "make V=0")
1698   --enable-dependency-tracking
1699                           do not reject slow dependency extractors
1700   --disable-dependency-tracking
1701                           speeds up one-time build
1702   --with-locfile=XXX      os-specific or "legacy"
1703   --enable-shared[=PKGS]  build shared libraries [default=no]
1704   --enable-static[=PKGS]  build static libraries [default=yes]
1705   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1706                           both]
1707   --enable-fast-install[=PKGS]
1708                           optimize for fast installation [default=yes]
1709   --with-aix-soname=aix|svr4|both
1710                           shared library versioning (aka "SONAME") variant to
1711                           provide on AIX, [default=aix].
1712   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1713   --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1714                           compiler's sysroot if not specified).
1715   --disable-libtool-lock  avoid locking (might break parallel builds)
1716   --disable-nls           disable nls support in libopts
1717   --enable-local-libopts  Use the supplied libopts tearoff code
1718   --enable-libopts-install
1719                           Install libopts with client installation
1720   --with-autoopts-config  specify the config-info script
1721   --enable-local-libevent Force using the supplied libevent tearoff code
1722   --with-lineeditlibs     edit,editline (readline may be specified if desired)
1723   defaults:               + yes, - no, s system-specific
1724   --enable-debugging      + include ntpd debugging code
1725   --enable-thread-support s use threads (+ if available)
1726   --with-threads          with threads [auto]
1727   --with-yielding-select  with yielding select [auto]
1728   --enable-c99-snprintf   s force replacement
1729   --enable-clockctl       s Use /dev/clockctl for non-root clock control
1730   --enable-linuxcaps      + Use Linux capabilities for non-root clock control
1731   --enable-solarisprivs   + Use Solaris privileges for non-root clock control
1732   --with-arlib            - deprecated, arlib not distributed
1733   --with-net-snmp-config  + =net-snmp-config
1734   --enable-libseccomp     EXPERIMENTAL: enable support for libseccomp
1735                           sandboxing (default is no)
1736   --with-stack-limit      ? =50 (200 for openbsd) 4k pages
1737   --with-memlock          ? =32 (-1 on linux) megabytes
1738   --enable-debug-timing   - include processing time debugging code (costs
1739                           performance)
1740   --enable-dst-minutes    =60 minutes per DST adjustment
1741   --enable-ignore-dns-errors
1742                           - retry DNS queries on any error
1743   --enable-BANCOMM        - Datum/Bancomm bc635/VME interface
1744   --enable-GPSVME         - TrueTime GPS receiver/VME interface
1745   --enable-all-clocks     + include all suitable non-PARSE clocks:
1746   --enable-ACTS           s ACTS modem service
1747   --enable-ARBITER        + Arbiter 1088A/B GPS receiver
1748   --enable-ARCRON-MSF     + Arcron MSF receiver
1749   --enable-AS2201         + Austron 2200A/2201A GPS receiver
1750   --enable-ATOM           s ATOM PPS interface
1751   --enable-CHRONOLOG      + Chrono-log K-series WWVB receiver
1752   --enable-CHU            + CHU modem/decoder
1753   --enable-AUDIO-CHU      s CHU audio/decoder
1754   --enable-DATUM          s Datum Programmable Time System
1755   --enable-DUMBCLOCK      + Dumb generic hh:mm:ss local clock
1756   --enable-FG             + Forum Graphic GPS
1757   --enable-HEATH          s Heath GC-1000 WWV/WWVH receiver
1758   --enable-HOPFSERIAL     + hopf serial clock device
1759   --enable-HOPFPCI        + hopf 6039 PCI board
1760   --enable-HPGPS          + HP 58503A GPS receiver
1761   --enable-IRIG           s IRIG audio decoder
1762   --enable-JJY            + JJY receiver
1763   --enable-JUPITER        s Rockwell Jupiter GPS receiver
1764   --enable-LEITCH         + Leitch CSD 5300 Master Clock System Driver
1765   --enable-LOCAL-CLOCK    + local clock reference
1766   --enable-MX4200         s Magnavox MX4200 GPS receiver
1767   --enable-NEOCLOCK4X     + NeoClock4X DCF77 / TDF receiver
1768   --enable-NMEA           + NMEA GPS receiver
1769   --enable-GPSD           + GPSD JSON receiver
1770   --enable-ONCORE         s Motorola VP/UT Oncore GPS receiver
1771   --enable-PALISADE       s Palisade clock
1772   --enable-PCF            + Conrad parallel port radio clock
1773   --enable-PST            + PST/Traconex 1020 WWV/WWVH receiver
1774   --enable-RIPENCC        - RIPENCC specific Trimble driver
1775   --enable-SHM            s SHM clock attached thru shared memory
1776   --enable-SPECTRACOM     + Spectracom 8170/Netclock/2 WWVB receiver
1777   --enable-TPRO           s KSI/Odetics TPRO/S GPS receiver/IRIG interface
1778   --enable-TRUETIME       s Kinemetrics/TrueTime receivers
1779   --enable-TT560          - TrueTime 560 IRIG-B decoder
1780   --enable-ULINK          + Ultralink WWVB receiver
1781   --enable-TSYNCPCI       s Spectracom TSYNC timing board
1782   --enable-WWV            s WWV Audio receiver
1783   --enable-ZYFER          + Zyfer GPStarplus receiver
1784   --enable-parse-clocks   - include all suitable PARSE clocks:
1785   --enable-COMPUTIME      s Diem Computime Radio Clock
1786   --enable-DCF7000        s ELV/DCF7000 clock
1787   --enable-HOPF6021       s HOPF 6021 clock
1788   --enable-MEINBERG       s Meinberg clocks
1789   --enable-RAWDCF         s DCF77 raw time code
1790   --enable-RCC8000        s RCC 8000 clock
1791   --enable-SCHMID         s Schmid DCF77 clock
1792   --enable-TRIMTAIP       s Trimble GPS receiver/TAIP protocol
1793   --enable-TRIMTSIP       s Trimble GPS receiver/TSIP protocol
1794   --enable-WHARTON        s WHARTON 400A Series clock
1795   --enable-VARITEXT       s VARITEXT clock
1796   --enable-SEL240X        s SEL240X clock
1797   --with-crypto           + =openssl,libcrypto
1798
1799   --with-openssl-libdir   + =/something/reasonable
1800
1801   --with-openssl-incdir   + =/something/reasonable
1802
1803   --without-rpath         s Disable auto-added -R linker paths
1804
1805   --enable-openssl-random Use OpenSSL's crypto random number functions, if
1806                           available (default is yes)
1807   --enable-autokey        + support NTP Autokey protocol
1808   --enable-kmem           s read /dev/kmem for tick and/or tickadj
1809   --enable-accurate-adjtime
1810                           s the adjtime() call is accurate
1811   --enable-tick=VALUE     s force a value for 'tick'
1812   --enable-tickadj=VALUE  s force a value for 'tickadj'
1813   --enable-simulator      - build/install the NTPD simulator?
1814   --without-sntp          - disable building sntp and sntp/tests
1815   --with-ntpsnmpd         s Build ntpsnmpd MIB agent?
1816   --enable-slew-always    s always slew the time
1817   --enable-step-slew      s step and slew the time
1818   --enable-ntpdate-step   s if ntpdate should step the time
1819   --enable-hourly-todr-sync
1820                           s if we should sync TODR hourly
1821   --enable-kernel-fll-bug s if we should avoid a kernel FLL bug
1822   --enable-bug1243-fix    + use unmodified autokey session keys
1823   --enable-bug3020-fix    + Provide the explicit 127.0.0.0/8 martian filter
1824   --enable-irig-sawtooth  s if we should enable the IRIG sawtooth filter
1825   --enable-nist           - if we should enable the NIST lockclock scheme
1826   --enable-ntp-signd      - Provide support for Samba's signing daemon,
1827                           =/var/run/ntp_signd
1828   --enable-ipv6           s use IPv6?
1829
1830   --with-kame             - =/usr/local/v6
1831   --enable-getifaddrs     + Enable the use of getifaddrs() [[yes|no]].
1832   --enable-saveconfig     + saveconfig mechanism
1833   --enable-leap-smear     - experimental leap smear code
1834   --enable-dynamic-interleave
1835                           - dynamic interleave support
1836   --with-gtest            Use the gtest framework (Default: if it's available)
1837   --enable-problem-tests  + enable tests with undiagnosed problems
1838
1839 Some influential environment variables:
1840   CC          C compiler command
1841   CFLAGS      C compiler flags
1842   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1843               nonstandard directory <lib dir>
1844   LIBS        libraries to pass to the linker, e.g. -l<library>
1845   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1846               you have headers in a nonstandard directory <include dir>
1847   CPP         C preprocessor
1848   YACC        The `Yet Another Compiler Compiler' implementation to use.
1849               Defaults to the first program found out of: `bison -y', `byacc',
1850               `yacc'.
1851   YFLAGS      The list of arguments that will be passed by default to $YACC.
1852               This script will default YFLAGS to the empty string to avoid a
1853               default value of `-d' given by some make applications.
1854   LT_SYS_LIBRARY_PATH
1855               User-defined run-time library search path.
1856
1857 Use these variables to override the choices made by `configure' or to help
1858 it to find libraries and programs with nonstandard names/locations.
1859
1860 Report bugs to <http://bugs.ntp.org./>.
1861 ntp home page: <http://www.ntp.org./>.
1862 _ACEOF
1863 ac_status=$?
1864 fi
1865
1866 if test "$ac_init_help" = "recursive"; then
1867   # If there are subdirs, report their specific --help.
1868   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1869     test -d "$ac_dir" ||
1870       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1871       continue
1872     ac_builddir=.
1873
1874 case "$ac_dir" in
1875 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1876 *)
1877   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1878   # A ".." for each directory in $ac_dir_suffix.
1879   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1880   case $ac_top_builddir_sub in
1881   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1882   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1883   esac ;;
1884 esac
1885 ac_abs_top_builddir=$ac_pwd
1886 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1887 # for backward compatibility:
1888 ac_top_builddir=$ac_top_build_prefix
1889
1890 case $srcdir in
1891   .)  # We are building in place.
1892     ac_srcdir=.
1893     ac_top_srcdir=$ac_top_builddir_sub
1894     ac_abs_top_srcdir=$ac_pwd ;;
1895   [\\/]* | ?:[\\/]* )  # Absolute name.
1896     ac_srcdir=$srcdir$ac_dir_suffix;
1897     ac_top_srcdir=$srcdir
1898     ac_abs_top_srcdir=$srcdir ;;
1899   *) # Relative name.
1900     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1901     ac_top_srcdir=$ac_top_build_prefix$srcdir
1902     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1903 esac
1904 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1905
1906     cd "$ac_dir" || { ac_status=$?; continue; }
1907     # Check for guested configure.
1908     if test -f "$ac_srcdir/configure.gnu"; then
1909       echo &&
1910       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1911     elif test -f "$ac_srcdir/configure"; then
1912       echo &&
1913       $SHELL "$ac_srcdir/configure" --help=recursive
1914     else
1915       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1916     fi || ac_status=$?
1917     cd "$ac_pwd" || { ac_status=$?; break; }
1918   done
1919 fi
1920
1921 test -n "$ac_init_help" && exit $ac_status
1922 if $ac_init_version; then
1923   cat <<\_ACEOF
1924 ntp configure 4.2.8p10
1925 generated by GNU Autoconf 2.69
1926
1927 Copyright (C) 2012 Free Software Foundation, Inc.
1928 This configure script is free software; the Free Software Foundation
1929 gives unlimited permission to copy, distribute and modify it.
1930 _ACEOF
1931   exit
1932 fi
1933
1934 ## ------------------------ ##
1935 ## Autoconf initialization. ##
1936 ## ------------------------ ##
1937
1938 # ac_fn_c_try_compile LINENO
1939 # --------------------------
1940 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1941 ac_fn_c_try_compile ()
1942 {
1943   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1944   rm -f conftest.$ac_objext
1945   if { { ac_try="$ac_compile"
1946 case "(($ac_try" in
1947   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1948   *) ac_try_echo=$ac_try;;
1949 esac
1950 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1951 $as_echo "$ac_try_echo"; } >&5
1952   (eval "$ac_compile") 2>conftest.err
1953   ac_status=$?
1954   if test -s conftest.err; then
1955     grep -v '^ *+' conftest.err >conftest.er1
1956     cat conftest.er1 >&5
1957     mv -f conftest.er1 conftest.err
1958   fi
1959   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1960   test $ac_status = 0; } && {
1961          test -z "$ac_c_werror_flag" ||
1962          test ! -s conftest.err
1963        } && test -s conftest.$ac_objext; then :
1964   ac_retval=0
1965 else
1966   $as_echo "$as_me: failed program was:" >&5
1967 sed 's/^/| /' conftest.$ac_ext >&5
1968
1969         ac_retval=1
1970 fi
1971   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1972   as_fn_set_status $ac_retval
1973
1974 } # ac_fn_c_try_compile
1975
1976 # ac_fn_c_try_cpp LINENO
1977 # ----------------------
1978 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1979 ac_fn_c_try_cpp ()
1980 {
1981   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1982   if { { ac_try="$ac_cpp conftest.$ac_ext"
1983 case "(($ac_try" in
1984   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1985   *) ac_try_echo=$ac_try;;
1986 esac
1987 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1988 $as_echo "$ac_try_echo"; } >&5
1989   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1990   ac_status=$?
1991   if test -s conftest.err; then
1992     grep -v '^ *+' conftest.err >conftest.er1
1993     cat conftest.er1 >&5
1994     mv -f conftest.er1 conftest.err
1995   fi
1996   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1997   test $ac_status = 0; } > conftest.i && {
1998          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1999          test ! -s conftest.err
2000        }; then :
2001   ac_retval=0
2002 else
2003   $as_echo "$as_me: failed program was:" >&5
2004 sed 's/^/| /' conftest.$ac_ext >&5
2005
2006     ac_retval=1
2007 fi
2008   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2009   as_fn_set_status $ac_retval
2010
2011 } # ac_fn_c_try_cpp
2012
2013 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2014 # -------------------------------------------------------
2015 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2016 # the include files in INCLUDES and setting the cache variable VAR
2017 # accordingly.
2018 ac_fn_c_check_header_mongrel ()
2019 {
2020   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2021   if eval \${$3+:} false; then :
2022   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2023 $as_echo_n "checking for $2... " >&6; }
2024 if eval \${$3+:} false; then :
2025   $as_echo_n "(cached) " >&6
2026 fi
2027 eval ac_res=\$$3
2028                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2029 $as_echo "$ac_res" >&6; }
2030 else
2031   # Is the header compilable?
2032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2033 $as_echo_n "checking $2 usability... " >&6; }
2034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2035 /* end confdefs.h.  */
2036 $4
2037 #include <$2>
2038 _ACEOF
2039 if ac_fn_c_try_compile "$LINENO"; then :
2040   ac_header_compiler=yes
2041 else
2042   ac_header_compiler=no
2043 fi
2044 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2046 $as_echo "$ac_header_compiler" >&6; }
2047
2048 # Is the header present?
2049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2050 $as_echo_n "checking $2 presence... " >&6; }
2051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052 /* end confdefs.h.  */
2053 #include <$2>
2054 _ACEOF
2055 if ac_fn_c_try_cpp "$LINENO"; then :
2056   ac_header_preproc=yes
2057 else
2058   ac_header_preproc=no
2059 fi
2060 rm -f conftest.err conftest.i conftest.$ac_ext
2061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2062 $as_echo "$ac_header_preproc" >&6; }
2063
2064 # So?  What about this header?
2065 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2066   yes:no: )
2067     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2068 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2069     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2070 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2071     ;;
2072   no:yes:* )
2073     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2074 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2075     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2076 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2077     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2078 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2079     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2080 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2081     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2082 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2083 ( $as_echo "## ------------------------------------ ##
2084 ## Report this to http://bugs.ntp.org./ ##
2085 ## ------------------------------------ ##"
2086      ) | sed "s/^/$as_me: WARNING:     /" >&2
2087     ;;
2088 esac
2089   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2090 $as_echo_n "checking for $2... " >&6; }
2091 if eval \${$3+:} false; then :
2092   $as_echo_n "(cached) " >&6
2093 else
2094   eval "$3=\$ac_header_compiler"
2095 fi
2096 eval ac_res=\$$3
2097                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2098 $as_echo "$ac_res" >&6; }
2099 fi
2100   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2101
2102 } # ac_fn_c_check_header_mongrel
2103
2104 # ac_fn_c_try_run LINENO
2105 # ----------------------
2106 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2107 # that executables *can* be run.
2108 ac_fn_c_try_run ()
2109 {
2110   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2111   if { { ac_try="$ac_link"
2112 case "(($ac_try" in
2113   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2114   *) ac_try_echo=$ac_try;;
2115 esac
2116 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2117 $as_echo "$ac_try_echo"; } >&5
2118   (eval "$ac_link") 2>&5
2119   ac_status=$?
2120   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2121   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2122   { { case "(($ac_try" in
2123   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2124   *) ac_try_echo=$ac_try;;
2125 esac
2126 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2127 $as_echo "$ac_try_echo"; } >&5
2128   (eval "$ac_try") 2>&5
2129   ac_status=$?
2130   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2131   test $ac_status = 0; }; }; then :
2132   ac_retval=0
2133 else
2134   $as_echo "$as_me: program exited with status $ac_status" >&5
2135        $as_echo "$as_me: failed program was:" >&5
2136 sed 's/^/| /' conftest.$ac_ext >&5
2137
2138        ac_retval=$ac_status
2139 fi
2140   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2141   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2142   as_fn_set_status $ac_retval
2143
2144 } # ac_fn_c_try_run
2145
2146 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2147 # -------------------------------------------------------
2148 # Tests whether HEADER exists and can be compiled using the include files in
2149 # INCLUDES, setting the cache variable VAR accordingly.
2150 ac_fn_c_check_header_compile ()
2151 {
2152   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2153   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2154 $as_echo_n "checking for $2... " >&6; }
2155 if eval \${$3+:} false; then :
2156   $as_echo_n "(cached) " >&6
2157 else
2158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2159 /* end confdefs.h.  */
2160 $4
2161 #include <$2>
2162 _ACEOF
2163 if ac_fn_c_try_compile "$LINENO"; then :
2164   eval "$3=yes"
2165 else
2166   eval "$3=no"
2167 fi
2168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2169 fi
2170 eval ac_res=\$$3
2171                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2172 $as_echo "$ac_res" >&6; }
2173   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2174
2175 } # ac_fn_c_check_header_compile
2176
2177 # ac_fn_c_try_link LINENO
2178 # -----------------------
2179 # Try to link conftest.$ac_ext, and return whether this succeeded.
2180 ac_fn_c_try_link ()
2181 {
2182   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2183   rm -f conftest.$ac_objext conftest$ac_exeext
2184   if { { ac_try="$ac_link"
2185 case "(($ac_try" in
2186   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2187   *) ac_try_echo=$ac_try;;
2188 esac
2189 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2190 $as_echo "$ac_try_echo"; } >&5
2191   (eval "$ac_link") 2>conftest.err
2192   ac_status=$?
2193   if test -s conftest.err; then
2194     grep -v '^ *+' conftest.err >conftest.er1
2195     cat conftest.er1 >&5
2196     mv -f conftest.er1 conftest.err
2197   fi
2198   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2199   test $ac_status = 0; } && {
2200          test -z "$ac_c_werror_flag" ||
2201          test ! -s conftest.err
2202        } && test -s conftest$ac_exeext && {
2203          test "$cross_compiling" = yes ||
2204          test -x conftest$ac_exeext
2205        }; then :
2206   ac_retval=0
2207 else
2208   $as_echo "$as_me: failed program was:" >&5
2209 sed 's/^/| /' conftest.$ac_ext >&5
2210
2211         ac_retval=1
2212 fi
2213   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2214   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2215   # interfere with the next link command; also delete a directory that is
2216   # left behind by Apple's compiler.  We do this before executing the actions.
2217   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2218   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2219   as_fn_set_status $ac_retval
2220
2221 } # ac_fn_c_try_link
2222
2223 # ac_fn_c_check_func LINENO FUNC VAR
2224 # ----------------------------------
2225 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2226 ac_fn_c_check_func ()
2227 {
2228   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2229   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2230 $as_echo_n "checking for $2... " >&6; }
2231 if eval \${$3+:} false; then :
2232   $as_echo_n "(cached) " >&6
2233 else
2234   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2235 /* end confdefs.h.  */
2236 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2237    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2238 #define $2 innocuous_$2
2239
2240 /* System header to define __stub macros and hopefully few prototypes,
2241     which can conflict with char $2 (); below.
2242     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2243     <limits.h> exists even on freestanding compilers.  */
2244
2245 #ifdef __STDC__
2246 # include <limits.h>
2247 #else
2248 # include <assert.h>
2249 #endif
2250
2251 #undef $2
2252
2253 /* Override any GCC internal prototype to avoid an error.
2254    Use char because int might match the return type of a GCC
2255    builtin and then its argument prototype would still apply.  */
2256 #ifdef __cplusplus
2257 extern "C"
2258 #endif
2259 char $2 ();
2260 /* The GNU C library defines this for functions which it implements
2261     to always fail with ENOSYS.  Some functions are actually named
2262     something starting with __ and the normal name is an alias.  */
2263 #if defined __stub_$2 || defined __stub___$2
2264 choke me
2265 #endif
2266
2267 int
2268 main ()
2269 {
2270 return $2 ();
2271   ;
2272   return 0;
2273 }
2274 _ACEOF
2275 if ac_fn_c_try_link "$LINENO"; then :
2276   eval "$3=yes"
2277 else
2278   eval "$3=no"
2279 fi
2280 rm -f core conftest.err conftest.$ac_objext \
2281     conftest$ac_exeext conftest.$ac_ext
2282 fi
2283 eval ac_res=\$$3
2284                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2285 $as_echo "$ac_res" >&6; }
2286   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2287
2288 } # ac_fn_c_check_func
2289
2290 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2291 # -------------------------------------------
2292 # Tests whether TYPE exists after having included INCLUDES, setting cache
2293 # variable VAR accordingly.
2294 ac_fn_c_check_type ()
2295 {
2296   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2297   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2298 $as_echo_n "checking for $2... " >&6; }
2299 if eval \${$3+:} false; then :
2300   $as_echo_n "(cached) " >&6
2301 else
2302   eval "$3=no"
2303   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304 /* end confdefs.h.  */
2305 $4
2306 int
2307 main ()
2308 {
2309 if (sizeof ($2))
2310          return 0;
2311   ;
2312   return 0;
2313 }
2314 _ACEOF
2315 if ac_fn_c_try_compile "$LINENO"; then :
2316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317 /* end confdefs.h.  */
2318 $4
2319 int
2320 main ()
2321 {
2322 if (sizeof (($2)))
2323             return 0;
2324   ;
2325   return 0;
2326 }
2327 _ACEOF
2328 if ac_fn_c_try_compile "$LINENO"; then :
2329
2330 else
2331   eval "$3=yes"
2332 fi
2333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334 fi
2335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2336 fi
2337 eval ac_res=\$$3
2338                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2339 $as_echo "$ac_res" >&6; }
2340   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2341
2342 } # ac_fn_c_check_type
2343
2344 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2345 # --------------------------------------------
2346 # Tries to find the compile-time value of EXPR in a program that includes
2347 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2348 # computed
2349 ac_fn_c_compute_int ()
2350 {
2351   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2352   if test "$cross_compiling" = yes; then
2353     # Depending upon the size, compute the lo and hi bounds.
2354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2355 /* end confdefs.h.  */
2356 $4
2357 int
2358 main ()
2359 {
2360 static int test_array [1 - 2 * !(($2) >= 0)];
2361 test_array [0] = 0;
2362 return test_array [0];
2363
2364   ;
2365   return 0;
2366 }
2367 _ACEOF
2368 if ac_fn_c_try_compile "$LINENO"; then :
2369   ac_lo=0 ac_mid=0
2370   while :; do
2371     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2372 /* end confdefs.h.  */
2373 $4
2374 int
2375 main ()
2376 {
2377 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2378 test_array [0] = 0;
2379 return test_array [0];
2380
2381   ;
2382   return 0;
2383 }
2384 _ACEOF
2385 if ac_fn_c_try_compile "$LINENO"; then :
2386   ac_hi=$ac_mid; break
2387 else
2388   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2389                         if test $ac_lo -le $ac_mid; then
2390                           ac_lo= ac_hi=
2391                           break
2392                         fi
2393                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2394 fi
2395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2396   done
2397 else
2398   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2399 /* end confdefs.h.  */
2400 $4
2401 int
2402 main ()
2403 {
2404 static int test_array [1 - 2 * !(($2) < 0)];
2405 test_array [0] = 0;
2406 return test_array [0];
2407
2408   ;
2409   return 0;
2410 }
2411 _ACEOF
2412 if ac_fn_c_try_compile "$LINENO"; then :
2413   ac_hi=-1 ac_mid=-1
2414   while :; do
2415     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2416 /* end confdefs.h.  */
2417 $4
2418 int
2419 main ()
2420 {
2421 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2422 test_array [0] = 0;
2423 return test_array [0];
2424
2425   ;
2426   return 0;
2427 }
2428 _ACEOF
2429 if ac_fn_c_try_compile "$LINENO"; then :
2430   ac_lo=$ac_mid; break
2431 else
2432   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2433                         if test $ac_mid -le $ac_hi; then
2434                           ac_lo= ac_hi=
2435                           break
2436                         fi
2437                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2438 fi
2439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2440   done
2441 else
2442   ac_lo= ac_hi=
2443 fi
2444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2445 fi
2446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2447 # Binary search between lo and hi bounds.
2448 while test "x$ac_lo" != "x$ac_hi"; do
2449   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2451 /* end confdefs.h.  */
2452 $4
2453 int
2454 main ()
2455 {
2456 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2457 test_array [0] = 0;
2458 return test_array [0];
2459
2460   ;
2461   return 0;
2462 }
2463 _ACEOF
2464 if ac_fn_c_try_compile "$LINENO"; then :
2465   ac_hi=$ac_mid
2466 else
2467   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2468 fi
2469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2470 done
2471 case $ac_lo in #((
2472 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2473 '') ac_retval=1 ;;
2474 esac
2475   else
2476     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2477 /* end confdefs.h.  */
2478 $4
2479 static long int longval () { return $2; }
2480 static unsigned long int ulongval () { return $2; }
2481 #include <stdio.h>
2482 #include <stdlib.h>
2483 int
2484 main ()
2485 {
2486
2487   FILE *f = fopen ("conftest.val", "w");
2488   if (! f)
2489     return 1;
2490   if (($2) < 0)
2491     {
2492       long int i = longval ();
2493       if (i != ($2))
2494         return 1;
2495       fprintf (f, "%ld", i);
2496     }
2497   else
2498     {
2499       unsigned long int i = ulongval ();
2500       if (i != ($2))
2501         return 1;
2502       fprintf (f, "%lu", i);
2503     }
2504   /* Do not output a trailing newline, as this causes \r\n confusion
2505      on some platforms.  */
2506   return ferror (f) || fclose (f) != 0;
2507
2508   ;
2509   return 0;
2510 }
2511 _ACEOF
2512 if ac_fn_c_try_run "$LINENO"; then :
2513   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2514 else
2515   ac_retval=1
2516 fi
2517 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2518   conftest.$ac_objext conftest.beam conftest.$ac_ext
2519 rm -f conftest.val
2520
2521   fi
2522   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2523   as_fn_set_status $ac_retval
2524
2525 } # ac_fn_c_compute_int
2526
2527 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2528 # ---------------------------------------------
2529 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2530 # accordingly.
2531 ac_fn_c_check_decl ()
2532 {
2533   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2534   as_decl_name=`echo $2|sed 's/ *(.*//'`
2535   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2536   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2537 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2538 if eval \${$3+:} false; then :
2539   $as_echo_n "(cached) " >&6
2540 else
2541   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2542 /* end confdefs.h.  */
2543 $4
2544 int
2545 main ()
2546 {
2547 #ifndef $as_decl_name
2548 #ifdef __cplusplus
2549   (void) $as_decl_use;
2550 #else
2551   (void) $as_decl_name;
2552 #endif
2553 #endif
2554
2555   ;
2556   return 0;
2557 }
2558 _ACEOF
2559 if ac_fn_c_try_compile "$LINENO"; then :
2560   eval "$3=yes"
2561 else
2562   eval "$3=no"
2563 fi
2564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2565 fi
2566 eval ac_res=\$$3
2567                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2568 $as_echo "$ac_res" >&6; }
2569   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2570
2571 } # ac_fn_c_check_decl
2572
2573 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2574 # ----------------------------------------------------
2575 # Tries to find if the field MEMBER exists in type AGGR, after including
2576 # INCLUDES, setting cache variable VAR accordingly.
2577 ac_fn_c_check_member ()
2578 {
2579   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2580   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2581 $as_echo_n "checking for $2.$3... " >&6; }
2582 if eval \${$4+:} false; then :
2583   $as_echo_n "(cached) " >&6
2584 else
2585   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2586 /* end confdefs.h.  */
2587 $5
2588 int
2589 main ()
2590 {
2591 static $2 ac_aggr;
2592 if (ac_aggr.$3)
2593 return 0;
2594   ;
2595   return 0;
2596 }
2597 _ACEOF
2598 if ac_fn_c_try_compile "$LINENO"; then :
2599   eval "$4=yes"
2600 else
2601   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2602 /* end confdefs.h.  */
2603 $5
2604 int
2605 main ()
2606 {
2607 static $2 ac_aggr;
2608 if (sizeof ac_aggr.$3)
2609 return 0;
2610   ;
2611   return 0;
2612 }
2613 _ACEOF
2614 if ac_fn_c_try_compile "$LINENO"; then :
2615   eval "$4=yes"
2616 else
2617   eval "$4=no"
2618 fi
2619 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2620 fi
2621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2622 fi
2623 eval ac_res=\$$4
2624                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2625 $as_echo "$ac_res" >&6; }
2626   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2627
2628 } # ac_fn_c_check_member
2629 cat >config.log <<_ACEOF
2630 This file contains any messages produced by compilers while
2631 running configure, to aid debugging if configure makes a mistake.
2632
2633 It was created by ntp $as_me 4.2.8p10, which was
2634 generated by GNU Autoconf 2.69.  Invocation command line was
2635
2636   $ $0 $@
2637
2638 _ACEOF
2639 exec 5>>config.log
2640 {
2641 cat <<_ASUNAME
2642 ## --------- ##
2643 ## Platform. ##
2644 ## --------- ##
2645
2646 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2647 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2648 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2649 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2650 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2651
2652 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2653 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2654
2655 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2656 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2657 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2658 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2659 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2660 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2661 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2662
2663 _ASUNAME
2664
2665 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2666 for as_dir in $PATH
2667 do
2668   IFS=$as_save_IFS
2669   test -z "$as_dir" && as_dir=.
2670     $as_echo "PATH: $as_dir"
2671   done
2672 IFS=$as_save_IFS
2673
2674 } >&5
2675
2676 cat >&5 <<_ACEOF
2677
2678
2679 ## ----------- ##
2680 ## Core tests. ##
2681 ## ----------- ##
2682
2683 _ACEOF
2684
2685
2686 # Keep a trace of the command line.
2687 # Strip out --no-create and --no-recursion so they do not pile up.
2688 # Strip out --silent because we don't want to record it for future runs.
2689 # Also quote any args containing shell meta-characters.
2690 # Make two passes to allow for proper duplicate-argument suppression.
2691 ac_configure_args=
2692 ac_configure_args0=
2693 ac_configure_args1=
2694 ac_must_keep_next=false
2695 for ac_pass in 1 2
2696 do
2697   for ac_arg
2698   do
2699     case $ac_arg in
2700     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2701     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2702     | -silent | --silent | --silen | --sile | --sil)
2703       continue ;;
2704     *\'*)
2705       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2706     esac
2707     case $ac_pass in
2708     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2709     2)
2710       as_fn_append ac_configure_args1 " '$ac_arg'"
2711       if test $ac_must_keep_next = true; then
2712         ac_must_keep_next=false # Got value, back to normal.
2713       else
2714         case $ac_arg in
2715           *=* | --config-cache | -C | -disable-* | --disable-* \
2716           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2717           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2718           | -with-* | --with-* | -without-* | --without-* | --x)
2719             case "$ac_configure_args0 " in
2720               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2721             esac
2722             ;;
2723           -* ) ac_must_keep_next=true ;;
2724         esac
2725       fi
2726       as_fn_append ac_configure_args " '$ac_arg'"
2727       ;;
2728     esac
2729   done
2730 done
2731 { ac_configure_args0=; unset ac_configure_args0;}
2732 { ac_configure_args1=; unset ac_configure_args1;}
2733
2734 # When interrupted or exit'd, cleanup temporary files, and complete
2735 # config.log.  We remove comments because anyway the quotes in there
2736 # would cause problems or look ugly.
2737 # WARNING: Use '\'' to represent an apostrophe within the trap.
2738 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2739 trap 'exit_status=$?
2740   # Save into config.log some information that might help in debugging.
2741   {
2742     echo
2743
2744     $as_echo "## ---------------- ##
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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2756 $as_echo "$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     $as_echo "## ----------------- ##
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=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2789       esac
2790       $as_echo "$ac_var='\''$ac_val'\''"
2791     done | sort
2792     echo
2793
2794     if test -n "$ac_subst_files"; then
2795       $as_echo "## ------------------- ##
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=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2804         esac
2805         $as_echo "$ac_var='\''$ac_val'\''"
2806       done | sort
2807       echo
2808     fi
2809
2810     if test -s confdefs.h; then
2811       $as_echo "## ----------- ##
2812 ## confdefs.h. ##
2813 ## ----------- ##"
2814       echo
2815       cat confdefs.h
2816       echo
2817     fi
2818     test "$ac_signal" != 0 &&
2819       $as_echo "$as_me: caught signal $ac_signal"
2820     $as_echo "$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
2826 for ac_signal in 1 2 13 15; do
2827   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2828 done
2829 ac_signal=0
2830
2831 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2832 rm -f -r conftest* confdefs.h
2833
2834 $as_echo "/* confdefs.h */" > confdefs.h
2835
2836 # Predefined preprocessor variables.
2837
2838 cat >>confdefs.h <<_ACEOF
2839 #define PACKAGE_NAME "$PACKAGE_NAME"
2840 _ACEOF
2841
2842 cat >>confdefs.h <<_ACEOF
2843 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2844 _ACEOF
2845
2846 cat >>confdefs.h <<_ACEOF
2847 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2848 _ACEOF
2849
2850 cat >>confdefs.h <<_ACEOF
2851 #define PACKAGE_STRING "$PACKAGE_STRING"
2852 _ACEOF
2853
2854 cat >>confdefs.h <<_ACEOF
2855 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2856 _ACEOF
2857
2858 cat >>confdefs.h <<_ACEOF
2859 #define PACKAGE_URL "$PACKAGE_URL"
2860 _ACEOF
2861
2862
2863 # Let the site file select an alternate cache file if it wants to.
2864 # Prefer an explicitly selected file to automatically selected ones.
2865 ac_site_file1=NONE
2866 ac_site_file2=NONE
2867 if test -n "$CONFIG_SITE"; then
2868   # We do not want a PATH search for config.site.
2869   case $CONFIG_SITE in #((
2870     -*)  ac_site_file1=./$CONFIG_SITE;;
2871     */*) ac_site_file1=$CONFIG_SITE;;
2872     *)   ac_site_file1=./$CONFIG_SITE;;
2873   esac
2874 elif test "x$prefix" != xNONE; then
2875   ac_site_file1=$prefix/share/config.site
2876   ac_site_file2=$prefix/etc/config.site
2877 else
2878   ac_site_file1=$ac_default_prefix/share/config.site
2879   ac_site_file2=$ac_default_prefix/etc/config.site
2880 fi
2881 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2882 do
2883   test "x$ac_site_file" = xNONE && continue
2884   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2885     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2886 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2887     sed 's/^/| /' "$ac_site_file" >&5
2888     . "$ac_site_file" \
2889       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2890 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2891 as_fn_error $? "failed to load site script $ac_site_file
2892 See \`config.log' for more details" "$LINENO" 5; }
2893   fi
2894 done
2895
2896 if test -r "$cache_file"; then
2897   # Some versions of bash will fail to source /dev/null (special files
2898   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2899   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2900     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2901 $as_echo "$as_me: loading cache $cache_file" >&6;}
2902     case $cache_file in
2903       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2904       *)                      . "./$cache_file";;
2905     esac
2906   fi
2907 else
2908   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2909 $as_echo "$as_me: creating cache $cache_file" >&6;}
2910   >$cache_file
2911 fi
2912
2913 as_fn_append ac_header_list " stdarg.h"
2914 # Check that the precious variables saved in the cache have kept the same
2915 # value.
2916 ac_cache_corrupted=false
2917 for ac_var in $ac_precious_vars; do
2918   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2919   eval ac_new_set=\$ac_env_${ac_var}_set
2920   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2921   eval ac_new_val=\$ac_env_${ac_var}_value
2922   case $ac_old_set,$ac_new_set in
2923     set,)
2924       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2925 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2926       ac_cache_corrupted=: ;;
2927     ,set)
2928       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2929 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2930       ac_cache_corrupted=: ;;
2931     ,);;
2932     *)
2933       if test "x$ac_old_val" != "x$ac_new_val"; then
2934         # differences in whitespace do not lead to failure.
2935         ac_old_val_w=`echo x $ac_old_val`
2936         ac_new_val_w=`echo x $ac_new_val`
2937         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2938           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2939 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2940           ac_cache_corrupted=:
2941         else
2942           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2943 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2944           eval $ac_var=\$ac_old_val
2945         fi
2946         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2947 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2948         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2949 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2950       fi;;
2951   esac
2952   # Pass precious variables to config.status.
2953   if test "$ac_new_set" = set; then
2954     case $ac_new_val in
2955     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2956     *) ac_arg=$ac_var=$ac_new_val ;;
2957     esac
2958     case " $ac_configure_args " in
2959       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2960       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2961     esac
2962   fi
2963 done
2964 if $ac_cache_corrupted; then
2965   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2966 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2967   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2968 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2969   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2970 fi
2971 ## -------------------- ##
2972 ## Main body of script. ##
2973 ## -------------------- ##
2974
2975 ac_ext=c
2976 ac_cpp='$CPP $CPPFLAGS'
2977 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2978 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2979 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2980
2981
2982
2983 ac_aux_dir=
2984 for ac_dir in sntp/libevent/build-aux "$srcdir"/sntp/libevent/build-aux; do
2985   if test -f "$ac_dir/install-sh"; then
2986     ac_aux_dir=$ac_dir
2987     ac_install_sh="$ac_aux_dir/install-sh -c"
2988     break
2989   elif test -f "$ac_dir/install.sh"; then
2990     ac_aux_dir=$ac_dir
2991     ac_install_sh="$ac_aux_dir/install.sh -c"
2992     break
2993   elif test -f "$ac_dir/shtool"; then
2994     ac_aux_dir=$ac_dir
2995     ac_install_sh="$ac_aux_dir/shtool install -c"
2996     break
2997   fi
2998 done
2999 if test -z "$ac_aux_dir"; then
3000   as_fn_error $? "cannot find install-sh, install.sh, or shtool in sntp/libevent/build-aux \"$srcdir\"/sntp/libevent/build-aux" "$LINENO" 5
3001 fi
3002
3003 # These three variables are undocumented and unsupported,
3004 # and are intended to be withdrawn in a future Autoconf release.
3005 # They can cause serious problems if a builder's source tree is in a directory
3006 # whose full name contains unusual characters.
3007 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3008 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3009 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3010
3011
3012 ac_ext=c
3013 ac_cpp='$CPP $CPPFLAGS'
3014 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3015 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3016 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3017
3018
3019
3020
3021
3022
3023 # Bump ntp_configure_cache_version for each change to configure.ac or
3024 # .m4 files which invalidates cached values from previous configure
3025 # runs.
3026 #
3027 # If the change affects cache variables used only by the main NTP
3028 # configure.ac, then only its version number should be bumped, while
3029 # the subdir configure.ac version numbers should be unchanged.  The
3030 # same is true for a test/variable that is used only by one subdir
3031 # being changed incompatibly; only that subdir's cache version needs
3032 # bumping.
3033 #
3034 # If a change affects variables shared by all NTP configure scripts,
3035 # please bump the version numbers of each.  If you are not sure, the
3036 # safe choice is to bump all on any cache-invalidating change.
3037 #
3038 # In order to avoid the risk of version stamp collision between -stable
3039 # and -dev branches, do not simply increment the version, instead use
3040 # the date YYYYMMDD optionally with -HHMM if there is more than one
3041 # bump in a day.
3042
3043 ntp_configure_cache_version=20120806
3044
3045 # When the cache version of config.cache and configure do not
3046 # match, NTP_CACHEVERSION will flush the cache.
3047
3048
3049
3050     ntp_cache_flush=1
3051
3052     case "$ntp_cv_main_cache_version" in
3053      $ntp_configure_cache_version)
3054         # same version, good
3055         ntp_cache_flush=0
3056         ;;
3057      '')
3058         # No cache, predates ntp_cv_main_cache_version, or is empty.
3059         case "$cache_file" in
3060          /dev/null)
3061             ntp_cache_flush=0
3062             ;;
3063          *)
3064             case "$NTP_CACHEVERSION_PARENT" in
3065              '')
3066                 # Do not clear the cache immediately after it is created
3067                 # empty as it is noisy.  Differentiate a newly-created
3068                 # config.cache from one predating the cache version
3069                 # mechanism by looking for the first cached variable set
3070                 # by Autoconf
3071                 case "$ac_cv_path_install" in
3072                  '')
3073                     # empty config.cache file
3074                     ntp_cache_flush=0
3075                 esac
3076                 ;;
3077              *)
3078                 # Parent configure just created cache from empty,
3079                 # flushing would be counterproductive.
3080                 ntp_cache_flush=0;
3081                 ;;
3082             esac
3083         esac
3084         ;;
3085      *)
3086         # configure cache version mismatches config.cache version
3087         ;;
3088     esac
3089
3090     case "$ntp_cache_flush" in
3091      1)
3092         c_version="${ntp_cv_main_cache_version:-(no version found)}"
3093
3094         # Do we flush all variables or exclude others' version stamps?
3095
3096         case "$NTP_CACHEVERSION_PARENT" in
3097          '')
3098             # Clear all *_cv_* variables including our child subdirs'
3099             # ntp_cv_*_cache_version variables.  This prevents subdir
3100             # configure scripts from noticing a version mismatch just
3101             # after the top configure in the invocation cleared and
3102             # recreated the cache.
3103
3104             c_varname_list=`set |
3105                             sed -n -e 's/=.*$//' \
3106                                    -e '/_cv_/p'
3107                            `
3108             ;;
3109          *)
3110             # This is not the top configure this particular invocation.
3111             # Clear all *_cv_* variables sparing the version stamps
3112             # of other configure scripts, so we don't trigger
3113             # useless repeated clearings.
3114
3115             c_varname_list=`set |
3116                             sed -n -e 's/=.*$//' \
3117                                    -e '/ntp_cv_.*_cache_version/d' \
3118                                    -e '/_cv_/p'
3119                            `
3120         esac
3121
3122         for c_varname in $c_varname_list
3123         do
3124                                                     { eval $c_varname=; unset $c_varname; }
3125         done
3126
3127         { $as_echo "$as_me:${as_lineno-$LINENO}: $cache_file saved by another version, ignored." >&5
3128 $as_echo "$as_me: $cache_file saved by another version, ignored." >&6;}
3129         { $as_echo "$as_me:${as_lineno-$LINENO}: configure script cache version: $ntp_configure_cache_version" >&5
3130 $as_echo "$as_me: configure script cache version: $ntp_configure_cache_version" >&6;}
3131         { $as_echo "$as_me:${as_lineno-$LINENO}: $cache_file version: $c_version" >&5
3132 $as_echo "$as_me: $cache_file version: $c_version" >&6;}
3133         { c_varname=; unset c_varname;}
3134         { c_varname_list=; unset c_varname_list;}
3135         { c_version=; unset c_version;}
3136     esac
3137
3138     { ntp_cache_flush=; unset ntp_cache_flush;}
3139
3140     # save configure version in config.cache for next time
3141     ntp_cv_main_cache_version="$ntp_configure_cache_version"
3142
3143     # let any subdir configure.ac NTP_CACHEVERSION invocations
3144     # know they are not the top level.
3145     NTP_CACHEVERSION_PARENT='main' ; export NTP_CACHEVERSION_PARENT
3146
3147
3148 am__api_version='1.15'
3149
3150 # Find a good install program.  We prefer a C program (faster),
3151 # so one script is as good as another.  But avoid the broken or
3152 # incompatible versions:
3153 # SysV /etc/install, /usr/sbin/install
3154 # SunOS /usr/etc/install
3155 # IRIX /sbin/install
3156 # AIX /bin/install
3157 # AmigaOS /C/install, which installs bootblocks on floppy discs
3158 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3159 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3160 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3161 # OS/2's system install, which has a completely different semantic
3162 # ./install, which can be erroneously created by make from ./install.sh.
3163 # Reject install programs that cannot install multiple files.
3164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3165 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3166 if test -z "$INSTALL"; then
3167 if ${ac_cv_path_install+:} false; then :
3168   $as_echo_n "(cached) " >&6
3169 else
3170   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3171 for as_dir in $PATH
3172 do
3173   IFS=$as_save_IFS
3174   test -z "$as_dir" && as_dir=.
3175     # Account for people who put trailing slashes in PATH elements.
3176 case $as_dir/ in #((
3177   ./ | .// | /[cC]/* | \
3178   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3179   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3180   /usr/ucb/* ) ;;
3181   *)
3182     # OSF1 and SCO ODT 3.0 have their own names for install.
3183     # Don't use installbsd from OSF since it installs stuff as root
3184     # by default.
3185     for ac_prog in ginstall scoinst install; do
3186       for ac_exec_ext in '' $ac_executable_extensions; do
3187         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3188           if test $ac_prog = install &&
3189             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3190             # AIX install.  It has an incompatible calling convention.
3191             :
3192           elif test $ac_prog = install &&
3193             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3194             # program-specific install script used by HP pwplus--don't use.
3195             :
3196           else
3197             rm -rf conftest.one conftest.two conftest.dir
3198             echo one > conftest.one
3199             echo two > conftest.two
3200             mkdir conftest.dir
3201             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3202               test -s conftest.one && test -s conftest.two &&
3203               test -s conftest.dir/conftest.one &&
3204               test -s conftest.dir/conftest.two
3205             then
3206               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3207               break 3
3208             fi
3209           fi
3210         fi
3211       done
3212     done
3213     ;;
3214 esac
3215
3216   done
3217 IFS=$as_save_IFS
3218
3219 rm -rf conftest.one conftest.two conftest.dir
3220
3221 fi
3222   if test "${ac_cv_path_install+set}" = set; then
3223     INSTALL=$ac_cv_path_install
3224   else
3225     # As a last resort, use the slow shell script.  Don't cache a
3226     # value for INSTALL within a source directory, because that will
3227     # break other packages using the cache if that directory is
3228     # removed, or if the value is a relative name.
3229     INSTALL=$ac_install_sh
3230   fi
3231 fi
3232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3233 $as_echo "$INSTALL" >&6; }
3234
3235 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3236 # It thinks the first close brace ends the variable substitution.
3237 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3238
3239 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3240
3241 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3242
3243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3244 $as_echo_n "checking whether build environment is sane... " >&6; }
3245 # Reject unsafe characters in $srcdir or the absolute working directory
3246 # name.  Accept space and tab only in the latter.
3247 am_lf='
3248 '
3249 case `pwd` in
3250   *[\\\"\#\$\&\'\`$am_lf]*)
3251     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3252 esac
3253 case $srcdir in
3254   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3255     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3256 esac
3257
3258 # Do 'set' in a subshell so we don't clobber the current shell's
3259 # arguments.  Must try -L first in case configure is actually a
3260 # symlink; some systems play weird games with the mod time of symlinks
3261 # (eg FreeBSD returns the mod time of the symlink's containing
3262 # directory).
3263 if (
3264    am_has_slept=no
3265    for am_try in 1 2; do
3266      echo "timestamp, slept: $am_has_slept" > conftest.file
3267      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3268      if test "$*" = "X"; then
3269         # -L didn't work.
3270         set X `ls -t "$srcdir/configure" conftest.file`
3271      fi
3272      if test "$*" != "X $srcdir/configure conftest.file" \
3273         && test "$*" != "X conftest.file $srcdir/configure"; then
3274
3275         # If neither matched, then we have a broken ls.  This can happen
3276         # if, for instance, CONFIG_SHELL is bash and it inherits a
3277         # broken ls alias from the environment.  This has actually
3278         # happened.  Such a system could not be considered "sane".
3279         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3280   alias in your environment" "$LINENO" 5
3281      fi
3282      if test "$2" = conftest.file || test $am_try -eq 2; then
3283        break
3284      fi
3285      # Just in case.
3286      sleep 1
3287      am_has_slept=yes
3288    done
3289    test "$2" = conftest.file
3290    )
3291 then
3292    # Ok.
3293    :
3294 else
3295    as_fn_error $? "newly created file is older than distributed files!
3296 Check your system clock" "$LINENO" 5
3297 fi
3298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3299 $as_echo "yes" >&6; }
3300 # If we didn't sleep, we still need to ensure time stamps of config.status and
3301 # generated files are strictly newer.
3302 am_sleep_pid=
3303 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3304   ( sleep 1 ) &
3305   am_sleep_pid=$!
3306 fi
3307
3308 rm -f conftest.file
3309
3310 test "$program_prefix" != NONE &&
3311   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3312 # Use a double $ so make ignores it.
3313 test "$program_suffix" != NONE &&
3314   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3315 # Double any \ or $.
3316 # By default was `s,x,x', remove it if useless.
3317 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3318 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3319
3320 # Expand $ac_aux_dir to an absolute path.
3321 am_aux_dir=`cd "$ac_aux_dir" && pwd`
3322
3323 if test x"${MISSING+set}" != xset; then
3324   case $am_aux_dir in
3325   *\ * | *\     *)
3326     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3327   *)
3328     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3329   esac
3330 fi
3331 # Use eval to expand $SHELL
3332 if eval "$MISSING --is-lightweight"; then
3333   am_missing_run="$MISSING "
3334 else
3335   am_missing_run=
3336   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3337 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3338 fi
3339
3340 if test x"${install_sh+set}" != xset; then
3341   case $am_aux_dir in
3342   *\ * | *\     *)
3343     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3344   *)
3345     install_sh="\${SHELL} $am_aux_dir/install-sh"
3346   esac
3347 fi
3348
3349 # Installed binaries are usually stripped using 'strip' when the user
3350 # run "make install-strip".  However 'strip' might not be the right
3351 # tool to use in cross-compilation environments, therefore Automake
3352 # will honor the 'STRIP' environment variable to overrule this program.
3353 if test "$cross_compiling" != no; then
3354   if test -n "$ac_tool_prefix"; then
3355   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3356 set dummy ${ac_tool_prefix}strip; ac_word=$2
3357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3358 $as_echo_n "checking for $ac_word... " >&6; }
3359 if ${ac_cv_prog_STRIP+:} false; then :
3360   $as_echo_n "(cached) " >&6
3361 else
3362   if test -n "$STRIP"; then
3363   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3364 else
3365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3366 for as_dir in $PATH
3367 do
3368   IFS=$as_save_IFS
3369   test -z "$as_dir" && as_dir=.
3370     for ac_exec_ext in '' $ac_executable_extensions; do
3371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3372     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3374     break 2
3375   fi
3376 done
3377   done
3378 IFS=$as_save_IFS
3379
3380 fi
3381 fi
3382 STRIP=$ac_cv_prog_STRIP
3383 if test -n "$STRIP"; then
3384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3385 $as_echo "$STRIP" >&6; }
3386 else
3387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3388 $as_echo "no" >&6; }
3389 fi
3390
3391
3392 fi
3393 if test -z "$ac_cv_prog_STRIP"; then
3394   ac_ct_STRIP=$STRIP
3395   # Extract the first word of "strip", so it can be a program name with args.
3396 set dummy strip; ac_word=$2
3397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3398 $as_echo_n "checking for $ac_word... " >&6; }
3399 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3400   $as_echo_n "(cached) " >&6
3401 else
3402   if test -n "$ac_ct_STRIP"; then
3403   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3404 else
3405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3406 for as_dir in $PATH
3407 do
3408   IFS=$as_save_IFS
3409   test -z "$as_dir" && as_dir=.
3410     for ac_exec_ext in '' $ac_executable_extensions; do
3411   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3412     ac_cv_prog_ac_ct_STRIP="strip"
3413     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3414     break 2
3415   fi
3416 done
3417   done
3418 IFS=$as_save_IFS
3419
3420 fi
3421 fi
3422 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3423 if test -n "$ac_ct_STRIP"; then
3424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3425 $as_echo "$ac_ct_STRIP" >&6; }
3426 else
3427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3428 $as_echo "no" >&6; }
3429 fi
3430
3431   if test "x$ac_ct_STRIP" = x; then
3432     STRIP=":"
3433   else
3434     case $cross_compiling:$ac_tool_warned in
3435 yes:)
3436 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3437 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3438 ac_tool_warned=yes ;;
3439 esac
3440     STRIP=$ac_ct_STRIP
3441   fi
3442 else
3443   STRIP="$ac_cv_prog_STRIP"
3444 fi
3445
3446 fi
3447 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3448
3449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3450 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3451 if test -z "$MKDIR_P"; then
3452   if ${ac_cv_path_mkdir+:} false; then :
3453   $as_echo_n "(cached) " >&6
3454 else
3455   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3456 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3457 do
3458   IFS=$as_save_IFS
3459   test -z "$as_dir" && as_dir=.
3460     for ac_prog in mkdir gmkdir; do
3461          for ac_exec_ext in '' $ac_executable_extensions; do
3462            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3463            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3464              'mkdir (GNU coreutils) '* | \
3465              'mkdir (coreutils) '* | \
3466              'mkdir (fileutils) '4.1*)
3467                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3468                break 3;;
3469            esac
3470          done
3471        done
3472   done
3473 IFS=$as_save_IFS
3474
3475 fi
3476
3477   test -d ./--version && rmdir ./--version
3478   if test "${ac_cv_path_mkdir+set}" = set; then
3479     MKDIR_P="$ac_cv_path_mkdir -p"
3480   else
3481     # As a last resort, use the slow shell script.  Don't cache a
3482     # value for MKDIR_P within a source directory, because that will
3483     # break other packages using the cache if that directory is
3484     # removed, or if the value is a relative name.
3485     MKDIR_P="$ac_install_sh -d"
3486   fi
3487 fi
3488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3489 $as_echo "$MKDIR_P" >&6; }
3490
3491 for ac_prog in gawk mawk nawk awk
3492 do
3493   # Extract the first word of "$ac_prog", so it can be a program name with args.
3494 set dummy $ac_prog; ac_word=$2
3495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3496 $as_echo_n "checking for $ac_word... " >&6; }
3497 if ${ac_cv_prog_AWK+:} false; then :
3498   $as_echo_n "(cached) " >&6
3499 else
3500   if test -n "$AWK"; then
3501   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3502 else
3503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3504 for as_dir in $PATH
3505 do
3506   IFS=$as_save_IFS
3507   test -z "$as_dir" && as_dir=.
3508     for ac_exec_ext in '' $ac_executable_extensions; do
3509   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3510     ac_cv_prog_AWK="$ac_prog"
3511     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3512     break 2
3513   fi
3514 done
3515   done
3516 IFS=$as_save_IFS
3517
3518 fi
3519 fi
3520 AWK=$ac_cv_prog_AWK
3521 if test -n "$AWK"; then
3522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3523 $as_echo "$AWK" >&6; }
3524 else
3525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3526 $as_echo "no" >&6; }
3527 fi
3528
3529
3530   test -n "$AWK" && break
3531 done
3532
3533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3534 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3535 set x ${MAKE-make}
3536 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3537 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3538   $as_echo_n "(cached) " >&6
3539 else
3540   cat >conftest.make <<\_ACEOF
3541 SHELL = /bin/sh
3542 all:
3543         @echo '@@@%%%=$(MAKE)=@@@%%%'
3544 _ACEOF
3545 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3546 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3547   *@@@%%%=?*=@@@%%%*)
3548     eval ac_cv_prog_make_${ac_make}_set=yes;;
3549   *)
3550     eval ac_cv_prog_make_${ac_make}_set=no;;
3551 esac
3552 rm -f conftest.make
3553 fi
3554 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3556 $as_echo "yes" >&6; }
3557   SET_MAKE=
3558 else
3559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3560 $as_echo "no" >&6; }
3561   SET_MAKE="MAKE=${MAKE-make}"
3562 fi
3563
3564 rm -rf .tst 2>/dev/null
3565 mkdir .tst 2>/dev/null
3566 if test -d .tst; then
3567   am__leading_dot=.
3568 else
3569   am__leading_dot=_
3570 fi
3571 rmdir .tst 2>/dev/null
3572
3573 # Check whether --enable-silent-rules was given.
3574 if test "${enable_silent_rules+set}" = set; then :
3575   enableval=$enable_silent_rules;
3576 fi
3577
3578 case $enable_silent_rules in # (((
3579   yes) AM_DEFAULT_VERBOSITY=0;;
3580    no) AM_DEFAULT_VERBOSITY=1;;
3581     *) AM_DEFAULT_VERBOSITY=1;;
3582 esac
3583 am_make=${MAKE-make}
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3585 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3586 if ${am_cv_make_support_nested_variables+:} false; then :
3587   $as_echo_n "(cached) " >&6
3588 else
3589   if $as_echo 'TRUE=$(BAR$(V))
3590 BAR0=false
3591 BAR1=true
3592 V=1
3593 am__doit:
3594         @$(TRUE)
3595 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3596   am_cv_make_support_nested_variables=yes
3597 else
3598   am_cv_make_support_nested_variables=no
3599 fi
3600 fi
3601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3602 $as_echo "$am_cv_make_support_nested_variables" >&6; }
3603 if test $am_cv_make_support_nested_variables = yes; then
3604     AM_V='$(V)'
3605   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3606 else
3607   AM_V=$AM_DEFAULT_VERBOSITY
3608   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3609 fi
3610 AM_BACKSLASH='\'
3611
3612 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3613   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3614   # is not polluted with repeated "-I."
3615   am__isrc=' -I$(srcdir)'
3616   # test to see if srcdir already configured
3617   if test -f $srcdir/config.status; then
3618     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3619   fi
3620 fi
3621
3622 # test whether we have cygpath
3623 if test -z "$CYGPATH_W"; then
3624   if (cygpath --version) >/dev/null 2>/dev/null; then
3625     CYGPATH_W='cygpath -w'
3626   else
3627     CYGPATH_W=echo
3628   fi
3629 fi
3630
3631
3632 # Define the identity of the package.
3633  PACKAGE='ntp'
3634  VERSION='4.2.8p10'
3635
3636
3637 cat >>confdefs.h <<_ACEOF
3638 #define PACKAGE "$PACKAGE"
3639 _ACEOF
3640
3641
3642 cat >>confdefs.h <<_ACEOF
3643 #define VERSION "$VERSION"
3644 _ACEOF
3645
3646 # Some tools Automake needs.
3647
3648 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3649
3650
3651 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3652
3653
3654 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3655
3656
3657 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3658
3659
3660 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3661
3662 # For better backward compatibility.  To be removed once Automake 1.9.x
3663 # dies out for good.  For more background, see:
3664 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3665 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3666 mkdir_p='$(MKDIR_P)'
3667
3668 # We need awk for the "check" target (and possibly the TAP driver).  The
3669 # system "awk" is bad on some platforms.
3670 # Always define AMTAR for backward compatibility.  Yes, it's still used
3671 # in the wild :-(  We should find a proper way to deprecate it ...
3672 AMTAR='$${TAR-tar}'
3673
3674
3675 # We'll loop over all known methods to create a tar archive until one works.
3676 _am_tools='gnutar  pax cpio none'
3677
3678 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3679
3680
3681
3682
3683
3684
3685 # POSIX will say in a future version that running "rm -f" with no argument
3686 # is OK; and we want to be able to make that assumption in our Makefile
3687 # recipes.  So use an aggressive probe to check that the usage we want is
3688 # actually supported "in the wild" to an acceptable degree.
3689 # See automake bug#10828.
3690 # To make any issue more visible, cause the running configure to be aborted
3691 # by default if the 'rm' program in use doesn't match our expectations; the
3692 # user can still override this though.
3693 if rm -f && rm -fr && rm -rf; then : OK; else
3694   cat >&2 <<'END'
3695 Oops!
3696
3697 Your 'rm' program seems unable to run without file operands specified
3698 on the command line, even when the '-f' option is present.  This is contrary
3699 to the behaviour of most rm programs out there, and not conforming with
3700 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3701
3702 Please tell bug-automake@gnu.org about your system, including the value
3703 of your $PATH and any error possibly output before this message.  This
3704 can help us improve future automake versions.
3705
3706 END
3707   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3708     echo 'Configuration will proceed anyway, since you have set the' >&2
3709     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3710     echo >&2
3711   else
3712     cat >&2 <<'END'
3713 Aborting the configuration process, to ensure you take notice of the issue.
3714
3715 You can download and install GNU coreutils to get an 'rm' implementation
3716 that behaves properly: <http://www.gnu.org/software/coreutils/>.
3717
3718 If you want to complete the configuration process using your problematic
3719 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3720 to "yes", and re-run configure.
3721
3722 END
3723     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3724   fi
3725 fi
3726
3727
3728 # Check whether --enable-silent-rules was given.
3729 if test "${enable_silent_rules+set}" = set; then :
3730   enableval=$enable_silent_rules;
3731 fi
3732
3733 case $enable_silent_rules in # (((
3734   yes) AM_DEFAULT_VERBOSITY=0;;
3735    no) AM_DEFAULT_VERBOSITY=1;;
3736     *) AM_DEFAULT_VERBOSITY=0;;
3737 esac
3738 am_make=${MAKE-make}
3739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3740 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3741 if ${am_cv_make_support_nested_variables+:} false; then :
3742   $as_echo_n "(cached) " >&6
3743 else
3744   if $as_echo 'TRUE=$(BAR$(V))
3745 BAR0=false
3746 BAR1=true
3747 V=1
3748 am__doit:
3749         @$(TRUE)
3750 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3751   am_cv_make_support_nested_variables=yes
3752 else
3753   am_cv_make_support_nested_variables=no
3754 fi
3755 fi
3756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3757 $as_echo "$am_cv_make_support_nested_variables" >&6; }
3758 if test $am_cv_make_support_nested_variables = yes; then
3759     AM_V='$(V)'
3760   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3761 else
3762   AM_V=$AM_DEFAULT_VERBOSITY
3763   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3764 fi
3765 AM_BACKSLASH='\'
3766
3767
3768 # Make sure we can run config.sub.
3769 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3770   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3771
3772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3773 $as_echo_n "checking build system type... " >&6; }
3774 if ${ac_cv_build+:} false; then :
3775   $as_echo_n "(cached) " >&6
3776 else
3777   ac_build_alias=$build_alias
3778 test "x$ac_build_alias" = x &&
3779   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3780 test "x$ac_build_alias" = x &&
3781   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3782 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3783   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3784
3785 fi
3786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3787 $as_echo "$ac_cv_build" >&6; }
3788 case $ac_cv_build in
3789 *-*-*) ;;
3790 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3791 esac
3792 build=$ac_cv_build
3793 ac_save_IFS=$IFS; IFS='-'
3794 set x $ac_cv_build
3795 shift
3796 build_cpu=$1
3797 build_vendor=$2
3798 shift; shift
3799 # Remember, the first character of IFS is used to create $*,
3800 # except with old shells:
3801 build_os=$*
3802 IFS=$ac_save_IFS
3803 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3804
3805
3806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3807 $as_echo_n "checking host system type... " >&6; }
3808 if ${ac_cv_host+:} false; then :
3809   $as_echo_n "(cached) " >&6
3810 else
3811   if test "x$host_alias" = x; then
3812   ac_cv_host=$ac_cv_build
3813 else
3814   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3815     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3816 fi
3817
3818 fi
3819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3820 $as_echo "$ac_cv_host" >&6; }
3821 case $ac_cv_host in
3822 *-*-*) ;;
3823 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3824 esac
3825 host=$ac_cv_host
3826 ac_save_IFS=$IFS; IFS='-'
3827 set x $ac_cv_host
3828 shift
3829 host_cpu=$1
3830 host_vendor=$2
3831 shift; shift
3832 # Remember, the first character of IFS is used to create $*,
3833 # except with old shells:
3834 host_os=$*
3835 IFS=$ac_save_IFS
3836 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3837
3838
3839
3840 cat >>confdefs.h <<_ACEOF
3841 #define STR_SYSTEM "$host"
3842 _ACEOF
3843
3844 ac_config_headers="$ac_config_headers config.h"
3845
3846
3847 ntp_atom_ok=${ntp_atom_ok=no}
3848 ntp_oncore_ok=${ntp_oncore_ok=no}
3849 ntp_parse_ok=${ntp_parse_ok=no}
3850 ntp_ripe_ncc_ok=${ntp_parse_ok=no}
3851 ntp_jupiter_ok=${ntp_jupiter_ok=no}
3852
3853 DEPDIR="${am__leading_dot}deps"
3854
3855 ac_config_commands="$ac_config_commands depfiles"
3856
3857
3858 am_make=${MAKE-make}
3859 cat > confinc << 'END'
3860 am__doit:
3861         @echo this is the am__doit target
3862 .PHONY: am__doit
3863 END
3864 # If we don't find an include directive, just comment out the code.
3865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3866 $as_echo_n "checking for style of include used by $am_make... " >&6; }
3867 am__include="#"
3868 am__quote=
3869 _am_result=none
3870 # First try GNU make style include.
3871 echo "include confinc" > confmf
3872 # Ignore all kinds of additional output from 'make'.
3873 case `$am_make -s -f confmf 2> /dev/null` in #(
3874 *the\ am__doit\ target*)
3875   am__include=include
3876   am__quote=
3877   _am_result=GNU
3878   ;;
3879 esac
3880 # Now try BSD make style include.
3881 if test "$am__include" = "#"; then
3882    echo '.include "confinc"' > confmf
3883    case `$am_make -s -f confmf 2> /dev/null` in #(
3884    *the\ am__doit\ target*)
3885      am__include=.include
3886      am__quote="\""
3887      _am_result=BSD
3888      ;;
3889    esac
3890 fi
3891
3892
3893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3894 $as_echo "$_am_result" >&6; }
3895 rm -f confinc confmf
3896
3897 # Check whether --enable-dependency-tracking was given.
3898 if test "${enable_dependency_tracking+set}" = set; then :
3899   enableval=$enable_dependency_tracking;
3900 fi
3901
3902 if test "x$enable_dependency_tracking" != xno; then
3903   am_depcomp="$ac_aux_dir/depcomp"
3904   AMDEPBACKSLASH='\'
3905   am__nodep='_no'
3906 fi
3907  if test "x$enable_dependency_tracking" != xno; then
3908   AMDEP_TRUE=
3909   AMDEP_FALSE='#'
3910 else
3911   AMDEP_TRUE='#'
3912   AMDEP_FALSE=
3913 fi
3914
3915
3916
3917 case "$build" in
3918  *-*-freebsd1?.*)
3919     cclist=cc
3920     ;;
3921  *)
3922     cclist="cc gcc"
3923     ;;
3924 esac
3925
3926
3927 #AC_USE_SYSTEM_EXTENSIONS
3928
3929 ac_ext=c
3930 ac_cpp='$CPP $CPPFLAGS'
3931 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3932 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3933 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3934 if test -n "$ac_tool_prefix"; then
3935   for ac_prog in $cclist
3936   do
3937     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3938 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3940 $as_echo_n "checking for $ac_word... " >&6; }
3941 if ${ac_cv_prog_CC+:} false; then :
3942   $as_echo_n "(cached) " >&6
3943 else
3944   if test -n "$CC"; then
3945   ac_cv_prog_CC="$CC" # Let the user override the test.
3946 else
3947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3948 for as_dir in $PATH
3949 do
3950   IFS=$as_save_IFS
3951   test -z "$as_dir" && as_dir=.
3952     for ac_exec_ext in '' $ac_executable_extensions; do
3953   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3954     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3955     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3956     break 2
3957   fi
3958 done
3959   done
3960 IFS=$as_save_IFS
3961
3962 fi
3963 fi
3964 CC=$ac_cv_prog_CC
3965 if test -n "$CC"; then
3966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3967 $as_echo "$CC" >&6; }
3968 else
3969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3970 $as_echo "no" >&6; }
3971 fi
3972
3973
3974     test -n "$CC" && break
3975   done
3976 fi
3977 if test -z "$CC"; then
3978   ac_ct_CC=$CC
3979   for ac_prog in $cclist
3980 do
3981   # Extract the first word of "$ac_prog", so it can be a program name with args.
3982 set dummy $ac_prog; ac_word=$2
3983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3984 $as_echo_n "checking for $ac_word... " >&6; }
3985 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3986   $as_echo_n "(cached) " >&6
3987 else
3988   if test -n "$ac_ct_CC"; then
3989   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3990 else
3991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3992 for as_dir in $PATH
3993 do
3994   IFS=$as_save_IFS
3995   test -z "$as_dir" && as_dir=.
3996     for ac_exec_ext in '' $ac_executable_extensions; do
3997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3998     ac_cv_prog_ac_ct_CC="$ac_prog"
3999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4000     break 2
4001   fi
4002 done
4003   done
4004 IFS=$as_save_IFS
4005
4006 fi
4007 fi
4008 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4009 if test -n "$ac_ct_CC"; then
4010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4011 $as_echo "$ac_ct_CC" >&6; }
4012 else
4013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4014 $as_echo "no" >&6; }
4015 fi
4016
4017
4018   test -n "$ac_ct_CC" && break
4019 done
4020
4021   if test "x$ac_ct_CC" = x; then
4022     CC=""
4023   else
4024     case $cross_compiling:$ac_tool_warned in
4025 yes:)
4026 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4027 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4028 ac_tool_warned=yes ;;
4029 esac
4030     CC=$ac_ct_CC
4031   fi
4032 fi
4033
4034
4035 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4036 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4037 as_fn_error $? "no acceptable C compiler found in \$PATH
4038 See \`config.log' for more details" "$LINENO" 5; }
4039
4040 # Provide some information about the compiler.
4041 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4042 set X $ac_compile
4043 ac_compiler=$2
4044 for ac_option in --version -v -V -qversion; do
4045   { { ac_try="$ac_compiler $ac_option >&5"
4046 case "(($ac_try" in
4047   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4048   *) ac_try_echo=$ac_try;;
4049 esac
4050 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4051 $as_echo "$ac_try_echo"; } >&5
4052   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4053   ac_status=$?
4054   if test -s conftest.err; then
4055     sed '10a\
4056 ... rest of stderr output deleted ...
4057          10q' conftest.err >conftest.er1
4058     cat conftest.er1 >&5
4059   fi
4060   rm -f conftest.er1 conftest.err
4061   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4062   test $ac_status = 0; }
4063 done
4064
4065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4066 /* end confdefs.h.  */
4067
4068 int
4069 main ()
4070 {
4071
4072   ;
4073   return 0;
4074 }
4075 _ACEOF
4076 ac_clean_files_save=$ac_clean_files
4077 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4078 # Try to create an executable without -o first, disregard a.out.
4079 # It will help us diagnose broken compilers, and finding out an intuition
4080 # of exeext.
4081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4082 $as_echo_n "checking whether the C compiler works... " >&6; }
4083 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4084
4085 # The possible output files:
4086 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4087
4088 ac_rmfiles=
4089 for ac_file in $ac_files
4090 do
4091   case $ac_file in
4092     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4093     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4094   esac
4095 done
4096 rm -f $ac_rmfiles
4097
4098 if { { ac_try="$ac_link_default"
4099 case "(($ac_try" in
4100   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4101   *) ac_try_echo=$ac_try;;
4102 esac
4103 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4104 $as_echo "$ac_try_echo"; } >&5
4105   (eval "$ac_link_default") 2>&5
4106   ac_status=$?
4107   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4108   test $ac_status = 0; }; then :
4109   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4110 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4111 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4112 # so that the user can short-circuit this test for compilers unknown to
4113 # Autoconf.
4114 for ac_file in $ac_files ''
4115 do
4116   test -f "$ac_file" || continue
4117   case $ac_file in
4118     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4119         ;;
4120     [ab].out )
4121         # We found the default executable, but exeext='' is most
4122         # certainly right.
4123         break;;
4124     *.* )
4125         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4126         then :; else
4127            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4128         fi
4129         # We set ac_cv_exeext here because the later test for it is not
4130         # safe: cross compilers may not add the suffix if given an `-o'
4131         # argument, so we may need to know it at that point already.
4132         # Even if this section looks crufty: it has the advantage of
4133         # actually working.
4134         break;;
4135     * )
4136         break;;
4137   esac
4138 done
4139 test "$ac_cv_exeext" = no && ac_cv_exeext=
4140
4141 else
4142   ac_file=''
4143 fi
4144 if test -z "$ac_file"; then :
4145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4146 $as_echo "no" >&6; }
4147 $as_echo "$as_me: failed program was:" >&5
4148 sed 's/^/| /' conftest.$ac_ext >&5
4149
4150 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4151 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4152 as_fn_error 77 "C compiler cannot create executables
4153 See \`config.log' for more details" "$LINENO" 5; }
4154 else
4155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4156 $as_echo "yes" >&6; }
4157 fi
4158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4159 $as_echo_n "checking for C compiler default output file name... " >&6; }
4160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4161 $as_echo "$ac_file" >&6; }
4162 ac_exeext=$ac_cv_exeext
4163
4164 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4165 ac_clean_files=$ac_clean_files_save
4166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4167 $as_echo_n "checking for suffix of executables... " >&6; }
4168 if { { ac_try="$ac_link"
4169 case "(($ac_try" in
4170   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4171   *) ac_try_echo=$ac_try;;
4172 esac
4173 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4174 $as_echo "$ac_try_echo"; } >&5
4175   (eval "$ac_link") 2>&5
4176   ac_status=$?
4177   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4178   test $ac_status = 0; }; then :
4179   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4180 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4181 # work properly (i.e., refer to `conftest.exe'), while it won't with
4182 # `rm'.
4183 for ac_file in conftest.exe conftest conftest.*; do
4184   test -f "$ac_file" || continue
4185   case $ac_file in
4186     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4187     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4188           break;;
4189     * ) break;;
4190   esac
4191 done
4192 else
4193   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4194 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4195 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4196 See \`config.log' for more details" "$LINENO" 5; }
4197 fi
4198 rm -f conftest conftest$ac_cv_exeext
4199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4200 $as_echo "$ac_cv_exeext" >&6; }
4201
4202 rm -f conftest.$ac_ext
4203 EXEEXT=$ac_cv_exeext
4204 ac_exeext=$EXEEXT
4205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4206 /* end confdefs.h.  */
4207 #include <stdio.h>
4208 int
4209 main ()
4210 {
4211 FILE *f = fopen ("conftest.out", "w");
4212  return ferror (f) || fclose (f) != 0;
4213
4214   ;
4215   return 0;
4216 }
4217 _ACEOF
4218 ac_clean_files="$ac_clean_files conftest.out"
4219 # Check that the compiler produces executables we can run.  If not, either
4220 # the compiler is broken, or we cross compile.
4221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4222 $as_echo_n "checking whether we are cross compiling... " >&6; }
4223 if test "$cross_compiling" != yes; then
4224   { { ac_try="$ac_link"
4225 case "(($ac_try" in
4226   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4227   *) ac_try_echo=$ac_try;;
4228 esac
4229 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4230 $as_echo "$ac_try_echo"; } >&5
4231   (eval "$ac_link") 2>&5
4232   ac_status=$?
4233   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4234   test $ac_status = 0; }
4235   if { ac_try='./conftest$ac_cv_exeext'
4236   { { case "(($ac_try" in
4237   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4238   *) ac_try_echo=$ac_try;;
4239 esac
4240 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4241 $as_echo "$ac_try_echo"; } >&5
4242   (eval "$ac_try") 2>&5
4243   ac_status=$?
4244   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4245   test $ac_status = 0; }; }; then
4246     cross_compiling=no
4247   else
4248     if test "$cross_compiling" = maybe; then
4249         cross_compiling=yes
4250     else
4251         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4252 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4253 as_fn_error $? "cannot run C compiled programs.
4254 If you meant to cross compile, use \`--host'.
4255 See \`config.log' for more details" "$LINENO" 5; }
4256     fi
4257   fi
4258 fi
4259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4260 $as_echo "$cross_compiling" >&6; }
4261
4262 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4263 ac_clean_files=$ac_clean_files_save
4264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4265 $as_echo_n "checking for suffix of object files... " >&6; }
4266 if ${ac_cv_objext+:} false; then :
4267   $as_echo_n "(cached) " >&6
4268 else
4269   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4270 /* end confdefs.h.  */
4271
4272 int
4273 main ()
4274 {
4275
4276   ;
4277   return 0;
4278 }
4279 _ACEOF
4280 rm -f conftest.o conftest.obj
4281 if { { ac_try="$ac_compile"
4282 case "(($ac_try" in
4283   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4284   *) ac_try_echo=$ac_try;;
4285 esac
4286 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4287 $as_echo "$ac_try_echo"; } >&5
4288   (eval "$ac_compile") 2>&5
4289   ac_status=$?
4290   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4291   test $ac_status = 0; }; then :
4292   for ac_file in conftest.o conftest.obj conftest.*; do
4293   test -f "$ac_file" || continue;
4294   case $ac_file in
4295     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4296     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4297        break;;
4298   esac
4299 done
4300 else
4301   $as_echo "$as_me: failed program was:" >&5
4302 sed 's/^/| /' conftest.$ac_ext >&5
4303
4304 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4305 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4306 as_fn_error $? "cannot compute suffix of object files: cannot compile
4307 See \`config.log' for more details" "$LINENO" 5; }
4308 fi
4309 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4310 fi
4311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4312 $as_echo "$ac_cv_objext" >&6; }
4313 OBJEXT=$ac_cv_objext
4314 ac_objext=$OBJEXT
4315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4316 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4317 if ${ac_cv_c_compiler_gnu+:} false; then :
4318   $as_echo_n "(cached) " >&6
4319 else
4320   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4321 /* end confdefs.h.  */
4322
4323 int
4324 main ()
4325 {
4326 #ifndef __GNUC__
4327        choke me
4328 #endif
4329
4330   ;
4331   return 0;
4332 }
4333 _ACEOF
4334 if ac_fn_c_try_compile "$LINENO"; then :
4335   ac_compiler_gnu=yes
4336 else
4337   ac_compiler_gnu=no
4338 fi
4339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4340 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4341
4342 fi
4343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4344 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4345 if test $ac_compiler_gnu = yes; then
4346   GCC=yes
4347 else
4348   GCC=
4349 fi
4350 ac_test_CFLAGS=${CFLAGS+set}
4351 ac_save_CFLAGS=$CFLAGS
4352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4353 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4354 if ${ac_cv_prog_cc_g+:} false; then :
4355   $as_echo_n "(cached) " >&6
4356 else
4357   ac_save_c_werror_flag=$ac_c_werror_flag
4358    ac_c_werror_flag=yes
4359    ac_cv_prog_cc_g=no
4360    CFLAGS="-g"
4361    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4362 /* end confdefs.h.  */
4363
4364 int
4365 main ()
4366 {
4367
4368   ;
4369   return 0;
4370 }
4371 _ACEOF
4372 if ac_fn_c_try_compile "$LINENO"; then :
4373   ac_cv_prog_cc_g=yes
4374 else
4375   CFLAGS=""
4376       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4377 /* end confdefs.h.  */
4378
4379 int
4380 main ()
4381 {
4382
4383   ;
4384   return 0;
4385 }
4386 _ACEOF
4387 if ac_fn_c_try_compile "$LINENO"; then :
4388
4389 else
4390   ac_c_werror_flag=$ac_save_c_werror_flag
4391          CFLAGS="-g"
4392          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4393 /* end confdefs.h.  */
4394
4395 int
4396 main ()
4397 {
4398
4399   ;
4400   return 0;
4401 }
4402 _ACEOF
4403 if ac_fn_c_try_compile "$LINENO"; then :
4404   ac_cv_prog_cc_g=yes
4405 fi
4406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4407 fi
4408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4409 fi
4410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4411    ac_c_werror_flag=$ac_save_c_werror_flag
4412 fi
4413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4414 $as_echo "$ac_cv_prog_cc_g" >&6; }
4415 if test "$ac_test_CFLAGS" = set; then
4416   CFLAGS=$ac_save_CFLAGS
4417 elif test $ac_cv_prog_cc_g = yes; then
4418   if test "$GCC" = yes; then
4419     CFLAGS="-g -O2"
4420   else
4421     CFLAGS="-g"
4422   fi
4423 else
4424   if test "$GCC" = yes; then
4425     CFLAGS="-O2"
4426   else
4427     CFLAGS=
4428   fi
4429 fi
4430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4431 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4432 if ${ac_cv_prog_cc_c89+:} false; then :
4433   $as_echo_n "(cached) " >&6
4434 else
4435   ac_cv_prog_cc_c89=no
4436 ac_save_CC=$CC
4437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4438 /* end confdefs.h.  */
4439 #include <stdarg.h>
4440 #include <stdio.h>
4441 struct stat;
4442 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4443 struct buf { int x; };
4444 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4445 static char *e (p, i)
4446      char **p;
4447      int i;
4448 {
4449   return p[i];
4450 }
4451 static char *f (char * (*g) (char **, int), char **p, ...)
4452 {
4453   char *s;
4454   va_list v;
4455   va_start (v,p);
4456   s = g (p, va_arg (v,int));
4457   va_end (v);
4458   return s;
4459 }
4460
4461 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4462    function prototypes and stuff, but not '\xHH' hex character constants.
4463    These don't provoke an error unfortunately, instead are silently treated
4464    as 'x'.  The following induces an error, until -std is added to get
4465    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4466    array size at least.  It's necessary to write '\x00'==0 to get something
4467    that's true only with -std.  */
4468 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4469
4470 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4471    inside strings and character constants.  */
4472 #define FOO(x) 'x'
4473 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4474
4475 int test (int i, double x);
4476 struct s1 {int (*f) (int a);};
4477 struct s2 {int (*f) (double a);};
4478 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4479 int argc;
4480 char **argv;
4481 int
4482 main ()
4483 {
4484 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4485   ;
4486   return 0;
4487 }
4488 _ACEOF
4489 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4490         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4491 do
4492   CC="$ac_save_CC $ac_arg"
4493   if ac_fn_c_try_compile "$LINENO"; then :
4494   ac_cv_prog_cc_c89=$ac_arg
4495 fi
4496 rm -f core conftest.err conftest.$ac_objext
4497   test "x$ac_cv_prog_cc_c89" != "xno" && break
4498 done
4499 rm -f conftest.$ac_ext
4500 CC=$ac_save_CC
4501
4502 fi
4503 # AC_CACHE_VAL
4504 case "x$ac_cv_prog_cc_c89" in
4505   x)
4506     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4507 $as_echo "none needed" >&6; } ;;
4508   xno)
4509     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4510 $as_echo "unsupported" >&6; } ;;
4511   *)
4512     CC="$CC $ac_cv_prog_cc_c89"
4513     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4514 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4515 esac
4516 if test "x$ac_cv_prog_cc_c89" != xno; then :
4517
4518 fi
4519
4520 ac_ext=c
4521 ac_cpp='$CPP $CPPFLAGS'
4522 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4523 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4524 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4525
4526 ac_ext=c
4527 ac_cpp='$CPP $CPPFLAGS'
4528 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4529 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4530 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4532 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4533 if ${am_cv_prog_cc_c_o+:} false; then :
4534   $as_echo_n "(cached) " >&6
4535 else
4536   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4537 /* end confdefs.h.  */
4538
4539 int
4540 main ()
4541 {
4542
4543   ;
4544   return 0;
4545 }
4546 _ACEOF
4547   # Make sure it works both with $CC and with simple cc.
4548   # Following AC_PROG_CC_C_O, we do the test twice because some
4549   # compilers refuse to overwrite an existing .o file with -o,
4550   # though they will create one.
4551   am_cv_prog_cc_c_o=yes
4552   for am_i in 1 2; do
4553     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4554    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4555    ac_status=$?
4556    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4557    (exit $ac_status); } \
4558          && test -f conftest2.$ac_objext; then
4559       : OK
4560     else
4561       am_cv_prog_cc_c_o=no
4562       break
4563     fi
4564   done
4565   rm -f core conftest*
4566   unset am_i
4567 fi
4568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4569 $as_echo "$am_cv_prog_cc_c_o" >&6; }
4570 if test "$am_cv_prog_cc_c_o" != yes; then
4571    # Losing compiler, so override with the script.
4572    # FIXME: It is wrong to rewrite CC.
4573    # But if we don't then we get into trouble of one sort or another.
4574    # A longer-term fix would be to have automake use am__CC in this case,
4575    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4576    CC="$am_aux_dir/compile $CC"
4577 fi
4578 ac_ext=c
4579 ac_cpp='$CPP $CPPFLAGS'
4580 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4581 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4582 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4583
4584
4585 depcc="$CC"   am_compiler_list=
4586
4587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4588 $as_echo_n "checking dependency style of $depcc... " >&6; }
4589 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4590   $as_echo_n "(cached) " >&6
4591 else
4592   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4593   # We make a subdir and do the tests there.  Otherwise we can end up
4594   # making bogus files that we don't know about and never remove.  For
4595   # instance it was reported that on HP-UX the gcc test will end up
4596   # making a dummy file named 'D' -- because '-MD' means "put the output
4597   # in D".
4598   rm -rf conftest.dir
4599   mkdir conftest.dir
4600   # Copy depcomp to subdir because otherwise we won't find it if we're
4601   # using a relative directory.
4602   cp "$am_depcomp" conftest.dir
4603   cd conftest.dir
4604   # We will build objects and dependencies in a subdirectory because
4605   # it helps to detect inapplicable dependency modes.  For instance
4606   # both Tru64's cc and ICC support -MD to output dependencies as a
4607   # side effect of compilation, but ICC will put the dependencies in
4608   # the current directory while Tru64 will put them in the object
4609   # directory.
4610   mkdir sub
4611
4612   am_cv_CC_dependencies_compiler_type=none
4613   if test "$am_compiler_list" = ""; then
4614      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4615   fi
4616   am__universal=false
4617   case " $depcc " in #(
4618      *\ -arch\ *\ -arch\ *) am__universal=true ;;
4619      esac
4620
4621   for depmode in $am_compiler_list; do
4622     # Setup a source with many dependencies, because some compilers
4623     # like to wrap large dependency lists on column 80 (with \), and
4624     # we should not choose a depcomp mode which is confused by this.
4625     #
4626     # We need to recreate these files for each test, as the compiler may
4627     # overwrite some of them when testing with obscure command lines.
4628     # This happens at least with the AIX C compiler.
4629     : > sub/conftest.c
4630     for i in 1 2 3 4 5 6; do
4631       echo '#include "conftst'$i'.h"' >> sub/conftest.c
4632       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4633       # Solaris 10 /bin/sh.
4634       echo '/* dummy */' > sub/conftst$i.h
4635     done
4636     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4637
4638     # We check with '-c' and '-o' for the sake of the "dashmstdout"
4639     # mode.  It turns out that the SunPro C++ compiler does not properly
4640     # handle '-M -o', and we need to detect this.  Also, some Intel
4641     # versions had trouble with output in subdirs.
4642     am__obj=sub/conftest.${OBJEXT-o}
4643     am__minus_obj="-o $am__obj"
4644     case $depmode in
4645     gcc)
4646       # This depmode causes a compiler race in universal mode.
4647       test "$am__universal" = false || continue
4648       ;;
4649     nosideeffect)
4650       # After this tag, mechanisms are not by side-effect, so they'll
4651       # only be used when explicitly requested.
4652       if test "x$enable_dependency_tracking" = xyes; then
4653         continue
4654       else
4655         break
4656       fi
4657       ;;
4658     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4659       # This compiler won't grok '-c -o', but also, the minuso test has
4660       # not run yet.  These depmodes are late enough in the game, and
4661       # so weak that their functioning should not be impacted.
4662       am__obj=conftest.${OBJEXT-o}
4663       am__minus_obj=
4664       ;;
4665     none) break ;;
4666     esac
4667     if depmode=$depmode \
4668        source=sub/conftest.c object=$am__obj \
4669        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4670        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4671          >/dev/null 2>conftest.err &&
4672        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4673        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4674        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4675        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4676       # icc doesn't choke on unknown options, it will just issue warnings
4677       # or remarks (even with -Werror).  So we grep stderr for any message
4678       # that says an option was ignored or not supported.
4679       # When given -MP, icc 7.0 and 7.1 complain thusly:
4680       #   icc: Command line warning: ignoring option '-M'; no argument required
4681       # The diagnosis changed in icc 8.0:
4682       #   icc: Command line remark: option '-MP' not supported
4683       if (grep 'ignoring option' conftest.err ||
4684           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4685         am_cv_CC_dependencies_compiler_type=$depmode
4686         break
4687       fi
4688     fi
4689   done
4690
4691   cd ..
4692   rm -rf conftest.dir
4693 else
4694   am_cv_CC_dependencies_compiler_type=none
4695 fi
4696
4697 fi
4698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4699 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4700 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4701
4702  if
4703   test "x$enable_dependency_tracking" != xno \
4704   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4705   am__fastdepCC_TRUE=
4706   am__fastdepCC_FALSE='#'
4707 else
4708   am__fastdepCC_TRUE='#'
4709   am__fastdepCC_FALSE=
4710 fi
4711
4712
4713
4714
4715
4716 ac_ext=c
4717 ac_cpp='$CPP $CPPFLAGS'
4718 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4719 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4720 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4722 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4723 # On Suns, sometimes $CPP names a directory.
4724 if test -n "$CPP" && test -d "$CPP"; then
4725   CPP=
4726 fi
4727 if test -z "$CPP"; then
4728   if ${ac_cv_prog_CPP+:} false; then :
4729   $as_echo_n "(cached) " >&6
4730 else
4731       # Double quotes because CPP needs to be expanded
4732     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4733     do
4734       ac_preproc_ok=false
4735 for ac_c_preproc_warn_flag in '' yes
4736 do
4737   # Use a header file that comes with gcc, so configuring glibc
4738   # with a fresh cross-compiler works.
4739   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4740   # <limits.h> exists even on freestanding compilers.
4741   # On the NeXT, cc -E runs the code through the compiler's parser,
4742   # not just through cpp. "Syntax error" is here to catch this case.
4743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4744 /* end confdefs.h.  */
4745 #ifdef __STDC__
4746 # include <limits.h>
4747 #else
4748 # include <assert.h>
4749 #endif
4750                      Syntax error
4751 _ACEOF
4752 if ac_fn_c_try_cpp "$LINENO"; then :
4753
4754 else
4755   # Broken: fails on valid input.
4756 continue
4757 fi
4758 rm -f conftest.err conftest.i conftest.$ac_ext
4759
4760   # OK, works on sane cases.  Now check whether nonexistent headers
4761   # can be detected and how.
4762   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4763 /* end confdefs.h.  */
4764 #include <ac_nonexistent.h>
4765 _ACEOF
4766 if ac_fn_c_try_cpp "$LINENO"; then :
4767   # Broken: success on invalid input.
4768 continue
4769 else
4770   # Passes both tests.
4771 ac_preproc_ok=:
4772 break
4773 fi
4774 rm -f conftest.err conftest.i conftest.$ac_ext
4775
4776 done
4777 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4778 rm -f conftest.i conftest.err conftest.$ac_ext
4779 if $ac_preproc_ok; then :
4780   break
4781 fi
4782
4783     done
4784     ac_cv_prog_CPP=$CPP
4785
4786 fi
4787   CPP=$ac_cv_prog_CPP
4788 else
4789   ac_cv_prog_CPP=$CPP
4790 fi
4791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4792 $as_echo "$CPP" >&6; }
4793 ac_preproc_ok=false
4794 for ac_c_preproc_warn_flag in '' yes
4795 do
4796   # Use a header file that comes with gcc, so configuring glibc
4797   # with a fresh cross-compiler works.
4798   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4799   # <limits.h> exists even on freestanding compilers.
4800   # On the NeXT, cc -E runs the code through the compiler's parser,
4801   # not just through cpp. "Syntax error" is here to catch this case.
4802   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4803 /* end confdefs.h.  */
4804 #ifdef __STDC__
4805 # include <limits.h>
4806 #else
4807 # include <assert.h>
4808 #endif
4809                      Syntax error
4810 _ACEOF
4811 if ac_fn_c_try_cpp "$LINENO"; then :
4812
4813 else
4814   # Broken: fails on valid input.
4815 continue
4816 fi
4817 rm -f conftest.err conftest.i conftest.$ac_ext
4818
4819   # OK, works on sane cases.  Now check whether nonexistent headers
4820   # can be detected and how.
4821   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4822 /* end confdefs.h.  */
4823 #include <ac_nonexistent.h>
4824 _ACEOF
4825 if ac_fn_c_try_cpp "$LINENO"; then :
4826   # Broken: success on invalid input.
4827 continue
4828 else
4829   # Passes both tests.
4830 ac_preproc_ok=:
4831 break
4832 fi
4833 rm -f conftest.err conftest.i conftest.$ac_ext
4834
4835 done
4836 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4837 rm -f conftest.i conftest.err conftest.$ac_ext
4838 if $ac_preproc_ok; then :
4839
4840 else
4841   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4842 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4843 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4844 See \`config.log' for more details" "$LINENO" 5; }
4845 fi
4846
4847 ac_ext=c
4848 ac_cpp='$CPP $CPPFLAGS'
4849 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4850 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4851 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4852
4853
4854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4855 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4856 if ${ac_cv_path_GREP+:} false; then :
4857   $as_echo_n "(cached) " >&6
4858 else
4859   if test -z "$GREP"; then
4860   ac_path_GREP_found=false
4861   # Loop through the user's path and test for each of PROGNAME-LIST
4862   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4863 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4864 do
4865   IFS=$as_save_IFS
4866   test -z "$as_dir" && as_dir=.
4867     for ac_prog in grep ggrep; do
4868     for ac_exec_ext in '' $ac_executable_extensions; do
4869       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4870       as_fn_executable_p "$ac_path_GREP" || continue
4871 # Check for GNU ac_path_GREP and select it if it is found.
4872   # Check for GNU $ac_path_GREP
4873 case `"$ac_path_GREP" --version 2>&1` in
4874 *GNU*)
4875   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4876 *)
4877   ac_count=0
4878   $as_echo_n 0123456789 >"conftest.in"
4879   while :
4880   do
4881     cat "conftest.in" "conftest.in" >"conftest.tmp"
4882     mv "conftest.tmp" "conftest.in"
4883     cp "conftest.in" "conftest.nl"
4884     $as_echo 'GREP' >> "conftest.nl"
4885     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4886     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4887     as_fn_arith $ac_count + 1 && ac_count=$as_val
4888     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4889       # Best one so far, save it but keep looking for a better one
4890       ac_cv_path_GREP="$ac_path_GREP"
4891       ac_path_GREP_max=$ac_count
4892     fi
4893     # 10*(2^10) chars as input seems more than enough
4894     test $ac_count -gt 10 && break
4895   done
4896   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4897 esac
4898
4899       $ac_path_GREP_found && break 3
4900     done
4901   done
4902   done
4903 IFS=$as_save_IFS
4904   if test -z "$ac_cv_path_GREP"; then
4905     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4906   fi
4907 else
4908   ac_cv_path_GREP=$GREP
4909 fi
4910
4911 fi
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4913 $as_echo "$ac_cv_path_GREP" >&6; }
4914  GREP="$ac_cv_path_GREP"
4915
4916
4917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4918 $as_echo_n "checking for egrep... " >&6; }
4919 if ${ac_cv_path_EGREP+:} false; then :
4920   $as_echo_n "(cached) " >&6
4921 else
4922   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4923    then ac_cv_path_EGREP="$GREP -E"
4924    else
4925      if test -z "$EGREP"; then
4926   ac_path_EGREP_found=false
4927   # Loop through the user's path and test for each of PROGNAME-LIST
4928   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4929 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4930 do
4931   IFS=$as_save_IFS
4932   test -z "$as_dir" && as_dir=.
4933     for ac_prog in egrep; do
4934     for ac_exec_ext in '' $ac_executable_extensions; do
4935       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4936       as_fn_executable_p "$ac_path_EGREP" || continue
4937 # Check for GNU ac_path_EGREP and select it if it is found.
4938   # Check for GNU $ac_path_EGREP
4939 case `"$ac_path_EGREP" --version 2>&1` in
4940 *GNU*)
4941   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4942 *)
4943   ac_count=0
4944   $as_echo_n 0123456789 >"conftest.in"
4945   while :
4946   do
4947     cat "conftest.in" "conftest.in" >"conftest.tmp"
4948     mv "conftest.tmp" "conftest.in"
4949     cp "conftest.in" "conftest.nl"
4950     $as_echo 'EGREP' >> "conftest.nl"
4951     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4952     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4953     as_fn_arith $ac_count + 1 && ac_count=$as_val
4954     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4955       # Best one so far, save it but keep looking for a better one
4956       ac_cv_path_EGREP="$ac_path_EGREP"
4957       ac_path_EGREP_max=$ac_count
4958     fi
4959     # 10*(2^10) chars as input seems more than enough
4960     test $ac_count -gt 10 && break
4961   done
4962   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4963 esac
4964
4965       $ac_path_EGREP_found && break 3
4966     done
4967   done
4968   done
4969 IFS=$as_save_IFS
4970   if test -z "$ac_cv_path_EGREP"; then
4971     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4972   fi
4973 else
4974   ac_cv_path_EGREP=$EGREP
4975 fi
4976
4977    fi
4978 fi
4979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4980 $as_echo "$ac_cv_path_EGREP" >&6; }
4981  EGREP="$ac_cv_path_EGREP"
4982
4983
4984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4985 $as_echo_n "checking for ANSI C header files... " >&6; }
4986 if ${ac_cv_header_stdc+:} false; then :
4987   $as_echo_n "(cached) " >&6
4988 else
4989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4990 /* end confdefs.h.  */
4991 #include <stdlib.h>
4992 #include <stdarg.h>
4993 #include <string.h>
4994 #include <float.h>
4995
4996 int
4997 main ()
4998 {
4999
5000   ;
5001   return 0;
5002 }
5003 _ACEOF
5004 if ac_fn_c_try_compile "$LINENO"; then :
5005   ac_cv_header_stdc=yes
5006 else
5007   ac_cv_header_stdc=no
5008 fi
5009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5010
5011 if test $ac_cv_header_stdc = yes; then
5012   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5014 /* end confdefs.h.  */
5015 #include <string.h>
5016
5017 _ACEOF
5018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5019   $EGREP "memchr" >/dev/null 2>&1; then :
5020
5021 else
5022   ac_cv_header_stdc=no
5023 fi
5024 rm -f conftest*
5025
5026 fi
5027
5028 if test $ac_cv_header_stdc = yes; then
5029   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5031 /* end confdefs.h.  */
5032 #include <stdlib.h>
5033
5034 _ACEOF
5035 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5036   $EGREP "free" >/dev/null 2>&1; then :
5037
5038 else
5039   ac_cv_header_stdc=no
5040 fi
5041 rm -f conftest*
5042
5043 fi
5044
5045 if test $ac_cv_header_stdc = yes; then
5046   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5047   if test "$cross_compiling" = yes; then :
5048   :
5049 else
5050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5051 /* end confdefs.h.  */
5052 #include <ctype.h>
5053 #include <stdlib.h>
5054 #if ((' ' & 0x0FF) == 0x020)
5055 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5056 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5057 #else
5058 # define ISLOWER(c) \
5059                    (('a' <= (c) && (c) <= 'i') \
5060                      || ('j' <= (c) && (c) <= 'r') \
5061                      || ('s' <= (c) && (c) <= 'z'))
5062 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5063 #endif
5064
5065 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5066 int
5067 main ()
5068 {
5069   int i;
5070   for (i = 0; i < 256; i++)
5071     if (XOR (islower (i), ISLOWER (i))
5072         || toupper (i) != TOUPPER (i))
5073       return 2;
5074   return 0;
5075 }
5076 _ACEOF
5077 if ac_fn_c_try_run "$LINENO"; then :
5078
5079 else
5080   ac_cv_header_stdc=no
5081 fi
5082 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5083   conftest.$ac_objext conftest.beam conftest.$ac_ext
5084 fi
5085
5086 fi
5087 fi
5088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5089 $as_echo "$ac_cv_header_stdc" >&6; }
5090 if test $ac_cv_header_stdc = yes; then
5091
5092 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5093
5094 fi
5095
5096 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5097 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5098                   inttypes.h stdint.h unistd.h
5099 do :
5100   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5101 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5102 "
5103 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5104   cat >>confdefs.h <<_ACEOF
5105 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5106 _ACEOF
5107
5108 fi
5109
5110 done
5111
5112
5113
5114
5115
5116   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5117 if test "x$ac_cv_header_minix_config_h" = xyes; then :
5118   MINIX=yes
5119 else
5120   MINIX=
5121 fi
5122
5123
5124   if test "$MINIX" = yes; then
5125
5126 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5127
5128
5129 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5130
5131
5132 $as_echo "#define _MINIX 1" >>confdefs.h
5133
5134   fi
5135
5136         case "$host_os" in
5137     hpux*)
5138
5139 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5140
5141       ;;
5142   esac
5143
5144
5145   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5146 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5147 if ${ac_cv_safe_to_define___extensions__+:} false; then :
5148   $as_echo_n "(cached) " >&6
5149 else
5150   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5151 /* end confdefs.h.  */
5152
5153 #         define __EXTENSIONS__ 1
5154           $ac_includes_default
5155 int
5156 main ()
5157 {
5158
5159   ;
5160   return 0;
5161 }
5162 _ACEOF
5163 if ac_fn_c_try_compile "$LINENO"; then :
5164   ac_cv_safe_to_define___extensions__=yes
5165 else
5166   ac_cv_safe_to_define___extensions__=no
5167 fi
5168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5169 fi
5170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5171 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5172   test $ac_cv_safe_to_define___extensions__ = yes &&
5173     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5174
5175   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5176
5177   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5178
5179   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5180
5181   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5182
5183
5184
5185    case $ac_cv_prog_cc_stdc in #(
5186   no) :
5187     ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
5188   *) :
5189     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
5190 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
5191 if ${ac_cv_prog_cc_c99+:} false; then :
5192   $as_echo_n "(cached) " >&6
5193 else
5194   ac_cv_prog_cc_c99=no
5195 ac_save_CC=$CC
5196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5197 /* end confdefs.h.  */
5198 #include <stdarg.h>
5199 #include <stdbool.h>
5200 #include <stdlib.h>
5201 #include <wchar.h>
5202 #include <stdio.h>
5203
5204 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
5205 #define debug(...) fprintf (stderr, __VA_ARGS__)
5206 #define showlist(...) puts (#__VA_ARGS__)
5207 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5208 static void
5209 test_varargs_macros (void)
5210 {
5211   int x = 1234;
5212   int y = 5678;
5213   debug ("Flag");
5214   debug ("X = %d\n", x);
5215   showlist (The first, second, and third items.);
5216   report (x>y, "x is %d but y is %d", x, y);
5217 }
5218
5219 // Check long long types.
5220 #define BIG64 18446744073709551615ull
5221 #define BIG32 4294967295ul
5222 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5223 #if !BIG_OK
5224   your preprocessor is broken;
5225 #endif
5226 #if BIG_OK
5227 #else
5228   your preprocessor is broken;
5229 #endif
5230 static long long int bignum = -9223372036854775807LL;
5231 static unsigned long long int ubignum = BIG64;
5232
5233 struct incomplete_array
5234 {
5235   int datasize;
5236   double data[];
5237 };
5238
5239 struct named_init {
5240   int number;
5241   const wchar_t *name;
5242   double average;
5243 };
5244
5245 typedef const char *ccp;
5246
5247 static inline int
5248 test_restrict (ccp restrict text)
5249 {
5250   // See if C++-style comments work.
5251   // Iterate through items via the restricted pointer.
5252   // Also check for declarations in for loops.
5253   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5254     continue;
5255   return 0;
5256 }
5257
5258 // Check varargs and va_copy.
5259 static void
5260 test_varargs (const char *format, ...)
5261 {
5262   va_list args;
5263   va_start (args, format);
5264   va_list args_copy;
5265   va_copy (args_copy, args);
5266
5267   const char *str;
5268   int number;
5269   float fnumber;
5270
5271   while (*format)
5272     {
5273       switch (*format++)
5274         {
5275         case 's': // string
5276           str = va_arg (args_copy, const char *);
5277           break;
5278         case 'd': // int
5279           number = va_arg (args_copy, int);
5280           break;
5281         case 'f': // float
5282           fnumber = va_arg (args_copy, double);
5283           break;
5284         default:
5285           break;
5286         }
5287     }
5288   va_end (args_copy);
5289   va_end (args);
5290 }
5291
5292 int
5293 main ()
5294 {
5295
5296   // Check bool.
5297   _Bool success = false;
5298
5299   // Check restrict.
5300   if (test_restrict ("String literal") == 0)
5301     success = true;
5302   char *restrict newvar = "Another string";
5303
5304   // Check varargs.
5305   test_varargs ("s, d' f .", "string", 65, 34.234);
5306   test_varargs_macros ();
5307
5308   // Check flexible array members.
5309   struct incomplete_array *ia =
5310     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5311   ia->datasize = 10;
5312   for (int i = 0; i < ia->datasize; ++i)
5313     ia->data[i] = i * 1.234;
5314
5315   // Check named initializers.
5316   struct named_init ni = {
5317     .number = 34,
5318     .name = L"Test wide string",
5319     .average = 543.34343,
5320   };
5321
5322   ni.number = 58;
5323
5324   int dynamic_array[ni.number];
5325   dynamic_array[ni.number - 1] = 543;
5326
5327   // work around unused variable warnings
5328   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5329           || dynamic_array[ni.number - 1] != 543);
5330
5331   ;
5332   return 0;
5333 }
5334 _ACEOF
5335 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
5336 do
5337   CC="$ac_save_CC $ac_arg"
5338   if ac_fn_c_try_compile "$LINENO"; then :
5339   ac_cv_prog_cc_c99=$ac_arg
5340 fi
5341 rm -f core conftest.err conftest.$ac_objext
5342   test "x$ac_cv_prog_cc_c99" != "xno" && break
5343 done
5344 rm -f conftest.$ac_ext
5345 CC=$ac_save_CC
5346
5347 fi
5348 # AC_CACHE_VAL
5349 case "x$ac_cv_prog_cc_c99" in
5350   x)
5351     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5352 $as_echo "none needed" >&6; } ;;
5353   xno)
5354     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5355 $as_echo "unsupported" >&6; } ;;
5356   *)
5357     CC="$CC $ac_cv_prog_cc_c99"
5358     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5359 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5360 esac
5361 if test "x$ac_cv_prog_cc_c99" != xno; then :
5362   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5363 else
5364   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5365 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5366 if ${ac_cv_prog_cc_c89+:} false; then :
5367   $as_echo_n "(cached) " >&6
5368 else
5369   ac_cv_prog_cc_c89=no
5370 ac_save_CC=$CC
5371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5372 /* end confdefs.h.  */
5373 #include <stdarg.h>
5374 #include <stdio.h>
5375 struct stat;
5376 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5377 struct buf { int x; };
5378 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5379 static char *e (p, i)
5380      char **p;
5381      int i;
5382 {
5383   return p[i];
5384 }
5385 static char *f (char * (*g) (char **, int), char **p, ...)
5386 {
5387   char *s;
5388   va_list v;
5389   va_start (v,p);
5390   s = g (p, va_arg (v,int));
5391   va_end (v);
5392   return s;
5393 }
5394
5395 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5396    function prototypes and stuff, but not '\xHH' hex character constants.
5397    These don't provoke an error unfortunately, instead are silently treated
5398    as 'x'.  The following induces an error, until -std is added to get
5399    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5400    array size at least.  It's necessary to write '\x00'==0 to get something
5401    that's true only with -std.  */
5402 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5403
5404 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5405    inside strings and character constants.  */
5406 #define FOO(x) 'x'
5407 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5408
5409 int test (int i, double x);
5410 struct s1 {int (*f) (int a);};
5411 struct s2 {int (*f) (double a);};
5412 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5413 int argc;
5414 char **argv;
5415 int
5416 main ()
5417 {
5418 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5419   ;
5420   return 0;
5421 }
5422 _ACEOF
5423 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5424         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5425 do
5426   CC="$ac_save_CC $ac_arg"
5427   if ac_fn_c_try_compile "$LINENO"; then :
5428   ac_cv_prog_cc_c89=$ac_arg
5429 fi
5430 rm -f core conftest.err conftest.$ac_objext
5431   test "x$ac_cv_prog_cc_c89" != "xno" && break
5432 done
5433 rm -f conftest.$ac_ext
5434 CC=$ac_save_CC
5435
5436 fi
5437 # AC_CACHE_VAL
5438 case "x$ac_cv_prog_cc_c89" in
5439   x)
5440     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5441 $as_echo "none needed" >&6; } ;;
5442   xno)
5443     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5444 $as_echo "unsupported" >&6; } ;;
5445   *)
5446     CC="$CC $ac_cv_prog_cc_c89"
5447     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5448 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5449 esac
5450 if test "x$ac_cv_prog_cc_c89" != xno; then :
5451   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5452 else
5453   ac_cv_prog_cc_stdc=no
5454 fi
5455
5456 fi
5457  ;;
5458 esac
5459   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
5460 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
5461   if ${ac_cv_prog_cc_stdc+:} false; then :
5462   $as_echo_n "(cached) " >&6
5463 fi
5464
5465   case $ac_cv_prog_cc_stdc in #(
5466   no) :
5467     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5468 $as_echo "unsupported" >&6; } ;; #(
5469   '') :
5470     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5471 $as_echo "none needed" >&6; } ;; #(
5472   *) :
5473     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
5474 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
5475 esac
5476
5477
5478
5479
5480
5481 # Ralf Wildenhues: With per-target flags we need CC_C_O
5482 # AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
5483
5484 if test $ac_cv_c_compiler_gnu = yes; then
5485     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
5486 $as_echo_n "checking whether $CC needs -traditional... " >&6; }
5487 if ${ac_cv_prog_gcc_traditional+:} false; then :
5488   $as_echo_n "(cached) " >&6
5489 else
5490     ac_pattern="Autoconf.*'x'"
5491   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5492 /* end confdefs.h.  */
5493 #include <sgtty.h>
5494 Autoconf TIOCGETP
5495 _ACEOF
5496 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5497   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
5498   ac_cv_prog_gcc_traditional=yes
5499 else
5500   ac_cv_prog_gcc_traditional=no
5501 fi
5502 rm -f conftest*
5503
5504
5505   if test $ac_cv_prog_gcc_traditional = no; then
5506     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5507 /* end confdefs.h.  */
5508 #include <termio.h>
5509 Autoconf TCGETA
5510 _ACEOF
5511 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5512   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
5513   ac_cv_prog_gcc_traditional=yes
5514 fi
5515 rm -f conftest*
5516
5517   fi
5518 fi
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
5520 $as_echo "$ac_cv_prog_gcc_traditional" >&6; }
5521   if test $ac_cv_prog_gcc_traditional = yes; then
5522     CC="$CC -traditional"
5523   fi
5524 fi
5525
5526
5527
5528 CFLAGS_NTP=
5529 CPPFLAGS_NTP=
5530 LDADD_NTP=
5531 LDFLAGS_NTP=
5532
5533
5534
5535
5536
5537 case "$ac_cv_prog_cc_c89" in
5538  no)
5539     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
5540                  version 4.2.5 and higher." >&5
5541 $as_echo "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
5542                  version 4.2.5 and higher." >&2;}
5543     ;;
5544 esac
5545
5546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
5547 $as_echo_n "checking if $CC can handle #warning... " >&6; }
5548 if ${ntp_cv_cpp_warning+:} false; then :
5549   $as_echo_n "(cached) " >&6
5550 else
5551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5552 /* end confdefs.h.  */
5553
5554 int
5555 main ()
5556 {
5557 #warning foo
5558   ;
5559   return 0;
5560 }
5561 _ACEOF
5562 if ac_fn_c_try_compile "$LINENO"; then :
5563   ntp_cv_cpp_warning=yes
5564 else
5565   ntp_cv_cpp_warning=no
5566
5567 fi
5568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5569
5570 fi
5571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cpp_warning" >&5
5572 $as_echo "$ntp_cv_cpp_warning" >&6; }
5573 case "$ntp_cv_cpp_warning" in
5574  no)
5575
5576 $as_echo "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
5577
5578 esac
5579
5580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__((...))" >&5
5581 $as_echo_n "checking if $CC supports __attribute__((...))... " >&6; }
5582 if ${ntp_cv_cc_attribute+:} false; then :
5583   $as_echo_n "(cached) " >&6
5584 else
5585   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5586 /* end confdefs.h.  */
5587
5588 int
5589 main ()
5590 {
5591 void foo(void) __attribute__((__noreturn__));
5592
5593   ;
5594   return 0;
5595 }
5596 _ACEOF
5597 if ac_fn_c_try_compile "$LINENO"; then :
5598   ntp_cv_cc_attribute=yes
5599 else
5600   ntp_cv_cc_attribute=no
5601
5602 fi
5603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5604
5605 fi
5606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cc_attribute" >&5
5607 $as_echo "$ntp_cv_cc_attribute" >&6; }
5608 case "$ntp_cv_cc_attribute" in
5609  yes)
5610
5611 $as_echo "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h
5612
5613 esac
5614
5615
5616 case "$GCC" in
5617  yes)
5618     SAVED_CFLAGS="$CFLAGS"
5619     CFLAGS="$CFLAGS -Wstrict-overflow"
5620     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
5621 $as_echo_n "checking if $CC can handle -Wstrict-overflow... " >&6; }
5622 if ${ntp_cv_gcc_Wstrict_overflow+:} false; then :
5623   $as_echo_n "(cached) " >&6
5624 else
5625   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5626 /* end confdefs.h.  */
5627
5628 int
5629 main ()
5630 {
5631
5632   ;
5633   return 0;
5634 }
5635 _ACEOF
5636 if ac_fn_c_try_compile "$LINENO"; then :
5637   ntp_cv_gcc_Wstrict_overflow=yes
5638 else
5639   ntp_cv_gcc_Wstrict_overflow=no
5640
5641 fi
5642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5643
5644 fi
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wstrict_overflow" >&5
5646 $as_echo "$ntp_cv_gcc_Wstrict_overflow" >&6; }
5647     #
5648     # $ntp_cv_gcc_Wstrict_overflow is tested later to add the
5649     # flag to CFLAGS.
5650     #
5651     CFLAGS="$SAVED_CFLAGS -Winit-self"
5652     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
5653 $as_echo_n "checking if $CC can handle -Winit-self... " >&6; }
5654 if ${ntp_cv_gcc_Winit_self+:} false; then :
5655   $as_echo_n "(cached) " >&6
5656 else
5657
5658             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5659 /* end confdefs.h.  */
5660
5661 int
5662 main ()
5663 {
5664
5665   ;
5666   return 0;
5667 }
5668 _ACEOF
5669 if ac_fn_c_try_compile "$LINENO"; then :
5670   ntp_cv_gcc_Winit_self=yes
5671 else
5672   ntp_cv_gcc_Winit_self=no
5673
5674 fi
5675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5676
5677
5678 fi
5679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
5680 $as_echo "$ntp_cv_gcc_Winit_self" >&6; }
5681     CFLAGS="$SAVED_CFLAGS"
5682     { SAVED_CFLAGS=; unset SAVED_CFLAGS;}
5683     #
5684     # $ntp_cv_gcc_Winit_self is tested later to add the
5685     # flag to CFLAGS_NTP.
5686     #
5687     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
5688 $as_echo_n "checking if linker supports omitting unused code and data... " >&6; }
5689 if ${ntp_cv_gc_sections_runs+:} false; then :
5690   $as_echo_n "(cached) " >&6
5691 else
5692
5693                                                                                             origCFLAGS="$CFLAGS"
5694             CFLAGS="$CFLAGS -Wl,--gc-sections"
5695             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5696 /* end confdefs.h.  */
5697
5698                         #include <stdlib.h>
5699                         #include <stdio.h>
5700
5701 int
5702 main ()
5703 {
5704
5705                         FILE *  fpC;
5706                         char    buf[32];
5707                         size_t  cch;
5708                         int     read_success_once;
5709
5710                         fpC = fopen("conftest.c", "r");
5711                         if (NULL == fpC)
5712                                 exit(1);
5713                         do {
5714                                 cch = fread(buf, sizeof(buf), 1, fpC);
5715                                 read_success_once |= (0 != cch);
5716                         } while (0 != cch);
5717                         if (!read_success_once)
5718                                 exit(2);
5719                         if (!feof(fpC))
5720                                 exit(3);
5721                         if (0 != fclose(fpC))
5722                                 exit(4);
5723
5724                         exit(EXIT_SUCCESS);
5725
5726
5727   ;
5728   return 0;
5729 }
5730 _ACEOF
5731 if ac_fn_c_try_link "$LINENO"; then :
5732
5733                     if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
5734                         ntp_cv_gc_sections_runs=no
5735                     else
5736                         ntp_cv_gc_sections_runs=no
5737                         ./conftest >/dev/null 2>&1 && ntp_cv_gc_sections_runs=yes
5738                     fi
5739
5740 else
5741   ntp_cv_gc_sections_runs=no
5742
5743 fi
5744 rm -f core conftest.err conftest.$ac_objext \
5745     conftest$ac_exeext conftest.$ac_ext
5746             CFLAGS="$origCFLAGS"
5747             { origCFLAGS=; unset origCFLAGS;}
5748
5749
5750 fi
5751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gc_sections_runs" >&5
5752 $as_echo "$ntp_cv_gc_sections_runs" >&6; }
5753     case "$ntp_cv_gc_sections_runs" in
5754      yes)
5755         LDADD_LIBNTP="-Wl,--gc-sections"
5756         CFLAGS_NTP="$CFLAGS_NTP -ffunction-sections -fdata-sections"
5757         ;;
5758      no)
5759         LDADD_LIBNTP=
5760         ;;
5761     esac
5762     CFLAGS_NTP="$CFLAGS_NTP -Wall"
5763     CFLAGS_NTP="$CFLAGS_NTP -Wcast-align"
5764     CFLAGS_NTP="$CFLAGS_NTP -Wcast-qual"
5765     # CFLAGS_NTP="$CFLAGS_NTP -Wconversion"
5766     # CFLAGS_NTP="$CFLAGS_NTP -Werror"
5767     # CFLAGS_NTP="$CFLAGS_NTP -Wextra"
5768     # CFLAGS_NTP="$CFLAGS_NTP -Wfloat-equal"
5769     CFLAGS_NTP="$CFLAGS_NTP -Wmissing-prototypes"
5770     CFLAGS_NTP="$CFLAGS_NTP -Wpointer-arith"
5771     CFLAGS_NTP="$CFLAGS_NTP -Wshadow"
5772     # CFLAGS_NTP="$CFLAGS_NTP -Wtraditional"
5773     # CFLAGS_NTP="$CFLAGS_NTP -Wwrite-strings"
5774     case "$ntp_cv_gcc_Winit_self" in
5775      yes)
5776         CFLAGS_NTP="$CFLAGS_NTP -Winit-self"
5777     esac
5778     case "$ntp_cv_gcc_Wstrict_overflow" in
5779      yes)
5780         CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
5781     esac
5782     # -W[no-]strict-prototypes might be added by NTP_OPENSSL
5783 esac
5784
5785
5786     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
5787 $as_echo_n "checking additional compiler flags... " >&6; }
5788     # allow ntp_os_cflags to be preset to skip this stuff
5789     case "${ntp_os_cflags+set}" in
5790      set)
5791         ;;
5792      *)
5793         ntp_os_cflags=
5794         case "$host_os" in
5795          aix[1-3]*)
5796             ;;
5797          aix4.[0-2]*)
5798             # turn on additional headers
5799             ntp_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
5800             ;;
5801          aix5.3*)
5802             # avoid circular dependencies in yp headers, and more
5803             ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
5804             ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS -D_MSGQSUPPORT"
5805             ;;
5806          aix*)
5807             # XXX Only verified thru AIX6.
5808             # aix7 seems to need a different XOPEN_SOURCE_EXTENDED thing.
5809             # avoid circular dependencies in yp headers
5810             # _XOPEN_SOURCE=500 = X/Open 5: POSIX 1995
5811             # _XOPEN_SOURCE=600 = X/Open 6: POSIX 2004
5812             # _XOPEN_SOURCE=700 = X/Open 7: POSIX 2008
5813             ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_SOURCE=600"
5814             ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS"
5815             ;;
5816          amigaos)
5817             ntp_os_cflags="-DSYS_AMIGA"
5818             ;;
5819          darwin*|macosx*|rhapsody*)
5820             ntp_os_cflags="-D_P1003_1B_VISIBLE"
5821             ;;
5822          hpux10.*)              # at least for hppa2.0-hp-hpux10.20
5823             case "$GCC" in
5824              yes)
5825                 ;;
5826              *)
5827                 # use Ansi compiler on HPUX, and some -Wp magic
5828                 ntp_os_cflags="-Ae -Wp,-H18816"
5829                 ;;
5830             esac
5831             ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
5832             ;;
5833          hpux*)
5834             case "$GCC" in
5835              yes)
5836                 ;;
5837              *)
5838                 # use Ansi compiler on HPUX
5839                 ntp_os_cflags="-Ae"
5840             esac
5841             ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
5842             ;;
5843          irix6*)
5844             case "$CC" in
5845              cc)
5846                 # do not use 64-bit compiler
5847                 ntp_os_cflags="-n32 -mips3 -Wl,-woff,84"
5848             esac
5849             ;;
5850          nextstep3)
5851             ntp_os_cflags="-posix"
5852             ;;
5853          solaris1*|solaris2.[0-5]|solaris2.5.*)
5854             ;;
5855          sunos[34]*|sunos5.[0-5]|sunos5.5.*)
5856             ;;
5857          solaris2*|sunos5*)
5858             # turn on 64-bit file offset interface
5859             ntp_os_cflags="-D_LARGEFILE64_SOURCE"
5860             ;;
5861          vxworks*)
5862             case "$build" in
5863              $host)
5864                 ;;
5865              *)
5866                 # Quick and dirty sanity check
5867                 case "$VX_KERNEL" in
5868                  '')
5869                     as_fn_error $? "See html/build/hints/vxworks.html" "$LINENO" 5
5870                 esac
5871                 ntp_os_cflags="-DSYS_VXWORKS"
5872             esac
5873             ;;
5874         esac
5875     esac
5876     case "$ntp_os_cflags" in
5877      '')
5878         ntp_os_cflags_msg="none needed"
5879         ;;
5880      *)
5881         ntp_os_cflags_msg="$ntp_os_cflags"
5882     esac
5883     CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
5884     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
5885 $as_echo "$ntp_os_cflags_msg" >&6; }
5886     { ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
5887     ###
5888     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5
5889 $as_echo_n "checking additional linker flags... " >&6; }
5890     # HMS: The following might still need tweaking
5891     # allow ntp_os_ldflags to be preset to skip this stuff
5892     case "${ntp_os_ldflags+set}" in
5893      set)
5894         ;;
5895      *)
5896         ntp_os_ldflags=
5897         case "$host_os" in
5898          hpux*)
5899             case "$GCC" in
5900              yes)
5901                 ntp_os_ldflags="-Wl,+allowdups"
5902                 ;;
5903             esac
5904             ;;
5905         esac
5906         ;;
5907     esac
5908     case "$ntp_os_ldflags" in
5909      '')
5910         ntp_os_ldflags_msg="none needed"
5911         ;;
5912      *)
5913         ntp_os_ldflags_msg="$ntp_os_ldflags"
5914     esac
5915     LDFLAGS_NTP="$LDFLAGS_NTP $ntp_os_ldflags"
5916     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_ldflags_msg" >&5
5917 $as_echo "$ntp_os_ldflags_msg" >&6; }
5918     { ntp_os_ldflags_msg=; unset ntp_os_ldflags_msg;}
5919
5920
5921  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
5922 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
5923 if ${ac_cv_c_bigendian+:} false; then :
5924   $as_echo_n "(cached) " >&6
5925 else
5926   ac_cv_c_bigendian=unknown
5927     # See if we're dealing with a universal compiler.
5928     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929 /* end confdefs.h.  */
5930 #ifndef __APPLE_CC__
5931                not a universal capable compiler
5932              #endif
5933              typedef int dummy;
5934
5935 _ACEOF
5936 if ac_fn_c_try_compile "$LINENO"; then :
5937
5938         # Check for potential -arch flags.  It is not universal unless
5939         # there are at least two -arch flags with different values.
5940         ac_arch=
5941         ac_prev=
5942         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
5943          if test -n "$ac_prev"; then
5944            case $ac_word in
5945              i?86 | x86_64 | ppc | ppc64)
5946                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
5947                  ac_arch=$ac_word
5948                else
5949                  ac_cv_c_bigendian=universal
5950                  break
5951                fi
5952                ;;
5953            esac
5954            ac_prev=
5955          elif test "x$ac_word" = "x-arch"; then
5956            ac_prev=arch
5957          fi
5958        done
5959 fi
5960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5961     if test $ac_cv_c_bigendian = unknown; then
5962       # See if sys/param.h defines the BYTE_ORDER macro.
5963       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5964 /* end confdefs.h.  */
5965 #include <sys/types.h>
5966              #include <sys/param.h>
5967
5968 int
5969 main ()
5970 {
5971 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
5972                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
5973                      && LITTLE_ENDIAN)
5974               bogus endian macros
5975              #endif
5976
5977   ;
5978   return 0;
5979 }
5980 _ACEOF
5981 if ac_fn_c_try_compile "$LINENO"; then :
5982   # It does; now see whether it defined to BIG_ENDIAN or not.
5983          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5984 /* end confdefs.h.  */
5985 #include <sys/types.h>
5986                 #include <sys/param.h>
5987
5988 int
5989 main ()
5990 {
5991 #if BYTE_ORDER != BIG_ENDIAN
5992                  not big endian
5993                 #endif
5994
5995   ;
5996   return 0;
5997 }
5998 _ACEOF
5999 if ac_fn_c_try_compile "$LINENO"; then :
6000   ac_cv_c_bigendian=yes
6001 else
6002   ac_cv_c_bigendian=no
6003 fi
6004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6005 fi
6006 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6007     fi
6008     if test $ac_cv_c_bigendian = unknown; then
6009       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
6010       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6011 /* end confdefs.h.  */
6012 #include <limits.h>
6013
6014 int
6015 main ()
6016 {
6017 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
6018               bogus endian macros
6019              #endif
6020
6021   ;
6022   return 0;
6023 }
6024 _ACEOF
6025 if ac_fn_c_try_compile "$LINENO"; then :
6026   # It does; now see whether it defined to _BIG_ENDIAN or not.
6027          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6028 /* end confdefs.h.  */
6029 #include <limits.h>
6030
6031 int
6032 main ()
6033 {
6034 #ifndef _BIG_ENDIAN
6035                  not big endian
6036                 #endif
6037
6038   ;
6039   return 0;
6040 }
6041 _ACEOF
6042 if ac_fn_c_try_compile "$LINENO"; then :
6043   ac_cv_c_bigendian=yes
6044 else
6045   ac_cv_c_bigendian=no
6046 fi
6047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6048 fi
6049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6050     fi
6051     if test $ac_cv_c_bigendian = unknown; then
6052       # Compile a test program.
6053       if test "$cross_compiling" = yes; then :
6054   # Try to guess by grepping values from an object file.
6055          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6056 /* end confdefs.h.  */
6057 short int ascii_mm[] =
6058                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
6059                 short int ascii_ii[] =
6060                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
6061                 int use_ascii (int i) {
6062                   return ascii_mm[i] + ascii_ii[i];
6063                 }
6064                 short int ebcdic_ii[] =
6065                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
6066                 short int ebcdic_mm[] =
6067                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
6068                 int use_ebcdic (int i) {
6069                   return ebcdic_mm[i] + ebcdic_ii[i];
6070                 }
6071                 extern int foo;
6072
6073 int
6074 main ()
6075 {
6076 return use_ascii (foo) == use_ebcdic (foo);
6077   ;
6078   return 0;
6079 }
6080 _ACEOF
6081 if ac_fn_c_try_compile "$LINENO"; then :
6082   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
6083               ac_cv_c_bigendian=yes
6084             fi
6085             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
6086               if test "$ac_cv_c_bigendian" = unknown; then
6087                 ac_cv_c_bigendian=no
6088               else
6089                 # finding both strings is unlikely to happen, but who knows?
6090                 ac_cv_c_bigendian=unknown
6091               fi
6092             fi
6093 fi
6094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6095 else
6096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6097 /* end confdefs.h.  */
6098 $ac_includes_default
6099 int
6100 main ()
6101 {
6102
6103              /* Are we little or big endian?  From Harbison&Steele.  */
6104              union
6105              {
6106                long int l;
6107                char c[sizeof (long int)];
6108              } u;
6109              u.l = 1;
6110              return u.c[sizeof (long int) - 1] == 1;
6111
6112   ;
6113   return 0;
6114 }
6115 _ACEOF
6116 if ac_fn_c_try_run "$LINENO"; then :
6117   ac_cv_c_bigendian=no
6118 else
6119   ac_cv_c_bigendian=yes
6120 fi
6121 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6122   conftest.$ac_objext conftest.beam conftest.$ac_ext
6123 fi
6124
6125     fi
6126 fi
6127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
6128 $as_echo "$ac_cv_c_bigendian" >&6; }
6129  case $ac_cv_c_bigendian in #(
6130    yes)
6131      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
6132 ;; #(
6133    no)
6134       ;; #(
6135    universal)
6136
6137 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
6138
6139      ;; #(
6140    *)
6141      as_fn_error $? "unknown endianness
6142  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
6143  esac
6144
6145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
6146 $as_echo_n "checking for working volatile... " >&6; }
6147 if ${ac_cv_c_volatile+:} false; then :
6148   $as_echo_n "(cached) " >&6
6149 else
6150   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6151 /* end confdefs.h.  */
6152
6153 int
6154 main ()
6155 {
6156
6157 volatile int x;
6158 int * volatile y = (int *) 0;
6159 return !x && !y;
6160   ;
6161   return 0;
6162 }
6163 _ACEOF
6164 if ac_fn_c_try_compile "$LINENO"; then :
6165   ac_cv_c_volatile=yes
6166 else
6167   ac_cv_c_volatile=no
6168 fi
6169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6170 fi
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
6172 $as_echo "$ac_cv_c_volatile" >&6; }
6173 if test $ac_cv_c_volatile = no; then
6174
6175 $as_echo "#define volatile /**/" >>confdefs.h
6176
6177 fi
6178
6179 ac_ext=c
6180 ac_cpp='$CPP $CPPFLAGS'
6181 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6182 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6183 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6185 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6186 # On Suns, sometimes $CPP names a directory.
6187 if test -n "$CPP" && test -d "$CPP"; then
6188   CPP=
6189 fi
6190 if test -z "$CPP"; then
6191   if ${ac_cv_prog_CPP+:} false; then :
6192   $as_echo_n "(cached) " >&6
6193 else
6194       # Double quotes because CPP needs to be expanded
6195     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6196     do
6197       ac_preproc_ok=false
6198 for ac_c_preproc_warn_flag in '' yes
6199 do
6200   # Use a header file that comes with gcc, so configuring glibc
6201   # with a fresh cross-compiler works.
6202   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6203   # <limits.h> exists even on freestanding compilers.
6204   # On the NeXT, cc -E runs the code through the compiler's parser,
6205   # not just through cpp. "Syntax error" is here to catch this case.
6206   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6207 /* end confdefs.h.  */
6208 #ifdef __STDC__
6209 # include <limits.h>
6210 #else
6211 # include <assert.h>
6212 #endif
6213                      Syntax error
6214 _ACEOF
6215 if ac_fn_c_try_cpp "$LINENO"; then :
6216
6217 else
6218   # Broken: fails on valid input.
6219 continue
6220 fi
6221 rm -f conftest.err conftest.i conftest.$ac_ext
6222
6223   # OK, works on sane cases.  Now check whether nonexistent headers
6224   # can be detected and how.
6225   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6226 /* end confdefs.h.  */
6227 #include <ac_nonexistent.h>
6228 _ACEOF
6229 if ac_fn_c_try_cpp "$LINENO"; then :
6230   # Broken: success on invalid input.
6231 continue
6232 else
6233   # Passes both tests.
6234 ac_preproc_ok=:
6235 break
6236 fi
6237 rm -f conftest.err conftest.i conftest.$ac_ext
6238
6239 done
6240 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6241 rm -f conftest.i conftest.err conftest.$ac_ext
6242 if $ac_preproc_ok; then :
6243   break
6244 fi
6245
6246     done
6247     ac_cv_prog_CPP=$CPP
6248
6249 fi
6250   CPP=$ac_cv_prog_CPP
6251 else
6252   ac_cv_prog_CPP=$CPP
6253 fi
6254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6255 $as_echo "$CPP" >&6; }
6256 ac_preproc_ok=false
6257 for ac_c_preproc_warn_flag in '' yes
6258 do
6259   # Use a header file that comes with gcc, so configuring glibc
6260   # with a fresh cross-compiler works.
6261   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6262   # <limits.h> exists even on freestanding compilers.
6263   # On the NeXT, cc -E runs the code through the compiler's parser,
6264   # not just through cpp. "Syntax error" is here to catch this case.
6265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6266 /* end confdefs.h.  */
6267 #ifdef __STDC__
6268 # include <limits.h>
6269 #else
6270 # include <assert.h>
6271 #endif
6272                      Syntax error
6273 _ACEOF
6274 if ac_fn_c_try_cpp "$LINENO"; then :
6275
6276 else
6277   # Broken: fails on valid input.
6278 continue
6279 fi
6280 rm -f conftest.err conftest.i conftest.$ac_ext
6281
6282   # OK, works on sane cases.  Now check whether nonexistent headers
6283   # can be detected and how.
6284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6285 /* end confdefs.h.  */
6286 #include <ac_nonexistent.h>
6287 _ACEOF
6288 if ac_fn_c_try_cpp "$LINENO"; then :
6289   # Broken: success on invalid input.
6290 continue
6291 else
6292   # Passes both tests.
6293 ac_preproc_ok=:
6294 break
6295 fi
6296 rm -f conftest.err conftest.i conftest.$ac_ext
6297
6298 done
6299 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6300 rm -f conftest.i conftest.err conftest.$ac_ext
6301 if $ac_preproc_ok; then :
6302
6303 else
6304   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6305 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6306 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6307 See \`config.log' for more details" "$LINENO" 5; }
6308 fi
6309
6310 ac_ext=c
6311 ac_cpp='$CPP $CPPFLAGS'
6312 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6313 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6314 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6315
6316
6317
6318
6319 for ac_prog in 'bison -y' byacc
6320 do
6321   # Extract the first word of "$ac_prog", so it can be a program name with args.
6322 set dummy $ac_prog; ac_word=$2
6323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6324 $as_echo_n "checking for $ac_word... " >&6; }
6325 if ${ac_cv_prog_YACC+:} false; then :
6326   $as_echo_n "(cached) " >&6
6327 else
6328   if test -n "$YACC"; then
6329   ac_cv_prog_YACC="$YACC" # Let the user override the test.
6330 else
6331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6332 for as_dir in $PATH
6333 do
6334   IFS=$as_save_IFS
6335   test -z "$as_dir" && as_dir=.
6336     for ac_exec_ext in '' $ac_executable_extensions; do
6337   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6338     ac_cv_prog_YACC="$ac_prog"
6339     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6340     break 2
6341   fi
6342 done
6343   done
6344 IFS=$as_save_IFS
6345
6346 fi
6347 fi
6348 YACC=$ac_cv_prog_YACC
6349 if test -n "$YACC"; then
6350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6351 $as_echo "$YACC" >&6; }
6352 else
6353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6354 $as_echo "no" >&6; }
6355 fi
6356
6357
6358   test -n "$YACC" && break
6359 done
6360 test -n "$YACC" || YACC="yacc"
6361
6362    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6363 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6364 if ${ac_cv_prog_cc_c99+:} false; then :
6365   $as_echo_n "(cached) " >&6
6366 else
6367   ac_cv_prog_cc_c99=no
6368 ac_save_CC=$CC
6369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6370 /* end confdefs.h.  */
6371 #include <stdarg.h>
6372 #include <stdbool.h>
6373 #include <stdlib.h>
6374 #include <wchar.h>
6375 #include <stdio.h>
6376
6377 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
6378 #define debug(...) fprintf (stderr, __VA_ARGS__)
6379 #define showlist(...) puts (#__VA_ARGS__)
6380 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6381 static void
6382 test_varargs_macros (void)
6383 {
6384   int x = 1234;
6385   int y = 5678;
6386   debug ("Flag");
6387   debug ("X = %d\n", x);
6388   showlist (The first, second, and third items.);
6389   report (x>y, "x is %d but y is %d", x, y);
6390 }
6391
6392 // Check long long types.
6393 #define BIG64 18446744073709551615ull
6394 #define BIG32 4294967295ul
6395 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6396 #if !BIG_OK
6397   your preprocessor is broken;
6398 #endif
6399 #if BIG_OK
6400 #else
6401   your preprocessor is broken;
6402 #endif
6403 static long long int bignum = -9223372036854775807LL;
6404 static unsigned long long int ubignum = BIG64;
6405
6406 struct incomplete_array
6407 {
6408   int datasize;
6409   double data[];
6410 };
6411
6412 struct named_init {
6413   int number;
6414   const wchar_t *name;
6415   double average;
6416 };
6417
6418 typedef const char *ccp;
6419
6420 static inline int
6421 test_restrict (ccp restrict text)
6422 {
6423   // See if C++-style comments work.
6424   // Iterate through items via the restricted pointer.
6425   // Also check for declarations in for loops.
6426   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6427     continue;
6428   return 0;
6429 }
6430
6431 // Check varargs and va_copy.
6432 static void
6433 test_varargs (const char *format, ...)
6434 {
6435   va_list args;
6436   va_start (args, format);
6437   va_list args_copy;
6438   va_copy (args_copy, args);
6439
6440   const char *str;
6441   int number;
6442   float fnumber;
6443
6444   while (*format)
6445     {
6446       switch (*format++)
6447         {
6448         case 's': // string
6449           str = va_arg (args_copy, const char *);
6450           break;
6451         case 'd': // int
6452           number = va_arg (args_copy, int);
6453           break;
6454         case 'f': // float
6455           fnumber = va_arg (args_copy, double);
6456           break;
6457         default:
6458           break;
6459         }
6460     }
6461   va_end (args_copy);
6462   va_end (args);
6463 }
6464
6465 int
6466 main ()
6467 {
6468
6469   // Check bool.
6470   _Bool success = false;
6471
6472   // Check restrict.
6473   if (test_restrict ("String literal") == 0)
6474     success = true;
6475   char *restrict newvar = "Another string";
6476
6477   // Check varargs.
6478   test_varargs ("s, d' f .", "string", 65, 34.234);
6479   test_varargs_macros ();
6480
6481   // Check flexible array members.
6482   struct incomplete_array *ia =
6483     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6484   ia->datasize = 10;
6485   for (int i = 0; i < ia->datasize; ++i)
6486     ia->data[i] = i * 1.234;
6487
6488   // Check named initializers.
6489   struct named_init ni = {
6490     .number = 34,
6491     .name = L"Test wide string",
6492     .average = 543.34343,
6493   };
6494
6495   ni.number = 58;
6496
6497   int dynamic_array[ni.number];
6498   dynamic_array[ni.number - 1] = 543;
6499
6500   // work around unused variable warnings
6501   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6502           || dynamic_array[ni.number - 1] != 543);
6503
6504   ;
6505   return 0;
6506 }
6507 _ACEOF
6508 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
6509 do
6510   CC="$ac_save_CC $ac_arg"
6511   if ac_fn_c_try_compile "$LINENO"; then :
6512   ac_cv_prog_cc_c99=$ac_arg
6513 fi
6514 rm -f core conftest.err conftest.$ac_objext
6515   test "x$ac_cv_prog_cc_c99" != "xno" && break
6516 done
6517 rm -f conftest.$ac_ext
6518 CC=$ac_save_CC
6519
6520 fi
6521 # AC_CACHE_VAL
6522 case "x$ac_cv_prog_cc_c99" in
6523   x)
6524     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6525 $as_echo "none needed" >&6; } ;;
6526   xno)
6527     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6528 $as_echo "unsupported" >&6; } ;;
6529   *)
6530     CC="$CC $ac_cv_prog_cc_c99"
6531     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6532 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6533 esac
6534 if test "x$ac_cv_prog_cc_c99" != xno; then :
6535
6536 fi
6537
6538
6539
6540         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports C99 structure initialization" >&5
6541 $as_echo_n "checking whether the compiler supports C99 structure initialization... " >&6; }
6542
6543
6544         ac_ext=c
6545 ac_cpp='$CPP $CPPFLAGS'
6546 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6547 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6548 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6549
6550
6551                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6552 /* end confdefs.h.  */
6553
6554                         struct foo_s {int i1; int i2;};
6555                         int main() { struct foo_s foo[] = { { .i1 = 1, .i2 = 1 }, { .i1 = 2, .i2 = 2 }, { .i1 = 0, .i2 = 0 } }; }
6556
6557 _ACEOF
6558 if ac_fn_c_try_compile "$LINENO"; then :
6559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6560 $as_echo "yes" >&6; }
6561 else
6562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6563 $as_echo "no" >&6; }
6564
6565 $as_echo "#define MISSING_C99_STRUCT_INIT 1" >>confdefs.h
6566
6567 fi
6568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6569
6570         ac_ext=c
6571 ac_cpp='$CPP $CPPFLAGS'
6572 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6573 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6574 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6575
6576
6577
6578
6579
6580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compile/link hardening flags" >&5
6581 $as_echo_n "checking for compile/link hardening flags... " >&6; }
6582
6583
6584 # Check whether --with-locfile was given.
6585 if test "${with_locfile+set}" = set; then :
6586   withval=$with_locfile;
6587 else
6588   with_locfile=no
6589
6590 fi
6591
6592
6593 (                                                                       \
6594     SENTINEL_DIR="$PWD" &&                                              \
6595     cd $srcdir/sntp &&                                                  \
6596     case "$with_locfile" in                                             \
6597      yes|no|'')                                                         \
6598         scripts/genHardFlags -d "$SENTINEL_DIR"                         \
6599         ;;                                                              \
6600      *)                                                                 \
6601         scripts/genHardFlags -d "$SENTINEL_DIR" -f "$with_locfile"      \
6602         ;;                                                              \
6603     esac                                                                \
6604 ) > genHardFlags.i 2> genHardFlags.err
6605 . ./genHardFlags.i
6606
6607 case "$GENHARDFLAG" in
6608  OK)
6609     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENHARDFLAGFILE" >&5
6610 $as_echo "in file $GENHARDFLAGFILE" >&6; }
6611     rm genHardFlags.err genHardFlags.i
6612     ;;
6613  *)
6614     { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
6615 $as_echo "failed." >&6; }
6616     as_fn_error $? "Problem with genHardFlags!" "$LINENO" 5
6617     ;;
6618 esac
6619
6620
6621
6622
6623
6624
6625
6626
6627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if we need ylwrap VPATH hack" >&5
6628 $as_echo_n "checking to see if we need ylwrap VPATH hack... " >&6; }
6629 ntp_vpath_hack="no"
6630 case "$srcdir::${force_ntp_vpath_hack-no}" in
6631  .::*)
6632     ;; # VPATH_HACK path is for VPATH builds only.
6633  *::yes)
6634     ntp_vpath_hack="yes"
6635     ;;
6636  *::*)
6637     case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
6638      '')
6639         ntp_vpath_hack="yes"
6640     esac
6641 esac
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_vpath_hack" >&5
6643 $as_echo "$ntp_vpath_hack" >&6; }
6644  if test x$ntp_vpath_hack = xyes; then
6645   VPATH_HACK_TRUE=
6646   VPATH_HACK_FALSE='#'
6647 else
6648   VPATH_HACK_TRUE='#'
6649   VPATH_HACK_FALSE=
6650 fi
6651
6652
6653
6654
6655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for install dir and man conventions" >&5
6656 $as_echo_n "checking for install dir and man conventions... " >&6; }
6657
6658
6659 # Check whether --with-locfile was given.
6660 if test "${with_locfile+set}" = set; then :
6661   withval=$with_locfile;
6662 else
6663   with_locfile=no
6664
6665 fi
6666
6667
6668 (                                                                       \
6669     SENTINEL_DIR="$PWD" &&                                              \
6670     cd $srcdir/sntp &&                                                  \
6671     case "$with_locfile" in                                             \
6672      yes|no|'')                                                         \
6673         scripts/genLocInfo -d "$SENTINEL_DIR"                           \
6674         ;;                                                              \
6675      *)                                                                 \
6676         scripts/genLocInfo -d "$SENTINEL_DIR" -f "$with_locfile"        \
6677         ;;                                                              \
6678     esac                                                                \
6679 ) > genLocInfo.i 2> genLocInfo.err
6680 . ./genLocInfo.i
6681
6682 case "$GENLOCINFO" in
6683  OK)
6684     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENLOCINFOFILE" >&5
6685 $as_echo "in file $GENLOCINFOFILE" >&6; }
6686     rm genLocInfo.err genLocInfo.i
6687     ;;
6688  *)
6689     { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
6690 $as_echo "failed." >&6; }
6691     as_fn_error $? "Problem with genLocInfo!" "$LINENO" 5
6692     ;;
6693 esac
6694
6695  if test "$CALC_TICKADJ_MS" ; then
6696   WANT_CALC_TICKADJ_MS_TRUE=
6697   WANT_CALC_TICKADJ_MS_FALSE='#'
6698 else
6699   WANT_CALC_TICKADJ_MS_TRUE='#'
6700   WANT_CALC_TICKADJ_MS_FALSE=
6701 fi
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745  if test -z "$NTPSWEEP_NI" ; then
6746   INSTALL_NTPSWEEP_TRUE=
6747   INSTALL_NTPSWEEP_FALSE='#'
6748 else
6749   INSTALL_NTPSWEEP_TRUE='#'
6750   INSTALL_NTPSWEEP_FALSE=
6751 fi
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793  if test -z "$UPDATE_LEAP_NI" ; then
6794   INSTALL_UPDATE_LEAP_TRUE=
6795   INSTALL_UPDATE_LEAP_FALSE='#'
6796 else
6797   INSTALL_UPDATE_LEAP_TRUE='#'
6798   INSTALL_UPDATE_LEAP_FALSE=
6799 fi
6800
6801
6802
6803 if test -n "$ac_tool_prefix"; then
6804   for ac_prog in ar lib "link -lib"
6805   do
6806     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6807 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6809 $as_echo_n "checking for $ac_word... " >&6; }
6810 if ${ac_cv_prog_AR+:} false; then :
6811   $as_echo_n "(cached) " >&6
6812 else
6813   if test -n "$AR"; then
6814   ac_cv_prog_AR="$AR" # Let the user override the test.
6815 else
6816 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6817 for as_dir in $PATH
6818 do
6819   IFS=$as_save_IFS
6820   test -z "$as_dir" && as_dir=.
6821     for ac_exec_ext in '' $ac_executable_extensions; do
6822   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6823     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
6824     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6825     break 2
6826   fi
6827 done
6828   done
6829 IFS=$as_save_IFS
6830
6831 fi
6832 fi
6833 AR=$ac_cv_prog_AR
6834 if test -n "$AR"; then
6835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6836 $as_echo "$AR" >&6; }
6837 else
6838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6839 $as_echo "no" >&6; }
6840 fi
6841
6842
6843     test -n "$AR" && break
6844   done
6845 fi
6846 if test -z "$AR"; then
6847   ac_ct_AR=$AR
6848   for ac_prog in ar lib "link -lib"
6849 do
6850   # Extract the first word of "$ac_prog", so it can be a program name with args.
6851 set dummy $ac_prog; ac_word=$2
6852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6853 $as_echo_n "checking for $ac_word... " >&6; }
6854 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6855   $as_echo_n "(cached) " >&6
6856 else
6857   if test -n "$ac_ct_AR"; then
6858   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6859 else
6860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6861 for as_dir in $PATH
6862 do
6863   IFS=$as_save_IFS
6864   test -z "$as_dir" && as_dir=.
6865     for ac_exec_ext in '' $ac_executable_extensions; do
6866   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6867     ac_cv_prog_ac_ct_AR="$ac_prog"
6868     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6869     break 2
6870   fi
6871 done
6872   done
6873 IFS=$as_save_IFS
6874
6875 fi
6876 fi
6877 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6878 if test -n "$ac_ct_AR"; then
6879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6880 $as_echo "$ac_ct_AR" >&6; }
6881 else
6882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6883 $as_echo "no" >&6; }
6884 fi
6885
6886
6887   test -n "$ac_ct_AR" && break
6888 done
6889
6890   if test "x$ac_ct_AR" = x; then
6891     AR="false"
6892   else
6893     case $cross_compiling:$ac_tool_warned in
6894 yes:)
6895 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6896 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6897 ac_tool_warned=yes ;;
6898 esac
6899     AR=$ac_ct_AR
6900   fi
6901 fi
6902
6903 : ${AR=ar}
6904
6905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
6906 $as_echo_n "checking the archiver ($AR) interface... " >&6; }
6907 if ${am_cv_ar_interface+:} false; then :
6908   $as_echo_n "(cached) " >&6
6909 else
6910   ac_ext=c
6911 ac_cpp='$CPP $CPPFLAGS'
6912 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6913 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6914 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6915
6916    am_cv_ar_interface=ar
6917    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6918 /* end confdefs.h.  */
6919 int some_variable = 0;
6920 _ACEOF
6921 if ac_fn_c_try_compile "$LINENO"; then :
6922   am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
6923       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6924   (eval $am_ar_try) 2>&5
6925   ac_status=$?
6926   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6927   test $ac_status = 0; }
6928       if test "$ac_status" -eq 0; then
6929         am_cv_ar_interface=ar
6930       else
6931         am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
6932         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6933   (eval $am_ar_try) 2>&5
6934   ac_status=$?
6935   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6936   test $ac_status = 0; }
6937         if test "$ac_status" -eq 0; then
6938           am_cv_ar_interface=lib
6939         else
6940           am_cv_ar_interface=unknown
6941         fi
6942       fi
6943       rm -f conftest.lib libconftest.a
6944
6945 fi
6946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6947    ac_ext=c
6948 ac_cpp='$CPP $CPPFLAGS'
6949 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6950 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6951 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6952
6953 fi
6954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
6955 $as_echo "$am_cv_ar_interface" >&6; }
6956
6957 case $am_cv_ar_interface in
6958 ar)
6959   ;;
6960 lib)
6961   # Microsoft lib, so override with the ar-lib wrapper script.
6962   # FIXME: It is wrong to rewrite AR.
6963   # But if we don't then we get into trouble of one sort or another.
6964   # A longer-term fix would be to have automake use am__AR in this case,
6965   # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
6966   # similar.
6967   AR="$am_aux_dir/ar-lib $AR"
6968   ;;
6969 unknown)
6970   as_fn_error $? "could not determine $AR interface" "$LINENO" 5
6971   ;;
6972 esac
6973
6974
6975
6976 # So far, the only shared library we might use is libopts.
6977 # It's a small library - we might as well use a static version of it.
6978 # Check whether --enable-shared was given.
6979 if test "${enable_shared+set}" = set; then :
6980   enableval=$enable_shared; p=${PACKAGE-default}
6981     case $enableval in
6982     yes) enable_shared=yes ;;
6983     no) enable_shared=no ;;
6984     *)
6985       enable_shared=no
6986       # Look at the argument we got.  We use all the common list separators.
6987       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
6988       for pkg in $enableval; do
6989         IFS=$lt_save_ifs
6990         if test "X$pkg" = "X$p"; then
6991           enable_shared=yes
6992         fi
6993       done
6994       IFS=$lt_save_ifs
6995       ;;
6996     esac
6997 else
6998   enable_shared=no
6999 fi
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009 case `pwd` in
7010   *\ * | *\     *)
7011     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
7012 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
7013 esac
7014
7015
7016
7017 macro_version='2.4.6'
7018 macro_revision='2.4.6'
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032 ltmain=$ac_aux_dir/ltmain.sh
7033
7034 # Backslashify metacharacters that are still active within
7035 # double-quoted strings.
7036 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
7037
7038 # Same as above, but do not quote variable references.
7039 double_quote_subst='s/\(["`\\]\)/\\\1/g'
7040
7041 # Sed substitution to delay expansion of an escaped shell variable in a
7042 # double_quote_subst'ed string.
7043 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7044
7045 # Sed substitution to delay expansion of an escaped single quote.
7046 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7047
7048 # Sed substitution to avoid accidental globbing in evaled expressions
7049 no_glob_subst='s/\*/\\\*/g'
7050
7051 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7052 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7053 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7054
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7056 $as_echo_n "checking how to print strings... " >&6; }
7057 # Test print first, because it will be a builtin if present.
7058 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7059    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7060   ECHO='print -r --'
7061 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7062   ECHO='printf %s\n'
7063 else
7064   # Use this function as a fallback that always works.
7065   func_fallback_echo ()
7066   {
7067     eval 'cat <<_LTECHO_EOF
7068 $1
7069 _LTECHO_EOF'
7070   }
7071   ECHO='func_fallback_echo'
7072 fi
7073
7074 # func_echo_all arg...
7075 # Invoke $ECHO with all args, space-separated.
7076 func_echo_all ()
7077 {
7078     $ECHO ""
7079 }
7080
7081 case $ECHO in
7082   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
7083 $as_echo "printf" >&6; } ;;
7084   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
7085 $as_echo "print -r" >&6; } ;;
7086   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
7087 $as_echo "cat" >&6; } ;;
7088 esac
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7104 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
7105 if ${ac_cv_path_SED+:} false; then :
7106   $as_echo_n "(cached) " >&6
7107 else
7108             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7109      for ac_i in 1 2 3 4 5 6 7; do
7110        ac_script="$ac_script$as_nl$ac_script"
7111      done
7112      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7113      { ac_script=; unset ac_script;}
7114      if test -z "$SED"; then
7115   ac_path_SED_found=false
7116   # Loop through the user's path and test for each of PROGNAME-LIST
7117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7118 for as_dir in $PATH
7119 do
7120   IFS=$as_save_IFS
7121   test -z "$as_dir" && as_dir=.
7122     for ac_prog in sed gsed; do
7123     for ac_exec_ext in '' $ac_executable_extensions; do
7124       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7125       as_fn_executable_p "$ac_path_SED" || continue
7126 # Check for GNU ac_path_SED and select it if it is found.
7127   # Check for GNU $ac_path_SED
7128 case `"$ac_path_SED" --version 2>&1` in
7129 *GNU*)
7130   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7131 *)
7132   ac_count=0
7133   $as_echo_n 0123456789 >"conftest.in"
7134   while :
7135   do
7136     cat "conftest.in" "conftest.in" >"conftest.tmp"
7137     mv "conftest.tmp" "conftest.in"
7138     cp "conftest.in" "conftest.nl"
7139     $as_echo '' >> "conftest.nl"
7140     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7141     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7142     as_fn_arith $ac_count + 1 && ac_count=$as_val
7143     if test $ac_count -gt ${ac_path_SED_max-0}; then
7144       # Best one so far, save it but keep looking for a better one
7145       ac_cv_path_SED="$ac_path_SED"
7146       ac_path_SED_max=$ac_count
7147     fi
7148     # 10*(2^10) chars as input seems more than enough
7149     test $ac_count -gt 10 && break
7150   done
7151   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7152 esac
7153
7154       $ac_path_SED_found && break 3
7155     done
7156   done
7157   done
7158 IFS=$as_save_IFS
7159   if test -z "$ac_cv_path_SED"; then
7160     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7161   fi
7162 else
7163   ac_cv_path_SED=$SED
7164 fi
7165
7166 fi
7167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7168 $as_echo "$ac_cv_path_SED" >&6; }
7169  SED="$ac_cv_path_SED"
7170   rm -f conftest.sed
7171
7172 test -z "$SED" && SED=sed
7173 Xsed="$SED -e 1s/^X//"
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7186 $as_echo_n "checking for fgrep... " >&6; }
7187 if ${ac_cv_path_FGREP+:} false; then :
7188   $as_echo_n "(cached) " >&6
7189 else
7190   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7191    then ac_cv_path_FGREP="$GREP -F"
7192    else
7193      if test -z "$FGREP"; then
7194   ac_path_FGREP_found=false
7195   # Loop through the user's path and test for each of PROGNAME-LIST
7196   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7197 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7198 do
7199   IFS=$as_save_IFS
7200   test -z "$as_dir" && as_dir=.
7201     for ac_prog in fgrep; do
7202     for ac_exec_ext in '' $ac_executable_extensions; do
7203       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
7204       as_fn_executable_p "$ac_path_FGREP" || continue
7205 # Check for GNU ac_path_FGREP and select it if it is found.
7206   # Check for GNU $ac_path_FGREP
7207 case `"$ac_path_FGREP" --version 2>&1` in
7208 *GNU*)
7209   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7210 *)
7211   ac_count=0
7212   $as_echo_n 0123456789 >"conftest.in"
7213   while :
7214   do
7215     cat "conftest.in" "conftest.in" >"conftest.tmp"
7216     mv "conftest.tmp" "conftest.in"
7217     cp "conftest.in" "conftest.nl"
7218     $as_echo 'FGREP' >> "conftest.nl"
7219     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7220     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7221     as_fn_arith $ac_count + 1 && ac_count=$as_val
7222     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7223       # Best one so far, save it but keep looking for a better one
7224       ac_cv_path_FGREP="$ac_path_FGREP"
7225       ac_path_FGREP_max=$ac_count
7226     fi
7227     # 10*(2^10) chars as input seems more than enough
7228     test $ac_count -gt 10 && break
7229   done
7230   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7231 esac
7232
7233       $ac_path_FGREP_found && break 3
7234     done
7235   done
7236   done
7237 IFS=$as_save_IFS
7238   if test -z "$ac_cv_path_FGREP"; then
7239     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7240   fi
7241 else
7242   ac_cv_path_FGREP=$FGREP
7243 fi
7244
7245    fi
7246 fi
7247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7248 $as_echo "$ac_cv_path_FGREP" >&6; }
7249  FGREP="$ac_cv_path_FGREP"
7250
7251
7252 test -z "$GREP" && GREP=grep
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272 # Check whether --with-gnu-ld was given.
7273 if test "${with_gnu_ld+set}" = set; then :
7274   withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7275 else
7276   with_gnu_ld=no
7277 fi
7278
7279 ac_prog=ld
7280 if test yes = "$GCC"; then
7281   # Check if gcc -print-prog-name=ld gives a path.
7282   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7283 $as_echo_n "checking for ld used by $CC... " >&6; }
7284   case $host in
7285   *-*-mingw*)
7286     # gcc leaves a trailing carriage return, which upsets mingw
7287     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7288   *)
7289     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7290   esac
7291   case $ac_prog in
7292     # Accept absolute paths.
7293     [\\/]* | ?:[\\/]*)
7294       re_direlt='/[^/][^/]*/\.\./'
7295       # Canonicalize the pathname of ld
7296       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7297       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7298         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7299       done
7300       test -z "$LD" && LD=$ac_prog
7301       ;;
7302   "")
7303     # If it fails, then pretend we aren't using GCC.
7304     ac_prog=ld
7305     ;;
7306   *)
7307     # If it is relative, then search for the first ld in PATH.
7308     with_gnu_ld=unknown
7309     ;;
7310   esac
7311 elif test yes = "$with_gnu_ld"; then
7312   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7313 $as_echo_n "checking for GNU ld... " >&6; }
7314 else
7315   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7316 $as_echo_n "checking for non-GNU ld... " >&6; }
7317 fi
7318 if ${lt_cv_path_LD+:} false; then :
7319   $as_echo_n "(cached) " >&6
7320 else
7321   if test -z "$LD"; then
7322   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7323   for ac_dir in $PATH; do
7324     IFS=$lt_save_ifs
7325     test -z "$ac_dir" && ac_dir=.
7326     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7327       lt_cv_path_LD=$ac_dir/$ac_prog
7328       # Check to see if the program is GNU ld.  I'd rather use --version,
7329       # but apparently some variants of GNU ld only accept -v.
7330       # Break only if it was the GNU/non-GNU ld that we prefer.
7331       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7332       *GNU* | *'with BFD'*)
7333         test no != "$with_gnu_ld" && break
7334         ;;
7335       *)
7336         test yes != "$with_gnu_ld" && break
7337         ;;
7338       esac
7339     fi
7340   done
7341   IFS=$lt_save_ifs
7342 else
7343   lt_cv_path_LD=$LD # Let the user override the test with a path.
7344 fi
7345 fi
7346
7347 LD=$lt_cv_path_LD
7348 if test -n "$LD"; then
7349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7350 $as_echo "$LD" >&6; }
7351 else
7352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7353 $as_echo "no" >&6; }
7354 fi
7355 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7357 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7358 if ${lt_cv_prog_gnu_ld+:} false; then :
7359   $as_echo_n "(cached) " >&6
7360 else
7361   # I'd rather use --version here, but apparently some GNU lds only accept -v.
7362 case `$LD -v 2>&1 </dev/null` in
7363 *GNU* | *'with BFD'*)
7364   lt_cv_prog_gnu_ld=yes
7365   ;;
7366 *)
7367   lt_cv_prog_gnu_ld=no
7368   ;;
7369 esac
7370 fi
7371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7372 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
7373 with_gnu_ld=$lt_cv_prog_gnu_ld
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7384 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7385 if ${lt_cv_path_NM+:} false; then :
7386   $as_echo_n "(cached) " >&6
7387 else
7388   if test -n "$NM"; then
7389   # Let the user override the test.
7390   lt_cv_path_NM=$NM
7391 else
7392   lt_nm_to_check=${ac_tool_prefix}nm
7393   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7394     lt_nm_to_check="$lt_nm_to_check nm"
7395   fi
7396   for lt_tmp_nm in $lt_nm_to_check; do
7397     lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7398     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7399       IFS=$lt_save_ifs
7400       test -z "$ac_dir" && ac_dir=.
7401       tmp_nm=$ac_dir/$lt_tmp_nm
7402       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7403         # Check to see if the nm accepts a BSD-compat flag.
7404         # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7405         #   nm: unknown option "B" ignored
7406         # Tru64's nm complains that /dev/null is an invalid object file
7407         # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7408         case $build_os in
7409         mingw*) lt_bad_file=conftest.nm/nofile ;;
7410         *) lt_bad_file=/dev/null ;;
7411         esac
7412         case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7413         *$lt_bad_file* | *'Invalid file or object type'*)
7414           lt_cv_path_NM="$tmp_nm -B"
7415           break 2
7416           ;;
7417         *)
7418           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7419           */dev/null*)
7420             lt_cv_path_NM="$tmp_nm -p"
7421             break 2
7422             ;;
7423           *)
7424             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7425             continue # so that we can try to find one that supports BSD flags
7426             ;;
7427           esac
7428           ;;
7429         esac
7430       fi
7431     done
7432     IFS=$lt_save_ifs
7433   done
7434   : ${lt_cv_path_NM=no}
7435 fi
7436 fi
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7438 $as_echo "$lt_cv_path_NM" >&6; }
7439 if test no != "$lt_cv_path_NM"; then
7440   NM=$lt_cv_path_NM
7441 else
7442   # Didn't find any BSD compatible name lister, look for dumpbin.
7443   if test -n "$DUMPBIN"; then :
7444     # Let the user override the test.
7445   else
7446     if test -n "$ac_tool_prefix"; then
7447   for ac_prog in dumpbin "link -dump"
7448   do
7449     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7450 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7452 $as_echo_n "checking for $ac_word... " >&6; }
7453 if ${ac_cv_prog_DUMPBIN+:} false; then :
7454   $as_echo_n "(cached) " >&6
7455 else
7456   if test -n "$DUMPBIN"; then
7457   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7458 else
7459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7460 for as_dir in $PATH
7461 do
7462   IFS=$as_save_IFS
7463   test -z "$as_dir" && as_dir=.
7464     for ac_exec_ext in '' $ac_executable_extensions; do
7465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7466     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7468     break 2
7469   fi
7470 done
7471   done
7472 IFS=$as_save_IFS
7473
7474 fi
7475 fi
7476 DUMPBIN=$ac_cv_prog_DUMPBIN
7477 if test -n "$DUMPBIN"; then
7478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7479 $as_echo "$DUMPBIN" >&6; }
7480 else
7481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7482 $as_echo "no" >&6; }
7483 fi
7484
7485
7486     test -n "$DUMPBIN" && break
7487   done
7488 fi
7489 if test -z "$DUMPBIN"; then
7490   ac_ct_DUMPBIN=$DUMPBIN
7491   for ac_prog in dumpbin "link -dump"
7492 do
7493   # Extract the first word of "$ac_prog", so it can be a program name with args.
7494 set dummy $ac_prog; ac_word=$2
7495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7496 $as_echo_n "checking for $ac_word... " >&6; }
7497 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7498   $as_echo_n "(cached) " >&6
7499 else
7500   if test -n "$ac_ct_DUMPBIN"; then
7501   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7502 else
7503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7504 for as_dir in $PATH
7505 do
7506   IFS=$as_save_IFS
7507   test -z "$as_dir" && as_dir=.
7508     for ac_exec_ext in '' $ac_executable_extensions; do
7509   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7510     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7511     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7512     break 2
7513   fi
7514 done
7515   done
7516 IFS=$as_save_IFS
7517
7518 fi
7519 fi
7520 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7521 if test -n "$ac_ct_DUMPBIN"; then
7522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7523 $as_echo "$ac_ct_DUMPBIN" >&6; }
7524 else
7525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7526 $as_echo "no" >&6; }
7527 fi
7528
7529
7530   test -n "$ac_ct_DUMPBIN" && break
7531 done
7532
7533   if test "x$ac_ct_DUMPBIN" = x; then
7534     DUMPBIN=":"
7535   else
7536     case $cross_compiling:$ac_tool_warned in
7537 yes:)
7538 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7539 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7540 ac_tool_warned=yes ;;
7541 esac
7542     DUMPBIN=$ac_ct_DUMPBIN
7543   fi
7544 fi
7545
7546     case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7547     *COFF*)
7548       DUMPBIN="$DUMPBIN -symbols -headers"
7549       ;;
7550     *)
7551       DUMPBIN=:
7552       ;;
7553     esac
7554   fi
7555
7556   if test : != "$DUMPBIN"; then
7557     NM=$DUMPBIN
7558   fi
7559 fi
7560 test -z "$NM" && NM=nm
7561
7562
7563
7564
7565
7566
7567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7568 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
7569 if ${lt_cv_nm_interface+:} false; then :
7570   $as_echo_n "(cached) " >&6
7571 else
7572   lt_cv_nm_interface="BSD nm"
7573   echo "int some_variable = 0;" > conftest.$ac_ext
7574   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7575   (eval "$ac_compile" 2>conftest.err)
7576   cat conftest.err >&5
7577   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7578   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7579   cat conftest.err >&5
7580   (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7581   cat conftest.out >&5
7582   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7583     lt_cv_nm_interface="MS dumpbin"
7584   fi
7585   rm -f conftest*
7586 fi
7587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7588 $as_echo "$lt_cv_nm_interface" >&6; }
7589
7590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7591 $as_echo_n "checking whether ln -s works... " >&6; }
7592 LN_S=$as_ln_s
7593 if test "$LN_S" = "ln -s"; then
7594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7595 $as_echo "yes" >&6; }
7596 else
7597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7598 $as_echo "no, using $LN_S" >&6; }
7599 fi
7600
7601 # find the maximum length of command line arguments
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7603 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7604 if ${lt_cv_sys_max_cmd_len+:} false; then :
7605   $as_echo_n "(cached) " >&6
7606 else
7607     i=0
7608   teststring=ABCD
7609
7610   case $build_os in
7611   msdosdjgpp*)
7612     # On DJGPP, this test can blow up pretty badly due to problems in libc
7613     # (any single argument exceeding 2000 bytes causes a buffer overrun
7614     # during glob expansion).  Even if it were fixed, the result of this
7615     # check would be larger than it should be.
7616     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7617     ;;
7618
7619   gnu*)
7620     # Under GNU Hurd, this test is not required because there is
7621     # no limit to the length of command line arguments.
7622     # Libtool will interpret -1 as no limit whatsoever
7623     lt_cv_sys_max_cmd_len=-1;
7624     ;;
7625
7626   cygwin* | mingw* | cegcc*)
7627     # On Win9x/ME, this test blows up -- it succeeds, but takes
7628     # about 5 minutes as the teststring grows exponentially.
7629     # Worse, since 9x/ME are not pre-emptively multitasking,
7630     # you end up with a "frozen" computer, even though with patience
7631     # the test eventually succeeds (with a max line length of 256k).
7632     # Instead, let's just punt: use the minimum linelength reported by
7633     # all of the supported platforms: 8192 (on NT/2K/XP).
7634     lt_cv_sys_max_cmd_len=8192;
7635     ;;
7636
7637   mint*)
7638     # On MiNT this can take a long time and run out of memory.
7639     lt_cv_sys_max_cmd_len=8192;
7640     ;;
7641
7642   amigaos*)
7643     # On AmigaOS with pdksh, this test takes hours, literally.
7644     # So we just punt and use a minimum line length of 8192.
7645     lt_cv_sys_max_cmd_len=8192;
7646     ;;
7647
7648   bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7649     # This has been around since 386BSD, at least.  Likely further.
7650     if test -x /sbin/sysctl; then
7651       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7652     elif test -x /usr/sbin/sysctl; then
7653       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7654     else
7655       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7656     fi
7657     # And add a safety zone
7658     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7659     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7660     ;;
7661
7662   interix*)
7663     # We know the value 262144 and hardcode it with a safety zone (like BSD)
7664     lt_cv_sys_max_cmd_len=196608
7665     ;;
7666
7667   os2*)
7668     # The test takes a long time on OS/2.
7669     lt_cv_sys_max_cmd_len=8192
7670     ;;
7671
7672   osf*)
7673     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7674     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7675     # nice to cause kernel panics so lets avoid the loop below.
7676     # First set a reasonable default.
7677     lt_cv_sys_max_cmd_len=16384
7678     #
7679     if test -x /sbin/sysconfig; then
7680       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7681         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7682       esac
7683     fi
7684     ;;
7685   sco3.2v5*)
7686     lt_cv_sys_max_cmd_len=102400
7687     ;;
7688   sysv5* | sco5v6* | sysv4.2uw2*)
7689     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7690     if test -n "$kargmax"; then
7691       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
7692     else
7693       lt_cv_sys_max_cmd_len=32768
7694     fi
7695     ;;
7696   *)
7697     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7698     if test -n "$lt_cv_sys_max_cmd_len" && \
7699        test undefined != "$lt_cv_sys_max_cmd_len"; then
7700       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7701       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7702     else
7703       # Make teststring a little bigger before we do anything with it.
7704       # a 1K string should be a reasonable start.
7705       for i in 1 2 3 4 5 6 7 8; do
7706         teststring=$teststring$teststring
7707       done
7708       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7709       # If test is not a shell built-in, we'll probably end up computing a
7710       # maximum length that is only half of the actual maximum length, but
7711       # we can't tell.
7712       while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7713                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7714               test 17 != "$i" # 1/2 MB should be enough
7715       do
7716         i=`expr $i + 1`
7717         teststring=$teststring$teststring
7718       done
7719       # Only check the string length outside the loop.
7720       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7721       teststring=
7722       # Add a significant safety factor because C++ compilers can tack on
7723       # massive amounts of additional arguments before passing them to the
7724       # linker.  It appears as though 1/2 is a usable value.
7725       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7726     fi
7727     ;;
7728   esac
7729
7730 fi
7731
7732 if test -n "$lt_cv_sys_max_cmd_len"; then
7733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7734 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7735 else
7736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7737 $as_echo "none" >&6; }
7738 fi
7739 max_cmd_len=$lt_cv_sys_max_cmd_len
7740
7741
7742
7743
7744
7745
7746 : ${CP="cp -f"}
7747 : ${MV="mv -f"}
7748 : ${RM="rm -f"}
7749
7750 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7751   lt_unset=unset
7752 else
7753   lt_unset=false
7754 fi
7755
7756
7757
7758
7759
7760 # test EBCDIC or ASCII
7761 case `echo X|tr X '\101'` in
7762  A) # ASCII based system
7763     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7764   lt_SP2NL='tr \040 \012'
7765   lt_NL2SP='tr \015\012 \040\040'
7766   ;;
7767  *) # EBCDIC based system
7768   lt_SP2NL='tr \100 \n'
7769   lt_NL2SP='tr \r\n \100\100'
7770   ;;
7771 esac
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7782 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7783 if ${lt_cv_to_host_file_cmd+:} false; then :
7784   $as_echo_n "(cached) " >&6
7785 else
7786   case $host in
7787   *-*-mingw* )
7788     case $build in
7789       *-*-mingw* ) # actually msys
7790         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7791         ;;
7792       *-*-cygwin* )
7793         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7794         ;;
7795       * ) # otherwise, assume *nix
7796         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7797         ;;
7798     esac
7799     ;;
7800   *-*-cygwin* )
7801     case $build in
7802       *-*-mingw* ) # actually msys
7803         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7804         ;;
7805       *-*-cygwin* )
7806         lt_cv_to_host_file_cmd=func_convert_file_noop
7807         ;;
7808       * ) # otherwise, assume *nix
7809         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7810         ;;
7811     esac
7812     ;;
7813   * ) # unhandled hosts (and "normal" native builds)
7814     lt_cv_to_host_file_cmd=func_convert_file_noop
7815     ;;
7816 esac
7817
7818 fi
7819
7820 to_host_file_cmd=$lt_cv_to_host_file_cmd
7821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7822 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
7823
7824
7825
7826
7827
7828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7829 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7830 if ${lt_cv_to_tool_file_cmd+:} false; then :
7831   $as_echo_n "(cached) " >&6
7832 else
7833   #assume ordinary cross tools, or native build.
7834 lt_cv_to_tool_file_cmd=func_convert_file_noop
7835 case $host in
7836   *-*-mingw* )
7837     case $build in
7838       *-*-mingw* ) # actually msys
7839         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7840         ;;
7841     esac
7842     ;;
7843 esac
7844
7845 fi
7846
7847 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7849 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7850
7851
7852
7853
7854
7855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7856 $as_echo_n "checking for $LD option to reload object files... " >&6; }
7857 if ${lt_cv_ld_reload_flag+:} false; then :
7858   $as_echo_n "(cached) " >&6
7859 else
7860   lt_cv_ld_reload_flag='-r'
7861 fi
7862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7863 $as_echo "$lt_cv_ld_reload_flag" >&6; }
7864 reload_flag=$lt_cv_ld_reload_flag
7865 case $reload_flag in
7866 "" | " "*) ;;
7867 *) reload_flag=" $reload_flag" ;;
7868 esac
7869 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7870 case $host_os in
7871   cygwin* | mingw* | pw32* | cegcc*)
7872     if test yes != "$GCC"; then
7873       reload_cmds=false
7874     fi
7875     ;;
7876   darwin*)
7877     if test yes = "$GCC"; then
7878       reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7879     else
7880       reload_cmds='$LD$reload_flag -o $output$reload_objs'
7881     fi
7882     ;;
7883 esac
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893 if test -n "$ac_tool_prefix"; then
7894   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7895 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7897 $as_echo_n "checking for $ac_word... " >&6; }
7898 if ${ac_cv_prog_OBJDUMP+:} false; then :
7899   $as_echo_n "(cached) " >&6
7900 else
7901   if test -n "$OBJDUMP"; then
7902   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7903 else
7904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7905 for as_dir in $PATH
7906 do
7907   IFS=$as_save_IFS
7908   test -z "$as_dir" && as_dir=.
7909     for ac_exec_ext in '' $ac_executable_extensions; do
7910   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7911     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7912     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7913     break 2
7914   fi
7915 done
7916   done
7917 IFS=$as_save_IFS
7918
7919 fi
7920 fi
7921 OBJDUMP=$ac_cv_prog_OBJDUMP
7922 if test -n "$OBJDUMP"; then
7923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7924 $as_echo "$OBJDUMP" >&6; }
7925 else
7926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7927 $as_echo "no" >&6; }
7928 fi
7929
7930
7931 fi
7932 if test -z "$ac_cv_prog_OBJDUMP"; then
7933   ac_ct_OBJDUMP=$OBJDUMP
7934   # Extract the first word of "objdump", so it can be a program name with args.
7935 set dummy objdump; ac_word=$2
7936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7937 $as_echo_n "checking for $ac_word... " >&6; }
7938 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7939   $as_echo_n "(cached) " >&6
7940 else
7941   if test -n "$ac_ct_OBJDUMP"; then
7942   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7943 else
7944 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7945 for as_dir in $PATH
7946 do
7947   IFS=$as_save_IFS
7948   test -z "$as_dir" && as_dir=.
7949     for ac_exec_ext in '' $ac_executable_extensions; do
7950   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7951     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7952     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7953     break 2
7954   fi
7955 done
7956   done
7957 IFS=$as_save_IFS
7958
7959 fi
7960 fi
7961 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7962 if test -n "$ac_ct_OBJDUMP"; then
7963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7964 $as_echo "$ac_ct_OBJDUMP" >&6; }
7965 else
7966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7967 $as_echo "no" >&6; }
7968 fi
7969
7970   if test "x$ac_ct_OBJDUMP" = x; then
7971     OBJDUMP="false"
7972   else
7973     case $cross_compiling:$ac_tool_warned in
7974 yes:)
7975 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7976 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7977 ac_tool_warned=yes ;;
7978 esac
7979     OBJDUMP=$ac_ct_OBJDUMP
7980   fi
7981 else
7982   OBJDUMP="$ac_cv_prog_OBJDUMP"
7983 fi
7984
7985 test -z "$OBJDUMP" && OBJDUMP=objdump
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7996 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
7997 if ${lt_cv_deplibs_check_method+:} false; then :
7998   $as_echo_n "(cached) " >&6
7999 else
8000   lt_cv_file_magic_cmd='$MAGIC_CMD'
8001 lt_cv_file_magic_test_file=
8002 lt_cv_deplibs_check_method='unknown'
8003 # Need to set the preceding variable on all platforms that support
8004 # interlibrary dependencies.
8005 # 'none' -- dependencies not supported.
8006 # 'unknown' -- same as none, but documents that we really don't know.
8007 # 'pass_all' -- all dependencies passed with no checks.
8008 # 'test_compile' -- check by making test program.
8009 # 'file_magic [[regex]]' -- check by looking for files in library path
8010 # that responds to the $file_magic_cmd with a given extended regex.
8011 # If you have 'file' or equivalent on your system and you're not sure
8012 # whether 'pass_all' will *always* work, you probably want this one.
8013
8014 case $host_os in
8015 aix[4-9]*)
8016   lt_cv_deplibs_check_method=pass_all
8017   ;;
8018
8019 beos*)
8020   lt_cv_deplibs_check_method=pass_all
8021   ;;
8022
8023 bsdi[45]*)
8024   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
8025   lt_cv_file_magic_cmd='/usr/bin/file -L'
8026   lt_cv_file_magic_test_file=/shlib/libc.so
8027   ;;
8028
8029 cygwin*)
8030   # func_win32_libid is a shell function defined in ltmain.sh
8031   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8032   lt_cv_file_magic_cmd='func_win32_libid'
8033   ;;
8034
8035 mingw* | pw32*)
8036   # Base MSYS/MinGW do not provide the 'file' command needed by
8037   # func_win32_libid shell function, so use a weaker test based on 'objdump',
8038   # unless we find 'file', for example because we are cross-compiling.
8039   if ( file / ) >/dev/null 2>&1; then
8040     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8041     lt_cv_file_magic_cmd='func_win32_libid'
8042   else
8043     # Keep this pattern in sync with the one in func_win32_libid.
8044     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
8045     lt_cv_file_magic_cmd='$OBJDUMP -f'
8046   fi
8047   ;;
8048
8049 cegcc*)
8050   # use the weaker test based on 'objdump'. See mingw*.
8051   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
8052   lt_cv_file_magic_cmd='$OBJDUMP -f'
8053   ;;
8054
8055 darwin* | rhapsody*)
8056   lt_cv_deplibs_check_method=pass_all
8057   ;;
8058
8059 freebsd* | dragonfly*)
8060   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8061     case $host_cpu in
8062     i*86 )
8063       # Not sure whether the presence of OpenBSD here was a mistake.
8064       # Let's accept both of them until this is cleared up.
8065       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
8066       lt_cv_file_magic_cmd=/usr/bin/file
8067       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8068       ;;
8069     esac
8070   else
8071     lt_cv_deplibs_check_method=pass_all
8072   fi
8073   ;;
8074
8075 haiku*)
8076   lt_cv_deplibs_check_method=pass_all
8077   ;;
8078
8079 hpux10.20* | hpux11*)
8080   lt_cv_file_magic_cmd=/usr/bin/file
8081   case $host_cpu in
8082   ia64*)
8083     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
8084     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8085     ;;
8086   hppa*64*)
8087     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]'
8088     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8089     ;;
8090   *)
8091     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
8092     lt_cv_file_magic_test_file=/usr/lib/libc.sl
8093     ;;
8094   esac
8095   ;;
8096
8097 interix[3-9]*)
8098   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8099   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
8100   ;;
8101
8102 irix5* | irix6* | nonstopux*)
8103   case $LD in
8104   *-32|*"-32 ") libmagic=32-bit;;
8105   *-n32|*"-n32 ") libmagic=N32;;
8106   *-64|*"-64 ") libmagic=64-bit;;
8107   *) libmagic=never-match;;
8108   esac
8109   lt_cv_deplibs_check_method=pass_all
8110   ;;
8111
8112 # This must be glibc/ELF.
8113 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8114   lt_cv_deplibs_check_method=pass_all
8115   ;;
8116
8117 netbsd*)
8118   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8119     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8120   else
8121     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
8122   fi
8123   ;;
8124
8125 newos6*)
8126   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
8127   lt_cv_file_magic_cmd=/usr/bin/file
8128   lt_cv_file_magic_test_file=/usr/lib/libnls.so
8129   ;;
8130
8131 *nto* | *qnx*)
8132   lt_cv_deplibs_check_method=pass_all
8133   ;;
8134
8135 openbsd* | bitrig*)
8136   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
8137     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
8138   else
8139     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8140   fi
8141   ;;
8142
8143 osf3* | osf4* | osf5*)
8144   lt_cv_deplibs_check_method=pass_all
8145   ;;
8146
8147 rdos*)
8148   lt_cv_deplibs_check_method=pass_all
8149   ;;
8150
8151 solaris*)
8152   lt_cv_deplibs_check_method=pass_all
8153   ;;
8154
8155 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8156   lt_cv_deplibs_check_method=pass_all
8157   ;;
8158
8159 sysv4 | sysv4.3*)
8160   case $host_vendor in
8161   motorola)
8162     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]'
8163     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8164     ;;
8165   ncr)
8166     lt_cv_deplibs_check_method=pass_all
8167     ;;
8168   sequent)
8169     lt_cv_file_magic_cmd='/bin/file'
8170     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
8171     ;;
8172   sni)
8173     lt_cv_file_magic_cmd='/bin/file'
8174     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
8175     lt_cv_file_magic_test_file=/lib/libc.so
8176     ;;
8177   siemens)
8178     lt_cv_deplibs_check_method=pass_all
8179     ;;
8180   pc)
8181     lt_cv_deplibs_check_method=pass_all
8182     ;;
8183   esac
8184   ;;
8185
8186 tpf*)
8187   lt_cv_deplibs_check_method=pass_all
8188   ;;
8189 os2*)
8190   lt_cv_deplibs_check_method=pass_all
8191   ;;
8192 esac
8193
8194 fi
8195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
8196 $as_echo "$lt_cv_deplibs_check_method" >&6; }
8197
8198 file_magic_glob=
8199 want_nocaseglob=no
8200 if test "$build" = "$host"; then
8201   case $host_os in
8202   mingw* | pw32*)
8203     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
8204       want_nocaseglob=yes
8205     else
8206       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
8207     fi
8208     ;;
8209   esac
8210 fi
8211
8212 file_magic_cmd=$lt_cv_file_magic_cmd
8213 deplibs_check_method=$lt_cv_deplibs_check_method
8214 test -z "$deplibs_check_method" && deplibs_check_method=unknown
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237 if test -n "$ac_tool_prefix"; then
8238   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8239 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8241 $as_echo_n "checking for $ac_word... " >&6; }
8242 if ${ac_cv_prog_DLLTOOL+:} false; then :
8243   $as_echo_n "(cached) " >&6
8244 else
8245   if test -n "$DLLTOOL"; then
8246   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8247 else
8248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8249 for as_dir in $PATH
8250 do
8251   IFS=$as_save_IFS
8252   test -z "$as_dir" && as_dir=.
8253     for ac_exec_ext in '' $ac_executable_extensions; do
8254   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8255     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8257     break 2
8258   fi
8259 done
8260   done
8261 IFS=$as_save_IFS
8262
8263 fi
8264 fi
8265 DLLTOOL=$ac_cv_prog_DLLTOOL
8266 if test -n "$DLLTOOL"; then
8267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8268 $as_echo "$DLLTOOL" >&6; }
8269 else
8270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8271 $as_echo "no" >&6; }
8272 fi
8273
8274
8275 fi
8276 if test -z "$ac_cv_prog_DLLTOOL"; then
8277   ac_ct_DLLTOOL=$DLLTOOL
8278   # Extract the first word of "dlltool", so it can be a program name with args.
8279 set dummy dlltool; ac_word=$2
8280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8281 $as_echo_n "checking for $ac_word... " >&6; }
8282 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8283   $as_echo_n "(cached) " >&6
8284 else
8285   if test -n "$ac_ct_DLLTOOL"; then
8286   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8287 else
8288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8289 for as_dir in $PATH
8290 do
8291   IFS=$as_save_IFS
8292   test -z "$as_dir" && as_dir=.
8293     for ac_exec_ext in '' $ac_executable_extensions; do
8294   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8295     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8297     break 2
8298   fi
8299 done
8300   done
8301 IFS=$as_save_IFS
8302
8303 fi
8304 fi
8305 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8306 if test -n "$ac_ct_DLLTOOL"; then
8307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8308 $as_echo "$ac_ct_DLLTOOL" >&6; }
8309 else
8310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8311 $as_echo "no" >&6; }
8312 fi
8313
8314   if test "x$ac_ct_DLLTOOL" = x; then
8315     DLLTOOL="false"
8316   else
8317     case $cross_compiling:$ac_tool_warned in
8318 yes:)
8319 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8320 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8321 ac_tool_warned=yes ;;
8322 esac
8323     DLLTOOL=$ac_ct_DLLTOOL
8324   fi
8325 else
8326   DLLTOOL="$ac_cv_prog_DLLTOOL"
8327 fi
8328
8329 test -z "$DLLTOOL" && DLLTOOL=dlltool
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8341 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8342 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8343   $as_echo_n "(cached) " >&6
8344 else
8345   lt_cv_sharedlib_from_linklib_cmd='unknown'
8346
8347 case $host_os in
8348 cygwin* | mingw* | pw32* | cegcc*)
8349   # two different shell functions defined in ltmain.sh;
8350   # decide which one to use based on capabilities of $DLLTOOL
8351   case `$DLLTOOL --help 2>&1` in
8352   *--identify-strict*)
8353     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8354     ;;
8355   *)
8356     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8357     ;;
8358   esac
8359   ;;
8360 *)
8361   # fallback: assume linklib IS sharedlib
8362   lt_cv_sharedlib_from_linklib_cmd=$ECHO
8363   ;;
8364 esac
8365
8366 fi
8367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8368 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8369 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8370 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8371
8372
8373
8374
8375
8376
8377
8378 if test -n "$ac_tool_prefix"; then
8379   for ac_prog in ar
8380   do
8381     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8382 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8384 $as_echo_n "checking for $ac_word... " >&6; }
8385 if ${ac_cv_prog_AR+:} false; then :
8386   $as_echo_n "(cached) " >&6
8387 else
8388   if test -n "$AR"; then
8389   ac_cv_prog_AR="$AR" # Let the user override the test.
8390 else
8391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8392 for as_dir in $PATH
8393 do
8394   IFS=$as_save_IFS
8395   test -z "$as_dir" && as_dir=.
8396     for ac_exec_ext in '' $ac_executable_extensions; do
8397   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8398     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8399     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8400     break 2
8401   fi
8402 done
8403   done
8404 IFS=$as_save_IFS
8405
8406 fi
8407 fi
8408 AR=$ac_cv_prog_AR
8409 if test -n "$AR"; then
8410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8411 $as_echo "$AR" >&6; }
8412 else
8413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8414 $as_echo "no" >&6; }
8415 fi
8416
8417
8418     test -n "$AR" && break
8419   done
8420 fi
8421 if test -z "$AR"; then
8422   ac_ct_AR=$AR
8423   for ac_prog in ar
8424 do
8425   # Extract the first word of "$ac_prog", so it can be a program name with args.
8426 set dummy $ac_prog; ac_word=$2
8427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8428 $as_echo_n "checking for $ac_word... " >&6; }
8429 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8430   $as_echo_n "(cached) " >&6
8431 else
8432   if test -n "$ac_ct_AR"; then
8433   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8434 else
8435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8436 for as_dir in $PATH
8437 do
8438   IFS=$as_save_IFS
8439   test -z "$as_dir" && as_dir=.
8440     for ac_exec_ext in '' $ac_executable_extensions; do
8441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8442     ac_cv_prog_ac_ct_AR="$ac_prog"
8443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8444     break 2
8445   fi
8446 done
8447   done
8448 IFS=$as_save_IFS
8449
8450 fi
8451 fi
8452 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8453 if test -n "$ac_ct_AR"; then
8454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8455 $as_echo "$ac_ct_AR" >&6; }
8456 else
8457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8458 $as_echo "no" >&6; }
8459 fi
8460
8461
8462   test -n "$ac_ct_AR" && break
8463 done
8464
8465   if test "x$ac_ct_AR" = x; then
8466     AR="false"
8467   else
8468     case $cross_compiling:$ac_tool_warned in
8469 yes:)
8470 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8471 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8472 ac_tool_warned=yes ;;
8473 esac
8474     AR=$ac_ct_AR
8475   fi
8476 fi
8477
8478 : ${AR=ar}
8479 : ${AR_FLAGS=cru}
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8492 $as_echo_n "checking for archiver @FILE support... " >&6; }
8493 if ${lt_cv_ar_at_file+:} false; then :
8494   $as_echo_n "(cached) " >&6
8495 else
8496   lt_cv_ar_at_file=no
8497    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8498 /* end confdefs.h.  */
8499
8500 int
8501 main ()
8502 {
8503
8504   ;
8505   return 0;
8506 }
8507 _ACEOF
8508 if ac_fn_c_try_compile "$LINENO"; then :
8509   echo conftest.$ac_objext > conftest.lst
8510       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8511       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8512   (eval $lt_ar_try) 2>&5
8513   ac_status=$?
8514   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8515   test $ac_status = 0; }
8516       if test 0 -eq "$ac_status"; then
8517         # Ensure the archiver fails upon bogus file names.
8518         rm -f conftest.$ac_objext libconftest.a
8519         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8520   (eval $lt_ar_try) 2>&5
8521   ac_status=$?
8522   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8523   test $ac_status = 0; }
8524         if test 0 -ne "$ac_status"; then
8525           lt_cv_ar_at_file=@
8526         fi
8527       fi
8528       rm -f conftest.* libconftest.a
8529
8530 fi
8531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8532
8533 fi
8534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8535 $as_echo "$lt_cv_ar_at_file" >&6; }
8536
8537 if test no = "$lt_cv_ar_at_file"; then
8538   archiver_list_spec=
8539 else
8540   archiver_list_spec=$lt_cv_ar_at_file
8541 fi
8542
8543
8544
8545
8546
8547
8548
8549 if test -n "$ac_tool_prefix"; then
8550   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8551 set dummy ${ac_tool_prefix}strip; ac_word=$2
8552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8553 $as_echo_n "checking for $ac_word... " >&6; }
8554 if ${ac_cv_prog_STRIP+:} false; then :
8555   $as_echo_n "(cached) " >&6
8556 else
8557   if test -n "$STRIP"; then
8558   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8559 else
8560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8561 for as_dir in $PATH
8562 do
8563   IFS=$as_save_IFS
8564   test -z "$as_dir" && as_dir=.
8565     for ac_exec_ext in '' $ac_executable_extensions; do
8566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8567     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8569     break 2
8570   fi
8571 done
8572   done
8573 IFS=$as_save_IFS
8574
8575 fi
8576 fi
8577 STRIP=$ac_cv_prog_STRIP
8578 if test -n "$STRIP"; then
8579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8580 $as_echo "$STRIP" >&6; }
8581 else
8582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8583 $as_echo "no" >&6; }
8584 fi
8585
8586
8587 fi
8588 if test -z "$ac_cv_prog_STRIP"; then
8589   ac_ct_STRIP=$STRIP
8590   # Extract the first word of "strip", so it can be a program name with args.
8591 set dummy strip; ac_word=$2
8592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8593 $as_echo_n "checking for $ac_word... " >&6; }
8594 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8595   $as_echo_n "(cached) " >&6
8596 else
8597   if test -n "$ac_ct_STRIP"; then
8598   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8599 else
8600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8601 for as_dir in $PATH
8602 do
8603   IFS=$as_save_IFS
8604   test -z "$as_dir" && as_dir=.
8605     for ac_exec_ext in '' $ac_executable_extensions; do
8606   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8607     ac_cv_prog_ac_ct_STRIP="strip"
8608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8609     break 2
8610   fi
8611 done
8612   done
8613 IFS=$as_save_IFS
8614
8615 fi
8616 fi
8617 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8618 if test -n "$ac_ct_STRIP"; then
8619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8620 $as_echo "$ac_ct_STRIP" >&6; }
8621 else
8622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8623 $as_echo "no" >&6; }
8624 fi
8625
8626   if test "x$ac_ct_STRIP" = x; then
8627     STRIP=":"
8628   else
8629     case $cross_compiling:$ac_tool_warned in
8630 yes:)
8631 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8632 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8633 ac_tool_warned=yes ;;
8634 esac
8635     STRIP=$ac_ct_STRIP
8636   fi
8637 else
8638   STRIP="$ac_cv_prog_STRIP"
8639 fi
8640
8641 test -z "$STRIP" && STRIP=:
8642
8643
8644
8645
8646
8647
8648 if test -n "$ac_tool_prefix"; then
8649   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8650 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8652 $as_echo_n "checking for $ac_word... " >&6; }
8653 if ${ac_cv_prog_RANLIB+:} false; then :
8654   $as_echo_n "(cached) " >&6
8655 else
8656   if test -n "$RANLIB"; then
8657   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8658 else
8659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8660 for as_dir in $PATH
8661 do
8662   IFS=$as_save_IFS
8663   test -z "$as_dir" && as_dir=.
8664     for ac_exec_ext in '' $ac_executable_extensions; do
8665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8666     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8668     break 2
8669   fi
8670 done
8671   done
8672 IFS=$as_save_IFS
8673
8674 fi
8675 fi
8676 RANLIB=$ac_cv_prog_RANLIB
8677 if test -n "$RANLIB"; then
8678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8679 $as_echo "$RANLIB" >&6; }
8680 else
8681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8682 $as_echo "no" >&6; }
8683 fi
8684
8685
8686 fi
8687 if test -z "$ac_cv_prog_RANLIB"; then
8688   ac_ct_RANLIB=$RANLIB
8689   # Extract the first word of "ranlib", so it can be a program name with args.
8690 set dummy ranlib; ac_word=$2
8691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8692 $as_echo_n "checking for $ac_word... " >&6; }
8693 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8694   $as_echo_n "(cached) " >&6
8695 else
8696   if test -n "$ac_ct_RANLIB"; then
8697   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8698 else
8699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8700 for as_dir in $PATH
8701 do
8702   IFS=$as_save_IFS
8703   test -z "$as_dir" && as_dir=.
8704     for ac_exec_ext in '' $ac_executable_extensions; do
8705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8706     ac_cv_prog_ac_ct_RANLIB="ranlib"
8707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8708     break 2
8709   fi
8710 done
8711   done
8712 IFS=$as_save_IFS
8713
8714 fi
8715 fi
8716 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8717 if test -n "$ac_ct_RANLIB"; then
8718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8719 $as_echo "$ac_ct_RANLIB" >&6; }
8720 else
8721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8722 $as_echo "no" >&6; }
8723 fi
8724
8725   if test "x$ac_ct_RANLIB" = x; then
8726     RANLIB=":"
8727   else
8728     case $cross_compiling:$ac_tool_warned in
8729 yes:)
8730 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8731 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8732 ac_tool_warned=yes ;;
8733 esac
8734     RANLIB=$ac_ct_RANLIB
8735   fi
8736 else
8737   RANLIB="$ac_cv_prog_RANLIB"
8738 fi
8739
8740 test -z "$RANLIB" && RANLIB=:
8741
8742
8743
8744
8745
8746
8747 # Determine commands to create old-style static archives.
8748 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8749 old_postinstall_cmds='chmod 644 $oldlib'
8750 old_postuninstall_cmds=
8751
8752 if test -n "$RANLIB"; then
8753   case $host_os in
8754   bitrig* | openbsd*)
8755     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8756     ;;
8757   *)
8758     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8759     ;;
8760   esac
8761   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8762 fi
8763
8764 case $host_os in
8765   darwin*)
8766     lock_old_archive_extraction=yes ;;
8767   *)
8768     lock_old_archive_extraction=no ;;
8769 esac
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809 # If no C compiler was specified, use CC.
8810 LTCC=${LTCC-"$CC"}
8811
8812 # If no C compiler flags were specified, use CFLAGS.
8813 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8814
8815 # Allow CC to be a program name with arguments.
8816 compiler=$CC
8817
8818
8819 # Check for command to grab the raw symbol name followed by C symbol from nm.
8820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8821 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8822 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8823   $as_echo_n "(cached) " >&6
8824 else
8825
8826 # These are sane defaults that work on at least a few old systems.
8827 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8828
8829 # Character class describing NM global symbol codes.
8830 symcode='[BCDEGRST]'
8831
8832 # Regexp to match symbols that can be accessed directly from C.
8833 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8834
8835 # Define system-specific variables.
8836 case $host_os in
8837 aix*)
8838   symcode='[BCDT]'
8839   ;;
8840 cygwin* | mingw* | pw32* | cegcc*)
8841   symcode='[ABCDGISTW]'
8842   ;;
8843 hpux*)
8844   if test ia64 = "$host_cpu"; then
8845     symcode='[ABCDEGRST]'
8846   fi
8847   ;;
8848 irix* | nonstopux*)
8849   symcode='[BCDEGRST]'
8850   ;;
8851 osf*)
8852   symcode='[BCDEGQRST]'
8853   ;;
8854 solaris*)
8855   symcode='[BDRT]'
8856   ;;
8857 sco3.2v5*)
8858   symcode='[DT]'
8859   ;;
8860 sysv4.2uw2*)
8861   symcode='[DT]'
8862   ;;
8863 sysv5* | sco5v6* | unixware* | OpenUNIX*)
8864   symcode='[ABDT]'
8865   ;;
8866 sysv4)
8867   symcode='[DFNSTU]'
8868   ;;
8869 esac
8870
8871 # If we're using GNU nm, then use its standard symbol codes.
8872 case `$NM -V 2>&1` in
8873 *GNU* | *'with BFD'*)
8874   symcode='[ABCDGIRSTW]' ;;
8875 esac
8876
8877 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8878   # Gets list of data symbols to import.
8879   lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8880   # Adjust the below global symbol transforms to fixup imported variables.
8881   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8882   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8883   lt_c_name_lib_hook="\
8884   -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8885   -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8886 else
8887   # Disable hooks by default.
8888   lt_cv_sys_global_symbol_to_import=
8889   lt_cdecl_hook=
8890   lt_c_name_hook=
8891   lt_c_name_lib_hook=
8892 fi
8893
8894 # Transform an extracted symbol line into a proper C declaration.
8895 # Some systems (esp. on ia64) link data and code symbols differently,
8896 # so use this general approach.
8897 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8898 $lt_cdecl_hook\
8899 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8900 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8901
8902 # Transform an extracted symbol line into symbol name and symbol address
8903 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8904 $lt_c_name_hook\
8905 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8906 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8907
8908 # Transform an extracted symbol line into symbol name with lib prefix and
8909 # symbol address.
8910 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8911 $lt_c_name_lib_hook\
8912 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8913 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8914 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8915
8916 # Handle CRLF in mingw tool chain
8917 opt_cr=
8918 case $build_os in
8919 mingw*)
8920   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8921   ;;
8922 esac
8923
8924 # Try without a prefix underscore, then with it.
8925 for ac_symprfx in "" "_"; do
8926
8927   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8928   symxfrm="\\1 $ac_symprfx\\2 \\2"
8929
8930   # Write the raw and C identifiers.
8931   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8932     # Fake it for dumpbin and say T for any non-static function,
8933     # D for any global variable and I for any imported variable.
8934     # Also find C++ and __fastcall symbols from MSVC++,
8935     # which start with @ or ?.
8936     lt_cv_sys_global_symbol_pipe="$AWK '"\
8937 "     {last_section=section; section=\$ 3};"\
8938 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8939 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8940 "     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8941 "     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8942 "     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8943 "     \$ 0!~/External *\|/{next};"\
8944 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8945 "     {if(hide[section]) next};"\
8946 "     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8947 "     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8948 "     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8949 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8950 "     ' prfx=^$ac_symprfx"
8951   else
8952     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8953   fi
8954   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8955
8956   # Check to see that the pipe works correctly.
8957   pipe_works=no
8958
8959   rm -f conftest*
8960   cat > conftest.$ac_ext <<_LT_EOF
8961 #ifdef __cplusplus
8962 extern "C" {
8963 #endif
8964 char nm_test_var;
8965 void nm_test_func(void);
8966 void nm_test_func(void){}
8967 #ifdef __cplusplus
8968 }
8969 #endif
8970 int main(){nm_test_var='a';nm_test_func();return(0);}
8971 _LT_EOF
8972
8973   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8974   (eval $ac_compile) 2>&5
8975   ac_status=$?
8976   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8977   test $ac_status = 0; }; then
8978     # Now try to grab the symbols.
8979     nlist=conftest.nm
8980     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8981   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8982   ac_status=$?
8983   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8984   test $ac_status = 0; } && test -s "$nlist"; then
8985       # Try sorting and uniquifying the output.
8986       if sort "$nlist" | uniq > "$nlist"T; then
8987         mv -f "$nlist"T "$nlist"
8988       else
8989         rm -f "$nlist"T
8990       fi
8991
8992       # Make sure that we snagged all the symbols we need.
8993       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8994         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8995           cat <<_LT_EOF > conftest.$ac_ext
8996 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
8997 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
8998 /* DATA imports from DLLs on WIN32 can't be const, because runtime
8999    relocations are performed -- see ld's documentation on pseudo-relocs.  */
9000 # define LT_DLSYM_CONST
9001 #elif defined __osf__
9002 /* This system does not cope well with relocations in const data.  */
9003 # define LT_DLSYM_CONST
9004 #else
9005 # define LT_DLSYM_CONST const
9006 #endif
9007
9008 #ifdef __cplusplus
9009 extern "C" {
9010 #endif
9011
9012 _LT_EOF
9013           # Now generate the symbol file.
9014           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
9015
9016           cat <<_LT_EOF >> conftest.$ac_ext
9017
9018 /* The mapping between symbol names and symbols.  */
9019 LT_DLSYM_CONST struct {
9020   const char *name;
9021   void       *address;
9022 }
9023 lt__PROGRAM__LTX_preloaded_symbols[] =
9024 {
9025   { "@PROGRAM@", (void *) 0 },
9026 _LT_EOF
9027           $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
9028           cat <<\_LT_EOF >> conftest.$ac_ext
9029   {0, (void *) 0}
9030 };
9031
9032 /* This works around a problem in FreeBSD linker */
9033 #ifdef FREEBSD_WORKAROUND
9034 static const void *lt_preloaded_setup() {
9035   return lt__PROGRAM__LTX_preloaded_symbols;
9036 }
9037 #endif
9038
9039 #ifdef __cplusplus
9040 }
9041 #endif
9042 _LT_EOF
9043           # Now try linking the two files.
9044           mv conftest.$ac_objext conftstm.$ac_objext
9045           lt_globsym_save_LIBS=$LIBS
9046           lt_globsym_save_CFLAGS=$CFLAGS
9047           LIBS=conftstm.$ac_objext
9048           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
9049           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9050   (eval $ac_link) 2>&5
9051   ac_status=$?
9052   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9053   test $ac_status = 0; } && test -s conftest$ac_exeext; then
9054             pipe_works=yes
9055           fi
9056           LIBS=$lt_globsym_save_LIBS
9057           CFLAGS=$lt_globsym_save_CFLAGS
9058         else
9059           echo "cannot find nm_test_func in $nlist" >&5
9060         fi
9061       else
9062         echo "cannot find nm_test_var in $nlist" >&5
9063       fi
9064     else
9065       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
9066     fi
9067   else
9068     echo "$progname: failed program was:" >&5
9069     cat conftest.$ac_ext >&5
9070   fi
9071   rm -rf conftest* conftst*
9072
9073   # Do not use the global_symbol_pipe unless it works.
9074   if test yes = "$pipe_works"; then
9075     break
9076   else
9077     lt_cv_sys_global_symbol_pipe=
9078   fi
9079 done
9080
9081 fi
9082
9083 if test -z "$lt_cv_sys_global_symbol_pipe"; then
9084   lt_cv_sys_global_symbol_to_cdecl=
9085 fi
9086 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
9088 $as_echo "failed" >&6; }
9089 else
9090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9091 $as_echo "ok" >&6; }
9092 fi
9093
9094 # Response file support.
9095 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9096   nm_file_list_spec='@'
9097 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
9098   nm_file_list_spec='@'
9099 fi
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
9138 $as_echo_n "checking for sysroot... " >&6; }
9139
9140 # Check whether --with-sysroot was given.
9141 if test "${with_sysroot+set}" = set; then :
9142   withval=$with_sysroot;
9143 else
9144   with_sysroot=no
9145 fi
9146
9147
9148 lt_sysroot=
9149 case $with_sysroot in #(
9150  yes)
9151    if test yes = "$GCC"; then
9152      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
9153    fi
9154    ;; #(
9155  /*)
9156    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
9157    ;; #(
9158  no|'')
9159    ;; #(
9160  *)
9161    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
9162 $as_echo "$with_sysroot" >&6; }
9163    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
9164    ;;
9165 esac
9166
9167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
9168 $as_echo "${lt_sysroot:-no}" >&6; }
9169
9170
9171
9172
9173
9174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
9175 $as_echo_n "checking for a working dd... " >&6; }
9176 if ${ac_cv_path_lt_DD+:} false; then :
9177   $as_echo_n "(cached) " >&6
9178 else
9179   printf 0123456789abcdef0123456789abcdef >conftest.i
9180 cat conftest.i conftest.i >conftest2.i
9181 : ${lt_DD:=$DD}
9182 if test -z "$lt_DD"; then
9183   ac_path_lt_DD_found=false
9184   # Loop through the user's path and test for each of PROGNAME-LIST
9185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9186 for as_dir in $PATH
9187 do
9188   IFS=$as_save_IFS
9189   test -z "$as_dir" && as_dir=.
9190     for ac_prog in dd; do
9191     for ac_exec_ext in '' $ac_executable_extensions; do
9192       ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
9193       as_fn_executable_p "$ac_path_lt_DD" || continue
9194 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9195   cmp -s conftest.i conftest.out \
9196   && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9197 fi
9198       $ac_path_lt_DD_found && break 3
9199     done
9200   done
9201   done
9202 IFS=$as_save_IFS
9203   if test -z "$ac_cv_path_lt_DD"; then
9204     :
9205   fi
9206 else
9207   ac_cv_path_lt_DD=$lt_DD
9208 fi
9209
9210 rm -f conftest.i conftest2.i conftest.out
9211 fi
9212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9213 $as_echo "$ac_cv_path_lt_DD" >&6; }
9214
9215
9216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9217 $as_echo_n "checking how to truncate binary pipes... " >&6; }
9218 if ${lt_cv_truncate_bin+:} false; then :
9219   $as_echo_n "(cached) " >&6
9220 else
9221   printf 0123456789abcdef0123456789abcdef >conftest.i
9222 cat conftest.i conftest.i >conftest2.i
9223 lt_cv_truncate_bin=
9224 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9225   cmp -s conftest.i conftest.out \
9226   && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9227 fi
9228 rm -f conftest.i conftest2.i conftest.out
9229 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9230 fi
9231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9232 $as_echo "$lt_cv_truncate_bin" >&6; }
9233
9234
9235
9236
9237
9238
9239
9240 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
9241 func_cc_basename ()
9242 {
9243     for cc_temp in $*""; do
9244       case $cc_temp in
9245         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9246         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9247         \-*) ;;
9248         *) break;;
9249       esac
9250     done
9251     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9252 }
9253
9254 # Check whether --enable-libtool-lock was given.
9255 if test "${enable_libtool_lock+set}" = set; then :
9256   enableval=$enable_libtool_lock;
9257 fi
9258
9259 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9260
9261 # Some flags need to be propagated to the compiler or linker for good
9262 # libtool support.
9263 case $host in
9264 ia64-*-hpux*)
9265   # Find out what ABI is being produced by ac_compile, and set mode
9266   # options accordingly.
9267   echo 'int i;' > conftest.$ac_ext
9268   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9269   (eval $ac_compile) 2>&5
9270   ac_status=$?
9271   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9272   test $ac_status = 0; }; then
9273     case `/usr/bin/file conftest.$ac_objext` in
9274       *ELF-32*)
9275         HPUX_IA64_MODE=32
9276         ;;
9277       *ELF-64*)
9278         HPUX_IA64_MODE=64
9279         ;;
9280     esac
9281   fi
9282   rm -rf conftest*
9283   ;;
9284 *-*-irix6*)
9285   # Find out what ABI is being produced by ac_compile, and set linker
9286   # options accordingly.
9287   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9288   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9289   (eval $ac_compile) 2>&5
9290   ac_status=$?
9291   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9292   test $ac_status = 0; }; then
9293     if test yes = "$lt_cv_prog_gnu_ld"; then
9294       case `/usr/bin/file conftest.$ac_objext` in
9295         *32-bit*)
9296           LD="${LD-ld} -melf32bsmip"
9297           ;;
9298         *N32*)
9299           LD="${LD-ld} -melf32bmipn32"
9300           ;;
9301         *64-bit*)
9302           LD="${LD-ld} -melf64bmip"
9303         ;;
9304       esac
9305     else
9306       case `/usr/bin/file conftest.$ac_objext` in
9307         *32-bit*)
9308           LD="${LD-ld} -32"
9309           ;;
9310         *N32*)
9311           LD="${LD-ld} -n32"
9312           ;;
9313         *64-bit*)
9314           LD="${LD-ld} -64"
9315           ;;
9316       esac
9317     fi
9318   fi
9319   rm -rf conftest*
9320   ;;
9321
9322 mips64*-*linux*)
9323   # Find out what ABI is being produced by ac_compile, and set linker
9324   # options accordingly.
9325   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9326   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9327   (eval $ac_compile) 2>&5
9328   ac_status=$?
9329   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9330   test $ac_status = 0; }; then
9331     emul=elf
9332     case `/usr/bin/file conftest.$ac_objext` in
9333       *32-bit*)
9334         emul="${emul}32"
9335         ;;
9336       *64-bit*)
9337         emul="${emul}64"
9338         ;;
9339     esac
9340     case `/usr/bin/file conftest.$ac_objext` in
9341       *MSB*)
9342         emul="${emul}btsmip"
9343         ;;
9344       *LSB*)
9345         emul="${emul}ltsmip"
9346         ;;
9347     esac
9348     case `/usr/bin/file conftest.$ac_objext` in
9349       *N32*)
9350         emul="${emul}n32"
9351         ;;
9352     esac
9353     LD="${LD-ld} -m $emul"
9354   fi
9355   rm -rf conftest*
9356   ;;
9357
9358 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9359 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9360   # Find out what ABI is being produced by ac_compile, and set linker
9361   # options accordingly.  Note that the listed cases only cover the
9362   # situations where additional linker options are needed (such as when
9363   # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9364   # vice versa); the common cases where no linker options are needed do
9365   # not appear in the list.
9366   echo 'int i;' > conftest.$ac_ext
9367   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9368   (eval $ac_compile) 2>&5
9369   ac_status=$?
9370   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9371   test $ac_status = 0; }; then
9372     case `/usr/bin/file conftest.o` in
9373       *32-bit*)
9374         case $host in
9375           x86_64-*kfreebsd*-gnu)
9376             LD="${LD-ld} -m elf_i386_fbsd"
9377             ;;
9378           x86_64-*linux*)
9379             case `/usr/bin/file conftest.o` in
9380               *x86-64*)
9381                 LD="${LD-ld} -m elf32_x86_64"
9382                 ;;
9383               *)
9384                 LD="${LD-ld} -m elf_i386"
9385                 ;;
9386             esac
9387             ;;
9388           powerpc64le-*linux*)
9389             LD="${LD-ld} -m elf32lppclinux"
9390             ;;
9391           powerpc64-*linux*)
9392             LD="${LD-ld} -m elf32ppclinux"
9393             ;;
9394           s390x-*linux*)
9395             LD="${LD-ld} -m elf_s390"
9396             ;;
9397           sparc64-*linux*)
9398             LD="${LD-ld} -m elf32_sparc"
9399             ;;
9400         esac
9401         ;;
9402       *64-bit*)
9403         case $host in
9404           x86_64-*kfreebsd*-gnu)
9405             LD="${LD-ld} -m elf_x86_64_fbsd"
9406             ;;
9407           x86_64-*linux*)
9408             LD="${LD-ld} -m elf_x86_64"
9409             ;;
9410           powerpcle-*linux*)
9411             LD="${LD-ld} -m elf64lppc"
9412             ;;
9413           powerpc-*linux*)
9414             LD="${LD-ld} -m elf64ppc"
9415             ;;
9416           s390*-*linux*|s390*-*tpf*)
9417             LD="${LD-ld} -m elf64_s390"
9418             ;;
9419           sparc*-*linux*)
9420             LD="${LD-ld} -m elf64_sparc"
9421             ;;
9422         esac
9423         ;;
9424     esac
9425   fi
9426   rm -rf conftest*
9427   ;;
9428
9429 *-*-sco3.2v5*)
9430   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9431   SAVE_CFLAGS=$CFLAGS
9432   CFLAGS="$CFLAGS -belf"
9433   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9434 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
9435 if ${lt_cv_cc_needs_belf+:} false; then :
9436   $as_echo_n "(cached) " >&6
9437 else
9438   ac_ext=c
9439 ac_cpp='$CPP $CPPFLAGS'
9440 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9441 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9442 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9443
9444      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9445 /* end confdefs.h.  */
9446
9447 int
9448 main ()
9449 {
9450
9451   ;
9452   return 0;
9453 }
9454 _ACEOF
9455 if ac_fn_c_try_link "$LINENO"; then :
9456   lt_cv_cc_needs_belf=yes
9457 else
9458   lt_cv_cc_needs_belf=no
9459 fi
9460 rm -f core conftest.err conftest.$ac_objext \
9461     conftest$ac_exeext conftest.$ac_ext
9462      ac_ext=c
9463 ac_cpp='$CPP $CPPFLAGS'
9464 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9465 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9466 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9467
9468 fi
9469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9470 $as_echo "$lt_cv_cc_needs_belf" >&6; }
9471   if test yes != "$lt_cv_cc_needs_belf"; then
9472     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9473     CFLAGS=$SAVE_CFLAGS
9474   fi
9475   ;;
9476 *-*solaris*)
9477   # Find out what ABI is being produced by ac_compile, and set linker
9478   # options accordingly.
9479   echo 'int i;' > conftest.$ac_ext
9480   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9481   (eval $ac_compile) 2>&5
9482   ac_status=$?
9483   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9484   test $ac_status = 0; }; then
9485     case `/usr/bin/file conftest.o` in
9486     *64-bit*)
9487       case $lt_cv_prog_gnu_ld in
9488       yes*)
9489         case $host in
9490         i?86-*-solaris*|x86_64-*-solaris*)
9491           LD="${LD-ld} -m elf_x86_64"
9492           ;;
9493         sparc*-*-solaris*)
9494           LD="${LD-ld} -m elf64_sparc"
9495           ;;
9496         esac
9497         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9498         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9499           LD=${LD-ld}_sol2
9500         fi
9501         ;;
9502       *)
9503         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9504           LD="${LD-ld} -64"
9505         fi
9506         ;;
9507       esac
9508       ;;
9509     esac
9510   fi
9511   rm -rf conftest*
9512   ;;
9513 esac
9514
9515 need_locks=$enable_libtool_lock
9516
9517 if test -n "$ac_tool_prefix"; then
9518   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9519 set dummy ${ac_tool_prefix}mt; ac_word=$2
9520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9521 $as_echo_n "checking for $ac_word... " >&6; }
9522 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9523   $as_echo_n "(cached) " >&6
9524 else
9525   if test -n "$MANIFEST_TOOL"; then
9526   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9527 else
9528 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9529 for as_dir in $PATH
9530 do
9531   IFS=$as_save_IFS
9532   test -z "$as_dir" && as_dir=.
9533     for ac_exec_ext in '' $ac_executable_extensions; do
9534   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9535     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9536     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9537     break 2
9538   fi
9539 done
9540   done
9541 IFS=$as_save_IFS
9542
9543 fi
9544 fi
9545 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9546 if test -n "$MANIFEST_TOOL"; then
9547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9548 $as_echo "$MANIFEST_TOOL" >&6; }
9549 else
9550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9551 $as_echo "no" >&6; }
9552 fi
9553
9554
9555 fi
9556 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9557   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9558   # Extract the first word of "mt", so it can be a program name with args.
9559 set dummy mt; ac_word=$2
9560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9561 $as_echo_n "checking for $ac_word... " >&6; }
9562 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9563   $as_echo_n "(cached) " >&6
9564 else
9565   if test -n "$ac_ct_MANIFEST_TOOL"; then
9566   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9567 else
9568 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9569 for as_dir in $PATH
9570 do
9571   IFS=$as_save_IFS
9572   test -z "$as_dir" && as_dir=.
9573     for ac_exec_ext in '' $ac_executable_extensions; do
9574   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9575     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9576     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9577     break 2
9578   fi
9579 done
9580   done
9581 IFS=$as_save_IFS
9582
9583 fi
9584 fi
9585 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9586 if test -n "$ac_ct_MANIFEST_TOOL"; then
9587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9588 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9589 else
9590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9591 $as_echo "no" >&6; }
9592 fi
9593
9594   if test "x$ac_ct_MANIFEST_TOOL" = x; then
9595     MANIFEST_TOOL=":"
9596   else
9597     case $cross_compiling:$ac_tool_warned in
9598 yes:)
9599 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9600 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9601 ac_tool_warned=yes ;;
9602 esac
9603     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9604   fi
9605 else
9606   MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9607 fi
9608
9609 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9611 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9612 if ${lt_cv_path_mainfest_tool+:} false; then :
9613   $as_echo_n "(cached) " >&6
9614 else
9615   lt_cv_path_mainfest_tool=no
9616   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9617   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9618   cat conftest.err >&5
9619   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9620     lt_cv_path_mainfest_tool=yes
9621   fi
9622   rm -f conftest*
9623 fi
9624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9625 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
9626 if test yes != "$lt_cv_path_mainfest_tool"; then
9627   MANIFEST_TOOL=:
9628 fi
9629
9630
9631
9632
9633
9634
9635   case $host_os in
9636     rhapsody* | darwin*)
9637     if test -n "$ac_tool_prefix"; then
9638   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9639 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9641 $as_echo_n "checking for $ac_word... " >&6; }
9642 if ${ac_cv_prog_DSYMUTIL+:} false; then :
9643   $as_echo_n "(cached) " >&6
9644 else
9645   if test -n "$DSYMUTIL"; then
9646   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9647 else
9648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9649 for as_dir in $PATH
9650 do
9651   IFS=$as_save_IFS
9652   test -z "$as_dir" && as_dir=.
9653     for ac_exec_ext in '' $ac_executable_extensions; do
9654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9655     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9657     break 2
9658   fi
9659 done
9660   done
9661 IFS=$as_save_IFS
9662
9663 fi
9664 fi
9665 DSYMUTIL=$ac_cv_prog_DSYMUTIL
9666 if test -n "$DSYMUTIL"; then
9667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9668 $as_echo "$DSYMUTIL" >&6; }
9669 else
9670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9671 $as_echo "no" >&6; }
9672 fi
9673
9674
9675 fi
9676 if test -z "$ac_cv_prog_DSYMUTIL"; then
9677   ac_ct_DSYMUTIL=$DSYMUTIL
9678   # Extract the first word of "dsymutil", so it can be a program name with args.
9679 set dummy dsymutil; ac_word=$2
9680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9681 $as_echo_n "checking for $ac_word... " >&6; }
9682 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9683   $as_echo_n "(cached) " >&6
9684 else
9685   if test -n "$ac_ct_DSYMUTIL"; then
9686   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9687 else
9688 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9689 for as_dir in $PATH
9690 do
9691   IFS=$as_save_IFS
9692   test -z "$as_dir" && as_dir=.
9693     for ac_exec_ext in '' $ac_executable_extensions; do
9694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9695     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9697     break 2
9698   fi
9699 done
9700   done
9701 IFS=$as_save_IFS
9702
9703 fi
9704 fi
9705 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9706 if test -n "$ac_ct_DSYMUTIL"; then
9707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9708 $as_echo "$ac_ct_DSYMUTIL" >&6; }
9709 else
9710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9711 $as_echo "no" >&6; }
9712 fi
9713
9714   if test "x$ac_ct_DSYMUTIL" = x; then
9715     DSYMUTIL=":"
9716   else
9717     case $cross_compiling:$ac_tool_warned in
9718 yes:)
9719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9720 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9721 ac_tool_warned=yes ;;
9722 esac
9723     DSYMUTIL=$ac_ct_DSYMUTIL
9724   fi
9725 else
9726   DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9727 fi
9728
9729     if test -n "$ac_tool_prefix"; then
9730   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9731 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9733 $as_echo_n "checking for $ac_word... " >&6; }
9734 if ${ac_cv_prog_NMEDIT+:} false; then :
9735   $as_echo_n "(cached) " >&6
9736 else
9737   if test -n "$NMEDIT"; then
9738   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9739 else
9740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9741 for as_dir in $PATH
9742 do
9743   IFS=$as_save_IFS
9744   test -z "$as_dir" && as_dir=.
9745     for ac_exec_ext in '' $ac_executable_extensions; do
9746   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9747     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9749     break 2
9750   fi
9751 done
9752   done
9753 IFS=$as_save_IFS
9754
9755 fi
9756 fi
9757 NMEDIT=$ac_cv_prog_NMEDIT
9758 if test -n "$NMEDIT"; then
9759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9760 $as_echo "$NMEDIT" >&6; }
9761 else
9762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9763 $as_echo "no" >&6; }
9764 fi
9765
9766
9767 fi
9768 if test -z "$ac_cv_prog_NMEDIT"; then
9769   ac_ct_NMEDIT=$NMEDIT
9770   # Extract the first word of "nmedit", so it can be a program name with args.
9771 set dummy nmedit; ac_word=$2
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9773 $as_echo_n "checking for $ac_word... " >&6; }
9774 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9775   $as_echo_n "(cached) " >&6
9776 else
9777   if test -n "$ac_ct_NMEDIT"; then
9778   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9779 else
9780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9781 for as_dir in $PATH
9782 do
9783   IFS=$as_save_IFS
9784   test -z "$as_dir" && as_dir=.
9785     for ac_exec_ext in '' $ac_executable_extensions; do
9786   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9787     ac_cv_prog_ac_ct_NMEDIT="nmedit"
9788     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9789     break 2
9790   fi
9791 done
9792   done
9793 IFS=$as_save_IFS
9794
9795 fi
9796 fi
9797 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9798 if test -n "$ac_ct_NMEDIT"; then
9799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9800 $as_echo "$ac_ct_NMEDIT" >&6; }
9801 else
9802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9803 $as_echo "no" >&6; }
9804 fi
9805
9806   if test "x$ac_ct_NMEDIT" = x; then
9807     NMEDIT=":"
9808   else
9809     case $cross_compiling:$ac_tool_warned in
9810 yes:)
9811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9812 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9813 ac_tool_warned=yes ;;
9814 esac
9815     NMEDIT=$ac_ct_NMEDIT
9816   fi
9817 else
9818   NMEDIT="$ac_cv_prog_NMEDIT"
9819 fi
9820
9821     if test -n "$ac_tool_prefix"; then
9822   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9823 set dummy ${ac_tool_prefix}lipo; ac_word=$2
9824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9825 $as_echo_n "checking for $ac_word... " >&6; }
9826 if ${ac_cv_prog_LIPO+:} false; then :
9827   $as_echo_n "(cached) " >&6
9828 else
9829   if test -n "$LIPO"; then
9830   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9831 else
9832 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9833 for as_dir in $PATH
9834 do
9835   IFS=$as_save_IFS
9836   test -z "$as_dir" && as_dir=.
9837     for ac_exec_ext in '' $ac_executable_extensions; do
9838   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9839     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9840     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9841     break 2
9842   fi
9843 done
9844   done
9845 IFS=$as_save_IFS
9846
9847 fi
9848 fi
9849 LIPO=$ac_cv_prog_LIPO
9850 if test -n "$LIPO"; then
9851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9852 $as_echo "$LIPO" >&6; }
9853 else
9854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9855 $as_echo "no" >&6; }
9856 fi
9857
9858
9859 fi
9860 if test -z "$ac_cv_prog_LIPO"; then
9861   ac_ct_LIPO=$LIPO
9862   # Extract the first word of "lipo", so it can be a program name with args.
9863 set dummy lipo; ac_word=$2
9864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9865 $as_echo_n "checking for $ac_word... " >&6; }
9866 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9867   $as_echo_n "(cached) " >&6
9868 else
9869   if test -n "$ac_ct_LIPO"; then
9870   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9871 else
9872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9873 for as_dir in $PATH
9874 do
9875   IFS=$as_save_IFS
9876   test -z "$as_dir" && as_dir=.
9877     for ac_exec_ext in '' $ac_executable_extensions; do
9878   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9879     ac_cv_prog_ac_ct_LIPO="lipo"
9880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9881     break 2
9882   fi
9883 done
9884   done
9885 IFS=$as_save_IFS
9886
9887 fi
9888 fi
9889 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9890 if test -n "$ac_ct_LIPO"; then
9891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9892 $as_echo "$ac_ct_LIPO" >&6; }
9893 else
9894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9895 $as_echo "no" >&6; }
9896 fi
9897
9898   if test "x$ac_ct_LIPO" = x; then
9899     LIPO=":"
9900   else
9901     case $cross_compiling:$ac_tool_warned in
9902 yes:)
9903 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9904 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9905 ac_tool_warned=yes ;;
9906 esac
9907     LIPO=$ac_ct_LIPO
9908   fi
9909 else
9910   LIPO="$ac_cv_prog_LIPO"
9911 fi
9912
9913     if test -n "$ac_tool_prefix"; then
9914   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9915 set dummy ${ac_tool_prefix}otool; ac_word=$2
9916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9917 $as_echo_n "checking for $ac_word... " >&6; }
9918 if ${ac_cv_prog_OTOOL+:} false; then :
9919   $as_echo_n "(cached) " >&6
9920 else
9921   if test -n "$OTOOL"; then
9922   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9923 else
9924 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9925 for as_dir in $PATH
9926 do
9927   IFS=$as_save_IFS
9928   test -z "$as_dir" && as_dir=.
9929     for ac_exec_ext in '' $ac_executable_extensions; do
9930   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9931     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9933     break 2
9934   fi
9935 done
9936   done
9937 IFS=$as_save_IFS
9938
9939 fi
9940 fi
9941 OTOOL=$ac_cv_prog_OTOOL
9942 if test -n "$OTOOL"; then
9943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9944 $as_echo "$OTOOL" >&6; }
9945 else
9946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9947 $as_echo "no" >&6; }
9948 fi
9949
9950
9951 fi
9952 if test -z "$ac_cv_prog_OTOOL"; then
9953   ac_ct_OTOOL=$OTOOL
9954   # Extract the first word of "otool", so it can be a program name with args.
9955 set dummy otool; ac_word=$2
9956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9957 $as_echo_n "checking for $ac_word... " >&6; }
9958 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9959   $as_echo_n "(cached) " >&6
9960 else
9961   if test -n "$ac_ct_OTOOL"; then
9962   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9963 else
9964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9965 for as_dir in $PATH
9966 do
9967   IFS=$as_save_IFS
9968   test -z "$as_dir" && as_dir=.
9969     for ac_exec_ext in '' $ac_executable_extensions; do
9970   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9971     ac_cv_prog_ac_ct_OTOOL="otool"
9972     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9973     break 2
9974   fi
9975 done
9976   done
9977 IFS=$as_save_IFS
9978
9979 fi
9980 fi
9981 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
9982 if test -n "$ac_ct_OTOOL"; then
9983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
9984 $as_echo "$ac_ct_OTOOL" >&6; }
9985 else
9986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9987 $as_echo "no" >&6; }
9988 fi
9989
9990   if test "x$ac_ct_OTOOL" = x; then
9991     OTOOL=":"
9992   else
9993     case $cross_compiling:$ac_tool_warned in
9994 yes:)
9995 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9996 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9997 ac_tool_warned=yes ;;
9998 esac
9999     OTOOL=$ac_ct_OTOOL
10000   fi
10001 else
10002   OTOOL="$ac_cv_prog_OTOOL"
10003 fi
10004
10005     if test -n "$ac_tool_prefix"; then
10006   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
10007 set dummy ${ac_tool_prefix}otool64; ac_word=$2
10008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10009 $as_echo_n "checking for $ac_word... " >&6; }
10010 if ${ac_cv_prog_OTOOL64+:} false; then :
10011   $as_echo_n "(cached) " >&6
10012 else
10013   if test -n "$OTOOL64"; then
10014   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
10015 else
10016 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10017 for as_dir in $PATH
10018 do
10019   IFS=$as_save_IFS
10020   test -z "$as_dir" && as_dir=.
10021     for ac_exec_ext in '' $ac_executable_extensions; do
10022   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10023     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
10024     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10025     break 2
10026   fi
10027 done
10028   done
10029 IFS=$as_save_IFS
10030
10031 fi
10032 fi
10033 OTOOL64=$ac_cv_prog_OTOOL64
10034 if test -n "$OTOOL64"; then
10035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
10036 $as_echo "$OTOOL64" >&6; }
10037 else
10038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10039 $as_echo "no" >&6; }
10040 fi
10041
10042
10043 fi
10044 if test -z "$ac_cv_prog_OTOOL64"; then
10045   ac_ct_OTOOL64=$OTOOL64
10046   # Extract the first word of "otool64", so it can be a program name with args.
10047 set dummy otool64; ac_word=$2
10048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10049 $as_echo_n "checking for $ac_word... " >&6; }
10050 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
10051   $as_echo_n "(cached) " >&6
10052 else
10053   if test -n "$ac_ct_OTOOL64"; then
10054   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
10055 else
10056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10057 for as_dir in $PATH
10058 do
10059   IFS=$as_save_IFS
10060   test -z "$as_dir" && as_dir=.
10061     for ac_exec_ext in '' $ac_executable_extensions; do
10062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10063     ac_cv_prog_ac_ct_OTOOL64="otool64"
10064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10065     break 2
10066   fi
10067 done
10068   done
10069 IFS=$as_save_IFS
10070
10071 fi
10072 fi
10073 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
10074 if test -n "$ac_ct_OTOOL64"; then
10075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
10076 $as_echo "$ac_ct_OTOOL64" >&6; }
10077 else
10078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10079 $as_echo "no" >&6; }
10080 fi
10081
10082   if test "x$ac_ct_OTOOL64" = x; then
10083     OTOOL64=":"
10084   else
10085     case $cross_compiling:$ac_tool_warned in
10086 yes:)
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10088 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10089 ac_tool_warned=yes ;;
10090 esac
10091     OTOOL64=$ac_ct_OTOOL64
10092   fi
10093 else
10094   OTOOL64="$ac_cv_prog_OTOOL64"
10095 fi
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
10124 $as_echo_n "checking for -single_module linker flag... " >&6; }
10125 if ${lt_cv_apple_cc_single_mod+:} false; then :
10126   $as_echo_n "(cached) " >&6
10127 else
10128   lt_cv_apple_cc_single_mod=no
10129       if test -z "$LT_MULTI_MODULE"; then
10130         # By default we will add the -single_module flag. You can override
10131         # by either setting the environment variable LT_MULTI_MODULE
10132         # non-empty at configure time, or by adding -multi_module to the
10133         # link flags.
10134         rm -rf libconftest.dylib*
10135         echo "int foo(void){return 1;}" > conftest.c
10136         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10137 -dynamiclib -Wl,-single_module conftest.c" >&5
10138         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10139           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10140         _lt_result=$?
10141         # If there is a non-empty error log, and "single_module"
10142         # appears in it, assume the flag caused a linker warning
10143         if test -s conftest.err && $GREP single_module conftest.err; then
10144           cat conftest.err >&5
10145         # Otherwise, if the output was created with a 0 exit code from
10146         # the compiler, it worked.
10147         elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10148           lt_cv_apple_cc_single_mod=yes
10149         else
10150           cat conftest.err >&5
10151         fi
10152         rm -rf libconftest.dylib*
10153         rm -f conftest.*
10154       fi
10155 fi
10156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
10157 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
10158
10159     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
10160 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
10161 if ${lt_cv_ld_exported_symbols_list+:} false; then :
10162   $as_echo_n "(cached) " >&6
10163 else
10164   lt_cv_ld_exported_symbols_list=no
10165       save_LDFLAGS=$LDFLAGS
10166       echo "_main" > conftest.sym
10167       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10168       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10169 /* end confdefs.h.  */
10170
10171 int
10172 main ()
10173 {
10174
10175   ;
10176   return 0;
10177 }
10178 _ACEOF
10179 if ac_fn_c_try_link "$LINENO"; then :
10180   lt_cv_ld_exported_symbols_list=yes
10181 else
10182   lt_cv_ld_exported_symbols_list=no
10183 fi
10184 rm -f core conftest.err conftest.$ac_objext \
10185     conftest$ac_exeext conftest.$ac_ext
10186         LDFLAGS=$save_LDFLAGS
10187
10188 fi
10189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10190 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
10191
10192     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10193 $as_echo_n "checking for -force_load linker flag... " >&6; }
10194 if ${lt_cv_ld_force_load+:} false; then :
10195   $as_echo_n "(cached) " >&6
10196 else
10197   lt_cv_ld_force_load=no
10198       cat > conftest.c << _LT_EOF
10199 int forced_loaded() { return 2;}
10200 _LT_EOF
10201       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10202       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10203       echo "$AR cru libconftest.a conftest.o" >&5
10204       $AR cru libconftest.a conftest.o 2>&5
10205       echo "$RANLIB libconftest.a" >&5
10206       $RANLIB libconftest.a 2>&5
10207       cat > conftest.c << _LT_EOF
10208 int main() { return 0;}
10209 _LT_EOF
10210       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10211       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10212       _lt_result=$?
10213       if test -s conftest.err && $GREP force_load conftest.err; then
10214         cat conftest.err >&5
10215       elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10216         lt_cv_ld_force_load=yes
10217       else
10218         cat conftest.err >&5
10219       fi
10220         rm -f conftest.err libconftest.a conftest conftest.c
10221         rm -rf conftest.dSYM
10222
10223 fi
10224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10225 $as_echo "$lt_cv_ld_force_load" >&6; }
10226     case $host_os in
10227     rhapsody* | darwin1.[012])
10228       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10229     darwin1.*)
10230       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10231     darwin*) # darwin 5.x on
10232       # if running on 10.5 or later, the deployment target defaults
10233       # to the OS version, if on x86, and 10.4, the deployment
10234       # target defaults to 10.4. Don't you love it?
10235       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10236         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10237           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10238         10.[012][,.]*)
10239           _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10240         10.*)
10241           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10242       esac
10243     ;;
10244   esac
10245     if test yes = "$lt_cv_apple_cc_single_mod"; then
10246       _lt_dar_single_mod='$single_module'
10247     fi
10248     if test yes = "$lt_cv_ld_exported_symbols_list"; then
10249       _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10250     else
10251       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10252     fi
10253     if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10254       _lt_dsymutil='~$DSYMUTIL $lib || :'
10255     else
10256       _lt_dsymutil=
10257     fi
10258     ;;
10259   esac
10260
10261 # func_munge_path_list VARIABLE PATH
10262 # -----------------------------------
10263 # VARIABLE is name of variable containing _space_ separated list of
10264 # directories to be munged by the contents of PATH, which is string
10265 # having a format:
10266 # "DIR[:DIR]:"
10267 #       string "DIR[ DIR]" will be prepended to VARIABLE
10268 # ":DIR[:DIR]"
10269 #       string "DIR[ DIR]" will be appended to VARIABLE
10270 # "DIRP[:DIRP]::[DIRA:]DIRA"
10271 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10272 #       "DIRA[ DIRA]" will be appended to VARIABLE
10273 # "DIR[:DIR]"
10274 #       VARIABLE will be replaced by "DIR[ DIR]"
10275 func_munge_path_list ()
10276 {
10277     case x$2 in
10278     x)
10279         ;;
10280     *:)
10281         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10282         ;;
10283     x:*)
10284         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10285         ;;
10286     *::*)
10287         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10288         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10289         ;;
10290     *)
10291         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10292         ;;
10293     esac
10294 }
10295
10296 for ac_header in dlfcn.h
10297 do :
10298   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10299 "
10300 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
10301   cat >>confdefs.h <<_ACEOF
10302 #define HAVE_DLFCN_H 1
10303 _ACEOF
10304
10305 fi
10306
10307 done
10308
10309
10310
10311
10312
10313 # Set options
10314
10315
10316
10317         enable_dlopen=no
10318
10319
10320   enable_win32_dll=no
10321
10322
10323
10324   # Check whether --enable-static was given.
10325 if test "${enable_static+set}" = set; then :
10326   enableval=$enable_static; p=${PACKAGE-default}
10327     case $enableval in
10328     yes) enable_static=yes ;;
10329     no) enable_static=no ;;
10330     *)
10331      enable_static=no
10332       # Look at the argument we got.  We use all the common list separators.
10333       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10334       for pkg in $enableval; do
10335         IFS=$lt_save_ifs
10336         if test "X$pkg" = "X$p"; then
10337           enable_static=yes
10338         fi
10339       done
10340       IFS=$lt_save_ifs
10341       ;;
10342     esac
10343 else
10344   enable_static=yes
10345 fi
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356 # Check whether --with-pic was given.
10357 if test "${with_pic+set}" = set; then :
10358   withval=$with_pic; lt_p=${PACKAGE-default}
10359     case $withval in
10360     yes|no) pic_mode=$withval ;;
10361     *)
10362       pic_mode=default
10363       # Look at the argument we got.  We use all the common list separators.
10364       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10365       for lt_pkg in $withval; do
10366         IFS=$lt_save_ifs
10367         if test "X$lt_pkg" = "X$lt_p"; then
10368           pic_mode=yes
10369         fi
10370       done
10371       IFS=$lt_save_ifs
10372       ;;
10373     esac
10374 else
10375   pic_mode=default
10376 fi
10377
10378
10379
10380
10381
10382
10383
10384
10385   # Check whether --enable-fast-install was given.
10386 if test "${enable_fast_install+set}" = set; then :
10387   enableval=$enable_fast_install; p=${PACKAGE-default}
10388     case $enableval in
10389     yes) enable_fast_install=yes ;;
10390     no) enable_fast_install=no ;;
10391     *)
10392       enable_fast_install=no
10393       # Look at the argument we got.  We use all the common list separators.
10394       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10395       for pkg in $enableval; do
10396         IFS=$lt_save_ifs
10397         if test "X$pkg" = "X$p"; then
10398           enable_fast_install=yes
10399         fi
10400       done
10401       IFS=$lt_save_ifs
10402       ;;
10403     esac
10404 else
10405   enable_fast_install=yes
10406 fi
10407
10408
10409
10410
10411
10412
10413
10414
10415   shared_archive_member_spec=
10416 case $host,$enable_shared in
10417 power*-*-aix[5-9]*,yes)
10418   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10419 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10420
10421 # Check whether --with-aix-soname was given.
10422 if test "${with_aix_soname+set}" = set; then :
10423   withval=$with_aix_soname; case $withval in
10424     aix|svr4|both)
10425       ;;
10426     *)
10427       as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10428       ;;
10429     esac
10430     lt_cv_with_aix_soname=$with_aix_soname
10431 else
10432   if ${lt_cv_with_aix_soname+:} false; then :
10433   $as_echo_n "(cached) " >&6
10434 else
10435   lt_cv_with_aix_soname=aix
10436 fi
10437
10438     with_aix_soname=$lt_cv_with_aix_soname
10439 fi
10440
10441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10442 $as_echo "$with_aix_soname" >&6; }
10443   if test aix != "$with_aix_soname"; then
10444     # For the AIX way of multilib, we name the shared archive member
10445     # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10446     # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10447     # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10448     # the AIX toolchain works better with OBJECT_MODE set (default 32).
10449     if test 64 = "${OBJECT_MODE-32}"; then
10450       shared_archive_member_spec=shr_64
10451     else
10452       shared_archive_member_spec=shr
10453     fi
10454   fi
10455   ;;
10456 *)
10457   with_aix_soname=aix
10458   ;;
10459 esac
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470 # This can be used to rebuild libtool when needed
10471 LIBTOOL_DEPS=$ltmain
10472
10473 # Always use our own libtool.
10474 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505 test -z "$LN_S" && LN_S="ln -s"
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520 if test -n "${ZSH_VERSION+set}"; then
10521    setopt NO_GLOB_SUBST
10522 fi
10523
10524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10525 $as_echo_n "checking for objdir... " >&6; }
10526 if ${lt_cv_objdir+:} false; then :
10527   $as_echo_n "(cached) " >&6
10528 else
10529   rm -f .libs 2>/dev/null
10530 mkdir .libs 2>/dev/null
10531 if test -d .libs; then
10532   lt_cv_objdir=.libs
10533 else
10534   # MS-DOS does not allow filenames that begin with a dot.
10535   lt_cv_objdir=_libs
10536 fi
10537 rmdir .libs 2>/dev/null
10538 fi
10539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10540 $as_echo "$lt_cv_objdir" >&6; }
10541 objdir=$lt_cv_objdir
10542
10543
10544
10545
10546
10547 cat >>confdefs.h <<_ACEOF
10548 #define LT_OBJDIR "$lt_cv_objdir/"
10549 _ACEOF
10550
10551
10552
10553
10554 case $host_os in
10555 aix3*)
10556   # AIX sometimes has problems with the GCC collect2 program.  For some
10557   # reason, if we set the COLLECT_NAMES environment variable, the problems
10558   # vanish in a puff of smoke.
10559   if test set != "${COLLECT_NAMES+set}"; then
10560     COLLECT_NAMES=
10561     export COLLECT_NAMES
10562   fi
10563   ;;
10564 esac
10565
10566 # Global variables:
10567 ofile=libtool
10568 can_build_shared=yes
10569
10570 # All known linkers require a '.a' archive for static linking (except MSVC,
10571 # which needs '.lib').
10572 libext=a
10573
10574 with_gnu_ld=$lt_cv_prog_gnu_ld
10575
10576 old_CC=$CC
10577 old_CFLAGS=$CFLAGS
10578
10579 # Set sane defaults for various variables
10580 test -z "$CC" && CC=cc
10581 test -z "$LTCC" && LTCC=$CC
10582 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10583 test -z "$LD" && LD=ld
10584 test -z "$ac_objext" && ac_objext=o
10585
10586 func_cc_basename $compiler
10587 cc_basename=$func_cc_basename_result
10588
10589
10590 # Only perform the check for file, if the check method requires it
10591 test -z "$MAGIC_CMD" && MAGIC_CMD=file
10592 case $deplibs_check_method in
10593 file_magic*)
10594   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10595     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10596 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10597 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10598   $as_echo_n "(cached) " >&6
10599 else
10600   case $MAGIC_CMD in
10601 [\\/*] |  ?:[\\/]*)
10602   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10603   ;;
10604 *)
10605   lt_save_MAGIC_CMD=$MAGIC_CMD
10606   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10607   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10608   for ac_dir in $ac_dummy; do
10609     IFS=$lt_save_ifs
10610     test -z "$ac_dir" && ac_dir=.
10611     if test -f "$ac_dir/${ac_tool_prefix}file"; then
10612       lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10613       if test -n "$file_magic_test_file"; then
10614         case $deplibs_check_method in
10615         "file_magic "*)
10616           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10617           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10618           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10619             $EGREP "$file_magic_regex" > /dev/null; then
10620             :
10621           else
10622             cat <<_LT_EOF 1>&2
10623
10624 *** Warning: the command libtool uses to detect shared libraries,
10625 *** $file_magic_cmd, produces output that libtool cannot recognize.
10626 *** The result is that libtool may fail to recognize shared libraries
10627 *** as such.  This will affect the creation of libtool libraries that
10628 *** depend on shared libraries, but programs linked with such libtool
10629 *** libraries will work regardless of this problem.  Nevertheless, you
10630 *** may want to report the problem to your system manager and/or to
10631 *** bug-libtool@gnu.org
10632
10633 _LT_EOF
10634           fi ;;
10635         esac
10636       fi
10637       break
10638     fi
10639   done
10640   IFS=$lt_save_ifs
10641   MAGIC_CMD=$lt_save_MAGIC_CMD
10642   ;;
10643 esac
10644 fi
10645
10646 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10647 if test -n "$MAGIC_CMD"; then
10648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10649 $as_echo "$MAGIC_CMD" >&6; }
10650 else
10651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10652 $as_echo "no" >&6; }
10653 fi
10654
10655
10656
10657
10658
10659 if test -z "$lt_cv_path_MAGIC_CMD"; then
10660   if test -n "$ac_tool_prefix"; then
10661     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10662 $as_echo_n "checking for file... " >&6; }
10663 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10664   $as_echo_n "(cached) " >&6
10665 else
10666   case $MAGIC_CMD in
10667 [\\/*] |  ?:[\\/]*)
10668   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10669   ;;
10670 *)
10671   lt_save_MAGIC_CMD=$MAGIC_CMD
10672   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10673   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10674   for ac_dir in $ac_dummy; do
10675     IFS=$lt_save_ifs
10676     test -z "$ac_dir" && ac_dir=.
10677     if test -f "$ac_dir/file"; then
10678       lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10679       if test -n "$file_magic_test_file"; then
10680         case $deplibs_check_method in
10681         "file_magic "*)
10682           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10683           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10684           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10685             $EGREP "$file_magic_regex" > /dev/null; then
10686             :
10687           else
10688             cat <<_LT_EOF 1>&2
10689
10690 *** Warning: the command libtool uses to detect shared libraries,
10691 *** $file_magic_cmd, produces output that libtool cannot recognize.
10692 *** The result is that libtool may fail to recognize shared libraries
10693 *** as such.  This will affect the creation of libtool libraries that
10694 *** depend on shared libraries, but programs linked with such libtool
10695 *** libraries will work regardless of this problem.  Nevertheless, you
10696 *** may want to report the problem to your system manager and/or to
10697 *** bug-libtool@gnu.org
10698
10699 _LT_EOF
10700           fi ;;
10701         esac
10702       fi
10703       break
10704     fi
10705   done
10706   IFS=$lt_save_ifs
10707   MAGIC_CMD=$lt_save_MAGIC_CMD
10708   ;;
10709 esac
10710 fi
10711
10712 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10713 if test -n "$MAGIC_CMD"; then
10714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10715 $as_echo "$MAGIC_CMD" >&6; }
10716 else
10717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10718 $as_echo "no" >&6; }
10719 fi
10720
10721
10722   else
10723     MAGIC_CMD=:
10724   fi
10725 fi
10726
10727   fi
10728   ;;
10729 esac
10730
10731 # Use C for the default configuration in the libtool script
10732
10733 lt_save_CC=$CC
10734 ac_ext=c
10735 ac_cpp='$CPP $CPPFLAGS'
10736 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10737 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10738 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10739
10740
10741 # Source file extension for C test sources.
10742 ac_ext=c
10743
10744 # Object file extension for compiled C test sources.
10745 objext=o
10746 objext=$objext
10747
10748 # Code to be used in simple compile tests
10749 lt_simple_compile_test_code="int some_variable = 0;"
10750
10751 # Code to be used in simple link tests
10752 lt_simple_link_test_code='int main(){return(0);}'
10753
10754
10755
10756
10757
10758
10759
10760 # If no C compiler was specified, use CC.
10761 LTCC=${LTCC-"$CC"}
10762
10763 # If no C compiler flags were specified, use CFLAGS.
10764 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10765
10766 # Allow CC to be a program name with arguments.
10767 compiler=$CC
10768
10769 # Save the default compiler, since it gets overwritten when the other
10770 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10771 compiler_DEFAULT=$CC
10772
10773 # save warnings/boilerplate of simple test code
10774 ac_outfile=conftest.$ac_objext
10775 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10776 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10777 _lt_compiler_boilerplate=`cat conftest.err`
10778 $RM conftest*
10779
10780 ac_outfile=conftest.$ac_objext
10781 echo "$lt_simple_link_test_code" >conftest.$ac_ext
10782 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10783 _lt_linker_boilerplate=`cat conftest.err`
10784 $RM -r conftest*
10785
10786
10787 ## CAVEAT EMPTOR:
10788 ## There is no encapsulation within the following macros, do not change
10789 ## the running order or otherwise move them around unless you know exactly
10790 ## what you are doing...
10791 if test -n "$compiler"; then
10792
10793 lt_prog_compiler_no_builtin_flag=
10794
10795 if test yes = "$GCC"; then
10796   case $cc_basename in
10797   nvcc*)
10798     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10799   *)
10800     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10801   esac
10802
10803   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10804 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10805 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10806   $as_echo_n "(cached) " >&6
10807 else
10808   lt_cv_prog_compiler_rtti_exceptions=no
10809    ac_outfile=conftest.$ac_objext
10810    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10811    lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10812    # Insert the option either (1) after the last *FLAGS variable, or
10813    # (2) before a word containing "conftest.", or (3) at the end.
10814    # Note that $ac_compile itself does not contain backslashes and begins
10815    # with a dollar sign (not a hyphen), so the echo should work correctly.
10816    # The option is referenced via a variable to avoid confusing sed.
10817    lt_compile=`echo "$ac_compile" | $SED \
10818    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10819    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10820    -e 's:$: $lt_compiler_flag:'`
10821    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10822    (eval "$lt_compile" 2>conftest.err)
10823    ac_status=$?
10824    cat conftest.err >&5
10825    echo "$as_me:$LINENO: \$? = $ac_status" >&5
10826    if (exit $ac_status) && test -s "$ac_outfile"; then
10827      # The compiler can only warn and ignore the option if not recognized
10828      # So say no if there are warnings other than the usual output.
10829      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10830      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10831      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10832        lt_cv_prog_compiler_rtti_exceptions=yes
10833      fi
10834    fi
10835    $RM conftest*
10836
10837 fi
10838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10839 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10840
10841 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10842     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10843 else
10844     :
10845 fi
10846
10847 fi
10848
10849
10850
10851
10852
10853
10854   lt_prog_compiler_wl=
10855 lt_prog_compiler_pic=
10856 lt_prog_compiler_static=
10857
10858
10859   if test yes = "$GCC"; then
10860     lt_prog_compiler_wl='-Wl,'
10861     lt_prog_compiler_static='-static'
10862
10863     case $host_os in
10864       aix*)
10865       # All AIX code is PIC.
10866       if test ia64 = "$host_cpu"; then
10867         # AIX 5 now supports IA64 processor
10868         lt_prog_compiler_static='-Bstatic'
10869       fi
10870       lt_prog_compiler_pic='-fPIC'
10871       ;;
10872
10873     amigaos*)
10874       case $host_cpu in
10875       powerpc)
10876             # see comment about AmigaOS4 .so support
10877             lt_prog_compiler_pic='-fPIC'
10878         ;;
10879       m68k)
10880             # FIXME: we need at least 68020 code to build shared libraries, but
10881             # adding the '-m68020' flag to GCC prevents building anything better,
10882             # like '-m68040'.
10883             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10884         ;;
10885       esac
10886       ;;
10887
10888     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10889       # PIC is the default for these OSes.
10890       ;;
10891
10892     mingw* | cygwin* | pw32* | os2* | cegcc*)
10893       # This hack is so that the source file can tell whether it is being
10894       # built for inclusion in a dll (and should export symbols for example).
10895       # Although the cygwin gcc ignores -fPIC, still need this for old-style
10896       # (--disable-auto-import) libraries
10897       lt_prog_compiler_pic='-DDLL_EXPORT'
10898       case $host_os in
10899       os2*)
10900         lt_prog_compiler_static='$wl-static'
10901         ;;
10902       esac
10903       ;;
10904
10905     darwin* | rhapsody*)
10906       # PIC is the default on this platform
10907       # Common symbols not allowed in MH_DYLIB files
10908       lt_prog_compiler_pic='-fno-common'
10909       ;;
10910
10911     haiku*)
10912       # PIC is the default for Haiku.
10913       # The "-static" flag exists, but is broken.
10914       lt_prog_compiler_static=
10915       ;;
10916
10917     hpux*)
10918       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10919       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10920       # sets the default TLS model and affects inlining.
10921       case $host_cpu in
10922       hppa*64*)
10923         # +Z the default
10924         ;;
10925       *)
10926         lt_prog_compiler_pic='-fPIC'
10927         ;;
10928       esac
10929       ;;
10930
10931     interix[3-9]*)
10932       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10933       # Instead, we relocate shared libraries at runtime.
10934       ;;
10935
10936     msdosdjgpp*)
10937       # Just because we use GCC doesn't mean we suddenly get shared libraries
10938       # on systems that don't support them.
10939       lt_prog_compiler_can_build_shared=no
10940       enable_shared=no
10941       ;;
10942
10943     *nto* | *qnx*)
10944       # QNX uses GNU C++, but need to define -shared option too, otherwise
10945       # it will coredump.
10946       lt_prog_compiler_pic='-fPIC -shared'
10947       ;;
10948
10949     sysv4*MP*)
10950       if test -d /usr/nec; then
10951         lt_prog_compiler_pic=-Kconform_pic
10952       fi
10953       ;;
10954
10955     *)
10956       lt_prog_compiler_pic='-fPIC'
10957       ;;
10958     esac
10959
10960     case $cc_basename in
10961     nvcc*) # Cuda Compiler Driver 2.2
10962       lt_prog_compiler_wl='-Xlinker '
10963       if test -n "$lt_prog_compiler_pic"; then
10964         lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10965       fi
10966       ;;
10967     esac
10968   else
10969     # PORTME Check for flag to pass linker flags through the system compiler.
10970     case $host_os in
10971     aix*)
10972       lt_prog_compiler_wl='-Wl,'
10973       if test ia64 = "$host_cpu"; then
10974         # AIX 5 now supports IA64 processor
10975         lt_prog_compiler_static='-Bstatic'
10976       else
10977         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
10978       fi
10979       ;;
10980
10981     darwin* | rhapsody*)
10982       # PIC is the default on this platform
10983       # Common symbols not allowed in MH_DYLIB files
10984       lt_prog_compiler_pic='-fno-common'
10985       case $cc_basename in
10986       nagfor*)
10987         # NAG Fortran compiler
10988         lt_prog_compiler_wl='-Wl,-Wl,,'
10989         lt_prog_compiler_pic='-PIC'
10990         lt_prog_compiler_static='-Bstatic'
10991         ;;
10992       esac
10993       ;;
10994
10995     mingw* | cygwin* | pw32* | os2* | cegcc*)
10996       # This hack is so that the source file can tell whether it is being
10997       # built for inclusion in a dll (and should export symbols for example).
10998       lt_prog_compiler_pic='-DDLL_EXPORT'
10999       case $host_os in
11000       os2*)
11001         lt_prog_compiler_static='$wl-static'
11002         ;;
11003       esac
11004       ;;
11005
11006     hpux9* | hpux10* | hpux11*)
11007       lt_prog_compiler_wl='-Wl,'
11008       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11009       # not for PA HP-UX.
11010       case $host_cpu in
11011       hppa*64*|ia64*)
11012         # +Z the default
11013         ;;
11014       *)
11015         lt_prog_compiler_pic='+Z'
11016         ;;
11017       esac
11018       # Is there a better lt_prog_compiler_static that works with the bundled CC?
11019       lt_prog_compiler_static='$wl-a ${wl}archive'
11020       ;;
11021
11022     irix5* | irix6* | nonstopux*)
11023       lt_prog_compiler_wl='-Wl,'
11024       # PIC (with -KPIC) is the default.
11025       lt_prog_compiler_static='-non_shared'
11026       ;;
11027
11028     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11029       case $cc_basename in
11030       # old Intel for x86_64, which still supported -KPIC.
11031       ecc*)
11032         lt_prog_compiler_wl='-Wl,'
11033         lt_prog_compiler_pic='-KPIC'
11034         lt_prog_compiler_static='-static'
11035         ;;
11036       # icc used to be incompatible with GCC.
11037       # ICC 10 doesn't accept -KPIC any more.
11038       icc* | ifort*)
11039         lt_prog_compiler_wl='-Wl,'
11040         lt_prog_compiler_pic='-fPIC'
11041         lt_prog_compiler_static='-static'
11042         ;;
11043       # Lahey Fortran 8.1.
11044       lf95*)
11045         lt_prog_compiler_wl='-Wl,'
11046         lt_prog_compiler_pic='--shared'
11047         lt_prog_compiler_static='--static'
11048         ;;
11049       nagfor*)
11050         # NAG Fortran compiler
11051         lt_prog_compiler_wl='-Wl,-Wl,,'
11052         lt_prog_compiler_pic='-PIC'
11053         lt_prog_compiler_static='-Bstatic'
11054         ;;
11055       tcc*)
11056         # Fabrice Bellard et al's Tiny C Compiler
11057         lt_prog_compiler_wl='-Wl,'
11058         lt_prog_compiler_pic='-fPIC'
11059         lt_prog_compiler_static='-static'
11060         ;;
11061       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
11062         # Portland Group compilers (*not* the Pentium gcc compiler,
11063         # which looks to be a dead project)
11064         lt_prog_compiler_wl='-Wl,'
11065         lt_prog_compiler_pic='-fpic'
11066         lt_prog_compiler_static='-Bstatic'
11067         ;;
11068       ccc*)
11069         lt_prog_compiler_wl='-Wl,'
11070         # All Alpha code is PIC.
11071         lt_prog_compiler_static='-non_shared'
11072         ;;
11073       xl* | bgxl* | bgf* | mpixl*)
11074         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
11075         lt_prog_compiler_wl='-Wl,'
11076         lt_prog_compiler_pic='-qpic'
11077         lt_prog_compiler_static='-qstaticlink'
11078         ;;
11079       *)
11080         case `$CC -V 2>&1 | sed 5q` in
11081         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
11082           # Sun Fortran 8.3 passes all unrecognized flags to the linker
11083           lt_prog_compiler_pic='-KPIC'
11084           lt_prog_compiler_static='-Bstatic'
11085           lt_prog_compiler_wl=''
11086           ;;
11087         *Sun\ F* | *Sun*Fortran*)
11088           lt_prog_compiler_pic='-KPIC'
11089           lt_prog_compiler_static='-Bstatic'
11090           lt_prog_compiler_wl='-Qoption ld '
11091           ;;
11092         *Sun\ C*)
11093           # Sun C 5.9
11094           lt_prog_compiler_pic='-KPIC'
11095           lt_prog_compiler_static='-Bstatic'
11096           lt_prog_compiler_wl='-Wl,'
11097           ;;
11098         *Intel*\ [CF]*Compiler*)
11099           lt_prog_compiler_wl='-Wl,'
11100           lt_prog_compiler_pic='-fPIC'
11101           lt_prog_compiler_static='-static'
11102           ;;
11103         *Portland\ Group*)
11104           lt_prog_compiler_wl='-Wl,'
11105           lt_prog_compiler_pic='-fpic'
11106           lt_prog_compiler_static='-Bstatic'
11107           ;;
11108         esac
11109         ;;
11110       esac
11111       ;;
11112
11113     newsos6)
11114       lt_prog_compiler_pic='-KPIC'
11115       lt_prog_compiler_static='-Bstatic'
11116       ;;
11117
11118     *nto* | *qnx*)
11119       # QNX uses GNU C++, but need to define -shared option too, otherwise
11120       # it will coredump.
11121       lt_prog_compiler_pic='-fPIC -shared'
11122       ;;
11123
11124     osf3* | osf4* | osf5*)
11125       lt_prog_compiler_wl='-Wl,'
11126       # All OSF/1 code is PIC.
11127       lt_prog_compiler_static='-non_shared'
11128       ;;
11129
11130     rdos*)
11131       lt_prog_compiler_static='-non_shared'
11132       ;;
11133
11134     solaris*)
11135       lt_prog_compiler_pic='-KPIC'
11136       lt_prog_compiler_static='-Bstatic'
11137       case $cc_basename in
11138       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
11139         lt_prog_compiler_wl='-Qoption ld ';;
11140       *)
11141         lt_prog_compiler_wl='-Wl,';;
11142       esac
11143       ;;
11144
11145     sunos4*)
11146       lt_prog_compiler_wl='-Qoption ld '
11147       lt_prog_compiler_pic='-PIC'
11148       lt_prog_compiler_static='-Bstatic'
11149       ;;
11150
11151     sysv4 | sysv4.2uw2* | sysv4.3*)
11152       lt_prog_compiler_wl='-Wl,'
11153       lt_prog_compiler_pic='-KPIC'
11154       lt_prog_compiler_static='-Bstatic'
11155       ;;
11156
11157     sysv4*MP*)
11158       if test -d /usr/nec; then
11159         lt_prog_compiler_pic='-Kconform_pic'
11160         lt_prog_compiler_static='-Bstatic'
11161       fi
11162       ;;
11163
11164     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11165       lt_prog_compiler_wl='-Wl,'
11166       lt_prog_compiler_pic='-KPIC'
11167       lt_prog_compiler_static='-Bstatic'
11168       ;;
11169
11170     unicos*)
11171       lt_prog_compiler_wl='-Wl,'
11172       lt_prog_compiler_can_build_shared=no
11173       ;;
11174
11175     uts4*)
11176       lt_prog_compiler_pic='-pic'
11177       lt_prog_compiler_static='-Bstatic'
11178       ;;
11179
11180     *)
11181       lt_prog_compiler_can_build_shared=no
11182       ;;
11183     esac
11184   fi
11185
11186 case $host_os in
11187   # For platforms that do not support PIC, -DPIC is meaningless:
11188   *djgpp*)
11189     lt_prog_compiler_pic=
11190     ;;
11191   *)
11192     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11193     ;;
11194 esac
11195
11196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11197 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11198 if ${lt_cv_prog_compiler_pic+:} false; then :
11199   $as_echo_n "(cached) " >&6
11200 else
11201   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11202 fi
11203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11204 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
11205 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11206
11207 #
11208 # Check to make sure the PIC flag actually works.
11209 #
11210 if test -n "$lt_prog_compiler_pic"; then
11211   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11212 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11213 if ${lt_cv_prog_compiler_pic_works+:} false; then :
11214   $as_echo_n "(cached) " >&6
11215 else
11216   lt_cv_prog_compiler_pic_works=no
11217    ac_outfile=conftest.$ac_objext
11218    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11219    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
11220    # Insert the option either (1) after the last *FLAGS variable, or
11221    # (2) before a word containing "conftest.", or (3) at the end.
11222    # Note that $ac_compile itself does not contain backslashes and begins
11223    # with a dollar sign (not a hyphen), so the echo should work correctly.
11224    # The option is referenced via a variable to avoid confusing sed.
11225    lt_compile=`echo "$ac_compile" | $SED \
11226    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11227    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11228    -e 's:$: $lt_compiler_flag:'`
11229    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11230    (eval "$lt_compile" 2>conftest.err)
11231    ac_status=$?
11232    cat conftest.err >&5
11233    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11234    if (exit $ac_status) && test -s "$ac_outfile"; then
11235      # The compiler can only warn and ignore the option if not recognized
11236      # So say no if there are warnings other than the usual output.
11237      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11238      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11239      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11240        lt_cv_prog_compiler_pic_works=yes
11241      fi
11242    fi
11243    $RM conftest*
11244
11245 fi
11246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11247 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
11248
11249 if test yes = "$lt_cv_prog_compiler_pic_works"; then
11250     case $lt_prog_compiler_pic in
11251      "" | " "*) ;;
11252      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11253      esac
11254 else
11255     lt_prog_compiler_pic=
11256      lt_prog_compiler_can_build_shared=no
11257 fi
11258
11259 fi
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271 #
11272 # Check to make sure the static flag actually works.
11273 #
11274 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11276 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11277 if ${lt_cv_prog_compiler_static_works+:} false; then :
11278   $as_echo_n "(cached) " >&6
11279 else
11280   lt_cv_prog_compiler_static_works=no
11281    save_LDFLAGS=$LDFLAGS
11282    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11283    echo "$lt_simple_link_test_code" > conftest.$ac_ext
11284    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11285      # The linker can only warn and ignore the option if not recognized
11286      # So say no if there are warnings
11287      if test -s conftest.err; then
11288        # Append any errors to the config.log.
11289        cat conftest.err 1>&5
11290        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11291        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11292        if diff conftest.exp conftest.er2 >/dev/null; then
11293          lt_cv_prog_compiler_static_works=yes
11294        fi
11295      else
11296        lt_cv_prog_compiler_static_works=yes
11297      fi
11298    fi
11299    $RM -r conftest*
11300    LDFLAGS=$save_LDFLAGS
11301
11302 fi
11303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11304 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
11305
11306 if test yes = "$lt_cv_prog_compiler_static_works"; then
11307     :
11308 else
11309     lt_prog_compiler_static=
11310 fi
11311
11312
11313
11314
11315
11316
11317
11318   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11319 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11320 if ${lt_cv_prog_compiler_c_o+:} false; then :
11321   $as_echo_n "(cached) " >&6
11322 else
11323   lt_cv_prog_compiler_c_o=no
11324    $RM -r conftest 2>/dev/null
11325    mkdir conftest
11326    cd conftest
11327    mkdir out
11328    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11329
11330    lt_compiler_flag="-o out/conftest2.$ac_objext"
11331    # Insert the option either (1) after the last *FLAGS variable, or
11332    # (2) before a word containing "conftest.", or (3) at the end.
11333    # Note that $ac_compile itself does not contain backslashes and begins
11334    # with a dollar sign (not a hyphen), so the echo should work correctly.
11335    lt_compile=`echo "$ac_compile" | $SED \
11336    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11337    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11338    -e 's:$: $lt_compiler_flag:'`
11339    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11340    (eval "$lt_compile" 2>out/conftest.err)
11341    ac_status=$?
11342    cat out/conftest.err >&5
11343    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11344    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11345    then
11346      # The compiler can only warn and ignore the option if not recognized
11347      # So say no if there are warnings
11348      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11349      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11350      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11351        lt_cv_prog_compiler_c_o=yes
11352      fi
11353    fi
11354    chmod u+w . 2>&5
11355    $RM conftest*
11356    # SGI C++ compiler will create directory out/ii_files/ for
11357    # template instantiation
11358    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11359    $RM out/* && rmdir out
11360    cd ..
11361    $RM -r conftest
11362    $RM conftest*
11363
11364 fi
11365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11366 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11367
11368
11369
11370
11371
11372
11373   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11374 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11375 if ${lt_cv_prog_compiler_c_o+:} false; then :
11376   $as_echo_n "(cached) " >&6
11377 else
11378   lt_cv_prog_compiler_c_o=no
11379    $RM -r conftest 2>/dev/null
11380    mkdir conftest
11381    cd conftest
11382    mkdir out
11383    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11384
11385    lt_compiler_flag="-o out/conftest2.$ac_objext"
11386    # Insert the option either (1) after the last *FLAGS variable, or
11387    # (2) before a word containing "conftest.", or (3) at the end.
11388    # Note that $ac_compile itself does not contain backslashes and begins
11389    # with a dollar sign (not a hyphen), so the echo should work correctly.
11390    lt_compile=`echo "$ac_compile" | $SED \
11391    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11392    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11393    -e 's:$: $lt_compiler_flag:'`
11394    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11395    (eval "$lt_compile" 2>out/conftest.err)
11396    ac_status=$?
11397    cat out/conftest.err >&5
11398    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11399    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11400    then
11401      # The compiler can only warn and ignore the option if not recognized
11402      # So say no if there are warnings
11403      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11404      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11405      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11406        lt_cv_prog_compiler_c_o=yes
11407      fi
11408    fi
11409    chmod u+w . 2>&5
11410    $RM conftest*
11411    # SGI C++ compiler will create directory out/ii_files/ for
11412    # template instantiation
11413    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11414    $RM out/* && rmdir out
11415    cd ..
11416    $RM -r conftest
11417    $RM conftest*
11418
11419 fi
11420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11421 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11422
11423
11424
11425
11426 hard_links=nottested
11427 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11428   # do not overwrite the value of need_locks provided by the user
11429   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11430 $as_echo_n "checking if we can lock with hard links... " >&6; }
11431   hard_links=yes
11432   $RM conftest*
11433   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11434   touch conftest.a
11435   ln conftest.a conftest.b 2>&5 || hard_links=no
11436   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11438 $as_echo "$hard_links" >&6; }
11439   if test no = "$hard_links"; then
11440     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11441 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11442     need_locks=warn
11443   fi
11444 else
11445   need_locks=no
11446 fi
11447
11448
11449
11450
11451
11452
11453   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11454 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11455
11456   runpath_var=
11457   allow_undefined_flag=
11458   always_export_symbols=no
11459   archive_cmds=
11460   archive_expsym_cmds=
11461   compiler_needs_object=no
11462   enable_shared_with_static_runtimes=no
11463   export_dynamic_flag_spec=
11464   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11465   hardcode_automatic=no
11466   hardcode_direct=no
11467   hardcode_direct_absolute=no
11468   hardcode_libdir_flag_spec=
11469   hardcode_libdir_separator=
11470   hardcode_minus_L=no
11471   hardcode_shlibpath_var=unsupported
11472   inherit_rpath=no
11473   link_all_deplibs=unknown
11474   module_cmds=
11475   module_expsym_cmds=
11476   old_archive_from_new_cmds=
11477   old_archive_from_expsyms_cmds=
11478   thread_safe_flag_spec=
11479   whole_archive_flag_spec=
11480   # include_expsyms should be a list of space-separated symbols to be *always*
11481   # included in the symbol list
11482   include_expsyms=
11483   # exclude_expsyms can be an extended regexp of symbols to exclude
11484   # it will be wrapped by ' (' and ')$', so one must not match beginning or
11485   # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11486   # as well as any symbol that contains 'd'.
11487   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11488   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11489   # platforms (ab)use it in PIC code, but their linkers get confused if
11490   # the symbol is explicitly referenced.  Since portable code cannot
11491   # rely on this symbol name, it's probably fine to never include it in
11492   # preloaded symbol tables.
11493   # Exclude shared library initialization/finalization symbols.
11494   extract_expsyms_cmds=
11495
11496   case $host_os in
11497   cygwin* | mingw* | pw32* | cegcc*)
11498     # FIXME: the MSVC++ port hasn't been tested in a loooong time
11499     # When not using gcc, we currently assume that we are using
11500     # Microsoft Visual C++.
11501     if test yes != "$GCC"; then
11502       with_gnu_ld=no
11503     fi
11504     ;;
11505   interix*)
11506     # we just hope/assume this is gcc and not c89 (= MSVC++)
11507     with_gnu_ld=yes
11508     ;;
11509   openbsd* | bitrig*)
11510     with_gnu_ld=no
11511     ;;
11512   esac
11513
11514   ld_shlibs=yes
11515
11516   # On some targets, GNU ld is compatible enough with the native linker
11517   # that we're better off using the native interface for both.
11518   lt_use_gnu_ld_interface=no
11519   if test yes = "$with_gnu_ld"; then
11520     case $host_os in
11521       aix*)
11522         # The AIX port of GNU ld has always aspired to compatibility
11523         # with the native linker.  However, as the warning in the GNU ld
11524         # block says, versions before 2.19.5* couldn't really create working
11525         # shared libraries, regardless of the interface used.
11526         case `$LD -v 2>&1` in
11527           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11528           *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11529           *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11530           *)
11531             lt_use_gnu_ld_interface=yes
11532             ;;
11533         esac
11534         ;;
11535       *)
11536         lt_use_gnu_ld_interface=yes
11537         ;;
11538     esac
11539   fi
11540
11541   if test yes = "$lt_use_gnu_ld_interface"; then
11542     # If archive_cmds runs LD, not CC, wlarc should be empty
11543     wlarc='$wl'
11544
11545     # Set some defaults for GNU ld with shared library support. These
11546     # are reset later if shared libraries are not supported. Putting them
11547     # here allows them to be overridden if necessary.
11548     runpath_var=LD_RUN_PATH
11549     hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11550     export_dynamic_flag_spec='$wl--export-dynamic'
11551     # ancient GNU ld didn't support --whole-archive et. al.
11552     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11553       whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11554     else
11555       whole_archive_flag_spec=
11556     fi
11557     supports_anon_versioning=no
11558     case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11559       *GNU\ gold*) supports_anon_versioning=yes ;;
11560       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11561       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11562       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11563       *\ 2.11.*) ;; # other 2.11 versions
11564       *) supports_anon_versioning=yes ;;
11565     esac
11566
11567     # See if GNU ld supports shared libraries.
11568     case $host_os in
11569     aix[3-9]*)
11570       # On AIX/PPC, the GNU linker is very broken
11571       if test ia64 != "$host_cpu"; then
11572         ld_shlibs=no
11573         cat <<_LT_EOF 1>&2
11574
11575 *** Warning: the GNU linker, at least up to release 2.19, is reported
11576 *** to be unable to reliably create shared libraries on AIX.
11577 *** Therefore, libtool is disabling shared libraries support.  If you
11578 *** really care for shared libraries, you may want to install binutils
11579 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11580 *** You will then need to restart the configuration process.
11581
11582 _LT_EOF
11583       fi
11584       ;;
11585
11586     amigaos*)
11587       case $host_cpu in
11588       powerpc)
11589             # see comment about AmigaOS4 .so support
11590             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11591             archive_expsym_cmds=''
11592         ;;
11593       m68k)
11594             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)'
11595             hardcode_libdir_flag_spec='-L$libdir'
11596             hardcode_minus_L=yes
11597         ;;
11598       esac
11599       ;;
11600
11601     beos*)
11602       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11603         allow_undefined_flag=unsupported
11604         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11605         # support --undefined.  This deserves some investigation.  FIXME
11606         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11607       else
11608         ld_shlibs=no
11609       fi
11610       ;;
11611
11612     cygwin* | mingw* | pw32* | cegcc*)
11613       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11614       # as there is no search path for DLLs.
11615       hardcode_libdir_flag_spec='-L$libdir'
11616       export_dynamic_flag_spec='$wl--export-all-symbols'
11617       allow_undefined_flag=unsupported
11618       always_export_symbols=no
11619       enable_shared_with_static_runtimes=yes
11620       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'
11621       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11622
11623       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11624         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11625         # If the export-symbols file already is a .def file, use it as
11626         # is; otherwise, prepend EXPORTS...
11627         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11628           cp $export_symbols $output_objdir/$soname.def;
11629         else
11630           echo EXPORTS > $output_objdir/$soname.def;
11631           cat $export_symbols >> $output_objdir/$soname.def;
11632         fi~
11633         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11634       else
11635         ld_shlibs=no
11636       fi
11637       ;;
11638
11639     haiku*)
11640       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11641       link_all_deplibs=yes
11642       ;;
11643
11644     os2*)
11645       hardcode_libdir_flag_spec='-L$libdir'
11646       hardcode_minus_L=yes
11647       allow_undefined_flag=unsupported
11648       shrext_cmds=.dll
11649       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11650         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11651         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11652         $ECHO EXPORTS >> $output_objdir/$libname.def~
11653         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11654         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11655         emximp -o $lib $output_objdir/$libname.def'
11656       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11657         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11658         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11659         $ECHO EXPORTS >> $output_objdir/$libname.def~
11660         prefix_cmds="$SED"~
11661         if test EXPORTS = "`$SED 1q $export_symbols`"; then
11662           prefix_cmds="$prefix_cmds -e 1d";
11663         fi~
11664         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11665         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11666         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11667         emximp -o $lib $output_objdir/$libname.def'
11668       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11669       enable_shared_with_static_runtimes=yes
11670       ;;
11671
11672     interix[3-9]*)
11673       hardcode_direct=no
11674       hardcode_shlibpath_var=no
11675       hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11676       export_dynamic_flag_spec='$wl-E'
11677       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11678       # Instead, shared libraries are loaded at an image base (0x10000000 by
11679       # default) and relocated if they conflict, which is a slow very memory
11680       # consuming and fragmenting process.  To avoid this, we pick a random,
11681       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11682       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11683       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11684       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'
11685       ;;
11686
11687     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11688       tmp_diet=no
11689       if test linux-dietlibc = "$host_os"; then
11690         case $cc_basename in
11691           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
11692         esac
11693       fi
11694       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11695          && test no = "$tmp_diet"
11696       then
11697         tmp_addflag=' $pic_flag'
11698         tmp_sharedflag='-shared'
11699         case $cc_basename,$host_cpu in
11700         pgcc*)                          # Portland Group C compiler
11701           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'
11702           tmp_addflag=' $pic_flag'
11703           ;;
11704         pgf77* | pgf90* | pgf95* | pgfortran*)
11705                                         # Portland Group f77 and f90 compilers
11706           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'
11707           tmp_addflag=' $pic_flag -Mnomain' ;;
11708         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
11709           tmp_addflag=' -i_dynamic' ;;
11710         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
11711           tmp_addflag=' -i_dynamic -nofor_main' ;;
11712         ifc* | ifort*)                  # Intel Fortran compiler
11713           tmp_addflag=' -nofor_main' ;;
11714         lf95*)                          # Lahey Fortran 8.1
11715           whole_archive_flag_spec=
11716           tmp_sharedflag='--shared' ;;
11717         nagfor*)                        # NAGFOR 5.3
11718           tmp_sharedflag='-Wl,-shared' ;;
11719         xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11720           tmp_sharedflag='-qmkshrobj'
11721           tmp_addflag= ;;
11722         nvcc*)  # Cuda Compiler Driver 2.2
11723           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'
11724           compiler_needs_object=yes
11725           ;;
11726         esac
11727         case `$CC -V 2>&1 | sed 5q` in
11728         *Sun\ C*)                       # Sun C 5.9
11729           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'
11730           compiler_needs_object=yes
11731           tmp_sharedflag='-G' ;;
11732         *Sun\ F*)                       # Sun Fortran 8.3
11733           tmp_sharedflag='-G' ;;
11734         esac
11735         archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11736
11737         if test yes = "$supports_anon_versioning"; then
11738           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11739             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11740             echo "local: *; };" >> $output_objdir/$libname.ver~
11741             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11742         fi
11743
11744         case $cc_basename in
11745         tcc*)
11746           export_dynamic_flag_spec='-rdynamic'
11747           ;;
11748         xlf* | bgf* | bgxlf* | mpixlf*)
11749           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11750           whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11751           hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11752           archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11753           if test yes = "$supports_anon_versioning"; then
11754             archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11755               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11756               echo "local: *; };" >> $output_objdir/$libname.ver~
11757               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11758           fi
11759           ;;
11760         esac
11761       else
11762         ld_shlibs=no
11763       fi
11764       ;;
11765
11766     netbsd*)
11767       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11768         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11769         wlarc=
11770       else
11771         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11772         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11773       fi
11774       ;;
11775
11776     solaris*)
11777       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11778         ld_shlibs=no
11779         cat <<_LT_EOF 1>&2
11780
11781 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
11782 *** create shared libraries on Solaris systems.  Therefore, libtool
11783 *** is disabling shared libraries support.  We urge you to upgrade GNU
11784 *** binutils to release 2.9.1 or newer.  Another option is to modify
11785 *** your PATH or compiler configuration so that the native linker is
11786 *** used, and then restart.
11787
11788 _LT_EOF
11789       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11790         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11791         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11792       else
11793         ld_shlibs=no
11794       fi
11795       ;;
11796
11797     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11798       case `$LD -v 2>&1` in
11799         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11800         ld_shlibs=no
11801         cat <<_LT_EOF 1>&2
11802
11803 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11804 *** reliably create shared libraries on SCO systems.  Therefore, libtool
11805 *** is disabling shared libraries support.  We urge you to upgrade GNU
11806 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11807 *** your PATH or compiler configuration so that the native linker is
11808 *** used, and then restart.
11809
11810 _LT_EOF
11811         ;;
11812         *)
11813           # For security reasons, it is highly recommended that you always
11814           # use absolute paths for naming shared libraries, and exclude the
11815           # DT_RUNPATH tag from executables and libraries.  But doing so
11816           # requires that you compile everything twice, which is a pain.
11817           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11818             hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11819             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11820             archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11821           else
11822             ld_shlibs=no
11823           fi
11824         ;;
11825       esac
11826       ;;
11827
11828     sunos4*)
11829       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11830       wlarc=
11831       hardcode_direct=yes
11832       hardcode_shlibpath_var=no
11833       ;;
11834
11835     *)
11836       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11837         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11838         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11839       else
11840         ld_shlibs=no
11841       fi
11842       ;;
11843     esac
11844
11845     if test no = "$ld_shlibs"; then
11846       runpath_var=
11847       hardcode_libdir_flag_spec=
11848       export_dynamic_flag_spec=
11849       whole_archive_flag_spec=
11850     fi
11851   else
11852     # PORTME fill in a description of your system's linker (not GNU ld)
11853     case $host_os in
11854     aix3*)
11855       allow_undefined_flag=unsupported
11856       always_export_symbols=yes
11857       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'
11858       # Note: this linker hardcodes the directories in LIBPATH if there
11859       # are no directories specified by -L.
11860       hardcode_minus_L=yes
11861       if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11862         # Neither direct hardcoding nor static linking is supported with a
11863         # broken collect2.
11864         hardcode_direct=unsupported
11865       fi
11866       ;;
11867
11868     aix[4-9]*)
11869       if test ia64 = "$host_cpu"; then
11870         # On IA64, the linker does run time linking by default, so we don't
11871         # have to do anything special.
11872         aix_use_runtimelinking=no
11873         exp_sym_flag='-Bexport'
11874         no_entry_flag=
11875       else
11876         # If we're using GNU nm, then we don't want the "-C" option.
11877         # -C means demangle to GNU nm, but means don't demangle to AIX nm.
11878         # Without the "-l" option, or with the "-B" option, AIX nm treats
11879         # weak defined symbols like other global defined symbols, whereas
11880         # GNU nm marks them as "W".
11881         # While the 'weak' keyword is ignored in the Export File, we need
11882         # it in the Import File for the 'aix-soname' feature, so we have
11883         # to replace the "-B" option with "-P" for AIX nm.
11884         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11885           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'
11886         else
11887           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'
11888         fi
11889         aix_use_runtimelinking=no
11890
11891         # Test if we are trying to use run time linking or normal
11892         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11893         # have runtime linking enabled, and use it for executables.
11894         # For shared libraries, we enable/disable runtime linking
11895         # depending on the kind of the shared library created -
11896         # when "with_aix_soname,aix_use_runtimelinking" is:
11897         # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
11898         # "aix,yes"  lib.so          shared, rtl:yes, for executables
11899         #            lib.a           static archive
11900         # "both,no"  lib.so.V(shr.o) shared, rtl:yes
11901         #            lib.a(lib.so.V) shared, rtl:no,  for executables
11902         # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11903         #            lib.a(lib.so.V) shared, rtl:no
11904         # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
11905         #            lib.a           static archive
11906         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11907           for ld_flag in $LDFLAGS; do
11908           if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11909             aix_use_runtimelinking=yes
11910             break
11911           fi
11912           done
11913           if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11914             # With aix-soname=svr4, we create the lib.so.V shared archives only,
11915             # so we don't have lib.a shared libs to link our executables.
11916             # We have to force runtime linking in this case.
11917             aix_use_runtimelinking=yes
11918             LDFLAGS="$LDFLAGS -Wl,-brtl"
11919           fi
11920           ;;
11921         esac
11922
11923         exp_sym_flag='-bexport'
11924         no_entry_flag='-bnoentry'
11925       fi
11926
11927       # When large executables or shared objects are built, AIX ld can
11928       # have problems creating the table of contents.  If linking a library
11929       # or program results in "error TOC overflow" add -mminimal-toc to
11930       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11931       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11932
11933       archive_cmds=''
11934       hardcode_direct=yes
11935       hardcode_direct_absolute=yes
11936       hardcode_libdir_separator=':'
11937       link_all_deplibs=yes
11938       file_list_spec='$wl-f,'
11939       case $with_aix_soname,$aix_use_runtimelinking in
11940       aix,*) ;; # traditional, no import file
11941       svr4,* | *,yes) # use import file
11942         # The Import File defines what to hardcode.
11943         hardcode_direct=no
11944         hardcode_direct_absolute=no
11945         ;;
11946       esac
11947
11948       if test yes = "$GCC"; then
11949         case $host_os in aix4.[012]|aix4.[012].*)
11950         # We only want to do this on AIX 4.2 and lower, the check
11951         # below for broken collect2 doesn't work under 4.3+
11952           collect2name=`$CC -print-prog-name=collect2`
11953           if test -f "$collect2name" &&
11954            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11955           then
11956           # We have reworked collect2
11957           :
11958           else
11959           # We have old collect2
11960           hardcode_direct=unsupported
11961           # It fails to find uninstalled libraries when the uninstalled
11962           # path is not listed in the libpath.  Setting hardcode_minus_L
11963           # to unsupported forces relinking
11964           hardcode_minus_L=yes
11965           hardcode_libdir_flag_spec='-L$libdir'
11966           hardcode_libdir_separator=
11967           fi
11968           ;;
11969         esac
11970         shared_flag='-shared'
11971         if test yes = "$aix_use_runtimelinking"; then
11972           shared_flag="$shared_flag "'$wl-G'
11973         fi
11974         # Need to ensure runtime linking is disabled for the traditional
11975         # shared library, or the linker may eventually find shared libraries
11976         # /with/ Import File - we do not want to mix them.
11977         shared_flag_aix='-shared'
11978         shared_flag_svr4='-shared $wl-G'
11979       else
11980         # not using gcc
11981         if test ia64 = "$host_cpu"; then
11982         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11983         # chokes on -Wl,-G. The following line is correct:
11984           shared_flag='-G'
11985         else
11986           if test yes = "$aix_use_runtimelinking"; then
11987             shared_flag='$wl-G'
11988           else
11989             shared_flag='$wl-bM:SRE'
11990           fi
11991           shared_flag_aix='$wl-bM:SRE'
11992           shared_flag_svr4='$wl-G'
11993         fi
11994       fi
11995
11996       export_dynamic_flag_spec='$wl-bexpall'
11997       # It seems that -bexpall does not export symbols beginning with
11998       # underscore (_), so it is better to generate a list of symbols to export.
11999       always_export_symbols=yes
12000       if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
12001         # Warning - without using the other runtime loading flags (-brtl),
12002         # -berok will link without error, but may produce a broken library.
12003         allow_undefined_flag='-berok'
12004         # Determine the default libpath from the value encoded in an
12005         # empty executable.
12006         if test set = "${lt_cv_aix_libpath+set}"; then
12007   aix_libpath=$lt_cv_aix_libpath
12008 else
12009   if ${lt_cv_aix_libpath_+:} false; then :
12010   $as_echo_n "(cached) " >&6
12011 else
12012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12013 /* end confdefs.h.  */
12014
12015 int
12016 main ()
12017 {
12018
12019   ;
12020   return 0;
12021 }
12022 _ACEOF
12023 if ac_fn_c_try_link "$LINENO"; then :
12024
12025   lt_aix_libpath_sed='
12026       /Import File Strings/,/^$/ {
12027           /^0/ {
12028               s/^0  *\([^ ]*\) *$/\1/
12029               p
12030           }
12031       }'
12032   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12033   # Check for a 64-bit object if we didn't find anything.
12034   if test -z "$lt_cv_aix_libpath_"; then
12035     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12036   fi
12037 fi
12038 rm -f core conftest.err conftest.$ac_objext \
12039     conftest$ac_exeext conftest.$ac_ext
12040   if test -z "$lt_cv_aix_libpath_"; then
12041     lt_cv_aix_libpath_=/usr/lib:/lib
12042   fi
12043
12044 fi
12045
12046   aix_libpath=$lt_cv_aix_libpath_
12047 fi
12048
12049         hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12050         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
12051       else
12052         if test ia64 = "$host_cpu"; then
12053           hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
12054           allow_undefined_flag="-z nodefs"
12055           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"
12056         else
12057          # Determine the default libpath from the value encoded in an
12058          # empty executable.
12059          if test set = "${lt_cv_aix_libpath+set}"; then
12060   aix_libpath=$lt_cv_aix_libpath
12061 else
12062   if ${lt_cv_aix_libpath_+:} false; then :
12063   $as_echo_n "(cached) " >&6
12064 else
12065   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12066 /* end confdefs.h.  */
12067
12068 int
12069 main ()
12070 {
12071
12072   ;
12073   return 0;
12074 }
12075 _ACEOF
12076 if ac_fn_c_try_link "$LINENO"; then :
12077
12078   lt_aix_libpath_sed='
12079       /Import File Strings/,/^$/ {
12080           /^0/ {
12081               s/^0  *\([^ ]*\) *$/\1/
12082               p
12083           }
12084       }'
12085   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12086   # Check for a 64-bit object if we didn't find anything.
12087   if test -z "$lt_cv_aix_libpath_"; then
12088     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12089   fi
12090 fi
12091 rm -f core conftest.err conftest.$ac_objext \
12092     conftest$ac_exeext conftest.$ac_ext
12093   if test -z "$lt_cv_aix_libpath_"; then
12094     lt_cv_aix_libpath_=/usr/lib:/lib
12095   fi
12096
12097 fi
12098
12099   aix_libpath=$lt_cv_aix_libpath_
12100 fi
12101
12102          hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12103           # Warning - without using the other run time loading flags,
12104           # -berok will link without error, but may produce a broken library.
12105           no_undefined_flag=' $wl-bernotok'
12106           allow_undefined_flag=' $wl-berok'
12107           if test yes = "$with_gnu_ld"; then
12108             # We only use this code for GNU lds that support --whole-archive.
12109             whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
12110           else
12111             # Exported symbols can be pulled into shared objects from archives
12112             whole_archive_flag_spec='$convenience'
12113           fi
12114           archive_cmds_need_lc=yes
12115           archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
12116           # -brtl affects multiple linker settings, -berok does not and is overridden later
12117           compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
12118           if test svr4 != "$with_aix_soname"; then
12119             # This is similar to how AIX traditionally builds its shared libraries.
12120             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'
12121           fi
12122           if test aix != "$with_aix_soname"; then
12123             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'
12124           else
12125             # used by -dlpreopen to get the symbols
12126             archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
12127           fi
12128           archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
12129         fi
12130       fi
12131       ;;
12132
12133     amigaos*)
12134       case $host_cpu in
12135       powerpc)
12136             # see comment about AmigaOS4 .so support
12137             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12138             archive_expsym_cmds=''
12139         ;;
12140       m68k)
12141             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)'
12142             hardcode_libdir_flag_spec='-L$libdir'
12143             hardcode_minus_L=yes
12144         ;;
12145       esac
12146       ;;
12147
12148     bsdi[45]*)
12149       export_dynamic_flag_spec=-rdynamic
12150       ;;
12151
12152     cygwin* | mingw* | pw32* | cegcc*)
12153       # When not using gcc, we currently assume that we are using
12154       # Microsoft Visual C++.
12155       # hardcode_libdir_flag_spec is actually meaningless, as there is
12156       # no search path for DLLs.
12157       case $cc_basename in
12158       cl*)
12159         # Native MSVC
12160         hardcode_libdir_flag_spec=' '
12161         allow_undefined_flag=unsupported
12162         always_export_symbols=yes
12163         file_list_spec='@'
12164         # Tell ltmain to make .lib files, not .a files.
12165         libext=lib
12166         # Tell ltmain to make .dll files, not .so files.
12167         shrext_cmds=.dll
12168         # FIXME: Setting linknames here is a bad hack.
12169         archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12170         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12171             cp "$export_symbols" "$output_objdir/$soname.def";
12172             echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12173           else
12174             $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12175           fi~
12176           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12177           linknames='
12178         # The linker will not automatically build a static lib if we build a DLL.
12179         # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12180         enable_shared_with_static_runtimes=yes
12181         exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12182         export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12183         # Don't use ranlib
12184         old_postinstall_cmds='chmod 644 $oldlib'
12185         postlink_cmds='lt_outputfile="@OUTPUT@"~
12186           lt_tool_outputfile="@TOOL_OUTPUT@"~
12187           case $lt_outputfile in
12188             *.exe|*.EXE) ;;
12189             *)
12190               lt_outputfile=$lt_outputfile.exe
12191               lt_tool_outputfile=$lt_tool_outputfile.exe
12192               ;;
12193           esac~
12194           if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12195             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12196             $RM "$lt_outputfile.manifest";
12197           fi'
12198         ;;
12199       *)
12200         # Assume MSVC wrapper
12201         hardcode_libdir_flag_spec=' '
12202         allow_undefined_flag=unsupported
12203         # Tell ltmain to make .lib files, not .a files.
12204         libext=lib
12205         # Tell ltmain to make .dll files, not .so files.
12206         shrext_cmds=.dll
12207         # FIXME: Setting linknames here is a bad hack.
12208         archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12209         # The linker will automatically build a .lib file if we build a DLL.
12210         old_archive_from_new_cmds='true'
12211         # FIXME: Should let the user specify the lib program.
12212         old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12213         enable_shared_with_static_runtimes=yes
12214         ;;
12215       esac
12216       ;;
12217
12218     darwin* | rhapsody*)
12219
12220
12221   archive_cmds_need_lc=no
12222   hardcode_direct=no
12223   hardcode_automatic=yes
12224   hardcode_shlibpath_var=unsupported
12225   if test yes = "$lt_cv_ld_force_load"; then
12226     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\"`'
12227
12228   else
12229     whole_archive_flag_spec=''
12230   fi
12231   link_all_deplibs=yes
12232   allow_undefined_flag=$_lt_dar_allow_undefined
12233   case $cc_basename in
12234      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12235      *) _lt_dar_can_shared=$GCC ;;
12236   esac
12237   if test yes = "$_lt_dar_can_shared"; then
12238     output_verbose_link_cmd=func_echo_all
12239     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12240     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12241     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"
12242     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"
12243
12244   else
12245   ld_shlibs=no
12246   fi
12247
12248       ;;
12249
12250     dgux*)
12251       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12252       hardcode_libdir_flag_spec='-L$libdir'
12253       hardcode_shlibpath_var=no
12254       ;;
12255
12256     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12257     # support.  Future versions do this automatically, but an explicit c++rt0.o
12258     # does not break anything, and helps significantly (at the cost of a little
12259     # extra space).
12260     freebsd2.2*)
12261       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12262       hardcode_libdir_flag_spec='-R$libdir'
12263       hardcode_direct=yes
12264       hardcode_shlibpath_var=no
12265       ;;
12266
12267     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12268     freebsd2.*)
12269       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12270       hardcode_direct=yes
12271       hardcode_minus_L=yes
12272       hardcode_shlibpath_var=no
12273       ;;
12274
12275     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12276     freebsd* | dragonfly*)
12277       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12278       hardcode_libdir_flag_spec='-R$libdir'
12279       hardcode_direct=yes
12280       hardcode_shlibpath_var=no
12281       ;;
12282
12283     hpux9*)
12284       if test yes = "$GCC"; then
12285         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'
12286       else
12287         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'
12288       fi
12289       hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12290       hardcode_libdir_separator=:
12291       hardcode_direct=yes
12292
12293       # hardcode_minus_L: Not really in the search PATH,
12294       # but as the default location of the library.
12295       hardcode_minus_L=yes
12296       export_dynamic_flag_spec='$wl-E'
12297       ;;
12298
12299     hpux10*)
12300       if test yes,no = "$GCC,$with_gnu_ld"; then
12301         archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12302       else
12303         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12304       fi
12305       if test no = "$with_gnu_ld"; then
12306         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12307         hardcode_libdir_separator=:
12308         hardcode_direct=yes
12309         hardcode_direct_absolute=yes
12310         export_dynamic_flag_spec='$wl-E'
12311         # hardcode_minus_L: Not really in the search PATH,
12312         # but as the default location of the library.
12313         hardcode_minus_L=yes
12314       fi
12315       ;;
12316
12317     hpux11*)
12318       if test yes,no = "$GCC,$with_gnu_ld"; then
12319         case $host_cpu in
12320         hppa*64*)
12321           archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12322           ;;
12323         ia64*)
12324           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12325           ;;
12326         *)
12327           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12328           ;;
12329         esac
12330       else
12331         case $host_cpu in
12332         hppa*64*)
12333           archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12334           ;;
12335         ia64*)
12336           archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12337           ;;
12338         *)
12339
12340           # Older versions of the 11.00 compiler do not understand -b yet
12341           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12342           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12343 $as_echo_n "checking if $CC understands -b... " >&6; }
12344 if ${lt_cv_prog_compiler__b+:} false; then :
12345   $as_echo_n "(cached) " >&6
12346 else
12347   lt_cv_prog_compiler__b=no
12348    save_LDFLAGS=$LDFLAGS
12349    LDFLAGS="$LDFLAGS -b"
12350    echo "$lt_simple_link_test_code" > conftest.$ac_ext
12351    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12352      # The linker can only warn and ignore the option if not recognized
12353      # So say no if there are warnings
12354      if test -s conftest.err; then
12355        # Append any errors to the config.log.
12356        cat conftest.err 1>&5
12357        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12358        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12359        if diff conftest.exp conftest.er2 >/dev/null; then
12360          lt_cv_prog_compiler__b=yes
12361        fi
12362      else
12363        lt_cv_prog_compiler__b=yes
12364      fi
12365    fi
12366    $RM -r conftest*
12367    LDFLAGS=$save_LDFLAGS
12368
12369 fi
12370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12371 $as_echo "$lt_cv_prog_compiler__b" >&6; }
12372
12373 if test yes = "$lt_cv_prog_compiler__b"; then
12374     archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12375 else
12376     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12377 fi
12378
12379           ;;
12380         esac
12381       fi
12382       if test no = "$with_gnu_ld"; then
12383         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12384         hardcode_libdir_separator=:
12385
12386         case $host_cpu in
12387         hppa*64*|ia64*)
12388           hardcode_direct=no
12389           hardcode_shlibpath_var=no
12390           ;;
12391         *)
12392           hardcode_direct=yes
12393           hardcode_direct_absolute=yes
12394           export_dynamic_flag_spec='$wl-E'
12395
12396           # hardcode_minus_L: Not really in the search PATH,
12397           # but as the default location of the library.
12398           hardcode_minus_L=yes
12399           ;;
12400         esac
12401       fi
12402       ;;
12403
12404     irix5* | irix6* | nonstopux*)
12405       if test yes = "$GCC"; then
12406         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'
12407         # Try to use the -exported_symbol ld option, if it does not
12408         # work, assume that -exports_file does not work either and
12409         # implicitly export all symbols.
12410         # This should be the same for all languages, so no per-tag cache variable.
12411         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12412 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12413 if ${lt_cv_irix_exported_symbol+:} false; then :
12414   $as_echo_n "(cached) " >&6
12415 else
12416   save_LDFLAGS=$LDFLAGS
12417            LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12418            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12419 /* end confdefs.h.  */
12420 int foo (void) { return 0; }
12421 _ACEOF
12422 if ac_fn_c_try_link "$LINENO"; then :
12423   lt_cv_irix_exported_symbol=yes
12424 else
12425   lt_cv_irix_exported_symbol=no
12426 fi
12427 rm -f core conftest.err conftest.$ac_objext \
12428     conftest$ac_exeext conftest.$ac_ext
12429            LDFLAGS=$save_LDFLAGS
12430 fi
12431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12432 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
12433         if test yes = "$lt_cv_irix_exported_symbol"; then
12434           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'
12435         fi
12436       else
12437         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'
12438         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'
12439       fi
12440       archive_cmds_need_lc='no'
12441       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12442       hardcode_libdir_separator=:
12443       inherit_rpath=yes
12444       link_all_deplibs=yes
12445       ;;
12446
12447     linux*)
12448       case $cc_basename in
12449       tcc*)
12450         # Fabrice Bellard et al's Tiny C Compiler
12451         ld_shlibs=yes
12452         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12453         ;;
12454       esac
12455       ;;
12456
12457     netbsd*)
12458       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12459         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12460       else
12461         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12462       fi
12463       hardcode_libdir_flag_spec='-R$libdir'
12464       hardcode_direct=yes
12465       hardcode_shlibpath_var=no
12466       ;;
12467
12468     newsos6)
12469       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12470       hardcode_direct=yes
12471       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12472       hardcode_libdir_separator=:
12473       hardcode_shlibpath_var=no
12474       ;;
12475
12476     *nto* | *qnx*)
12477       ;;
12478
12479     openbsd* | bitrig*)
12480       if test -f /usr/libexec/ld.so; then
12481         hardcode_direct=yes
12482         hardcode_shlibpath_var=no
12483         hardcode_direct_absolute=yes
12484         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12485           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12486           archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12487           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12488           export_dynamic_flag_spec='$wl-E'
12489         else
12490           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12491           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12492         fi
12493       else
12494         ld_shlibs=no
12495       fi
12496       ;;
12497
12498     os2*)
12499       hardcode_libdir_flag_spec='-L$libdir'
12500       hardcode_minus_L=yes
12501       allow_undefined_flag=unsupported
12502       shrext_cmds=.dll
12503       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12504         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12505         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12506         $ECHO EXPORTS >> $output_objdir/$libname.def~
12507         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12508         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12509         emximp -o $lib $output_objdir/$libname.def'
12510       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12511         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12512         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12513         $ECHO EXPORTS >> $output_objdir/$libname.def~
12514         prefix_cmds="$SED"~
12515         if test EXPORTS = "`$SED 1q $export_symbols`"; then
12516           prefix_cmds="$prefix_cmds -e 1d";
12517         fi~
12518         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12519         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12520         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12521         emximp -o $lib $output_objdir/$libname.def'
12522       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12523       enable_shared_with_static_runtimes=yes
12524       ;;
12525
12526     osf3*)
12527       if test yes = "$GCC"; then
12528         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12529         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'
12530       else
12531         allow_undefined_flag=' -expect_unresolved \*'
12532         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'
12533       fi
12534       archive_cmds_need_lc='no'
12535       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12536       hardcode_libdir_separator=:
12537       ;;
12538
12539     osf4* | osf5*)      # as osf3* with the addition of -msym flag
12540       if test yes = "$GCC"; then
12541         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12542         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'
12543         hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12544       else
12545         allow_undefined_flag=' -expect_unresolved \*'
12546         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'
12547         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~
12548           $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'
12549
12550         # Both c and cxx compiler support -rpath directly
12551         hardcode_libdir_flag_spec='-rpath $libdir'
12552       fi
12553       archive_cmds_need_lc='no'
12554       hardcode_libdir_separator=:
12555       ;;
12556
12557     solaris*)
12558       no_undefined_flag=' -z defs'
12559       if test yes = "$GCC"; then
12560         wlarc='$wl'
12561         archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12562         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12563           $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'
12564       else
12565         case `$CC -V 2>&1` in
12566         *"Compilers 5.0"*)
12567           wlarc=''
12568           archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12569           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12570             $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12571           ;;
12572         *)
12573           wlarc='$wl'
12574           archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12575           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12576             $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12577           ;;
12578         esac
12579       fi
12580       hardcode_libdir_flag_spec='-R$libdir'
12581       hardcode_shlibpath_var=no
12582       case $host_os in
12583       solaris2.[0-5] | solaris2.[0-5].*) ;;
12584       *)
12585         # The compiler driver will combine and reorder linker options,
12586         # but understands '-z linker_flag'.  GCC discards it without '$wl',
12587         # but is careful enough not to reorder.
12588         # Supported since Solaris 2.6 (maybe 2.5.1?)
12589         if test yes = "$GCC"; then
12590           whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12591         else
12592           whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12593         fi
12594         ;;
12595       esac
12596       link_all_deplibs=yes
12597       ;;
12598
12599     sunos4*)
12600       if test sequent = "$host_vendor"; then
12601         # Use $CC to link under sequent, because it throws in some extra .o
12602         # files that make .init and .fini sections work.
12603         archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12604       else
12605         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12606       fi
12607       hardcode_libdir_flag_spec='-L$libdir'
12608       hardcode_direct=yes
12609       hardcode_minus_L=yes
12610       hardcode_shlibpath_var=no
12611       ;;
12612
12613     sysv4)
12614       case $host_vendor in
12615         sni)
12616           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12617           hardcode_direct=yes # is this really true???
12618         ;;
12619         siemens)
12620           ## LD is ld it makes a PLAMLIB
12621           ## CC just makes a GrossModule.
12622           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12623           reload_cmds='$CC -r -o $output$reload_objs'
12624           hardcode_direct=no
12625         ;;
12626         motorola)
12627           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12628           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12629         ;;
12630       esac
12631       runpath_var='LD_RUN_PATH'
12632       hardcode_shlibpath_var=no
12633       ;;
12634
12635     sysv4.3*)
12636       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12637       hardcode_shlibpath_var=no
12638       export_dynamic_flag_spec='-Bexport'
12639       ;;
12640
12641     sysv4*MP*)
12642       if test -d /usr/nec; then
12643         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12644         hardcode_shlibpath_var=no
12645         runpath_var=LD_RUN_PATH
12646         hardcode_runpath_var=yes
12647         ld_shlibs=yes
12648       fi
12649       ;;
12650
12651     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12652       no_undefined_flag='$wl-z,text'
12653       archive_cmds_need_lc=no
12654       hardcode_shlibpath_var=no
12655       runpath_var='LD_RUN_PATH'
12656
12657       if test yes = "$GCC"; then
12658         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12659         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12660       else
12661         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12662         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12663       fi
12664       ;;
12665
12666     sysv5* | sco3.2v5* | sco5v6*)
12667       # Note: We CANNOT use -z defs as we might desire, because we do not
12668       # link with -lc, and that would cause any symbols used from libc to
12669       # always be unresolved, which means just about no library would
12670       # ever link correctly.  If we're not using GNU ld we use -z text
12671       # though, which does catch some bad symbols but isn't as heavy-handed
12672       # as -z defs.
12673       no_undefined_flag='$wl-z,text'
12674       allow_undefined_flag='$wl-z,nodefs'
12675       archive_cmds_need_lc=no
12676       hardcode_shlibpath_var=no
12677       hardcode_libdir_flag_spec='$wl-R,$libdir'
12678       hardcode_libdir_separator=':'
12679       link_all_deplibs=yes
12680       export_dynamic_flag_spec='$wl-Bexport'
12681       runpath_var='LD_RUN_PATH'
12682
12683       if test yes = "$GCC"; then
12684         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12685         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12686       else
12687         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12688         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12689       fi
12690       ;;
12691
12692     uts4*)
12693       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12694       hardcode_libdir_flag_spec='-L$libdir'
12695       hardcode_shlibpath_var=no
12696       ;;
12697
12698     *)
12699       ld_shlibs=no
12700       ;;
12701     esac
12702
12703     if test sni = "$host_vendor"; then
12704       case $host in
12705       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12706         export_dynamic_flag_spec='$wl-Blargedynsym'
12707         ;;
12708       esac
12709     fi
12710   fi
12711
12712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12713 $as_echo "$ld_shlibs" >&6; }
12714 test no = "$ld_shlibs" && can_build_shared=no
12715
12716 with_gnu_ld=$with_gnu_ld
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732 #
12733 # Do we need to explicitly link libc?
12734 #
12735 case "x$archive_cmds_need_lc" in
12736 x|xyes)
12737   # Assume -lc should be added
12738   archive_cmds_need_lc=yes
12739
12740   if test yes,yes = "$GCC,$enable_shared"; then
12741     case $archive_cmds in
12742     *'~'*)
12743       # FIXME: we may have to deal with multi-command sequences.
12744       ;;
12745     '$CC '*)
12746       # Test whether the compiler implicitly links with -lc since on some
12747       # systems, -lgcc has to come before -lc. If gcc already passes -lc
12748       # to ld, don't add -lc before -lgcc.
12749       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12750 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12751 if ${lt_cv_archive_cmds_need_lc+:} false; then :
12752   $as_echo_n "(cached) " >&6
12753 else
12754   $RM conftest*
12755         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12756
12757         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12758   (eval $ac_compile) 2>&5
12759   ac_status=$?
12760   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12761   test $ac_status = 0; } 2>conftest.err; then
12762           soname=conftest
12763           lib=conftest
12764           libobjs=conftest.$ac_objext
12765           deplibs=
12766           wl=$lt_prog_compiler_wl
12767           pic_flag=$lt_prog_compiler_pic
12768           compiler_flags=-v
12769           linker_flags=-v
12770           verstring=
12771           output_objdir=.
12772           libname=conftest
12773           lt_save_allow_undefined_flag=$allow_undefined_flag
12774           allow_undefined_flag=
12775           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12776   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12777   ac_status=$?
12778   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12779   test $ac_status = 0; }
12780           then
12781             lt_cv_archive_cmds_need_lc=no
12782           else
12783             lt_cv_archive_cmds_need_lc=yes
12784           fi
12785           allow_undefined_flag=$lt_save_allow_undefined_flag
12786         else
12787           cat conftest.err 1>&5
12788         fi
12789         $RM conftest*
12790
12791 fi
12792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12793 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12794       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12795       ;;
12796     esac
12797   fi
12798   ;;
12799 esac
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12953 $as_echo_n "checking dynamic linker characteristics... " >&6; }
12954
12955 if test yes = "$GCC"; then
12956   case $host_os in
12957     darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
12958     *) lt_awk_arg='/^libraries:/' ;;
12959   esac
12960   case $host_os in
12961     mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
12962     *) lt_sed_strip_eq='s|=/|/|g' ;;
12963   esac
12964   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12965   case $lt_search_path_spec in
12966   *\;*)
12967     # if the path contains ";" then we assume it to be the separator
12968     # otherwise default to the standard path separator (i.e. ":") - it is
12969     # assumed that no part of a normal pathname contains ";" but that should
12970     # okay in the real world where ";" in dirpaths is itself problematic.
12971     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12972     ;;
12973   *)
12974     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
12975     ;;
12976   esac
12977   # Ok, now we have the path, separated by spaces, we can step through it
12978   # and add multilib dir if necessary...
12979   lt_tmp_lt_search_path_spec=
12980   lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12981   # ...but if some path component already ends with the multilib dir we assume
12982   # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
12983   case "$lt_multi_os_dir; $lt_search_path_spec " in
12984   "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
12985     lt_multi_os_dir=
12986     ;;
12987   esac
12988   for lt_sys_path in $lt_search_path_spec; do
12989     if test -d "$lt_sys_path$lt_multi_os_dir"; then
12990       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
12991     elif test -n "$lt_multi_os_dir"; then
12992       test -d "$lt_sys_path" && \
12993         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
12994     fi
12995   done
12996   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
12997 BEGIN {RS = " "; FS = "/|\n";} {
12998   lt_foo = "";
12999   lt_count = 0;
13000   for (lt_i = NF; lt_i > 0; lt_i--) {
13001     if ($lt_i != "" && $lt_i != ".") {
13002       if ($lt_i == "..") {
13003         lt_count++;
13004       } else {
13005         if (lt_count == 0) {
13006           lt_foo = "/" $lt_i lt_foo;
13007         } else {
13008           lt_count--;
13009         }
13010       }
13011     }
13012   }
13013   if (lt_foo != "") { lt_freq[lt_foo]++; }
13014   if (lt_freq[lt_foo] == 1) { print lt_foo; }
13015 }'`
13016   # AWK program above erroneously prepends '/' to C:/dos/paths
13017   # for these hosts.
13018   case $host_os in
13019     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
13020       $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
13021   esac
13022   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
13023 else
13024   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13025 fi
13026 library_names_spec=
13027 libname_spec='lib$name'
13028 soname_spec=
13029 shrext_cmds=.so
13030 postinstall_cmds=
13031 postuninstall_cmds=
13032 finish_cmds=
13033 finish_eval=
13034 shlibpath_var=
13035 shlibpath_overrides_runpath=unknown
13036 version_type=none
13037 dynamic_linker="$host_os ld.so"
13038 sys_lib_dlsearch_path_spec="/lib /usr/lib"
13039 need_lib_prefix=unknown
13040 hardcode_into_libs=no
13041
13042 # when you set need_version to no, make sure it does not cause -set_version
13043 # flags to be left without arguments
13044 need_version=unknown
13045
13046
13047
13048 case $host_os in
13049 aix3*)
13050   version_type=linux # correct to gnu/linux during the next big refactor
13051   library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
13052   shlibpath_var=LIBPATH
13053
13054   # AIX 3 has no versioning support, so we append a major version to the name.
13055   soname_spec='$libname$release$shared_ext$major'
13056   ;;
13057
13058 aix[4-9]*)
13059   version_type=linux # correct to gnu/linux during the next big refactor
13060   need_lib_prefix=no
13061   need_version=no
13062   hardcode_into_libs=yes
13063   if test ia64 = "$host_cpu"; then
13064     # AIX 5 supports IA64
13065     library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
13066     shlibpath_var=LD_LIBRARY_PATH
13067   else
13068     # With GCC up to 2.95.x, collect2 would create an import file
13069     # for dependence libraries.  The import file would start with
13070     # the line '#! .'.  This would cause the generated library to
13071     # depend on '.', always an invalid library.  This was fixed in
13072     # development snapshots of GCC prior to 3.0.
13073     case $host_os in
13074       aix4 | aix4.[01] | aix4.[01].*)
13075       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
13076            echo ' yes '
13077            echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
13078         :
13079       else
13080         can_build_shared=no
13081       fi
13082       ;;
13083     esac
13084     # Using Import Files as archive members, it is possible to support
13085     # filename-based versioning of shared library archives on AIX. While
13086     # this would work for both with and without runtime linking, it will
13087     # prevent static linking of such archives. So we do filename-based
13088     # shared library versioning with .so extension only, which is used
13089     # when both runtime linking and shared linking is enabled.
13090     # Unfortunately, runtime linking may impact performance, so we do
13091     # not want this to be the default eventually. Also, we use the
13092     # versioned .so libs for executables only if there is the -brtl
13093     # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
13094     # To allow for filename-based versioning support, we need to create
13095     # libNAME.so.V as an archive file, containing:
13096     # *) an Import File, referring to the versioned filename of the
13097     #    archive as well as the shared archive member, telling the
13098     #    bitwidth (32 or 64) of that shared object, and providing the
13099     #    list of exported symbols of that shared object, eventually
13100     #    decorated with the 'weak' keyword
13101     # *) the shared object with the F_LOADONLY flag set, to really avoid
13102     #    it being seen by the linker.
13103     # At run time we better use the real file rather than another symlink,
13104     # but for link time we create the symlink libNAME.so -> libNAME.so.V
13105
13106     case $with_aix_soname,$aix_use_runtimelinking in
13107     # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
13108     # soname into executable. Probably we can add versioning support to
13109     # collect2, so additional links can be useful in future.
13110     aix,yes) # traditional libtool
13111       dynamic_linker='AIX unversionable lib.so'
13112       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
13113       # instead of lib<name>.a to let people know that these are not
13114       # typical AIX shared libraries.
13115       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13116       ;;
13117     aix,no) # traditional AIX only
13118       dynamic_linker='AIX lib.a(lib.so.V)'
13119       # We preserve .a as extension for shared libraries through AIX4.2
13120       # and later when we are not doing run time linking.
13121       library_names_spec='$libname$release.a $libname.a'
13122       soname_spec='$libname$release$shared_ext$major'
13123       ;;
13124     svr4,*) # full svr4 only
13125       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
13126       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13127       # We do not specify a path in Import Files, so LIBPATH fires.
13128       shlibpath_overrides_runpath=yes
13129       ;;
13130     *,yes) # both, prefer svr4
13131       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
13132       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13133       # unpreferred sharedlib libNAME.a needs extra handling
13134       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"'
13135       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"'
13136       # We do not specify a path in Import Files, so LIBPATH fires.
13137       shlibpath_overrides_runpath=yes
13138       ;;
13139     *,no) # both, prefer aix
13140       dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
13141       library_names_spec='$libname$release.a $libname.a'
13142       soname_spec='$libname$release$shared_ext$major'
13143       # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
13144       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)'
13145       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"'
13146       ;;
13147     esac
13148     shlibpath_var=LIBPATH
13149   fi
13150   ;;
13151
13152 amigaos*)
13153   case $host_cpu in
13154   powerpc)
13155     # Since July 2007 AmigaOS4 officially supports .so libraries.
13156     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
13157     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13158     ;;
13159   m68k)
13160     library_names_spec='$libname.ixlibrary $libname.a'
13161     # Create ${libname}_ixlibrary.a entries in /sys/libs.
13162     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'
13163     ;;
13164   esac
13165   ;;
13166
13167 beos*)
13168   library_names_spec='$libname$shared_ext'
13169   dynamic_linker="$host_os ld.so"
13170   shlibpath_var=LIBRARY_PATH
13171   ;;
13172
13173 bsdi[45]*)
13174   version_type=linux # correct to gnu/linux during the next big refactor
13175   need_version=no
13176   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13177   soname_spec='$libname$release$shared_ext$major'
13178   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13179   shlibpath_var=LD_LIBRARY_PATH
13180   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13181   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13182   # the default ld.so.conf also contains /usr/contrib/lib and
13183   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13184   # libtool to hard-code these into programs
13185   ;;
13186
13187 cygwin* | mingw* | pw32* | cegcc*)
13188   version_type=windows
13189   shrext_cmds=.dll
13190   need_version=no
13191   need_lib_prefix=no
13192
13193   case $GCC,$cc_basename in
13194   yes,*)
13195     # gcc
13196     library_names_spec='$libname.dll.a'
13197     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13198     postinstall_cmds='base_file=`basename \$file`~
13199       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13200       dldir=$destdir/`dirname \$dlpath`~
13201       test -d \$dldir || mkdir -p \$dldir~
13202       $install_prog $dir/$dlname \$dldir/$dlname~
13203       chmod a+x \$dldir/$dlname~
13204       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13205         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13206       fi'
13207     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13208       dlpath=$dir/\$dldll~
13209        $RM \$dlpath'
13210     shlibpath_overrides_runpath=yes
13211
13212     case $host_os in
13213     cygwin*)
13214       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13215       soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13216
13217       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13218       ;;
13219     mingw* | cegcc*)
13220       # MinGW DLLs use traditional 'lib' prefix
13221       soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13222       ;;
13223     pw32*)
13224       # pw32 DLLs use 'pw' prefix rather than 'lib'
13225       library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13226       ;;
13227     esac
13228     dynamic_linker='Win32 ld.exe'
13229     ;;
13230
13231   *,cl*)
13232     # Native MSVC
13233     libname_spec='$name'
13234     soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13235     library_names_spec='$libname.dll.lib'
13236
13237     case $build_os in
13238     mingw*)
13239       sys_lib_search_path_spec=
13240       lt_save_ifs=$IFS
13241       IFS=';'
13242       for lt_path in $LIB
13243       do
13244         IFS=$lt_save_ifs
13245         # Let DOS variable expansion print the short 8.3 style file name.
13246         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13247         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13248       done
13249       IFS=$lt_save_ifs
13250       # Convert to MSYS style.
13251       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13252       ;;
13253     cygwin*)
13254       # Convert to unix form, then to dos form, then back to unix form
13255       # but this time dos style (no spaces!) so that the unix form looks
13256       # like /cygdrive/c/PROGRA~1:/cygdr...
13257       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13258       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13259       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13260       ;;
13261     *)
13262       sys_lib_search_path_spec=$LIB
13263       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13264         # It is most probably a Windows format PATH.
13265         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13266       else
13267         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13268       fi
13269       # FIXME: find the short name or the path components, as spaces are
13270       # common. (e.g. "Program Files" -> "PROGRA~1")
13271       ;;
13272     esac
13273
13274     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13275     postinstall_cmds='base_file=`basename \$file`~
13276       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13277       dldir=$destdir/`dirname \$dlpath`~
13278       test -d \$dldir || mkdir -p \$dldir~
13279       $install_prog $dir/$dlname \$dldir/$dlname'
13280     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13281       dlpath=$dir/\$dldll~
13282        $RM \$dlpath'
13283     shlibpath_overrides_runpath=yes
13284     dynamic_linker='Win32 link.exe'
13285     ;;
13286
13287   *)
13288     # Assume MSVC wrapper
13289     library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13290     dynamic_linker='Win32 ld.exe'
13291     ;;
13292   esac
13293   # FIXME: first we should search . and the directory the executable is in
13294   shlibpath_var=PATH
13295   ;;
13296
13297 darwin* | rhapsody*)
13298   dynamic_linker="$host_os dyld"
13299   version_type=darwin
13300   need_lib_prefix=no
13301   need_version=no
13302   library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13303   soname_spec='$libname$release$major$shared_ext'
13304   shlibpath_overrides_runpath=yes
13305   shlibpath_var=DYLD_LIBRARY_PATH
13306   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13307
13308   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13309   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13310   ;;
13311
13312 dgux*)
13313   version_type=linux # correct to gnu/linux during the next big refactor
13314   need_lib_prefix=no
13315   need_version=no
13316   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13317   soname_spec='$libname$release$shared_ext$major'
13318   shlibpath_var=LD_LIBRARY_PATH
13319   ;;
13320
13321 freebsd* | dragonfly*)
13322   # DragonFly does not have aout.  When/if they implement a new
13323   # versioning mechanism, adjust this.
13324   if test -x /usr/bin/objformat; then
13325     objformat=`/usr/bin/objformat`
13326   else
13327     case $host_os in
13328     freebsd[23].*) objformat=aout ;;
13329     *) objformat=elf ;;
13330     esac
13331   fi
13332   version_type=freebsd-$objformat
13333   case $version_type in
13334     freebsd-elf*)
13335       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13336       soname_spec='$libname$release$shared_ext$major'
13337       need_version=no
13338       need_lib_prefix=no
13339       ;;
13340     freebsd-*)
13341       library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13342       need_version=yes
13343       ;;
13344   esac
13345   shlibpath_var=LD_LIBRARY_PATH
13346   case $host_os in
13347   freebsd2.*)
13348     shlibpath_overrides_runpath=yes
13349     ;;
13350   freebsd3.[01]* | freebsdelf3.[01]*)
13351     shlibpath_overrides_runpath=yes
13352     hardcode_into_libs=yes
13353     ;;
13354   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13355   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13356     shlibpath_overrides_runpath=no
13357     hardcode_into_libs=yes
13358     ;;
13359   *) # from 4.6 on, and DragonFly
13360     shlibpath_overrides_runpath=yes
13361     hardcode_into_libs=yes
13362     ;;
13363   esac
13364   ;;
13365
13366 haiku*)
13367   version_type=linux # correct to gnu/linux during the next big refactor
13368   need_lib_prefix=no
13369   need_version=no
13370   dynamic_linker="$host_os runtime_loader"
13371   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13372   soname_spec='$libname$release$shared_ext$major'
13373   shlibpath_var=LIBRARY_PATH
13374   shlibpath_overrides_runpath=no
13375   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13376   hardcode_into_libs=yes
13377   ;;
13378
13379 hpux9* | hpux10* | hpux11*)
13380   # Give a soname corresponding to the major version so that dld.sl refuses to
13381   # link against other versions.
13382   version_type=sunos
13383   need_lib_prefix=no
13384   need_version=no
13385   case $host_cpu in
13386   ia64*)
13387     shrext_cmds='.so'
13388     hardcode_into_libs=yes
13389     dynamic_linker="$host_os dld.so"
13390     shlibpath_var=LD_LIBRARY_PATH
13391     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13392     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13393     soname_spec='$libname$release$shared_ext$major'
13394     if test 32 = "$HPUX_IA64_MODE"; then
13395       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13396       sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13397     else
13398       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13399       sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13400     fi
13401     ;;
13402   hppa*64*)
13403     shrext_cmds='.sl'
13404     hardcode_into_libs=yes
13405     dynamic_linker="$host_os dld.sl"
13406     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13407     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13408     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13409     soname_spec='$libname$release$shared_ext$major'
13410     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13411     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13412     ;;
13413   *)
13414     shrext_cmds='.sl'
13415     dynamic_linker="$host_os dld.sl"
13416     shlibpath_var=SHLIB_PATH
13417     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13418     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13419     soname_spec='$libname$release$shared_ext$major'
13420     ;;
13421   esac
13422   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13423   postinstall_cmds='chmod 555 $lib'
13424   # or fails outright, so override atomically:
13425   install_override_mode=555
13426   ;;
13427
13428 interix[3-9]*)
13429   version_type=linux # correct to gnu/linux during the next big refactor
13430   need_lib_prefix=no
13431   need_version=no
13432   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13433   soname_spec='$libname$release$shared_ext$major'
13434   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13435   shlibpath_var=LD_LIBRARY_PATH
13436   shlibpath_overrides_runpath=no
13437   hardcode_into_libs=yes
13438   ;;
13439
13440 irix5* | irix6* | nonstopux*)
13441   case $host_os in
13442     nonstopux*) version_type=nonstopux ;;
13443     *)
13444         if test yes = "$lt_cv_prog_gnu_ld"; then
13445                 version_type=linux # correct to gnu/linux during the next big refactor
13446         else
13447                 version_type=irix
13448         fi ;;
13449   esac
13450   need_lib_prefix=no
13451   need_version=no
13452   soname_spec='$libname$release$shared_ext$major'
13453   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13454   case $host_os in
13455   irix5* | nonstopux*)
13456     libsuff= shlibsuff=
13457     ;;
13458   *)
13459     case $LD in # libtool.m4 will add one of these switches to LD
13460     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13461       libsuff= shlibsuff= libmagic=32-bit;;
13462     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13463       libsuff=32 shlibsuff=N32 libmagic=N32;;
13464     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13465       libsuff=64 shlibsuff=64 libmagic=64-bit;;
13466     *) libsuff= shlibsuff= libmagic=never-match;;
13467     esac
13468     ;;
13469   esac
13470   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13471   shlibpath_overrides_runpath=no
13472   sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13473   sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13474   hardcode_into_libs=yes
13475   ;;
13476
13477 # No shared lib support for Linux oldld, aout, or coff.
13478 linux*oldld* | linux*aout* | linux*coff*)
13479   dynamic_linker=no
13480   ;;
13481
13482 linux*android*)
13483   version_type=none # Android doesn't support versioned libraries.
13484   need_lib_prefix=no
13485   need_version=no
13486   library_names_spec='$libname$release$shared_ext'
13487   soname_spec='$libname$release$shared_ext'
13488   finish_cmds=
13489   shlibpath_var=LD_LIBRARY_PATH
13490   shlibpath_overrides_runpath=yes
13491
13492   # This implies no fast_install, which is unacceptable.
13493   # Some rework will be needed to allow for fast_install
13494   # before this can be enabled.
13495   hardcode_into_libs=yes
13496
13497   dynamic_linker='Android linker'
13498   # Don't embed -rpath directories since the linker doesn't support them.
13499   hardcode_libdir_flag_spec='-L$libdir'
13500   ;;
13501
13502 # This must be glibc/ELF.
13503 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13504   version_type=linux # correct to gnu/linux during the next big refactor
13505   need_lib_prefix=no
13506   need_version=no
13507   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13508   soname_spec='$libname$release$shared_ext$major'
13509   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13510   shlibpath_var=LD_LIBRARY_PATH
13511   shlibpath_overrides_runpath=no
13512
13513   # Some binutils ld are patched to set DT_RUNPATH
13514   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
13515   $as_echo_n "(cached) " >&6
13516 else
13517   lt_cv_shlibpath_overrides_runpath=no
13518     save_LDFLAGS=$LDFLAGS
13519     save_libdir=$libdir
13520     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13521          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13522     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13523 /* end confdefs.h.  */
13524
13525 int
13526 main ()
13527 {
13528
13529   ;
13530   return 0;
13531 }
13532 _ACEOF
13533 if ac_fn_c_try_link "$LINENO"; then :
13534   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
13535   lt_cv_shlibpath_overrides_runpath=yes
13536 fi
13537 fi
13538 rm -f core conftest.err conftest.$ac_objext \
13539     conftest$ac_exeext conftest.$ac_ext
13540     LDFLAGS=$save_LDFLAGS
13541     libdir=$save_libdir
13542
13543 fi
13544
13545   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13546
13547   # This implies no fast_install, which is unacceptable.
13548   # Some rework will be needed to allow for fast_install
13549   # before this can be enabled.
13550   hardcode_into_libs=yes
13551
13552   # Ideally, we could use ldconfig to report *all* directores which are
13553   # searched for libraries, however this is still not possible.  Aside from not
13554   # being certain /sbin/ldconfig is available, command
13555   # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13556   # even though it is searched at run-time.  Try to do the best guess by
13557   # appending ld.so.conf contents (and includes) to the search path.
13558   if test -f /etc/ld.so.conf; then
13559     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' ' '`
13560     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
13561   fi
13562
13563   # We used to test for /lib/ld.so.1 and disable shared libraries on
13564   # powerpc, because MkLinux only supported shared libraries with the
13565   # GNU dynamic linker.  Since this was broken with cross compilers,
13566   # most powerpc-linux boxes support dynamic linking these days and
13567   # people can always --disable-shared, the test was removed, and we
13568   # assume the GNU/Linux dynamic linker is in use.
13569   dynamic_linker='GNU/Linux ld.so'
13570   ;;
13571
13572 netbsd*)
13573   version_type=sunos
13574   need_lib_prefix=no
13575   need_version=no
13576   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13577     library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13578     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13579     dynamic_linker='NetBSD (a.out) ld.so'
13580   else
13581     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13582     soname_spec='$libname$release$shared_ext$major'
13583     dynamic_linker='NetBSD ld.elf_so'
13584   fi
13585   shlibpath_var=LD_LIBRARY_PATH
13586   shlibpath_overrides_runpath=yes
13587   hardcode_into_libs=yes
13588   ;;
13589
13590 newsos6)
13591   version_type=linux # correct to gnu/linux during the next big refactor
13592   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13593   shlibpath_var=LD_LIBRARY_PATH
13594   shlibpath_overrides_runpath=yes
13595   ;;
13596
13597 *nto* | *qnx*)
13598   version_type=qnx
13599   need_lib_prefix=no
13600   need_version=no
13601   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13602   soname_spec='$libname$release$shared_ext$major'
13603   shlibpath_var=LD_LIBRARY_PATH
13604   shlibpath_overrides_runpath=no
13605   hardcode_into_libs=yes
13606   dynamic_linker='ldqnx.so'
13607   ;;
13608
13609 openbsd* | bitrig*)
13610   version_type=sunos
13611   sys_lib_dlsearch_path_spec=/usr/lib
13612   need_lib_prefix=no
13613   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13614     need_version=no
13615   else
13616     need_version=yes
13617   fi
13618   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13619   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13620   shlibpath_var=LD_LIBRARY_PATH
13621   shlibpath_overrides_runpath=yes
13622   ;;
13623
13624 os2*)
13625   libname_spec='$name'
13626   version_type=windows
13627   shrext_cmds=.dll
13628   need_version=no
13629   need_lib_prefix=no
13630   # OS/2 can only load a DLL with a base name of 8 characters or less.
13631   soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13632     v=$($ECHO $release$versuffix | tr -d .-);
13633     n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13634     $ECHO $n$v`$shared_ext'
13635   library_names_spec='${libname}_dll.$libext'
13636   dynamic_linker='OS/2 ld.exe'
13637   shlibpath_var=BEGINLIBPATH
13638   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13639   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13640   postinstall_cmds='base_file=`basename \$file`~
13641     dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13642     dldir=$destdir/`dirname \$dlpath`~
13643     test -d \$dldir || mkdir -p \$dldir~
13644     $install_prog $dir/$dlname \$dldir/$dlname~
13645     chmod a+x \$dldir/$dlname~
13646     if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13647       eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13648     fi'
13649   postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13650     dlpath=$dir/\$dldll~
13651     $RM \$dlpath'
13652   ;;
13653
13654 osf3* | osf4* | osf5*)
13655   version_type=osf
13656   need_lib_prefix=no
13657   need_version=no
13658   soname_spec='$libname$release$shared_ext$major'
13659   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13660   shlibpath_var=LD_LIBRARY_PATH
13661   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13662   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13663   ;;
13664
13665 rdos*)
13666   dynamic_linker=no
13667   ;;
13668
13669 solaris*)
13670   version_type=linux # correct to gnu/linux during the next big refactor
13671   need_lib_prefix=no
13672   need_version=no
13673   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13674   soname_spec='$libname$release$shared_ext$major'
13675   shlibpath_var=LD_LIBRARY_PATH
13676   shlibpath_overrides_runpath=yes
13677   hardcode_into_libs=yes
13678   # ldd complains unless libraries are executable
13679   postinstall_cmds='chmod +x $lib'
13680   ;;
13681
13682 sunos4*)
13683   version_type=sunos
13684   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13685   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13686   shlibpath_var=LD_LIBRARY_PATH
13687   shlibpath_overrides_runpath=yes
13688   if test yes = "$with_gnu_ld"; then
13689     need_lib_prefix=no
13690   fi
13691   need_version=yes
13692   ;;
13693
13694 sysv4 | sysv4.3*)
13695   version_type=linux # correct to gnu/linux during the next big refactor
13696   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13697   soname_spec='$libname$release$shared_ext$major'
13698   shlibpath_var=LD_LIBRARY_PATH
13699   case $host_vendor in
13700     sni)
13701       shlibpath_overrides_runpath=no
13702       need_lib_prefix=no
13703       runpath_var=LD_RUN_PATH
13704       ;;
13705     siemens)
13706       need_lib_prefix=no
13707       ;;
13708     motorola)
13709       need_lib_prefix=no
13710       need_version=no
13711       shlibpath_overrides_runpath=no
13712       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13713       ;;
13714   esac
13715   ;;
13716
13717 sysv4*MP*)
13718   if test -d /usr/nec; then
13719     version_type=linux # correct to gnu/linux during the next big refactor
13720     library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13721     soname_spec='$libname$shared_ext.$major'
13722     shlibpath_var=LD_LIBRARY_PATH
13723   fi
13724   ;;
13725
13726 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13727   version_type=sco
13728   need_lib_prefix=no
13729   need_version=no
13730   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13731   soname_spec='$libname$release$shared_ext$major'
13732   shlibpath_var=LD_LIBRARY_PATH
13733   shlibpath_overrides_runpath=yes
13734   hardcode_into_libs=yes
13735   if test yes = "$with_gnu_ld"; then
13736     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13737   else
13738     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13739     case $host_os in
13740       sco3.2v5*)
13741         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13742         ;;
13743     esac
13744   fi
13745   sys_lib_dlsearch_path_spec='/usr/lib'
13746   ;;
13747
13748 tpf*)
13749   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13750   version_type=linux # correct to gnu/linux during the next big refactor
13751   need_lib_prefix=no
13752   need_version=no
13753   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13754   shlibpath_var=LD_LIBRARY_PATH
13755   shlibpath_overrides_runpath=no
13756   hardcode_into_libs=yes
13757   ;;
13758
13759 uts4*)
13760   version_type=linux # correct to gnu/linux during the next big refactor
13761   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13762   soname_spec='$libname$release$shared_ext$major'
13763   shlibpath_var=LD_LIBRARY_PATH
13764   ;;
13765
13766 *)
13767   dynamic_linker=no
13768   ;;
13769 esac
13770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13771 $as_echo "$dynamic_linker" >&6; }
13772 test no = "$dynamic_linker" && can_build_shared=no
13773
13774 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13775 if test yes = "$GCC"; then
13776   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13777 fi
13778
13779 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13780   sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13781 fi
13782
13783 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13784   sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13785 fi
13786
13787 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13788 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13789
13790 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13791 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13792
13793 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13794 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13893 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13894 hardcode_action=
13895 if test -n "$hardcode_libdir_flag_spec" ||
13896    test -n "$runpath_var" ||
13897    test yes = "$hardcode_automatic"; then
13898
13899   # We can hardcode non-existent directories.
13900   if test no != "$hardcode_direct" &&
13901      # If the only mechanism to avoid hardcoding is shlibpath_var, we
13902      # have to relink, otherwise we might link with an installed library
13903      # when we should be linking with a yet-to-be-installed one
13904      ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13905      test no != "$hardcode_minus_L"; then
13906     # Linking always hardcodes the temporary library directory.
13907     hardcode_action=relink
13908   else
13909     # We can link without hardcoding, and we can hardcode nonexisting dirs.
13910     hardcode_action=immediate
13911   fi
13912 else
13913   # We cannot hardcode anything, or else we can only hardcode existing
13914   # directories.
13915   hardcode_action=unsupported
13916 fi
13917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13918 $as_echo "$hardcode_action" >&6; }
13919
13920 if test relink = "$hardcode_action" ||
13921    test yes = "$inherit_rpath"; then
13922   # Fast installation is not supported
13923   enable_fast_install=no
13924 elif test yes = "$shlibpath_overrides_runpath" ||
13925      test no = "$enable_shared"; then
13926   # Fast installation is not necessary
13927   enable_fast_install=needless
13928 fi
13929
13930
13931
13932
13933
13934
13935   if test yes != "$enable_dlopen"; then
13936   enable_dlopen=unknown
13937   enable_dlopen_self=unknown
13938   enable_dlopen_self_static=unknown
13939 else
13940   lt_cv_dlopen=no
13941   lt_cv_dlopen_libs=
13942
13943   case $host_os in
13944   beos*)
13945     lt_cv_dlopen=load_add_on
13946     lt_cv_dlopen_libs=
13947     lt_cv_dlopen_self=yes
13948     ;;
13949
13950   mingw* | pw32* | cegcc*)
13951     lt_cv_dlopen=LoadLibrary
13952     lt_cv_dlopen_libs=
13953     ;;
13954
13955   cygwin*)
13956     lt_cv_dlopen=dlopen
13957     lt_cv_dlopen_libs=
13958     ;;
13959
13960   darwin*)
13961     # if libdl is installed we need to link against it
13962     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13963 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13964 if ${ac_cv_lib_dl_dlopen+:} false; then :
13965   $as_echo_n "(cached) " >&6
13966 else
13967   ac_check_lib_save_LIBS=$LIBS
13968 LIBS="-ldl  $LIBS"
13969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13970 /* end confdefs.h.  */
13971
13972 /* Override any GCC internal prototype to avoid an error.
13973    Use char because int might match the return type of a GCC
13974    builtin and then its argument prototype would still apply.  */
13975 #ifdef __cplusplus
13976 extern "C"
13977 #endif
13978 char dlopen ();
13979 int
13980 main ()
13981 {
13982 return dlopen ();
13983   ;
13984   return 0;
13985 }
13986 _ACEOF
13987 if ac_fn_c_try_link "$LINENO"; then :
13988   ac_cv_lib_dl_dlopen=yes
13989 else
13990   ac_cv_lib_dl_dlopen=no
13991 fi
13992 rm -f core conftest.err conftest.$ac_objext \
13993     conftest$ac_exeext conftest.$ac_ext
13994 LIBS=$ac_check_lib_save_LIBS
13995 fi
13996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13997 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13998 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13999   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14000 else
14001
14002     lt_cv_dlopen=dyld
14003     lt_cv_dlopen_libs=
14004     lt_cv_dlopen_self=yes
14005
14006 fi
14007
14008     ;;
14009
14010   tpf*)
14011     # Don't try to run any link tests for TPF.  We know it's impossible
14012     # because TPF is a cross-compiler, and we know how we open DSOs.
14013     lt_cv_dlopen=dlopen
14014     lt_cv_dlopen_libs=
14015     lt_cv_dlopen_self=no
14016     ;;
14017
14018   *)
14019     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
14020 if test "x$ac_cv_func_shl_load" = xyes; then :
14021   lt_cv_dlopen=shl_load
14022 else
14023   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
14024 $as_echo_n "checking for shl_load in -ldld... " >&6; }
14025 if ${ac_cv_lib_dld_shl_load+:} false; then :
14026   $as_echo_n "(cached) " >&6
14027 else
14028   ac_check_lib_save_LIBS=$LIBS
14029 LIBS="-ldld  $LIBS"
14030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14031 /* end confdefs.h.  */
14032
14033 /* Override any GCC internal prototype to avoid an error.
14034    Use char because int might match the return type of a GCC
14035    builtin and then its argument prototype would still apply.  */
14036 #ifdef __cplusplus
14037 extern "C"
14038 #endif
14039 char shl_load ();
14040 int
14041 main ()
14042 {
14043 return shl_load ();
14044   ;
14045   return 0;
14046 }
14047 _ACEOF
14048 if ac_fn_c_try_link "$LINENO"; then :
14049   ac_cv_lib_dld_shl_load=yes
14050 else
14051   ac_cv_lib_dld_shl_load=no
14052 fi
14053 rm -f core conftest.err conftest.$ac_objext \
14054     conftest$ac_exeext conftest.$ac_ext
14055 LIBS=$ac_check_lib_save_LIBS
14056 fi
14057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
14058 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
14059 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
14060   lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
14061 else
14062   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
14063 if test "x$ac_cv_func_dlopen" = xyes; then :
14064   lt_cv_dlopen=dlopen
14065 else
14066   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14067 $as_echo_n "checking for dlopen in -ldl... " >&6; }
14068 if ${ac_cv_lib_dl_dlopen+:} false; then :
14069   $as_echo_n "(cached) " >&6
14070 else
14071   ac_check_lib_save_LIBS=$LIBS
14072 LIBS="-ldl  $LIBS"
14073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14074 /* end confdefs.h.  */
14075
14076 /* Override any GCC internal prototype to avoid an error.
14077    Use char because int might match the return type of a GCC
14078    builtin and then its argument prototype would still apply.  */
14079 #ifdef __cplusplus
14080 extern "C"
14081 #endif
14082 char dlopen ();
14083 int
14084 main ()
14085 {
14086 return dlopen ();
14087   ;
14088   return 0;
14089 }
14090 _ACEOF
14091 if ac_fn_c_try_link "$LINENO"; then :
14092   ac_cv_lib_dl_dlopen=yes
14093 else
14094   ac_cv_lib_dl_dlopen=no
14095 fi
14096 rm -f core conftest.err conftest.$ac_objext \
14097     conftest$ac_exeext conftest.$ac_ext
14098 LIBS=$ac_check_lib_save_LIBS
14099 fi
14100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14101 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14102 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14103   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14104 else
14105   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
14106 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
14107 if ${ac_cv_lib_svld_dlopen+:} false; then :
14108   $as_echo_n "(cached) " >&6
14109 else
14110   ac_check_lib_save_LIBS=$LIBS
14111 LIBS="-lsvld  $LIBS"
14112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14113 /* end confdefs.h.  */
14114
14115 /* Override any GCC internal prototype to avoid an error.
14116    Use char because int might match the return type of a GCC
14117    builtin and then its argument prototype would still apply.  */
14118 #ifdef __cplusplus
14119 extern "C"
14120 #endif
14121 char dlopen ();
14122 int
14123 main ()
14124 {
14125 return dlopen ();
14126   ;
14127   return 0;
14128 }
14129 _ACEOF
14130 if ac_fn_c_try_link "$LINENO"; then :
14131   ac_cv_lib_svld_dlopen=yes
14132 else
14133   ac_cv_lib_svld_dlopen=no
14134 fi
14135 rm -f core conftest.err conftest.$ac_objext \
14136     conftest$ac_exeext conftest.$ac_ext
14137 LIBS=$ac_check_lib_save_LIBS
14138 fi
14139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
14140 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
14141 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
14142   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
14143 else
14144   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
14145 $as_echo_n "checking for dld_link in -ldld... " >&6; }
14146 if ${ac_cv_lib_dld_dld_link+:} false; then :
14147   $as_echo_n "(cached) " >&6
14148 else
14149   ac_check_lib_save_LIBS=$LIBS
14150 LIBS="-ldld  $LIBS"
14151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14152 /* end confdefs.h.  */
14153
14154 /* Override any GCC internal prototype to avoid an error.
14155    Use char because int might match the return type of a GCC
14156    builtin and then its argument prototype would still apply.  */
14157 #ifdef __cplusplus
14158 extern "C"
14159 #endif
14160 char dld_link ();
14161 int
14162 main ()
14163 {
14164 return dld_link ();
14165   ;
14166   return 0;
14167 }
14168 _ACEOF
14169 if ac_fn_c_try_link "$LINENO"; then :
14170   ac_cv_lib_dld_dld_link=yes
14171 else
14172   ac_cv_lib_dld_dld_link=no
14173 fi
14174 rm -f core conftest.err conftest.$ac_objext \
14175     conftest$ac_exeext conftest.$ac_ext
14176 LIBS=$ac_check_lib_save_LIBS
14177 fi
14178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14179 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
14180 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
14181   lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14182 fi
14183
14184
14185 fi
14186
14187
14188 fi
14189
14190
14191 fi
14192
14193
14194 fi
14195
14196
14197 fi
14198
14199     ;;
14200   esac
14201
14202   if test no = "$lt_cv_dlopen"; then
14203     enable_dlopen=no
14204   else
14205     enable_dlopen=yes
14206   fi
14207
14208   case $lt_cv_dlopen in
14209   dlopen)
14210     save_CPPFLAGS=$CPPFLAGS
14211     test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14212
14213     save_LDFLAGS=$LDFLAGS
14214     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14215
14216     save_LIBS=$LIBS
14217     LIBS="$lt_cv_dlopen_libs $LIBS"
14218
14219     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14220 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
14221 if ${lt_cv_dlopen_self+:} false; then :
14222   $as_echo_n "(cached) " >&6
14223 else
14224           if test yes = "$cross_compiling"; then :
14225   lt_cv_dlopen_self=cross
14226 else
14227   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14228   lt_status=$lt_dlunknown
14229   cat > conftest.$ac_ext <<_LT_EOF
14230 #line $LINENO "configure"
14231 #include "confdefs.h"
14232
14233 #if HAVE_DLFCN_H
14234 #include <dlfcn.h>
14235 #endif
14236
14237 #include <stdio.h>
14238
14239 #ifdef RTLD_GLOBAL
14240 #  define LT_DLGLOBAL           RTLD_GLOBAL
14241 #else
14242 #  ifdef DL_GLOBAL
14243 #    define LT_DLGLOBAL         DL_GLOBAL
14244 #  else
14245 #    define LT_DLGLOBAL         0
14246 #  endif
14247 #endif
14248
14249 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14250    find out it does not work in some platform. */
14251 #ifndef LT_DLLAZY_OR_NOW
14252 #  ifdef RTLD_LAZY
14253 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14254 #  else
14255 #    ifdef DL_LAZY
14256 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14257 #    else
14258 #      ifdef RTLD_NOW
14259 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14260 #      else
14261 #        ifdef DL_NOW
14262 #          define LT_DLLAZY_OR_NOW      DL_NOW
14263 #        else
14264 #          define LT_DLLAZY_OR_NOW      0
14265 #        endif
14266 #      endif
14267 #    endif
14268 #  endif
14269 #endif
14270
14271 /* When -fvisibility=hidden is used, assume the code has been annotated
14272    correspondingly for the symbols needed.  */
14273 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14274 int fnord () __attribute__((visibility("default")));
14275 #endif
14276
14277 int fnord () { return 42; }
14278 int main ()
14279 {
14280   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14281   int status = $lt_dlunknown;
14282
14283   if (self)
14284     {
14285       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14286       else
14287         {
14288           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14289           else puts (dlerror ());
14290         }
14291       /* dlclose (self); */
14292     }
14293   else
14294     puts (dlerror ());
14295
14296   return status;
14297 }
14298 _LT_EOF
14299   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14300   (eval $ac_link) 2>&5
14301   ac_status=$?
14302   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14303   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14304     (./conftest; exit; ) >&5 2>/dev/null
14305     lt_status=$?
14306     case x$lt_status in
14307       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14308       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14309       x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14310     esac
14311   else :
14312     # compilation failed
14313     lt_cv_dlopen_self=no
14314   fi
14315 fi
14316 rm -fr conftest*
14317
14318
14319 fi
14320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14321 $as_echo "$lt_cv_dlopen_self" >&6; }
14322
14323     if test yes = "$lt_cv_dlopen_self"; then
14324       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14325       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14326 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
14327 if ${lt_cv_dlopen_self_static+:} false; then :
14328   $as_echo_n "(cached) " >&6
14329 else
14330           if test yes = "$cross_compiling"; then :
14331   lt_cv_dlopen_self_static=cross
14332 else
14333   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14334   lt_status=$lt_dlunknown
14335   cat > conftest.$ac_ext <<_LT_EOF
14336 #line $LINENO "configure"
14337 #include "confdefs.h"
14338
14339 #if HAVE_DLFCN_H
14340 #include <dlfcn.h>
14341 #endif
14342
14343 #include <stdio.h>
14344
14345 #ifdef RTLD_GLOBAL
14346 #  define LT_DLGLOBAL           RTLD_GLOBAL
14347 #else
14348 #  ifdef DL_GLOBAL
14349 #    define LT_DLGLOBAL         DL_GLOBAL
14350 #  else
14351 #    define LT_DLGLOBAL         0
14352 #  endif
14353 #endif
14354
14355 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14356    find out it does not work in some platform. */
14357 #ifndef LT_DLLAZY_OR_NOW
14358 #  ifdef RTLD_LAZY
14359 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14360 #  else
14361 #    ifdef DL_LAZY
14362 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14363 #    else
14364 #      ifdef RTLD_NOW
14365 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14366 #      else
14367 #        ifdef DL_NOW
14368 #          define LT_DLLAZY_OR_NOW      DL_NOW
14369 #        else
14370 #          define LT_DLLAZY_OR_NOW      0
14371 #        endif
14372 #      endif
14373 #    endif
14374 #  endif
14375 #endif
14376
14377 /* When -fvisibility=hidden is used, assume the code has been annotated
14378    correspondingly for the symbols needed.  */
14379 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14380 int fnord () __attribute__((visibility("default")));
14381 #endif
14382
14383 int fnord () { return 42; }
14384 int main ()
14385 {
14386   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14387   int status = $lt_dlunknown;
14388
14389   if (self)
14390     {
14391       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14392       else
14393         {
14394           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14395           else puts (dlerror ());
14396         }
14397       /* dlclose (self); */
14398     }
14399   else
14400     puts (dlerror ());
14401
14402   return status;
14403 }
14404 _LT_EOF
14405   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14406   (eval $ac_link) 2>&5
14407   ac_status=$?
14408   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14409   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14410     (./conftest; exit; ) >&5 2>/dev/null
14411     lt_status=$?
14412     case x$lt_status in
14413       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14414       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14415       x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14416     esac
14417   else :
14418     # compilation failed
14419     lt_cv_dlopen_self_static=no
14420   fi
14421 fi
14422 rm -fr conftest*
14423
14424
14425 fi
14426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14427 $as_echo "$lt_cv_dlopen_self_static" >&6; }
14428     fi
14429
14430     CPPFLAGS=$save_CPPFLAGS
14431     LDFLAGS=$save_LDFLAGS
14432     LIBS=$save_LIBS
14433     ;;
14434   esac
14435
14436   case $lt_cv_dlopen_self in
14437   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14438   *) enable_dlopen_self=unknown ;;
14439   esac
14440
14441   case $lt_cv_dlopen_self_static in
14442   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14443   *) enable_dlopen_self_static=unknown ;;
14444   esac
14445 fi
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463 striplib=
14464 old_striplib=
14465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14466 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
14467 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14468   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14469   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14471 $as_echo "yes" >&6; }
14472 else
14473 # FIXME - insert some real tests, host_os isn't really good enough
14474   case $host_os in
14475   darwin*)
14476     if test -n "$STRIP"; then
14477       striplib="$STRIP -x"
14478       old_striplib="$STRIP -S"
14479       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14480 $as_echo "yes" >&6; }
14481     else
14482       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14483 $as_echo "no" >&6; }
14484     fi
14485     ;;
14486   *)
14487     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14488 $as_echo "no" >&6; }
14489     ;;
14490   esac
14491 fi
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504   # Report what library types will actually be built
14505   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14506 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
14507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14508 $as_echo "$can_build_shared" >&6; }
14509
14510   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14511 $as_echo_n "checking whether to build shared libraries... " >&6; }
14512   test no = "$can_build_shared" && enable_shared=no
14513
14514   # On AIX, shared libraries and static libraries use the same namespace, and
14515   # are all built from PIC.
14516   case $host_os in
14517   aix3*)
14518     test yes = "$enable_shared" && enable_static=no
14519     if test -n "$RANLIB"; then
14520       archive_cmds="$archive_cmds~\$RANLIB \$lib"
14521       postinstall_cmds='$RANLIB $lib'
14522     fi
14523     ;;
14524
14525   aix[4-9]*)
14526     if test ia64 != "$host_cpu"; then
14527       case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14528       yes,aix,yes) ;;                   # shared object as lib.so file only
14529       yes,svr4,*) ;;                    # shared object as lib.so archive member only
14530       yes,*) enable_static=no ;;        # shared object in lib.a archive as well
14531       esac
14532     fi
14533     ;;
14534   esac
14535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14536 $as_echo "$enable_shared" >&6; }
14537
14538   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14539 $as_echo_n "checking whether to build static libraries... " >&6; }
14540   # Make sure either enable_shared or enable_static is yes.
14541   test yes = "$enable_shared" || enable_static=yes
14542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14543 $as_echo "$enable_static" >&6; }
14544
14545
14546
14547
14548 fi
14549 ac_ext=c
14550 ac_cpp='$CPP $CPPFLAGS'
14551 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14552 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14553 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14554
14555 CC=$lt_save_CC
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571         ac_config_commands="$ac_config_commands libtool"
14572
14573
14574
14575
14576 # Only expand once:
14577
14578
14579
14580
14581 # NTP has (so far) been relying on leading-edge autogen, which
14582 # means we need the appropriate corresponding libopts as well.
14583 # Therefore, by default:
14584 # - use the version of libopts we ship with
14585 # - do not install it
14586 # - build a static copy (AC_DISABLE_SHARED - done earlier)
14587 case "${enable_local_libopts+set}" in
14588  set) ;;
14589  *) enable_local_libopts=yes ;;
14590 esac
14591 case "${enable_libopts_install+set}" in
14592  set) ;;
14593  *) enable_libopts_install=no ;;
14594 esac
14595 enable_nls=no
14596 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14597 if test "x$ac_cv_type_pid_t" = xyes; then :
14598
14599 else
14600
14601 cat >>confdefs.h <<_ACEOF
14602 #define pid_t int
14603 _ACEOF
14604
14605 fi
14606
14607
14608
14609   ac_header_dirent=no
14610 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14611   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
14613 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
14614 if eval \${$as_ac_Header+:} false; then :
14615   $as_echo_n "(cached) " >&6
14616 else
14617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14618 /* end confdefs.h.  */
14619 #include <sys/types.h>
14620 #include <$ac_hdr>
14621
14622 int
14623 main ()
14624 {
14625 if ((DIR *) 0)
14626 return 0;
14627   ;
14628   return 0;
14629 }
14630 _ACEOF
14631 if ac_fn_c_try_compile "$LINENO"; then :
14632   eval "$as_ac_Header=yes"
14633 else
14634   eval "$as_ac_Header=no"
14635 fi
14636 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14637 fi
14638 eval ac_res=\$$as_ac_Header
14639                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14640 $as_echo "$ac_res" >&6; }
14641 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14642   cat >>confdefs.h <<_ACEOF
14643 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14644 _ACEOF
14645
14646 ac_header_dirent=$ac_hdr; break
14647 fi
14648
14649 done
14650 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14651 if test $ac_header_dirent = dirent.h; then
14652   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
14653 $as_echo_n "checking for library containing opendir... " >&6; }
14654 if ${ac_cv_search_opendir+:} false; then :
14655   $as_echo_n "(cached) " >&6
14656 else
14657   ac_func_search_save_LIBS=$LIBS
14658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14659 /* end confdefs.h.  */
14660
14661 /* Override any GCC internal prototype to avoid an error.
14662    Use char because int might match the return type of a GCC
14663    builtin and then its argument prototype would still apply.  */
14664 #ifdef __cplusplus
14665 extern "C"
14666 #endif
14667 char opendir ();
14668 int
14669 main ()
14670 {
14671 return opendir ();
14672   ;
14673   return 0;
14674 }
14675 _ACEOF
14676 for ac_lib in '' dir; do
14677   if test -z "$ac_lib"; then
14678     ac_res="none required"
14679   else
14680     ac_res=-l$ac_lib
14681     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14682   fi
14683   if ac_fn_c_try_link "$LINENO"; then :
14684   ac_cv_search_opendir=$ac_res
14685 fi
14686 rm -f core conftest.err conftest.$ac_objext \
14687     conftest$ac_exeext
14688   if ${ac_cv_search_opendir+:} false; then :
14689   break
14690 fi
14691 done
14692 if ${ac_cv_search_opendir+:} false; then :
14693
14694 else
14695   ac_cv_search_opendir=no
14696 fi
14697 rm conftest.$ac_ext
14698 LIBS=$ac_func_search_save_LIBS
14699 fi
14700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
14701 $as_echo "$ac_cv_search_opendir" >&6; }
14702 ac_res=$ac_cv_search_opendir
14703 if test "$ac_res" != no; then :
14704   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14705
14706 fi
14707
14708 else
14709   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
14710 $as_echo_n "checking for library containing opendir... " >&6; }
14711 if ${ac_cv_search_opendir+:} false; then :
14712   $as_echo_n "(cached) " >&6
14713 else
14714   ac_func_search_save_LIBS=$LIBS
14715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14716 /* end confdefs.h.  */
14717
14718 /* Override any GCC internal prototype to avoid an error.
14719    Use char because int might match the return type of a GCC
14720    builtin and then its argument prototype would still apply.  */
14721 #ifdef __cplusplus
14722 extern "C"
14723 #endif
14724 char opendir ();
14725 int
14726 main ()
14727 {
14728 return opendir ();
14729   ;
14730   return 0;
14731 }
14732 _ACEOF
14733 for ac_lib in '' x; do
14734   if test -z "$ac_lib"; then
14735     ac_res="none required"
14736   else
14737     ac_res=-l$ac_lib
14738     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14739   fi
14740   if ac_fn_c_try_link "$LINENO"; then :
14741   ac_cv_search_opendir=$ac_res
14742 fi
14743 rm -f core conftest.err conftest.$ac_objext \
14744     conftest$ac_exeext
14745   if ${ac_cv_search_opendir+:} false; then :
14746   break
14747 fi
14748 done
14749 if ${ac_cv_search_opendir+:} false; then :
14750
14751 else
14752   ac_cv_search_opendir=no
14753 fi
14754 rm conftest.$ac_ext
14755 LIBS=$ac_func_search_save_LIBS
14756 fi
14757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
14758 $as_echo "$ac_cv_search_opendir" >&6; }
14759 ac_res=$ac_cv_search_opendir
14760 if test "$ac_res" != no; then :
14761   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14762
14763 fi
14764
14765 fi
14766
14767
14768   # =================
14769   # AC_CHECK_HEADERS
14770   # =================
14771   for ac_header in  \
14772       sys/mman.h    sys/param.h   sys/poll.h    sys/procset.h \
14773       sys/select.h  sys/socket.h  sys/stropts.h sys/time.h \
14774       sys/un.h      sys/wait.h    dlfcn.h       errno.h \
14775       fcntl.h       libgen.h      libintl.h     memory.h \
14776       netinet/in.h  setjmp.h      stdbool.h     sysexits.h \
14777       unistd.h      utime.h
14778 do :
14779   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14780 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14781 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14782   cat >>confdefs.h <<_ACEOF
14783 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14784 _ACEOF
14785
14786 fi
14787
14788 done
14789
14790
14791   for ac_header in stdarg.h     varargs.h
14792 do :
14793   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14794 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14795 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14796   cat >>confdefs.h <<_ACEOF
14797 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14798 _ACEOF
14799  lo_have_arg_hdr=true;break
14800 else
14801   lo_have_arg_hdr=false
14802 fi
14803
14804 done
14805
14806
14807   for ac_header in string.h     strings.h
14808 do :
14809   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14810 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14811 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14812   cat >>confdefs.h <<_ACEOF
14813 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14814 _ACEOF
14815  lo_have_str_hdr=true;break
14816 else
14817   lo_have_str_hdr=false
14818 fi
14819
14820 done
14821
14822
14823   for ac_header in limits.h     sys/limits.h  values.h
14824 do :
14825   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14826 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14827 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14828   cat >>confdefs.h <<_ACEOF
14829 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14830 _ACEOF
14831  lo_have_lim_hdr=true;break
14832 else
14833   lo_have_lim_hdr=false
14834 fi
14835
14836 done
14837
14838
14839   for ac_header in inttypes.h   stdint.h
14840 do :
14841   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14842 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14843 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14844   cat >>confdefs.h <<_ACEOF
14845 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14846 _ACEOF
14847  lo_have_typ_hdr=true;break
14848 else
14849   lo_have_typ_hdr=false
14850 fi
14851
14852 done
14853
14854
14855   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
14856 $as_echo_n "checking for working stdnoreturn.h... " >&6; }
14857 if ${gl_cv_header_working_stdnoreturn_h+:} false; then :
14858   $as_echo_n "(cached) " >&6
14859 else
14860   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14861 /* end confdefs.h.  */
14862 #include <stdlib.h>
14863             #include <stdnoreturn.h>
14864             /* Do not check for 'noreturn' after the return type.
14865                C11 allows it, but it's rarely done that way
14866                and circa-2012 bleeding-edge GCC rejects it when given
14867                -Werror=old-style-declaration.  */
14868             noreturn void foo1 (void) { exit (0); }
14869             _Noreturn void foo2 (void) { exit (0); }
14870             int testit (int argc, char **argv) {
14871               if (argc & 1)
14872                 return 0;
14873               (argv[0][0] ? foo1 : foo2) ();
14874             }
14875
14876 int
14877 main ()
14878 {
14879
14880   ;
14881   return 0;
14882 }
14883 _ACEOF
14884 if ac_fn_c_try_compile "$LINENO"; then :
14885   gl_cv_header_working_stdnoreturn_h=yes
14886 else
14887   gl_cv_header_working_stdnoreturn_h=no
14888 fi
14889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14890 fi
14891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
14892 $as_echo "$gl_cv_header_working_stdnoreturn_h" >&6; }
14893
14894   if test $gl_cv_header_working_stdnoreturn_h = yes; then
14895     STDNORETURN_H=''
14896   else
14897     STDNORETURN_H='stdnoreturn.h'
14898   fi
14899
14900
14901    if test -n "$STDNORETURN_H"; then
14902   GL_GENERATE_STDNORETURN_H_TRUE=
14903   GL_GENERATE_STDNORETURN_H_FALSE='#'
14904 else
14905   GL_GENERATE_STDNORETURN_H_TRUE='#'
14906   GL_GENERATE_STDNORETURN_H_FALSE=
14907 fi
14908
14909
14910
14911   # ----------------------------------------------------------------------
14912   # check for various programs used during the build.
14913   # On OS/X, "wchar.h" needs "runetype.h" to work properly.
14914   # ----------------------------------------------------------------------
14915   for ac_header in runetype.h wchar.h
14916 do :
14917   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14918 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
14919   $ac_includes_default
14920   #if HAVE_RUNETYPE_H
14921   # include <runetype.h>
14922   #endif
14923
14924 "
14925 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14926   cat >>confdefs.h <<_ACEOF
14927 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14928 _ACEOF
14929
14930 fi
14931
14932 done
14933
14934
14935   # Check whether --enable-nls was given.
14936 if test "${enable_nls+set}" = set; then :
14937   enableval=$enable_nls;
14938 fi
14939
14940   if test "x$enable_nls" != "xno" && \
14941   test "X${ac_cv_header_libintl_h}" = Xyes; then :
14942
14943
14944 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
14945
14946 fi
14947
14948   # --------------------------------------------
14949   # Verify certain entries from AC_CHECK_HEADERS
14950   # --------------------------------------------
14951   ${lo_have_arg_hdr} || \
14952     as_fn_error $? "you must have stdarg.h or varargs.h on your system" "$LINENO" 5
14953
14954   ${lo_have_str_hdr} || \
14955     as_fn_error $? "you must have string.h or strings.h on your system" "$LINENO" 5
14956
14957   ${lo_have_lim_hdr} || \
14958     as_fn_error $? "you must have one of limits.h, sys/limits.h or values.h" "$LINENO" 5
14959
14960   ${lo_have_typ_hdr} || \
14961     as_fn_error $? "you must have inttypes.h or stdint.h on your system" "$LINENO" 5
14962
14963   for f in sys_types sys_param sys_stat string errno stdlib memory setjmp
14964   do eval as_ac_var=\${ac_cv_header_${f}_h}
14965      test "X${as_ac_var}" = Xyes || {
14966        as_fn_error $? "you must have ${f}.h on your system" "$LINENO" 5
14967      }
14968   done
14969   test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
14970     echo '#include <stdint.h>' > inttypes.h
14971
14972   # ----------------------------------------------------------------------
14973   # Checks for typedefs
14974   # ----------------------------------------------------------------------
14975   ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
14976 if test "x$ac_cv_type_wchar_t" = xyes; then :
14977
14978 cat >>confdefs.h <<_ACEOF
14979 #define HAVE_WCHAR_T 1
14980 _ACEOF
14981
14982
14983 fi
14984
14985   ac_fn_c_check_type "$LINENO" "wint_t" "ac_cv_type_wint_t" "
14986     $ac_includes_default
14987     #if HAVE_RUNETYPE_H
14988     # include <runetype.h>
14989     #endif
14990     #if HAVE_WCHAR_H
14991     # include <wchar.h>
14992     #endif
14993
14994 "
14995 if test "x$ac_cv_type_wint_t" = xyes; then :
14996
14997 cat >>confdefs.h <<_ACEOF
14998 #define HAVE_WINT_T 1
14999 _ACEOF
15000
15001
15002 fi
15003
15004   ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
15005 if test "x$ac_cv_type_int8_t" = xyes; then :
15006
15007 cat >>confdefs.h <<_ACEOF
15008 #define HAVE_INT8_T 1
15009 _ACEOF
15010
15011
15012 fi
15013 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
15014 if test "x$ac_cv_type_uint8_t" = xyes; then :
15015
15016 cat >>confdefs.h <<_ACEOF
15017 #define HAVE_UINT8_T 1
15018 _ACEOF
15019
15020
15021 fi
15022 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
15023 if test "x$ac_cv_type_int16_t" = xyes; then :
15024
15025 cat >>confdefs.h <<_ACEOF
15026 #define HAVE_INT16_T 1
15027 _ACEOF
15028
15029
15030 fi
15031 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
15032 if test "x$ac_cv_type_uint16_t" = xyes; then :
15033
15034 cat >>confdefs.h <<_ACEOF
15035 #define HAVE_UINT16_T 1
15036 _ACEOF
15037
15038
15039 fi
15040 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
15041 if test "x$ac_cv_type_int32_t" = xyes; then :
15042
15043 cat >>confdefs.h <<_ACEOF
15044 #define HAVE_INT32_T 1
15045 _ACEOF
15046
15047
15048 fi
15049 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
15050 if test "x$ac_cv_type_uint32_t" = xyes; then :
15051
15052 cat >>confdefs.h <<_ACEOF
15053 #define HAVE_UINT32_T 1
15054 _ACEOF
15055
15056
15057 fi
15058 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
15059 if test "x$ac_cv_type_intptr_t" = xyes; then :
15060
15061 cat >>confdefs.h <<_ACEOF
15062 #define HAVE_INTPTR_T 1
15063 _ACEOF
15064
15065
15066 fi
15067 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
15068 if test "x$ac_cv_type_uintptr_t" = xyes; then :
15069
15070 cat >>confdefs.h <<_ACEOF
15071 #define HAVE_UINTPTR_T 1
15072 _ACEOF
15073
15074
15075 fi
15076 ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
15077 if test "x$ac_cv_type_uint_t" = xyes; then :
15078
15079 cat >>confdefs.h <<_ACEOF
15080 #define HAVE_UINT_T 1
15081 _ACEOF
15082
15083
15084 fi
15085 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15086 if test "x$ac_cv_type_pid_t" = xyes; then :
15087
15088 cat >>confdefs.h <<_ACEOF
15089 #define HAVE_PID_T 1
15090 _ACEOF
15091
15092
15093 fi
15094 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
15095 if test "x$ac_cv_type_size_t" = xyes; then :
15096
15097 cat >>confdefs.h <<_ACEOF
15098 #define HAVE_SIZE_T 1
15099 _ACEOF
15100
15101
15102 fi
15103 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
15104 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
15105
15106 cat >>confdefs.h <<_ACEOF
15107 #define HAVE_PTRDIFF_T 1
15108 _ACEOF
15109
15110
15111 fi
15112
15113   # The cast to long int works around a bug in the HP C Compiler
15114 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15115 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15116 # This bug is HP SR number 8606223364.
15117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
15118 $as_echo_n "checking size of char *... " >&6; }
15119 if ${ac_cv_sizeof_char_p+:} false; then :
15120   $as_echo_n "(cached) " >&6
15121 else
15122   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p"        "$ac_includes_default"; then :
15123
15124 else
15125   if test "$ac_cv_type_char_p" = yes; then
15126      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15127 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15128 as_fn_error 77 "cannot compute sizeof (char *)
15129 See \`config.log' for more details" "$LINENO" 5; }
15130    else
15131      ac_cv_sizeof_char_p=0
15132    fi
15133 fi
15134
15135 fi
15136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
15137 $as_echo "$ac_cv_sizeof_char_p" >&6; }
15138
15139
15140
15141 cat >>confdefs.h <<_ACEOF
15142 #define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
15143 _ACEOF
15144
15145
15146   # The cast to long int works around a bug in the HP C Compiler
15147 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15148 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15149 # This bug is HP SR number 8606223364.
15150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
15151 $as_echo_n "checking size of int... " >&6; }
15152 if ${ac_cv_sizeof_int+:} false; then :
15153   $as_echo_n "(cached) " >&6
15154 else
15155   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
15156
15157 else
15158   if test "$ac_cv_type_int" = yes; then
15159      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15160 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15161 as_fn_error 77 "cannot compute sizeof (int)
15162 See \`config.log' for more details" "$LINENO" 5; }
15163    else
15164      ac_cv_sizeof_int=0
15165    fi
15166 fi
15167
15168 fi
15169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
15170 $as_echo "$ac_cv_sizeof_int" >&6; }
15171
15172
15173
15174 cat >>confdefs.h <<_ACEOF
15175 #define SIZEOF_INT $ac_cv_sizeof_int
15176 _ACEOF
15177
15178
15179   # The cast to long int works around a bug in the HP C Compiler
15180 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15181 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15182 # This bug is HP SR number 8606223364.
15183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
15184 $as_echo_n "checking size of long... " >&6; }
15185 if ${ac_cv_sizeof_long+:} false; then :
15186   $as_echo_n "(cached) " >&6
15187 else
15188   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
15189
15190 else
15191   if test "$ac_cv_type_long" = yes; then
15192      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15193 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15194 as_fn_error 77 "cannot compute sizeof (long)
15195 See \`config.log' for more details" "$LINENO" 5; }
15196    else
15197      ac_cv_sizeof_long=0
15198    fi
15199 fi
15200
15201 fi
15202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
15203 $as_echo "$ac_cv_sizeof_long" >&6; }
15204
15205
15206
15207 cat >>confdefs.h <<_ACEOF
15208 #define SIZEOF_LONG $ac_cv_sizeof_long
15209 _ACEOF
15210
15211
15212   # The cast to long int works around a bug in the HP C Compiler
15213 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15214 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15215 # This bug is HP SR number 8606223364.
15216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
15217 $as_echo_n "checking size of short... " >&6; }
15218 if ${ac_cv_sizeof_short+:} false; then :
15219   $as_echo_n "(cached) " >&6
15220 else
15221   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
15222
15223 else
15224   if test "$ac_cv_type_short" = yes; then
15225      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15226 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15227 as_fn_error 77 "cannot compute sizeof (short)
15228 See \`config.log' for more details" "$LINENO" 5; }
15229    else
15230      ac_cv_sizeof_short=0
15231    fi
15232 fi
15233
15234 fi
15235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
15236 $as_echo "$ac_cv_sizeof_short" >&6; }
15237
15238
15239
15240 cat >>confdefs.h <<_ACEOF
15241 #define SIZEOF_SHORT $ac_cv_sizeof_short
15242 _ACEOF
15243
15244
15245
15246   # ------------
15247   # AC_CHECK_LIB
15248   # ------------
15249   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
15250 $as_echo_n "checking for pathfind in -lgen... " >&6; }
15251 if ${ac_cv_lib_gen_pathfind+:} false; then :
15252   $as_echo_n "(cached) " >&6
15253 else
15254   ac_check_lib_save_LIBS=$LIBS
15255 LIBS="-lgen  $LIBS"
15256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15257 /* end confdefs.h.  */
15258
15259 /* Override any GCC internal prototype to avoid an error.
15260    Use char because int might match the return type of a GCC
15261    builtin and then its argument prototype would still apply.  */
15262 #ifdef __cplusplus
15263 extern "C"
15264 #endif
15265 char pathfind ();
15266 int
15267 main ()
15268 {
15269 return pathfind ();
15270   ;
15271   return 0;
15272 }
15273 _ACEOF
15274 if ac_fn_c_try_link "$LINENO"; then :
15275   ac_cv_lib_gen_pathfind=yes
15276 else
15277   ac_cv_lib_gen_pathfind=no
15278 fi
15279 rm -f core conftest.err conftest.$ac_objext \
15280     conftest$ac_exeext conftest.$ac_ext
15281 LIBS=$ac_check_lib_save_LIBS
15282 fi
15283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
15284 $as_echo "$ac_cv_lib_gen_pathfind" >&6; }
15285 if test "x$ac_cv_lib_gen_pathfind" = xyes; then :
15286   cat >>confdefs.h <<_ACEOF
15287 #define HAVE_LIBGEN 1
15288 _ACEOF
15289
15290   LIBS="-lgen $LIBS"
15291
15292 fi
15293
15294   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
15295 $as_echo_n "checking for gettext in -lintl... " >&6; }
15296 if ${ac_cv_lib_intl_gettext+:} false; then :
15297   $as_echo_n "(cached) " >&6
15298 else
15299   ac_check_lib_save_LIBS=$LIBS
15300 LIBS="-lintl  $LIBS"
15301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15302 /* end confdefs.h.  */
15303
15304 /* Override any GCC internal prototype to avoid an error.
15305    Use char because int might match the return type of a GCC
15306    builtin and then its argument prototype would still apply.  */
15307 #ifdef __cplusplus
15308 extern "C"
15309 #endif
15310 char gettext ();
15311 int
15312 main ()
15313 {
15314 return gettext ();
15315   ;
15316   return 0;
15317 }
15318 _ACEOF
15319 if ac_fn_c_try_link "$LINENO"; then :
15320   ac_cv_lib_intl_gettext=yes
15321 else
15322   ac_cv_lib_intl_gettext=no
15323 fi
15324 rm -f core conftest.err conftest.$ac_objext \
15325     conftest$ac_exeext conftest.$ac_ext
15326 LIBS=$ac_check_lib_save_LIBS
15327 fi
15328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
15329 $as_echo "$ac_cv_lib_intl_gettext" >&6; }
15330 if test "x$ac_cv_lib_intl_gettext" = xyes; then :
15331   cat >>confdefs.h <<_ACEOF
15332 #define HAVE_LIBINTL 1
15333 _ACEOF
15334
15335   LIBS="-lintl $LIBS"
15336
15337 fi
15338
15339   for ac_func in vprintf
15340 do :
15341   ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
15342 if test "x$ac_cv_func_vprintf" = xyes; then :
15343   cat >>confdefs.h <<_ACEOF
15344 #define HAVE_VPRINTF 1
15345 _ACEOF
15346
15347 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
15348 if test "x$ac_cv_func__doprnt" = xyes; then :
15349
15350 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
15351
15352 fi
15353
15354 fi
15355 done
15356
15357
15358   for ac_header in vfork.h
15359 do :
15360   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15361 if test "x$ac_cv_header_vfork_h" = xyes; then :
15362   cat >>confdefs.h <<_ACEOF
15363 #define HAVE_VFORK_H 1
15364 _ACEOF
15365
15366 fi
15367
15368 done
15369
15370 for ac_func in fork vfork
15371 do :
15372   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15373 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15374 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15375   cat >>confdefs.h <<_ACEOF
15376 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15377 _ACEOF
15378
15379 fi
15380 done
15381
15382 if test "x$ac_cv_func_fork" = xyes; then
15383   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15384 $as_echo_n "checking for working fork... " >&6; }
15385 if ${ac_cv_func_fork_works+:} false; then :
15386   $as_echo_n "(cached) " >&6
15387 else
15388   if test "$cross_compiling" = yes; then :
15389   ac_cv_func_fork_works=cross
15390 else
15391   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15392 /* end confdefs.h.  */
15393 $ac_includes_default
15394 int
15395 main ()
15396 {
15397
15398           /* By Ruediger Kuhlmann. */
15399           return fork () < 0;
15400
15401   ;
15402   return 0;
15403 }
15404 _ACEOF
15405 if ac_fn_c_try_run "$LINENO"; then :
15406   ac_cv_func_fork_works=yes
15407 else
15408   ac_cv_func_fork_works=no
15409 fi
15410 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15411   conftest.$ac_objext conftest.beam conftest.$ac_ext
15412 fi
15413
15414 fi
15415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15416 $as_echo "$ac_cv_func_fork_works" >&6; }
15417
15418 else
15419   ac_cv_func_fork_works=$ac_cv_func_fork
15420 fi
15421 if test "x$ac_cv_func_fork_works" = xcross; then
15422   case $host in
15423     *-*-amigaos* | *-*-msdosdjgpp*)
15424       # Override, as these systems have only a dummy fork() stub
15425       ac_cv_func_fork_works=no
15426       ;;
15427     *)
15428       ac_cv_func_fork_works=yes
15429       ;;
15430   esac
15431   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15432 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15433 fi
15434 ac_cv_func_vfork_works=$ac_cv_func_vfork
15435 if test "x$ac_cv_func_vfork" = xyes; then
15436   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15437 $as_echo_n "checking for working vfork... " >&6; }
15438 if ${ac_cv_func_vfork_works+:} false; then :
15439   $as_echo_n "(cached) " >&6
15440 else
15441   if test "$cross_compiling" = yes; then :
15442   ac_cv_func_vfork_works=cross
15443 else
15444   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15445 /* end confdefs.h.  */
15446 /* Thanks to Paul Eggert for this test.  */
15447 $ac_includes_default
15448 #include <sys/wait.h>
15449 #ifdef HAVE_VFORK_H
15450 # include <vfork.h>
15451 #endif
15452 /* On some sparc systems, changes by the child to local and incoming
15453    argument registers are propagated back to the parent.  The compiler
15454    is told about this with #include <vfork.h>, but some compilers
15455    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15456    static variable whose address is put into a register that is
15457    clobbered by the vfork.  */
15458 static void
15459 #ifdef __cplusplus
15460 sparc_address_test (int arg)
15461 # else
15462 sparc_address_test (arg) int arg;
15463 #endif
15464 {
15465   static pid_t child;
15466   if (!child) {
15467     child = vfork ();
15468     if (child < 0) {
15469       perror ("vfork");
15470       _exit(2);
15471     }
15472     if (!child) {
15473       arg = getpid();
15474       write(-1, "", 0);
15475       _exit (arg);
15476     }
15477   }
15478 }
15479
15480 int
15481 main ()
15482 {
15483   pid_t parent = getpid ();
15484   pid_t child;
15485
15486   sparc_address_test (0);
15487
15488   child = vfork ();
15489
15490   if (child == 0) {
15491     /* Here is another test for sparc vfork register problems.  This
15492        test uses lots of local variables, at least as many local
15493        variables as main has allocated so far including compiler
15494        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15495        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15496        reuse the register of parent for one of the local variables,
15497        since it will think that parent can't possibly be used any more
15498        in this routine.  Assigning to the local variable will thus
15499        munge parent in the parent process.  */
15500     pid_t
15501       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15502       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15503     /* Convince the compiler that p..p7 are live; otherwise, it might
15504        use the same hardware register for all 8 local variables.  */
15505     if (p != p1 || p != p2 || p != p3 || p != p4
15506         || p != p5 || p != p6 || p != p7)
15507       _exit(1);
15508
15509     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15510        from child file descriptors.  If the child closes a descriptor
15511        before it execs or exits, this munges the parent's descriptor
15512        as well.  Test for this by closing stdout in the child.  */
15513     _exit(close(fileno(stdout)) != 0);
15514   } else {
15515     int status;
15516     struct stat st;
15517
15518     while (wait(&status) != child)
15519       ;
15520     return (
15521          /* Was there some problem with vforking?  */
15522          child < 0
15523
15524          /* Did the child fail?  (This shouldn't happen.)  */
15525          || status
15526
15527          /* Did the vfork/compiler bug occur?  */
15528          || parent != getpid()
15529
15530          /* Did the file descriptor bug occur?  */
15531          || fstat(fileno(stdout), &st) != 0
15532          );
15533   }
15534 }
15535 _ACEOF
15536 if ac_fn_c_try_run "$LINENO"; then :
15537   ac_cv_func_vfork_works=yes
15538 else
15539   ac_cv_func_vfork_works=no
15540 fi
15541 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15542   conftest.$ac_objext conftest.beam conftest.$ac_ext
15543 fi
15544
15545 fi
15546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15547 $as_echo "$ac_cv_func_vfork_works" >&6; }
15548
15549 fi;
15550 if test "x$ac_cv_func_fork_works" = xcross; then
15551   ac_cv_func_vfork_works=$ac_cv_func_vfork
15552   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15553 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15554 fi
15555
15556 if test "x$ac_cv_func_vfork_works" = xyes; then
15557
15558 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15559
15560 else
15561
15562 $as_echo "#define vfork fork" >>confdefs.h
15563
15564 fi
15565 if test "x$ac_cv_func_fork_works" = xyes; then
15566
15567 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15568
15569 fi
15570
15571   for ac_func in mmap canonicalize_file_name snprintf strdup strchr \
15572                  strrchr strsignal fchmod fstat chmod
15573 do :
15574   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15575 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15576 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15577   cat >>confdefs.h <<_ACEOF
15578 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15579 _ACEOF
15580
15581 fi
15582 done
15583
15584   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
15585 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
15586 if ${ac_cv_path_SED+:} false; then :
15587   $as_echo_n "(cached) " >&6
15588 else
15589             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
15590      for ac_i in 1 2 3 4 5 6 7; do
15591        ac_script="$ac_script$as_nl$ac_script"
15592      done
15593      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
15594      { ac_script=; unset ac_script;}
15595      if test -z "$SED"; then
15596   ac_path_SED_found=false
15597   # Loop through the user's path and test for each of PROGNAME-LIST
15598   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15599 for as_dir in $PATH
15600 do
15601   IFS=$as_save_IFS
15602   test -z "$as_dir" && as_dir=.
15603     for ac_prog in sed gsed; do
15604     for ac_exec_ext in '' $ac_executable_extensions; do
15605       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
15606       as_fn_executable_p "$ac_path_SED" || continue
15607 # Check for GNU ac_path_SED and select it if it is found.
15608   # Check for GNU $ac_path_SED
15609 case `"$ac_path_SED" --version 2>&1` in
15610 *GNU*)
15611   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
15612 *)
15613   ac_count=0
15614   $as_echo_n 0123456789 >"conftest.in"
15615   while :
15616   do
15617     cat "conftest.in" "conftest.in" >"conftest.tmp"
15618     mv "conftest.tmp" "conftest.in"
15619     cp "conftest.in" "conftest.nl"
15620     $as_echo '' >> "conftest.nl"
15621     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
15622     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
15623     as_fn_arith $ac_count + 1 && ac_count=$as_val
15624     if test $ac_count -gt ${ac_path_SED_max-0}; then
15625       # Best one so far, save it but keep looking for a better one
15626       ac_cv_path_SED="$ac_path_SED"
15627       ac_path_SED_max=$ac_count
15628     fi
15629     # 10*(2^10) chars as input seems more than enough
15630     test $ac_count -gt 10 && break
15631   done
15632   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
15633 esac
15634
15635       $ac_path_SED_found && break 3
15636     done
15637   done
15638   done
15639 IFS=$as_save_IFS
15640   if test -z "$ac_cv_path_SED"; then
15641     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
15642   fi
15643 else
15644   ac_cv_path_SED=$SED
15645 fi
15646
15647 fi
15648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
15649 $as_echo "$ac_cv_path_SED" >&6; }
15650  SED="$ac_cv_path_SED"
15651   rm -f conftest.sed
15652
15653   while :
15654   do
15655       POSIX_SHELL=`which bash`
15656       test -x "$POSIX_SHELL" && break
15657       POSIX_SHELL=`which dash`
15658       test -x "$POSIX_SHELL" && break
15659       POSIX_SHELL=/usr/xpg4/bin/sh
15660       test -x "$POSIX_SHELL" && break
15661       POSIX_SHELL=`/bin/sh -c '
15662           exec 2>/dev/null
15663           if ! true ; then exit 1 ; fi
15664           echo /bin/sh'`
15665       test -x "$POSIX_SHELL" && break
15666       as_fn_error $? "cannot locate a working POSIX shell" "$LINENO" 5
15667   done
15668
15669 cat >>confdefs.h <<_ACEOF
15670 #define POSIX_SHELL "${POSIX_SHELL}"
15671 _ACEOF
15672
15673
15674
15675
15676
15677   LIBOPTS_BUILD_BLOCKED=true
15678
15679
15680   NEED_LIBOPTS_DIR=''
15681
15682   # Check whether --enable-local-libopts was given.
15683 if test "${enable_local_libopts+set}" = set; then :
15684   enableval=$enable_local_libopts;
15685     if test x$enableval = xyes ; then
15686        { $as_echo "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
15687 $as_echo "$as_me: Using supplied libopts tearoff" >&6;}
15688        LIBOPTS_CFLAGS='-I$(top_srcdir)/sntp/libopts'
15689        NEED_LIBOPTS_DIR=true
15690        LIBOPTS_LDADD='$(top_builddir)/sntp/libopts/libopts.la'
15691     fi
15692 fi
15693
15694
15695   # Check whether --enable-libopts-install was given.
15696 if test "${enable_libopts_install+set}" = set; then :
15697   enableval=$enable_libopts_install;
15698 fi
15699
15700    if test "X${enable_libopts_install}" = Xyes; then
15701   INSTALL_LIBOPTS_TRUE=
15702   INSTALL_LIBOPTS_FALSE='#'
15703 else
15704   INSTALL_LIBOPTS_TRUE='#'
15705   INSTALL_LIBOPTS_FALSE=
15706 fi
15707
15708
15709   if test -z "${NEED_LIBOPTS_DIR}" ; then
15710      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
15711 $as_echo_n "checking whether autoopts-config can be found... " >&6; }
15712
15713 # Check whether --with-autoopts-config was given.
15714 if test "${with_autoopts_config+set}" = set; then :
15715   withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
15716 else
15717   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
15718 $as_echo_n "checking whether autoopts-config is specified... " >&6; }
15719 if ${lo_cv_with_autoopts_config+:} false; then :
15720   $as_echo_n "(cached) " >&6
15721 else
15722   if autoopts-config --help 2>/dev/null 1>&2
15723         then lo_cv_with_autoopts_config=autoopts-config
15724         elif libopts-config --help 2>/dev/null 1>&2
15725         then lo_cv_with_autoopts_config=libopts-config
15726         else lo_cv_with_autoopts_config=no ; fi
15727 fi
15728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
15729 $as_echo "$lo_cv_with_autoopts_config" >&6; }
15730
15731 fi
15732  # end of AC_ARG_WITH
15733
15734      if ${lo_cv_test_autoopts+:} false; then :
15735   $as_echo_n "(cached) " >&6
15736 else
15737
15738         if test -z "${lo_cv_with_autoopts_config}" \
15739                 -o X"${lo_cv_with_autoopts_config}" = Xno
15740         then
15741            if autoopts-config --help 2>/dev/null 1>&2
15742            then lo_cv_with_autoopts_config=autoopts-config
15743            elif libopts-config --help 2>/dev/null 1>&2
15744            then lo_cv_with_autoopts_config=libopts-config
15745            else lo_cv_with_autoopts_config=false ; fi
15746         fi
15747         lo_cv_test_autoopts=`
15748             ${lo_cv_with_autoopts_config} --libs` 2> /dev/null
15749         if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"
15750         then lo_cv_test_autoopts=no ; fi
15751
15752 fi
15753  # end of CACHE_VAL
15754      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
15755 $as_echo "${lo_cv_test_autoopts}" >&6; }
15756
15757      if test "X${lo_cv_test_autoopts}" != Xno
15758      then
15759         LIBOPTS_LDADD="${lo_cv_test_autoopts}"
15760         LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
15761      else
15762         LIBOPTS_LDADD='$(top_builddir)/sntp/libopts/libopts.la'
15763         LIBOPTS_CFLAGS='-I$(top_srcdir)/sntp/libopts'
15764         NEED_LIBOPTS_DIR=true
15765      fi
15766   fi # end of if test -z "${NEED_LIBOPTS_DIR}"
15767   if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
15768     NEED_LIBOPTS_DIR=''
15769   fi
15770    if test -n "${NEED_LIBOPTS_DIR}"; then
15771   NEED_LIBOPTS_TRUE=
15772   NEED_LIBOPTS_FALSE='#'
15773 else
15774   NEED_LIBOPTS_TRUE='#'
15775   NEED_LIBOPTS_FALSE=
15776 fi
15777
15778
15779
15780   LIBOPTS_DIR=sntp/libopts
15781
15782
15783 # end of AC_DEFUN of LIBOPTS_CHECK_COMMON
15784
15785   # end of AC_DEFUN of LIBOPTS_CHECK_NOBUILD
15786
15787
15788
15789
15790 ntp_pkgconfig_min_version='0.15.0'
15791 if test -n "$ac_tool_prefix"; then
15792   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15793 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15795 $as_echo_n "checking for $ac_word... " >&6; }
15796 if ${ac_cv_path_PKG_CONFIG+:} false; then :
15797   $as_echo_n "(cached) " >&6
15798 else
15799   case $PKG_CONFIG in
15800   [\\/]* | ?:[\\/]*)
15801   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15802   ;;
15803   *)
15804   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15805 for as_dir in $PATH
15806 do
15807   IFS=$as_save_IFS
15808   test -z "$as_dir" && as_dir=.
15809     for ac_exec_ext in '' $ac_executable_extensions; do
15810   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15811     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15812     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15813     break 2
15814   fi
15815 done
15816   done
15817 IFS=$as_save_IFS
15818
15819   ;;
15820 esac
15821 fi
15822 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15823 if test -n "$PKG_CONFIG"; then
15824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
15825 $as_echo "$PKG_CONFIG" >&6; }
15826 else
15827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15828 $as_echo "no" >&6; }
15829 fi
15830
15831
15832 fi
15833 if test -z "$ac_cv_path_PKG_CONFIG"; then
15834   ac_pt_PKG_CONFIG=$PKG_CONFIG
15835   # Extract the first word of "pkg-config", so it can be a program name with args.
15836 set dummy pkg-config; ac_word=$2
15837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15838 $as_echo_n "checking for $ac_word... " >&6; }
15839 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
15840   $as_echo_n "(cached) " >&6
15841 else
15842   case $ac_pt_PKG_CONFIG in
15843   [\\/]* | ?:[\\/]*)
15844   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15845   ;;
15846   *)
15847   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15848 for as_dir in $PATH
15849 do
15850   IFS=$as_save_IFS
15851   test -z "$as_dir" && as_dir=.
15852     for ac_exec_ext in '' $ac_executable_extensions; do
15853   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15854     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15856     break 2
15857   fi
15858 done
15859   done
15860 IFS=$as_save_IFS
15861
15862   ;;
15863 esac
15864 fi
15865 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15866 if test -n "$ac_pt_PKG_CONFIG"; then
15867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
15868 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
15869 else
15870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15871 $as_echo "no" >&6; }
15872 fi
15873
15874   if test "x$ac_pt_PKG_CONFIG" = x; then
15875     PKG_CONFIG=""
15876   else
15877     case $cross_compiling:$ac_tool_warned in
15878 yes:)
15879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
15880 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
15881 ac_tool_warned=yes ;;
15882 esac
15883     PKG_CONFIG=$ac_pt_PKG_CONFIG
15884   fi
15885 else
15886   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15887 fi
15888
15889 { ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
15890 { ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
15891
15892 case "$PKG_CONFIG" in
15893  /*)
15894     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
15895 $as_echo_n "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
15896     if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
15897         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15898 $as_echo "yes" >&6; }
15899     else
15900         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15901 $as_echo "no" >&6; }
15902         PKG_CONFIG=""
15903     fi
15904     ;;
15905 esac
15906
15907
15908
15909
15910 # Check whether --enable-local-libevent was given.
15911 if test "${enable_local_libevent+set}" = set; then :
15912   enableval=$enable_local_libevent; ntp_use_local_libevent=$enableval
15913 else
15914   ntp_use_local_libevent=${ntp_use_local_libevent-detect}
15915
15916 fi
15917
15918
15919
15920
15921
15922 ntp_libevent_min_version=2
15923 ntp_libevent_tearoff=sntp/libevent
15924
15925
15926
15927
15928
15929 case "$ntp_use_local_libevent" in
15930  yes)
15931     ;;
15932  *) # If we have (a good enough) pkg-config, see if it can find libevent
15933     case "$PKG_CONFIG" in
15934      /*)
15935         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
15936 $as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
15937         if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
15938         then
15939             ntp_use_local_libevent=no
15940             { $as_echo "$as_me:${as_lineno-$LINENO}: Using the installed libevent" >&5
15941 $as_echo "$as_me: Using the installed libevent" >&6;}
15942             CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
15943             CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
15944             # HMS: I hope the following is accurate.
15945             # We don't need -levent, we only need  -levent_core.
15946             # While we could grab only the -L stuff, there *might* be
15947             # other flags there we want.  Originally we just removed -levent
15948             # but then somebody decided to install -levent-2.0
15949             # LDADD_LIBEVENT=`$PKG_CONFIG --libs libevent | sed 's:-levent::'`
15950             # So now we dance...
15951             LDADD_LIBEVENT=
15952             for i in `$PKG_CONFIG --libs libevent` `$PKG_CONFIG --cflags-only-other libevent_pthreads`
15953             do
15954                 case "$i" in
15955                  -D*) ;;
15956                  -levent*) ;;
15957                  *) case "$LDADD_LIBEVENT" in
15958                      '') LDADD_LIBEVENT="$i" ;;
15959                      *) LDADD_LIBEVENT="$LDADD_LIBEVENT $i" ;;
15960                     esac
15961                     ;;
15962                 esac
15963             done
15964             case "$LIBISC_PTHREADS_NOTHREADS" in
15965              pthreads)
15966                 LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads"
15967             esac
15968             LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core"
15969             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15970 $as_echo "yes" >&6; }
15971         else
15972             ntp_use_local_libevent=yes
15973             # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
15974             # is "pthreads"?
15975             CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
15976             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15977 $as_echo "no" >&6; }
15978         fi
15979         ;;
15980      *)
15981         ntp_use_local_libevent=yes
15982         ;;
15983     esac
15984     ;;
15985 esac
15986
15987 case "$ntp_use_local_libevent" in
15988  yes)
15989     { $as_echo "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
15990 $as_echo "$as_me: Using libevent tearoff" >&6;}
15991     CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
15992     case "$LIBISC_PTHREADS_NOTHREADS" in
15993      pthreads)
15994         LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_pthreads.la \$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
15995         ;;
15996      *)
15997         LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
15998     esac
15999 esac
16000
16001
16002  if test "x$ntp_use_local_libevent" = "xyes"; then
16003   BUILD_LIBEVENT_TRUE=
16004   BUILD_LIBEVENT_FALSE='#'
16005 else
16006   BUILD_LIBEVENT_TRUE='#'
16007   BUILD_LIBEVENT_FALSE=
16008 fi
16009
16010
16011
16012
16013
16014
16015 # Expose a cross-compilation indicator to makefiles
16016  if test $build != $host; then
16017   NTP_CROSSCOMPILE_TRUE=
16018   NTP_CROSSCOMPILE_FALSE='#'
16019 else
16020   NTP_CROSSCOMPILE_TRUE='#'
16021   NTP_CROSSCOMPILE_FALSE=
16022 fi
16023
16024
16025
16026 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
16027 if test "x$ac_cv_type_size_t" = xyes; then :
16028
16029 else
16030
16031 cat >>confdefs.h <<_ACEOF
16032 #define size_t unsigned int
16033 _ACEOF
16034
16035 fi
16036
16037
16038             # Check whether --enable-c99-snprintf was given.
16039 if test "${enable_c99_snprintf+set}" = set; then :
16040   enableval=$enable_c99_snprintf; force_c99_snprintf=$enableval
16041 else
16042   force_c99_snprintf=no
16043
16044 fi
16045
16046     case "$force_c99_snprintf" in
16047      yes)
16048         hw_force_rpl_snprintf=yes
16049         hw_force_rpl_vsnprintf=yes
16050     esac
16051
16052
16053
16054
16055
16056
16057   for ac_header in $ac_header_list
16058 do :
16059   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16060 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
16061 "
16062 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16063   cat >>confdefs.h <<_ACEOF
16064 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16065 _ACEOF
16066
16067 fi
16068
16069 done
16070
16071
16072
16073
16074
16075
16076
16077   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
16078 $as_echo_n "checking for unsigned long long int... " >&6; }
16079 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
16080   $as_echo_n "(cached) " >&6
16081 else
16082   ac_cv_type_unsigned_long_long_int=yes
16083      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
16084        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16085 /* end confdefs.h.  */
16086
16087   /* For now, do not test the preprocessor; as of 2007 there are too many
16088          implementations with broken preprocessors.  Perhaps this can
16089          be revisited in 2012.  In the meantime, code should not expect
16090          #if to work with literals wider than 32 bits.  */
16091       /* Test literals.  */
16092       long long int ll = 9223372036854775807ll;
16093       long long int nll = -9223372036854775807LL;
16094       unsigned long long int ull = 18446744073709551615ULL;
16095       /* Test constant expressions.   */
16096       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
16097                      ? 1 : -1)];
16098       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
16099                      ? 1 : -1)];
16100       int i = 63;
16101 int
16102 main ()
16103 {
16104 /* Test availability of runtime routines for shift and division.  */
16105       long long int llmax = 9223372036854775807ll;
16106       unsigned long long int ullmax = 18446744073709551615ull;
16107       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
16108               | (llmax / ll) | (llmax % ll)
16109               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
16110               | (ullmax / ull) | (ullmax % ull));
16111   ;
16112   return 0;
16113 }
16114
16115 _ACEOF
16116 if ac_fn_c_try_link "$LINENO"; then :
16117
16118 else
16119   ac_cv_type_unsigned_long_long_int=no
16120 fi
16121 rm -f core conftest.err conftest.$ac_objext \
16122     conftest$ac_exeext conftest.$ac_ext
16123      fi
16124 fi
16125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
16126 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
16127   if test $ac_cv_type_unsigned_long_long_int = yes; then
16128
16129 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
16130
16131   fi
16132
16133
16134       ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
16135 if test "x$ac_cv_func_vsnprintf" = xyes; then :
16136   hw_cv_func_vsnprintf=yes
16137 else
16138   hw_cv_func_vsnprintf=no
16139 fi
16140
16141   if test "$hw_cv_func_vsnprintf" = yes; then :
16142   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
16143 $as_echo_n "checking whether vsnprintf is C99 compliant... " >&6; }
16144 if ${hw_cv_func_vsnprintf_c99+:} false; then :
16145   $as_echo_n "(cached) " >&6
16146 else
16147   if test "$cross_compiling" = yes; then :
16148   hw_cv_func_vsnprintf_c99=no
16149 else
16150   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16151 /* end confdefs.h.  */
16152 #if HAVE_STDARG_H
16153           #include <stdarg.h>
16154           #endif
16155           #include <stdio.h>
16156           static int testprintf(char *buf, size_t size, const char *format, ...)
16157           {
16158             int result;
16159             va_list ap;
16160             va_start(ap, format);
16161             result = vsnprintf(buf, size, format, ap);
16162             va_end(ap);
16163             return result;
16164           }
16165 int
16166 main ()
16167 {
16168 char buf[43];
16169           if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
16170               testprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
16171               buf[0] != 'T' || buf[3] != '\0')
16172             return 1;
16173   ;
16174   return 0;
16175 }
16176 _ACEOF
16177 if ac_fn_c_try_run "$LINENO"; then :
16178   hw_cv_func_vsnprintf_c99=yes
16179 else
16180   hw_cv_func_vsnprintf_c99=no
16181 fi
16182 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16183   conftest.$ac_objext conftest.beam conftest.$ac_ext
16184 fi
16185
16186 fi
16187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
16188 $as_echo "$hw_cv_func_vsnprintf_c99" >&6; }
16189 else
16190   hw_cv_func_vsnprintf_c99=no
16191 fi
16192
16193 $as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
16194
16195   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement vsnprintf will be used" >&5
16196 $as_echo_n "checking if C99-snprintf replacement vsnprintf will be used... " >&6; }
16197   if test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no; then :
16198   hw_use_rpl_vsnprintf=yes
16199 else
16200   hw_use_rpl_vsnprintf=no
16201 fi
16202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_vsnprintf" >&5
16203 $as_echo "$hw_use_rpl_vsnprintf" >&6; }
16204   if test "$hw_use_rpl_vsnprintf" = yes; then :
16205
16206 $as_echo "#define HW_WANT_RPL_VSNPRINTF 1" >>confdefs.h
16207
16208     if test ${hw_nodef_vsnprintf=no} = no; then :
16209
16210 $as_echo "#define vsnprintf rpl_vsnprintf" >>confdefs.h
16211
16212 fi
16213     for ac_header in inttypes.h locale.h stddef.h stdint.h
16214 do :
16215   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16216 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16217 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16218   cat >>confdefs.h <<_ACEOF
16219 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16220 _ACEOF
16221
16222 fi
16223
16224 done
16225
16226     ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
16227 "
16228 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
16229
16230 cat >>confdefs.h <<_ACEOF
16231 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
16232 _ACEOF
16233
16234
16235 fi
16236 ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include <locale.h>
16237 "
16238 if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes; then :
16239
16240 cat >>confdefs.h <<_ACEOF
16241 #define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1
16242 _ACEOF
16243
16244
16245 fi
16246
16247
16248   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
16249 $as_echo_n "checking for long double... " >&6; }
16250 if ${ac_cv_type_long_double+:} false; then :
16251   $as_echo_n "(cached) " >&6
16252 else
16253   if test "$GCC" = yes; then
16254        ac_cv_type_long_double=yes
16255      else
16256        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16257 /* end confdefs.h.  */
16258 /* The Stardent Vistra knows sizeof (long double), but does
16259                  not support it.  */
16260               long double foo = 0.0L;
16261 int
16262 main ()
16263 {
16264 static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
16265               sizeof (double) <= sizeof (long double))];
16266 test_array [0] = 0;
16267 return test_array [0];
16268
16269   ;
16270   return 0;
16271 }
16272 _ACEOF
16273 if ac_fn_c_try_compile "$LINENO"; then :
16274   ac_cv_type_long_double=yes
16275 else
16276   ac_cv_type_long_double=no
16277 fi
16278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16279      fi
16280 fi
16281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
16282 $as_echo "$ac_cv_type_long_double" >&6; }
16283   if test $ac_cv_type_long_double = yes; then
16284
16285 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
16286
16287   fi
16288
16289
16290
16291   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
16292 $as_echo_n "checking for long long int... " >&6; }
16293 if ${ac_cv_type_long_long_int+:} false; then :
16294   $as_echo_n "(cached) " >&6
16295 else
16296   ac_cv_type_long_long_int=yes
16297       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
16298         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
16299         if test $ac_cv_type_long_long_int = yes; then
16300                                   if test "$cross_compiling" = yes; then :
16301   :
16302 else
16303   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16304 /* end confdefs.h.  */
16305 #include <limits.h>
16306                  #ifndef LLONG_MAX
16307                  # define HALF \
16308                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
16309                  # define LLONG_MAX (HALF - 1 + HALF)
16310                  #endif
16311 int
16312 main ()
16313 {
16314 long long int n = 1;
16315                  int i;
16316                  for (i = 0; ; i++)
16317                    {
16318                      long long int m = n << i;
16319                      if (m >> i != n)
16320                        return 1;
16321                      if (LLONG_MAX / 2 < m)
16322                        break;
16323                    }
16324                  return 0;
16325   ;
16326   return 0;
16327 }
16328 _ACEOF
16329 if ac_fn_c_try_run "$LINENO"; then :
16330
16331 else
16332   ac_cv_type_long_long_int=no
16333 fi
16334 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16335   conftest.$ac_objext conftest.beam conftest.$ac_ext
16336 fi
16337
16338         fi
16339       fi
16340 fi
16341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
16342 $as_echo "$ac_cv_type_long_long_int" >&6; }
16343   if test $ac_cv_type_long_long_int = yes; then
16344
16345 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
16346
16347   fi
16348
16349
16350   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
16351 $as_echo_n "checking for unsigned long long int... " >&6; }
16352 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
16353   $as_echo_n "(cached) " >&6
16354 else
16355   ac_cv_type_unsigned_long_long_int=yes
16356      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
16357        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16358 /* end confdefs.h.  */
16359
16360   /* For now, do not test the preprocessor; as of 2007 there are too many
16361          implementations with broken preprocessors.  Perhaps this can
16362          be revisited in 2012.  In the meantime, code should not expect
16363          #if to work with literals wider than 32 bits.  */
16364       /* Test literals.  */
16365       long long int ll = 9223372036854775807ll;
16366       long long int nll = -9223372036854775807LL;
16367       unsigned long long int ull = 18446744073709551615ULL;
16368       /* Test constant expressions.   */
16369       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
16370                      ? 1 : -1)];
16371       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
16372                      ? 1 : -1)];
16373       int i = 63;
16374 int
16375 main ()
16376 {
16377 /* Test availability of runtime routines for shift and division.  */
16378       long long int llmax = 9223372036854775807ll;
16379       unsigned long long int ullmax = 18446744073709551615ull;
16380       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
16381               | (llmax / ll) | (llmax % ll)
16382               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
16383               | (ullmax / ull) | (ullmax % ull));
16384   ;
16385   return 0;
16386 }
16387
16388 _ACEOF
16389 if ac_fn_c_try_link "$LINENO"; then :
16390
16391 else
16392   ac_cv_type_unsigned_long_long_int=no
16393 fi
16394 rm -f core conftest.err conftest.$ac_objext \
16395     conftest$ac_exeext conftest.$ac_ext
16396      fi
16397 fi
16398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
16399 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
16400   if test $ac_cv_type_unsigned_long_long_int = yes; then
16401
16402 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
16403
16404   fi
16405
16406     ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
16407 if test "x$ac_cv_type_size_t" = xyes; then :
16408
16409 else
16410
16411 cat >>confdefs.h <<_ACEOF
16412 #define size_t unsigned int
16413 _ACEOF
16414
16415 fi
16416
16417
16418
16419   ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
16420 if test "x$ac_cv_type_intmax_t" = xyes; then :
16421
16422 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
16423
16424 else
16425   test $ac_cv_type_long_long_int = yes \
16426        && ac_type='long long int' \
16427        || ac_type='long int'
16428
16429 cat >>confdefs.h <<_ACEOF
16430 #define intmax_t $ac_type
16431 _ACEOF
16432
16433 fi
16434
16435
16436
16437
16438   ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
16439 if test "x$ac_cv_type_uintmax_t" = xyes; then :
16440
16441 $as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
16442
16443 else
16444   test $ac_cv_type_unsigned_long_long_int = yes \
16445        && ac_type='unsigned long long int' \
16446        || ac_type='unsigned long int'
16447
16448 cat >>confdefs.h <<_ACEOF
16449 #define uintmax_t $ac_type
16450 _ACEOF
16451
16452 fi
16453
16454
16455
16456   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
16457 if test "x$ac_cv_type_uintptr_t" = xyes; then :
16458
16459 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
16460
16461 else
16462   for ac_type in 'unsigned int' 'unsigned long int' \
16463         'unsigned long long int'; do
16464        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16465 /* end confdefs.h.  */
16466 $ac_includes_default
16467 int
16468 main ()
16469 {
16470 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
16471 test_array [0] = 0;
16472 return test_array [0];
16473
16474   ;
16475   return 0;
16476 }
16477 _ACEOF
16478 if ac_fn_c_try_compile "$LINENO"; then :
16479
16480 cat >>confdefs.h <<_ACEOF
16481 #define uintptr_t $ac_type
16482 _ACEOF
16483
16484           ac_type=
16485 fi
16486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16487        test -z "$ac_type" && break
16488      done
16489 fi
16490
16491
16492     ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
16493 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
16494
16495 cat >>confdefs.h <<_ACEOF
16496 #define HAVE_PTRDIFF_T 1
16497 _ACEOF
16498
16499
16500 fi
16501
16502     for ac_func in localeconv
16503 do :
16504   ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
16505 if test "x$ac_cv_func_localeconv" = xyes; then :
16506   cat >>confdefs.h <<_ACEOF
16507 #define HAVE_LOCALECONV 1
16508 _ACEOF
16509
16510 fi
16511 done
16512
16513
16514   if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
16515   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
16516 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
16517 if ${ac_cv_c_const+:} false; then :
16518   $as_echo_n "(cached) " >&6
16519 else
16520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16521 /* end confdefs.h.  */
16522
16523 int
16524 main ()
16525 {
16526
16527 #ifndef __cplusplus
16528   /* Ultrix mips cc rejects this sort of thing.  */
16529   typedef int charset[2];
16530   const charset cs = { 0, 0 };
16531   /* SunOS 4.1.1 cc rejects this.  */
16532   char const *const *pcpcc;
16533   char **ppc;
16534   /* NEC SVR4.0.2 mips cc rejects this.  */
16535   struct point {int x, y;};
16536   static struct point const zero = {0,0};
16537   /* AIX XL C 1.02.0.0 rejects this.
16538      It does not let you subtract one const X* pointer from another in
16539      an arm of an if-expression whose if-part is not a constant
16540      expression */
16541   const char *g = "string";
16542   pcpcc = &g + (g ? g-g : 0);
16543   /* HPUX 7.0 cc rejects these. */
16544   ++pcpcc;
16545   ppc = (char**) pcpcc;
16546   pcpcc = (char const *const *) ppc;
16547   { /* SCO 3.2v4 cc rejects this sort of thing.  */
16548     char tx;
16549     char *t = &tx;
16550     char const *s = 0 ? (char *) 0 : (char const *) 0;
16551
16552     *t++ = 0;
16553     if (s) return 0;
16554   }
16555   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16556     int x[] = {25, 17};
16557     const int *foo = &x[0];
16558     ++foo;
16559   }
16560   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16561     typedef const int *iptr;
16562     iptr p = 0;
16563     ++p;
16564   }
16565   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
16566        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16567     struct s { int j; const int *ap[3]; } bx;
16568     struct s *b = &bx; b->j = 5;
16569   }
16570   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16571     const int foo = 10;
16572     if (!foo) return 0;
16573   }
16574   return !cs[0] && !zero.x;
16575 #endif
16576
16577   ;
16578   return 0;
16579 }
16580 _ACEOF
16581 if ac_fn_c_try_compile "$LINENO"; then :
16582   ac_cv_c_const=yes
16583 else
16584   ac_cv_c_const=no
16585 fi
16586 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16587 fi
16588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
16589 $as_echo "$ac_cv_c_const" >&6; }
16590 if test $ac_cv_c_const = no; then
16591
16592 $as_echo "#define const /**/" >>confdefs.h
16593
16594 fi
16595
16596
16597
16598
16599     case " $LIBOBJS " in
16600   *" snprintf.$ac_objext "* ) ;;
16601   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
16602  ;;
16603 esac
16604
16605     _hw_cv_func_xprintf_replace_done=yes
16606 fi
16607
16608 fi
16609
16610
16611     ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
16612 if test "x$ac_cv_func_snprintf" = xyes; then :
16613   hw_cv_func_snprintf=yes
16614 else
16615   hw_cv_func_snprintf=no
16616 fi
16617
16618   if test "$hw_cv_func_snprintf" = yes; then :
16619   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
16620 $as_echo_n "checking whether snprintf is C99 compliant... " >&6; }
16621 if ${hw_cv_func_snprintf_c99+:} false; then :
16622   $as_echo_n "(cached) " >&6
16623 else
16624   if test "$cross_compiling" = yes; then :
16625   hw_cv_func_snprintf_c99=no
16626 else
16627   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16628 /* end confdefs.h.  */
16629 #include <stdio.h>
16630 int
16631 main ()
16632 {
16633 char buf[43];
16634           if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
16635               snprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
16636               buf[0] != 'T' || buf[3] != '\0')
16637             return 1;
16638   ;
16639   return 0;
16640 }
16641 _ACEOF
16642 if ac_fn_c_try_run "$LINENO"; then :
16643   hw_cv_func_snprintf_c99=yes
16644 else
16645   hw_cv_func_snprintf_c99=no
16646 fi
16647 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16648   conftest.$ac_objext conftest.beam conftest.$ac_ext
16649 fi
16650
16651 fi
16652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
16653 $as_echo "$hw_cv_func_snprintf_c99" >&6; }
16654 else
16655   hw_cv_func_snprintf_c99=no
16656 fi
16657
16658 $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
16659
16660   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement snprintf will be used" >&5
16661 $as_echo_n "checking if C99-snprintf replacement snprintf will be used... " >&6; }
16662   if test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no; then :
16663   hw_use_rpl_snprintf=yes
16664 else
16665   hw_use_rpl_snprintf=no
16666 fi
16667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_snprintf" >&5
16668 $as_echo "$hw_use_rpl_snprintf" >&6; }
16669   if test "$hw_use_rpl_snprintf" = yes; then :
16670
16671 $as_echo "#define HW_WANT_RPL_SNPRINTF 1" >>confdefs.h
16672
16673     if test ${hw_nodef_snprintf=no} = no; then :
16674
16675 $as_echo "#define snprintf rpl_snprintf" >>confdefs.h
16676
16677 fi
16678
16679   if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
16680   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
16681 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
16682 if ${ac_cv_c_const+:} false; then :
16683   $as_echo_n "(cached) " >&6
16684 else
16685   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16686 /* end confdefs.h.  */
16687
16688 int
16689 main ()
16690 {
16691
16692 #ifndef __cplusplus
16693   /* Ultrix mips cc rejects this sort of thing.  */
16694   typedef int charset[2];
16695   const charset cs = { 0, 0 };
16696   /* SunOS 4.1.1 cc rejects this.  */
16697   char const *const *pcpcc;
16698   char **ppc;
16699   /* NEC SVR4.0.2 mips cc rejects this.  */
16700   struct point {int x, y;};
16701   static struct point const zero = {0,0};
16702   /* AIX XL C 1.02.0.0 rejects this.
16703      It does not let you subtract one const X* pointer from another in
16704      an arm of an if-expression whose if-part is not a constant
16705      expression */
16706   const char *g = "string";
16707   pcpcc = &g + (g ? g-g : 0);
16708   /* HPUX 7.0 cc rejects these. */
16709   ++pcpcc;
16710   ppc = (char**) pcpcc;
16711   pcpcc = (char const *const *) ppc;
16712   { /* SCO 3.2v4 cc rejects this sort of thing.  */
16713     char tx;
16714     char *t = &tx;
16715     char const *s = 0 ? (char *) 0 : (char const *) 0;
16716
16717     *t++ = 0;
16718     if (s) return 0;
16719   }
16720   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16721     int x[] = {25, 17};
16722     const int *foo = &x[0];
16723     ++foo;
16724   }
16725   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16726     typedef const int *iptr;
16727     iptr p = 0;
16728     ++p;
16729   }
16730   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
16731        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16732     struct s { int j; const int *ap[3]; } bx;
16733     struct s *b = &bx; b->j = 5;
16734   }
16735   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16736     const int foo = 10;
16737     if (!foo) return 0;
16738   }
16739   return !cs[0] && !zero.x;
16740 #endif
16741
16742   ;
16743   return 0;
16744 }
16745 _ACEOF
16746 if ac_fn_c_try_compile "$LINENO"; then :
16747   ac_cv_c_const=yes
16748 else
16749   ac_cv_c_const=no
16750 fi
16751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16752 fi
16753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
16754 $as_echo "$ac_cv_c_const" >&6; }
16755 if test $ac_cv_c_const = no; then
16756
16757 $as_echo "#define const /**/" >>confdefs.h
16758
16759 fi
16760
16761
16762
16763
16764     case " $LIBOBJS " in
16765   *" snprintf.$ac_objext "* ) ;;
16766   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
16767  ;;
16768 esac
16769
16770     _hw_cv_func_xprintf_replace_done=yes
16771 fi
16772
16773 fi
16774
16775
16776
16777
16778
16779 # HMS: Save $LIBS and empty it.
16780 # any LIBS we add here should go in to LDADD_LIBNTP
16781
16782 __LIBS=$LIBS
16783 LIBS=
16784
16785
16786
16787 # [Bug 2332] because we need to know if we are using GNU ld...
16788
16789
16790 # Check whether --with-gnu-ld was given.
16791 if test "${with_gnu_ld+set}" = set; then :
16792   withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
16793 else
16794   with_gnu_ld=no
16795 fi
16796
16797 ac_prog=ld
16798 if test yes = "$GCC"; then
16799   # Check if gcc -print-prog-name=ld gives a path.
16800   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
16801 $as_echo_n "checking for ld used by $CC... " >&6; }
16802   case $host in
16803   *-*-mingw*)
16804     # gcc leaves a trailing carriage return, which upsets mingw
16805     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
16806   *)
16807     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
16808   esac
16809   case $ac_prog in
16810     # Accept absolute paths.
16811     [\\/]* | ?:[\\/]*)
16812       re_direlt='/[^/][^/]*/\.\./'
16813       # Canonicalize the pathname of ld
16814       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
16815       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
16816         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
16817       done
16818       test -z "$LD" && LD=$ac_prog
16819       ;;
16820   "")
16821     # If it fails, then pretend we aren't using GCC.
16822     ac_prog=ld
16823     ;;
16824   *)
16825     # If it is relative, then search for the first ld in PATH.
16826     with_gnu_ld=unknown
16827     ;;
16828   esac
16829 elif test yes = "$with_gnu_ld"; then
16830   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
16831 $as_echo_n "checking for GNU ld... " >&6; }
16832 else
16833   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
16834 $as_echo_n "checking for non-GNU ld... " >&6; }
16835 fi
16836 if ${lt_cv_path_LD+:} false; then :
16837   $as_echo_n "(cached) " >&6
16838 else
16839   if test -z "$LD"; then
16840   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
16841   for ac_dir in $PATH; do
16842     IFS=$lt_save_ifs
16843     test -z "$ac_dir" && ac_dir=.
16844     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
16845       lt_cv_path_LD=$ac_dir/$ac_prog
16846       # Check to see if the program is GNU ld.  I'd rather use --version,
16847       # but apparently some variants of GNU ld only accept -v.
16848       # Break only if it was the GNU/non-GNU ld that we prefer.
16849       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
16850       *GNU* | *'with BFD'*)
16851         test no != "$with_gnu_ld" && break
16852         ;;
16853       *)
16854         test yes != "$with_gnu_ld" && break
16855         ;;
16856       esac
16857     fi
16858   done
16859   IFS=$lt_save_ifs
16860 else
16861   lt_cv_path_LD=$LD # Let the user override the test with a path.
16862 fi
16863 fi
16864
16865 LD=$lt_cv_path_LD
16866 if test -n "$LD"; then
16867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
16868 $as_echo "$LD" >&6; }
16869 else
16870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16871 $as_echo "no" >&6; }
16872 fi
16873 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
16874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
16875 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
16876 if ${lt_cv_prog_gnu_ld+:} false; then :
16877   $as_echo_n "(cached) " >&6
16878 else
16879   # I'd rather use --version here, but apparently some GNU lds only accept -v.
16880 case `$LD -v 2>&1 </dev/null` in
16881 *GNU* | *'with BFD'*)
16882   lt_cv_prog_gnu_ld=yes
16883   ;;
16884 *)
16885   lt_cv_prog_gnu_ld=no
16886   ;;
16887 esac
16888 fi
16889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
16890 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
16891 with_gnu_ld=$lt_cv_prog_gnu_ld
16892
16893
16894
16895
16896
16897
16898
16899
16900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
16901 $as_echo_n "checking for directory path separator... " >&6; }
16902 if ${ntp_cv_dir_sep+:} false; then :
16903   $as_echo_n "(cached) " >&6
16904 else
16905
16906         case "$ntp_cv_dir_sep" in
16907          '')
16908             case "$host_os" in
16909              *djgpp | *mingw32* | *emx*)
16910                 ntp_cv_dir_sep="'\\'"
16911                 ;;
16912              *)
16913                 ntp_cv_dir_sep="'/'"
16914                 ;;
16915             esac
16916         esac
16917
16918
16919 fi
16920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
16921 $as_echo "$ntp_cv_dir_sep" >&6; }
16922
16923 cat >>confdefs.h <<_ACEOF
16924 #define DIR_SEP $ntp_cv_dir_sep
16925 _ACEOF
16926
16927
16928
16929     NTP_ORIG_LIBS="$LIBS"
16930
16931 # Check whether --with-lineeditlibs was given.
16932 if test "${with_lineeditlibs+set}" = set; then :
16933   withval=$with_lineeditlibs; use_lineeditlibs="$withval"
16934 else
16935   use_lineeditlibs="edit,editline"
16936
16937 fi
16938
16939     { $as_echo "$as_me:${as_lineno-$LINENO}: checking line editing libraries" >&5
16940 $as_echo_n "checking line editing libraries... " >&6; }
16941     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_lineeditlibs" >&5
16942 $as_echo "$use_lineeditlibs" >&6; }
16943     case "$use_lineeditlibs" in
16944      no)
16945         ntp_lib_lineedit=no
16946         ;;
16947      *)
16948         for lineedit_lib in `echo $use_lineeditlibs | sed -e 's/,/ /'`; do
16949             for term_lib in "" termcap curses ncurses; do
16950                 case "$term_lib" in
16951                  '')
16952                     TRY_LIB="-l$lineedit_lib"
16953                     ;;
16954                  *)
16955                     TRY_LIB="-l$lineedit_lib -l$term_lib"
16956                     ;;
16957                 esac
16958                 LIBS="$NTP_ORIG_LIBS $TRY_LIB"
16959                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline() with $TRY_LIB" >&5
16960 $as_echo_n "checking for readline() with $TRY_LIB... " >&6; }
16961                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16962 /* end confdefs.h.  */
16963
16964 /* Override any GCC internal prototype to avoid an error.
16965    Use char because int might match the return type of a GCC
16966    builtin and then its argument prototype would still apply.  */
16967 #ifdef __cplusplus
16968 extern "C"
16969 #endif
16970 char readline ();
16971 int
16972 main ()
16973 {
16974 return readline ();
16975   ;
16976   return 0;
16977 }
16978 _ACEOF
16979 if ac_fn_c_try_link "$LINENO"; then :
16980   ntp_lib_lineedit="$TRY_LIB"
16981 fi
16982 rm -f core conftest.err conftest.$ac_objext \
16983     conftest$ac_exeext conftest.$ac_ext
16984                 case "$ntp_lib_lineedit" in
16985                  '')
16986                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16987 $as_echo "no" >&6; }
16988                     ;;
16989                  *)
16990                     # Use readline()
16991                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16992 $as_echo "yes" >&6; }
16993                     break
16994                 esac
16995                 case "$term_lib" in
16996                  '')
16997                     # do not try el_gets without a terminal library
16998                     ;;
16999                  *)
17000                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_gets() with $TRY_LIB" >&5
17001 $as_echo_n "checking for el_gets() with $TRY_LIB... " >&6; }
17002                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17003 /* end confdefs.h.  */
17004
17005 /* Override any GCC internal prototype to avoid an error.
17006    Use char because int might match the return type of a GCC
17007    builtin and then its argument prototype would still apply.  */
17008 #ifdef __cplusplus
17009 extern "C"
17010 #endif
17011 char el_gets ();
17012 int
17013 main ()
17014 {
17015 return el_gets ();
17016   ;
17017   return 0;
17018 }
17019 _ACEOF
17020 if ac_fn_c_try_link "$LINENO"; then :
17021   ntp_lib_lineedit="$TRY_LIB"
17022 fi
17023 rm -f core conftest.err conftest.$ac_objext \
17024     conftest$ac_exeext conftest.$ac_ext
17025                     case "$ntp_lib_lineedit" in
17026                      '')
17027                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17028 $as_echo "no" >&6; }
17029                         ;;
17030                      *) # Use el_gets()
17031                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17032 $as_echo "yes" >&6; }
17033                         break
17034                         ;;
17035                     esac        # $ntp_lib_lineedit
17036                 esac            # $term_lib
17037             done
17038             case "$ntp_lib_lineedit" in
17039              '')
17040                 ;;
17041              *)
17042                 break
17043                 ;;
17044             esac
17045         done
17046         LIBS="$NTP_ORIG_LIBS"
17047         ;;
17048     esac        # $use_lineeditlibs
17049
17050     case "$ntp_lib_lineedit" in
17051      '')
17052         ntp_lib_lineedit="no"
17053         ;;
17054      no)
17055         ;;
17056      *)
17057         EDITLINE_LIBS="$ntp_lib_lineedit"
17058
17059         ;;
17060     esac        # $ntp_lib_lineedit
17061
17062     case "$ntp_lib_lineedit" in
17063      no)
17064         ;;
17065      *)
17066         for ac_header in readline.h readline/readline.h histedit.h
17067 do :
17068   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17069 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17070 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17071   cat >>confdefs.h <<_ACEOF
17072 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17073 _ACEOF
17074
17075 fi
17076
17077 done
17078
17079         for ac_header in history.h readline/history.h
17080 do :
17081   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17082 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17083 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17084   cat >>confdefs.h <<_ACEOF
17085 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17086 _ACEOF
17087
17088 fi
17089
17090 done
17091
17092
17093         case "$ac_cv_header_histedit_h" in
17094          yes)
17095             { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to el_init()" >&5
17096 $as_echo_n "checking number of arguments to el_init()... " >&6; }
17097 if ${ntp_cv_el_init_args+:} false; then :
17098   $as_echo_n "(cached) " >&6
17099 else
17100   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17101 /* end confdefs.h.  */
17102
17103                             #include <stdio.h>
17104                             #include <histedit.h>
17105
17106 int
17107 main ()
17108 {
17109
17110                             el_init("conftest", stdin, stdout, stderr);
17111
17112
17113   ;
17114   return 0;
17115 }
17116 _ACEOF
17117 if ac_fn_c_try_compile "$LINENO"; then :
17118   ntp_cv_el_init_args=4
17119 else
17120   ntp_cv_el_init_args=3
17121
17122 fi
17123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17124
17125 fi
17126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_el_init_args" >&5
17127 $as_echo "$ntp_cv_el_init_args" >&6; }
17128
17129 cat >>confdefs.h <<_ACEOF
17130 #define EL_INIT_ARGS $ntp_cv_el_init_args
17131 _ACEOF
17132
17133         esac
17134
17135         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
17136 $as_echo_n "checking whether readline supports history... " >&6; }
17137
17138         ntp_lib_lineedit_history="no"
17139         ORIG_LIBS="$LIBS"
17140         LIBS="$ORIG_LIBS $ntp_lib_lineedit"
17141         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17142 /* end confdefs.h.  */
17143
17144 /* Override any GCC internal prototype to avoid an error.
17145    Use char because int might match the return type of a GCC
17146    builtin and then its argument prototype would still apply.  */
17147 #ifdef __cplusplus
17148 extern "C"
17149 #endif
17150 char add_history ();
17151 int
17152 main ()
17153 {
17154 return add_history ();
17155   ;
17156   return 0;
17157 }
17158 _ACEOF
17159 if ac_fn_c_try_link "$LINENO"; then :
17160   ntp_lib_lineedit_history="yes"
17161 fi
17162 rm -f core conftest.err conftest.$ac_objext \
17163     conftest$ac_exeext conftest.$ac_ext
17164         LIBS="$ORIG_LIBS"
17165
17166         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_lib_lineedit_history" >&5
17167 $as_echo "$ntp_lib_lineedit_history" >&6; }
17168
17169         case "$ntp_lib_lineedit_history" in
17170          yes)
17171
17172 $as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
17173
17174         esac
17175     esac        # $ntp_lib_lineedit
17176     { NTP_ORIG_LIBS=; unset NTP_ORIG_LIBS;}
17177     { ORIG_LIBS=; unset ORIG_LIBS;}
17178     { TRY_LIB=; unset TRY_LIB;}
17179     { use_lineeditlibs=; unset use_lineeditlibs;}
17180
17181
17182 LIBM=
17183 case "$host" in
17184  *-*-darwin*)
17185     ;;
17186  *)
17187     _libs=$LIBS
17188     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
17189 $as_echo_n "checking for library containing cos... " >&6; }
17190 if ${ac_cv_search_cos+:} false; then :
17191   $as_echo_n "(cached) " >&6
17192 else
17193   ac_func_search_save_LIBS=$LIBS
17194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17195 /* end confdefs.h.  */
17196
17197 /* Override any GCC internal prototype to avoid an error.
17198    Use char because int might match the return type of a GCC
17199    builtin and then its argument prototype would still apply.  */
17200 #ifdef __cplusplus
17201 extern "C"
17202 #endif
17203 char cos ();
17204 int
17205 main ()
17206 {
17207 return cos ();
17208   ;
17209   return 0;
17210 }
17211 _ACEOF
17212 for ac_lib in '' m; do
17213   if test -z "$ac_lib"; then
17214     ac_res="none required"
17215   else
17216     ac_res=-l$ac_lib
17217     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17218   fi
17219   if ac_fn_c_try_link "$LINENO"; then :
17220   ac_cv_search_cos=$ac_res
17221 fi
17222 rm -f core conftest.err conftest.$ac_objext \
17223     conftest$ac_exeext
17224   if ${ac_cv_search_cos+:} false; then :
17225   break
17226 fi
17227 done
17228 if ${ac_cv_search_cos+:} false; then :
17229
17230 else
17231   ac_cv_search_cos=no
17232 fi
17233 rm conftest.$ac_ext
17234 LIBS=$ac_func_search_save_LIBS
17235 fi
17236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
17237 $as_echo "$ac_cv_search_cos" >&6; }
17238 ac_res=$ac_cv_search_cos
17239 if test "$ac_res" != no; then :
17240   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17241   LIBM="-lm"
17242 fi
17243
17244     LIBS=$_libs
17245     ;;
17246 esac
17247
17248 { _libs=; unset _libs;}
17249
17250
17251 for ac_header in vfork.h
17252 do :
17253   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
17254 if test "x$ac_cv_header_vfork_h" = xyes; then :
17255   cat >>confdefs.h <<_ACEOF
17256 #define HAVE_VFORK_H 1
17257 _ACEOF
17258
17259 fi
17260
17261 done
17262
17263 for ac_func in fork vfork
17264 do :
17265   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17266 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17267 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17268   cat >>confdefs.h <<_ACEOF
17269 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17270 _ACEOF
17271
17272 fi
17273 done
17274
17275 if test "x$ac_cv_func_fork" = xyes; then
17276   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
17277 $as_echo_n "checking for working fork... " >&6; }
17278 if ${ac_cv_func_fork_works+:} false; then :
17279   $as_echo_n "(cached) " >&6
17280 else
17281   if test "$cross_compiling" = yes; then :
17282   ac_cv_func_fork_works=cross
17283 else
17284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17285 /* end confdefs.h.  */
17286 $ac_includes_default
17287 int
17288 main ()
17289 {
17290
17291           /* By Ruediger Kuhlmann. */
17292           return fork () < 0;
17293
17294   ;
17295   return 0;
17296 }
17297 _ACEOF
17298 if ac_fn_c_try_run "$LINENO"; then :
17299   ac_cv_func_fork_works=yes
17300 else
17301   ac_cv_func_fork_works=no
17302 fi
17303 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17304   conftest.$ac_objext conftest.beam conftest.$ac_ext
17305 fi
17306
17307 fi
17308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
17309 $as_echo "$ac_cv_func_fork_works" >&6; }
17310
17311 else
17312   ac_cv_func_fork_works=$ac_cv_func_fork
17313 fi
17314 if test "x$ac_cv_func_fork_works" = xcross; then
17315   case $host in
17316     *-*-amigaos* | *-*-msdosdjgpp*)
17317       # Override, as these systems have only a dummy fork() stub
17318       ac_cv_func_fork_works=no
17319       ;;
17320     *)
17321       ac_cv_func_fork_works=yes
17322       ;;
17323   esac
17324   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
17325 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
17326 fi
17327 ac_cv_func_vfork_works=$ac_cv_func_vfork
17328 if test "x$ac_cv_func_vfork" = xyes; then
17329   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
17330 $as_echo_n "checking for working vfork... " >&6; }
17331 if ${ac_cv_func_vfork_works+:} false; then :
17332   $as_echo_n "(cached) " >&6
17333 else
17334   if test "$cross_compiling" = yes; then :
17335   ac_cv_func_vfork_works=cross
17336 else
17337   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17338 /* end confdefs.h.  */
17339 /* Thanks to Paul Eggert for this test.  */
17340 $ac_includes_default
17341 #include <sys/wait.h>
17342 #ifdef HAVE_VFORK_H
17343 # include <vfork.h>
17344 #endif
17345 /* On some sparc systems, changes by the child to local and incoming
17346    argument registers are propagated back to the parent.  The compiler
17347    is told about this with #include <vfork.h>, but some compilers
17348    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17349    static variable whose address is put into a register that is
17350    clobbered by the vfork.  */
17351 static void
17352 #ifdef __cplusplus
17353 sparc_address_test (int arg)
17354 # else
17355 sparc_address_test (arg) int arg;
17356 #endif
17357 {
17358   static pid_t child;
17359   if (!child) {
17360     child = vfork ();
17361     if (child < 0) {
17362       perror ("vfork");
17363       _exit(2);
17364     }
17365     if (!child) {
17366       arg = getpid();
17367       write(-1, "", 0);
17368       _exit (arg);
17369     }
17370   }
17371 }
17372
17373 int
17374 main ()
17375 {
17376   pid_t parent = getpid ();
17377   pid_t child;
17378
17379   sparc_address_test (0);
17380
17381   child = vfork ();
17382
17383   if (child == 0) {
17384     /* Here is another test for sparc vfork register problems.  This
17385        test uses lots of local variables, at least as many local
17386        variables as main has allocated so far including compiler
17387        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17388        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17389        reuse the register of parent for one of the local variables,
17390        since it will think that parent can't possibly be used any more
17391        in this routine.  Assigning to the local variable will thus
17392        munge parent in the parent process.  */
17393     pid_t
17394       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17395       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17396     /* Convince the compiler that p..p7 are live; otherwise, it might
17397        use the same hardware register for all 8 local variables.  */
17398     if (p != p1 || p != p2 || p != p3 || p != p4
17399         || p != p5 || p != p6 || p != p7)
17400       _exit(1);
17401
17402     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17403        from child file descriptors.  If the child closes a descriptor
17404        before it execs or exits, this munges the parent's descriptor
17405        as well.  Test for this by closing stdout in the child.  */
17406     _exit(close(fileno(stdout)) != 0);
17407   } else {
17408     int status;
17409     struct stat st;
17410
17411     while (wait(&status) != child)
17412       ;
17413     return (
17414          /* Was there some problem with vforking?  */
17415          child < 0
17416
17417          /* Did the child fail?  (This shouldn't happen.)  */
17418          || status
17419
17420          /* Did the vfork/compiler bug occur?  */
17421          || parent != getpid()
17422
17423          /* Did the file descriptor bug occur?  */
17424          || fstat(fileno(stdout), &st) != 0
17425          );
17426   }
17427 }
17428 _ACEOF
17429 if ac_fn_c_try_run "$LINENO"; then :
17430   ac_cv_func_vfork_works=yes
17431 else
17432   ac_cv_func_vfork_works=no
17433 fi
17434 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17435   conftest.$ac_objext conftest.beam conftest.$ac_ext
17436 fi
17437
17438 fi
17439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
17440 $as_echo "$ac_cv_func_vfork_works" >&6; }
17441
17442 fi;
17443 if test "x$ac_cv_func_fork_works" = xcross; then
17444   ac_cv_func_vfork_works=$ac_cv_func_vfork
17445   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
17446 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
17447 fi
17448
17449 if test "x$ac_cv_func_vfork_works" = xyes; then
17450
17451 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
17452
17453 else
17454
17455 $as_echo "#define vfork fork" >>confdefs.h
17456
17457 fi
17458 if test "x$ac_cv_func_fork_works" = xyes; then
17459
17460 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
17461
17462 fi
17463
17464 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
17465 # for constant arguments.  Useless!
17466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
17467 $as_echo_n "checking for working alloca.h... " >&6; }
17468 if ${ac_cv_working_alloca_h+:} false; then :
17469   $as_echo_n "(cached) " >&6
17470 else
17471   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17472 /* end confdefs.h.  */
17473 #include <alloca.h>
17474 int
17475 main ()
17476 {
17477 char *p = (char *) alloca (2 * sizeof (int));
17478                           if (p) return 0;
17479   ;
17480   return 0;
17481 }
17482 _ACEOF
17483 if ac_fn_c_try_link "$LINENO"; then :
17484   ac_cv_working_alloca_h=yes
17485 else
17486   ac_cv_working_alloca_h=no
17487 fi
17488 rm -f core conftest.err conftest.$ac_objext \
17489     conftest$ac_exeext conftest.$ac_ext
17490 fi
17491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
17492 $as_echo "$ac_cv_working_alloca_h" >&6; }
17493 if test $ac_cv_working_alloca_h = yes; then
17494
17495 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
17496
17497 fi
17498
17499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
17500 $as_echo_n "checking for alloca... " >&6; }
17501 if ${ac_cv_func_alloca_works+:} false; then :
17502   $as_echo_n "(cached) " >&6
17503 else
17504   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17505 /* end confdefs.h.  */
17506 #ifdef __GNUC__
17507 # define alloca __builtin_alloca
17508 #else
17509 # ifdef _MSC_VER
17510 #  include <malloc.h>
17511 #  define alloca _alloca
17512 # else
17513 #  ifdef HAVE_ALLOCA_H
17514 #   include <alloca.h>
17515 #  else
17516 #   ifdef _AIX
17517  #pragma alloca
17518 #   else
17519 #    ifndef alloca /* predefined by HP cc +Olibcalls */
17520 void *alloca (size_t);
17521 #    endif
17522 #   endif
17523 #  endif
17524 # endif
17525 #endif
17526
17527 int
17528 main ()
17529 {
17530 char *p = (char *) alloca (1);
17531                                     if (p) return 0;
17532   ;
17533   return 0;
17534 }
17535 _ACEOF
17536 if ac_fn_c_try_link "$LINENO"; then :
17537   ac_cv_func_alloca_works=yes
17538 else
17539   ac_cv_func_alloca_works=no
17540 fi
17541 rm -f core conftest.err conftest.$ac_objext \
17542     conftest$ac_exeext conftest.$ac_ext
17543 fi
17544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
17545 $as_echo "$ac_cv_func_alloca_works" >&6; }
17546
17547 if test $ac_cv_func_alloca_works = yes; then
17548
17549 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17550
17551 else
17552   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
17553 # that cause trouble.  Some versions do not even contain alloca or
17554 # contain a buggy version.  If you still want to use their alloca,
17555 # use ar to extract alloca.o from them instead of compiling alloca.c.
17556
17557 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
17558
17559 $as_echo "#define C_ALLOCA 1" >>confdefs.h
17560
17561
17562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
17563 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
17564 if ${ac_cv_os_cray+:} false; then :
17565   $as_echo_n "(cached) " >&6
17566 else
17567   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17568 /* end confdefs.h.  */
17569 #if defined CRAY && ! defined CRAY2
17570 webecray
17571 #else
17572 wenotbecray
17573 #endif
17574
17575 _ACEOF
17576 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17577   $EGREP "webecray" >/dev/null 2>&1; then :
17578   ac_cv_os_cray=yes
17579 else
17580   ac_cv_os_cray=no
17581 fi
17582 rm -f conftest*
17583
17584 fi
17585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
17586 $as_echo "$ac_cv_os_cray" >&6; }
17587 if test $ac_cv_os_cray = yes; then
17588   for ac_func in _getb67 GETB67 getb67; do
17589     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17590 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17591 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17592
17593 cat >>confdefs.h <<_ACEOF
17594 #define CRAY_STACKSEG_END $ac_func
17595 _ACEOF
17596
17597     break
17598 fi
17599
17600   done
17601 fi
17602
17603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
17604 $as_echo_n "checking stack direction for C alloca... " >&6; }
17605 if ${ac_cv_c_stack_direction+:} false; then :
17606   $as_echo_n "(cached) " >&6
17607 else
17608   if test "$cross_compiling" = yes; then :
17609   ac_cv_c_stack_direction=0
17610 else
17611   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17612 /* end confdefs.h.  */
17613 $ac_includes_default
17614 int
17615 find_stack_direction (int *addr, int depth)
17616 {
17617   int dir, dummy = 0;
17618   if (! addr)
17619     addr = &dummy;
17620   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
17621   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
17622   return dir + dummy;
17623 }
17624
17625 int
17626 main (int argc, char **argv)
17627 {
17628   return find_stack_direction (0, argc + !argv + 20) < 0;
17629 }
17630 _ACEOF
17631 if ac_fn_c_try_run "$LINENO"; then :
17632   ac_cv_c_stack_direction=1
17633 else
17634   ac_cv_c_stack_direction=-1
17635 fi
17636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17637   conftest.$ac_objext conftest.beam conftest.$ac_ext
17638 fi
17639
17640 fi
17641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
17642 $as_echo "$ac_cv_c_stack_direction" >&6; }
17643 cat >>confdefs.h <<_ACEOF
17644 #define STACK_DIRECTION $ac_cv_c_stack_direction
17645 _ACEOF
17646
17647
17648 fi
17649
17650 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
17651 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
17652   ac_have_decl=1
17653 else
17654   ac_have_decl=0
17655 fi
17656
17657 cat >>confdefs.h <<_ACEOF
17658 #define HAVE_DECL_STRERROR_R $ac_have_decl
17659 _ACEOF
17660
17661 for ac_func in strerror_r
17662 do :
17663   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
17664 if test "x$ac_cv_func_strerror_r" = xyes; then :
17665   cat >>confdefs.h <<_ACEOF
17666 #define HAVE_STRERROR_R 1
17667 _ACEOF
17668
17669 fi
17670 done
17671
17672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
17673 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
17674 if ${ac_cv_func_strerror_r_char_p+:} false; then :
17675   $as_echo_n "(cached) " >&6
17676 else
17677
17678     ac_cv_func_strerror_r_char_p=no
17679     if test $ac_cv_have_decl_strerror_r = yes; then
17680       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17681 /* end confdefs.h.  */
17682 $ac_includes_default
17683 int
17684 main ()
17685 {
17686
17687           char buf[100];
17688           char x = *strerror_r (0, buf, sizeof buf);
17689           char *p = strerror_r (0, buf, sizeof buf);
17690           return !p || x;
17691
17692   ;
17693   return 0;
17694 }
17695 _ACEOF
17696 if ac_fn_c_try_compile "$LINENO"; then :
17697   ac_cv_func_strerror_r_char_p=yes
17698 fi
17699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17700     else
17701       # strerror_r is not declared.  Choose between
17702       # systems that have relatively inaccessible declarations for the
17703       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
17704       # former has a strerror_r that returns char*, while the latter
17705       # has a strerror_r that returns `int'.
17706       # This test should segfault on the DEC system.
17707       if test "$cross_compiling" = yes; then :
17708   :
17709 else
17710   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17711 /* end confdefs.h.  */
17712 $ac_includes_default
17713         extern char *strerror_r ();
17714 int
17715 main ()
17716 {
17717 char buf[100];
17718           char x = *strerror_r (0, buf, sizeof buf);
17719           return ! isalpha (x);
17720   ;
17721   return 0;
17722 }
17723 _ACEOF
17724 if ac_fn_c_try_run "$LINENO"; then :
17725   ac_cv_func_strerror_r_char_p=yes
17726 fi
17727 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17728   conftest.$ac_objext conftest.beam conftest.$ac_ext
17729 fi
17730
17731     fi
17732
17733 fi
17734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
17735 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
17736 if test $ac_cv_func_strerror_r_char_p = yes; then
17737
17738 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
17739
17740 fi
17741
17742
17743 ac_busted_vpath_in_make=no
17744 case "$build" in
17745  *-*-irix6.1*)  # 64 bit only
17746     # busted vpath?
17747     ;;
17748  *-*-irix6*)    # 6.2 (and later?)
17749     ac_busted_vpath_in_make=yes
17750     ;;
17751  *-*-solaris2.5.1)
17752     ac_busted_vpath_in_make=yes
17753     ;;
17754  *-*-unicosmp*)
17755     ac_busted_vpath_in_make=yes
17756     ;;
17757 esac
17758
17759 case "$ac_busted_vpath_in_make$srcdir" in
17760  yes.|no*)
17761     ;;
17762  *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
17763      '')
17764         as_fn_error $? "building outside of the main directory requires GNU make" "$LINENO" 5
17765     esac
17766     ;;
17767 esac
17768
17769 case "$host" in
17770  *-*-aix4*)
17771         # Bug 2516:
17772         # Was *-*-aix[[4-9]]*
17773         # XXX only verified thru AIX6.  But...
17774         # Ken Link says this is fine for AIX 5.3 and 7.1, and sees no reason
17775         # that this support would be in 5.3, removed in 6, and added back.
17776         #
17777         # (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
17778         # (returning ENOSYS).  I didn't check 4.2.  If, in the future,
17779         # IBM pulls its thumbs out long enough to implement clock_settime,
17780         # this conditional will need to change.  Maybe use AC_TRY_RUN
17781         # instead to try to set the time to itself and check errno.
17782     ;;
17783  *)
17784     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17785 $as_echo_n "checking for library containing clock_gettime... " >&6; }
17786 if ${ac_cv_search_clock_gettime+:} false; then :
17787   $as_echo_n "(cached) " >&6
17788 else
17789   ac_func_search_save_LIBS=$LIBS
17790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17791 /* end confdefs.h.  */
17792
17793 /* Override any GCC internal prototype to avoid an error.
17794    Use char because int might match the return type of a GCC
17795    builtin and then its argument prototype would still apply.  */
17796 #ifdef __cplusplus
17797 extern "C"
17798 #endif
17799 char clock_gettime ();
17800 int
17801 main ()
17802 {
17803 return clock_gettime ();
17804   ;
17805   return 0;
17806 }
17807 _ACEOF
17808 for ac_lib in '' rt; do
17809   if test -z "$ac_lib"; then
17810     ac_res="none required"
17811   else
17812     ac_res=-l$ac_lib
17813     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17814   fi
17815   if ac_fn_c_try_link "$LINENO"; then :
17816   ac_cv_search_clock_gettime=$ac_res
17817 fi
17818 rm -f core conftest.err conftest.$ac_objext \
17819     conftest$ac_exeext
17820   if ${ac_cv_search_clock_gettime+:} false; then :
17821   break
17822 fi
17823 done
17824 if ${ac_cv_search_clock_gettime+:} false; then :
17825
17826 else
17827   ac_cv_search_clock_gettime=no
17828 fi
17829 rm conftest.$ac_ext
17830 LIBS=$ac_func_search_save_LIBS
17831 fi
17832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17833 $as_echo "$ac_cv_search_clock_gettime" >&6; }
17834 ac_res=$ac_cv_search_clock_gettime
17835 if test "$ac_res" != no; then :
17836   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17837   case "$ac_cv_search_clock_gettime" in
17838  'none required') ;;
17839  no) ;;
17840  *) LDADD_LIBNTP="$ac_cv_search_clock_gettime $LDADD_LIBNTP" ;;
17841  esac
17842
17843 fi
17844
17845     for ac_func in clock_getres clock_gettime clock_settime
17846 do :
17847   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17848 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17849 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17850   cat >>confdefs.h <<_ACEOF
17851 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17852 _ACEOF
17853
17854 fi
17855 done
17856
17857     ;;
17858 esac
17859
17860 for ac_func in getclock stime timegm strlcpy strlcat
17861 do :
17862   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17863 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17864 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17865   cat >>confdefs.h <<_ACEOF
17866 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17867 _ACEOF
17868
17869 fi
17870 done
17871
17872
17873 # Bug 2713
17874 LDADD_LIBUTIL=
17875
17876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing snprintb" >&5
17877 $as_echo_n "checking for library containing snprintb... " >&6; }
17878 if ${ac_cv_search_snprintb+:} false; then :
17879   $as_echo_n "(cached) " >&6
17880 else
17881   ac_func_search_save_LIBS=$LIBS
17882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17883 /* end confdefs.h.  */
17884
17885 /* Override any GCC internal prototype to avoid an error.
17886    Use char because int might match the return type of a GCC
17887    builtin and then its argument prototype would still apply.  */
17888 #ifdef __cplusplus
17889 extern "C"
17890 #endif
17891 char snprintb ();
17892 int
17893 main ()
17894 {
17895 return snprintb ();
17896   ;
17897   return 0;
17898 }
17899 _ACEOF
17900 for ac_lib in '' util; do
17901   if test -z "$ac_lib"; then
17902     ac_res="none required"
17903   else
17904     ac_res=-l$ac_lib
17905     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17906   fi
17907   if ac_fn_c_try_link "$LINENO"; then :
17908   ac_cv_search_snprintb=$ac_res
17909 fi
17910 rm -f core conftest.err conftest.$ac_objext \
17911     conftest$ac_exeext
17912   if ${ac_cv_search_snprintb+:} false; then :
17913   break
17914 fi
17915 done
17916 if ${ac_cv_search_snprintb+:} false; then :
17917
17918 else
17919   ac_cv_search_snprintb=no
17920 fi
17921 rm conftest.$ac_ext
17922 LIBS=$ac_func_search_save_LIBS
17923 fi
17924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_snprintb" >&5
17925 $as_echo "$ac_cv_search_snprintb" >&6; }
17926 ac_res=$ac_cv_search_snprintb
17927 if test "$ac_res" != no; then :
17928   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17929   case "$ac_cv_search_snprintb" in
17930  'none required') ;;
17931  no) ;;
17932  *) LDADD_LIBUTIL="$ac_cv_search_snprintb $LDADD_LIBUTIL" ;;
17933  esac
17934
17935 $as_echo "#define USE_SNPRINTB 1" >>confdefs.h
17936
17937 fi
17938
17939
17940 #
17941 for ac_header in errno.h sys/socket.h sys/types.h time.h
17942 do :
17943   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17944 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17945 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17946   cat >>confdefs.h <<_ACEOF
17947 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17948 _ACEOF
17949
17950 fi
17951
17952 done
17953
17954 for ac_header in net/if.h
17955 do :
17956   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
17957     #ifdef HAVE_SYS_SOCKET_H
17958     # include <sys/socket.h>
17959     #endif
17960
17961 "
17962 if test "x$ac_cv_header_net_if_h" = xyes; then :
17963   cat >>confdefs.h <<_ACEOF
17964 #define HAVE_NET_IF_H 1
17965 _ACEOF
17966
17967 fi
17968
17969 done
17970
17971 case "$host" in
17972  *-hp-hpux*)
17973     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/if.h requires mpinfou predeclaration" >&5
17974 $as_echo_n "checking if net/if.h requires mpinfou predeclaration... " >&6; }
17975 if ${ntp_cv_predecl_mpinfou+:} false; then :
17976   $as_echo_n "(cached) " >&6
17977 else
17978
17979             np_cv_predecl_mpinfou=no
17980             case "$ac_cv_header_net_if_h" in
17981              no)
17982                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17983 /* end confdefs.h.  */
17984
17985                             typedef union mpinfou {
17986                                     struct pdk_mpinfo *pdkptr;
17987                                     struct mpinfo *pikptr;
17988                             } mpinfou_t;
17989                             #ifdef HAVE_SYS_SOCKET_H
17990                             # include <sys/socket.h>
17991                             #endif
17992                             #include <net/if.h>
17993
17994 int
17995 main ()
17996 {
17997
17998
17999
18000   ;
18001   return 0;
18002 }
18003 _ACEOF
18004 if ac_fn_c_try_compile "$LINENO"; then :
18005
18006                         ntp_cv_predecl_mpinfou=yes
18007                         ac_cv_header_net_if_h=yes
18008
18009
18010 fi
18011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18012             esac
18013
18014
18015 fi
18016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_predecl_mpinfou" >&5
18017 $as_echo "$ntp_cv_predecl_mpinfou" >&6; }
18018     case "$ntp_cv_predecl_mpinfou" in
18019      yes)
18020         cat >>confdefs.h <<_ACEOF
18021 #ifndef MPINFOU_PREDECLARED
18022 # define MPINFOU_PREDECLARED
18023 typedef union mpinfou {
18024         struct pdk_mpinfo *pdkptr;
18025         struct mpinfo *pikptr;
18026 } mpinfou_t;
18027 #endif
18028 _ACEOF
18029
18030     esac
18031 esac
18032
18033 case "$host" in
18034  *-linux*)
18035     for ac_header in linux/if_addr.h
18036 do :
18037   ac_fn_c_check_header_compile "$LINENO" "linux/if_addr.h" "ac_cv_header_linux_if_addr_h" "
18038         #ifdef HAVE_SYS_SOCKET_H
18039         # include <sys/socket.h>
18040         #endif
18041
18042 "
18043 if test "x$ac_cv_header_linux_if_addr_h" = xyes; then :
18044   cat >>confdefs.h <<_ACEOF
18045 #define HAVE_LINUX_IF_ADDR_H 1
18046 _ACEOF
18047
18048 fi
18049
18050 done
18051
18052
18053 $as_echo "#define NEED_EARLY_FORK 1" >>confdefs.h
18054
18055 esac
18056
18057 for ac_header in arpa/nameser.h sys/param.h sys/time.h sys/timers.h
18058 do :
18059   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18060 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18061 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18062   cat >>confdefs.h <<_ACEOF
18063 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18064 _ACEOF
18065
18066 fi
18067
18068 done
18069
18070 # sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
18071 for ac_header in sys/sysctl.h
18072 do :
18073   ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
18074     #if defined HAVE_SYS_PARAM_H
18075     # include <sys/param.h>
18076     #endif
18077
18078 "
18079 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
18080   cat >>confdefs.h <<_ACEOF
18081 #define HAVE_SYS_SYSCTL_H 1
18082 _ACEOF
18083
18084 fi
18085
18086 done
18087
18088 for ac_header in netinet/in_system.h netinet/in_systm.h netinet/in.h
18089 do :
18090   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18091 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18092 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18093   cat >>confdefs.h <<_ACEOF
18094 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18095 _ACEOF
18096
18097 fi
18098
18099 done
18100
18101
18102 for ac_header in resolv.h
18103 do :
18104   ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
18105     #ifdef HAVE_SYS_TYPES_H
18106     # include <sys/types.h>
18107     #endif
18108     #ifdef HAVE_NETINET_IN_H
18109     # include <netinet/in.h>
18110     #endif
18111     #ifdef HAVE_ARPA_NAMESER_H
18112     # include <arpa/nameser.h>
18113     #endif
18114
18115 "
18116 if test "x$ac_cv_header_resolv_h" = xyes; then :
18117   cat >>confdefs.h <<_ACEOF
18118 #define HAVE_RESOLV_H 1
18119 _ACEOF
18120
18121 fi
18122
18123 done
18124
18125
18126 for ac_header in net/if_var.h
18127 do :
18128   ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
18129     #if HAVE_SYS_TYPES_H
18130     # include <sys/types.h>
18131     #endif
18132     #ifdef HAVE_SYS_SOCKET_H
18133     # include <sys/socket.h>
18134     #endif
18135     #ifdef HAVE_NETINET_IN_H
18136     # include <netinet/in.h>
18137     #endif
18138     #ifdef HAVE_NET_IF_H
18139     # include <net/if.h>
18140     #endif
18141
18142 "
18143 if test "x$ac_cv_header_net_if_var_h" = xyes; then :
18144   cat >>confdefs.h <<_ACEOF
18145 #define HAVE_NET_IF_VAR_H 1
18146 _ACEOF
18147
18148 fi
18149
18150 done
18151
18152
18153 for ac_header in netinet/ip.h netinet/in_var.h
18154 do :
18155   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18156 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
18157     #ifdef HAVE_SYS_TYPES_H
18158     # include <sys/types.h>
18159     #endif
18160     #ifdef HAVE_SYS_SOCKET_H
18161     # include <sys/socket.h>
18162     #endif
18163     #ifdef HAVE_NET_IF_H
18164     # include <net/if.h>
18165     #endif
18166     #ifdef HAVE_NETINET_IN_H
18167     # include <netinet/in.h>
18168     #endif
18169     #ifdef HAVE_NET_IF_VAR_H
18170     # include <net/if_var.h>
18171     #endif
18172     #ifdef HAVE_NETINET_IN_SYSTM_H
18173     # include <netinet/in_systm.h>
18174     #endif
18175
18176 "
18177 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18178   cat >>confdefs.h <<_ACEOF
18179 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18180 _ACEOF
18181
18182 fi
18183
18184 done
18185
18186
18187 # HMS: Do we need to check for -lsocket before or after these tests?
18188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
18189 $as_echo_n "checking for library containing inet_pton... " >&6; }
18190 if ${ac_cv_search_inet_pton+:} false; then :
18191   $as_echo_n "(cached) " >&6
18192 else
18193   ac_func_search_save_LIBS=$LIBS
18194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18195 /* end confdefs.h.  */
18196
18197 /* Override any GCC internal prototype to avoid an error.
18198    Use char because int might match the return type of a GCC
18199    builtin and then its argument prototype would still apply.  */
18200 #ifdef __cplusplus
18201 extern "C"
18202 #endif
18203 char inet_pton ();
18204 int
18205 main ()
18206 {
18207 return inet_pton ();
18208   ;
18209   return 0;
18210 }
18211 _ACEOF
18212 for ac_lib in '' nsl; do
18213   if test -z "$ac_lib"; then
18214     ac_res="none required"
18215   else
18216     ac_res=-l$ac_lib
18217     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18218   fi
18219   if ac_fn_c_try_link "$LINENO"; then :
18220   ac_cv_search_inet_pton=$ac_res
18221 fi
18222 rm -f core conftest.err conftest.$ac_objext \
18223     conftest$ac_exeext
18224   if ${ac_cv_search_inet_pton+:} false; then :
18225   break
18226 fi
18227 done
18228 if ${ac_cv_search_inet_pton+:} false; then :
18229
18230 else
18231   ac_cv_search_inet_pton=no
18232 fi
18233 rm conftest.$ac_ext
18234 LIBS=$ac_func_search_save_LIBS
18235 fi
18236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
18237 $as_echo "$ac_cv_search_inet_pton" >&6; }
18238 ac_res=$ac_cv_search_inet_pton
18239 if test "$ac_res" != no; then :
18240   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18241   case "$ac_cv_search_inet_pton" in
18242  'none required') ;;
18243  no) ;;
18244  *) LDADD_LIBNTP="$ac_cv_search_inet_pton $LDADD_LIBNTP" ;;
18245  esac
18246
18247 fi
18248
18249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
18250 $as_echo_n "checking for library containing inet_ntop... " >&6; }
18251 if ${ac_cv_search_inet_ntop+:} false; then :
18252   $as_echo_n "(cached) " >&6
18253 else
18254   ac_func_search_save_LIBS=$LIBS
18255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18256 /* end confdefs.h.  */
18257
18258 /* Override any GCC internal prototype to avoid an error.
18259    Use char because int might match the return type of a GCC
18260    builtin and then its argument prototype would still apply.  */
18261 #ifdef __cplusplus
18262 extern "C"
18263 #endif
18264 char inet_ntop ();
18265 int
18266 main ()
18267 {
18268 return inet_ntop ();
18269   ;
18270   return 0;
18271 }
18272 _ACEOF
18273 for ac_lib in '' resolv; do
18274   if test -z "$ac_lib"; then
18275     ac_res="none required"
18276   else
18277     ac_res=-l$ac_lib
18278     LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
18279   fi
18280   if ac_fn_c_try_link "$LINENO"; then :
18281   ac_cv_search_inet_ntop=$ac_res
18282 fi
18283 rm -f core conftest.err conftest.$ac_objext \
18284     conftest$ac_exeext
18285   if ${ac_cv_search_inet_ntop+:} false; then :
18286   break
18287 fi
18288 done
18289 if ${ac_cv_search_inet_ntop+:} false; then :
18290
18291 else
18292   ac_cv_search_inet_ntop=no
18293 fi
18294 rm conftest.$ac_ext
18295 LIBS=$ac_func_search_save_LIBS
18296 fi
18297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
18298 $as_echo "$ac_cv_search_inet_ntop" >&6; }
18299 ac_res=$ac_cv_search_inet_ntop
18300 if test "$ac_res" != no; then :
18301   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18302   case "$ac_cv_search_inet_ntop" in
18303  'none required') ;;
18304  no) ;;
18305  *) LDADD_LIBNTP="$ac_cv_search_inet_ntop $LDADD_LIBNTP" ;;
18306  esac
18307
18308 fi
18309
18310
18311 # [Bug 1628] On Solaris, we need -lxnet -lsocket.  Generalize this to
18312 # avoid keying on the OS name:  If we find socket functions in
18313 # libsocket, next try for them in libxnet without libsocket, if found,
18314 # list both.  If we simply tested libxnet first, we would find the
18315 # functions there and never add libsocket.  See also [Bug 660]
18316 # http://bugs.ntp.org/show_bug.cgi?id=660#c9
18317 saved_LIBS=$LIBS
18318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
18319 $as_echo_n "checking for library containing setsockopt... " >&6; }
18320 if ${ac_cv_search_setsockopt+:} false; then :
18321   $as_echo_n "(cached) " >&6
18322 else
18323   ac_func_search_save_LIBS=$LIBS
18324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18325 /* end confdefs.h.  */
18326
18327 /* Override any GCC internal prototype to avoid an error.
18328    Use char because int might match the return type of a GCC
18329    builtin and then its argument prototype would still apply.  */
18330 #ifdef __cplusplus
18331 extern "C"
18332 #endif
18333 char setsockopt ();
18334 int
18335 main ()
18336 {
18337 return setsockopt ();
18338   ;
18339   return 0;
18340 }
18341 _ACEOF
18342 for ac_lib in '' socket; do
18343   if test -z "$ac_lib"; then
18344     ac_res="none required"
18345   else
18346     ac_res=-l$ac_lib
18347     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18348   fi
18349   if ac_fn_c_try_link "$LINENO"; then :
18350   ac_cv_search_setsockopt=$ac_res
18351 fi
18352 rm -f core conftest.err conftest.$ac_objext \
18353     conftest$ac_exeext
18354   if ${ac_cv_search_setsockopt+:} false; then :
18355   break
18356 fi
18357 done
18358 if ${ac_cv_search_setsockopt+:} false; then :
18359
18360 else
18361   ac_cv_search_setsockopt=no
18362 fi
18363 rm conftest.$ac_ext
18364 LIBS=$ac_func_search_save_LIBS
18365 fi
18366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
18367 $as_echo "$ac_cv_search_setsockopt" >&6; }
18368 ac_res=$ac_cv_search_setsockopt
18369 if test "$ac_res" != no; then :
18370   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18371   case "$ac_cv_search_setsockopt" in
18372  'none required') ;;
18373  no) ;;
18374  *) LDADD_LIBNTP="$ac_cv_search_setsockopt $LDADD_LIBNTP" ;;
18375  esac
18376
18377 fi
18378
18379 case "$ac_cv_search_setsockopt" in
18380  -lsocket)
18381     LIBS="$saved_LIBS"
18382     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
18383 $as_echo_n "checking for library containing getsockopt... " >&6; }
18384 if ${ac_cv_search_getsockopt+:} false; then :
18385   $as_echo_n "(cached) " >&6
18386 else
18387   ac_func_search_save_LIBS=$LIBS
18388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18389 /* end confdefs.h.  */
18390
18391 /* Override any GCC internal prototype to avoid an error.
18392    Use char because int might match the return type of a GCC
18393    builtin and then its argument prototype would still apply.  */
18394 #ifdef __cplusplus
18395 extern "C"
18396 #endif
18397 char getsockopt ();
18398 int
18399 main ()
18400 {
18401 return getsockopt ();
18402   ;
18403   return 0;
18404 }
18405 _ACEOF
18406 for ac_lib in '' xnet; do
18407   if test -z "$ac_lib"; then
18408     ac_res="none required"
18409   else
18410     ac_res=-l$ac_lib
18411     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18412   fi
18413   if ac_fn_c_try_link "$LINENO"; then :
18414   ac_cv_search_getsockopt=$ac_res
18415 fi
18416 rm -f core conftest.err conftest.$ac_objext \
18417     conftest$ac_exeext
18418   if ${ac_cv_search_getsockopt+:} false; then :
18419   break
18420 fi
18421 done
18422 if ${ac_cv_search_getsockopt+:} false; then :
18423
18424 else
18425   ac_cv_search_getsockopt=no
18426 fi
18427 rm conftest.$ac_ext
18428 LIBS=$ac_func_search_save_LIBS
18429 fi
18430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
18431 $as_echo "$ac_cv_search_getsockopt" >&6; }
18432 ac_res=$ac_cv_search_getsockopt
18433 if test "$ac_res" != no; then :
18434   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18435   case "$ac_cv_search_getsockopt" in
18436  'none required') ;;
18437  no) ;;
18438  *) LDADD_LIBNTP="$ac_cv_search_getsockopt $LDADD_LIBNTP" ;;
18439  esac
18440
18441 fi
18442
18443     # XXX Possible trouble here - reading the comments above and looking at the
18444     # code below I wonder if we'll add -lxnet when we don't need it.
18445     # Also, do we need to add -lxnet to LDADD_LIBNTP, or perhaps see if it's
18446     # there when it is not needed?
18447     case "$ac_cv_search_getsockopt" in
18448      -lxnet)
18449         LIBS="-lxnet -lsocket $saved_LIBS"
18450         ;;
18451      *) LIBS="-lsocket $saved_LIBS"
18452         ;;
18453     esac
18454     ;;
18455 esac
18456 { saved_LIBS=; unset saved_LIBS;}
18457
18458 # Bug 2427 - look for recvmsg here.
18459 for ac_func in recvmsg
18460 do :
18461   ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
18462 if test "x$ac_cv_func_recvmsg" = xyes; then :
18463   cat >>confdefs.h <<_ACEOF
18464 #define HAVE_RECVMSG 1
18465 _ACEOF
18466
18467 fi
18468 done
18469
18470
18471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
18472 $as_echo_n "checking for inline... " >&6; }
18473 if ${ac_cv_c_inline+:} false; then :
18474   $as_echo_n "(cached) " >&6
18475 else
18476   ac_cv_c_inline=no
18477 for ac_kw in inline __inline__ __inline; do
18478   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18479 /* end confdefs.h.  */
18480 #ifndef __cplusplus
18481 typedef int foo_t;
18482 static $ac_kw foo_t static_foo () {return 0; }
18483 $ac_kw foo_t foo () {return 0; }
18484 #endif
18485
18486 _ACEOF
18487 if ac_fn_c_try_compile "$LINENO"; then :
18488   ac_cv_c_inline=$ac_kw
18489 fi
18490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18491   test "$ac_cv_c_inline" != no && break
18492 done
18493
18494 fi
18495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
18496 $as_echo "$ac_cv_c_inline" >&6; }
18497
18498 case $ac_cv_c_inline in
18499   inline | yes) ;;
18500   *)
18501     case $ac_cv_c_inline in
18502       no) ac_val=;;
18503       *) ac_val=$ac_cv_c_inline;;
18504     esac
18505     cat >>confdefs.h <<_ACEOF
18506 #ifndef __cplusplus
18507 #define inline $ac_val
18508 #endif
18509 _ACEOF
18510     ;;
18511 esac
18512
18513
18514 case "$ac_cv_c_inline" in
18515  '')
18516     ;;
18517  *)
18518
18519 $as_echo "#define HAVE_INLINE 1" >>confdefs.h
18520
18521
18522 esac
18523
18524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
18525 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
18526 if ${ac_cv_header_time+:} false; then :
18527   $as_echo_n "(cached) " >&6
18528 else
18529   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18530 /* end confdefs.h.  */
18531 #include <sys/types.h>
18532 #include <sys/time.h>
18533 #include <time.h>
18534
18535 int
18536 main ()
18537 {
18538 if ((struct tm *) 0)
18539 return 0;
18540   ;
18541   return 0;
18542 }
18543 _ACEOF
18544 if ac_fn_c_try_compile "$LINENO"; then :
18545   ac_cv_header_time=yes
18546 else
18547   ac_cv_header_time=no
18548 fi
18549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18550 fi
18551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
18552 $as_echo "$ac_cv_header_time" >&6; }
18553 if test $ac_cv_header_time = yes; then
18554
18555 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
18556
18557 fi
18558
18559 # The cast to long int works around a bug in the HP C Compiler
18560 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18561 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18562 # This bug is HP SR number 8606223364.
18563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
18564 $as_echo_n "checking size of time_t... " >&6; }
18565 if ${ac_cv_sizeof_time_t+:} false; then :
18566   $as_echo_n "(cached) " >&6
18567 else
18568   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
18569
18570 else
18571   if test "$ac_cv_type_time_t" = yes; then
18572      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18573 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18574 as_fn_error 77 "cannot compute sizeof (time_t)
18575 See \`config.log' for more details" "$LINENO" 5; }
18576    else
18577      ac_cv_sizeof_time_t=0
18578    fi
18579 fi
18580
18581 fi
18582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
18583 $as_echo "$ac_cv_sizeof_time_t" >&6; }
18584
18585
18586
18587 cat >>confdefs.h <<_ACEOF
18588 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
18589 _ACEOF
18590
18591
18592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
18593 $as_echo_n "checking whether char is unsigned... " >&6; }
18594 if ${ac_cv_c_char_unsigned+:} false; then :
18595   $as_echo_n "(cached) " >&6
18596 else
18597   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18598 /* end confdefs.h.  */
18599 $ac_includes_default
18600 int
18601 main ()
18602 {
18603 static int test_array [1 - 2 * !(((char) -1) < 0)];
18604 test_array [0] = 0;
18605 return test_array [0];
18606
18607   ;
18608   return 0;
18609 }
18610 _ACEOF
18611 if ac_fn_c_try_compile "$LINENO"; then :
18612   ac_cv_c_char_unsigned=no
18613 else
18614   ac_cv_c_char_unsigned=yes
18615 fi
18616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18617 fi
18618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
18619 $as_echo "$ac_cv_c_char_unsigned" >&6; }
18620 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
18621   $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
18622
18623 fi
18624                 # The cast to long int works around a bug in the HP C Compiler
18625 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18626 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18627 # This bug is HP SR number 8606223364.
18628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
18629 $as_echo_n "checking size of signed char... " >&6; }
18630 if ${ac_cv_sizeof_signed_char+:} false; then :
18631   $as_echo_n "(cached) " >&6
18632 else
18633   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char"        "$ac_includes_default"; then :
18634
18635 else
18636   if test "$ac_cv_type_signed_char" = yes; then
18637      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18638 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18639 as_fn_error 77 "cannot compute sizeof (signed char)
18640 See \`config.log' for more details" "$LINENO" 5; }
18641    else
18642      ac_cv_sizeof_signed_char=0
18643    fi
18644 fi
18645
18646 fi
18647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
18648 $as_echo "$ac_cv_sizeof_signed_char" >&6; }
18649
18650
18651
18652 cat >>confdefs.h <<_ACEOF
18653 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
18654 _ACEOF
18655
18656
18657 ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
18658 if test "x$ac_cv_type_s_char" = xyes; then :
18659
18660 cat >>confdefs.h <<_ACEOF
18661 #define HAVE_S_CHAR 1
18662 _ACEOF
18663
18664
18665 fi
18666 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
18667 if test "x$ac_cv_type_long_long" = xyes; then :
18668
18669 cat >>confdefs.h <<_ACEOF
18670 #define HAVE_LONG_LONG 1
18671 _ACEOF
18672
18673
18674 fi
18675
18676 # The cast to long int works around a bug in the HP C Compiler
18677 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18678 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18679 # This bug is HP SR number 8606223364.
18680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
18681 $as_echo_n "checking size of short... " >&6; }
18682 if ${ac_cv_sizeof_short+:} false; then :
18683   $as_echo_n "(cached) " >&6
18684 else
18685   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
18686
18687 else
18688   if test "$ac_cv_type_short" = yes; then
18689      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18690 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18691 as_fn_error 77 "cannot compute sizeof (short)
18692 See \`config.log' for more details" "$LINENO" 5; }
18693    else
18694      ac_cv_sizeof_short=0
18695    fi
18696 fi
18697
18698 fi
18699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
18700 $as_echo "$ac_cv_sizeof_short" >&6; }
18701
18702
18703
18704 cat >>confdefs.h <<_ACEOF
18705 #define SIZEOF_SHORT $ac_cv_sizeof_short
18706 _ACEOF
18707
18708
18709 # The cast to long int works around a bug in the HP C Compiler
18710 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18711 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18712 # This bug is HP SR number 8606223364.
18713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
18714 $as_echo_n "checking size of int... " >&6; }
18715 if ${ac_cv_sizeof_int+:} false; then :
18716   $as_echo_n "(cached) " >&6
18717 else
18718   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
18719
18720 else
18721   if test "$ac_cv_type_int" = yes; then
18722      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18723 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18724 as_fn_error 77 "cannot compute sizeof (int)
18725 See \`config.log' for more details" "$LINENO" 5; }
18726    else
18727      ac_cv_sizeof_int=0
18728    fi
18729 fi
18730
18731 fi
18732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
18733 $as_echo "$ac_cv_sizeof_int" >&6; }
18734
18735
18736
18737 cat >>confdefs.h <<_ACEOF
18738 #define SIZEOF_INT $ac_cv_sizeof_int
18739 _ACEOF
18740
18741
18742 # The cast to long int works around a bug in the HP C Compiler
18743 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18744 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18745 # This bug is HP SR number 8606223364.
18746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
18747 $as_echo_n "checking size of long... " >&6; }
18748 if ${ac_cv_sizeof_long+:} false; then :
18749   $as_echo_n "(cached) " >&6
18750 else
18751   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
18752
18753 else
18754   if test "$ac_cv_type_long" = yes; then
18755      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18756 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18757 as_fn_error 77 "cannot compute sizeof (long)
18758 See \`config.log' for more details" "$LINENO" 5; }
18759    else
18760      ac_cv_sizeof_long=0
18761    fi
18762 fi
18763
18764 fi
18765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
18766 $as_echo "$ac_cv_sizeof_long" >&6; }
18767
18768
18769
18770 cat >>confdefs.h <<_ACEOF
18771 #define SIZEOF_LONG $ac_cv_sizeof_long
18772 _ACEOF
18773
18774
18775
18776 case "$ac_cv_type_long_long" in
18777  no)
18778     ;;
18779  *)
18780     # The cast to long int works around a bug in the HP C Compiler
18781 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18782 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18783 # This bug is HP SR number 8606223364.
18784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
18785 $as_echo_n "checking size of long long... " >&6; }
18786 if ${ac_cv_sizeof_long_long+:} false; then :
18787   $as_echo_n "(cached) " >&6
18788 else
18789   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
18790
18791 else
18792   if test "$ac_cv_type_long_long" = yes; then
18793      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18794 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18795 as_fn_error 77 "cannot compute sizeof (long long)
18796 See \`config.log' for more details" "$LINENO" 5; }
18797    else
18798      ac_cv_sizeof_long_long=0
18799    fi
18800 fi
18801
18802 fi
18803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
18804 $as_echo "$ac_cv_sizeof_long_long" >&6; }
18805
18806
18807
18808 cat >>confdefs.h <<_ACEOF
18809 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
18810 _ACEOF
18811
18812
18813     ;;
18814 esac
18815
18816 case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
18817  *yes)
18818     # We have a typedef for s_char.  Might as well believe it...
18819     ;;
18820  no0no)
18821     # We have signed chars, can't say 'signed char', no s_char typedef.
18822
18823 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
18824
18825     ;;
18826  no1no)
18827     # We have signed chars, can say 'signed char', no s_char typedef.
18828
18829 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
18830
18831     ;;
18832  yes0no)
18833     # We have unsigned chars, can't say 'signed char', no s_char typedef.
18834     as_fn_error $? "No way to specify a signed character!" "$LINENO" 5
18835     ;;
18836  yes1no)
18837     # We have unsigned chars, can say 'signed char', no s_char typedef.
18838
18839 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
18840
18841     ;;
18842 esac
18843
18844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
18845 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
18846 if ${ac_cv_type_uid_t+:} false; then :
18847   $as_echo_n "(cached) " >&6
18848 else
18849   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18850 /* end confdefs.h.  */
18851 #include <sys/types.h>
18852
18853 _ACEOF
18854 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18855   $EGREP "uid_t" >/dev/null 2>&1; then :
18856   ac_cv_type_uid_t=yes
18857 else
18858   ac_cv_type_uid_t=no
18859 fi
18860 rm -f conftest*
18861
18862 fi
18863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
18864 $as_echo "$ac_cv_type_uid_t" >&6; }
18865 if test $ac_cv_type_uid_t = no; then
18866
18867 $as_echo "#define uid_t int" >>confdefs.h
18868
18869
18870 $as_echo "#define gid_t int" >>confdefs.h
18871
18872 fi
18873
18874
18875
18876
18877
18878
18879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
18880 $as_echo_n "checking if we're including debugging code... " >&6; }
18881 # Check whether --enable-debugging was given.
18882 if test "${enable_debugging+set}" = set; then :
18883   enableval=$enable_debugging; ntp_ok=$enableval
18884 else
18885   ntp_ok=yes
18886
18887 fi
18888
18889 case "$ntp_ok" in
18890  yes)
18891
18892 $as_echo "#define DEBUG 1" >>confdefs.h
18893
18894 esac
18895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
18896 $as_echo "$ntp_ok" >&6; }
18897
18898
18899
18900 # check if we can compile with pthreads
18901 for ac_header in semaphore.h
18902 do :
18903   ac_fn_c_check_header_mongrel "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
18904 if test "x$ac_cv_header_semaphore_h" = xyes; then :
18905   cat >>confdefs.h <<_ACEOF
18906 #define HAVE_SEMAPHORE_H 1
18907 _ACEOF
18908
18909 fi
18910
18911 done
18912
18913 for ac_func in socketpair
18914 do :
18915   ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
18916 if test "x$ac_cv_func_socketpair" = xyes; then :
18917   cat >>confdefs.h <<_ACEOF
18918 #define HAVE_SOCKETPAIR 1
18919 _ACEOF
18920
18921 fi
18922 done
18923
18924 # Check whether --enable-thread-support was given.
18925 if test "${enable_thread_support+set}" = set; then :
18926   enableval=$enable_thread_support;
18927 else
18928   enable_thread_support=yes
18929
18930 fi
18931
18932 have_pthreads=no
18933 case "$enable_thread_support" in
18934  no) ;;
18935  *)
18936     ol_found_pthreads=no
18937
18938
18939
18940 ac_ext=c
18941 ac_cpp='$CPP $CPPFLAGS'
18942 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18943 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18944 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18945
18946 # OpenLDAP --with-threads
18947
18948 # Check whether --with-threads was given.
18949 if test "${with_threads+set}" = set; then :
18950   withval=$with_threads;
18951         ol_arg=invalid
18952         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
18953                 if test "$withval" = "$ol_val" ; then
18954                         ol_arg="$ol_val"
18955                 fi
18956         done
18957         if test "$ol_arg" = "invalid" ; then
18958                 as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
18959         fi
18960         ol_with_threads="$ol_arg"
18961
18962 else
18963         ol_with_threads="auto"
18964 fi
18965 # end --with-threads
18966
18967
18968 case "$ol_with_threads$host" in
18969  auto*-*-solaris2.[0-6])
18970         ol_with_threads=no
18971     ;;
18972 esac
18973
18974
18975 ol_aix_threads=no
18976 case "$host" in
18977 *-*-aix*)       if test -z "$CC" ; then
18978                 case "$ol_with_threads" in
18979                 auto | yes |  posix) ol_aix_threads=yes ;;
18980                 esac
18981         fi
18982 ;;
18983 esac
18984
18985 if test $ol_aix_threads = yes ; then
18986         if test -z "${CC}" ; then
18987                 for ac_prog in cc_r xlc_r cc
18988 do
18989   # Extract the first word of "$ac_prog", so it can be a program name with args.
18990 set dummy $ac_prog; ac_word=$2
18991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18992 $as_echo_n "checking for $ac_word... " >&6; }
18993 if ${ac_cv_prog_CC+:} false; then :
18994   $as_echo_n "(cached) " >&6
18995 else
18996   if test -n "$CC"; then
18997   ac_cv_prog_CC="$CC" # Let the user override the test.
18998 else
18999 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19000 for as_dir in $PATH
19001 do
19002   IFS=$as_save_IFS
19003   test -z "$as_dir" && as_dir=.
19004     for ac_exec_ext in '' $ac_executable_extensions; do
19005   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19006     ac_cv_prog_CC="$ac_prog"
19007     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19008     break 2
19009   fi
19010 done
19011   done
19012 IFS=$as_save_IFS
19013
19014 fi
19015 fi
19016 CC=$ac_cv_prog_CC
19017 if test -n "$CC"; then
19018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19019 $as_echo "$CC" >&6; }
19020 else
19021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19022 $as_echo "no" >&6; }
19023 fi
19024
19025
19026   test -n "$CC" && break
19027 done
19028
19029
19030                 if test "$CC" = cc ; then
19031                                                 if test $ol_with_threads != auto ; then
19032                                 as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
19033                         else
19034                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
19035 $as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
19036                         fi
19037                         ol_with_threads=no
19038                 fi
19039         fi
19040
19041         case ${CC} in cc_r | xlc_r)
19042                 ol_with_threads=posix
19043                 ol_cv_pthread_create=yes
19044                 ;;
19045         esac
19046 fi
19047
19048 ol_link_threads=no
19049 # OpenLDAP --with-yielding_select
19050
19051 # Check whether --with-yielding_select was given.
19052 if test "${with_yielding_select+set}" = set; then :
19053   withval=$with_yielding_select;
19054         ol_arg=invalid
19055         for ol_val in auto yes no manual  ; do
19056                 if test "$withval" = "$ol_val" ; then
19057                         ol_arg="$ol_val"
19058                 fi
19059         done
19060         if test "$ol_arg" = "invalid" ; then
19061                 as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
19062         fi
19063         ol_with_yielding_select="$ol_arg"
19064
19065 else
19066         ol_with_yielding_select="auto"
19067 fi
19068 # end --with-yielding_select
19069
19070
19071 case $ol_with_threads in auto | yes | nt)
19072
19073
19074         ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
19075 if test "x$ac_cv_func__beginthread" = xyes; then :
19076
19077 fi
19078
19079
19080         if test $ac_cv_func__beginthread = yes ; then
19081
19082 $as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
19083
19084                 ol_cv_nt_threads=yes
19085         fi
19086
19087
19088         if test "$ol_cv_nt_threads" = yes ; then
19089                 ol_link_threads=nt
19090                 ol_with_threads=found
19091                 ol_with_yielding_select=yes
19092
19093
19094 $as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
19095
19096
19097 $as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
19098
19099         fi
19100
19101         if test $ol_with_threads = nt ; then
19102                 as_fn_error $? "could not locate NT Threads" "$LINENO" 5
19103         fi
19104         ;;
19105 esac
19106
19107 case $ol_with_threads in auto | yes | posix)
19108
19109         for ac_header in pthread.h
19110 do :
19111   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
19112 if test "x$ac_cv_header_pthread_h" = xyes; then :
19113   cat >>confdefs.h <<_ACEOF
19114 #define HAVE_PTHREAD_H 1
19115 _ACEOF
19116
19117 fi
19118
19119 done
19120
19121
19122         if test $ac_cv_header_pthread_h = yes ; then
19123                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
19124 $as_echo_n "checking POSIX thread version... " >&6; }
19125 if ${ol_cv_pthread_version+:} false; then :
19126   $as_echo_n "(cached) " >&6
19127 else
19128
19129         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19130 /* end confdefs.h.  */
19131
19132 #               include <pthread.h>
19133
19134 int
19135 main ()
19136 {
19137
19138                 int i = PTHREAD_CREATE_JOINABLE;
19139
19140   ;
19141   return 0;
19142 }
19143 _ACEOF
19144 if ac_fn_c_try_compile "$LINENO"; then :
19145
19146         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19147 /* end confdefs.h.  */
19148 #include <pthread.h>
19149
19150 _ACEOF
19151 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19152   $EGREP "pthread_detach" >/dev/null 2>&1; then :
19153   ol_cv_pthread_version=10
19154 else
19155   ol_cv_pthread_version=8
19156 fi
19157 rm -f conftest*
19158
19159 else
19160
19161         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19162 /* end confdefs.h.  */
19163
19164 #               include <pthread.h>
19165 #               ifdef PTHREAD_CREATE_UNDETACHED
19166                 draft7
19167 #               endif
19168
19169 _ACEOF
19170 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19171   $EGREP "draft7" >/dev/null 2>&1; then :
19172   ol_cv_pthread_version=7
19173 else
19174
19175         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19176 /* end confdefs.h.  */
19177 #include <pthread.h>
19178
19179 _ACEOF
19180 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19181   $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
19182   ol_cv_pthread_version=6
19183 else
19184
19185         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19186 /* end confdefs.h.  */
19187
19188 #               include <pthread.h>
19189 #ifdef          PTHREAD_MUTEX_INITIALIZER
19190                 draft5
19191 #endif
19192
19193 _ACEOF
19194 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19195   $EGREP "draft5" >/dev/null 2>&1; then :
19196   ol_cv_pthread_version=5
19197 else
19198   ol_cv_pthread_version=4
19199 fi
19200 rm -f conftest*
19201
19202 fi
19203 rm -f conftest*
19204
19205 fi
19206 rm -f conftest*
19207
19208 fi
19209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19210
19211 fi
19212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
19213 $as_echo "$ol_cv_pthread_version" >&6; }
19214
19215
19216                 if test $ol_cv_pthread_version != 0 ; then
19217
19218 cat >>confdefs.h <<_ACEOF
19219 #define HAVE_PTHREADS $ol_cv_pthread_version
19220 _ACEOF
19221
19222                 else
19223                         as_fn_error $? "unknown pthread version" "$LINENO" 5
19224                 fi
19225
19226                 # consider threads found
19227                 ol_with_threads=found
19228
19229
19230         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
19231 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
19232 if ${ol_cv_header_linux_threads+:} false; then :
19233   $as_echo_n "(cached) " >&6
19234 else
19235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19236 /* end confdefs.h.  */
19237 #include <pthread.h>
19238 _ACEOF
19239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19240   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
19241   ol_cv_header_linux_threads=yes
19242 else
19243   ol_cv_header_linux_threads=no
19244 fi
19245 rm -f conftest*
19246
19247
19248 fi
19249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
19250 $as_echo "$ol_cv_header_linux_threads" >&6; }
19251         if test $ol_cv_header_linux_threads = yes; then
19252
19253 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
19254
19255         fi
19256
19257
19258         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
19259 $as_echo_n "checking for GNU Pth pthread.h... " >&6; }
19260 if ${ol_cv_header_gnu_pth_pthread_h+:} false; then :
19261   $as_echo_n "(cached) " >&6
19262 else
19263   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19264 /* end confdefs.h.  */
19265 #include <pthread.h>
19266 #ifdef _POSIX_THREAD_IS_GNU_PTH
19267         __gnu_pth__;
19268 #endif
19269
19270 _ACEOF
19271 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19272   $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
19273   ol_cv_header_gnu_pth_pthread_h=yes
19274 else
19275   ol_cv_header_gnu_pth_pthread_h=no
19276 fi
19277 rm -f conftest*
19278
19279
19280 fi
19281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
19282 $as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
19283
19284
19285                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
19286                         for ac_header in sched.h
19287 do :
19288   ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
19289 if test "x$ac_cv_header_sched_h" = xyes; then :
19290   cat >>confdefs.h <<_ACEOF
19291 #define HAVE_SCHED_H 1
19292 _ACEOF
19293
19294 fi
19295
19296 done
19297
19298                 fi
19299
19300
19301                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
19302 $as_echo_n "checking for pthread_create in default libraries... " >&6; }
19303 if ${ol_cv_pthread_create+:} false; then :
19304   $as_echo_n "(cached) " >&6
19305 else
19306
19307                         if test "$cross_compiling" = yes; then :
19308   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19309 /* end confdefs.h.  */
19310
19311 /* pthread test headers */
19312 #include <pthread.h>
19313 #if HAVE_PTHREADS < 7
19314 #include <errno.h>
19315 #endif
19316 #ifndef NULL
19317 #define NULL (void*)0
19318 #endif
19319
19320 static void *task(p)
19321         void *p;
19322 {
19323         return (void *) (p == NULL);
19324 }
19325
19326 int
19327 main ()
19328 {
19329
19330         /* pthread test function */
19331 #ifndef PTHREAD_CREATE_DETACHED
19332 #define PTHREAD_CREATE_DETACHED 1
19333 #endif
19334         pthread_t t;
19335         int status;
19336         int detach = PTHREAD_CREATE_DETACHED;
19337
19338 #if HAVE_PTHREADS > 4
19339         /* Final pthreads */
19340         pthread_attr_t attr;
19341
19342         status = pthread_attr_init(&attr);
19343         if( status ) return status;
19344
19345 #if HAVE_PTHREADS < 7
19346         status = pthread_attr_setdetachstate(&attr, &detach);
19347         if( status < 0 ) status = errno;
19348 #else
19349         status = pthread_attr_setdetachstate(&attr, detach);
19350 #endif
19351         if( status ) return status;
19352         status = pthread_create( &t, &attr, task, NULL );
19353 #if HAVE_PTHREADS < 7
19354         if( status < 0 ) status = errno;
19355 #endif
19356         if( status ) return status;
19357 #else
19358         /* Draft 4 pthreads */
19359         status = pthread_create( &t, pthread_attr_default, task, NULL );
19360         if( status ) return errno;
19361
19362         /* give thread a chance to complete */
19363         /* it should remain joinable and hence detachable */
19364         sleep( 1 );
19365
19366         status = pthread_detach( &t );
19367         if( status ) return errno;
19368 #endif
19369
19370 #ifdef HAVE_LINUX_THREADS
19371         pthread_kill_other_threads_np();
19372 #endif
19373
19374         return 0;
19375
19376   ;
19377   return 0;
19378 }
19379 _ACEOF
19380 if ac_fn_c_try_link "$LINENO"; then :
19381   ol_cv_pthread_create=yes
19382 else
19383   ol_cv_pthread_create=no
19384 fi
19385 rm -f core conftest.err conftest.$ac_objext \
19386     conftest$ac_exeext conftest.$ac_ext
19387 else
19388   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19389 /* end confdefs.h.  */
19390
19391
19392 /* pthread test headers */
19393 #include <pthread.h>
19394 #if HAVE_PTHREADS < 7
19395 #include <errno.h>
19396 #endif
19397 #ifndef NULL
19398 #define NULL (void*)0
19399 #endif
19400
19401 static void *task(p)
19402         void *p;
19403 {
19404         return (void *) (p == NULL);
19405 }
19406
19407
19408 int main(argc, argv)
19409         int argc;
19410         char **argv;
19411 {
19412
19413         /* pthread test function */
19414 #ifndef PTHREAD_CREATE_DETACHED
19415 #define PTHREAD_CREATE_DETACHED 1
19416 #endif
19417         pthread_t t;
19418         int status;
19419         int detach = PTHREAD_CREATE_DETACHED;
19420
19421 #if HAVE_PTHREADS > 4
19422         /* Final pthreads */
19423         pthread_attr_t attr;
19424
19425         status = pthread_attr_init(&attr);
19426         if( status ) return status;
19427
19428 #if HAVE_PTHREADS < 7
19429         status = pthread_attr_setdetachstate(&attr, &detach);
19430         if( status < 0 ) status = errno;
19431 #else
19432         status = pthread_attr_setdetachstate(&attr, detach);
19433 #endif
19434         if( status ) return status;
19435         status = pthread_create( &t, &attr, task, NULL );
19436 #if HAVE_PTHREADS < 7
19437         if( status < 0 ) status = errno;
19438 #endif
19439         if( status ) return status;
19440 #else
19441         /* Draft 4 pthreads */
19442         status = pthread_create( &t, pthread_attr_default, task, NULL );
19443         if( status ) return errno;
19444
19445         /* give thread a chance to complete */
19446         /* it should remain joinable and hence detachable */
19447         sleep( 1 );
19448
19449         status = pthread_detach( &t );
19450         if( status ) return errno;
19451 #endif
19452
19453 #ifdef HAVE_LINUX_THREADS
19454         pthread_kill_other_threads_np();
19455 #endif
19456
19457         return 0;
19458
19459 }
19460
19461 _ACEOF
19462 if ac_fn_c_try_run "$LINENO"; then :
19463   ol_cv_pthread_create=yes
19464 else
19465   ol_cv_pthread_create=no
19466 fi
19467 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19468   conftest.$ac_objext conftest.beam conftest.$ac_ext
19469 fi
19470
19471 fi
19472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
19473 $as_echo "$ol_cv_pthread_create" >&6; }
19474
19475                 if test $ol_cv_pthread_create != no ; then
19476                         ol_link_threads=posix
19477                         ol_link_pthreads=""
19478                 fi
19479
19480                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
19481 if test "$ol_link_threads" = no ; then
19482         # try -kthread
19483         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
19484 $as_echo_n "checking for pthread link with -kthread... " >&6; }
19485 if ${ol_cv_pthread_kthread+:} false; then :
19486   $as_echo_n "(cached) " >&6
19487 else
19488
19489                 # save the flags
19490                 ol_LIBS="$LIBS"
19491                 LIBS="-kthread $LIBS"
19492
19493                 if test "$cross_compiling" = yes; then :
19494   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19495 /* end confdefs.h.  */
19496
19497 /* pthread test headers */
19498 #include <pthread.h>
19499 #if HAVE_PTHREADS < 7
19500 #include <errno.h>
19501 #endif
19502 #ifndef NULL
19503 #define NULL (void*)0
19504 #endif
19505
19506 static void *task(p)
19507         void *p;
19508 {
19509         return (void *) (p == NULL);
19510 }
19511
19512 int
19513 main ()
19514 {
19515
19516         /* pthread test function */
19517 #ifndef PTHREAD_CREATE_DETACHED
19518 #define PTHREAD_CREATE_DETACHED 1
19519 #endif
19520         pthread_t t;
19521         int status;
19522         int detach = PTHREAD_CREATE_DETACHED;
19523
19524 #if HAVE_PTHREADS > 4
19525         /* Final pthreads */
19526         pthread_attr_t attr;
19527
19528         status = pthread_attr_init(&attr);
19529         if( status ) return status;
19530
19531 #if HAVE_PTHREADS < 7
19532         status = pthread_attr_setdetachstate(&attr, &detach);
19533         if( status < 0 ) status = errno;
19534 #else
19535         status = pthread_attr_setdetachstate(&attr, detach);
19536 #endif
19537         if( status ) return status;
19538         status = pthread_create( &t, &attr, task, NULL );
19539 #if HAVE_PTHREADS < 7
19540         if( status < 0 ) status = errno;
19541 #endif
19542         if( status ) return status;
19543 #else
19544         /* Draft 4 pthreads */
19545         status = pthread_create( &t, pthread_attr_default, task, NULL );
19546         if( status ) return errno;
19547
19548         /* give thread a chance to complete */
19549         /* it should remain joinable and hence detachable */
19550         sleep( 1 );
19551
19552         status = pthread_detach( &t );
19553         if( status ) return errno;
19554 #endif
19555
19556 #ifdef HAVE_LINUX_THREADS
19557         pthread_kill_other_threads_np();
19558 #endif
19559
19560         return 0;
19561
19562   ;
19563   return 0;
19564 }
19565 _ACEOF
19566 if ac_fn_c_try_link "$LINENO"; then :
19567   ol_cv_pthread_kthread=yes
19568 else
19569   ol_cv_pthread_kthread=no
19570 fi
19571 rm -f core conftest.err conftest.$ac_objext \
19572     conftest$ac_exeext conftest.$ac_ext
19573 else
19574   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19575 /* end confdefs.h.  */
19576
19577
19578 /* pthread test headers */
19579 #include <pthread.h>
19580 #if HAVE_PTHREADS < 7
19581 #include <errno.h>
19582 #endif
19583 #ifndef NULL
19584 #define NULL (void*)0
19585 #endif
19586
19587 static void *task(p)
19588         void *p;
19589 {
19590         return (void *) (p == NULL);
19591 }
19592
19593
19594 int main(argc, argv)
19595         int argc;
19596         char **argv;
19597 {
19598
19599         /* pthread test function */
19600 #ifndef PTHREAD_CREATE_DETACHED
19601 #define PTHREAD_CREATE_DETACHED 1
19602 #endif
19603         pthread_t t;
19604         int status;
19605         int detach = PTHREAD_CREATE_DETACHED;
19606
19607 #if HAVE_PTHREADS > 4
19608         /* Final pthreads */
19609         pthread_attr_t attr;
19610
19611         status = pthread_attr_init(&attr);
19612         if( status ) return status;
19613
19614 #if HAVE_PTHREADS < 7
19615         status = pthread_attr_setdetachstate(&attr, &detach);
19616         if( status < 0 ) status = errno;
19617 #else
19618         status = pthread_attr_setdetachstate(&attr, detach);
19619 #endif
19620         if( status ) return status;
19621         status = pthread_create( &t, &attr, task, NULL );
19622 #if HAVE_PTHREADS < 7
19623         if( status < 0 ) status = errno;
19624 #endif
19625         if( status ) return status;
19626 #else
19627         /* Draft 4 pthreads */
19628         status = pthread_create( &t, pthread_attr_default, task, NULL );
19629         if( status ) return errno;
19630
19631         /* give thread a chance to complete */
19632         /* it should remain joinable and hence detachable */
19633         sleep( 1 );
19634
19635         status = pthread_detach( &t );
19636         if( status ) return errno;
19637 #endif
19638
19639 #ifdef HAVE_LINUX_THREADS
19640         pthread_kill_other_threads_np();
19641 #endif
19642
19643         return 0;
19644
19645 }
19646
19647 _ACEOF
19648 if ac_fn_c_try_run "$LINENO"; then :
19649   ol_cv_pthread_kthread=yes
19650 else
19651   ol_cv_pthread_kthread=no
19652 fi
19653 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19654   conftest.$ac_objext conftest.beam conftest.$ac_ext
19655 fi
19656
19657
19658                 # restore the LIBS
19659                 LIBS="$ol_LIBS"
19660
19661 fi
19662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
19663 $as_echo "$ol_cv_pthread_kthread" >&6; }
19664
19665         if test $ol_cv_pthread_kthread = yes ; then
19666                 ol_link_pthreads="-kthread"
19667                 ol_link_threads=posix
19668         fi
19669 fi
19670
19671                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
19672 if test "$ol_link_threads" = no ; then
19673         # try -pthread
19674         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
19675 $as_echo_n "checking for pthread link with -pthread... " >&6; }
19676 if ${ol_cv_pthread_pthread+:} false; then :
19677   $as_echo_n "(cached) " >&6
19678 else
19679
19680                 # save the flags
19681                 ol_LIBS="$LIBS"
19682                 LIBS="-pthread $LIBS"
19683
19684                 if test "$cross_compiling" = yes; then :
19685   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19686 /* end confdefs.h.  */
19687
19688 /* pthread test headers */
19689 #include <pthread.h>
19690 #if HAVE_PTHREADS < 7
19691 #include <errno.h>
19692 #endif
19693 #ifndef NULL
19694 #define NULL (void*)0
19695 #endif
19696
19697 static void *task(p)
19698         void *p;
19699 {
19700         return (void *) (p == NULL);
19701 }
19702
19703 int
19704 main ()
19705 {
19706
19707         /* pthread test function */
19708 #ifndef PTHREAD_CREATE_DETACHED
19709 #define PTHREAD_CREATE_DETACHED 1
19710 #endif
19711         pthread_t t;
19712         int status;
19713         int detach = PTHREAD_CREATE_DETACHED;
19714
19715 #if HAVE_PTHREADS > 4
19716         /* Final pthreads */
19717         pthread_attr_t attr;
19718
19719         status = pthread_attr_init(&attr);
19720         if( status ) return status;
19721
19722 #if HAVE_PTHREADS < 7
19723         status = pthread_attr_setdetachstate(&attr, &detach);
19724         if( status < 0 ) status = errno;
19725 #else
19726         status = pthread_attr_setdetachstate(&attr, detach);
19727 #endif
19728         if( status ) return status;
19729         status = pthread_create( &t, &attr, task, NULL );
19730 #if HAVE_PTHREADS < 7
19731         if( status < 0 ) status = errno;
19732 #endif
19733         if( status ) return status;
19734 #else
19735         /* Draft 4 pthreads */
19736         status = pthread_create( &t, pthread_attr_default, task, NULL );
19737         if( status ) return errno;
19738
19739         /* give thread a chance to complete */
19740         /* it should remain joinable and hence detachable */
19741         sleep( 1 );
19742
19743         status = pthread_detach( &t );
19744         if( status ) return errno;
19745 #endif
19746
19747 #ifdef HAVE_LINUX_THREADS
19748         pthread_kill_other_threads_np();
19749 #endif
19750
19751         return 0;
19752
19753   ;
19754   return 0;
19755 }
19756 _ACEOF
19757 if ac_fn_c_try_link "$LINENO"; then :
19758   ol_cv_pthread_pthread=yes
19759 else
19760   ol_cv_pthread_pthread=no
19761 fi
19762 rm -f core conftest.err conftest.$ac_objext \
19763     conftest$ac_exeext conftest.$ac_ext
19764 else
19765   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19766 /* end confdefs.h.  */
19767
19768
19769 /* pthread test headers */
19770 #include <pthread.h>
19771 #if HAVE_PTHREADS < 7
19772 #include <errno.h>
19773 #endif
19774 #ifndef NULL
19775 #define NULL (void*)0
19776 #endif
19777
19778 static void *task(p)
19779         void *p;
19780 {
19781         return (void *) (p == NULL);
19782 }
19783
19784
19785 int main(argc, argv)
19786         int argc;
19787         char **argv;
19788 {
19789
19790         /* pthread test function */
19791 #ifndef PTHREAD_CREATE_DETACHED
19792 #define PTHREAD_CREATE_DETACHED 1
19793 #endif
19794         pthread_t t;
19795         int status;
19796         int detach = PTHREAD_CREATE_DETACHED;
19797
19798 #if HAVE_PTHREADS > 4
19799         /* Final pthreads */
19800         pthread_attr_t attr;
19801
19802         status = pthread_attr_init(&attr);
19803         if( status ) return status;
19804
19805 #if HAVE_PTHREADS < 7
19806         status = pthread_attr_setdetachstate(&attr, &detach);
19807         if( status < 0 ) status = errno;
19808 #else
19809         status = pthread_attr_setdetachstate(&attr, detach);
19810 #endif
19811         if( status ) return status;
19812         status = pthread_create( &t, &attr, task, NULL );
19813 #if HAVE_PTHREADS < 7
19814         if( status < 0 ) status = errno;
19815 #endif
19816         if( status ) return status;
19817 #else
19818         /* Draft 4 pthreads */
19819         status = pthread_create( &t, pthread_attr_default, task, NULL );
19820         if( status ) return errno;
19821
19822         /* give thread a chance to complete */
19823         /* it should remain joinable and hence detachable */
19824         sleep( 1 );
19825
19826         status = pthread_detach( &t );
19827         if( status ) return errno;
19828 #endif
19829
19830 #ifdef HAVE_LINUX_THREADS
19831         pthread_kill_other_threads_np();
19832 #endif
19833
19834         return 0;
19835
19836 }
19837
19838 _ACEOF
19839 if ac_fn_c_try_run "$LINENO"; then :
19840   ol_cv_pthread_pthread=yes
19841 else
19842   ol_cv_pthread_pthread=no
19843 fi
19844 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19845   conftest.$ac_objext conftest.beam conftest.$ac_ext
19846 fi
19847
19848
19849                 # restore the LIBS
19850                 LIBS="$ol_LIBS"
19851
19852 fi
19853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
19854 $as_echo "$ol_cv_pthread_pthread" >&6; }
19855
19856         if test $ol_cv_pthread_pthread = yes ; then
19857                 ol_link_pthreads="-pthread"
19858                 ol_link_threads=posix
19859         fi
19860 fi
19861
19862                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
19863 if test "$ol_link_threads" = no ; then
19864         # try -pthreads
19865         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
19866 $as_echo_n "checking for pthread link with -pthreads... " >&6; }
19867 if ${ol_cv_pthread_pthreads+:} false; then :
19868   $as_echo_n "(cached) " >&6
19869 else
19870
19871                 # save the flags
19872                 ol_LIBS="$LIBS"
19873                 LIBS="-pthreads $LIBS"
19874
19875                 if test "$cross_compiling" = yes; then :
19876   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19877 /* end confdefs.h.  */
19878
19879 /* pthread test headers */
19880 #include <pthread.h>
19881 #if HAVE_PTHREADS < 7
19882 #include <errno.h>
19883 #endif
19884 #ifndef NULL
19885 #define NULL (void*)0
19886 #endif
19887
19888 static void *task(p)
19889         void *p;
19890 {
19891         return (void *) (p == NULL);
19892 }
19893
19894 int
19895 main ()
19896 {
19897
19898         /* pthread test function */
19899 #ifndef PTHREAD_CREATE_DETACHED
19900 #define PTHREAD_CREATE_DETACHED 1
19901 #endif
19902         pthread_t t;
19903         int status;
19904         int detach = PTHREAD_CREATE_DETACHED;
19905
19906 #if HAVE_PTHREADS > 4
19907         /* Final pthreads */
19908         pthread_attr_t attr;
19909
19910         status = pthread_attr_init(&attr);
19911         if( status ) return status;
19912
19913 #if HAVE_PTHREADS < 7
19914         status = pthread_attr_setdetachstate(&attr, &detach);
19915         if( status < 0 ) status = errno;
19916 #else
19917         status = pthread_attr_setdetachstate(&attr, detach);
19918 #endif
19919         if( status ) return status;
19920         status = pthread_create( &t, &attr, task, NULL );
19921 #if HAVE_PTHREADS < 7
19922         if( status < 0 ) status = errno;
19923 #endif
19924         if( status ) return status;
19925 #else
19926         /* Draft 4 pthreads */
19927         status = pthread_create( &t, pthread_attr_default, task, NULL );
19928         if( status ) return errno;
19929
19930         /* give thread a chance to complete */
19931         /* it should remain joinable and hence detachable */
19932         sleep( 1 );
19933
19934         status = pthread_detach( &t );
19935         if( status ) return errno;
19936 #endif
19937
19938 #ifdef HAVE_LINUX_THREADS
19939         pthread_kill_other_threads_np();
19940 #endif
19941
19942         return 0;
19943
19944   ;
19945   return 0;
19946 }
19947 _ACEOF
19948 if ac_fn_c_try_link "$LINENO"; then :
19949   ol_cv_pthread_pthreads=yes
19950 else
19951   ol_cv_pthread_pthreads=no
19952 fi
19953 rm -f core conftest.err conftest.$ac_objext \
19954     conftest$ac_exeext conftest.$ac_ext
19955 else
19956   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19957 /* end confdefs.h.  */
19958
19959
19960 /* pthread test headers */
19961 #include <pthread.h>
19962 #if HAVE_PTHREADS < 7
19963 #include <errno.h>
19964 #endif
19965 #ifndef NULL
19966 #define NULL (void*)0
19967 #endif
19968
19969 static void *task(p)
19970         void *p;
19971 {
19972         return (void *) (p == NULL);
19973 }
19974
19975
19976 int main(argc, argv)
19977         int argc;
19978         char **argv;
19979 {
19980
19981         /* pthread test function */
19982 #ifndef PTHREAD_CREATE_DETACHED
19983 #define PTHREAD_CREATE_DETACHED 1
19984 #endif
19985         pthread_t t;
19986         int status;
19987         int detach = PTHREAD_CREATE_DETACHED;
19988
19989 #if HAVE_PTHREADS > 4
19990         /* Final pthreads */
19991         pthread_attr_t attr;
19992
19993         status = pthread_attr_init(&attr);
19994         if( status ) return status;
19995
19996 #if HAVE_PTHREADS < 7
19997         status = pthread_attr_setdetachstate(&attr, &detach);
19998         if( status < 0 ) status = errno;
19999 #else
20000         status = pthread_attr_setdetachstate(&attr, detach);
20001 #endif
20002         if( status ) return status;
20003         status = pthread_create( &t, &attr, task, NULL );
20004 #if HAVE_PTHREADS < 7
20005         if( status < 0 ) status = errno;
20006 #endif
20007         if( status ) return status;
20008 #else
20009         /* Draft 4 pthreads */
20010         status = pthread_create( &t, pthread_attr_default, task, NULL );
20011         if( status ) return errno;
20012
20013         /* give thread a chance to complete */
20014         /* it should remain joinable and hence detachable */
20015         sleep( 1 );
20016
20017         status = pthread_detach( &t );
20018         if( status ) return errno;
20019 #endif
20020
20021 #ifdef HAVE_LINUX_THREADS
20022         pthread_kill_other_threads_np();
20023 #endif
20024
20025         return 0;
20026
20027 }
20028
20029 _ACEOF
20030 if ac_fn_c_try_run "$LINENO"; then :
20031   ol_cv_pthread_pthreads=yes
20032 else
20033   ol_cv_pthread_pthreads=no
20034 fi
20035 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20036   conftest.$ac_objext conftest.beam conftest.$ac_ext
20037 fi
20038
20039
20040                 # restore the LIBS
20041                 LIBS="$ol_LIBS"
20042
20043 fi
20044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
20045 $as_echo "$ol_cv_pthread_pthreads" >&6; }
20046
20047         if test $ol_cv_pthread_pthreads = yes ; then
20048                 ol_link_pthreads="-pthreads"
20049                 ol_link_threads=posix
20050         fi
20051 fi
20052
20053                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
20054 if test "$ol_link_threads" = no ; then
20055         # try -mthreads
20056         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
20057 $as_echo_n "checking for pthread link with -mthreads... " >&6; }
20058 if ${ol_cv_pthread_mthreads+:} false; then :
20059   $as_echo_n "(cached) " >&6
20060 else
20061
20062                 # save the flags
20063                 ol_LIBS="$LIBS"
20064                 LIBS="-mthreads $LIBS"
20065
20066                 if test "$cross_compiling" = yes; then :
20067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20068 /* end confdefs.h.  */
20069
20070 /* pthread test headers */
20071 #include <pthread.h>
20072 #if HAVE_PTHREADS < 7
20073 #include <errno.h>
20074 #endif
20075 #ifndef NULL
20076 #define NULL (void*)0
20077 #endif
20078
20079 static void *task(p)
20080         void *p;
20081 {
20082         return (void *) (p == NULL);
20083 }
20084
20085 int
20086 main ()
20087 {
20088
20089         /* pthread test function */
20090 #ifndef PTHREAD_CREATE_DETACHED
20091 #define PTHREAD_CREATE_DETACHED 1
20092 #endif
20093         pthread_t t;
20094         int status;
20095         int detach = PTHREAD_CREATE_DETACHED;
20096
20097 #if HAVE_PTHREADS > 4
20098         /* Final pthreads */
20099         pthread_attr_t attr;
20100
20101         status = pthread_attr_init(&attr);
20102         if( status ) return status;
20103
20104 #if HAVE_PTHREADS < 7
20105         status = pthread_attr_setdetachstate(&attr, &detach);
20106         if( status < 0 ) status = errno;
20107 #else
20108         status = pthread_attr_setdetachstate(&attr, detach);
20109 #endif
20110         if( status ) return status;
20111         status = pthread_create( &t, &attr, task, NULL );
20112 #if HAVE_PTHREADS < 7
20113         if( status < 0 ) status = errno;
20114 #endif
20115         if( status ) return status;
20116 #else
20117         /* Draft 4 pthreads */
20118         status = pthread_create( &t, pthread_attr_default, task, NULL );
20119         if( status ) return errno;
20120
20121         /* give thread a chance to complete */
20122         /* it should remain joinable and hence detachable */
20123         sleep( 1 );
20124
20125         status = pthread_detach( &t );
20126         if( status ) return errno;
20127 #endif
20128
20129 #ifdef HAVE_LINUX_THREADS
20130         pthread_kill_other_threads_np();
20131 #endif
20132
20133         return 0;
20134
20135   ;
20136   return 0;
20137 }
20138 _ACEOF
20139 if ac_fn_c_try_link "$LINENO"; then :
20140   ol_cv_pthread_mthreads=yes
20141 else
20142   ol_cv_pthread_mthreads=no
20143 fi
20144 rm -f core conftest.err conftest.$ac_objext \
20145     conftest$ac_exeext conftest.$ac_ext
20146 else
20147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20148 /* end confdefs.h.  */
20149
20150
20151 /* pthread test headers */
20152 #include <pthread.h>
20153 #if HAVE_PTHREADS < 7
20154 #include <errno.h>
20155 #endif
20156 #ifndef NULL
20157 #define NULL (void*)0
20158 #endif
20159
20160 static void *task(p)
20161         void *p;
20162 {
20163         return (void *) (p == NULL);
20164 }
20165
20166
20167 int main(argc, argv)
20168         int argc;
20169         char **argv;
20170 {
20171
20172         /* pthread test function */
20173 #ifndef PTHREAD_CREATE_DETACHED
20174 #define PTHREAD_CREATE_DETACHED 1
20175 #endif
20176         pthread_t t;
20177         int status;
20178         int detach = PTHREAD_CREATE_DETACHED;
20179
20180 #if HAVE_PTHREADS > 4
20181         /* Final pthreads */
20182         pthread_attr_t attr;
20183
20184         status = pthread_attr_init(&attr);
20185         if( status ) return status;
20186
20187 #if HAVE_PTHREADS < 7
20188         status = pthread_attr_setdetachstate(&attr, &detach);
20189         if( status < 0 ) status = errno;
20190 #else
20191         status = pthread_attr_setdetachstate(&attr, detach);
20192 #endif
20193         if( status ) return status;
20194         status = pthread_create( &t, &attr, task, NULL );
20195 #if HAVE_PTHREADS < 7
20196         if( status < 0 ) status = errno;
20197 #endif
20198         if( status ) return status;
20199 #else
20200         /* Draft 4 pthreads */
20201         status = pthread_create( &t, pthread_attr_default, task, NULL );
20202         if( status ) return errno;
20203
20204         /* give thread a chance to complete */
20205         /* it should remain joinable and hence detachable */
20206         sleep( 1 );
20207
20208         status = pthread_detach( &t );
20209         if( status ) return errno;
20210 #endif
20211
20212 #ifdef HAVE_LINUX_THREADS
20213         pthread_kill_other_threads_np();
20214 #endif
20215
20216         return 0;
20217
20218 }
20219
20220 _ACEOF
20221 if ac_fn_c_try_run "$LINENO"; then :
20222   ol_cv_pthread_mthreads=yes
20223 else
20224   ol_cv_pthread_mthreads=no
20225 fi
20226 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20227   conftest.$ac_objext conftest.beam conftest.$ac_ext
20228 fi
20229
20230
20231                 # restore the LIBS
20232                 LIBS="$ol_LIBS"
20233
20234 fi
20235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
20236 $as_echo "$ol_cv_pthread_mthreads" >&6; }
20237
20238         if test $ol_cv_pthread_mthreads = yes ; then
20239                 ol_link_pthreads="-mthreads"
20240                 ol_link_threads=posix
20241         fi
20242 fi
20243
20244                 # Pthread try link: -thread (ol_cv_pthread_thread)
20245 if test "$ol_link_threads" = no ; then
20246         # try -thread
20247         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
20248 $as_echo_n "checking for pthread link with -thread... " >&6; }
20249 if ${ol_cv_pthread_thread+:} false; then :
20250   $as_echo_n "(cached) " >&6
20251 else
20252
20253                 # save the flags
20254                 ol_LIBS="$LIBS"
20255                 LIBS="-thread $LIBS"
20256
20257                 if test "$cross_compiling" = yes; then :
20258   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20259 /* end confdefs.h.  */
20260
20261 /* pthread test headers */
20262 #include <pthread.h>
20263 #if HAVE_PTHREADS < 7
20264 #include <errno.h>
20265 #endif
20266 #ifndef NULL
20267 #define NULL (void*)0
20268 #endif
20269
20270 static void *task(p)
20271         void *p;
20272 {
20273         return (void *) (p == NULL);
20274 }
20275
20276 int
20277 main ()
20278 {
20279
20280         /* pthread test function */
20281 #ifndef PTHREAD_CREATE_DETACHED
20282 #define PTHREAD_CREATE_DETACHED 1
20283 #endif
20284         pthread_t t;
20285         int status;
20286         int detach = PTHREAD_CREATE_DETACHED;
20287
20288 #if HAVE_PTHREADS > 4
20289         /* Final pthreads */
20290         pthread_attr_t attr;
20291
20292         status = pthread_attr_init(&attr);
20293         if( status ) return status;
20294
20295 #if HAVE_PTHREADS < 7
20296         status = pthread_attr_setdetachstate(&attr, &detach);
20297         if( status < 0 ) status = errno;
20298 #else
20299         status = pthread_attr_setdetachstate(&attr, detach);
20300 #endif
20301         if( status ) return status;
20302         status = pthread_create( &t, &attr, task, NULL );
20303 #if HAVE_PTHREADS < 7
20304         if( status < 0 ) status = errno;
20305 #endif
20306         if( status ) return status;
20307 #else
20308         /* Draft 4 pthreads */
20309         status = pthread_create( &t, pthread_attr_default, task, NULL );
20310         if( status ) return errno;
20311
20312         /* give thread a chance to complete */
20313         /* it should remain joinable and hence detachable */
20314         sleep( 1 );
20315
20316         status = pthread_detach( &t );
20317         if( status ) return errno;
20318 #endif
20319
20320 #ifdef HAVE_LINUX_THREADS
20321         pthread_kill_other_threads_np();
20322 #endif
20323
20324         return 0;
20325
20326   ;
20327   return 0;
20328 }
20329 _ACEOF
20330 if ac_fn_c_try_link "$LINENO"; then :
20331   ol_cv_pthread_thread=yes
20332 else
20333   ol_cv_pthread_thread=no
20334 fi
20335 rm -f core conftest.err conftest.$ac_objext \
20336     conftest$ac_exeext conftest.$ac_ext
20337 else
20338   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20339 /* end confdefs.h.  */
20340
20341
20342 /* pthread test headers */
20343 #include <pthread.h>
20344 #if HAVE_PTHREADS < 7
20345 #include <errno.h>
20346 #endif
20347 #ifndef NULL
20348 #define NULL (void*)0
20349 #endif
20350
20351 static void *task(p)
20352         void *p;
20353 {
20354         return (void *) (p == NULL);
20355 }
20356
20357
20358 int main(argc, argv)
20359         int argc;
20360         char **argv;
20361 {
20362
20363         /* pthread test function */
20364 #ifndef PTHREAD_CREATE_DETACHED
20365 #define PTHREAD_CREATE_DETACHED 1
20366 #endif
20367         pthread_t t;
20368         int status;
20369         int detach = PTHREAD_CREATE_DETACHED;
20370
20371 #if HAVE_PTHREADS > 4
20372         /* Final pthreads */
20373         pthread_attr_t attr;
20374
20375         status = pthread_attr_init(&attr);
20376         if( status ) return status;
20377
20378 #if HAVE_PTHREADS < 7
20379         status = pthread_attr_setdetachstate(&attr, &detach);
20380         if( status < 0 ) status = errno;
20381 #else
20382         status = pthread_attr_setdetachstate(&attr, detach);
20383 #endif
20384         if( status ) return status;
20385         status = pthread_create( &t, &attr, task, NULL );
20386 #if HAVE_PTHREADS < 7
20387         if( status < 0 ) status = errno;
20388 #endif
20389         if( status ) return status;
20390 #else
20391         /* Draft 4 pthreads */
20392         status = pthread_create( &t, pthread_attr_default, task, NULL );
20393         if( status ) return errno;
20394
20395         /* give thread a chance to complete */
20396         /* it should remain joinable and hence detachable */
20397         sleep( 1 );
20398
20399         status = pthread_detach( &t );
20400         if( status ) return errno;
20401 #endif
20402
20403 #ifdef HAVE_LINUX_THREADS
20404         pthread_kill_other_threads_np();
20405 #endif
20406
20407         return 0;
20408
20409 }
20410
20411 _ACEOF
20412 if ac_fn_c_try_run "$LINENO"; then :
20413   ol_cv_pthread_thread=yes
20414 else
20415   ol_cv_pthread_thread=no
20416 fi
20417 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20418   conftest.$ac_objext conftest.beam conftest.$ac_ext
20419 fi
20420
20421
20422                 # restore the LIBS
20423                 LIBS="$ol_LIBS"
20424
20425 fi
20426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
20427 $as_echo "$ol_cv_pthread_thread" >&6; }
20428
20429         if test $ol_cv_pthread_thread = yes ; then
20430                 ol_link_pthreads="-thread"
20431                 ol_link_threads=posix
20432         fi
20433 fi
20434
20435
20436                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
20437 if test "$ol_link_threads" = no ; then
20438         # try -lpthread -lmach -lexc -lc_r
20439         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
20440 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
20441 if ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+:} false; then :
20442   $as_echo_n "(cached) " >&6
20443 else
20444
20445                 # save the flags
20446                 ol_LIBS="$LIBS"
20447                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
20448
20449                 if test "$cross_compiling" = yes; then :
20450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20451 /* end confdefs.h.  */
20452
20453 /* pthread test headers */
20454 #include <pthread.h>
20455 #if HAVE_PTHREADS < 7
20456 #include <errno.h>
20457 #endif
20458 #ifndef NULL
20459 #define NULL (void*)0
20460 #endif
20461
20462 static void *task(p)
20463         void *p;
20464 {
20465         return (void *) (p == NULL);
20466 }
20467
20468 int
20469 main ()
20470 {
20471
20472         /* pthread test function */
20473 #ifndef PTHREAD_CREATE_DETACHED
20474 #define PTHREAD_CREATE_DETACHED 1
20475 #endif
20476         pthread_t t;
20477         int status;
20478         int detach = PTHREAD_CREATE_DETACHED;
20479
20480 #if HAVE_PTHREADS > 4
20481         /* Final pthreads */
20482         pthread_attr_t attr;
20483
20484         status = pthread_attr_init(&attr);
20485         if( status ) return status;
20486
20487 #if HAVE_PTHREADS < 7
20488         status = pthread_attr_setdetachstate(&attr, &detach);
20489         if( status < 0 ) status = errno;
20490 #else
20491         status = pthread_attr_setdetachstate(&attr, detach);
20492 #endif
20493         if( status ) return status;
20494         status = pthread_create( &t, &attr, task, NULL );
20495 #if HAVE_PTHREADS < 7
20496         if( status < 0 ) status = errno;
20497 #endif
20498         if( status ) return status;
20499 #else
20500         /* Draft 4 pthreads */
20501         status = pthread_create( &t, pthread_attr_default, task, NULL );
20502         if( status ) return errno;
20503
20504         /* give thread a chance to complete */
20505         /* it should remain joinable and hence detachable */
20506         sleep( 1 );
20507
20508         status = pthread_detach( &t );
20509         if( status ) return errno;
20510 #endif
20511
20512 #ifdef HAVE_LINUX_THREADS
20513         pthread_kill_other_threads_np();
20514 #endif
20515
20516         return 0;
20517
20518   ;
20519   return 0;
20520 }
20521 _ACEOF
20522 if ac_fn_c_try_link "$LINENO"; then :
20523   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
20524 else
20525   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
20526 fi
20527 rm -f core conftest.err conftest.$ac_objext \
20528     conftest$ac_exeext conftest.$ac_ext
20529 else
20530   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20531 /* end confdefs.h.  */
20532
20533
20534 /* pthread test headers */
20535 #include <pthread.h>
20536 #if HAVE_PTHREADS < 7
20537 #include <errno.h>
20538 #endif
20539 #ifndef NULL
20540 #define NULL (void*)0
20541 #endif
20542
20543 static void *task(p)
20544         void *p;
20545 {
20546         return (void *) (p == NULL);
20547 }
20548
20549
20550 int main(argc, argv)
20551         int argc;
20552         char **argv;
20553 {
20554
20555         /* pthread test function */
20556 #ifndef PTHREAD_CREATE_DETACHED
20557 #define PTHREAD_CREATE_DETACHED 1
20558 #endif
20559         pthread_t t;
20560         int status;
20561         int detach = PTHREAD_CREATE_DETACHED;
20562
20563 #if HAVE_PTHREADS > 4
20564         /* Final pthreads */
20565         pthread_attr_t attr;
20566
20567         status = pthread_attr_init(&attr);
20568         if( status ) return status;
20569
20570 #if HAVE_PTHREADS < 7
20571         status = pthread_attr_setdetachstate(&attr, &detach);
20572         if( status < 0 ) status = errno;
20573 #else
20574         status = pthread_attr_setdetachstate(&attr, detach);
20575 #endif
20576         if( status ) return status;
20577         status = pthread_create( &t, &attr, task, NULL );
20578 #if HAVE_PTHREADS < 7
20579         if( status < 0 ) status = errno;
20580 #endif
20581         if( status ) return status;
20582 #else
20583         /* Draft 4 pthreads */
20584         status = pthread_create( &t, pthread_attr_default, task, NULL );
20585         if( status ) return errno;
20586
20587         /* give thread a chance to complete */
20588         /* it should remain joinable and hence detachable */
20589         sleep( 1 );
20590
20591         status = pthread_detach( &t );
20592         if( status ) return errno;
20593 #endif
20594
20595 #ifdef HAVE_LINUX_THREADS
20596         pthread_kill_other_threads_np();
20597 #endif
20598
20599         return 0;
20600
20601 }
20602
20603 _ACEOF
20604 if ac_fn_c_try_run "$LINENO"; then :
20605   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
20606 else
20607   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
20608 fi
20609 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20610   conftest.$ac_objext conftest.beam conftest.$ac_ext
20611 fi
20612
20613
20614                 # restore the LIBS
20615                 LIBS="$ol_LIBS"
20616
20617 fi
20618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
20619 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
20620
20621         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
20622                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
20623                 ol_link_threads=posix
20624         fi
20625 fi
20626
20627                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
20628 if test "$ol_link_threads" = no ; then
20629         # try -lpthread -lmach -lexc
20630         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
20631 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
20632 if ${ol_cv_pthread_lpthread_lmach_lexc+:} false; then :
20633   $as_echo_n "(cached) " >&6
20634 else
20635
20636                 # save the flags
20637                 ol_LIBS="$LIBS"
20638                 LIBS="-lpthread -lmach -lexc $LIBS"
20639
20640                 if test "$cross_compiling" = yes; then :
20641   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20642 /* end confdefs.h.  */
20643
20644 /* pthread test headers */
20645 #include <pthread.h>
20646 #if HAVE_PTHREADS < 7
20647 #include <errno.h>
20648 #endif
20649 #ifndef NULL
20650 #define NULL (void*)0
20651 #endif
20652
20653 static void *task(p)
20654         void *p;
20655 {
20656         return (void *) (p == NULL);
20657 }
20658
20659 int
20660 main ()
20661 {
20662
20663         /* pthread test function */
20664 #ifndef PTHREAD_CREATE_DETACHED
20665 #define PTHREAD_CREATE_DETACHED 1
20666 #endif
20667         pthread_t t;
20668         int status;
20669         int detach = PTHREAD_CREATE_DETACHED;
20670
20671 #if HAVE_PTHREADS > 4
20672         /* Final pthreads */
20673         pthread_attr_t attr;
20674
20675         status = pthread_attr_init(&attr);
20676         if( status ) return status;
20677
20678 #if HAVE_PTHREADS < 7
20679         status = pthread_attr_setdetachstate(&attr, &detach);
20680         if( status < 0 ) status = errno;
20681 #else
20682         status = pthread_attr_setdetachstate(&attr, detach);
20683 #endif
20684         if( status ) return status;
20685         status = pthread_create( &t, &attr, task, NULL );
20686 #if HAVE_PTHREADS < 7
20687         if( status < 0 ) status = errno;
20688 #endif
20689         if( status ) return status;
20690 #else
20691         /* Draft 4 pthreads */
20692         status = pthread_create( &t, pthread_attr_default, task, NULL );
20693         if( status ) return errno;
20694
20695         /* give thread a chance to complete */
20696         /* it should remain joinable and hence detachable */
20697         sleep( 1 );
20698
20699         status = pthread_detach( &t );
20700         if( status ) return errno;
20701 #endif
20702
20703 #ifdef HAVE_LINUX_THREADS
20704         pthread_kill_other_threads_np();
20705 #endif
20706
20707         return 0;
20708
20709   ;
20710   return 0;
20711 }
20712 _ACEOF
20713 if ac_fn_c_try_link "$LINENO"; then :
20714   ol_cv_pthread_lpthread_lmach_lexc=yes
20715 else
20716   ol_cv_pthread_lpthread_lmach_lexc=no
20717 fi
20718 rm -f core conftest.err conftest.$ac_objext \
20719     conftest$ac_exeext conftest.$ac_ext
20720 else
20721   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20722 /* end confdefs.h.  */
20723
20724
20725 /* pthread test headers */
20726 #include <pthread.h>
20727 #if HAVE_PTHREADS < 7
20728 #include <errno.h>
20729 #endif
20730 #ifndef NULL
20731 #define NULL (void*)0
20732 #endif
20733
20734 static void *task(p)
20735         void *p;
20736 {
20737         return (void *) (p == NULL);
20738 }
20739
20740
20741 int main(argc, argv)
20742         int argc;
20743         char **argv;
20744 {
20745
20746         /* pthread test function */
20747 #ifndef PTHREAD_CREATE_DETACHED
20748 #define PTHREAD_CREATE_DETACHED 1
20749 #endif
20750         pthread_t t;
20751         int status;
20752         int detach = PTHREAD_CREATE_DETACHED;
20753
20754 #if HAVE_PTHREADS > 4
20755         /* Final pthreads */
20756         pthread_attr_t attr;
20757
20758         status = pthread_attr_init(&attr);
20759         if( status ) return status;
20760
20761 #if HAVE_PTHREADS < 7
20762         status = pthread_attr_setdetachstate(&attr, &detach);
20763         if( status < 0 ) status = errno;
20764 #else
20765         status = pthread_attr_setdetachstate(&attr, detach);
20766 #endif
20767         if( status ) return status;
20768         status = pthread_create( &t, &attr, task, NULL );
20769 #if HAVE_PTHREADS < 7
20770         if( status < 0 ) status = errno;
20771 #endif
20772         if( status ) return status;
20773 #else
20774         /* Draft 4 pthreads */
20775         status = pthread_create( &t, pthread_attr_default, task, NULL );
20776         if( status ) return errno;
20777
20778         /* give thread a chance to complete */
20779         /* it should remain joinable and hence detachable */
20780         sleep( 1 );
20781
20782         status = pthread_detach( &t );
20783         if( status ) return errno;
20784 #endif
20785
20786 #ifdef HAVE_LINUX_THREADS
20787         pthread_kill_other_threads_np();
20788 #endif
20789
20790         return 0;
20791
20792 }
20793
20794 _ACEOF
20795 if ac_fn_c_try_run "$LINENO"; then :
20796   ol_cv_pthread_lpthread_lmach_lexc=yes
20797 else
20798   ol_cv_pthread_lpthread_lmach_lexc=no
20799 fi
20800 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20801   conftest.$ac_objext conftest.beam conftest.$ac_ext
20802 fi
20803
20804
20805                 # restore the LIBS
20806                 LIBS="$ol_LIBS"
20807
20808 fi
20809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
20810 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
20811
20812         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
20813                 ol_link_pthreads="-lpthread -lmach -lexc"
20814                 ol_link_threads=posix
20815         fi
20816 fi
20817
20818
20819                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
20820 if test "$ol_link_threads" = no ; then
20821         # try -lpthread -Wl,-woff,85
20822         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
20823 $as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
20824 if ${ol_cv_pthread_lib_lpthread_woff+:} false; then :
20825   $as_echo_n "(cached) " >&6
20826 else
20827
20828                 # save the flags
20829                 ol_LIBS="$LIBS"
20830                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
20831
20832                 if test "$cross_compiling" = yes; then :
20833   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20834 /* end confdefs.h.  */
20835
20836 /* pthread test headers */
20837 #include <pthread.h>
20838 #if HAVE_PTHREADS < 7
20839 #include <errno.h>
20840 #endif
20841 #ifndef NULL
20842 #define NULL (void*)0
20843 #endif
20844
20845 static void *task(p)
20846         void *p;
20847 {
20848         return (void *) (p == NULL);
20849 }
20850
20851 int
20852 main ()
20853 {
20854
20855         /* pthread test function */
20856 #ifndef PTHREAD_CREATE_DETACHED
20857 #define PTHREAD_CREATE_DETACHED 1
20858 #endif
20859         pthread_t t;
20860         int status;
20861         int detach = PTHREAD_CREATE_DETACHED;
20862
20863 #if HAVE_PTHREADS > 4
20864         /* Final pthreads */
20865         pthread_attr_t attr;
20866
20867         status = pthread_attr_init(&attr);
20868         if( status ) return status;
20869
20870 #if HAVE_PTHREADS < 7
20871         status = pthread_attr_setdetachstate(&attr, &detach);
20872         if( status < 0 ) status = errno;
20873 #else
20874         status = pthread_attr_setdetachstate(&attr, detach);
20875 #endif
20876         if( status ) return status;
20877         status = pthread_create( &t, &attr, task, NULL );
20878 #if HAVE_PTHREADS < 7
20879         if( status < 0 ) status = errno;
20880 #endif
20881         if( status ) return status;
20882 #else
20883         /* Draft 4 pthreads */
20884         status = pthread_create( &t, pthread_attr_default, task, NULL );
20885         if( status ) return errno;
20886
20887         /* give thread a chance to complete */
20888         /* it should remain joinable and hence detachable */
20889         sleep( 1 );
20890
20891         status = pthread_detach( &t );
20892         if( status ) return errno;
20893 #endif
20894
20895 #ifdef HAVE_LINUX_THREADS
20896         pthread_kill_other_threads_np();
20897 #endif
20898
20899         return 0;
20900
20901   ;
20902   return 0;
20903 }
20904 _ACEOF
20905 if ac_fn_c_try_link "$LINENO"; then :
20906   ol_cv_pthread_lib_lpthread_woff=yes
20907 else
20908   ol_cv_pthread_lib_lpthread_woff=no
20909 fi
20910 rm -f core conftest.err conftest.$ac_objext \
20911     conftest$ac_exeext conftest.$ac_ext
20912 else
20913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20914 /* end confdefs.h.  */
20915
20916
20917 /* pthread test headers */
20918 #include <pthread.h>
20919 #if HAVE_PTHREADS < 7
20920 #include <errno.h>
20921 #endif
20922 #ifndef NULL
20923 #define NULL (void*)0
20924 #endif
20925
20926 static void *task(p)
20927         void *p;
20928 {
20929         return (void *) (p == NULL);
20930 }
20931
20932
20933 int main(argc, argv)
20934         int argc;
20935         char **argv;
20936 {
20937
20938         /* pthread test function */
20939 #ifndef PTHREAD_CREATE_DETACHED
20940 #define PTHREAD_CREATE_DETACHED 1
20941 #endif
20942         pthread_t t;
20943         int status;
20944         int detach = PTHREAD_CREATE_DETACHED;
20945
20946 #if HAVE_PTHREADS > 4
20947         /* Final pthreads */
20948         pthread_attr_t attr;
20949
20950         status = pthread_attr_init(&attr);
20951         if( status ) return status;
20952
20953 #if HAVE_PTHREADS < 7
20954         status = pthread_attr_setdetachstate(&attr, &detach);
20955         if( status < 0 ) status = errno;
20956 #else
20957         status = pthread_attr_setdetachstate(&attr, detach);
20958 #endif
20959         if( status ) return status;
20960         status = pthread_create( &t, &attr, task, NULL );
20961 #if HAVE_PTHREADS < 7
20962         if( status < 0 ) status = errno;
20963 #endif
20964         if( status ) return status;
20965 #else
20966         /* Draft 4 pthreads */
20967         status = pthread_create( &t, pthread_attr_default, task, NULL );
20968         if( status ) return errno;
20969
20970         /* give thread a chance to complete */
20971         /* it should remain joinable and hence detachable */
20972         sleep( 1 );
20973
20974         status = pthread_detach( &t );
20975         if( status ) return errno;
20976 #endif
20977
20978 #ifdef HAVE_LINUX_THREADS
20979         pthread_kill_other_threads_np();
20980 #endif
20981
20982         return 0;
20983
20984 }
20985
20986 _ACEOF
20987 if ac_fn_c_try_run "$LINENO"; then :
20988   ol_cv_pthread_lib_lpthread_woff=yes
20989 else
20990   ol_cv_pthread_lib_lpthread_woff=no
20991 fi
20992 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20993   conftest.$ac_objext conftest.beam conftest.$ac_ext
20994 fi
20995
20996
20997                 # restore the LIBS
20998                 LIBS="$ol_LIBS"
20999
21000 fi
21001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
21002 $as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
21003
21004         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
21005                 ol_link_pthreads="-lpthread -Wl,-woff,85"
21006                 ol_link_threads=posix
21007         fi
21008 fi
21009
21010
21011                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
21012 if test "$ol_link_threads" = no ; then
21013         # try -lpthread
21014         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
21015 $as_echo_n "checking for pthread link with -lpthread... " >&6; }
21016 if ${ol_cv_pthread_lpthread+:} false; then :
21017   $as_echo_n "(cached) " >&6
21018 else
21019
21020                 # save the flags
21021                 ol_LIBS="$LIBS"
21022                 LIBS="-lpthread $LIBS"
21023
21024                 if test "$cross_compiling" = yes; then :
21025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21026 /* end confdefs.h.  */
21027
21028 /* pthread test headers */
21029 #include <pthread.h>
21030 #if HAVE_PTHREADS < 7
21031 #include <errno.h>
21032 #endif
21033 #ifndef NULL
21034 #define NULL (void*)0
21035 #endif
21036
21037 static void *task(p)
21038         void *p;
21039 {
21040         return (void *) (p == NULL);
21041 }
21042
21043 int
21044 main ()
21045 {
21046
21047         /* pthread test function */
21048 #ifndef PTHREAD_CREATE_DETACHED
21049 #define PTHREAD_CREATE_DETACHED 1
21050 #endif
21051         pthread_t t;
21052         int status;
21053         int detach = PTHREAD_CREATE_DETACHED;
21054
21055 #if HAVE_PTHREADS > 4
21056         /* Final pthreads */
21057         pthread_attr_t attr;
21058
21059         status = pthread_attr_init(&attr);
21060         if( status ) return status;
21061
21062 #if HAVE_PTHREADS < 7
21063         status = pthread_attr_setdetachstate(&attr, &detach);
21064         if( status < 0 ) status = errno;
21065 #else
21066         status = pthread_attr_setdetachstate(&attr, detach);
21067 #endif
21068         if( status ) return status;
21069         status = pthread_create( &t, &attr, task, NULL );
21070 #if HAVE_PTHREADS < 7
21071         if( status < 0 ) status = errno;
21072 #endif
21073         if( status ) return status;
21074 #else
21075         /* Draft 4 pthreads */
21076         status = pthread_create( &t, pthread_attr_default, task, NULL );
21077         if( status ) return errno;
21078
21079         /* give thread a chance to complete */
21080         /* it should remain joinable and hence detachable */
21081         sleep( 1 );
21082
21083         status = pthread_detach( &t );
21084         if( status ) return errno;
21085 #endif
21086
21087 #ifdef HAVE_LINUX_THREADS
21088         pthread_kill_other_threads_np();
21089 #endif
21090
21091         return 0;
21092
21093   ;
21094   return 0;
21095 }
21096 _ACEOF
21097 if ac_fn_c_try_link "$LINENO"; then :
21098   ol_cv_pthread_lpthread=yes
21099 else
21100   ol_cv_pthread_lpthread=no
21101 fi
21102 rm -f core conftest.err conftest.$ac_objext \
21103     conftest$ac_exeext conftest.$ac_ext
21104 else
21105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21106 /* end confdefs.h.  */
21107
21108
21109 /* pthread test headers */
21110 #include <pthread.h>
21111 #if HAVE_PTHREADS < 7
21112 #include <errno.h>
21113 #endif
21114 #ifndef NULL
21115 #define NULL (void*)0
21116 #endif
21117
21118 static void *task(p)
21119         void *p;
21120 {
21121         return (void *) (p == NULL);
21122 }
21123
21124
21125 int main(argc, argv)
21126         int argc;
21127         char **argv;
21128 {
21129
21130         /* pthread test function */
21131 #ifndef PTHREAD_CREATE_DETACHED
21132 #define PTHREAD_CREATE_DETACHED 1
21133 #endif
21134         pthread_t t;
21135         int status;
21136         int detach = PTHREAD_CREATE_DETACHED;
21137
21138 #if HAVE_PTHREADS > 4
21139         /* Final pthreads */
21140         pthread_attr_t attr;
21141
21142         status = pthread_attr_init(&attr);
21143         if( status ) return status;
21144
21145 #if HAVE_PTHREADS < 7
21146         status = pthread_attr_setdetachstate(&attr, &detach);
21147         if( status < 0 ) status = errno;
21148 #else
21149         status = pthread_attr_setdetachstate(&attr, detach);
21150 #endif
21151         if( status ) return status;
21152         status = pthread_create( &t, &attr, task, NULL );
21153 #if HAVE_PTHREADS < 7
21154         if( status < 0 ) status = errno;
21155 #endif
21156         if( status ) return status;
21157 #else
21158         /* Draft 4 pthreads */
21159         status = pthread_create( &t, pthread_attr_default, task, NULL );
21160         if( status ) return errno;
21161
21162         /* give thread a chance to complete */
21163         /* it should remain joinable and hence detachable */
21164         sleep( 1 );
21165
21166         status = pthread_detach( &t );
21167         if( status ) return errno;
21168 #endif
21169
21170 #ifdef HAVE_LINUX_THREADS
21171         pthread_kill_other_threads_np();
21172 #endif
21173
21174         return 0;
21175
21176 }
21177
21178 _ACEOF
21179 if ac_fn_c_try_run "$LINENO"; then :
21180   ol_cv_pthread_lpthread=yes
21181 else
21182   ol_cv_pthread_lpthread=no
21183 fi
21184 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21185   conftest.$ac_objext conftest.beam conftest.$ac_ext
21186 fi
21187
21188
21189                 # restore the LIBS
21190                 LIBS="$ol_LIBS"
21191
21192 fi
21193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
21194 $as_echo "$ol_cv_pthread_lpthread" >&6; }
21195
21196         if test $ol_cv_pthread_lpthread = yes ; then
21197                 ol_link_pthreads="-lpthread"
21198                 ol_link_threads=posix
21199         fi
21200 fi
21201
21202                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
21203 if test "$ol_link_threads" = no ; then
21204         # try -lc_r
21205         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
21206 $as_echo_n "checking for pthread link with -lc_r... " >&6; }
21207 if ${ol_cv_pthread_lc_r+:} false; then :
21208   $as_echo_n "(cached) " >&6
21209 else
21210
21211                 # save the flags
21212                 ol_LIBS="$LIBS"
21213                 LIBS="-lc_r $LIBS"
21214
21215                 if test "$cross_compiling" = yes; then :
21216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21217 /* end confdefs.h.  */
21218
21219 /* pthread test headers */
21220 #include <pthread.h>
21221 #if HAVE_PTHREADS < 7
21222 #include <errno.h>
21223 #endif
21224 #ifndef NULL
21225 #define NULL (void*)0
21226 #endif
21227
21228 static void *task(p)
21229         void *p;
21230 {
21231         return (void *) (p == NULL);
21232 }
21233
21234 int
21235 main ()
21236 {
21237
21238         /* pthread test function */
21239 #ifndef PTHREAD_CREATE_DETACHED
21240 #define PTHREAD_CREATE_DETACHED 1
21241 #endif
21242         pthread_t t;
21243         int status;
21244         int detach = PTHREAD_CREATE_DETACHED;
21245
21246 #if HAVE_PTHREADS > 4
21247         /* Final pthreads */
21248         pthread_attr_t attr;
21249
21250         status = pthread_attr_init(&attr);
21251         if( status ) return status;
21252
21253 #if HAVE_PTHREADS < 7
21254         status = pthread_attr_setdetachstate(&attr, &detach);
21255         if( status < 0 ) status = errno;
21256 #else
21257         status = pthread_attr_setdetachstate(&attr, detach);
21258 #endif
21259         if( status ) return status;
21260         status = pthread_create( &t, &attr, task, NULL );
21261 #if HAVE_PTHREADS < 7
21262         if( status < 0 ) status = errno;
21263 #endif
21264         if( status ) return status;
21265 #else
21266         /* Draft 4 pthreads */
21267         status = pthread_create( &t, pthread_attr_default, task, NULL );
21268         if( status ) return errno;
21269
21270         /* give thread a chance to complete */
21271         /* it should remain joinable and hence detachable */
21272         sleep( 1 );
21273
21274         status = pthread_detach( &t );
21275         if( status ) return errno;
21276 #endif
21277
21278 #ifdef HAVE_LINUX_THREADS
21279         pthread_kill_other_threads_np();
21280 #endif
21281
21282         return 0;
21283
21284   ;
21285   return 0;
21286 }
21287 _ACEOF
21288 if ac_fn_c_try_link "$LINENO"; then :
21289   ol_cv_pthread_lc_r=yes
21290 else
21291   ol_cv_pthread_lc_r=no
21292 fi
21293 rm -f core conftest.err conftest.$ac_objext \
21294     conftest$ac_exeext conftest.$ac_ext
21295 else
21296   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21297 /* end confdefs.h.  */
21298
21299
21300 /* pthread test headers */
21301 #include <pthread.h>
21302 #if HAVE_PTHREADS < 7
21303 #include <errno.h>
21304 #endif
21305 #ifndef NULL
21306 #define NULL (void*)0
21307 #endif
21308
21309 static void *task(p)
21310         void *p;
21311 {
21312         return (void *) (p == NULL);
21313 }
21314
21315
21316 int main(argc, argv)
21317         int argc;
21318         char **argv;
21319 {
21320
21321         /* pthread test function */
21322 #ifndef PTHREAD_CREATE_DETACHED
21323 #define PTHREAD_CREATE_DETACHED 1
21324 #endif
21325         pthread_t t;
21326         int status;
21327         int detach = PTHREAD_CREATE_DETACHED;
21328
21329 #if HAVE_PTHREADS > 4
21330         /* Final pthreads */
21331         pthread_attr_t attr;
21332
21333         status = pthread_attr_init(&attr);
21334         if( status ) return status;
21335
21336 #if HAVE_PTHREADS < 7
21337         status = pthread_attr_setdetachstate(&attr, &detach);
21338         if( status < 0 ) status = errno;
21339 #else
21340         status = pthread_attr_setdetachstate(&attr, detach);
21341 #endif
21342         if( status ) return status;
21343         status = pthread_create( &t, &attr, task, NULL );
21344 #if HAVE_PTHREADS < 7
21345         if( status < 0 ) status = errno;
21346 #endif
21347         if( status ) return status;
21348 #else
21349         /* Draft 4 pthreads */
21350         status = pthread_create( &t, pthread_attr_default, task, NULL );
21351         if( status ) return errno;
21352
21353         /* give thread a chance to complete */
21354         /* it should remain joinable and hence detachable */
21355         sleep( 1 );
21356
21357         status = pthread_detach( &t );
21358         if( status ) return errno;
21359 #endif
21360
21361 #ifdef HAVE_LINUX_THREADS
21362         pthread_kill_other_threads_np();
21363 #endif
21364
21365         return 0;
21366
21367 }
21368
21369 _ACEOF
21370 if ac_fn_c_try_run "$LINENO"; then :
21371   ol_cv_pthread_lc_r=yes
21372 else
21373   ol_cv_pthread_lc_r=no
21374 fi
21375 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21376   conftest.$ac_objext conftest.beam conftest.$ac_ext
21377 fi
21378
21379
21380                 # restore the LIBS
21381                 LIBS="$ol_LIBS"
21382
21383 fi
21384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
21385 $as_echo "$ol_cv_pthread_lc_r" >&6; }
21386
21387         if test $ol_cv_pthread_lc_r = yes ; then
21388                 ol_link_pthreads="-lc_r"
21389                 ol_link_threads=posix
21390         fi
21391 fi
21392
21393
21394                 # Pthread try link: -threads (ol_cv_pthread_threads)
21395 if test "$ol_link_threads" = no ; then
21396         # try -threads
21397         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
21398 $as_echo_n "checking for pthread link with -threads... " >&6; }
21399 if ${ol_cv_pthread_threads+:} false; then :
21400   $as_echo_n "(cached) " >&6
21401 else
21402
21403                 # save the flags
21404                 ol_LIBS="$LIBS"
21405                 LIBS="-threads $LIBS"
21406
21407                 if test "$cross_compiling" = yes; then :
21408   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21409 /* end confdefs.h.  */
21410
21411 /* pthread test headers */
21412 #include <pthread.h>
21413 #if HAVE_PTHREADS < 7
21414 #include <errno.h>
21415 #endif
21416 #ifndef NULL
21417 #define NULL (void*)0
21418 #endif
21419
21420 static void *task(p)
21421         void *p;
21422 {
21423         return (void *) (p == NULL);
21424 }
21425
21426 int
21427 main ()
21428 {
21429
21430         /* pthread test function */
21431 #ifndef PTHREAD_CREATE_DETACHED
21432 #define PTHREAD_CREATE_DETACHED 1
21433 #endif
21434         pthread_t t;
21435         int status;
21436         int detach = PTHREAD_CREATE_DETACHED;
21437
21438 #if HAVE_PTHREADS > 4
21439         /* Final pthreads */
21440         pthread_attr_t attr;
21441
21442         status = pthread_attr_init(&attr);
21443         if( status ) return status;
21444
21445 #if HAVE_PTHREADS < 7
21446         status = pthread_attr_setdetachstate(&attr, &detach);
21447         if( status < 0 ) status = errno;
21448 #else
21449         status = pthread_attr_setdetachstate(&attr, detach);
21450 #endif
21451         if( status ) return status;
21452         status = pthread_create( &t, &attr, task, NULL );
21453 #if HAVE_PTHREADS < 7
21454         if( status < 0 ) status = errno;
21455 #endif
21456         if( status ) return status;
21457 #else
21458         /* Draft 4 pthreads */
21459         status = pthread_create( &t, pthread_attr_default, task, NULL );
21460         if( status ) return errno;
21461
21462         /* give thread a chance to complete */
21463         /* it should remain joinable and hence detachable */
21464         sleep( 1 );
21465
21466         status = pthread_detach( &t );
21467         if( status ) return errno;
21468 #endif
21469
21470 #ifdef HAVE_LINUX_THREADS
21471         pthread_kill_other_threads_np();
21472 #endif
21473
21474         return 0;
21475
21476   ;
21477   return 0;
21478 }
21479 _ACEOF
21480 if ac_fn_c_try_link "$LINENO"; then :
21481   ol_cv_pthread_threads=yes
21482 else
21483   ol_cv_pthread_threads=no
21484 fi
21485 rm -f core conftest.err conftest.$ac_objext \
21486     conftest$ac_exeext conftest.$ac_ext
21487 else
21488   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21489 /* end confdefs.h.  */
21490
21491
21492 /* pthread test headers */
21493 #include <pthread.h>
21494 #if HAVE_PTHREADS < 7
21495 #include <errno.h>
21496 #endif
21497 #ifndef NULL
21498 #define NULL (void*)0
21499 #endif
21500
21501 static void *task(p)
21502         void *p;
21503 {
21504         return (void *) (p == NULL);
21505 }
21506
21507
21508 int main(argc, argv)
21509         int argc;
21510         char **argv;
21511 {
21512
21513         /* pthread test function */
21514 #ifndef PTHREAD_CREATE_DETACHED
21515 #define PTHREAD_CREATE_DETACHED 1
21516 #endif
21517         pthread_t t;
21518         int status;
21519         int detach = PTHREAD_CREATE_DETACHED;
21520
21521 #if HAVE_PTHREADS > 4
21522         /* Final pthreads */
21523         pthread_attr_t attr;
21524
21525         status = pthread_attr_init(&attr);
21526         if( status ) return status;
21527
21528 #if HAVE_PTHREADS < 7
21529         status = pthread_attr_setdetachstate(&attr, &detach);
21530         if( status < 0 ) status = errno;
21531 #else
21532         status = pthread_attr_setdetachstate(&attr, detach);
21533 #endif
21534         if( status ) return status;
21535         status = pthread_create( &t, &attr, task, NULL );
21536 #if HAVE_PTHREADS < 7
21537         if( status < 0 ) status = errno;
21538 #endif
21539         if( status ) return status;
21540 #else
21541         /* Draft 4 pthreads */
21542         status = pthread_create( &t, pthread_attr_default, task, NULL );
21543         if( status ) return errno;
21544
21545         /* give thread a chance to complete */
21546         /* it should remain joinable and hence detachable */
21547         sleep( 1 );
21548
21549         status = pthread_detach( &t );
21550         if( status ) return errno;
21551 #endif
21552
21553 #ifdef HAVE_LINUX_THREADS
21554         pthread_kill_other_threads_np();
21555 #endif
21556
21557         return 0;
21558
21559 }
21560
21561 _ACEOF
21562 if ac_fn_c_try_run "$LINENO"; then :
21563   ol_cv_pthread_threads=yes
21564 else
21565   ol_cv_pthread_threads=no
21566 fi
21567 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21568   conftest.$ac_objext conftest.beam conftest.$ac_ext
21569 fi
21570
21571
21572                 # restore the LIBS
21573                 LIBS="$ol_LIBS"
21574
21575 fi
21576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
21577 $as_echo "$ol_cv_pthread_threads" >&6; }
21578
21579         if test $ol_cv_pthread_threads = yes ; then
21580                 ol_link_pthreads="-threads"
21581                 ol_link_threads=posix
21582         fi
21583 fi
21584
21585
21586                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
21587 if test "$ol_link_threads" = no ; then
21588         # try -lpthreads -lmach -lexc -lc_r
21589         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
21590 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
21591 if ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+:} false; then :
21592   $as_echo_n "(cached) " >&6
21593 else
21594
21595                 # save the flags
21596                 ol_LIBS="$LIBS"
21597                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
21598
21599                 if test "$cross_compiling" = yes; then :
21600   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21601 /* end confdefs.h.  */
21602
21603 /* pthread test headers */
21604 #include <pthread.h>
21605 #if HAVE_PTHREADS < 7
21606 #include <errno.h>
21607 #endif
21608 #ifndef NULL
21609 #define NULL (void*)0
21610 #endif
21611
21612 static void *task(p)
21613         void *p;
21614 {
21615         return (void *) (p == NULL);
21616 }
21617
21618 int
21619 main ()
21620 {
21621
21622         /* pthread test function */
21623 #ifndef PTHREAD_CREATE_DETACHED
21624 #define PTHREAD_CREATE_DETACHED 1
21625 #endif
21626         pthread_t t;
21627         int status;
21628         int detach = PTHREAD_CREATE_DETACHED;
21629
21630 #if HAVE_PTHREADS > 4
21631         /* Final pthreads */
21632         pthread_attr_t attr;
21633
21634         status = pthread_attr_init(&attr);
21635         if( status ) return status;
21636
21637 #if HAVE_PTHREADS < 7
21638         status = pthread_attr_setdetachstate(&attr, &detach);
21639         if( status < 0 ) status = errno;
21640 #else
21641         status = pthread_attr_setdetachstate(&attr, detach);
21642 #endif
21643         if( status ) return status;
21644         status = pthread_create( &t, &attr, task, NULL );
21645 #if HAVE_PTHREADS < 7
21646         if( status < 0 ) status = errno;
21647 #endif
21648         if( status ) return status;
21649 #else
21650         /* Draft 4 pthreads */
21651         status = pthread_create( &t, pthread_attr_default, task, NULL );
21652         if( status ) return errno;
21653
21654         /* give thread a chance to complete */
21655         /* it should remain joinable and hence detachable */
21656         sleep( 1 );
21657
21658         status = pthread_detach( &t );
21659         if( status ) return errno;
21660 #endif
21661
21662 #ifdef HAVE_LINUX_THREADS
21663         pthread_kill_other_threads_np();
21664 #endif
21665
21666         return 0;
21667
21668   ;
21669   return 0;
21670 }
21671 _ACEOF
21672 if ac_fn_c_try_link "$LINENO"; then :
21673   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
21674 else
21675   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
21676 fi
21677 rm -f core conftest.err conftest.$ac_objext \
21678     conftest$ac_exeext conftest.$ac_ext
21679 else
21680   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21681 /* end confdefs.h.  */
21682
21683
21684 /* pthread test headers */
21685 #include <pthread.h>
21686 #if HAVE_PTHREADS < 7
21687 #include <errno.h>
21688 #endif
21689 #ifndef NULL
21690 #define NULL (void*)0
21691 #endif
21692
21693 static void *task(p)
21694         void *p;
21695 {
21696         return (void *) (p == NULL);
21697 }
21698
21699
21700 int main(argc, argv)
21701         int argc;
21702         char **argv;
21703 {
21704
21705         /* pthread test function */
21706 #ifndef PTHREAD_CREATE_DETACHED
21707 #define PTHREAD_CREATE_DETACHED 1
21708 #endif
21709         pthread_t t;
21710         int status;
21711         int detach = PTHREAD_CREATE_DETACHED;
21712
21713 #if HAVE_PTHREADS > 4
21714         /* Final pthreads */
21715         pthread_attr_t attr;
21716
21717         status = pthread_attr_init(&attr);
21718         if( status ) return status;
21719
21720 #if HAVE_PTHREADS < 7
21721         status = pthread_attr_setdetachstate(&attr, &detach);
21722         if( status < 0 ) status = errno;
21723 #else
21724         status = pthread_attr_setdetachstate(&attr, detach);
21725 #endif
21726         if( status ) return status;
21727         status = pthread_create( &t, &attr, task, NULL );
21728 #if HAVE_PTHREADS < 7
21729         if( status < 0 ) status = errno;
21730 #endif
21731         if( status ) return status;
21732 #else
21733         /* Draft 4 pthreads */
21734         status = pthread_create( &t, pthread_attr_default, task, NULL );
21735         if( status ) return errno;
21736
21737         /* give thread a chance to complete */
21738         /* it should remain joinable and hence detachable */
21739         sleep( 1 );
21740
21741         status = pthread_detach( &t );
21742         if( status ) return errno;
21743 #endif
21744
21745 #ifdef HAVE_LINUX_THREADS
21746         pthread_kill_other_threads_np();
21747 #endif
21748
21749         return 0;
21750
21751 }
21752
21753 _ACEOF
21754 if ac_fn_c_try_run "$LINENO"; then :
21755   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
21756 else
21757   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
21758 fi
21759 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21760   conftest.$ac_objext conftest.beam conftest.$ac_ext
21761 fi
21762
21763
21764                 # restore the LIBS
21765                 LIBS="$ol_LIBS"
21766
21767 fi
21768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
21769 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
21770
21771         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
21772                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
21773                 ol_link_threads=posix
21774         fi
21775 fi
21776
21777                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
21778 if test "$ol_link_threads" = no ; then
21779         # try -lpthreads -lmach -lexc
21780         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
21781 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
21782 if ${ol_cv_pthread_lpthreads_lmach_lexc+:} false; then :
21783   $as_echo_n "(cached) " >&6
21784 else
21785
21786                 # save the flags
21787                 ol_LIBS="$LIBS"
21788                 LIBS="-lpthreads -lmach -lexc $LIBS"
21789
21790                 if test "$cross_compiling" = yes; then :
21791   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21792 /* end confdefs.h.  */
21793
21794 /* pthread test headers */
21795 #include <pthread.h>
21796 #if HAVE_PTHREADS < 7
21797 #include <errno.h>
21798 #endif
21799 #ifndef NULL
21800 #define NULL (void*)0
21801 #endif
21802
21803 static void *task(p)
21804         void *p;
21805 {
21806         return (void *) (p == NULL);
21807 }
21808
21809 int
21810 main ()
21811 {
21812
21813         /* pthread test function */
21814 #ifndef PTHREAD_CREATE_DETACHED
21815 #define PTHREAD_CREATE_DETACHED 1
21816 #endif
21817         pthread_t t;
21818         int status;
21819         int detach = PTHREAD_CREATE_DETACHED;
21820
21821 #if HAVE_PTHREADS > 4
21822         /* Final pthreads */
21823         pthread_attr_t attr;
21824
21825         status = pthread_attr_init(&attr);
21826         if( status ) return status;
21827
21828 #if HAVE_PTHREADS < 7
21829         status = pthread_attr_setdetachstate(&attr, &detach);
21830         if( status < 0 ) status = errno;
21831 #else
21832         status = pthread_attr_setdetachstate(&attr, detach);
21833 #endif
21834         if( status ) return status;
21835         status = pthread_create( &t, &attr, task, NULL );
21836 #if HAVE_PTHREADS < 7
21837         if( status < 0 ) status = errno;
21838 #endif
21839         if( status ) return status;
21840 #else
21841         /* Draft 4 pthreads */
21842         status = pthread_create( &t, pthread_attr_default, task, NULL );
21843         if( status ) return errno;
21844
21845         /* give thread a chance to complete */
21846         /* it should remain joinable and hence detachable */
21847         sleep( 1 );
21848
21849         status = pthread_detach( &t );
21850         if( status ) return errno;
21851 #endif
21852
21853 #ifdef HAVE_LINUX_THREADS
21854         pthread_kill_other_threads_np();
21855 #endif
21856
21857         return 0;
21858
21859   ;
21860   return 0;
21861 }
21862 _ACEOF
21863 if ac_fn_c_try_link "$LINENO"; then :
21864   ol_cv_pthread_lpthreads_lmach_lexc=yes
21865 else
21866   ol_cv_pthread_lpthreads_lmach_lexc=no
21867 fi
21868 rm -f core conftest.err conftest.$ac_objext \
21869     conftest$ac_exeext conftest.$ac_ext
21870 else
21871   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21872 /* end confdefs.h.  */
21873
21874
21875 /* pthread test headers */
21876 #include <pthread.h>
21877 #if HAVE_PTHREADS < 7
21878 #include <errno.h>
21879 #endif
21880 #ifndef NULL
21881 #define NULL (void*)0
21882 #endif
21883
21884 static void *task(p)
21885         void *p;
21886 {
21887         return (void *) (p == NULL);
21888 }
21889
21890
21891 int main(argc, argv)
21892         int argc;
21893         char **argv;
21894 {
21895
21896         /* pthread test function */
21897 #ifndef PTHREAD_CREATE_DETACHED
21898 #define PTHREAD_CREATE_DETACHED 1
21899 #endif
21900         pthread_t t;
21901         int status;
21902         int detach = PTHREAD_CREATE_DETACHED;
21903
21904 #if HAVE_PTHREADS > 4
21905         /* Final pthreads */
21906         pthread_attr_t attr;
21907
21908         status = pthread_attr_init(&attr);
21909         if( status ) return status;
21910
21911 #if HAVE_PTHREADS < 7
21912         status = pthread_attr_setdetachstate(&attr, &detach);
21913         if( status < 0 ) status = errno;
21914 #else
21915         status = pthread_attr_setdetachstate(&attr, detach);
21916 #endif
21917         if( status ) return status;
21918         status = pthread_create( &t, &attr, task, NULL );
21919 #if HAVE_PTHREADS < 7
21920         if( status < 0 ) status = errno;
21921 #endif
21922         if( status ) return status;
21923 #else
21924         /* Draft 4 pthreads */
21925         status = pthread_create( &t, pthread_attr_default, task, NULL );
21926         if( status ) return errno;
21927
21928         /* give thread a chance to complete */
21929         /* it should remain joinable and hence detachable */
21930         sleep( 1 );
21931
21932         status = pthread_detach( &t );
21933         if( status ) return errno;
21934 #endif
21935
21936 #ifdef HAVE_LINUX_THREADS
21937         pthread_kill_other_threads_np();
21938 #endif
21939
21940         return 0;
21941
21942 }
21943
21944 _ACEOF
21945 if ac_fn_c_try_run "$LINENO"; then :
21946   ol_cv_pthread_lpthreads_lmach_lexc=yes
21947 else
21948   ol_cv_pthread_lpthreads_lmach_lexc=no
21949 fi
21950 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21951   conftest.$ac_objext conftest.beam conftest.$ac_ext
21952 fi
21953
21954
21955                 # restore the LIBS
21956                 LIBS="$ol_LIBS"
21957
21958 fi
21959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
21960 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
21961
21962         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
21963                 ol_link_pthreads="-lpthreads -lmach -lexc"
21964                 ol_link_threads=posix
21965         fi
21966 fi
21967
21968                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
21969 if test "$ol_link_threads" = no ; then
21970         # try -lpthreads -lexc
21971         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
21972 $as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
21973 if ${ol_cv_pthread_lpthreads_lexc+:} false; then :
21974   $as_echo_n "(cached) " >&6
21975 else
21976
21977                 # save the flags
21978                 ol_LIBS="$LIBS"
21979                 LIBS="-lpthreads -lexc $LIBS"
21980
21981                 if test "$cross_compiling" = yes; then :
21982   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21983 /* end confdefs.h.  */
21984
21985 /* pthread test headers */
21986 #include <pthread.h>
21987 #if HAVE_PTHREADS < 7
21988 #include <errno.h>
21989 #endif
21990 #ifndef NULL
21991 #define NULL (void*)0
21992 #endif
21993
21994 static void *task(p)
21995         void *p;
21996 {
21997         return (void *) (p == NULL);
21998 }
21999
22000 int
22001 main ()
22002 {
22003
22004         /* pthread test function */
22005 #ifndef PTHREAD_CREATE_DETACHED
22006 #define PTHREAD_CREATE_DETACHED 1
22007 #endif
22008         pthread_t t;
22009         int status;
22010         int detach = PTHREAD_CREATE_DETACHED;
22011
22012 #if HAVE_PTHREADS > 4
22013         /* Final pthreads */
22014         pthread_attr_t attr;
22015
22016         status = pthread_attr_init(&attr);
22017         if( status ) return status;
22018
22019 #if HAVE_PTHREADS < 7
22020         status = pthread_attr_setdetachstate(&attr, &detach);
22021         if( status < 0 ) status = errno;
22022 #else
22023         status = pthread_attr_setdetachstate(&attr, detach);
22024 #endif
22025         if( status ) return status;
22026         status = pthread_create( &t, &attr, task, NULL );
22027 #if HAVE_PTHREADS < 7
22028         if( status < 0 ) status = errno;
22029 #endif
22030         if( status ) return status;
22031 #else
22032         /* Draft 4 pthreads */
22033         status = pthread_create( &t, pthread_attr_default, task, NULL );
22034         if( status ) return errno;
22035
22036         /* give thread a chance to complete */
22037         /* it should remain joinable and hence detachable */
22038         sleep( 1 );
22039
22040         status = pthread_detach( &t );
22041         if( status ) return errno;
22042 #endif
22043
22044 #ifdef HAVE_LINUX_THREADS
22045         pthread_kill_other_threads_np();
22046 #endif
22047
22048         return 0;
22049
22050   ;
22051   return 0;
22052 }
22053 _ACEOF
22054 if ac_fn_c_try_link "$LINENO"; then :
22055   ol_cv_pthread_lpthreads_lexc=yes
22056 else
22057   ol_cv_pthread_lpthreads_lexc=no
22058 fi
22059 rm -f core conftest.err conftest.$ac_objext \
22060     conftest$ac_exeext conftest.$ac_ext
22061 else
22062   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22063 /* end confdefs.h.  */
22064
22065
22066 /* pthread test headers */
22067 #include <pthread.h>
22068 #if HAVE_PTHREADS < 7
22069 #include <errno.h>
22070 #endif
22071 #ifndef NULL
22072 #define NULL (void*)0
22073 #endif
22074
22075 static void *task(p)
22076         void *p;
22077 {
22078         return (void *) (p == NULL);
22079 }
22080
22081
22082 int main(argc, argv)
22083         int argc;
22084         char **argv;
22085 {
22086
22087         /* pthread test function */
22088 #ifndef PTHREAD_CREATE_DETACHED
22089 #define PTHREAD_CREATE_DETACHED 1
22090 #endif
22091         pthread_t t;
22092         int status;
22093         int detach = PTHREAD_CREATE_DETACHED;
22094
22095 #if HAVE_PTHREADS > 4
22096         /* Final pthreads */
22097         pthread_attr_t attr;
22098
22099         status = pthread_attr_init(&attr);
22100         if( status ) return status;
22101
22102 #if HAVE_PTHREADS < 7
22103         status = pthread_attr_setdetachstate(&attr, &detach);
22104         if( status < 0 ) status = errno;
22105 #else
22106         status = pthread_attr_setdetachstate(&attr, detach);
22107 #endif
22108         if( status ) return status;
22109         status = pthread_create( &t, &attr, task, NULL );
22110 #if HAVE_PTHREADS < 7
22111         if( status < 0 ) status = errno;
22112 #endif
22113         if( status ) return status;
22114 #else
22115         /* Draft 4 pthreads */
22116         status = pthread_create( &t, pthread_attr_default, task, NULL );
22117         if( status ) return errno;
22118
22119         /* give thread a chance to complete */
22120         /* it should remain joinable and hence detachable */
22121         sleep( 1 );
22122
22123         status = pthread_detach( &t );
22124         if( status ) return errno;
22125 #endif
22126
22127 #ifdef HAVE_LINUX_THREADS
22128         pthread_kill_other_threads_np();
22129 #endif
22130
22131         return 0;
22132
22133 }
22134
22135 _ACEOF
22136 if ac_fn_c_try_run "$LINENO"; then :
22137   ol_cv_pthread_lpthreads_lexc=yes
22138 else
22139   ol_cv_pthread_lpthreads_lexc=no
22140 fi
22141 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22142   conftest.$ac_objext conftest.beam conftest.$ac_ext
22143 fi
22144
22145
22146                 # restore the LIBS
22147                 LIBS="$ol_LIBS"
22148
22149 fi
22150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
22151 $as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
22152
22153         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
22154                 ol_link_pthreads="-lpthreads -lexc"
22155                 ol_link_threads=posix
22156         fi
22157 fi
22158
22159
22160                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
22161 if test "$ol_link_threads" = no ; then
22162         # try -lpthreads
22163         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
22164 $as_echo_n "checking for pthread link with -lpthreads... " >&6; }
22165 if ${ol_cv_pthread_lib_lpthreads+:} false; then :
22166   $as_echo_n "(cached) " >&6
22167 else
22168
22169                 # save the flags
22170                 ol_LIBS="$LIBS"
22171                 LIBS="-lpthreads $LIBS"
22172
22173                 if test "$cross_compiling" = yes; then :
22174   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22175 /* end confdefs.h.  */
22176
22177 /* pthread test headers */
22178 #include <pthread.h>
22179 #if HAVE_PTHREADS < 7
22180 #include <errno.h>
22181 #endif
22182 #ifndef NULL
22183 #define NULL (void*)0
22184 #endif
22185
22186 static void *task(p)
22187         void *p;
22188 {
22189         return (void *) (p == NULL);
22190 }
22191
22192 int
22193 main ()
22194 {
22195
22196         /* pthread test function */
22197 #ifndef PTHREAD_CREATE_DETACHED
22198 #define PTHREAD_CREATE_DETACHED 1
22199 #endif
22200         pthread_t t;
22201         int status;
22202         int detach = PTHREAD_CREATE_DETACHED;
22203
22204 #if HAVE_PTHREADS > 4
22205         /* Final pthreads */
22206         pthread_attr_t attr;
22207
22208         status = pthread_attr_init(&attr);
22209         if( status ) return status;
22210
22211 #if HAVE_PTHREADS < 7
22212         status = pthread_attr_setdetachstate(&attr, &detach);
22213         if( status < 0 ) status = errno;
22214 #else
22215         status = pthread_attr_setdetachstate(&attr, detach);
22216 #endif
22217         if( status ) return status;
22218         status = pthread_create( &t, &attr, task, NULL );
22219 #if HAVE_PTHREADS < 7
22220         if( status < 0 ) status = errno;
22221 #endif
22222         if( status ) return status;
22223 #else
22224         /* Draft 4 pthreads */
22225         status = pthread_create( &t, pthread_attr_default, task, NULL );
22226         if( status ) return errno;
22227
22228         /* give thread a chance to complete */
22229         /* it should remain joinable and hence detachable */
22230         sleep( 1 );
22231
22232         status = pthread_detach( &t );
22233         if( status ) return errno;
22234 #endif
22235
22236 #ifdef HAVE_LINUX_THREADS
22237         pthread_kill_other_threads_np();
22238 #endif
22239
22240         return 0;
22241
22242   ;
22243   return 0;
22244 }
22245 _ACEOF
22246 if ac_fn_c_try_link "$LINENO"; then :
22247   ol_cv_pthread_lib_lpthreads=yes
22248 else
22249   ol_cv_pthread_lib_lpthreads=no
22250 fi
22251 rm -f core conftest.err conftest.$ac_objext \
22252     conftest$ac_exeext conftest.$ac_ext
22253 else
22254   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22255 /* end confdefs.h.  */
22256
22257
22258 /* pthread test headers */
22259 #include <pthread.h>
22260 #if HAVE_PTHREADS < 7
22261 #include <errno.h>
22262 #endif
22263 #ifndef NULL
22264 #define NULL (void*)0
22265 #endif
22266
22267 static void *task(p)
22268         void *p;
22269 {
22270         return (void *) (p == NULL);
22271 }
22272
22273
22274 int main(argc, argv)
22275         int argc;
22276         char **argv;
22277 {
22278
22279         /* pthread test function */
22280 #ifndef PTHREAD_CREATE_DETACHED
22281 #define PTHREAD_CREATE_DETACHED 1
22282 #endif
22283         pthread_t t;
22284         int status;
22285         int detach = PTHREAD_CREATE_DETACHED;
22286
22287 #if HAVE_PTHREADS > 4
22288         /* Final pthreads */
22289         pthread_attr_t attr;
22290
22291         status = pthread_attr_init(&attr);
22292         if( status ) return status;
22293
22294 #if HAVE_PTHREADS < 7
22295         status = pthread_attr_setdetachstate(&attr, &detach);
22296         if( status < 0 ) status = errno;
22297 #else
22298         status = pthread_attr_setdetachstate(&attr, detach);
22299 #endif
22300         if( status ) return status;
22301         status = pthread_create( &t, &attr, task, NULL );
22302 #if HAVE_PTHREADS < 7
22303         if( status < 0 ) status = errno;
22304 #endif
22305         if( status ) return status;
22306 #else
22307         /* Draft 4 pthreads */
22308         status = pthread_create( &t, pthread_attr_default, task, NULL );
22309         if( status ) return errno;
22310
22311         /* give thread a chance to complete */
22312         /* it should remain joinable and hence detachable */
22313         sleep( 1 );
22314
22315         status = pthread_detach( &t );
22316         if( status ) return errno;
22317 #endif
22318
22319 #ifdef HAVE_LINUX_THREADS
22320         pthread_kill_other_threads_np();
22321 #endif
22322
22323         return 0;
22324
22325 }
22326
22327 _ACEOF
22328 if ac_fn_c_try_run "$LINENO"; then :
22329   ol_cv_pthread_lib_lpthreads=yes
22330 else
22331   ol_cv_pthread_lib_lpthreads=no
22332 fi
22333 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22334   conftest.$ac_objext conftest.beam conftest.$ac_ext
22335 fi
22336
22337
22338                 # restore the LIBS
22339                 LIBS="$ol_LIBS"
22340
22341 fi
22342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
22343 $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
22344
22345         if test $ol_cv_pthread_lib_lpthreads = yes ; then
22346                 ol_link_pthreads="-lpthreads"
22347                 ol_link_threads=posix
22348         fi
22349 fi
22350
22351
22352 { $as_echo "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
22353 $as_echo "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
22354
22355                 if test $ol_link_threads != no ; then
22356                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
22357
22358                                                 save_CPPFLAGS="$CPPFLAGS"
22359                         save_LIBS="$LIBS"
22360                         LIBS="$LTHREAD_LIBS $LIBS"
22361
22362                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
22363 do :
22364   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22365 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22366 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
22367   cat >>confdefs.h <<_ACEOF
22368 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22369 _ACEOF
22370
22371 fi
22372 done
22373
22374
22375                         if test $ac_cv_func_sched_yield = no &&
22376                            test $ac_cv_func_pthread_yield = no &&
22377                            test $ac_cv_func_thr_yield = no ; then
22378                                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
22379 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
22380 if ${ac_cv_lib_rt_sched_yield+:} false; then :
22381   $as_echo_n "(cached) " >&6
22382 else
22383   ac_check_lib_save_LIBS=$LIBS
22384 LIBS="-lrt  $LIBS"
22385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22386 /* end confdefs.h.  */
22387
22388 /* Override any GCC internal prototype to avoid an error.
22389    Use char because int might match the return type of a GCC
22390    builtin and then its argument prototype would still apply.  */
22391 #ifdef __cplusplus
22392 extern "C"
22393 #endif
22394 char sched_yield ();
22395 int
22396 main ()
22397 {
22398 return sched_yield ();
22399   ;
22400   return 0;
22401 }
22402 _ACEOF
22403 if ac_fn_c_try_link "$LINENO"; then :
22404   ac_cv_lib_rt_sched_yield=yes
22405 else
22406   ac_cv_lib_rt_sched_yield=no
22407 fi
22408 rm -f core conftest.err conftest.$ac_objext \
22409     conftest$ac_exeext conftest.$ac_ext
22410 LIBS=$ac_check_lib_save_LIBS
22411 fi
22412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
22413 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
22414 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
22415   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
22416
22417 $as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
22418
22419                                         ac_cv_func_sched_yield=yes
22420 else
22421   ac_cv_func_sched_yield=no
22422 fi
22423
22424                         fi
22425                         if test $ac_cv_func_sched_yield = no &&
22426                            test $ac_cv_func_pthread_yield = no &&
22427                            test "$ac_cv_func_thr_yield" = no ; then
22428                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
22429 $as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
22430                         fi
22431
22432                                                 for ac_func in pthread_kill
22433 do :
22434   ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
22435 if test "x$ac_cv_func_pthread_kill" = xyes; then :
22436   cat >>confdefs.h <<_ACEOF
22437 #define HAVE_PTHREAD_KILL 1
22438 _ACEOF
22439
22440 fi
22441 done
22442
22443
22444                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
22445 $as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
22446 if ${ol_cv_func_pthread_rwlock_destroy+:} false; then :
22447   $as_echo_n "(cached) " >&6
22448 else
22449
22450                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22451 /* end confdefs.h.  */
22452
22453 #include <pthread.h>
22454 pthread_rwlock_t rwlock;
22455
22456 int
22457 main ()
22458 {
22459 pthread_rwlock_destroy(&rwlock);
22460   ;
22461   return 0;
22462 }
22463 _ACEOF
22464 if ac_fn_c_try_link "$LINENO"; then :
22465   ol_cv_func_pthread_rwlock_destroy=yes
22466 else
22467   ol_cv_func_pthread_rwlock_destroy=no
22468 fi
22469 rm -f core conftest.err conftest.$ac_objext \
22470     conftest$ac_exeext conftest.$ac_ext
22471
22472 fi
22473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
22474 $as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
22475                         if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
22476
22477 $as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
22478
22479                         fi
22480
22481                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
22482 $as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
22483 if ${ol_cv_func_pthread_detach+:} false; then :
22484   $as_echo_n "(cached) " >&6
22485 else
22486
22487                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22488 /* end confdefs.h.  */
22489
22490 #include <pthread.h>
22491 #ifndef NULL
22492 #define NULL (void*)0
22493 #endif
22494
22495 int
22496 main ()
22497 {
22498 pthread_detach(NULL);
22499   ;
22500   return 0;
22501 }
22502 _ACEOF
22503 if ac_fn_c_try_link "$LINENO"; then :
22504   ol_cv_func_pthread_detach=yes
22505 else
22506   ol_cv_func_pthread_detach=no
22507 fi
22508 rm -f core conftest.err conftest.$ac_objext \
22509     conftest$ac_exeext conftest.$ac_ext
22510
22511 fi
22512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
22513 $as_echo "$ol_cv_func_pthread_detach" >&6; }
22514
22515                         if test $ol_cv_func_pthread_detach = no ; then
22516                                 as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
22517                         fi
22518
22519
22520 $as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
22521
22522
22523                                                 for ac_func in \
22524                                 pthread_setconcurrency \
22525                                 pthread_getconcurrency \
22526                                 thr_setconcurrency \
22527                                 thr_getconcurrency \
22528
22529 do :
22530   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22531 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22532 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
22533   cat >>confdefs.h <<_ACEOF
22534 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22535 _ACEOF
22536
22537 fi
22538 done
22539
22540
22541
22542         for ac_func in pthread_kill_other_threads_np
22543 do :
22544   ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
22545 if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes; then :
22546   cat >>confdefs.h <<_ACEOF
22547 #define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
22548 _ACEOF
22549
22550 fi
22551 done
22552
22553         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
22554 $as_echo_n "checking for LinuxThreads implementation... " >&6; }
22555 if ${ol_cv_sys_linux_threads+:} false; then :
22556   $as_echo_n "(cached) " >&6
22557 else
22558   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
22559 fi
22560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
22561 $as_echo "$ol_cv_sys_linux_threads" >&6; }
22562
22563
22564
22565
22566         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
22567 $as_echo_n "checking for LinuxThreads consistency... " >&6; }
22568 if ${ol_cv_linux_threads+:} false; then :
22569   $as_echo_n "(cached) " >&6
22570 else
22571
22572                 if test $ol_cv_header_linux_threads = yes &&
22573                    test $ol_cv_sys_linux_threads = yes; then
22574                         ol_cv_linux_threads=yes
22575                 elif test $ol_cv_header_linux_threads = no &&
22576                      test $ol_cv_sys_linux_threads = no; then
22577                         ol_cv_linux_threads=no
22578                 else
22579                         ol_cv_linux_threads=error
22580                 fi
22581
22582 fi
22583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
22584 $as_echo "$ol_cv_linux_threads" >&6; }
22585
22586
22587                         if test $ol_cv_linux_threads = error; then
22588                                 as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
22589                         fi
22590
22591                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
22592 $as_echo_n "checking if pthread_create() works... " >&6; }
22593 if ${ol_cv_pthread_create_works+:} false; then :
22594   $as_echo_n "(cached) " >&6
22595 else
22596
22597                         if test "$cross_compiling" = yes; then :
22598                                 ol_cv_pthread_create_works=yes
22599 else
22600   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22601 /* end confdefs.h.  */
22602
22603
22604 /* pthread test headers */
22605 #include <pthread.h>
22606 #if HAVE_PTHREADS < 7
22607 #include <errno.h>
22608 #endif
22609 #ifndef NULL
22610 #define NULL (void*)0
22611 #endif
22612
22613 static void *task(p)
22614         void *p;
22615 {
22616         return (void *) (p == NULL);
22617 }
22618
22619
22620 int main(argc, argv)
22621         int argc;
22622         char **argv;
22623 {
22624
22625         /* pthread test function */
22626 #ifndef PTHREAD_CREATE_DETACHED
22627 #define PTHREAD_CREATE_DETACHED 1
22628 #endif
22629         pthread_t t;
22630         int status;
22631         int detach = PTHREAD_CREATE_DETACHED;
22632
22633 #if HAVE_PTHREADS > 4
22634         /* Final pthreads */
22635         pthread_attr_t attr;
22636
22637         status = pthread_attr_init(&attr);
22638         if( status ) return status;
22639
22640 #if HAVE_PTHREADS < 7
22641         status = pthread_attr_setdetachstate(&attr, &detach);
22642         if( status < 0 ) status = errno;
22643 #else
22644         status = pthread_attr_setdetachstate(&attr, detach);
22645 #endif
22646         if( status ) return status;
22647         status = pthread_create( &t, &attr, task, NULL );
22648 #if HAVE_PTHREADS < 7
22649         if( status < 0 ) status = errno;
22650 #endif
22651         if( status ) return status;
22652 #else
22653         /* Draft 4 pthreads */
22654         status = pthread_create( &t, pthread_attr_default, task, NULL );
22655         if( status ) return errno;
22656
22657         /* give thread a chance to complete */
22658         /* it should remain joinable and hence detachable */
22659         sleep( 1 );
22660
22661         status = pthread_detach( &t );
22662         if( status ) return errno;
22663 #endif
22664
22665 #ifdef HAVE_LINUX_THREADS
22666         pthread_kill_other_threads_np();
22667 #endif
22668
22669         return 0;
22670
22671 }
22672
22673 _ACEOF
22674 if ac_fn_c_try_run "$LINENO"; then :
22675   ol_cv_pthread_create_works=yes
22676 else
22677   ol_cv_pthread_create_works=no
22678 fi
22679 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22680   conftest.$ac_objext conftest.beam conftest.$ac_ext
22681 fi
22682
22683 fi
22684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
22685 $as_echo "$ol_cv_pthread_create_works" >&6; }
22686
22687                         if test $ol_cv_pthread_create_works = no ; then
22688                                 as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
22689                         fi
22690
22691                         ol_replace_broken_yield=no
22692
22693                         if test $ol_replace_broken_yield = yes ; then
22694
22695 $as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
22696
22697                         fi
22698
22699                                                 if test x$ol_with_yielding_select = xauto ; then
22700                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
22701 $as_echo_n "checking if select yields when using pthreads... " >&6; }
22702 if ${ol_cv_pthread_select_yields+:} false; then :
22703   $as_echo_n "(cached) " >&6
22704 else
22705
22706                                 if test "$cross_compiling" = yes; then :
22707   ol_cv_pthread_select_yields=cross
22708 else
22709   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22710 /* end confdefs.h.  */
22711
22712 #include <sys/types.h>
22713 #include <sys/time.h>
22714 #include <unistd.h>
22715 #include <pthread.h>
22716 #ifndef NULL
22717 #define NULL (void*) 0
22718 #endif
22719
22720 static int fildes[2];
22721
22722 static void *task(p)
22723         void *p;
22724 {
22725         int i;
22726         struct timeval tv;
22727
22728         fd_set rfds;
22729
22730         tv.tv_sec=10;
22731         tv.tv_usec=0;
22732
22733         FD_ZERO(&rfds);
22734         FD_SET(fildes[0], &rfds);
22735
22736         /* we're not interested in any fds */
22737         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
22738
22739         if(i < 0) {
22740                 perror("select");
22741                 exit(10);
22742         }
22743
22744         exit(0); /* if we exit here, the select blocked the whole process */
22745 }
22746
22747 int main(argc, argv)
22748         int argc;
22749         char **argv;
22750 {
22751         pthread_t t;
22752
22753         /* create a pipe to select */
22754         if(pipe(&fildes[0])) {
22755                 perror("select");
22756                 exit(1);
22757         }
22758
22759 #ifdef HAVE_PTHREAD_SETCONCURRENCY
22760         (void) pthread_setconcurrency(2);
22761 #else
22762 #ifdef HAVE_THR_SETCONCURRENCY
22763         /* Set Solaris LWP concurrency to 2 */
22764         thr_setconcurrency(2);
22765 #endif
22766 #endif
22767
22768 #if HAVE_PTHREADS < 6
22769         pthread_create(&t, pthread_attr_default, task, NULL);
22770 #else
22771         pthread_create(&t, NULL, task, NULL);
22772 #endif
22773
22774         /* make sure task runs first */
22775 #ifdef HAVE_THR_YIELD
22776         thr_yield();
22777 #elif defined( HAVE_SCHED_YIELD )
22778         sched_yield();
22779 #elif defined( HAVE_PTHREAD_YIELD )
22780         pthread_yield();
22781 #endif
22782
22783         exit(2);
22784 }
22785 _ACEOF
22786 if ac_fn_c_try_run "$LINENO"; then :
22787   ol_cv_pthread_select_yields=no
22788 else
22789   ol_cv_pthread_select_yields=yes
22790 fi
22791 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22792   conftest.$ac_objext conftest.beam conftest.$ac_ext
22793 fi
22794
22795 fi
22796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
22797 $as_echo "$ol_cv_pthread_select_yields" >&6; }
22798
22799                                 if test $ol_cv_pthread_select_yields = cross ; then
22800                                         as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
22801                                 fi
22802
22803                                 if test $ol_cv_pthread_select_yields = yes ; then
22804                                         ol_with_yielding_select=yes
22805                                 fi
22806                         fi
22807
22808                                                 CPPFLAGS="$save_CPPFLAGS"
22809                         LIBS="$save_LIBS"
22810                 else
22811                         as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
22812                 fi
22813         fi
22814
22815         if test $ol_with_threads = posix ; then
22816                 as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
22817         fi
22818         ;;
22819 esac
22820
22821 case $ol_with_threads in auto | yes | mach)
22822
22823                 for ac_header in mach/cthreads.h cthreads.h
22824 do :
22825   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22826 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22827 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
22828   cat >>confdefs.h <<_ACEOF
22829 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22830 _ACEOF
22831
22832 fi
22833
22834 done
22835
22836         if test $ac_cv_header_mach_cthreads_h = yes ; then
22837                 ol_with_threads=found
22838
22839                                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
22840 if test "x$ac_cv_func_cthread_fork" = xyes; then :
22841   ol_link_threads=yes
22842 fi
22843
22844
22845                 if test $ol_link_threads = no ; then
22846                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
22847 $as_echo_n "checking for cthread_fork with -all_load... " >&6; }
22848 if ${ol_cv_cthread_all_load+:} false; then :
22849   $as_echo_n "(cached) " >&6
22850 else
22851
22852                                                                 save_LIBS="$LIBS"
22853                                 LIBS="-all_load $LIBS"
22854                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22855 /* end confdefs.h.  */
22856 #include <mach/cthreads.h>
22857 int
22858 main ()
22859 {
22860
22861                                         cthread_fork((void *)0, (void *)0);
22862
22863   ;
22864   return 0;
22865 }
22866 _ACEOF
22867 if ac_fn_c_try_link "$LINENO"; then :
22868   ol_cv_cthread_all_load=yes
22869 else
22870   ol_cv_cthread_all_load=no
22871 fi
22872 rm -f core conftest.err conftest.$ac_objext \
22873     conftest$ac_exeext conftest.$ac_ext
22874                                                                 LIBS="$save_LIBS"
22875
22876 fi
22877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
22878 $as_echo "$ol_cv_cthread_all_load" >&6; }
22879
22880                         if test $ol_cv_cthread_all_load = yes ; then
22881                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
22882                                 ol_link_threads=mach
22883                                 ol_with_threads=found
22884                         fi
22885                 fi
22886
22887         elif test $ac_cv_header_cthreads_h = yes ; then
22888
22889                 ol_with_threads=found
22890
22891                                 save_LIBS="$LIBS"
22892                 LIBS="$LIBS -lthreads"
22893                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
22894 if test "x$ac_cv_func_cthread_fork" = xyes; then :
22895   ol_link_threads=yes
22896 fi
22897
22898                 LIBS="$save_LIBS"
22899
22900                 if test $ol_link_threads = yes ; then
22901                         LTHREAD_LIBS="-lthreads"
22902                         ol_link_threads=mach
22903                         ol_with_threads=found
22904                 else
22905                         as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
22906                 fi
22907
22908         elif test $ol_with_threads = mach ; then
22909                 as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
22910         fi
22911
22912         if test $ol_link_threads = mach ; then
22913
22914 $as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
22915
22916         elif test $ol_with_threads = found ; then
22917                 as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
22918         fi
22919         ;;
22920 esac
22921
22922 case $ol_with_threads in auto | yes | pth)
22923
22924         for ac_header in pth.h
22925 do :
22926   ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
22927 if test "x$ac_cv_header_pth_h" = xyes; then :
22928   cat >>confdefs.h <<_ACEOF
22929 #define HAVE_PTH_H 1
22930 _ACEOF
22931
22932 fi
22933
22934 done
22935
22936
22937         if test $ac_cv_header_pth_h = yes ; then
22938                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
22939 $as_echo_n "checking for pth_version in -lpth... " >&6; }
22940 if ${ac_cv_lib_pth_pth_version+:} false; then :
22941   $as_echo_n "(cached) " >&6
22942 else
22943   ac_check_lib_save_LIBS=$LIBS
22944 LIBS="-lpth  $LIBS"
22945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22946 /* end confdefs.h.  */
22947
22948 /* Override any GCC internal prototype to avoid an error.
22949    Use char because int might match the return type of a GCC
22950    builtin and then its argument prototype would still apply.  */
22951 #ifdef __cplusplus
22952 extern "C"
22953 #endif
22954 char pth_version ();
22955 int
22956 main ()
22957 {
22958 return pth_version ();
22959   ;
22960   return 0;
22961 }
22962 _ACEOF
22963 if ac_fn_c_try_link "$LINENO"; then :
22964   ac_cv_lib_pth_pth_version=yes
22965 else
22966   ac_cv_lib_pth_pth_version=no
22967 fi
22968 rm -f core conftest.err conftest.$ac_objext \
22969     conftest$ac_exeext conftest.$ac_ext
22970 LIBS=$ac_check_lib_save_LIBS
22971 fi
22972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
22973 $as_echo "$ac_cv_lib_pth_pth_version" >&6; }
22974 if test "x$ac_cv_lib_pth_pth_version" = xyes; then :
22975   have_pth=yes
22976 else
22977   have_pth=no
22978 fi
22979
22980
22981                 if test $have_pth = yes ; then
22982
22983 $as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
22984
22985                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
22986                         ol_link_threads=pth
22987                         ol_with_threads=found
22988
22989                         if test x$ol_with_yielding_select = xauto ; then
22990                                 ol_with_yielding_select=yes
22991                         fi
22992                 fi
22993         fi
22994         ;;
22995 esac
22996
22997 case $ol_with_threads in auto | yes | lwp)
22998
22999                 for ac_header in thread.h synch.h
23000 do :
23001   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23002 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23003 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23004   cat >>confdefs.h <<_ACEOF
23005 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23006 _ACEOF
23007
23008 fi
23009
23010 done
23011
23012         if test $ac_cv_header_thread_h = yes &&
23013            test $ac_cv_header_synch_h = yes ; then
23014                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
23015 $as_echo_n "checking for thr_create in -lthread... " >&6; }
23016 if ${ac_cv_lib_thread_thr_create+:} false; then :
23017   $as_echo_n "(cached) " >&6
23018 else
23019   ac_check_lib_save_LIBS=$LIBS
23020 LIBS="-lthread  $LIBS"
23021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23022 /* end confdefs.h.  */
23023
23024 /* Override any GCC internal prototype to avoid an error.
23025    Use char because int might match the return type of a GCC
23026    builtin and then its argument prototype would still apply.  */
23027 #ifdef __cplusplus
23028 extern "C"
23029 #endif
23030 char thr_create ();
23031 int
23032 main ()
23033 {
23034 return thr_create ();
23035   ;
23036   return 0;
23037 }
23038 _ACEOF
23039 if ac_fn_c_try_link "$LINENO"; then :
23040   ac_cv_lib_thread_thr_create=yes
23041 else
23042   ac_cv_lib_thread_thr_create=no
23043 fi
23044 rm -f core conftest.err conftest.$ac_objext \
23045     conftest$ac_exeext conftest.$ac_ext
23046 LIBS=$ac_check_lib_save_LIBS
23047 fi
23048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
23049 $as_echo "$ac_cv_lib_thread_thr_create" >&6; }
23050 if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
23051   have_thr=yes
23052 else
23053   have_thr=no
23054 fi
23055
23056
23057                 if test $have_thr = yes ; then
23058
23059 $as_echo "#define HAVE_THR 1" >>confdefs.h
23060
23061                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
23062                         ol_link_threads=thr
23063
23064                         if test x$ol_with_yielding_select = xauto ; then
23065                                 ol_with_yielding_select=yes
23066                         fi
23067
23068                                                 for ac_func in \
23069                                 thr_setconcurrency \
23070                                 thr_getconcurrency \
23071
23072 do :
23073   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23074 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23075 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
23076   cat >>confdefs.h <<_ACEOF
23077 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23078 _ACEOF
23079
23080 fi
23081 done
23082
23083                 fi
23084         fi
23085
23086                 for ac_header in lwp/lwp.h
23087 do :
23088   ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
23089 if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
23090   cat >>confdefs.h <<_ACEOF
23091 #define HAVE_LWP_LWP_H 1
23092 _ACEOF
23093
23094 fi
23095
23096 done
23097
23098         if test $ac_cv_header_lwp_lwp_h = yes ; then
23099                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
23100 $as_echo_n "checking for lwp_create in -llwp... " >&6; }
23101 if ${ac_cv_lib_lwp_lwp_create+:} false; then :
23102   $as_echo_n "(cached) " >&6
23103 else
23104   ac_check_lib_save_LIBS=$LIBS
23105 LIBS="-llwp  $LIBS"
23106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23107 /* end confdefs.h.  */
23108
23109 /* Override any GCC internal prototype to avoid an error.
23110    Use char because int might match the return type of a GCC
23111    builtin and then its argument prototype would still apply.  */
23112 #ifdef __cplusplus
23113 extern "C"
23114 #endif
23115 char lwp_create ();
23116 int
23117 main ()
23118 {
23119 return lwp_create ();
23120   ;
23121   return 0;
23122 }
23123 _ACEOF
23124 if ac_fn_c_try_link "$LINENO"; then :
23125   ac_cv_lib_lwp_lwp_create=yes
23126 else
23127   ac_cv_lib_lwp_lwp_create=no
23128 fi
23129 rm -f core conftest.err conftest.$ac_objext \
23130     conftest$ac_exeext conftest.$ac_ext
23131 LIBS=$ac_check_lib_save_LIBS
23132 fi
23133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
23134 $as_echo "$ac_cv_lib_lwp_lwp_create" >&6; }
23135 if test "x$ac_cv_lib_lwp_lwp_create" = xyes; then :
23136   have_lwp=yes
23137 else
23138   have_lwp=no
23139 fi
23140
23141
23142                 if test $have_lwp = yes ; then
23143
23144 $as_echo "#define HAVE_LWP 1" >>confdefs.h
23145
23146                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
23147                         ol_link_threads=lwp
23148
23149                         if test x$ol_with_yielding_select = xauto ; then
23150                                 ol_with_yielding_select=no
23151                         fi
23152                 fi
23153         fi
23154         ;;
23155 esac
23156
23157 if test $ol_with_yielding_select = yes ; then
23158
23159 $as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
23160
23161 fi
23162
23163 if test $ol_with_threads = manual ; then
23164                 ol_link_threads=yes
23165
23166         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
23167 $as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
23168
23169         for ac_header in pthread.h sched.h
23170 do :
23171   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23172 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23173 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23174   cat >>confdefs.h <<_ACEOF
23175 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23176 _ACEOF
23177
23178 fi
23179
23180 done
23181
23182         for ac_func in sched_yield pthread_yield
23183 do :
23184   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23185 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23186 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
23187   cat >>confdefs.h <<_ACEOF
23188 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23189 _ACEOF
23190
23191 fi
23192 done
23193
23194
23195         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
23196 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
23197 if ${ol_cv_header_linux_threads+:} false; then :
23198   $as_echo_n "(cached) " >&6
23199 else
23200   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23201 /* end confdefs.h.  */
23202 #include <pthread.h>
23203 _ACEOF
23204 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23205   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
23206   ol_cv_header_linux_threads=yes
23207 else
23208   ol_cv_header_linux_threads=no
23209 fi
23210 rm -f conftest*
23211
23212
23213 fi
23214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
23215 $as_echo "$ol_cv_header_linux_threads" >&6; }
23216         if test $ol_cv_header_linux_threads = yes; then
23217
23218 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
23219
23220         fi
23221
23222
23223         for ac_header in mach/cthreads.h
23224 do :
23225   ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
23226 if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
23227   cat >>confdefs.h <<_ACEOF
23228 #define HAVE_MACH_CTHREADS_H 1
23229 _ACEOF
23230
23231 fi
23232
23233 done
23234
23235         for ac_header in lwp/lwp.h
23236 do :
23237   ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
23238 if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
23239   cat >>confdefs.h <<_ACEOF
23240 #define HAVE_LWP_LWP_H 1
23241 _ACEOF
23242
23243 fi
23244
23245 done
23246
23247         for ac_header in thread.h synch.h
23248 do :
23249   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23250 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23251 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23252   cat >>confdefs.h <<_ACEOF
23253 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23254 _ACEOF
23255
23256 fi
23257
23258 done
23259
23260 fi
23261
23262 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
23263
23264 $as_echo "#define REENTRANT 1" >>confdefs.h
23265
23266
23267 $as_echo "#define _REENTRANT 1" >>confdefs.h
23268
23269
23270 $as_echo "#define THREAD_SAFE 1" >>confdefs.h
23271
23272
23273 $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
23274
23275
23276 $as_echo "#define THREADSAFE 1" >>confdefs.h
23277
23278
23279 $as_echo "#define _THREADSAFE 1" >>confdefs.h
23280
23281
23282 $as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
23283
23284
23285                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
23286 $as_echo_n "checking for thread specific errno... " >&6; }
23287 if ${ol_cv_errno_thread_specific+:} false; then :
23288   $as_echo_n "(cached) " >&6
23289 else
23290
23291                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23292 /* end confdefs.h.  */
23293 #include <errno.h>
23294 int
23295 main ()
23296 {
23297 errno = 0;
23298   ;
23299   return 0;
23300 }
23301 _ACEOF
23302 if ac_fn_c_try_link "$LINENO"; then :
23303   ol_cv_errno_thread_specific=yes
23304 else
23305   ol_cv_errno_thread_specific=no
23306 fi
23307 rm -f core conftest.err conftest.$ac_objext \
23308     conftest$ac_exeext conftest.$ac_ext
23309
23310 fi
23311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
23312 $as_echo "$ol_cv_errno_thread_specific" >&6; }
23313
23314                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
23315 $as_echo_n "checking for thread specific h_errno... " >&6; }
23316 if ${ol_cv_h_errno_thread_specific+:} false; then :
23317   $as_echo_n "(cached) " >&6
23318 else
23319
23320                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23321 /* end confdefs.h.  */
23322 #include <netdb.h>
23323 int
23324 main ()
23325 {
23326 h_errno = 0;
23327   ;
23328   return 0;
23329 }
23330 _ACEOF
23331 if ac_fn_c_try_link "$LINENO"; then :
23332   ol_cv_h_errno_thread_specific=yes
23333 else
23334   ol_cv_h_errno_thread_specific=no
23335 fi
23336 rm -f core conftest.err conftest.$ac_objext \
23337     conftest$ac_exeext conftest.$ac_ext
23338
23339 fi
23340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
23341 $as_echo "$ol_cv_h_errno_thread_specific" >&6; }
23342
23343         if test $ol_cv_errno_thread_specific != yes ||
23344            test $ol_cv_h_errno_thread_specific != yes ; then
23345                 LIBS="$LTHREAD_LIBS $LIBS"
23346                 LTHREAD_LIBS=""
23347         fi
23348
23349 fi
23350
23351 if test $ol_link_threads = no ; then
23352         if test $ol_with_threads = yes ; then
23353                 as_fn_error $? "no suitable thread support" "$LINENO" 5
23354         fi
23355
23356         if test $ol_with_threads = auto ; then
23357                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
23358 $as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
23359                 ol_with_threads=no
23360         fi
23361
23362
23363 $as_echo "#define NO_THREADS 1" >>confdefs.h
23364
23365         LTHREAD_LIBS=""
23366         BUILD_THREAD=no
23367 else
23368         BUILD_THREAD=yes
23369 fi
23370
23371 if test $ol_link_threads != no ; then
23372
23373 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
23374
23375 fi
23376
23377 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
23378 case "$ol_with_threads" in
23379  no)
23380     ol_pthread_ok=no
23381
23382     ;;
23383  *)
23384     ol_found_pthreads=yes
23385     ;;
23386 esac
23387
23388 ac_ext=c
23389 ac_cpp='$CPP $CPPFLAGS'
23390 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23391 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23392 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23393
23394
23395
23396
23397
23398
23399     case "$ol_found_pthreads" in
23400      yes)
23401         saved_LIBS="$LIBS"
23402         LIBS="$LTHREAD_LIBS $LIBS"
23403         saved_CFLAGS="$CFLAGS"
23404         CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
23405         for ac_func in sem_timedwait
23406 do :
23407   ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
23408 if test "x$ac_cv_func_sem_timedwait" = xyes; then :
23409   cat >>confdefs.h <<_ACEOF
23410 #define HAVE_SEM_TIMEDWAIT 1
23411 _ACEOF
23412
23413 fi
23414 done
23415
23416         LIBS="$saved_LIBS"
23417         { saved_LIBS=; unset saved_LIBS;}
23418         CFLAGS="$saved_CFLAGS"
23419         { saved_CFLAGS=; unset saved_CFLAGS;}
23420         case "$ac_cv_func_sem_timedwait" in
23421          yes)
23422             PTHREAD_LIBS="$LTHREAD_LIBS"
23423             have_pthreads=yes
23424         esac
23425     esac
23426 esac
23427
23428 case "$have_pthreads" in
23429  yes)
23430     CFLAGS_NTP="$CFLAGS_NTP $PTHREAD_CFLAGS"
23431     saved_LIBS="$LIBS"
23432     LIBS="$LTHREAD_LIBS $LIBS"
23433     saved_CFLAGS="$CFLAGS"
23434     CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
23435     # The cast to long int works around a bug in the HP C Compiler
23436 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23437 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23438 # This bug is HP SR number 8606223364.
23439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
23440 $as_echo_n "checking size of pthread_t... " >&6; }
23441 if ${ac_cv_sizeof_pthread_t+:} false; then :
23442   $as_echo_n "(cached) " >&6
23443 else
23444   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "
23445             $ac_includes_default
23446             #include <pthread.h>
23447
23448
23449 "; then :
23450
23451 else
23452   if test "$ac_cv_type_pthread_t" = yes; then
23453      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23454 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23455 as_fn_error 77 "cannot compute sizeof (pthread_t)
23456 See \`config.log' for more details" "$LINENO" 5; }
23457    else
23458      ac_cv_sizeof_pthread_t=0
23459    fi
23460 fi
23461
23462 fi
23463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
23464 $as_echo "$ac_cv_sizeof_pthread_t" >&6; }
23465
23466
23467
23468 cat >>confdefs.h <<_ACEOF
23469 #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
23470 _ACEOF
23471
23472
23473     LIBISC_PTHREADS_NOTHREADS=pthreads
23474
23475 $as_echo "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
23476
23477     #
23478     # We'd like to use sigwait() too
23479     #
23480     ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
23481 if test "x$ac_cv_func_sigwait" = xyes; then :
23482   have_sigwait=yes
23483 else
23484   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
23485 $as_echo_n "checking for sigwait in -lc... " >&6; }
23486 if ${ac_cv_lib_c_sigwait+:} false; then :
23487   $as_echo_n "(cached) " >&6
23488 else
23489   ac_check_lib_save_LIBS=$LIBS
23490 LIBS="-lc  $LIBS"
23491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23492 /* end confdefs.h.  */
23493
23494 /* Override any GCC internal prototype to avoid an error.
23495    Use char because int might match the return type of a GCC
23496    builtin and then its argument prototype would still apply.  */
23497 #ifdef __cplusplus
23498 extern "C"
23499 #endif
23500 char sigwait ();
23501 int
23502 main ()
23503 {
23504 return sigwait ();
23505   ;
23506   return 0;
23507 }
23508 _ACEOF
23509 if ac_fn_c_try_link "$LINENO"; then :
23510   ac_cv_lib_c_sigwait=yes
23511 else
23512   ac_cv_lib_c_sigwait=no
23513 fi
23514 rm -f core conftest.err conftest.$ac_objext \
23515     conftest$ac_exeext conftest.$ac_ext
23516 LIBS=$ac_check_lib_save_LIBS
23517 fi
23518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
23519 $as_echo "$ac_cv_lib_c_sigwait" >&6; }
23520 if test "x$ac_cv_lib_c_sigwait" = xyes; then :
23521   have_sigwait=yes
23522 else
23523   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
23524 $as_echo_n "checking for sigwait in -lpthread... " >&6; }
23525 if ${ac_cv_lib_pthread_sigwait+:} false; then :
23526   $as_echo_n "(cached) " >&6
23527 else
23528   ac_check_lib_save_LIBS=$LIBS
23529 LIBS="-lpthread  $LIBS"
23530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23531 /* end confdefs.h.  */
23532
23533 /* Override any GCC internal prototype to avoid an error.
23534    Use char because int might match the return type of a GCC
23535    builtin and then its argument prototype would still apply.  */
23536 #ifdef __cplusplus
23537 extern "C"
23538 #endif
23539 char sigwait ();
23540 int
23541 main ()
23542 {
23543 return sigwait ();
23544   ;
23545   return 0;
23546 }
23547 _ACEOF
23548 if ac_fn_c_try_link "$LINENO"; then :
23549   ac_cv_lib_pthread_sigwait=yes
23550 else
23551   ac_cv_lib_pthread_sigwait=no
23552 fi
23553 rm -f core conftest.err conftest.$ac_objext \
23554     conftest$ac_exeext conftest.$ac_ext
23555 LIBS=$ac_check_lib_save_LIBS
23556 fi
23557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
23558 $as_echo "$ac_cv_lib_pthread_sigwait" >&6; }
23559 if test "x$ac_cv_lib_pthread_sigwait" = xyes; then :
23560   have_sigwait=yes
23561 else
23562   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
23563 $as_echo_n "checking for _Psigwait in -lpthread... " >&6; }
23564 if ${ac_cv_lib_pthread__Psigwait+:} false; then :
23565   $as_echo_n "(cached) " >&6
23566 else
23567   ac_check_lib_save_LIBS=$LIBS
23568 LIBS="-lpthread  $LIBS"
23569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23570 /* end confdefs.h.  */
23571
23572 /* Override any GCC internal prototype to avoid an error.
23573    Use char because int might match the return type of a GCC
23574    builtin and then its argument prototype would still apply.  */
23575 #ifdef __cplusplus
23576 extern "C"
23577 #endif
23578 char _Psigwait ();
23579 int
23580 main ()
23581 {
23582 return _Psigwait ();
23583   ;
23584   return 0;
23585 }
23586 _ACEOF
23587 if ac_fn_c_try_link "$LINENO"; then :
23588   ac_cv_lib_pthread__Psigwait=yes
23589 else
23590   ac_cv_lib_pthread__Psigwait=no
23591 fi
23592 rm -f core conftest.err conftest.$ac_objext \
23593     conftest$ac_exeext conftest.$ac_ext
23594 LIBS=$ac_check_lib_save_LIBS
23595 fi
23596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
23597 $as_echo "$ac_cv_lib_pthread__Psigwait" >&6; }
23598 if test "x$ac_cv_lib_pthread__Psigwait" = xyes; then :
23599   have_sigwait=yes
23600 else
23601   have_sigwait=no
23602
23603 fi
23604
23605
23606 fi
23607
23608
23609 fi
23610
23611
23612 fi
23613
23614     case "$host:$have_sigwait" in
23615      *-freebsd*:no)
23616         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
23617 $as_echo_n "checking for sigwait in -lc_r... " >&6; }
23618 if ${ac_cv_lib_c_r_sigwait+:} false; then :
23619   $as_echo_n "(cached) " >&6
23620 else
23621   ac_check_lib_save_LIBS=$LIBS
23622 LIBS="-lc_r  $LIBS"
23623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23624 /* end confdefs.h.  */
23625
23626 /* Override any GCC internal prototype to avoid an error.
23627    Use char because int might match the return type of a GCC
23628    builtin and then its argument prototype would still apply.  */
23629 #ifdef __cplusplus
23630 extern "C"
23631 #endif
23632 char sigwait ();
23633 int
23634 main ()
23635 {
23636 return sigwait ();
23637   ;
23638   return 0;
23639 }
23640 _ACEOF
23641 if ac_fn_c_try_link "$LINENO"; then :
23642   ac_cv_lib_c_r_sigwait=yes
23643 else
23644   ac_cv_lib_c_r_sigwait=no
23645 fi
23646 rm -f core conftest.err conftest.$ac_objext \
23647     conftest$ac_exeext conftest.$ac_ext
23648 LIBS=$ac_check_lib_save_LIBS
23649 fi
23650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
23651 $as_echo "$ac_cv_lib_c_r_sigwait" >&6; }
23652 if test "x$ac_cv_lib_c_r_sigwait" = xyes; then :
23653   have_sigwait=yes
23654
23655 fi
23656
23657     esac
23658     case "$have_sigwait" in
23659      yes)
23660         ac_cv_func_sigwait=yes
23661
23662 $as_echo "#define HAVE_SIGWAIT 1" >>confdefs.h
23663
23664     esac
23665
23666     for ac_func in pthread_attr_getstacksize
23667 do :
23668   ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
23669 if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes; then :
23670   cat >>confdefs.h <<_ACEOF
23671 #define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
23672 _ACEOF
23673
23674 fi
23675 done
23676
23677     for ac_func in pthread_attr_setstacksize sysconf
23678 do :
23679   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23680 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23681 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
23682   cat >>confdefs.h <<_ACEOF
23683 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23684 _ACEOF
23685
23686 fi
23687 done
23688
23689
23690     case "$host" in
23691      *-freebsd5.[012]|*-freebsd5.[012].*)
23692         ;;
23693      *-freebsd5.[3456789]|*-freebsd5.[3456789].*|*-freebsd6.*)
23694
23695 $as_echo "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
23696
23697         ;;
23698      *-bsdi3.*|*-bsdi4.0*)
23699
23700 $as_echo "#define NEED_PTHREAD_INIT 1" >>confdefs.h
23701
23702         ;;
23703      *-linux*)
23704
23705 $as_echo "#define HAVE_LINUXTHREADS 1" >>confdefs.h
23706
23707         ;;
23708      *-solaris*)
23709         $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
23710
23711         for ac_func in pthread_setconcurrency
23712 do :
23713   ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
23714 if test "x$ac_cv_func_pthread_setconcurrency" = xyes; then :
23715   cat >>confdefs.h <<_ACEOF
23716 #define HAVE_PTHREAD_SETCONCURRENCY 1
23717 _ACEOF
23718
23719 fi
23720 done
23721
23722         case "$ac_cv_func_pthread_setconcurrency" in
23723          yes)
23724
23725 $as_echo "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
23726
23727         esac
23728         ;;
23729      *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
23730
23731 $as_echo "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
23732
23733         ;;
23734     esac
23735     hack_shutup_pthreadonceinit=no
23736     case "$host" in
23737      *-aix5.[123].*)
23738         hack_shutup_pthreadonceinit=yes
23739         ;;
23740      *-solaris2.[89])
23741         hack_shutup_pthreadonceinit=yes
23742         ;;
23743      *-solaris2.1[0-9])
23744         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
23745 $as_echo_n "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
23746 if ${ntp_cv_braces_around_pthread_once_init+:} false; then :
23747   $as_echo_n "(cached) " >&6
23748 else
23749   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23750 /* end confdefs.h.  */
23751
23752                         #include <pthread.h>
23753
23754 int
23755 main ()
23756 {
23757
23758                         static pthread_once_t once_test =
23759                                                 PTHREAD_ONCE_INIT;
23760
23761
23762   ;
23763   return 0;
23764 }
23765 _ACEOF
23766 if ac_fn_c_try_compile "$LINENO"; then :
23767   ntp_cv_braces_around_pthread_once_init=no
23768 else
23769   ntp_cv_braces_around_pthread_once_init=yes
23770
23771 fi
23772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23773
23774 fi
23775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
23776 $as_echo "$ntp_cv_braces_around_pthread_once_init" >&6; }
23777         case "$ntp_cv_braces_around_pthread_once_init" in
23778          yes)
23779             hack_shutup_pthreadonceinit=yes
23780         esac
23781         ;;
23782     esac
23783     case "$hack_shutup_pthreadonceinit" in
23784      yes)
23785
23786 $as_echo "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
23787
23788     esac
23789     LIBS="$saved_LIBS"
23790     { saved_LIBS=; unset saved_LIBS;}
23791     CFLAGS="$saved_CFLAGS"
23792     { saved_CFLAGS=; unset saved_CFLAGS;}
23793     ;;
23794  *)
23795     LIBISC_PTHREADS_NOTHREADS=nothreads
23796     ;;
23797 esac
23798
23799  if test "$have_pthreads" != "no"; then
23800   PTHREADS_TRUE=
23801   PTHREADS_FALSE='#'
23802 else
23803   PTHREADS_TRUE='#'
23804   PTHREADS_FALSE=
23805 fi
23806
23807
23808
23809
23810
23811
23812
23813 case "$hw_use_rpl_vsnprintf:$hw_cv_func_vsnprintf" in
23814  no:yes)
23815     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
23816 $as_echo_n "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
23817 if ${ntp_cv_vsnprintf_percent_m+:} false; then :
23818   $as_echo_n "(cached) " >&6
23819 else
23820   if test "$cross_compiling" = yes; then :
23821   ntp_cv_vsnprintf_percent_m=no
23822
23823 else
23824   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23825 /* end confdefs.h.  */
23826
23827                     #include <stdarg.h>
23828                     #include <errno.h>
23829                     #include <stdio.h>
23830                     #include <string.h>
23831
23832                     int call_vsnprintf(
23833                             char *      dst,
23834                             size_t      sz,
23835                             const char *fmt,
23836                             ...
23837                             );
23838
23839                     int call_vsnprintf(
23840                             char *      dst,
23841                             size_t      sz,
23842                             const char *fmt,
23843                             ...
23844                             )
23845                     {
23846                             va_list     ap;
23847                             int         rc;
23848
23849                             va_start(ap, fmt);
23850                             rc = vsnprintf(dst, sz, fmt, ap);
23851                             va_end(ap);
23852
23853                             return rc;
23854                     }
23855
23856 int
23857 main ()
23858 {
23859
23860                     char        sbuf[512];
23861                     char        pbuf[512];
23862                     int         slen;
23863
23864                     strcpy(sbuf, strerror(ENOENT));
23865                     errno = ENOENT;
23866                     slen = call_vsnprintf(pbuf, sizeof(pbuf), "%m",
23867                                           "wrong");
23868                     return strcmp(sbuf, pbuf);
23869
23870
23871   ;
23872   return 0;
23873 }
23874 _ACEOF
23875 if ac_fn_c_try_run "$LINENO"; then :
23876   ntp_cv_vsnprintf_percent_m=yes
23877 else
23878   ntp_cv_vsnprintf_percent_m=no
23879 fi
23880 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23881   conftest.$ac_objext conftest.beam conftest.$ac_ext
23882 fi
23883
23884
23885 fi
23886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
23887 $as_echo "$ntp_cv_vsnprintf_percent_m" >&6; }
23888     case "$ntp_cv_vsnprintf_percent_m" in
23889      yes)
23890
23891 $as_echo "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
23892
23893     esac
23894 esac
23895
23896 for ac_header in sys/clockctl.h
23897 do :
23898   ac_fn_c_check_header_mongrel "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
23899 if test "x$ac_cv_header_sys_clockctl_h" = xyes; then :
23900   cat >>confdefs.h <<_ACEOF
23901 #define HAVE_SYS_CLOCKCTL_H 1
23902 _ACEOF
23903
23904 fi
23905
23906 done
23907
23908
23909 # Check whether --enable-clockctl was given.
23910 if test "${enable_clockctl+set}" = set; then :
23911   enableval=$enable_clockctl; ntp_use_dev_clockctl=$enableval
23912 else
23913   ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h
23914
23915 fi
23916
23917
23918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
23919 $as_echo_n "checking if we should use /dev/clockctl... " >&6; }
23920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
23921 $as_echo "$ntp_use_dev_clockctl" >&6; }
23922
23923
23924 for ac_header in sys/capability.h sys/prctl.h
23925 do :
23926   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23927 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23928 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23929   cat >>confdefs.h <<_ACEOF
23930 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23931 _ACEOF
23932
23933 fi
23934
23935 done
23936
23937
23938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
23939 $as_echo_n "checking if we have linux capabilities (libcap)... " >&6; }
23940
23941 case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
23942  yesyes)
23943     case "$host" in
23944      mips-sgi-irix*)
23945         ntp_have_linuxcaps=no
23946         ;;
23947      *) ntp_have_linuxcaps=yes
23948         ;;
23949     esac
23950     ;;
23951  *)
23952     ntp_have_linuxcaps=no
23953     ;;
23954 esac
23955
23956 # Check whether --enable-linuxcaps was given.
23957 if test "${enable_linuxcaps+set}" = set; then :
23958   enableval=$enable_linuxcaps; ntp_have_linuxcaps=$enableval
23959
23960 fi
23961
23962
23963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
23964 $as_echo "$ntp_have_linuxcaps" >&6; }
23965
23966 case "$ntp_have_linuxcaps" in
23967  yes)
23968
23969 $as_echo "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
23970
23971     LIBS="$LIBS -lcap"
23972     ;;
23973 esac
23974
23975
23976 for ac_header in priv.h
23977 do :
23978   ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
23979 if test "x$ac_cv_header_priv_h" = xyes; then :
23980   cat >>confdefs.h <<_ACEOF
23981 #define HAVE_PRIV_H 1
23982 _ACEOF
23983
23984 fi
23985
23986 done
23987
23988 case "$ac_cv_header_priv_h" in
23989  yes)
23990     case "$host" in
23991      *-solaris*)
23992         ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
23993 if test "x$ac_cv_func_setppriv" = xyes; then :
23994   ntp_have_solarisprivs=yes
23995 else
23996   ntp_have_solarisprivs=no
23997
23998 fi
23999
24000         ;;
24001     esac
24002 esac
24003
24004 # Check whether --enable-solarisprivs was given.
24005 if test "${enable_solarisprivs+set}" = set; then :
24006   enableval=$enable_solarisprivs; ntp_have_solarisprivs=$enableval
24007
24008 fi
24009
24010
24011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
24012 $as_echo_n "checking if we have solaris privileges... " >&6; }
24013
24014 case "$ntp_have_solarisprivs" in
24015  yes)
24016
24017 $as_echo "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
24018
24019 esac
24020
24021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
24022 $as_echo "$ntp_have_solarisprivs" >&6; }
24023
24024 case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs" in
24025  *yes*)
24026
24027 $as_echo "#define HAVE_DROPROOT 1" >>confdefs.h
24028
24029 esac
24030
24031 case "$host" in
24032  *-*-darwin*)
24033     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
24034 $as_echo_n "checking for library containing res_9_init... " >&6; }
24035 if ${ac_cv_search_res_9_init+:} false; then :
24036   $as_echo_n "(cached) " >&6
24037 else
24038   ac_func_search_save_LIBS=$LIBS
24039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24040 /* end confdefs.h.  */
24041
24042 /* Override any GCC internal prototype to avoid an error.
24043    Use char because int might match the return type of a GCC
24044    builtin and then its argument prototype would still apply.  */
24045 #ifdef __cplusplus
24046 extern "C"
24047 #endif
24048 char res_9_init ();
24049 int
24050 main ()
24051 {
24052 return res_9_init ();
24053   ;
24054   return 0;
24055 }
24056 _ACEOF
24057 for ac_lib in '' resolv; do
24058   if test -z "$ac_lib"; then
24059     ac_res="none required"
24060   else
24061     ac_res=-l$ac_lib
24062     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24063   fi
24064   if ac_fn_c_try_link "$LINENO"; then :
24065   ac_cv_search_res_9_init=$ac_res
24066 fi
24067 rm -f core conftest.err conftest.$ac_objext \
24068     conftest$ac_exeext
24069   if ${ac_cv_search_res_9_init+:} false; then :
24070   break
24071 fi
24072 done
24073 if ${ac_cv_search_res_9_init+:} false; then :
24074
24075 else
24076   ac_cv_search_res_9_init=no
24077 fi
24078 rm conftest.$ac_ext
24079 LIBS=$ac_func_search_save_LIBS
24080 fi
24081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
24082 $as_echo "$ac_cv_search_res_9_init" >&6; }
24083 ac_res=$ac_cv_search_res_9_init
24084 if test "$ac_res" != no; then :
24085   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24086
24087 fi
24088
24089     ;;
24090  *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
24091 $as_echo_n "checking for library containing res_init... " >&6; }
24092 if ${ac_cv_search_res_init+:} false; then :
24093   $as_echo_n "(cached) " >&6
24094 else
24095   ac_func_search_save_LIBS=$LIBS
24096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24097 /* end confdefs.h.  */
24098
24099 /* Override any GCC internal prototype to avoid an error.
24100    Use char because int might match the return type of a GCC
24101    builtin and then its argument prototype would still apply.  */
24102 #ifdef __cplusplus
24103 extern "C"
24104 #endif
24105 char res_init ();
24106 int
24107 main ()
24108 {
24109 return res_init ();
24110   ;
24111   return 0;
24112 }
24113 _ACEOF
24114 for ac_lib in '' resolv; do
24115   if test -z "$ac_lib"; then
24116     ac_res="none required"
24117   else
24118     ac_res=-l$ac_lib
24119     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24120   fi
24121   if ac_fn_c_try_link "$LINENO"; then :
24122   ac_cv_search_res_init=$ac_res
24123 fi
24124 rm -f core conftest.err conftest.$ac_objext \
24125     conftest$ac_exeext
24126   if ${ac_cv_search_res_init+:} false; then :
24127   break
24128 fi
24129 done
24130 if ${ac_cv_search_res_init+:} false; then :
24131
24132 else
24133   ac_cv_search_res_init=no
24134 fi
24135 rm conftest.$ac_ext
24136 LIBS=$ac_func_search_save_LIBS
24137 fi
24138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
24139 $as_echo "$ac_cv_search_res_init" >&6; }
24140 ac_res=$ac_cv_search_res_init
24141 if test "$ac_res" != no; then :
24142   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24143
24144 fi
24145
24146     ;;
24147 esac
24148 for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
24149 do :
24150   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
24151 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
24152 #  include <sys/types.h>
24153 #endif
24154 #ifdef HAVE_NETINET_IN_H
24155 #  include <netinet/in.h>   /* inet_ functions / structs */
24156 #endif
24157 #ifdef HAVE_ARPA_NAMESER_H
24158 #  include <arpa/nameser.h> /* DNS HEADER struct */
24159 #endif
24160 #ifdef HAVE_NETDB_H
24161 #  include <netdb.h>
24162 #endif
24163 "
24164 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
24165   cat >>confdefs.h <<_ACEOF
24166 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
24167 _ACEOF
24168
24169 fi
24170
24171 done
24172
24173
24174 #HMS: Why do we do this check so "early"?
24175 for ac_func in res_init
24176 do :
24177   ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
24178 if test "x$ac_cv_func_res_init" = xyes; then :
24179   cat >>confdefs.h <<_ACEOF
24180 #define HAVE_RES_INIT 1
24181 _ACEOF
24182
24183 else
24184   for ac_func in __res_init
24185 do :
24186   ac_fn_c_check_func "$LINENO" "__res_init" "ac_cv_func___res_init"
24187 if test "x$ac_cv_func___res_init" = xyes; then :
24188   cat >>confdefs.h <<_ACEOF
24189 #define HAVE___RES_INIT 1
24190 _ACEOF
24191
24192 fi
24193 done
24194
24195 fi
24196 done
24197
24198
24199 # We also need -lsocket, but we have tested for that already.
24200 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
24201 if test "x$ac_cv_func_inet_ntop" = xyes; then :
24202
24203 else
24204
24205 $as_echo "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
24206
24207 fi
24208
24209 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
24210 if test "x$ac_cv_func_inet_pton" = xyes; then :
24211
24212 else
24213
24214 $as_echo "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
24215
24216 fi
24217
24218
24219 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
24220 if test "x$ac_cv_type_uintptr_t" = xyes; then :
24221
24222 cat >>confdefs.h <<_ACEOF
24223 #define HAVE_UINTPTR_T 1
24224 _ACEOF
24225
24226
24227 fi
24228 ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" "$ac_includes_default"
24229 if test "x$ac_cv_type_int32" = xyes; then :
24230
24231 cat >>confdefs.h <<_ACEOF
24232 #define HAVE_INT32 1
24233 _ACEOF
24234
24235
24236 fi
24237 ac_fn_c_check_type "$LINENO" "u_int32" "ac_cv_type_u_int32" "$ac_includes_default"
24238 if test "x$ac_cv_type_u_int32" = xyes; then :
24239
24240 cat >>confdefs.h <<_ACEOF
24241 #define HAVE_U_INT32 1
24242 _ACEOF
24243
24244
24245 fi
24246
24247
24248
24249
24250 case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
24251  no::yes)
24252     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
24253 $as_echo_n "checking for int32 with DNS headers included... " >&6; }
24254 if ${ntp_cv_type_int32_with_dns+:} false; then :
24255   $as_echo_n "(cached) " >&6
24256 else
24257   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24258 /* end confdefs.h.  */
24259
24260                     #ifdef HAVE_ARPA_NAMESER_H
24261                     # include <arpa/nameser.h>
24262                     #endif
24263                     #include <resolv.h>
24264
24265 int
24266 main ()
24267 {
24268
24269                     size_t cb = sizeof(int32);
24270
24271
24272   ;
24273   return 0;
24274 }
24275 _ACEOF
24276 if ac_fn_c_try_compile "$LINENO"; then :
24277   ntp_cv_type_int32_with_dns=yes
24278 else
24279   ntp_cv_type_int32_with_dns=no
24280
24281 fi
24282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24283
24284 fi
24285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
24286 $as_echo "$ntp_cv_type_int32_with_dns" >&6; }
24287     case "$ntp_cv_type_int32_with_dns" in
24288      yes)
24289
24290 $as_echo "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
24291
24292     esac
24293 esac
24294
24295 case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
24296  no::yes)
24297     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
24298 $as_echo_n "checking for u_int32 with DNS headers included... " >&6; }
24299 if ${ntp_cv_type_u_int32_with_dns+:} false; then :
24300   $as_echo_n "(cached) " >&6
24301 else
24302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24303 /* end confdefs.h.  */
24304
24305                     #ifdef HAVE_ARPA_NAMESER_H
24306                     # include <arpa/nameser.h>
24307                     #endif
24308                     #include <resolv.h>
24309
24310 int
24311 main ()
24312 {
24313
24314                     size_t cb = sizeof(u_int32);
24315
24316
24317   ;
24318   return 0;
24319 }
24320 _ACEOF
24321 if ac_fn_c_try_compile "$LINENO"; then :
24322   ntp_cv_type_u_int32_with_dns=yes
24323 else
24324   ntp_cv_type_u_int32_with_dns=no
24325
24326 fi
24327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24328
24329 fi
24330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
24331 $as_echo "$ntp_cv_type_u_int32_with_dns" >&6; }
24332     case "$ntp_cv_type_u_int32_with_dns" in
24333      yes)
24334
24335 $as_echo "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
24336
24337     esac
24338 esac
24339
24340 for ac_header in sys/timepps.h
24341 do :
24342   ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
24343         #ifdef HAVE_SYS_TIME_H
24344         # include <sys/time.h>
24345         #endif
24346         #ifdef HAVE_ERRNO_H
24347         # include <errno.h>
24348         #endif
24349
24350
24351 "
24352 if test "x$ac_cv_header_sys_timepps_h" = xyes; then :
24353   cat >>confdefs.h <<_ACEOF
24354 #define HAVE_SYS_TIMEPPS_H 1
24355 _ACEOF
24356
24357 fi
24358
24359 done
24360
24361
24362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
24363 $as_echo_n "checking for struct timespec... " >&6; }
24364 if ${ntp_cv_struct_timespec+:} false; then :
24365   $as_echo_n "(cached) " >&6
24366 else
24367   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24368 /* end confdefs.h.  */
24369
24370                 #include <sys/time.h>
24371                 /* Under SunOS, timespec is in sys/timepps.h,
24372                    which needs errno.h and FRAC */
24373                 #ifdef HAVE_ERRNO_H
24374                 # include <errno.h>
24375                 #endif
24376                 #ifdef HAVE_SYS_TIMEPPS_H
24377                 # define FRAC 4294967296
24378                 # include <sys/timepps.h>
24379                 #endif
24380
24381 int
24382 main ()
24383 {
24384
24385                 struct timespec n;
24386
24387
24388   ;
24389   return 0;
24390 }
24391 _ACEOF
24392 if ac_fn_c_try_compile "$LINENO"; then :
24393   ntp_cv_struct_timespec=yes
24394 else
24395   ntp_cv_struct_timespec=no
24396
24397 fi
24398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24399
24400 fi
24401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_timespec" >&5
24402 $as_echo "$ntp_cv_struct_timespec" >&6; }
24403 case "$ntp_cv_struct_timespec" in
24404  yes)
24405
24406 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
24407
24408 esac
24409
24410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ntptimeval" >&5
24411 $as_echo_n "checking for struct ntptimeval... " >&6; }
24412 if ${ntp_cv_struct_ntptimeval+:} false; then :
24413   $as_echo_n "(cached) " >&6
24414 else
24415   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24416 /* end confdefs.h.  */
24417
24418                 #include <sys/time.h>
24419                 #include <sys/timex.h>
24420
24421 int
24422 main ()
24423 {
24424
24425                 struct ntptimeval n;
24426
24427
24428   ;
24429   return 0;
24430 }
24431 _ACEOF
24432 if ac_fn_c_try_compile "$LINENO"; then :
24433   ntp_cv_struct_ntptimeval=yes
24434 else
24435   ntp_cv_struct_ntptimeval=no
24436
24437 fi
24438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24439
24440 fi
24441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ntptimeval" >&5
24442 $as_echo "$ntp_cv_struct_ntptimeval" >&6; }
24443 case "$ntp_cv_struct_ntptimeval" in
24444  yes)
24445
24446 $as_echo "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
24447
24448 esac
24449
24450 for ac_header in md5.h
24451 do :
24452   ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
24453         #ifdef HAVE_SYS_TYPES_H
24454         # include <sys/types.h>
24455         #endif
24456
24457
24458 "
24459 if test "x$ac_cv_header_md5_h" = xyes; then :
24460   cat >>confdefs.h <<_ACEOF
24461 #define HAVE_MD5_H 1
24462 _ACEOF
24463
24464 fi
24465
24466 done
24467
24468
24469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
24470 $as_echo_n "checking for library containing MD5Init... " >&6; }
24471 if ${ac_cv_search_MD5Init+:} false; then :
24472   $as_echo_n "(cached) " >&6
24473 else
24474   ac_func_search_save_LIBS=$LIBS
24475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24476 /* end confdefs.h.  */
24477
24478 /* Override any GCC internal prototype to avoid an error.
24479    Use char because int might match the return type of a GCC
24480    builtin and then its argument prototype would still apply.  */
24481 #ifdef __cplusplus
24482 extern "C"
24483 #endif
24484 char MD5Init ();
24485 int
24486 main ()
24487 {
24488 return MD5Init ();
24489   ;
24490   return 0;
24491 }
24492 _ACEOF
24493 for ac_lib in '' md5 md; do
24494   if test -z "$ac_lib"; then
24495     ac_res="none required"
24496   else
24497     ac_res=-l$ac_lib
24498     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24499   fi
24500   if ac_fn_c_try_link "$LINENO"; then :
24501   ac_cv_search_MD5Init=$ac_res
24502 fi
24503 rm -f core conftest.err conftest.$ac_objext \
24504     conftest$ac_exeext
24505   if ${ac_cv_search_MD5Init+:} false; then :
24506   break
24507 fi
24508 done
24509 if ${ac_cv_search_MD5Init+:} false; then :
24510
24511 else
24512   ac_cv_search_MD5Init=no
24513 fi
24514 rm conftest.$ac_ext
24515 LIBS=$ac_func_search_save_LIBS
24516 fi
24517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
24518 $as_echo "$ac_cv_search_MD5Init" >&6; }
24519 ac_res=$ac_cv_search_MD5Init
24520 if test "$ac_res" != no; then :
24521   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24522
24523 fi
24524
24525 for ac_func in MD5Init sysconf getdtablesize sigaction sigset sigvec
24526 do :
24527   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24528 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24529 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
24530   cat >>confdefs.h <<_ACEOF
24531 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24532 _ACEOF
24533
24534 fi
24535 done
24536
24537
24538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
24539 $as_echo_n "checking for SIGIO... " >&6; }
24540 if ${ntp_cv_hdr_def_sigio+:} false; then :
24541   $as_echo_n "(cached) " >&6
24542 else
24543   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24544 /* end confdefs.h.  */
24545
24546             #include <signal.h>
24547
24548             #ifndef SIGIO
24549             # error
24550             #endif
24551
24552 _ACEOF
24553 if ac_fn_c_try_cpp "$LINENO"; then :
24554   ntp_cv_hdr_def_sigio=yes
24555 else
24556   ntp_cv_hdr_def_sigio=no
24557
24558 fi
24559 rm -f conftest.err conftest.i conftest.$ac_ext
24560
24561 fi
24562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
24563 $as_echo "$ntp_cv_hdr_def_sigio" >&6; }
24564
24565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
24566 $as_echo_n "checking if we want to use SIGIO... " >&6; }
24567 ans=no
24568 case "$ntp_cv_hdr_def_sigio" in
24569  yes)
24570     ans=yes
24571     case "$host" in
24572      alpha*-dec-osf4*|alpha*-dec-osf5*)
24573         ans=no
24574         ;;
24575      *-convex-*)
24576         ans=no
24577         ;;
24578      *-dec-*)
24579         ans=no
24580         ;;
24581      *-pc-cygwin*)
24582         ans=no
24583         ;;
24584      *-sni-sysv*)
24585         ans=no
24586         ;;
24587      *-stratus-vos)
24588         ans=no
24589         ;;
24590      *-univel-sysv*)
24591         ans=no
24592         ;;
24593      *-*-irix6*)
24594         ans=no
24595         ;;
24596      *-*-freebsd*)
24597         ans=no
24598         ;;
24599      *-*-*linux*)
24600         ans=no
24601         ;;
24602      *-*-unicosmp*)
24603         ans=no
24604         ;;
24605      *-*-kfreebsd*)
24606         ans=no
24607         ;;
24608      m68k-*-mint*)
24609         ans=no
24610         ;;
24611     esac
24612     ;;
24613 esac
24614 case "$ans" in
24615  yes)
24616
24617 $as_echo "#define HAVE_SIGNALED_IO 1" >>confdefs.h
24618
24619 esac
24620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
24621 $as_echo "$ans" >&6; }
24622
24623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
24624 $as_echo_n "checking for SIGPOLL... " >&6; }
24625 if ${ntp_cv_hdr_def_sigpoll+:} false; then :
24626   $as_echo_n "(cached) " >&6
24627 else
24628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24629 /* end confdefs.h.  */
24630
24631             #include <signal.h>
24632
24633             #ifndef SIGPOLL
24634             # error
24635             #endif
24636
24637 _ACEOF
24638 if ac_fn_c_try_cpp "$LINENO"; then :
24639   ntp_cv_hdr_def_sigpoll=yes
24640 else
24641   ntp_cv_hdr_def_sigpoll=no
24642
24643 fi
24644 rm -f conftest.err conftest.i conftest.$ac_ext
24645
24646 fi
24647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
24648 $as_echo "$ntp_cv_hdr_def_sigpoll" >&6; }
24649
24650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
24651 $as_echo_n "checking if we can use SIGPOLL for UDP I/O... " >&6; }
24652 ans=no
24653 case "$ntp_cv_hdr_def_sigpoll" in
24654  yes)
24655     case "$host" in
24656      mips-sgi-irix*)
24657         ans=no
24658         ;;
24659      vax-dec-bsd)
24660         ans=no
24661         ;;
24662      *-pc-cygwin*)
24663         ans=no
24664         ;;
24665      *-sni-sysv*)
24666         ans=no
24667         ;;
24668      *-stratus-vos)
24669         ans=no
24670         ;;
24671      *-*-aix[4-9]*)
24672         # XXX Only verified thru AIX6
24673         ans=no
24674         ;;
24675      *-*-hpux*)
24676         ans=no
24677         ;;
24678      *-*-*linux*)
24679         ans=no
24680         ;;
24681      *-*-osf*)
24682         ans=no
24683         ;;
24684      *-*-qnx*)
24685         ans=no
24686         ;;
24687      *-*-sunos*)
24688         ans=no
24689         ;;
24690      *-*-solaris*)
24691         ans=no
24692         ;;
24693      *-*-ultrix*)
24694         ans=no
24695         ;;
24696      *-*-unicosmp*)
24697         ans=no
24698         ;;
24699      *-*-kfreebsd*)
24700         ans=no
24701         ;;
24702      *) ans=yes
24703         ;;
24704     esac
24705     ;;
24706 esac
24707 case "$ans" in
24708  yes)
24709
24710 $as_echo "#define USE_UDP_SIGPOLL 1" >>confdefs.h
24711
24712 esac
24713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
24714 $as_echo "$ans" >&6; }
24715
24716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
24717 $as_echo_n "checking if we can use SIGPOLL for TTY I/O... " >&6; }
24718 ans=no
24719 case "$ntp_cv_hdr_def_sigpoll" in
24720  yes)
24721     case "$host" in
24722      mips-sgi-irix*)
24723         ans=no
24724         ;;
24725      vax-dec-bsd)
24726         ans=no
24727         ;;
24728      *-pc-cygwin*)
24729         ans=no
24730         ;;
24731      *-sni-sysv*)
24732         ans=no
24733         ;;
24734      *-stratus-vos)
24735         ans=no
24736         ;;
24737      *-*-aix[4-9]*)
24738         # XXX Only verified thru AIX6
24739         ans=no
24740         ;;
24741      *-*-hpux*)
24742         ans=no
24743         ;;
24744      *-*-*linux*)
24745         ans=no
24746         ;;
24747      *-*-osf*)
24748         ans=no
24749         ;;
24750      *-*-sunos*)
24751         ans=no
24752         ;;
24753      *-*-ultrix*)
24754         ans=no
24755         ;;
24756      *-*-qnx*)
24757         ans=no
24758         ;;
24759      *-*-unicosmp*)
24760         ans=no
24761         ;;
24762      *-*-kfreebsd*)
24763         ans=no
24764         ;;
24765      *) ans=yes
24766         ;;
24767     esac
24768     ;;
24769 esac
24770 case "$ans" in
24771  yes)
24772
24773 $as_echo "#define USE_TTY_SIGPOLL 1" >>confdefs.h
24774
24775 esac
24776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
24777 $as_echo "$ans" >&6; }
24778
24779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
24780 $as_echo_n "checking number of arguments to gettimeofday()... " >&6; }
24781 if ${ntp_cv_func_Xettimeofday_nargs+:} false; then :
24782   $as_echo_n "(cached) " >&6
24783 else
24784   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24785 /* end confdefs.h.  */
24786
24787                 #include <sys/time.h>
24788
24789 int
24790 main ()
24791 {
24792
24793                 gettimeofday(0, 0);
24794                 settimeofday(0, 0);
24795
24796
24797   ;
24798   return 0;
24799 }
24800 _ACEOF
24801 if ac_fn_c_try_compile "$LINENO"; then :
24802   ntp_cv_func_Xettimeofday_nargs=2
24803 else
24804   ntp_cv_func_Xettimeofday_nargs=1
24805
24806 fi
24807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24808
24809 fi
24810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
24811 $as_echo "$ntp_cv_func_Xettimeofday_nargs" >&6; }
24812 case "$ntp_cv_func_Xettimeofday_nargs" in
24813  1)
24814
24815 $as_echo "#define SYSV_TIMEOFDAY 1" >>confdefs.h
24816
24817 esac
24818
24819 for ac_func in settimeofday
24820 do :
24821   ac_fn_c_check_func "$LINENO" "settimeofday" "ac_cv_func_settimeofday"
24822 if test "x$ac_cv_func_settimeofday" = xyes; then :
24823   cat >>confdefs.h <<_ACEOF
24824 #define HAVE_SETTIMEOFDAY 1
24825 _ACEOF
24826
24827 else
24828
24829     case "$host" in
24830      *-*-mpeix*) ac_cv_func_settimeofday=yes
24831     esac
24832
24833 fi
24834 done
24835
24836
24837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
24838 $as_echo_n "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
24839 ntp_warning='GRONK'
24840 ans=none
24841 case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
24842  yes*)
24843     ntp_warning=''
24844     ans='clock_settime()'
24845     ;;
24846  noyes*)
24847     ntp_warning='But clock_settime() would be better (if we had it)'
24848     ans='settimeofday()'
24849     ;;
24850  nonoyes)
24851     ntp_warning='Which is the worst of the three'
24852     ans='stime()'
24853     ;;
24854  *)
24855     case "$build" in
24856      $host)
24857         ntp_warning='Which leaves us with nothing to use!'
24858     esac
24859 esac
24860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
24861 $as_echo "$ans" >&6; }
24862 case "$ntp_warning" in
24863  '')
24864     ;;
24865  *)
24866     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
24867 $as_echo "$as_me: WARNING: *** $ntp_warning ***" >&2;}
24868     ;;
24869 esac
24870
24871
24872 LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
24873 LIBS=$__LIBS
24874 { __LIBS=; unset __LIBS;}
24875
24876
24877
24878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deprecated --with-arlib" >&5
24879 $as_echo_n "checking for deprecated --with-arlib... " >&6; }
24880
24881 # Check whether --with-arlib was given.
24882 if test "${with_arlib+set}" = set; then :
24883   withval=$with_arlib; ans=$withval
24884 else
24885   ans=no
24886 fi
24887
24888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
24889 $as_echo "$ans" >&6; }
24890
24891 case "$ans" in
24892  yes)
24893     { $as_echo "$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
24894 $as_echo "$as_me: WARNING: Please do not use --with-arlib, arlib is no longer included.  In the future, --with-arlib will not be recognized." >&2;}
24895     ;;
24896 esac
24897
24898 for ac_prog in gawk mawk nawk awk
24899 do
24900   # Extract the first word of "$ac_prog", so it can be a program name with args.
24901 set dummy $ac_prog; ac_word=$2
24902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24903 $as_echo_n "checking for $ac_word... " >&6; }
24904 if ${ac_cv_prog_AWK+:} false; then :
24905   $as_echo_n "(cached) " >&6
24906 else
24907   if test -n "$AWK"; then
24908   ac_cv_prog_AWK="$AWK" # Let the user override the test.
24909 else
24910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24911 for as_dir in $PATH
24912 do
24913   IFS=$as_save_IFS
24914   test -z "$as_dir" && as_dir=.
24915     for ac_exec_ext in '' $ac_executable_extensions; do
24916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24917     ac_cv_prog_AWK="$ac_prog"
24918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24919     break 2
24920   fi
24921 done
24922   done
24923 IFS=$as_save_IFS
24924
24925 fi
24926 fi
24927 AWK=$ac_cv_prog_AWK
24928 if test -n "$AWK"; then
24929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
24930 $as_echo "$AWK" >&6; }
24931 else
24932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24933 $as_echo "no" >&6; }
24934 fi
24935
24936
24937   test -n "$AWK" && break
24938 done
24939
24940 { ac_cv_prog_AWK=; unset ac_cv_prog_AWK;}
24941                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
24942 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
24943 set x ${MAKE-make}
24944 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
24945 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
24946   $as_echo_n "(cached) " >&6
24947 else
24948   cat >conftest.make <<\_ACEOF
24949 SHELL = /bin/sh
24950 all:
24951         @echo '@@@%%%=$(MAKE)=@@@%%%'
24952 _ACEOF
24953 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
24954 case `${MAKE-make} -f conftest.make 2>/dev/null` in
24955   *@@@%%%=?*=@@@%%%*)
24956     eval ac_cv_prog_make_${ac_make}_set=yes;;
24957   *)
24958     eval ac_cv_prog_make_${ac_make}_set=no;;
24959 esac
24960 rm -f conftest.make
24961 fi
24962 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
24963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24964 $as_echo "yes" >&6; }
24965   SET_MAKE=
24966 else
24967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24968 $as_echo "no" >&6; }
24969   SET_MAKE="MAKE=${MAKE-make}"
24970 fi
24971
24972
24973
24974
24975
24976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
24977 $as_echo_n "checking whether ln -s works... " >&6; }
24978 LN_S=$as_ln_s
24979 if test "$LN_S" = "ln -s"; then
24980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24981 $as_echo "yes" >&6; }
24982 else
24983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
24984 $as_echo "no, using $LN_S" >&6; }
24985 fi
24986
24987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
24988 $as_echo_n "checking for library containing strerror... " >&6; }
24989 if ${ac_cv_search_strerror+:} false; then :
24990   $as_echo_n "(cached) " >&6
24991 else
24992   ac_func_search_save_LIBS=$LIBS
24993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24994 /* end confdefs.h.  */
24995
24996 /* Override any GCC internal prototype to avoid an error.
24997    Use char because int might match the return type of a GCC
24998    builtin and then its argument prototype would still apply.  */
24999 #ifdef __cplusplus
25000 extern "C"
25001 #endif
25002 char strerror ();
25003 int
25004 main ()
25005 {
25006 return strerror ();
25007   ;
25008   return 0;
25009 }
25010 _ACEOF
25011 for ac_lib in '' cposix; do
25012   if test -z "$ac_lib"; then
25013     ac_res="none required"
25014   else
25015     ac_res=-l$ac_lib
25016     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25017   fi
25018   if ac_fn_c_try_link "$LINENO"; then :
25019   ac_cv_search_strerror=$ac_res
25020 fi
25021 rm -f core conftest.err conftest.$ac_objext \
25022     conftest$ac_exeext
25023   if ${ac_cv_search_strerror+:} false; then :
25024   break
25025 fi
25026 done
25027 if ${ac_cv_search_strerror+:} false; then :
25028
25029 else
25030   ac_cv_search_strerror=no
25031 fi
25032 rm conftest.$ac_ext
25033 LIBS=$ac_func_search_save_LIBS
25034 fi
25035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
25036 $as_echo "$ac_cv_search_strerror" >&6; }
25037 ac_res=$ac_cv_search_strerror
25038 if test "$ac_res" != no; then :
25039   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25040
25041 fi
25042
25043
25044
25045 # Extract the first word of "perl", so it can be a program name with args.
25046 set dummy perl; ac_word=$2
25047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25048 $as_echo_n "checking for $ac_word... " >&6; }
25049 if ${ac_cv_path_PATH_PERL+:} false; then :
25050   $as_echo_n "(cached) " >&6
25051 else
25052   case $PATH_PERL in
25053   [\\/]* | ?:[\\/]*)
25054   ac_cv_path_PATH_PERL="$PATH_PERL" # Let the user override the test with a path.
25055   ;;
25056   *)
25057   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25058 for as_dir in $PATH
25059 do
25060   IFS=$as_save_IFS
25061   test -z "$as_dir" && as_dir=.
25062     for ac_exec_ext in '' $ac_executable_extensions; do
25063   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25064     ac_cv_path_PATH_PERL="$as_dir/$ac_word$ac_exec_ext"
25065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25066     break 2
25067   fi
25068 done
25069   done
25070 IFS=$as_save_IFS
25071
25072   ;;
25073 esac
25074 fi
25075 PATH_PERL=$ac_cv_path_PATH_PERL
25076 if test -n "$PATH_PERL"; then
25077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_PERL" >&5
25078 $as_echo "$PATH_PERL" >&6; }
25079 else
25080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25081 $as_echo "no" >&6; }
25082 fi
25083
25084
25085 { ac_cv_path_PATH_PERL=; unset ac_cv_path_PATH_PERL;}
25086 # Extract the first word of "test", so it can be a program name with args.
25087 set dummy test; ac_word=$2
25088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25089 $as_echo_n "checking for $ac_word... " >&6; }
25090 if ${ac_cv_path_PATH_TEST+:} false; then :
25091   $as_echo_n "(cached) " >&6
25092 else
25093   case $PATH_TEST in
25094   [\\/]* | ?:[\\/]*)
25095   ac_cv_path_PATH_TEST="$PATH_TEST" # Let the user override the test with a path.
25096   ;;
25097   *)
25098   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25099 for as_dir in $PATH
25100 do
25101   IFS=$as_save_IFS
25102   test -z "$as_dir" && as_dir=.
25103     for ac_exec_ext in '' $ac_executable_extensions; do
25104   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25105     ac_cv_path_PATH_TEST="$as_dir/$ac_word$ac_exec_ext"
25106     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25107     break 2
25108   fi
25109 done
25110   done
25111 IFS=$as_save_IFS
25112
25113   ;;
25114 esac
25115 fi
25116 PATH_TEST=$ac_cv_path_PATH_TEST
25117 if test -n "$PATH_TEST"; then
25118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_TEST" >&5
25119 $as_echo "$PATH_TEST" >&6; }
25120 else
25121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25122 $as_echo "no" >&6; }
25123 fi
25124
25125
25126 { ac_cv_path_PATH_TEST=; unset ac_cv_path_PATH_TEST;}
25127 test -z "$CONFIG_SHELL" && CONFIG_SHELL=/bin/sh
25128
25129
25130 # Check whether --with-net-snmp-config was given.
25131 if test "${with_net_snmp_config+set}" = set; then :
25132   withval=$with_net_snmp_config; ans=$withval
25133 else
25134   ans=yes
25135
25136 fi
25137
25138 case "$ans" in
25139  no)
25140     ;;
25141  yes)
25142     ans=net-snmp-config
25143     ;;
25144  /*)
25145     ;;
25146  */*)
25147     as_fn_error $? "--with-net-snmp-config takes either a name or an absolute path" "$LINENO" 5
25148     ;;
25149  *)
25150     ;;
25151 esac
25152 PROG_NET_SNMP_CONFIG=$ans
25153 case "$PROG_NET_SNMP_CONFIG" in
25154  no) ;;
25155  /*)
25156     PATH_NET_SNMP_CONFIG=$PROG_NET_SNMP_CONFIG
25157     ;;
25158  *)
25159     # Extract the first word of "$PROG_NET_SNMP_CONFIG", so it can be a program name with args.
25160 set dummy $PROG_NET_SNMP_CONFIG; ac_word=$2
25161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25162 $as_echo_n "checking for $ac_word... " >&6; }
25163 if ${ac_cv_path_PATH_NET_SNMP_CONFIG+:} false; then :
25164   $as_echo_n "(cached) " >&6
25165 else
25166   case $PATH_NET_SNMP_CONFIG in
25167   [\\/]* | ?:[\\/]*)
25168   ac_cv_path_PATH_NET_SNMP_CONFIG="$PATH_NET_SNMP_CONFIG" # Let the user override the test with a path.
25169   ;;
25170   *)
25171   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25172 for as_dir in $PATH
25173 do
25174   IFS=$as_save_IFS
25175   test -z "$as_dir" && as_dir=.
25176     for ac_exec_ext in '' $ac_executable_extensions; do
25177   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25178     ac_cv_path_PATH_NET_SNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
25179     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25180     break 2
25181   fi
25182 done
25183   done
25184 IFS=$as_save_IFS
25185
25186   ;;
25187 esac
25188 fi
25189 PATH_NET_SNMP_CONFIG=$ac_cv_path_PATH_NET_SNMP_CONFIG
25190 if test -n "$PATH_NET_SNMP_CONFIG"; then
25191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_NET_SNMP_CONFIG" >&5
25192 $as_echo "$PATH_NET_SNMP_CONFIG" >&6; }
25193 else
25194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25195 $as_echo "no" >&6; }
25196 fi
25197
25198
25199     { ac_cv_path_PATH_NET_SNMP_CONFIG=; unset ac_cv_path_PATH_NET_SNMP_CONFIG;}
25200 ;;
25201 esac
25202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for net-snmp-config path" >&5
25203 $as_echo_n "checking for net-snmp-config path... " >&6; }
25204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_NET_SNMP_CONFIG" >&5
25205 $as_echo "$PATH_NET_SNMP_CONFIG" >&6; }
25206
25207 case "$PATH_NET_SNMP_CONFIG" in
25208  /*)    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for net-snmp version" >&5
25209 $as_echo_n "checking for net-snmp version... " >&6; }
25210 if ${ntp_cv_net_snmp_version+:} false; then :
25211   $as_echo_n "(cached) " >&6
25212 else
25213   ntp_cv_net_snmp_version=`$PATH_NET_SNMP_CONFIG --version`
25214
25215 fi
25216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_net_snmp_version" >&5
25217 $as_echo "$ntp_cv_net_snmp_version" >&6; }
25218         ;;
25219 esac
25220
25221 case "$host" in
25222  *-*-vxworks*)
25223     ac_link="$ac_link $VX_KERNEL"
25224     ;;
25225 esac
25226
25227 # HMS: a check for -lnsl used to be here - now being done in NTP_LIBNTP
25228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
25229 $as_echo_n "checking for library containing openlog... " >&6; }
25230 if ${ac_cv_search_openlog+:} false; then :
25231   $as_echo_n "(cached) " >&6
25232 else
25233   ac_func_search_save_LIBS=$LIBS
25234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25235 /* end confdefs.h.  */
25236
25237 /* Override any GCC internal prototype to avoid an error.
25238    Use char because int might match the return type of a GCC
25239    builtin and then its argument prototype would still apply.  */
25240 #ifdef __cplusplus
25241 extern "C"
25242 #endif
25243 char openlog ();
25244 int
25245 main ()
25246 {
25247 return openlog ();
25248   ;
25249   return 0;
25250 }
25251 _ACEOF
25252 for ac_lib in '' gen syslog; do
25253   if test -z "$ac_lib"; then
25254     ac_res="none required"
25255   else
25256     ac_res=-l$ac_lib
25257     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25258   fi
25259   if ac_fn_c_try_link "$LINENO"; then :
25260   ac_cv_search_openlog=$ac_res
25261 fi
25262 rm -f core conftest.err conftest.$ac_objext \
25263     conftest$ac_exeext
25264   if ${ac_cv_search_openlog+:} false; then :
25265   break
25266 fi
25267 done
25268 if ${ac_cv_search_openlog+:} false; then :
25269
25270 else
25271   ac_cv_search_openlog=no
25272 fi
25273 rm conftest.$ac_ext
25274 LIBS=$ac_func_search_save_LIBS
25275 fi
25276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
25277 $as_echo "$ac_cv_search_openlog" >&6; }
25278 ac_res=$ac_cv_search_openlog
25279 if test "$ac_res" != no; then :
25280   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25281
25282 fi
25283
25284 # XXX library list will be in ac_cv_search_openlog
25285
25286 # LIBSECCOMP is off by default -- needs testing with all the features
25287 # Please send bug reports to loganaden@gmail.com
25288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use libseccomp sandboxing (EXPERIMENTAL)" >&5
25289 $as_echo_n "checking if we want to use libseccomp sandboxing (EXPERIMENTAL)... " >&6; }
25290 # Check whether --enable-libseccomp was given.
25291 if test "${enable_libseccomp+set}" = set; then :
25292   enableval=$enable_libseccomp; ntp_ok=$enableval
25293 else
25294   ntp_ok=no
25295
25296 fi
25297
25298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
25299 $as_echo "$ntp_ok" >&6; }
25300 case "$ntp_ok" in
25301  yes)
25302     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing seccomp_init" >&5
25303 $as_echo_n "checking for library containing seccomp_init... " >&6; }
25304 if ${ac_cv_search_seccomp_init+:} false; then :
25305   $as_echo_n "(cached) " >&6
25306 else
25307   ac_func_search_save_LIBS=$LIBS
25308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25309 /* end confdefs.h.  */
25310
25311 /* Override any GCC internal prototype to avoid an error.
25312    Use char because int might match the return type of a GCC
25313    builtin and then its argument prototype would still apply.  */
25314 #ifdef __cplusplus
25315 extern "C"
25316 #endif
25317 char seccomp_init ();
25318 int
25319 main ()
25320 {
25321 return seccomp_init ();
25322   ;
25323   return 0;
25324 }
25325 _ACEOF
25326 for ac_lib in '' seccomp; do
25327   if test -z "$ac_lib"; then
25328     ac_res="none required"
25329   else
25330     ac_res=-l$ac_lib
25331     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25332   fi
25333   if ac_fn_c_try_link "$LINENO"; then :
25334   ac_cv_search_seccomp_init=$ac_res
25335 fi
25336 rm -f core conftest.err conftest.$ac_objext \
25337     conftest$ac_exeext
25338   if ${ac_cv_search_seccomp_init+:} false; then :
25339   break
25340 fi
25341 done
25342 if ${ac_cv_search_seccomp_init+:} false; then :
25343
25344 else
25345   ac_cv_search_seccomp_init=no
25346 fi
25347 rm conftest.$ac_ext
25348 LIBS=$ac_func_search_save_LIBS
25349 fi
25350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_seccomp_init" >&5
25351 $as_echo "$ac_cv_search_seccomp_init" >&6; }
25352 ac_res=$ac_cv_search_seccomp_init
25353 if test "$ac_res" != no; then :
25354   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25355
25356 $as_echo "#define LIBSECCOMP 1" >>confdefs.h
25357
25358
25359 fi
25360
25361     if test "$cross_compiling" = yes; then :
25362   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25363 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25364 as_fn_error $? "cannot run test program while cross compiling
25365 See \`config.log' for more details" "$LINENO" 5; }
25366 else
25367   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25368 /* end confdefs.h.  */
25369
25370         #include <stdio.h>
25371         #include <stdlib.h>
25372         #include <errno.h>
25373         #include <sys/prctl.h>
25374         #include <linux/seccomp.h>
25375
25376         int main(void)
25377         {
25378                 int ret;
25379                 ret = prctl(PR_GET_SECCOMP, 0, 0, 0, 0);
25380                 if (ret < 0) {
25381                         switch (errno) {
25382                         case ENOSYS:
25383                                 return 1;
25384                         case EINVAL:
25385                                 return 1;
25386                         default:
25387                                 return 1;
25388                         }
25389                 }
25390                 ret =
25391                 prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0);
25392                 if (ret < 0) {
25393                         switch (errno) {
25394                         case EINVAL:
25395                                 return 1;
25396                         case EFAULT:
25397                                 return 0;
25398                         default:
25399                                 return 1;
25400                 }
25401         }
25402 return 1;
25403 }
25404
25405
25406 _ACEOF
25407 if ac_fn_c_try_run "$LINENO"; then :
25408
25409 $as_echo "#define KERN_SECCOMP 1" >>confdefs.h
25410
25411
25412 fi
25413 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25414   conftest.$ac_objext conftest.beam conftest.$ac_ext
25415 fi
25416
25417     ;;
25418 esac
25419
25420
25421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
25422 $as_echo_n "checking for facilitynames in syslog.h... " >&6; }
25423 if ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+:} false; then :
25424   $as_echo_n "(cached) " >&6
25425 else
25426
25427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25428 /* end confdefs.h.  */
25429
25430 #define SYSLOG_NAMES
25431 #include <stdlib.h>
25432 #include <syslog.h>
25433
25434 int
25435 main ()
25436 {
25437  void *fnames; fnames = facilitynames;
25438   ;
25439   return 0;
25440 }
25441 _ACEOF
25442 if ac_fn_c_try_compile "$LINENO"; then :
25443   ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
25444 else
25445   ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
25446 fi
25447 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25448 fi
25449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
25450 $as_echo "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
25451 case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
25452  yes)
25453
25454 $as_echo "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
25455
25456     ;;
25457  no)
25458     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
25459 $as_echo "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
25460     ;;
25461  cross)
25462     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
25463 $as_echo "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
25464     ;;
25465 esac
25466
25467
25468
25469 case "$host" in
25470  *-*-*linux*) ;;
25471  *-*-osf4*) ;;
25472  *-*-osf5*) ;;
25473  *)
25474     # HMS: Make sure we check for -lrt for clock_* before this...
25475     case "$ac_cv_search_clock_gettime" in
25476      '') as_fn_error $? "Internal Error: Haven't looked for clock_gettime() yet!" "$LINENO" 5 ;;
25477     esac
25478     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_setscheduler" >&5
25479 $as_echo_n "checking for library containing sched_setscheduler... " >&6; }
25480 if ${ac_cv_search_sched_setscheduler+:} false; then :
25481   $as_echo_n "(cached) " >&6
25482 else
25483   ac_func_search_save_LIBS=$LIBS
25484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25485 /* end confdefs.h.  */
25486
25487 /* Override any GCC internal prototype to avoid an error.
25488    Use char because int might match the return type of a GCC
25489    builtin and then its argument prototype would still apply.  */
25490 #ifdef __cplusplus
25491 extern "C"
25492 #endif
25493 char sched_setscheduler ();
25494 int
25495 main ()
25496 {
25497 return sched_setscheduler ();
25498   ;
25499   return 0;
25500 }
25501 _ACEOF
25502 for ac_lib in '' rt posix4; do
25503   if test -z "$ac_lib"; then
25504     ac_res="none required"
25505   else
25506     ac_res=-l$ac_lib
25507     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25508   fi
25509   if ac_fn_c_try_link "$LINENO"; then :
25510   ac_cv_search_sched_setscheduler=$ac_res
25511 fi
25512 rm -f core conftest.err conftest.$ac_objext \
25513     conftest$ac_exeext
25514   if ${ac_cv_search_sched_setscheduler+:} false; then :
25515   break
25516 fi
25517 done
25518 if ${ac_cv_search_sched_setscheduler+:} false; then :
25519
25520 else
25521   ac_cv_search_sched_setscheduler=no
25522 fi
25523 rm conftest.$ac_ext
25524 LIBS=$ac_func_search_save_LIBS
25525 fi
25526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_setscheduler" >&5
25527 $as_echo "$ac_cv_search_sched_setscheduler" >&6; }
25528 ac_res=$ac_cv_search_sched_setscheduler
25529 if test "$ac_res" != no; then :
25530   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25531
25532 fi
25533
25534     ;;
25535 esac
25536
25537 for ac_header in bstring.h
25538 do :
25539   ac_fn_c_check_header_mongrel "$LINENO" "bstring.h" "ac_cv_header_bstring_h" "$ac_includes_default"
25540 if test "x$ac_cv_header_bstring_h" = xyes; then :
25541   cat >>confdefs.h <<_ACEOF
25542 #define HAVE_BSTRING_H 1
25543 _ACEOF
25544
25545 fi
25546
25547 done
25548
25549 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
25550 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
25551   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing DNSServiceRegister" >&5
25552 $as_echo_n "checking for library containing DNSServiceRegister... " >&6; }
25553 if ${ac_cv_search_DNSServiceRegister+:} false; then :
25554   $as_echo_n "(cached) " >&6
25555 else
25556   ac_func_search_save_LIBS=$LIBS
25557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25558 /* end confdefs.h.  */
25559
25560 /* Override any GCC internal prototype to avoid an error.
25561    Use char because int might match the return type of a GCC
25562    builtin and then its argument prototype would still apply.  */
25563 #ifdef __cplusplus
25564 extern "C"
25565 #endif
25566 char DNSServiceRegister ();
25567 int
25568 main ()
25569 {
25570 return DNSServiceRegister ();
25571   ;
25572   return 0;
25573 }
25574 _ACEOF
25575 for ac_lib in '' dns_sd; do
25576   if test -z "$ac_lib"; then
25577     ac_res="none required"
25578   else
25579     ac_res=-l$ac_lib
25580     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25581   fi
25582   if ac_fn_c_try_link "$LINENO"; then :
25583   ac_cv_search_DNSServiceRegister=$ac_res
25584 fi
25585 rm -f core conftest.err conftest.$ac_objext \
25586     conftest$ac_exeext
25587   if ${ac_cv_search_DNSServiceRegister+:} false; then :
25588   break
25589 fi
25590 done
25591 if ${ac_cv_search_DNSServiceRegister+:} false; then :
25592
25593 else
25594   ac_cv_search_DNSServiceRegister=no
25595 fi
25596 rm conftest.$ac_ext
25597 LIBS=$ac_func_search_save_LIBS
25598 fi
25599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_DNSServiceRegister" >&5
25600 $as_echo "$ac_cv_search_DNSServiceRegister" >&6; }
25601 ac_res=$ac_cv_search_DNSServiceRegister
25602 if test "$ac_res" != no; then :
25603   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25604
25605 $as_echo "#define HAVE_DNSREGISTRATION 1" >>confdefs.h
25606
25607
25608 fi
25609
25610
25611 fi
25612
25613
25614 for ac_header in fcntl.h fnmatch.h ieeefp.h inttypes.h kvm.h math.h
25615 do :
25616   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25617 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25618 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25619   cat >>confdefs.h <<_ACEOF
25620 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25621 _ACEOF
25622
25623 fi
25624
25625 done
25626
25627
25628 for ac_header in memory.h netdb.h poll.h
25629 do :
25630   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25631 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25632 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25633   cat >>confdefs.h <<_ACEOF
25634 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25635 _ACEOF
25636
25637 fi
25638
25639 done
25640
25641 for ac_header in sgtty.h stdatomic.h
25642 do :
25643   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25644 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25645 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25646   cat >>confdefs.h <<_ACEOF
25647 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25648 _ACEOF
25649
25650 fi
25651
25652 done
25653
25654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
25655 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
25656 if ${ac_cv_header_stdbool_h+:} false; then :
25657   $as_echo_n "(cached) " >&6
25658 else
25659   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25660 /* end confdefs.h.  */
25661
25662              #include <stdbool.h>
25663              #ifndef bool
25664               "error: bool is not defined"
25665              #endif
25666              #ifndef false
25667               "error: false is not defined"
25668              #endif
25669              #if false
25670               "error: false is not 0"
25671              #endif
25672              #ifndef true
25673               "error: true is not defined"
25674              #endif
25675              #if true != 1
25676               "error: true is not 1"
25677              #endif
25678              #ifndef __bool_true_false_are_defined
25679               "error: __bool_true_false_are_defined is not defined"
25680              #endif
25681
25682              struct s { _Bool s: 1; _Bool t; } s;
25683
25684              char a[true == 1 ? 1 : -1];
25685              char b[false == 0 ? 1 : -1];
25686              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
25687              char d[(bool) 0.5 == true ? 1 : -1];
25688              /* See body of main program for 'e'.  */
25689              char f[(_Bool) 0.0 == false ? 1 : -1];
25690              char g[true];
25691              char h[sizeof (_Bool)];
25692              char i[sizeof s.t];
25693              enum { j = false, k = true, l = false * true, m = true * 256 };
25694              /* The following fails for
25695                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
25696              _Bool n[m];
25697              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
25698              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
25699              /* Catch a bug in an HP-UX C compiler.  See
25700                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
25701                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
25702               */
25703              _Bool q = true;
25704              _Bool *pq = &q;
25705
25706 int
25707 main ()
25708 {
25709
25710              bool e = &s;
25711              *pq |= q;
25712              *pq |= ! q;
25713              /* Refer to every declared value, to avoid compiler optimizations.  */
25714              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
25715                      + !m + !n + !o + !p + !q + !pq);
25716
25717   ;
25718   return 0;
25719 }
25720 _ACEOF
25721 if ac_fn_c_try_compile "$LINENO"; then :
25722   ac_cv_header_stdbool_h=yes
25723 else
25724   ac_cv_header_stdbool_h=no
25725 fi
25726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25727 fi
25728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
25729 $as_echo "$ac_cv_header_stdbool_h" >&6; }
25730    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
25731 if test "x$ac_cv_type__Bool" = xyes; then :
25732
25733 cat >>confdefs.h <<_ACEOF
25734 #define HAVE__BOOL 1
25735 _ACEOF
25736
25737
25738 fi
25739
25740
25741 if test $ac_cv_header_stdbool_h = yes; then
25742
25743 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
25744
25745 fi
25746
25747 for ac_header in stdlib.h string.h termio.h
25748 do :
25749   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25750 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25751 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25752   cat >>confdefs.h <<_ACEOF
25753 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25754 _ACEOF
25755
25756 fi
25757
25758 done
25759
25760 for ac_header in termios.h timepps.h timex.h unistd.h
25761 do :
25762   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25763 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25764 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25765   cat >>confdefs.h <<_ACEOF
25766 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25767 _ACEOF
25768
25769 fi
25770
25771 done
25772
25773
25774 case "$host" in
25775  *-*-aix*)
25776     for ac_header in utmpx.h
25777 do :
25778   ac_fn_c_check_header_mongrel "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default"
25779 if test "x$ac_cv_header_utmpx_h" = xyes; then :
25780   cat >>confdefs.h <<_ACEOF
25781 #define HAVE_UTMPX_H 1
25782 _ACEOF
25783
25784 fi
25785
25786 done
25787
25788     case "$ac_cv_header_utmpx_h" in
25789      yes)
25790         ;;
25791      *)
25792         for ac_header in utmp.h
25793 do :
25794   ac_fn_c_check_header_mongrel "$LINENO" "utmp.h" "ac_cv_header_utmp_h" "$ac_includes_default"
25795 if test "x$ac_cv_header_utmp_h" = xyes; then :
25796   cat >>confdefs.h <<_ACEOF
25797 #define HAVE_UTMP_H 1
25798 _ACEOF
25799
25800 fi
25801
25802 done
25803
25804         ;;
25805     esac
25806     ;;
25807  *)
25808     for ac_header in utmp.h utmpx.h
25809 do :
25810   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25811 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25812 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25813   cat >>confdefs.h <<_ACEOF
25814 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25815 _ACEOF
25816
25817 fi
25818
25819 done
25820
25821     ;;
25822 esac
25823
25824 #
25825 # On Suns only (so far) getpass() truncates the typed password to 8
25826 # characters, but getpassphrase() allows up to 257.  Most systems'
25827 # getpass() does not truncate, at least not so as to affect ntpq and
25828 # ntpdc password prompts.
25829 #
25830 # So check for getpassphrase(), but only on Sun operating systems.
25831 #
25832 case "$host" in
25833  *-*-sunos*|*-*-solaris*)
25834     for ac_func in getpassphrase
25835 do :
25836   ac_fn_c_check_func "$LINENO" "getpassphrase" "ac_cv_func_getpassphrase"
25837 if test "x$ac_cv_func_getpassphrase" = xyes; then :
25838   cat >>confdefs.h <<_ACEOF
25839 #define HAVE_GETPASSPHRASE 1
25840 _ACEOF
25841
25842 fi
25843 done
25844
25845 esac
25846
25847
25848 for ac_header in net/if6.h
25849 do :
25850   ac_fn_c_check_header_mongrel "$LINENO" "net/if6.h" "ac_cv_header_net_if6_h" "$ac_includes_default"
25851 if test "x$ac_cv_header_net_if6_h" = xyes; then :
25852   cat >>confdefs.h <<_ACEOF
25853 #define HAVE_NET_IF6_H 1
25854 _ACEOF
25855
25856 fi
25857
25858 done
25859
25860 for ac_header in net/route.h
25861 do :
25862   ac_fn_c_check_header_compile "$LINENO" "net/route.h" "ac_cv_header_net_route_h" "
25863     #include <sys/types.h>
25864     #include <sys/socket.h>
25865     #include <net/if.h>
25866
25867 "
25868 if test "x$ac_cv_header_net_route_h" = xyes; then :
25869   cat >>confdefs.h <<_ACEOF
25870 #define HAVE_NET_ROUTE_H 1
25871 _ACEOF
25872
25873 fi
25874
25875 done
25876
25877
25878 for ac_header in netinfo/ni.h
25879 do :
25880   ac_fn_c_check_header_mongrel "$LINENO" "netinfo/ni.h" "ac_cv_header_netinfo_ni_h" "$ac_includes_default"
25881 if test "x$ac_cv_header_netinfo_ni_h" = xyes; then :
25882   cat >>confdefs.h <<_ACEOF
25883 #define HAVE_NETINFO_NI_H 1
25884 _ACEOF
25885
25886 fi
25887
25888 done
25889
25890 case "$ac_cv_header_netinfo_ni_h" in
25891  yes)
25892
25893 $as_echo "#define HAVE_NETINFO 1" >>confdefs.h
25894
25895 esac
25896 for ac_header in sun/audioio.h sys/audioio.h sys/file.h
25897 do :
25898   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25899 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25900 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25901   cat >>confdefs.h <<_ACEOF
25902 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25903 _ACEOF
25904
25905 fi
25906
25907 done
25908
25909 case "$host" in
25910  *-*-sunos4*)
25911     ;;
25912  *)
25913     for ac_header in sys/ioctl.h
25914 do :
25915   ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
25916 if test "x$ac_cv_header_sys_ioctl_h" = xyes; then :
25917   cat >>confdefs.h <<_ACEOF
25918 #define HAVE_SYS_IOCTL_H 1
25919 _ACEOF
25920
25921 fi
25922
25923 done
25924
25925     ;;
25926 esac
25927 for ac_header in sys/ipc.h sys/lock.h sys/mman.h
25928 do :
25929   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25930 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25931 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25932   cat >>confdefs.h <<_ACEOF
25933 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25934 _ACEOF
25935
25936 fi
25937
25938 done
25939
25940 # HMS: Check sys/proc.h and sys/resource.h after some others
25941 for ac_header in sys/modem.h sys/ppsclock.h sys/ppstime.h sched.h
25942 do :
25943   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25944 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25945 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25946   cat >>confdefs.h <<_ACEOF
25947 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25948 _ACEOF
25949
25950 fi
25951
25952 done
25953
25954 case "$ac_cv_header_sched_h" in
25955  yes)
25956     ;;
25957  *)
25958     for ac_header in sys/sched.h
25959 do :
25960   ac_fn_c_check_header_mongrel "$LINENO" "sys/sched.h" "ac_cv_header_sys_sched_h" "$ac_includes_default"
25961 if test "x$ac_cv_header_sys_sched_h" = xyes; then :
25962   cat >>confdefs.h <<_ACEOF
25963 #define HAVE_SYS_SCHED_H 1
25964 _ACEOF
25965
25966 fi
25967
25968 done
25969
25970     ;;
25971 esac
25972 # HMS: Check sys/shm.h after some others
25973 for ac_header in sys/select.h sys/signal.h sys/sockio.h
25974 do :
25975   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25976 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25977 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25978   cat >>confdefs.h <<_ACEOF
25979 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25980 _ACEOF
25981
25982 fi
25983
25984 done
25985
25986 # HMS: Checked sys/socket.h earlier
25987 case "$host" in
25988  *-*-netbsd*)
25989     ;;
25990  *)
25991     for ac_header in machine/soundcard.h sys/soundcard.h
25992 do :
25993   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25994 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25995 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25996   cat >>confdefs.h <<_ACEOF
25997 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25998 _ACEOF
25999
26000 fi
26001
26002 done
26003
26004     ;;
26005 esac
26006 for ac_header in sys/stat.h sys/stream.h stropts.h sys/stropts.h sys/syssgi.h
26007 do :
26008   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26009 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
26010 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26011   cat >>confdefs.h <<_ACEOF
26012 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26013 _ACEOF
26014
26015 fi
26016
26017 done
26018
26019 for ac_header in sys/systune.h sys/termios.h sys/tpro.h sys/wait.h
26020 do :
26021   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26022 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
26023 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26024   cat >>confdefs.h <<_ACEOF
26025 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26026 _ACEOF
26027
26028 fi
26029
26030 done
26031
26032 case "$host" in
26033 *-convex-*)
26034     for ac_header in /sys/sync/queue.h /sys/sync/sema.h
26035 do :
26036   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26037 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
26038 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26039   cat >>confdefs.h <<_ACEOF
26040 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26041 _ACEOF
26042
26043 fi
26044
26045 done
26046
26047     ;;
26048 *-*-bsdi*)
26049     for ac_header in machine/inline.h sys/pcl720.h sys/i8253.h
26050 do :
26051   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26052 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
26053 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26054   cat >>confdefs.h <<_ACEOF
26055 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26056 _ACEOF
26057
26058 fi
26059
26060 done
26061
26062     ;;
26063 esac
26064
26065 case "$ac_cv_header_stdatomic_h" in
26066  yes)
26067         for ac_func in atomic_thread_fence
26068 do :
26069   ac_fn_c_check_func "$LINENO" "atomic_thread_fence" "ac_cv_func_atomic_thread_fence"
26070 if test "x$ac_cv_func_atomic_thread_fence" = xyes; then :
26071   cat >>confdefs.h <<_ACEOF
26072 #define HAVE_ATOMIC_THREAD_FENCE 1
26073 _ACEOF
26074
26075 fi
26076 done
26077
26078         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atomic_thread_fence()" >&5
26079 $as_echo_n "checking for atomic_thread_fence()... " >&6; }
26080 if ${ntp_cv_func_atomic_thread_fence+:} false; then :
26081   $as_echo_n "(cached) " >&6
26082 else
26083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26084 /* end confdefs.h.  */
26085
26086                         #include <stdatomic.h>
26087
26088 int
26089 main ()
26090 {
26091
26092                         atomic_thread_fence(memory_order_seq_cst);
26093
26094
26095   ;
26096   return 0;
26097 }
26098                 ntp_cv_func_atomic_thread_fence=yes
26099 _ACEOF
26100 if ac_fn_c_try_compile "$LINENO"; then :
26101   ntp_cv_func_atomic_thread_fence=no
26102
26103 fi
26104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26105
26106 fi
26107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_atomic_thread_fence" >&5
26108 $as_echo "$ntp_cv_func_atomic_thread_fence" >&6; }
26109     ;;
26110 esac
26111
26112 case "$host" in
26113  *-*-solaris2.6)
26114     # Broken...
26115     ;;
26116  *)
26117     for ac_func in ntp_adjtime ntp_gettime
26118 do :
26119   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
26120 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
26121 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
26122   cat >>confdefs.h <<_ACEOF
26123 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
26124 _ACEOF
26125
26126 fi
26127 done
26128
26129     ;;
26130 esac
26131
26132 case "$host" in
26133  *-*-*linux*)
26134     case "$ac_cv_func_ntp_gettime" in
26135      yes)
26136         ;;
26137      *)
26138         for ac_func in __ntp_gettime
26139 do :
26140   ac_fn_c_check_func "$LINENO" "__ntp_gettime" "ac_cv_func___ntp_gettime"
26141 if test "x$ac_cv_func___ntp_gettime" = xyes; then :
26142   cat >>confdefs.h <<_ACEOF
26143 #define HAVE___NTP_GETTIME 1
26144 _ACEOF
26145
26146 fi
26147 done
26148
26149         case "$ac_cv_func___ntp_gettime" in
26150          yes)
26151
26152 $as_echo "#define ntp_gettime __ntp_gettime" >>confdefs.h
26153
26154
26155 $as_echo "#define HAVE_NTP_GETTIME 1" >>confdefs.h
26156
26157         esac
26158         ;;
26159     esac
26160     for ac_func in adjtimex
26161 do :
26162   ac_fn_c_check_func "$LINENO" "adjtimex" "ac_cv_func_adjtimex"
26163 if test "x$ac_cv_func_adjtimex" = xyes; then :
26164   cat >>confdefs.h <<_ACEOF
26165 #define HAVE_ADJTIMEX 1
26166 _ACEOF
26167
26168 fi
26169 done
26170
26171     case "$ac_cv_func_adjtimex" in
26172      yes)
26173
26174 $as_echo "#define ntp_adjtime adjtimex" >>confdefs.h
26175
26176
26177 $as_echo "#define HAVE_NTP_ADJTIME 1" >>confdefs.h
26178
26179         have_adjtimex=1
26180         ;;
26181      *)
26182         for ac_func in __adjtimex
26183 do :
26184   ac_fn_c_check_func "$LINENO" "__adjtimex" "ac_cv_func___adjtimex"
26185 if test "x$ac_cv_func___adjtimex" = xyes; then :
26186   cat >>confdefs.h <<_ACEOF
26187 #define HAVE___ADJTIMEX 1
26188 _ACEOF
26189
26190 fi
26191 done
26192
26193         case "$ac_cv_func___adjtimex" in
26194          yes)
26195
26196 $as_echo "#define ntp_adjtime __adjtimex" >>confdefs.h
26197
26198
26199 $as_echo "#define HAVE_NTP_ADJTIME 1" >>confdefs.h
26200
26201
26202 $as_echo "#define adjtimex __adjtimex" >>confdefs.h
26203
26204
26205 $as_echo "#define HAVE_ADJTIMEX 1" >>confdefs.h
26206
26207             have_adjtimex=1
26208         esac
26209         ;;
26210     esac
26211 esac
26212 case "$have_adjtimex" in
26213  '')
26214     # nlist stuff is only needed for tickadj.
26215     saved_LIBS="$LIBS"
26216     LIBS=
26217     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nlist" >&5
26218 $as_echo_n "checking for library containing nlist... " >&6; }
26219 if ${ac_cv_search_nlist+:} false; then :
26220   $as_echo_n "(cached) " >&6
26221 else
26222   ac_func_search_save_LIBS=$LIBS
26223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26224 /* end confdefs.h.  */
26225
26226 /* Override any GCC internal prototype to avoid an error.
26227    Use char because int might match the return type of a GCC
26228    builtin and then its argument prototype would still apply.  */
26229 #ifdef __cplusplus
26230 extern "C"
26231 #endif
26232 char nlist ();
26233 int
26234 main ()
26235 {
26236 return nlist ();
26237   ;
26238   return 0;
26239 }
26240 _ACEOF
26241 for ac_lib in '' elf ld mld; do
26242   if test -z "$ac_lib"; then
26243     ac_res="none required"
26244   else
26245     ac_res=-l$ac_lib
26246     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26247   fi
26248   if ac_fn_c_try_link "$LINENO"; then :
26249   ac_cv_search_nlist=$ac_res
26250 fi
26251 rm -f core conftest.err conftest.$ac_objext \
26252     conftest$ac_exeext
26253   if ${ac_cv_search_nlist+:} false; then :
26254   break
26255 fi
26256 done
26257 if ${ac_cv_search_nlist+:} false; then :
26258
26259 else
26260   ac_cv_search_nlist=no
26261 fi
26262 rm conftest.$ac_ext
26263 LIBS=$ac_func_search_save_LIBS
26264 fi
26265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nlist" >&5
26266 $as_echo "$ac_cv_search_nlist" >&6; }
26267 ac_res=$ac_cv_search_nlist
26268 if test "$ac_res" != no; then :
26269   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26270
26271 fi
26272
26273     # XXX ac_cv_search_nlist will be 'none required', 'no', or '-l...'
26274     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_open" >&5
26275 $as_echo_n "checking for library containing kvm_open... " >&6; }
26276 if ${ac_cv_search_kvm_open+:} false; then :
26277   $as_echo_n "(cached) " >&6
26278 else
26279   ac_func_search_save_LIBS=$LIBS
26280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26281 /* end confdefs.h.  */
26282
26283 /* Override any GCC internal prototype to avoid an error.
26284    Use char because int might match the return type of a GCC
26285    builtin and then its argument prototype would still apply.  */
26286 #ifdef __cplusplus
26287 extern "C"
26288 #endif
26289 char kvm_open ();
26290 int
26291 main ()
26292 {
26293 return kvm_open ();
26294   ;
26295   return 0;
26296 }
26297 _ACEOF
26298 for ac_lib in '' kvm; do
26299   if test -z "$ac_lib"; then
26300     ac_res="none required"
26301   else
26302     ac_res=-l$ac_lib
26303     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26304   fi
26305   if ac_fn_c_try_link "$LINENO"; then :
26306   ac_cv_search_kvm_open=$ac_res
26307 fi
26308 rm -f core conftest.err conftest.$ac_objext \
26309     conftest$ac_exeext
26310   if ${ac_cv_search_kvm_open+:} false; then :
26311   break
26312 fi
26313 done
26314 if ${ac_cv_search_kvm_open+:} false; then :
26315
26316 else
26317   ac_cv_search_kvm_open=no
26318 fi
26319 rm conftest.$ac_ext
26320 LIBS=$ac_func_search_save_LIBS
26321 fi
26322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kvm_open" >&5
26323 $as_echo "$ac_cv_search_kvm_open" >&6; }
26324 ac_res=$ac_cv_search_kvm_open
26325 if test "$ac_res" != no; then :
26326   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26327
26328 fi
26329             # XXX ac_cv_search_kvm_open will be 'none required', 'no', or '-l...'
26330     for ac_header in nlist.h sys/var.h
26331 do :
26332   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26333 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
26334 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26335   cat >>confdefs.h <<_ACEOF
26336 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26337 _ACEOF
26338
26339 fi
26340
26341 done
26342
26343     case "$ac_cv_header_nlist_h" in
26344      yes)
26345
26346 $as_echo "#define NLIST_STRUCT 1" >>confdefs.h
26347
26348         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for n_un in struct nlist" >&5
26349 $as_echo_n "checking for n_un in struct nlist... " >&6; }
26350 if ${ntp_cv_struct_nlist_n_un+:} false; then :
26351   $as_echo_n "(cached) " >&6
26352 else
26353   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26354 /* end confdefs.h.  */
26355
26356                         #include <nlist.h>
26357
26358 int
26359 main ()
26360 {
26361
26362                         struct nlist n;
26363                         n.n_un.n_name = 0;
26364
26365
26366   ;
26367   return 0;
26368 }
26369                 ntp_cv_struct_nlist_n_un=yes
26370 _ACEOF
26371 if ac_fn_c_try_compile "$LINENO"; then :
26372   ntp_cv_struct_nlist_n_un=no
26373
26374 fi
26375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26376
26377 fi
26378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_nlist_n_un" >&5
26379 $as_echo "$ntp_cv_struct_nlist_n_un" >&6; }
26380         case "$ntp_cv_struct_nlist_n_un" in
26381          yes)
26382
26383 $as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
26384
26385         esac
26386     esac
26387
26388     LDADD_NLIST="$LIBS"
26389     LIBS="$saved_LIBS"
26390     { saved_LIBS=; unset saved_LIBS;}
26391 esac
26392
26393 for ac_header in sys/proc.h
26394 do :
26395   ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "
26396     #ifdef HAVE_SYS_TYPES_H
26397     # include <sys/types.h>
26398     #endif
26399     #ifdef HAVE_SYS_TIME_H
26400     # include <sys/time.h>
26401     #endif
26402
26403 "
26404 if test "x$ac_cv_header_sys_proc_h" = xyes; then :
26405   cat >>confdefs.h <<_ACEOF
26406 #define HAVE_SYS_PROC_H 1
26407 _ACEOF
26408
26409 fi
26410
26411 done
26412
26413
26414 for ac_header in sys/resource.h
26415 do :
26416   ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "
26417     #ifdef HAVE_SYS_TIME_H
26418     # include <sys/time.h>
26419     #endif
26420
26421 "
26422 if test "x$ac_cv_header_sys_resource_h" = xyes; then :
26423   cat >>confdefs.h <<_ACEOF
26424 #define HAVE_SYS_RESOURCE_H 1
26425 _ACEOF
26426
26427 fi
26428
26429 done
26430
26431
26432 for ac_header in sys/shm.h
26433 do :
26434   ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "
26435     #ifdef HAVE_SYS_TYPES_H
26436     # include <sys/types.h>
26437     #endif
26438     #ifdef HAVE_SYS_IPC_H
26439     # include <sys/ipc.h>
26440     #endif
26441
26442 "
26443 if test "x$ac_cv_header_sys_shm_h" = xyes; then :
26444   cat >>confdefs.h <<_ACEOF
26445 #define HAVE_SYS_SHM_H 1
26446 _ACEOF
26447
26448 fi
26449
26450 done
26451
26452
26453 for ac_header in sys/timex.h
26454 do :
26455   ac_fn_c_check_header_compile "$LINENO" "sys/timex.h" "ac_cv_header_sys_timex_h" "
26456     #ifdef HAVE_SYS_TIME_H
26457     # include <sys/time.h>
26458     #endif
26459
26460 "
26461 if test "x$ac_cv_header_sys_timex_h" = xyes; then :
26462   cat >>confdefs.h <<_ACEOF
26463 #define HAVE_SYS_TIMEX_H 1
26464 _ACEOF
26465
26466 fi
26467
26468 done
26469
26470
26471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
26472 $as_echo_n "checking return type of signal handlers... " >&6; }
26473 if ${ac_cv_type_signal+:} false; then :
26474   $as_echo_n "(cached) " >&6
26475 else
26476   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26477 /* end confdefs.h.  */
26478 #include <sys/types.h>
26479 #include <signal.h>
26480
26481 int
26482 main ()
26483 {
26484 return *(signal (0, 0)) (0) == 1;
26485   ;
26486   return 0;
26487 }
26488 _ACEOF
26489 if ac_fn_c_try_compile "$LINENO"; then :
26490   ac_cv_type_signal=int
26491 else
26492   ac_cv_type_signal=void
26493 fi
26494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26495 fi
26496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
26497 $as_echo "$ac_cv_type_signal" >&6; }
26498
26499 cat >>confdefs.h <<_ACEOF
26500 #define RETSIGTYPE $ac_cv_type_signal
26501 _ACEOF
26502
26503
26504 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
26505 if test "x$ac_cv_type_off_t" = xyes; then :
26506
26507 else
26508
26509 cat >>confdefs.h <<_ACEOF
26510 #define off_t long int
26511 _ACEOF
26512
26513 fi
26514
26515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
26516 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
26517 if ${ac_cv_struct_tm+:} false; then :
26518   $as_echo_n "(cached) " >&6
26519 else
26520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26521 /* end confdefs.h.  */
26522 #include <sys/types.h>
26523 #include <time.h>
26524
26525 int
26526 main ()
26527 {
26528 struct tm tm;
26529                                      int *p = &tm.tm_sec;
26530                                      return !p;
26531   ;
26532   return 0;
26533 }
26534 _ACEOF
26535 if ac_fn_c_try_compile "$LINENO"; then :
26536   ac_cv_struct_tm=time.h
26537 else
26538   ac_cv_struct_tm=sys/time.h
26539 fi
26540 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26541 fi
26542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
26543 $as_echo "$ac_cv_struct_tm" >&6; }
26544 if test $ac_cv_struct_tm = sys/time.h; then
26545
26546 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
26547
26548 fi
26549
26550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a fallback value for HZ" >&5
26551 $as_echo_n "checking for a fallback value for HZ... " >&6; }
26552 if ${ntp_cv_default_hz+:} false; then :
26553   $as_echo_n "(cached) " >&6
26554 else
26555
26556         ntp_cv_default_hz=100
26557         case "$host" in
26558          alpha*-dec-osf4*|alpha*-dec-osf5*)
26559             ntp_cv_default_hz=1024
26560             ;;
26561          mips-dec-ultrix4*)
26562             ntp_cv_default_hz=256
26563             ;;
26564         esac
26565
26566
26567 fi
26568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_default_hz" >&5
26569 $as_echo "$ntp_cv_default_hz" >&6; }
26570
26571 cat >>confdefs.h <<_ACEOF
26572 #define DEFAULT_HZ $ntp_cv_default_hz
26573 _ACEOF
26574
26575
26576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to override the system's value for HZ" >&5
26577 $as_echo_n "checking if we need to override the system's value for HZ... " >&6; }
26578 if ${ntp_cv_override_hz+:} false; then :
26579   $as_echo_n "(cached) " >&6
26580 else
26581
26582         ntp_cv_override_hz=no
26583         case "$host" in
26584          alpha*-dec-osf4*|alpha*-dec-osf5*)
26585             ntp_cv_override_hz=yes
26586             ;;
26587          mips-dec-ultrix4*)
26588             ntp_cv_override_hz=yes
26589             ;;
26590          *-*-freebsd*)
26591             ntp_cv_override_hz=yes
26592             ;;
26593          *-*-sunos4*)
26594             ntp_cv_override_hz=yes
26595             ;;
26596          *-*-kfreebsd*)
26597             ntp_cv_override_hz=yes
26598             ;;
26599         esac
26600
26601
26602 fi
26603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_override_hz" >&5
26604 $as_echo "$ntp_cv_override_hz" >&6; }
26605 case "$ntp_cv_override_hz" in
26606  yes)
26607
26608 $as_echo "#define OVERRIDE_HZ 1" >>confdefs.h
26609
26610 esac
26611
26612
26613
26614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct rt_msghdr" >&5
26615 $as_echo_n "checking for struct rt_msghdr... " >&6; }
26616 if ${ntp_cv_struct_rt_msghdr+:} false; then :
26617   $as_echo_n "(cached) " >&6
26618 else
26619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26620 /* end confdefs.h.  */
26621
26622                 #include <sys/types.h>
26623                 #include <sys/socket.h>
26624                 #include <net/if.h>
26625                 #include <net/route.h>
26626
26627 int
26628 main ()
26629 {
26630
26631                 struct rt_msghdr p;
26632
26633
26634   ;
26635   return 0;
26636 }
26637 _ACEOF
26638 if ac_fn_c_try_compile "$LINENO"; then :
26639   ntp_cv_struct_rt_msghdr=yes
26640 else
26641   ntp_cv_struct_rt_msghdr=no
26642
26643 fi
26644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26645
26646 fi
26647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_rt_msghdr" >&5
26648 $as_echo "$ntp_cv_struct_rt_msghdr" >&6; }
26649
26650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct rtattr" >&5
26651 $as_echo_n "checking for struct rtattr... " >&6; }
26652 if ${ntp_cv_rtattr+:} false; then :
26653   $as_echo_n "(cached) " >&6
26654 else
26655   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26656 /* end confdefs.h.  */
26657
26658                 #include <stddef.h>
26659                 #include <sys/socket.h>
26660                 #include <linux/rtnetlink.h>
26661
26662 int
26663 main ()
26664 {
26665
26666                 struct rtattr p;
26667
26668
26669   ;
26670   return 0;
26671 }
26672 _ACEOF
26673 if ac_fn_c_try_compile "$LINENO"; then :
26674   ntp_cv_rtattr=yes
26675 else
26676   ntp_cv_rtattr=no
26677
26678 fi
26679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26680
26681 fi
26682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rtattr" >&5
26683 $as_echo "$ntp_cv_rtattr" >&6; }
26684
26685 case "$ntp_cv_struct_rt_msghdr$ntp_cv_rtattr" in
26686  *yes*)
26687
26688 $as_echo "#define HAS_ROUTING_SOCKET 1" >>confdefs.h
26689
26690     case "$ntp_cv_rtattr" in
26691      yes)
26692
26693 $as_echo "#define HAVE_RTNETLINK 1" >>confdefs.h
26694
26695     esac
26696 esac
26697
26698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sigaction for sa_sigaction" >&5
26699 $as_echo_n "checking struct sigaction for sa_sigaction... " >&6; }
26700 if ${ntp_cv_struct_sigaction_has_sa_sigaction+:} false; then :
26701   $as_echo_n "(cached) " >&6
26702 else
26703   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26704 /* end confdefs.h.  */
26705
26706                 #include <signal.h>
26707
26708 int
26709 main ()
26710 {
26711
26712                 struct sigaction act;
26713                 act.sa_sigaction = 0;
26714
26715
26716   ;
26717   return 0;
26718 }
26719 _ACEOF
26720 if ac_fn_c_try_compile "$LINENO"; then :
26721   ntp_cv_struct_sigaction_has_sa_sigaction=yes
26722 else
26723   ntp_cv_struct_sigaction_has_sa_sigaction=no
26724
26725 fi
26726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26727
26728 fi
26729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_sigaction_has_sa_sigaction" >&5
26730 $as_echo "$ntp_cv_struct_sigaction_has_sa_sigaction" >&6; }
26731 case "$ntp_cv_struct_sigaction_has_sa_sigaction" in
26732  yes)
26733
26734 $as_echo "#define HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION 1" >>confdefs.h
26735
26736 esac
26737
26738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ppsclockev" >&5
26739 $as_echo_n "checking for struct ppsclockev... " >&6; }
26740 if ${ntp_cv_struct_ppsclockev+:} false; then :
26741   $as_echo_n "(cached) " >&6
26742 else
26743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26744 /* end confdefs.h.  */
26745
26746                 #ifdef HAVE_SYS_TYPES_H
26747                 # include <sys/types.h>
26748                 #endif
26749                 #ifdef HAVE_SYS_TERMIOS_H
26750                 # include <sys/termios.h>
26751                 #endif
26752                 #ifdef HAVE_SYS_TIME_H
26753                 # include <sys/time.h>
26754                 #endif
26755                 #ifdef HAVE_SYS_PPSCLOCK_H
26756                 # include <sys/ppsclock.h>
26757                 #endif
26758
26759 int
26760 main ()
26761 {
26762
26763                 extern struct ppsclockev *pce;
26764                 return pce->serial;
26765
26766
26767   ;
26768   return 0;
26769 }
26770 _ACEOF
26771 if ac_fn_c_try_compile "$LINENO"; then :
26772   ntp_cv_struct_ppsclockev=yes
26773 else
26774   ntp_cv_struct_ppsclockev=no
26775
26776 fi
26777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26778
26779 fi
26780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ppsclockev" >&5
26781 $as_echo "$ntp_cv_struct_ppsclockev" >&6; }
26782 case "$ntp_cv_struct_ppsclockev" in
26783  yes)
26784
26785 $as_echo "#define HAVE_STRUCT_PPSCLOCKEV 1" >>confdefs.h
26786
26787 esac
26788
26789 case "$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
26790   *yes*)
26791     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct snd_size" >&5
26792 $as_echo_n "checking for struct snd_size... " >&6; }
26793 if ${ntp_cv_struct_snd_size+:} false; then :
26794   $as_echo_n "(cached) " >&6
26795 else
26796   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26797 /* end confdefs.h.  */
26798
26799                     #ifdef HAVE_MACHINE_SOUNDCARD_H
26800                     # include <machine/soundcard.h>
26801                     #endif
26802                     #ifdef HAVE_SYS_SOUNDCARD_H
26803                     # include <sys/soundcard.h>
26804                     #endif
26805
26806 int
26807 main ()
26808 {
26809
26810                     extern struct snd_size *ss;
26811                     return ss->rec_size;
26812
26813
26814   ;
26815   return 0;
26816 }
26817 _ACEOF
26818 if ac_fn_c_try_compile "$LINENO"; then :
26819   ntp_cv_struct_snd_size=yes
26820 else
26821   ntp_cv_struct_snd_size=no
26822
26823 fi
26824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26825
26826 fi
26827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_snd_size" >&5
26828 $as_echo "$ntp_cv_struct_snd_size" >&6; }
26829     case "$ntp_cv_struct_snd_size" in
26830      yes)
26831
26832 $as_echo "#define HAVE_STRUCT_SND_SIZE 1" >>confdefs.h
26833
26834     esac
26835 esac
26836
26837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct clockinfo for hz" >&5
26838 $as_echo_n "checking struct clockinfo for hz... " >&6; }
26839 if ${ntp_cv_struct_clockinfo_has_hz+:} false; then :
26840   $as_echo_n "(cached) " >&6
26841 else
26842   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26843 /* end confdefs.h.  */
26844
26845                 #include <sys/time.h>
26846
26847 int
26848 main ()
26849 {
26850
26851                 extern struct clockinfo *pc;
26852                 return pc->hz;
26853
26854
26855   ;
26856   return 0;
26857 }
26858 _ACEOF
26859 if ac_fn_c_try_compile "$LINENO"; then :
26860   ntp_cv_struct_clockinfo_has_hz=yes
26861 else
26862   ntp_cv_struct_clockinfo_has_hz=no
26863
26864 fi
26865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26866
26867 fi
26868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_clockinfo_has_hz" >&5
26869 $as_echo "$ntp_cv_struct_clockinfo_has_hz" >&6; }
26870 case "$ntp_cv_struct_clockinfo_has_hz" in
26871  yes)
26872
26873 $as_echo "#define HAVE_HZ_IN_STRUCT_CLOCKINFO 1" >>confdefs.h
26874
26875 esac
26876
26877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct clockinfo for tickadj" >&5
26878 $as_echo_n "checking struct clockinfo for tickadj... " >&6; }
26879 if ${ntp_cv_struct_clockinfo_has_hz+:} false; then :
26880   $as_echo_n "(cached) " >&6
26881 else
26882   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26883 /* end confdefs.h.  */
26884
26885                 #include <sys/time.h>
26886
26887 int
26888 main ()
26889 {
26890
26891                 extern struct clockinfo *pc;
26892                 return pc->tickadj;
26893
26894
26895   ;
26896   return 0;
26897 }
26898 _ACEOF
26899 if ac_fn_c_try_compile "$LINENO"; then :
26900   ntp_cv_struct_clockinfo_has_hz=yes
26901 else
26902   ntp_cv_struct_clockinfo_has_hz=no
26903
26904 fi
26905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26906
26907 fi
26908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_clockinfo_has_hz" >&5
26909 $as_echo "$ntp_cv_struct_clockinfo_has_hz" >&6; }
26910 case "$ntp_cv_struct_clockinfo_has_hz" in
26911  yes)
26912
26913 $as_echo "#define HAVE_TICKADJ_IN_STRUCT_CLOCKINFO 1" >>confdefs.h
26914
26915 esac
26916
26917 case "$ntp_cv_struct_ntptimeval" in
26918  yes)
26919     ac_fn_c_check_member "$LINENO" "struct ntptimeval" "time.tv_nsec" "ac_cv_member_struct_ntptimeval_time_tv_nsec" "
26920             #ifdef HAVE_SYS_TIME_H
26921             # include <sys/time.h>
26922             #else
26923             # ifdef HAVE_TIME_H
26924             #  include <time.h>
26925             # endif
26926             #endif
26927             #ifdef HAVE_SYS_TIMEX_H
26928             # include <sys/timex.h>
26929             #else
26930             # ifdef HAVE_TIMEX_H
26931             #  include <timex.h>
26932             # endif
26933             #endif
26934
26935
26936 "
26937 if test "x$ac_cv_member_struct_ntptimeval_time_tv_nsec" = xyes; then :
26938
26939 cat >>confdefs.h <<_ACEOF
26940 #define HAVE_STRUCT_NTPTIMEVAL_TIME_TV_NSEC 1
26941 _ACEOF
26942
26943
26944 fi
26945
26946 esac
26947
26948 ####
26949
26950 for ac_func in arc4random_buf
26951 do :
26952   ac_fn_c_check_func "$LINENO" "arc4random_buf" "ac_cv_func_arc4random_buf"
26953 if test "x$ac_cv_func_arc4random_buf" = xyes; then :
26954   cat >>confdefs.h <<_ACEOF
26955 #define HAVE_ARC4RANDOM_BUF 1
26956 _ACEOF
26957
26958 fi
26959 done
26960
26961
26962 ####
26963
26964 saved_LIBS="$LIBS"
26965 LIBS="$LIBS $LDADD_LIBNTP"
26966 for ac_func in daemon
26967 do :
26968   ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
26969 if test "x$ac_cv_func_daemon" = xyes; then :
26970   cat >>confdefs.h <<_ACEOF
26971 #define HAVE_DAEMON 1
26972 _ACEOF
26973
26974 fi
26975 done
26976
26977 # XXX if we keep everything in LIBS and also keep separate lists, this simplifies.
26978 LIBS="$saved_LIBS"
26979 { saved_LIBS=; unset saved_LIBS;}
26980
26981 for ac_func in finite
26982 do :
26983   ac_fn_c_check_func "$LINENO" "finite" "ac_cv_func_finite"
26984 if test "x$ac_cv_func_finite" = xyes; then :
26985   cat >>confdefs.h <<_ACEOF
26986 #define HAVE_FINITE 1
26987 _ACEOF
26988
26989 else
26990   for ac_func in isfinite
26991 do :
26992   ac_fn_c_check_func "$LINENO" "isfinite" "ac_cv_func_isfinite"
26993 if test "x$ac_cv_func_isfinite" = xyes; then :
26994   cat >>confdefs.h <<_ACEOF
26995 #define HAVE_ISFINITE 1
26996 _ACEOF
26997
26998 else
26999
27000             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isfinite with <math.h>" >&5
27001 $as_echo_n "checking for isfinite with <math.h>... " >&6; }
27002             _libs=$LIBS
27003             # XXX
27004             LIBS="$LIBS -lm"
27005             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27006 /* end confdefs.h.  */
27007
27008                         #include <math.h>
27009
27010 int
27011 main ()
27012 {
27013
27014                         float f = 0.0;
27015                         isfinite(f);
27016
27017
27018   ;
27019   return 0;
27020 }
27021 _ACEOF
27022 if ac_fn_c_try_link "$LINENO"; then :
27023   ans=yes
27024 else
27025   ans=no
27026
27027 fi
27028 rm -f core conftest.err conftest.$ac_objext \
27029     conftest$ac_exeext conftest.$ac_ext
27030             LIBS=$_libs
27031             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
27032 $as_echo "$ans" >&6; }
27033             case "$ans" in
27034              yes)
27035                 $as_echo "#define HAVE_ISFINITE 1" >>confdefs.h
27036
27037             esac
27038
27039
27040 fi
27041 done
27042
27043
27044 fi
27045 done
27046
27047
27048 for ac_func in fnmatch getbootfile getuid getrusage nanosleep strsignal
27049 do :
27050   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
27051 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
27052 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
27053   cat >>confdefs.h <<_ACEOF
27054 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
27055 _ACEOF
27056
27057 fi
27058 done
27059
27060
27061 # kvm_open() is only used by tickadj.  Also see above.
27062 case "$ac_cv_header_kvm_h" in
27063  yes)
27064     for ac_func in kvm_open
27065 do :
27066   ac_fn_c_check_func "$LINENO" "kvm_open" "ac_cv_func_kvm_open"
27067 if test "x$ac_cv_func_kvm_open" = xyes; then :
27068   cat >>confdefs.h <<_ACEOF
27069 #define HAVE_KVM_OPEN 1
27070 _ACEOF
27071
27072 fi
27073 done
27074
27075     ;;
27076 esac
27077
27078 case "$host" in
27079  *-*-sco3.2v5.0.*)
27080     # Just stubs.  Sigh.
27081     ;;
27082  *) for ac_func in mkstemp
27083 do :
27084   ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp"
27085 if test "x$ac_cv_func_mkstemp" = xyes; then :
27086   cat >>confdefs.h <<_ACEOF
27087 #define HAVE_MKSTEMP 1
27088 _ACEOF
27089
27090 fi
27091 done
27092
27093     ;;
27094 esac
27095 for ac_func in mktime
27096 do :
27097   ac_fn_c_check_func "$LINENO" "mktime" "ac_cv_func_mktime"
27098 if test "x$ac_cv_func_mktime" = xyes; then :
27099   cat >>confdefs.h <<_ACEOF
27100 #define HAVE_MKTIME 1
27101 _ACEOF
27102
27103 fi
27104 done
27105
27106 case "$host" in
27107  *-*-aix[4-9]*)
27108     # XXX only verified thru AIX6.
27109     # Just a stub.  Sigh.
27110     ;;
27111  *-*-irix[45]*)
27112     # Just a stub in "old" Irix.  Sigh.
27113     ;;
27114 # In the belief that the fix for bug 1223 fixes mlockall() under linux...
27115 # *-*-*linux*)
27116 #    # there, but more trouble than it is worth for now (resolver problems)
27117 #    ;;
27118  *-*-qnx*)
27119     # Apparently there but not working in QNX.  Sigh?
27120     ;;
27121  *-*-sco3.2v5.0.*)
27122     # Just a stub.  Sigh.
27123     ;;
27124  alpha*-dec-osf4*|alpha*-dec-osf5*)
27125     # mlockall is there, as a #define calling memlk via <sys/mman.h>
27126     # Not easy to test for - cheat.
27127     for ac_func in memlk
27128 do :
27129   ac_fn_c_check_func "$LINENO" "memlk" "ac_cv_func_memlk"
27130 if test "x$ac_cv_func_memlk" = xyes; then :
27131   cat >>confdefs.h <<_ACEOF
27132 #define HAVE_MEMLK 1
27133 _ACEOF
27134  ac_cv_func_mlockall=yes
27135 fi
27136 done
27137
27138     for ac_func in mlockall
27139 do :
27140   ac_fn_c_check_func "$LINENO" "mlockall" "ac_cv_func_mlockall"
27141 if test "x$ac_cv_func_mlockall" = xyes; then :
27142   cat >>confdefs.h <<_ACEOF
27143 #define HAVE_MLOCKALL 1
27144 _ACEOF
27145
27146 fi
27147 done
27148
27149     ;;
27150  *) for ac_func in mlockall
27151 do :
27152   ac_fn_c_check_func "$LINENO" "mlockall" "ac_cv_func_mlockall"
27153 if test "x$ac_cv_func_mlockall" = xyes; then :
27154   cat >>confdefs.h <<_ACEOF
27155 #define HAVE_MLOCKALL 1
27156 _ACEOF
27157
27158 fi
27159 done
27160
27161     ;;
27162 esac
27163 for ac_func in nice plock pututline pututxline readlink rtprio
27164 do :
27165   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
27166 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
27167 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
27168   cat >>confdefs.h <<_ACEOF
27169 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
27170 _ACEOF
27171
27172 fi
27173 done
27174
27175 case "$host" in
27176  *-*-aix[4-9]*)
27177     # XXX only verified thru AIX6.
27178     # Just a stub in AIX 4.  Sigh.
27179     ;;
27180  *-*-solaris2.5*)
27181     # Just stubs in solaris2.5.  Sigh.
27182     ;;
27183  *) for ac_func in sched_setscheduler
27184 do :
27185   ac_fn_c_check_func "$LINENO" "sched_setscheduler" "ac_cv_func_sched_setscheduler"
27186 if test "x$ac_cv_func_sched_setscheduler" = xyes; then :
27187   cat >>confdefs.h <<_ACEOF
27188 #define HAVE_SCHED_SETSCHEDULER 1
27189 _ACEOF
27190
27191 fi
27192 done
27193
27194     ;;
27195 esac
27196 for ac_func in setlinebuf setpgid setpriority setsid setvbuf
27197 do :
27198   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
27199 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
27200 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
27201   cat >>confdefs.h <<_ACEOF
27202 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
27203 _ACEOF
27204
27205 fi
27206 done
27207
27208 for ac_func in strdup strerror setrlimit strchr
27209 do :
27210   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
27211 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
27212 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
27213   cat >>confdefs.h <<_ACEOF
27214 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
27215 _ACEOF
27216
27217 fi
27218 done
27219
27220 case "$host" in
27221  *-*-aix[4-9]*)
27222     # XXX only verified thru AIX6.
27223     # Just stubs.  Sigh.
27224     ;;
27225  *-*-netbsd1*)
27226     # Just stubs.  Sigh.
27227     ;;
27228  *-*-netbsdelf1*)
27229     # Just stubs.  Sigh.
27230     ;;
27231  *-*-openbsd*)
27232     # Just stubs.  Sigh.
27233     ;;
27234  *)
27235     for ac_func in timer_create
27236 do :
27237   ac_fn_c_check_func "$LINENO" "timer_create" "ac_cv_func_timer_create"
27238 if test "x$ac_cv_func_timer_create" = xyes; then :
27239   cat >>confdefs.h <<_ACEOF
27240 #define HAVE_TIMER_CREATE 1
27241 _ACEOF
27242
27243 fi
27244 done
27245
27246     ;;
27247 esac
27248
27249
27250
27251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RLIMIT_MEMLOCK" >&5
27252 $as_echo_n "checking for RLIMIT_MEMLOCK... " >&6; }
27253 if ${ntp_cv_rlimit_memlock+:} false; then :
27254   $as_echo_n "(cached) " >&6
27255 else
27256   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27257 /* end confdefs.h.  */
27258
27259                 #ifdef HAVE_SYS_TYPES_H
27260                 # include <sys/types.h>
27261                 #endif
27262                 #ifdef HAVE_SYS_TIME_H
27263                 # include <sys/time.h>
27264                 #endif
27265                 #ifdef HAVE_SYS_RESOURCE_H
27266                 # include <sys/resource.h>
27267                 #endif
27268
27269 int
27270 main ()
27271 {
27272
27273                 getrlimit(RLIMIT_MEMLOCK, 0);
27274
27275
27276   ;
27277   return 0;
27278 }
27279 _ACEOF
27280 if ac_fn_c_try_compile "$LINENO"; then :
27281   ntp_cv_rlimit_memlock=yes
27282 else
27283   ntp_cv_rlimit_memlock=no
27284
27285 fi
27286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27287
27288 fi
27289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rlimit_memlock" >&5
27290 $as_echo "$ntp_cv_rlimit_memlock" >&6; }
27291 case "$host" in
27292  *-*-*linux*)
27293     ntp_dflt_rlimit_memlock="-1" ;;
27294  *) ntp_dflt_rlimit_memlock="32" ;;
27295 esac
27296 case "$ntp_cv_rlimit_memlock" in
27297  yes)
27298
27299     HAVE_RLIMIT_MEMLOCK=" memlock $ntp_dflt_rlimit_memlock"  ;;
27300 esac
27301
27302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RLIMIT_STACK" >&5
27303 $as_echo_n "checking for RLIMIT_STACK... " >&6; }
27304 if ${ntp_cv_rlimit_stack+:} false; then :
27305   $as_echo_n "(cached) " >&6
27306 else
27307   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27308 /* end confdefs.h.  */
27309
27310                 #ifdef HAVE_SYS_TYPES_H
27311                 # include <sys/types.h>
27312                 #endif
27313                 #ifdef HAVE_SYS_TIME_H
27314                 # include <sys/time.h>
27315                 #endif
27316                 #ifdef HAVE_SYS_RESOURCE_H
27317                 # include <sys/resource.h>
27318                 #endif
27319
27320 int
27321 main ()
27322 {
27323
27324                 getrlimit(RLIMIT_STACK, 0);
27325
27326
27327   ;
27328   return 0;
27329 }
27330 _ACEOF
27331 if ac_fn_c_try_compile "$LINENO"; then :
27332   ntp_cv_rlimit_stack=yes
27333 else
27334   ntp_cv_rlimit_stack=no
27335
27336 fi
27337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27338
27339 fi
27340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rlimit_stack" >&5
27341 $as_echo "$ntp_cv_rlimit_stack" >&6; }
27342 case "$ntp_cv_rlimit_stack" in
27343  yes)
27344
27345     HAVE_RLIMIT_STACK=" stacksize 50"
27346 esac
27347
27348 # HMS: Only if we are doing the MLOCKALL stuff...
27349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the default number of 4k stack pages" >&5
27350 $as_echo_n "checking for the default number of 4k stack pages... " >&6; }
27351
27352 # Check whether --with-stack-limit was given.
27353 if test "${with_stack_limit+set}" = set; then :
27354   withval=$with_stack_limit; ans=$withval
27355 else
27356   ans=yes
27357
27358 fi
27359
27360 case "$ans" in
27361  yes | no)
27362     case "$host" in
27363      *-*-openbsd*)
27364         ans=200
27365         ;;
27366      *) ans=50
27367         ;;
27368     esac
27369     ;;
27370  [1-9][0-9]*)
27371     ;;
27372  *) as_fn_error $? "\"--with-stack-limit requires an integer argument.\"" "$LINENO" 5
27373     ;;
27374 esac
27375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
27376 $as_echo "$ans" >&6; }
27377
27378 cat >>confdefs.h <<_ACEOF
27379 #define DFLT_RLIMIT_STACK $ans
27380 _ACEOF
27381
27382
27383 # HMS: only if we have RLIMIT_MEMLOCK
27384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the default number of megabytes to MEMLOCK" >&5
27385 $as_echo_n "checking for the default number of megabytes to MEMLOCK... " >&6; }
27386
27387 # Check whether --with-memlock was given.
27388 if test "${with_memlock+set}" = set; then :
27389   withval=$with_memlock; ans=$withval
27390 else
27391   ans=yes
27392
27393 fi
27394
27395 case "$ans" in
27396  yes | no)
27397     ans=$ntp_dflt_rlimit_memlock
27398     ;;
27399  [1-9][0-9]*) ;;
27400  *) as_fn_error $? "\"--with-memlock requires an integer argument.\"" "$LINENO" 5
27401      ;;
27402 esac
27403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
27404 $as_echo "$ans" >&6; }
27405
27406 cat >>confdefs.h <<_ACEOF
27407 #define DFLT_RLIMIT_MEMLOCK $ans
27408 _ACEOF
27409
27410
27411
27412
27413 # some OSes prefer _exit() in forked children to exit()
27414 for ac_func in _exit
27415 do :
27416   ac_fn_c_check_func "$LINENO" "_exit" "ac_cv_func__exit"
27417 if test "x$ac_cv_func__exit" = xyes; then :
27418   cat >>confdefs.h <<_ACEOF
27419 #define HAVE__EXIT 1
27420 _ACEOF
27421
27422 fi
27423 done
27424
27425 ntp_worker_child_exit=exit
27426 case "$ac_cv_func__exit::$host_os" in
27427  yes::netbsd*)
27428     ntp_worker_child_exit=_exit
27429     ;;
27430  yes::openbsd*)
27431     ntp_worker_child_exit=_exit
27432     ;;
27433 esac
27434
27435 cat >>confdefs.h <<_ACEOF
27436 #define WORKER_CHILD_EXIT $ntp_worker_child_exit
27437 _ACEOF
27438
27439
27440 for ac_func in umask uname updwtmp updwtmpx
27441 do :
27442   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
27443 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
27444 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
27445   cat >>confdefs.h <<_ACEOF
27446 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
27447 _ACEOF
27448
27449 fi
27450 done
27451
27452
27453 ###
27454
27455 # http://bugs.ntp.org/737
27456 case "$ac_cv_func_recvmsg" in
27457  yes)
27458     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need extra help to define struct iovec" >&5
27459 $as_echo_n "checking if we need extra help to define struct iovec... " >&6; }
27460 if ${ntp_cv_struct_iovec_help+:} false; then :
27461   $as_echo_n "(cached) " >&6
27462 else
27463
27464             compiled=no
27465             for ntp_cv_struct_iovec_help in '0' '1'; do
27466                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27467 /* end confdefs.h.  */
27468
27469                             #ifdef HAVE_SYS_TYPES_H
27470                             # include <sys/types.h>
27471                             #endif
27472                             #ifdef HAVE_SYS_SOCKET_H
27473                             # include <sys/socket.h>
27474                             #endif
27475                             #if $ntp_cv_struct_iovec_help
27476                             # include <sys/uio.h>
27477                             #endif
27478
27479 int
27480 main ()
27481 {
27482
27483                             void foo(void) {
27484                                 ssize_t x;
27485                                 int s = 0;
27486                                 struct iovec iov;
27487                                 struct msghdr mh;
27488                                 int flags = 0;
27489
27490                                 mh.msg_iov = &iov;
27491                                 x = recvmsg(s, &mh, flags);
27492                             }
27493
27494
27495   ;
27496   return 0;
27497 }
27498 _ACEOF
27499 if ac_fn_c_try_compile "$LINENO"; then :
27500   compiled=yes ; break 1
27501 fi
27502 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27503             done
27504             case "$compiled" in
27505              no)
27506                 ntp_cv_struct_iovec_help=0
27507             esac
27508             { compiled=; unset compiled;}
27509
27510
27511 fi
27512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_iovec_help" >&5
27513 $as_echo "$ntp_cv_struct_iovec_help" >&6; }
27514     case "$ntp_cv_struct_iovec_help" in
27515      1)
27516
27517 $as_echo "#define HAVE_SYS_UIO_H 1" >>confdefs.h
27518
27519     esac
27520 esac
27521
27522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments taken by setpgrp()" >&5
27523 $as_echo_n "checking number of arguments taken by setpgrp()... " >&6; }
27524 if ${ntp_cv_func_setpgrp_nargs+:} false; then :
27525   $as_echo_n "(cached) " >&6
27526 else
27527   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27528 /* end confdefs.h.  */
27529
27530                 #ifdef HAVE_SYS_TYPES_H
27531                 # include <sys/types.h>
27532                 #endif
27533                 #ifdef HAVE_UNISTD_H
27534                 # include <unistd.h>
27535                 #endif
27536
27537 int
27538 main ()
27539 {
27540
27541                 setpgrp(0, 0);
27542
27543
27544   ;
27545   return 0;
27546 }
27547 _ACEOF
27548 if ac_fn_c_try_compile "$LINENO"; then :
27549   ntp_cv_func_setpgrp_nargs=2
27550 else
27551   ntp_cv_func_setpgrp_nargs=0
27552
27553 fi
27554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27555
27556 fi
27557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_setpgrp_nargs" >&5
27558 $as_echo "$ntp_cv_func_setpgrp_nargs" >&6; }
27559 case "$ntp_cv_func_setpgrp_nargs" in
27560  0)
27561
27562 $as_echo "#define HAVE_SETPGRP_0 1" >>confdefs.h
27563
27564 esac
27565
27566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to declare 'errno'" >&5
27567 $as_echo_n "checking if we need to declare 'errno'... " >&6; }
27568 if ${ntp_cv_decl_errno+:} false; then :
27569   $as_echo_n "(cached) " >&6
27570 else
27571   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27572 /* end confdefs.h.  */
27573
27574                 #ifdef HAVE_ERRNO_H
27575                 # include <errno.h>
27576                 #endif
27577
27578 int
27579 main ()
27580 {
27581
27582                 errno = 0;
27583
27584
27585   ;
27586   return 0;
27587 }
27588 _ACEOF
27589 if ac_fn_c_try_compile "$LINENO"; then :
27590   ntp_cv_decl_errno=no
27591 else
27592   ntp_cv_decl_errno=yes
27593
27594 fi
27595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27596
27597 fi
27598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_decl_errno" >&5
27599 $as_echo "$ntp_cv_decl_errno" >&6; }
27600 case "$ntp_cv_decl_errno" in
27601  yes)
27602
27603 $as_echo "#define DECL_ERRNO 1" >>confdefs.h
27604
27605 esac
27606
27607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we may declare 'h_errno'" >&5
27608 $as_echo_n "checking if we may declare 'h_errno'... " >&6; }
27609 if ${ntp_cv_decl_h_errno+:} false; then :
27610   $as_echo_n "(cached) " >&6
27611 else
27612   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27613 /* end confdefs.h.  */
27614
27615                 #include <sys/types.h>
27616                 #ifdef HAVE_NETINET_IN_H
27617                 # include <netinet/in.h>
27618                 #endif
27619                 #ifdef HAVE_ARPA_NAMESER_H
27620                 # include <arpa/nameser.h>
27621                 #endif
27622                 #ifdef HAVE_NETDB_H
27623                 # include <netdb.h>
27624                 #endif
27625                 #ifdef HAVE_RESOLV_H
27626                 # include <resolv.h>
27627                 #endif
27628
27629 int
27630 main ()
27631 {
27632
27633                 extern int h_errno;
27634
27635
27636   ;
27637   return 0;
27638 }
27639 _ACEOF
27640 if ac_fn_c_try_compile "$LINENO"; then :
27641   ntp_cv_decl_h_errno=yes
27642 else
27643   ntp_cv_decl_h_errno=no
27644
27645 fi
27646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27647
27648 fi
27649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_decl_h_errno" >&5
27650 $as_echo "$ntp_cv_decl_h_errno" >&6; }
27651 case "$ntp_cv_decl_h_errno" in
27652  yes)
27653
27654 $as_echo "#define DECL_H_ERRNO 1" >>confdefs.h
27655
27656 esac
27657
27658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if declaring 'syscall()' is ok" >&5
27659 $as_echo_n "checking if declaring 'syscall()' is ok... " >&6; }
27660 if ${ntp_cv_decl_syscall+:} false; then :
27661   $as_echo_n "(cached) " >&6
27662 else
27663   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27664 /* end confdefs.h.  */
27665
27666                 #ifdef HAVE_SYS_TYPES_H
27667                 # include <sys/types.h>
27668                 #endif
27669                 #ifdef HAVE_UNISTD_H
27670                 # include <unistd.h>
27671                 #endif
27672
27673 int
27674 main ()
27675 {
27676
27677                 extern int syscall (int, ...);
27678
27679
27680   ;
27681   return 0;
27682 }
27683         ntp_cv_decl_syscall=yes
27684 _ACEOF
27685 if ac_fn_c_try_compile "$LINENO"; then :
27686   ntp_cv_decl_syscall=no
27687
27688 fi
27689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27690
27691 fi
27692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_decl_syscall" >&5
27693 $as_echo "$ntp_cv_decl_syscall" >&6; }
27694 case "$ntp_cv_decl_syscall" in
27695  yes)
27696
27697 $as_echo "#define DECL_SYSCALL 1" >>confdefs.h
27698
27699 esac
27700
27701 case "$host" in
27702  *-*-aix4.3.*)
27703
27704 $as_echo "#define DECL_HSTRERROR_0 1" >>confdefs.h
27705                 # Needed for XLC under AIX 4.3.2
27706     ;;
27707  *-*-mpeix*)
27708
27709 $as_echo "#define DECL_ADJTIME_0 1" >>confdefs.h
27710
27711
27712 $as_echo "#define DECL_INET_NTOA_0 1" >>confdefs.h
27713
27714
27715 $as_echo "#define DECL_MKTEMP_0 1" >>confdefs.h
27716
27717
27718 $as_echo "#define DECL_SELECT_0 1" >>confdefs.h
27719
27720
27721 $as_echo "#define DECL_SETITIMER_0 1" >>confdefs.h
27722
27723
27724 $as_echo "#define DECL_SYSLOG_0 1" >>confdefs.h
27725
27726
27727 $as_echo "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
27728
27729     ;;
27730  *-*-osf[45]*)
27731
27732 $as_echo "#define DECL_PLOCK_0 1" >>confdefs.h
27733
27734
27735 $as_echo "#define DECL_STIME_1 1" >>confdefs.h
27736
27737     ;;
27738  *-*-qnx*)
27739
27740 $as_echo "#define DECL_ADJTIME_0 1" >>confdefs.h
27741
27742     ;;
27743  *-*-riscos4*)
27744
27745 $as_echo "#define DECL_ADJTIME_0 1" >>confdefs.h
27746
27747
27748 $as_echo "#define DECL_BZERO_0 1" >>confdefs.h
27749
27750
27751 $as_echo "#define DECL_IOCTL_0 1" >>confdefs.h
27752
27753
27754 $as_echo "#define DECL_IPC_0 1" >>confdefs.h
27755
27756
27757 $as_echo "#define DECL_MEMMOVE_0 1" >>confdefs.h
27758
27759
27760 $as_echo "#define DECL_MKTEMP_0 1" >>confdefs.h
27761
27762
27763 $as_echo "#define DECL_RENAME_0 1" >>confdefs.h
27764
27765
27766 $as_echo "#define DECL_SELECT_0 1" >>confdefs.h
27767
27768
27769 $as_echo "#define DECL_SETITIMER_0 1" >>confdefs.h
27770
27771
27772 $as_echo "#define DECL_SETPRIORITY_0 1" >>confdefs.h
27773
27774
27775 $as_echo "#define DECL_STDIO_0 1" >>confdefs.h
27776
27777
27778 $as_echo "#define DECL_STRTOL_0 1" >>confdefs.h
27779
27780
27781 $as_echo "#define DECL_SYSLOG_0 1" >>confdefs.h
27782
27783
27784 $as_echo "#define DECL_TIME_0 1" >>confdefs.h
27785
27786
27787 $as_echo "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
27788
27789
27790 $as_echo "#define DECL_TOLOWER_0 1" >>confdefs.h
27791
27792     ;;
27793  *-*-solaris2*)
27794
27795 $as_echo "#define DECL_MKSTEMP_0 1" >>confdefs.h
27796
27797
27798 $as_echo "#define DECL_SETPRIORITY_1 1" >>confdefs.h
27799
27800     case "$host" in
27801      *-*-solaris2.4)
27802
27803 $as_echo "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
27804
27805         ;;
27806     esac
27807     ;;
27808  *-*-sunos4*)
27809
27810 $as_echo "#define DECL_ADJTIME_0 1" >>confdefs.h
27811
27812
27813 $as_echo "#define DECL_BCOPY_0 1" >>confdefs.h
27814
27815
27816 $as_echo "#define DECL_BZERO_0 1" >>confdefs.h
27817
27818
27819 $as_echo "#define DECL_IOCTL_0 1" >>confdefs.h
27820
27821
27822 $as_echo "#define DECL_IPC_0 1" >>confdefs.h
27823
27824
27825 $as_echo "#define DECL_MEMMOVE_0 1" >>confdefs.h
27826
27827
27828 $as_echo "#define DECL_MKTEMP_0 1" >>confdefs.h
27829
27830
27831 $as_echo "#define DECL_MKSTEMP_0 1" >>confdefs.h
27832
27833
27834 $as_echo "#define DECL_RENAME_0 1" >>confdefs.h
27835
27836
27837 $as_echo "#define DECL_SELECT_0 1" >>confdefs.h
27838
27839
27840 $as_echo "#define DECL_SETITIMER_0 1" >>confdefs.h
27841
27842
27843 $as_echo "#define DECL_SETPRIORITY_0 1" >>confdefs.h
27844
27845
27846 $as_echo "#define DECL_SIGVEC_0 1" >>confdefs.h
27847
27848     case "`basename $ac_cv_prog_CC`" in
27849      acc*) ;;
27850      *)
27851 $as_echo "#define DECL_STDIO_0 1" >>confdefs.h
27852
27853         ;;
27854     esac
27855
27856 $as_echo "#define DECL_STRTOL_0 1" >>confdefs.h
27857
27858
27859 $as_echo "#define DECL_SYSLOG_0 1" >>confdefs.h
27860
27861
27862 $as_echo "#define DECL_TIME_0 1" >>confdefs.h
27863
27864
27865 $as_echo "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
27866
27867
27868 $as_echo "#define DECL_TOLOWER_0 1" >>confdefs.h
27869
27870
27871 $as_echo "#define DECL_TOUPPER_0 1" >>confdefs.h
27872
27873
27874 $as_echo "#define DECL_STRERROR_0 1" >>confdefs.h
27875
27876     ;;
27877  *-*-ultrix4*)
27878
27879 $as_echo "#define DECL_ADJTIME_0 1" >>confdefs.h
27880
27881
27882 $as_echo "#define DECL_BZERO_0 1" >>confdefs.h
27883
27884
27885 $as_echo "#define DECL_CFSETISPEED_0 1" >>confdefs.h
27886
27887
27888 $as_echo "#define DECL_IOCTL_0 1" >>confdefs.h
27889
27890
27891 $as_echo "#define DECL_IPC_0 1" >>confdefs.h
27892
27893
27894 $as_echo "#define DECL_MKTEMP_0 1" >>confdefs.h
27895
27896
27897 $as_echo "#define DECL_NLIST_0 1" >>confdefs.h
27898
27899
27900 $as_echo "#define DECL_PLOCK_0 1" >>confdefs.h
27901
27902
27903 $as_echo "#define DECL_SELECT_0 1" >>confdefs.h
27904
27905
27906 $as_echo "#define DECL_SETITIMER_0 1" >>confdefs.h
27907
27908
27909 $as_echo "#define DECL_SETPRIORITY_0 1" >>confdefs.h
27910
27911
27912 $as_echo "#define DECL_STIME_0 1" >>confdefs.h
27913
27914
27915 $as_echo "#define DECL_SYSLOG_0 1" >>confdefs.h
27916
27917
27918 $as_echo "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
27919
27920     ;;
27921 esac
27922
27923 case "$host" in
27924  *-*-sco3.2*)
27925
27926 $as_echo "#define TERMIOS_NEEDS__SVID3 1" >>confdefs.h
27927
27928     ;;
27929 esac
27930
27931 case "$host" in
27932  *-*-hpux[567]*)
27933
27934 $as_echo "#define NEED_RCVBUF_SLOP 1" >>confdefs.h
27935
27936 esac
27937
27938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we will open the broadcast socket" >&5
27939 $as_echo_n "checking if we will open the broadcast socket... " >&6; }
27940 if ${ntp_cv_var_open_bcast_socket+:} false; then :
27941   $as_echo_n "(cached) " >&6
27942 else
27943
27944         ans=yes
27945         case "$host" in
27946          *-*-domainos)
27947             ans=no
27948         esac
27949         ntp_cv_var_open_bcast_socket=$ans
27950
27951
27952 fi
27953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_open_bcast_socket" >&5
27954 $as_echo "$ntp_cv_var_open_bcast_socket" >&6; }
27955 case "$ntp_cv_var_open_bcast_socket" in
27956  yes)
27957
27958 $as_echo "#define OPEN_BCAST_SOCKET 1" >>confdefs.h
27959
27960 esac
27961
27962 case "$host" in
27963  *-*-hpux*)
27964
27965 $as_echo "#define NEED_HPUX_FINDCONFIG 1" >>confdefs.h
27966
27967 esac
27968
27969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if process groups are set with -pid" >&5
27970 $as_echo_n "checking if process groups are set with -pid... " >&6; }
27971 if ${ntp_cv_arg_setpgrp_negpid+:} false; then :
27972   $as_echo_n "(cached) " >&6
27973 else
27974
27975         case "$host" in
27976          *-*-hpux[567]*)
27977             ans=no
27978             ;;
27979          *-*-hpux*)
27980             ans=yes
27981             ;;
27982          *-*-*linux*)
27983             ans=yes
27984             ;;
27985          *-*-sunos3*)
27986             ans=yes
27987             ;;
27988          *-*-ultrix2*)
27989             ans=yes
27990             ;;
27991          *)
27992             ans=no
27993             ;;
27994         esac
27995         ntp_cv_arg_setpgrp_negpid=$ans
27996
27997
27998 fi
27999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_arg_setpgrp_negpid" >&5
28000 $as_echo "$ntp_cv_arg_setpgrp_negpid" >&6; }
28001 case "$ntp_cv_arg_setpgrp_negpid" in
28002  yes)
28003
28004 $as_echo "#define UDP_BACKWARDS_SETOWN 1" >>confdefs.h
28005
28006 esac
28007
28008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need a ctty for F_SETOWN" >&5
28009 $as_echo_n "checking if we need a ctty for F_SETOWN... " >&6; }
28010 if ${ntp_cv_func_ctty_for_f_setown+:} false; then :
28011   $as_echo_n "(cached) " >&6
28012 else
28013
28014         case "$host" in
28015          *-*-bsdi[23]*)
28016             ans=yes
28017             ;;
28018          *-*-freebsd*)
28019             ans=yes
28020             ;;
28021         # NetBSD versions prior to 3.99.8 require a CTTY for F_SETOWN,
28022         # while later versions will fail a ioctl(TIOCSCTTY, 0) call in
28023         # some cases and so should not have USE_FSETOWNCTTY.  "netbsd"
28024         # in $host may be followed by "aout", "ecoff", or "elf".
28025          *-*-netbsd*[a-z]3.[0-8]*|*-*-netbsd*[a-z][0-2].*|*-*-netbsd*[a-z]3.99.[0-7])
28026             ans=yes
28027             ;;
28028          *-*-netbsd3.[0-8]*|*-*-netbsd[0-2].*|*-*-netbsd3.99.[0-7])
28029             ans=yes
28030             ;;
28031          *-*-openbsd*)
28032             ans=yes
28033             ;;
28034          *-*-osf*)
28035             ans=yes
28036             ;;
28037          *-*-darwin*)
28038             ans=yes
28039             ;;
28040          *)
28041             ans=no
28042             ;;
28043         esac
28044         ntp_cv_func_ctty_for_f_setown=$ans
28045
28046
28047 fi
28048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_ctty_for_f_setown" >&5
28049 $as_echo "$ntp_cv_func_ctty_for_f_setown" >&6; }
28050 case "$ntp_cv_func_ctty_for_f_setown" in
28051  yes)
28052
28053 $as_echo "#define USE_FSETOWNCTTY 1" >>confdefs.h
28054
28055 esac
28056
28057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the OS clears cached routes when more specifics become available" >&5
28058 $as_echo_n "checking if the OS clears cached routes when more specifics become available... " >&6; }
28059 if ${ntp_cv_os_routeupdates+:} false; then :
28060   $as_echo_n "(cached) " >&6
28061 else
28062
28063         case "$host" in
28064          *-*-netbsd*)
28065             ans=yes
28066             ;;
28067          *)
28068             ans=no
28069             ;;
28070         esac
28071         ntp_cv_os_routeupdates=$ans
28072
28073
28074 fi
28075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_os_routeupdates" >&5
28076 $as_echo "$ntp_cv_os_routeupdates" >&6; }
28077 case "$ntp_cv_os_routeupdates" in
28078  yes)
28079
28080 $as_echo "#define OS_MISSES_SPECIFIC_ROUTE_UPDATES 1" >>confdefs.h
28081
28082 esac
28083
28084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the wildcard socket needs REUSEADDR to bind other addresses" >&5
28085 $as_echo_n "checking if the wildcard socket needs REUSEADDR to bind other addresses... " >&6; }
28086 if ${ntp_cv_os_wildcardreuse+:} false; then :
28087   $as_echo_n "(cached) " >&6
28088 else
28089
28090         case "$host" in
28091          *-*-*linux*)
28092             ans=yes
28093             ;;
28094          *) ans=no
28095             ;;
28096         esac
28097         ntp_cv_os_wildcardreuse=$ans
28098
28099
28100 fi
28101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_os_wildcardreuse" >&5
28102 $as_echo "$ntp_cv_os_wildcardreuse" >&6; }
28103 case "$ntp_cv_os_wildcardreuse" in
28104  yes)
28105
28106 $as_echo "#define OS_NEEDS_REUSEADDR_FOR_IFADDRBIND 1" >>confdefs.h
28107
28108 esac
28109
28110 case "$host" in
28111  *-*-aix*)
28112
28113 $as_echo "#define NLIST_EXTRA_INDIRECTION 1" >>confdefs.h
28114
28115 esac
28116
28117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a minimum recommended value of tickadj" >&5
28118 $as_echo_n "checking for a minimum recommended value of tickadj... " >&6; }
28119 if ${ntp_cv_var_min_rec_tickadj+:} false; then :
28120   $as_echo_n "(cached) " >&6
28121 else
28122
28123         ans=no
28124         case "$host" in
28125          *-*-aix*)
28126             ans=40
28127             ;;
28128         esac
28129         ntp_cv_var_min_rec_tickadj=$ans
28130
28131
28132 fi
28133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_min_rec_tickadj" >&5
28134 $as_echo "$ntp_cv_var_min_rec_tickadj" >&6; }
28135 case "$ntp_cv_var_min_rec_tickadj" in
28136  ''|no)
28137     ;;
28138  *)
28139
28140 cat >>confdefs.h <<_ACEOF
28141 #define MIN_REC_TICKADJ $ntp_cv_var_min_rec_tickadj
28142 _ACEOF
28143
28144 esac
28145
28146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the TTY code permits PARENB and IGNPAR" >&5
28147 $as_echo_n "checking if the TTY code permits PARENB and IGNPAR... " >&6; }
28148 if ${ntp_cv_no_parenb_ignpar+:} false; then :
28149   $as_echo_n "(cached) " >&6
28150 else
28151
28152         ans=no
28153         case "$host" in
28154          i?86-*-*linux*)
28155             ans=yes
28156             ;;
28157          mips-sgi-irix*)
28158             ans=yes
28159             ;;
28160          i?86-*-freebsd[123].*)
28161             ;;
28162          i?86-*-freebsd*)
28163             ans=yes
28164             ;;
28165          *-*-unicosmp*)
28166             ans=yes
28167             ;;
28168         esac
28169         ntp_cv_no_parenb_ignpar=$ans
28170
28171
28172 fi
28173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_no_parenb_ignpar" >&5
28174 $as_echo "$ntp_cv_no_parenb_ignpar" >&6; }
28175 case "$ntp_cv_no_parenb_ignpar" in
28176  yes)
28177
28178 $as_echo "#define NO_PARENB_IGNPAR 1" >>confdefs.h
28179
28180 esac
28181
28182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we're including processing time debugging code" >&5
28183 $as_echo_n "checking if we're including processing time debugging code... " >&6; }
28184 # Check whether --enable-debug-timing was given.
28185 if test "${enable_debug_timing+set}" = set; then :
28186   enableval=$enable_debug_timing; ntp_ok=$enableval
28187 else
28188   ntp_ok=no
28189
28190 fi
28191
28192 case "$ntp_ok" in
28193  yes)
28194
28195 $as_echo "#define DEBUG_TIMING 1" >>confdefs.h
28196
28197 esac
28198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28199 $as_echo "$ntp_ok" >&6; }
28200
28201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a the number of minutes in a DST adjustment" >&5
28202 $as_echo_n "checking for a the number of minutes in a DST adjustment... " >&6; }
28203 # Check whether --enable-dst-minutes was given.
28204 if test "${enable_dst_minutes+set}" = set; then :
28205   enableval=$enable_dst_minutes; ans=$enableval
28206 else
28207   ans=60
28208
28209 fi
28210
28211
28212 cat >>confdefs.h <<_ACEOF
28213 #define DSTMINUTES $ans
28214 _ACEOF
28215
28216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
28217 $as_echo "$ans" >&6; }
28218
28219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ntpd will retry permanent DNS failures" >&5
28220 $as_echo_n "checking if ntpd will retry permanent DNS failures... " >&6; }
28221 # Check whether --enable-ignore-dns-errors was given.
28222 if test "${enable_ignore_dns_errors+set}" = set; then :
28223   enableval=$enable_ignore_dns_errors; ans=$enableval
28224 else
28225   ans=no
28226
28227 fi
28228
28229 case "$ans" in
28230  yes)
28231
28232 $as_echo "#define IGNORE_DNS_ERRORS 1" >>confdefs.h
28233
28234 esac
28235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
28236 $as_echo "$ans" >&6; }
28237
28238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking availability of ntp_{adj,get}time()" >&5
28239 $as_echo_n "checking availability of ntp_{adj,get}time()... " >&6; }
28240 if ${ntp_cv_var_ntp_syscalls+:} false; then :
28241   $as_echo_n "(cached) " >&6
28242 else
28243
28244         ntp_cv_var_ntp_syscalls=no
28245         case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime$ac_cv_func___adjtimex" in
28246          yesyes*)
28247             ntp_cv_var_ntp_syscalls=libc
28248             ;;
28249          *yes)
28250             ntp_cv_var_ntp_syscalls=inline
28251             ;;
28252          *)
28253             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28254 /* end confdefs.h.  */
28255
28256                         #include <sys/syscall.h>
28257                         #if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
28258                         # error
28259                         #endif
28260
28261 _ACEOF
28262 if ac_fn_c_try_cpp "$LINENO"; then :
28263   ntp_cv_var_ntp_syscalls=kernel
28264
28265 fi
28266 rm -f conftest.err conftest.i conftest.$ac_ext
28267             ;;
28268          esac
28269
28270
28271 fi
28272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_ntp_syscalls" >&5
28273 $as_echo "$ntp_cv_var_ntp_syscalls" >&6; }
28274 case "$ntp_cv_var_ntp_syscalls" in
28275  libc)
28276
28277 $as_echo "#define NTP_SYSCALLS_LIBC 1" >>confdefs.h
28278
28279     ;;
28280  kernel)
28281
28282 $as_echo "#define NTP_SYSCALLS_STD 1" >>confdefs.h
28283
28284     ;;
28285 esac
28286
28287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sys/timex.h has STA_FLL" >&5
28288 $as_echo_n "checking if sys/timex.h has STA_FLL... " >&6; }
28289 if ${ntp_cv_var_sta_fll+:} false; then :
28290   $as_echo_n "(cached) " >&6
28291 else
28292   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28293 /* end confdefs.h.  */
28294
28295                 #include <sys/timex.h>
28296                 #ifndef STA_FLL
28297                 # error
28298                 #endif
28299
28300 _ACEOF
28301 if ac_fn_c_try_cpp "$LINENO"; then :
28302   ntp_cv_var_sta_fll=yes
28303 else
28304   ntp_cv_var_sta_fll=no
28305
28306 fi
28307 rm -f conftest.err conftest.i conftest.$ac_ext
28308
28309 fi
28310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_sta_fll" >&5
28311 $as_echo "$ntp_cv_var_sta_fll" >&6; }
28312
28313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have kernel PLL support" >&5
28314 $as_echo_n "checking if we have kernel PLL support... " >&6; }
28315 if ${ntp_cv_var_kernel_pll+:} false; then :
28316   $as_echo_n "(cached) " >&6
28317 else
28318         case "$ac_cv_header_sys_timex_h$ntp_cv_struct_ntptimeval$ntp_cv_var_sta_fll$ntp_cv_var_ntp_syscalls" in
28319          *no*)
28320             ntp_cv_var_kernel_pll=no
28321             ;;
28322          *) ntp_cv_var_kernel_pll=yes
28323             ;;
28324         esac
28325
28326
28327 fi
28328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_kernel_pll" >&5
28329 $as_echo "$ntp_cv_var_kernel_pll" >&6; }
28330 case "$ntp_cv_var_kernel_pll" in
28331  yes)
28332
28333 $as_echo "#define KERNEL_PLL 1" >>confdefs.h
28334
28335 esac
28336
28337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SIOCGIFCONF returns buffer size in the buffer" >&5
28338 $as_echo_n "checking if SIOCGIFCONF returns buffer size in the buffer... " >&6; }
28339 if ${ntp_cv_size_returned_in_buffer+:} false; then :
28340   $as_echo_n "(cached) " >&6
28341 else
28342
28343         ans=no
28344         case "$host" in
28345          *-fujitsu-uxp*)
28346             ans=yes
28347             ;;
28348          *-ncr-sysv4*)
28349             ans=yes
28350             ;;
28351          *-univel-sysv*)
28352             ans=yes
28353             ;;
28354         esac
28355         ntp_cv_size_returned_in_buffer=$ans
28356
28357
28358 fi
28359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_size_returned_in_buffer" >&5
28360 $as_echo "$ntp_cv_size_returned_in_buffer" >&6; }
28361 case "$ntp_cv_size_returned_in_buffer" in
28362  yes)
28363
28364 $as_echo "#define SIZE_RETURNED_IN_BUFFER 1" >>confdefs.h
28365
28366 esac
28367
28368 # Check for ioctls TIOCGPPSEV
28369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TTY PPS ioctl TIOCGPPSEV" >&5
28370 $as_echo_n "checking for TTY PPS ioctl TIOCGPPSEV... " >&6; }
28371 case "$ac_cv_header_termios_h" in
28372  yes)
28373     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28374 /* end confdefs.h.  */
28375
28376             #include <termios.h>
28377             #ifndef TIOCGPPSEV
28378             # error
28379             #endif
28380
28381 _ACEOF
28382 if ac_fn_c_try_cpp "$LINENO"; then :
28383   ntp_ok=yes
28384 else
28385   ntp_ok=no
28386
28387 fi
28388 rm -f conftest.err conftest.i conftest.$ac_ext
28389     ;;
28390  *)
28391     ntp_ok=no
28392     ;;
28393 esac
28394 case "$ntp_ok" in
28395  yes)
28396
28397 $as_echo "#define HAVE_TIOCGPPSEV 1" >>confdefs.h
28398
28399 esac
28400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28401 $as_echo "$ntp_ok" >&6; }
28402
28403 # Check for ioctls TIOCSPPS
28404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TTY PPS ioctl TIOCSPPS" >&5
28405 $as_echo_n "checking for TTY PPS ioctl TIOCSPPS... " >&6; }
28406 case "$ac_cv_header_termios_h" in
28407  yes)
28408     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28409 /* end confdefs.h.  */
28410
28411             #include <termios.h>
28412             #ifndef TIOCSPPS
28413             # error
28414             #endif
28415
28416 _ACEOF
28417 if ac_fn_c_try_cpp "$LINENO"; then :
28418   ntp_ok=yes
28419 else
28420   ntp_ok=no
28421
28422 fi
28423 rm -f conftest.err conftest.i conftest.$ac_ext
28424     ;;
28425  *)
28426     ntp_ok=no
28427     ;;
28428 esac
28429 case "$ntp_ok" in
28430  yes)
28431
28432 $as_echo "#define HAVE_TIOCSPPS 1" >>confdefs.h
28433
28434 esac
28435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28436 $as_echo "$ntp_ok" >&6; }
28437
28438 # Check for ioctls CIOGETEV
28439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TTY PPS ioctl CIOGETEV" >&5
28440 $as_echo_n "checking for TTY PPS ioctl CIOGETEV... " >&6; }
28441 case "$ac_cv_header_sys_ppsclock_h" in
28442  yes)
28443     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28444 /* end confdefs.h.  */
28445
28446             #include <sys/ppsclock.h>
28447             #ifndef CIOGETEV
28448             # error
28449             #endif
28450
28451 _ACEOF
28452 if ac_fn_c_try_cpp "$LINENO"; then :
28453   ntp_ok=yes
28454 else
28455   ntp_ok=no
28456
28457 fi
28458 rm -f conftest.err conftest.i conftest.$ac_ext
28459     ;;
28460  *)
28461     ntp_ok=no
28462     ;;
28463 esac
28464 case "$ntp_ok" in
28465  yes)
28466
28467 $as_echo "#define HAVE_CIOGETEV 1" >>confdefs.h
28468
28469 esac
28470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28471 $as_echo "$ntp_ok" >&6; }
28472
28473 # ATOM/PPSAPI stuff.
28474
28475 ntp_atom_ok=yes
28476
28477 # Check for header timepps.h, if found then we have PPS API (Draft RFC) stuff.
28478
28479 # The PPSAPI headers need "inline" ($ac_cv_c_inline='inline')
28480 # The PPSAPI needs struct timespec.
28481 # The PPSAPI also needs a timepps header.
28482
28483 case "$ac_cv_c_inline$ntp_cv_struct_timespec" in
28484  inlineyes)
28485     case "$ac_cv_header_timepps_h$ac_cv_header_sys_timepps_h$host_os" in
28486      *yes* | *sunos* | *solaris* | *sco* | *netbsd* )
28487
28488 $as_echo "#define HAVE_PPSAPI 1" >>confdefs.h
28489
28490         ntp_jupiter_ok=yes
28491         ntp_oncore_ok=yes
28492         ntp_parse_ok=yes
28493         ntp_ripe_ncc_ok=yes
28494         ;;
28495     esac
28496     ;;
28497 esac
28498
28499 # Check for ioctls TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG
28500 ac_fn_c_check_header_mongrel "$LINENO" "linux/serial.h" "ac_cv_header_linux_serial_h" "$ac_includes_default"
28501 if test "x$ac_cv_header_linux_serial_h" = xyes; then :
28502
28503 fi
28504
28505
28506 case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
28507   yesyes)
28508     { $as_echo "$as_me:${as_lineno-$LINENO}: checking ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG" >&5
28509 $as_echo_n "checking ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG... " >&6; }
28510     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28511 /* end confdefs.h.  */
28512
28513             #include <sys/time.h>
28514             typedef int u_int;
28515             #include <sys/ppsclock.h>
28516             #include <linux/serial.h>
28517
28518             #ifndef TIOCGSERIAL
28519             # error
28520             #endif
28521             #ifndef TIOCSSERIAL
28522             # error
28523             #endif
28524             #ifndef ASYNC_PPS_CD_POS
28525             # error
28526             #endif
28527             #ifndef ASYNC_PPS_CD_NEG
28528             # error
28529             #endif
28530             #ifndef CIOGETEV
28531             # error
28532             #endif
28533
28534 _ACEOF
28535 if ac_fn_c_try_cpp "$LINENO"; then :
28536   ntp_ok=yes
28537 else
28538   ntp_ok=no
28539
28540 fi
28541 rm -f conftest.err conftest.i conftest.$ac_ext
28542     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28543 $as_echo "$ntp_ok" >&6; }
28544     ;;
28545   *)
28546     ntp_ok=no
28547     ;;
28548 esac
28549 case "$ntp_ok" in
28550  yes)
28551
28552 $as_echo "#define HAVE_TIO_SERIAL_STUFF 1" >>confdefs.h
28553
28554 esac
28555
28556 # Check for SHMEM_STATUS support
28557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking SHMEM_STATUS support" >&5
28558 $as_echo_n "checking SHMEM_STATUS support... " >&6; }
28559 case "$ac_cv_header_sys_mman_h" in
28560  yes)
28561     ntp_ok=yes
28562     ;;
28563  *)
28564     ntp_ok=no
28565     ;;
28566 esac
28567 case "$ntp_ok" in
28568  yes)
28569
28570 $as_echo "#define ONCORE_SHMEM_STATUS 1" >>confdefs.h
28571
28572 esac
28573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28574 $as_echo "$ntp_ok" >&6; }
28575
28576 ntp_refclock=no
28577
28578 # HPUX only, and by explicit request
28579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Datum/Bancomm bc635/VME interface" >&5
28580 $as_echo_n "checking Datum/Bancomm bc635/VME interface... " >&6; }
28581 # Check whether --enable-BANCOMM was given.
28582 if test "${enable_BANCOMM+set}" = set; then :
28583   enableval=$enable_BANCOMM; ntp_ok=$enableval
28584 else
28585   ntp_ok=no
28586
28587 fi
28588
28589 case "$ntp_ok" in
28590  yes)
28591     ntp_refclock=yes
28592
28593 $as_echo "#define CLOCK_BANC 1" >>confdefs.h
28594
28595     ;;
28596 esac
28597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28598 $as_echo "$ntp_ok" >&6; }
28599 case "$ntp_ok$host" in
28600  yes*-*-hpux*) ;;
28601  yes*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
28602 $as_echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;} ;;
28603 esac
28604
28605 #HPUX only, and only by explicit request
28606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking TrueTime GPS receiver/VME interface" >&5
28607 $as_echo_n "checking TrueTime GPS receiver/VME interface... " >&6; }
28608 # Check whether --enable-GPSVME was given.
28609 if test "${enable_GPSVME+set}" = set; then :
28610   enableval=$enable_GPSVME; ntp_ok=$enableval
28611 else
28612   ntp_ok=no
28613
28614 fi
28615
28616 case "$ntp_ok" in
28617  yes)
28618     ntp_refclock=yes
28619
28620 $as_echo "#define CLOCK_GPSVME 1" >>confdefs.h
28621
28622     ;;
28623 esac
28624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28625 $as_echo "$ntp_ok" >&6; }
28626 case "$ntp_ok$host" in
28627  yes*-*-hpux*) ;;
28628  yes*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
28629 $as_echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;} ;;
28630 esac
28631
28632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCL720 clock support" >&5
28633 $as_echo_n "checking for PCL720 clock support... " >&6; }
28634 case "$ac_cv_header_machine_inline_h$ac_cv_header_sys_pcl720_h$ac_cv_header_sys_i8253_h" in
28635  yesyesyes)
28636
28637 $as_echo "#define CLOCK_PPS720 1" >>confdefs.h
28638
28639     ans=yes
28640     ;;
28641  *)
28642     ans=no
28643     ;;
28644 esac
28645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
28646 $as_echo "$ans" >&6; }
28647
28648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default inclusion of all suitable non-PARSE clocks" >&5
28649 $as_echo_n "checking for default inclusion of all suitable non-PARSE clocks... " >&6; }
28650 # Check whether --enable-all-clocks was given.
28651 if test "${enable_all_clocks+set}" = set; then :
28652   enableval=$enable_all_clocks; ntp_eac=$enableval
28653 else
28654   ntp_eac=yes
28655
28656 fi
28657
28658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_eac" >&5
28659 $as_echo "$ntp_eac" >&6; }
28660
28661 # HMS: Should we also require ntp_parse_ok?
28662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have support for PARSE clocks" >&5
28663 $as_echo_n "checking if we have support for PARSE clocks... " >&6; }
28664 case "$ntp_atom_ok$ac_cv_header_termio_h$ac_cv_header_termios_h" in
28665  yes*yes*)
28666     ntp_canparse=yes
28667     ;;
28668  *) ntp_canparse=no
28669     ;;
28670 esac
28671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_canparse" >&5
28672 $as_echo "$ntp_canparse" >&6; }
28673
28674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have support for audio clocks" >&5
28675 $as_echo_n "checking if we have support for audio clocks... " >&6; }
28676 case "$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
28677  *yes*)
28678     ntp_canaudio=yes
28679
28680 $as_echo "#define HAVE_AUDIO /**/" >>confdefs.h
28681
28682     ;;
28683  *) ntp_canaudio=no ;;
28684 esac
28685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_canaudio" >&5
28686 $as_echo "$ntp_canaudio" >&6; }
28687
28688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have support for the SHM refclock interface" >&5
28689 $as_echo_n "checking if we have support for the SHM refclock interface... " >&6; }
28690 case "$ac_cv_header_sys_ipc_h$ac_cv_header_sys_shm_h" in
28691  yesyes)
28692     ntp_canshm=yes
28693     ;;
28694  *) ntp_canshm=no ;;
28695 esac
28696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_canshm" >&5
28697 $as_echo "$ntp_canshm" >&6; }
28698
28699 # Test for termios TIOCMBIS modem control (ACTS, Heath, Palisade)
28700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for termios modem control" >&5
28701 $as_echo_n "checking for termios modem control... " >&6; }
28702 if ${ntp_cv_modem_control+:} false; then :
28703   $as_echo_n "(cached) " >&6
28704 else
28705   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28706 /* end confdefs.h.  */
28707
28708                 #ifdef HAVE_UNISTD_H
28709                 # include <unistd.h>
28710                 #endif
28711                 #ifdef HAVE_TERMIOS_H
28712                 # include <termios.h>
28713                 #endif
28714                 #ifdef HAVE_SYS_IOCTL_H
28715                 # include <sys/ioctl.h>
28716                 #endif
28717
28718 int
28719 main ()
28720 {
28721
28722                 int     dtr = TIOCM_DTR;
28723
28724                 ioctl(1, TIOCMBIS, (char *)&dtr);
28725
28726
28727   ;
28728   return 0;
28729 }
28730 _ACEOF
28731 if ac_fn_c_try_compile "$LINENO"; then :
28732   ntp_cv_modem_control=yes
28733 else
28734   ntp_cv_modem_control=no
28735
28736 fi
28737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28738
28739 fi
28740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_modem_control" >&5
28741 $as_echo "$ntp_cv_modem_control" >&6; }
28742 case "$ntp_eac::$ntp_cv_modem_control" in
28743  yes::yes)
28744     ntp_enable_all_modem_control_clocks=yes
28745     ;;
28746  *)
28747     ntp_enable_all_modem_control_clocks=no
28748     ;;
28749 esac
28750
28751 # Requires modem control
28752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ACTS modem service" >&5
28753 $as_echo_n "checking ACTS modem service... " >&6; }
28754 # Check whether --enable-ACTS was given.
28755 if test "${enable_ACTS+set}" = set; then :
28756   enableval=$enable_ACTS; ntp_ok=$enableval
28757 else
28758   ntp_ok=$ntp_enable_all_modem_control_clocks
28759
28760 fi
28761
28762 case "$ntp_ok" in
28763  yes)
28764     ntp_refclock=yes
28765
28766 $as_echo "#define CLOCK_ACTS 1" >>confdefs.h
28767
28768     ;;
28769 esac
28770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28771 $as_echo "$ntp_ok" >&6; }
28772
28773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Arbiter 1088A/B GPS receiver" >&5
28774 $as_echo_n "checking Arbiter 1088A/B GPS receiver... " >&6; }
28775 # Check whether --enable-ARBITER was given.
28776 if test "${enable_ARBITER+set}" = set; then :
28777   enableval=$enable_ARBITER; ntp_ok=$enableval
28778 else
28779   ntp_ok=$ntp_eac
28780
28781 fi
28782
28783 case "$ntp_ok" in
28784  yes)
28785     ntp_refclock=yes
28786
28787 $as_echo "#define CLOCK_ARBITER 1" >>confdefs.h
28788
28789     ;;
28790 esac
28791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28792 $as_echo "$ntp_ok" >&6; }
28793
28794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Arcron MSF receiver" >&5
28795 $as_echo_n "checking Arcron MSF receiver... " >&6; }
28796 # Check whether --enable-ARCRON_MSF was given.
28797 if test "${enable_ARCRON_MSF+set}" = set; then :
28798   enableval=$enable_ARCRON_MSF; ntp_ok=$enableval
28799 else
28800   ntp_ok=$ntp_eac
28801
28802 fi
28803
28804 case "$ntp_ok" in
28805  yes)
28806     ntp_refclock=yes
28807
28808 $as_echo "#define CLOCK_ARCRON_MSF 1" >>confdefs.h
28809
28810     ;;
28811 esac
28812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28813 $as_echo "$ntp_ok" >&6; }
28814
28815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Austron 2200A/2201A GPS receiver" >&5
28816 $as_echo_n "checking Austron 2200A/2201A GPS receiver... " >&6; }
28817 # Check whether --enable-AS2201 was given.
28818 if test "${enable_AS2201+set}" = set; then :
28819   enableval=$enable_AS2201; ntp_ok=$enableval
28820 else
28821   ntp_ok=$ntp_eac
28822
28823 fi
28824
28825 case "$ntp_ok" in
28826  yes)
28827     ntp_refclock=yes
28828
28829 $as_echo "#define CLOCK_AS2201 1" >>confdefs.h
28830
28831     ;;
28832 esac
28833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28834 $as_echo "$ntp_ok" >&6; }
28835
28836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ATOM PPS interface" >&5
28837 $as_echo_n "checking ATOM PPS interface... " >&6; }
28838 # Check whether --enable-ATOM was given.
28839 if test "${enable_ATOM+set}" = set; then :
28840   enableval=$enable_ATOM; ntp_ok=$enableval
28841 else
28842   ntp_ok=$ntp_eac
28843
28844 fi
28845
28846 case "$ntp_atom_ok" in
28847  no) ntp_ok=no ;;
28848 esac
28849 case "$ntp_ok" in
28850  yes)
28851     ntp_refclock=yes
28852
28853 $as_echo "#define CLOCK_ATOM 1" >>confdefs.h
28854
28855     ;;
28856 esac
28857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28858 $as_echo "$ntp_ok" >&6; }
28859
28860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Chrono-log K-series WWVB receiver" >&5
28861 $as_echo_n "checking Chrono-log K-series WWVB receiver... " >&6; }
28862 # Check whether --enable-CHRONOLOG was given.
28863 if test "${enable_CHRONOLOG+set}" = set; then :
28864   enableval=$enable_CHRONOLOG; ntp_ok=$enableval
28865 else
28866   ntp_ok=$ntp_eac
28867
28868 fi
28869
28870 case "$ntp_ok" in
28871  yes)
28872     ntp_refclock=yes
28873
28874 $as_echo "#define CLOCK_CHRONOLOG 1" >>confdefs.h
28875
28876     ;;
28877 esac
28878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28879 $as_echo "$ntp_ok" >&6; }
28880
28881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking CHU modem/decoder" >&5
28882 $as_echo_n "checking CHU modem/decoder... " >&6; }
28883 # Check whether --enable-CHU was given.
28884 if test "${enable_CHU+set}" = set; then :
28885   enableval=$enable_CHU; ntp_ok=$enableval
28886 else
28887   ntp_ok=$ntp_eac
28888
28889 fi
28890
28891 case "$ntp_ok" in
28892  yes)
28893     ntp_refclock=yes
28894
28895 $as_echo "#define CLOCK_CHU 1" >>confdefs.h
28896
28897     ;;
28898 esac
28899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28900 $as_echo "$ntp_ok" >&6; }
28901 ntp_refclock_chu=$ntp_ok
28902
28903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking CHU audio/decoder" >&5
28904 $as_echo_n "checking CHU audio/decoder... " >&6; }
28905 # Check whether --enable-AUDIO-CHU was given.
28906 if test "${enable_AUDIO_CHU+set}" = set; then :
28907   enableval=$enable_AUDIO_CHU; ntp_ok=$enableval
28908 else
28909
28910         case "$ntp_eac$ntp_refclock_chu$ntp_canaudio" in
28911          *no*)  ntp_ok=no  ;;
28912          *)     ntp_ok=yes ;;
28913         esac
28914
28915
28916 fi
28917
28918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28919 $as_echo "$ntp_ok" >&6; }
28920 # We used to check for sunos/solaris target...
28921 case "$ntp_ok$ntp_refclock_chu$ntp_canaudio" in
28922  yes*no*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is...no ***" >&5
28923 $as_echo "$as_me: WARNING: *** But the expected answer is...no ***" >&2;}
28924 esac
28925
28926 # Not under HP-UX
28927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Datum Programmable Time System" >&5
28928 $as_echo_n "checking Datum Programmable Time System... " >&6; }
28929 # Check whether --enable-DATUM was given.
28930 if test "${enable_DATUM+set}" = set; then :
28931   enableval=$enable_DATUM; ntp_ok=$enableval
28932 else
28933
28934         case "$ac_cv_header_termios_h" in
28935          yes)
28936             ntp_ok=$ntp_eac
28937             ;;
28938          *) ntp_ok=no
28939             ;;
28940         esac
28941
28942
28943 fi
28944
28945 case "$ntp_ok" in
28946  yes)
28947     ntp_refclock=yes
28948
28949 $as_echo "#define CLOCK_DATUM 1" >>confdefs.h
28950
28951     ;;
28952 esac
28953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28954 $as_echo "$ntp_ok" >&6; }
28955
28956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Dumb generic hh:mm:ss local clock" >&5
28957 $as_echo_n "checking Dumb generic hh:mm:ss local clock... " >&6; }
28958 # Check whether --enable-DUMBCLOCK was given.
28959 if test "${enable_DUMBCLOCK+set}" = set; then :
28960   enableval=$enable_DUMBCLOCK; ntp_ok=$enableval
28961 else
28962   ntp_ok=$ntp_eac
28963
28964 fi
28965
28966 case "$ntp_ok" in
28967  yes)
28968     ntp_refclock=yes
28969
28970 $as_echo "#define CLOCK_DUMBCLOCK 1" >>confdefs.h
28971
28972     ;;
28973 esac
28974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28975 $as_echo "$ntp_ok" >&6; }
28976
28977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Forum Graphic GPS" >&5
28978 $as_echo_n "checking Forum Graphic GPS... " >&6; }
28979 # Check whether --enable-FG was given.
28980 if test "${enable_FG+set}" = set; then :
28981   enableval=$enable_FG; ntp_ok=$enableval
28982 else
28983   ntp_ok=$ntp_eac
28984
28985 fi
28986
28987 case "$ntp_ok" in
28988  yes)
28989     ntp_refclock=yes
28990
28991 $as_echo "#define CLOCK_FG 1" >>confdefs.h
28992
28993     ;;
28994 esac
28995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
28996 $as_echo "$ntp_ok" >&6; }
28997
28998 # Requires modem control
28999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Heath GC-1000 WWV/WWVH receiver" >&5
29000 $as_echo_n "checking Heath GC-1000 WWV/WWVH receiver... " >&6; }
29001 # Check whether --enable-HEATH was given.
29002 if test "${enable_HEATH+set}" = set; then :
29003   enableval=$enable_HEATH; ntp_ok=$enableval
29004 else
29005   ntp_ok=$ntp_enable_all_modem_control_clocks
29006
29007 fi
29008
29009 case "$ntp_ok" in
29010  yes)
29011     ntp_refclock=yes
29012
29013 $as_echo "#define CLOCK_HEATH 1" >>confdefs.h
29014
29015     ;;
29016 esac
29017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29018 $as_echo "$ntp_ok" >&6; }
29019
29020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hopf serial clock device" >&5
29021 $as_echo_n "checking for hopf serial clock device... " >&6; }
29022 # Check whether --enable-HOPFSERIAL was given.
29023 if test "${enable_HOPFSERIAL+set}" = set; then :
29024   enableval=$enable_HOPFSERIAL; ntp_ok=$enableval
29025 else
29026   ntp_ok=$ntp_eac
29027
29028 fi
29029
29030 case "$ntp_ok" in
29031  yes)
29032     ntp_refclock=yes
29033
29034 $as_echo "#define CLOCK_HOPF_SERIAL 1" >>confdefs.h
29035
29036     ;;
29037 esac
29038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29039 $as_echo "$ntp_ok" >&6; }
29040
29041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hopf PCI clock 6039" >&5
29042 $as_echo_n "checking for hopf PCI clock 6039... " >&6; }
29043 # Check whether --enable-HOPFPCI was given.
29044 if test "${enable_HOPFPCI+set}" = set; then :
29045   enableval=$enable_HOPFPCI; ntp_ok=$enableval
29046 else
29047   ntp_ok=$ntp_eac
29048
29049 fi
29050
29051 case "$ntp_ok" in
29052  yes)
29053     ntp_refclock=yes
29054
29055 $as_echo "#define CLOCK_HOPF_PCI 1" >>confdefs.h
29056
29057     ;;
29058 esac
29059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29060 $as_echo "$ntp_ok" >&6; }
29061
29062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking HP 58503A GPS receiver" >&5
29063 $as_echo_n "checking HP 58503A GPS receiver... " >&6; }
29064 # Check whether --enable-HPGPS was given.
29065 if test "${enable_HPGPS+set}" = set; then :
29066   enableval=$enable_HPGPS; ntp_ok=$enableval
29067 else
29068   ntp_ok=$ntp_eac
29069
29070 fi
29071
29072 case "$ntp_ok" in
29073  yes)
29074     ntp_refclock=yes
29075
29076 $as_echo "#define CLOCK_HPGPS 1" >>confdefs.h
29077
29078     ;;
29079 esac
29080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29081 $as_echo "$ntp_ok" >&6; }
29082
29083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking IRIG audio decoder" >&5
29084 $as_echo_n "checking IRIG audio decoder... " >&6; }
29085 # Check whether --enable-IRIG was given.
29086 if test "${enable_IRIG+set}" = set; then :
29087   enableval=$enable_IRIG; ntp_ok=$enableval
29088 else
29089
29090         case "$ntp_eac$ntp_canaudio" in
29091          *no*)  ntp_ok=no  ;;
29092          *)     ntp_ok=yes ;;
29093         esac
29094
29095
29096 fi
29097
29098 case "$ntp_ok" in
29099  yes)
29100     ntp_refclock=yes
29101
29102 $as_echo "#define CLOCK_IRIG 1" >>confdefs.h
29103
29104     ;;
29105 esac
29106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29107 $as_echo "$ntp_ok" >&6; }
29108 case "$ntp_ok$ntp_canaudio" in
29109  yesno) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
29110 $as_echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
29111 esac
29112
29113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JJY receiver" >&5
29114 $as_echo_n "checking for JJY receiver... " >&6; }
29115 # Check whether --enable-JJY was given.
29116 if test "${enable_JJY+set}" = set; then :
29117   enableval=$enable_JJY; ntp_ok=$enableval
29118 else
29119   ntp_ok=$ntp_eac
29120
29121 fi
29122
29123 case "$ntp_ok" in
29124  yes)
29125     ntp_refclock=yes
29126
29127 $as_echo "#define CLOCK_JJY 1" >>confdefs.h
29128
29129     ;;
29130 esac
29131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29132 $as_echo "$ntp_ok" >&6; }
29133
29134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Rockwell Jupiter GPS receiver" >&5
29135 $as_echo_n "checking Rockwell Jupiter GPS receiver... " >&6; }
29136 # Check whether --enable-JUPITER was given.
29137 if test "${enable_JUPITER+set}" = set; then :
29138   enableval=$enable_JUPITER; ntp_ok=$enableval
29139 else
29140   ntp_ok=$ntp_eac
29141 fi
29142
29143 case "$ntp_jupiter_ok" in
29144  no) ntp_ok=no ;;
29145 esac
29146 case "$ntp_ok" in
29147  yes)
29148     ntp_refclock=yes
29149
29150 $as_echo "#define CLOCK_JUPITER 1" >>confdefs.h
29151
29152     ;;
29153 esac
29154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29155 $as_echo "$ntp_ok" >&6; }
29156
29157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Leitch CSD 5300 Master Clock System Driver" >&5
29158 $as_echo_n "checking Leitch CSD 5300 Master Clock System Driver... " >&6; }
29159 # Check whether --enable-LEITCH was given.
29160 if test "${enable_LEITCH+set}" = set; then :
29161   enableval=$enable_LEITCH; ntp_ok=$enableval
29162 else
29163   ntp_ok=$ntp_eac
29164
29165 fi
29166
29167 case "$ntp_ok" in
29168  yes)
29169     ntp_refclock=yes
29170
29171 $as_echo "#define CLOCK_LEITCH 1" >>confdefs.h
29172
29173     ;;
29174 esac
29175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29176 $as_echo "$ntp_ok" >&6; }
29177
29178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking local clock reference" >&5
29179 $as_echo_n "checking local clock reference... " >&6; }
29180 # Check whether --enable-LOCAL-CLOCK was given.
29181 if test "${enable_LOCAL_CLOCK+set}" = set; then :
29182   enableval=$enable_LOCAL_CLOCK; ntp_ok=$enableval
29183 else
29184   ntp_ok=$ntp_eac
29185
29186 fi
29187
29188 case "$ntp_ok" in
29189  yes)
29190     ntp_refclock=yes
29191
29192 $as_echo "#define CLOCK_LOCAL 1" >>confdefs.h
29193
29194     ;;
29195 esac
29196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29197 $as_echo "$ntp_ok" >&6; }
29198
29199
29200 # Not Ultrix
29201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Magnavox MX4200 GPS receiver" >&5
29202 $as_echo_n "checking Magnavox MX4200 GPS receiver... " >&6; }
29203 # Check whether --enable-MX4200 was given.
29204 if test "${enable_MX4200+set}" = set; then :
29205   enableval=$enable_MX4200; ntp_ok=$enableval
29206 else
29207
29208         case "$ac_cv_var_ppsclock" in
29209          yes)
29210             ntp_ok=$ntp_eac
29211             ;;
29212          *)
29213             ntp_ok=no
29214             ;;
29215         esac
29216
29217
29218 fi
29219
29220 case "$ntp_ok" in
29221  yes)
29222     ntp_refclock=yes
29223
29224 $as_echo "#define CLOCK_MX4200 1" >>confdefs.h
29225
29226     ;;
29227 esac
29228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29229 $as_echo "$ntp_ok" >&6; }
29230 case "$ntp_ok$host" in
29231  yes*-*-ultrix*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
29232 $as_echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
29233 esac
29234
29235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NeoClock4X receiver" >&5
29236 $as_echo_n "checking for NeoClock4X receiver... " >&6; }
29237 # Check whether --enable-NEOCLOCK4X was given.
29238 if test "${enable_NEOCLOCK4X+set}" = set; then :
29239   enableval=$enable_NEOCLOCK4X; ntp_ok=$enableval
29240 else
29241   ntp_ok=$ntp_eac
29242
29243 fi
29244
29245 case "$ntp_ok" in
29246  yes)
29247     ntp_refclock=yes
29248
29249 $as_echo "#define CLOCK_NEOCLOCK4X 1" >>confdefs.h
29250
29251     ;;
29252 esac
29253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29254 $as_echo "$ntp_ok" >&6; }
29255
29256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking NMEA GPS receiver" >&5
29257 $as_echo_n "checking NMEA GPS receiver... " >&6; }
29258 # Check whether --enable-NMEA was given.
29259 if test "${enable_NMEA+set}" = set; then :
29260   enableval=$enable_NMEA; ntp_ok=$enableval
29261 else
29262   ntp_ok=$ntp_eac
29263
29264 fi
29265
29266 case "$ntp_ok" in
29267  yes)
29268     ntp_refclock=yes
29269
29270 $as_echo "#define CLOCK_NMEA 1" >>confdefs.h
29271
29272     ;;
29273 esac
29274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29275 $as_echo "$ntp_ok" >&6; }
29276
29277 for ac_func in strtoll
29278 do :
29279   ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
29280 if test "x$ac_cv_func_strtoll" = xyes; then :
29281   cat >>confdefs.h <<_ACEOF
29282 #define HAVE_STRTOLL 1
29283 _ACEOF
29284
29285 fi
29286 done
29287
29288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GPSD JSON receiver" >&5
29289 $as_echo_n "checking for GPSD JSON receiver... " >&6; }
29290 # Check whether --enable-GPSD was given.
29291 if test "${enable_GPSD+set}" = set; then :
29292   enableval=$enable_GPSD; ntp_ok=$enableval
29293 else
29294   case "$ac_cv_func_strtoll" in
29295      yes) ntp_ok=$ntp_eac ;;
29296      *)   ntp_ok="no" ;;
29297     esac
29298
29299 fi
29300
29301 case "$ntp_ok" in
29302  yes)
29303     ntp_refclock=yes
29304
29305 $as_echo "#define CLOCK_GPSDJSON 1" >>confdefs.h
29306
29307     ;;
29308 esac
29309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29310 $as_echo "$ntp_ok" >&6; }
29311
29312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ONCORE Motorola VP/UT Oncore GPS" >&5
29313 $as_echo_n "checking for ONCORE Motorola VP/UT Oncore GPS... " >&6; }
29314 # Check whether --enable-ONCORE was given.
29315 if test "${enable_ONCORE+set}" = set; then :
29316   enableval=$enable_ONCORE; ntp_ok=$enableval
29317 else
29318   ntp_ok=$ntp_eac
29319
29320 fi
29321
29322 case "$ntp_oncore_ok" in
29323  no) ntp_ok=no ;;
29324 esac
29325 case "$ntp_ok" in
29326  yes)
29327     ntp_refclock=yes
29328
29329 $as_echo "#define CLOCK_ONCORE 1" >>confdefs.h
29330
29331     ;;
29332 esac
29333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29334 $as_echo "$ntp_ok" >&6; }
29335
29336 # Requires modem control
29337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Palisade clock" >&5
29338 $as_echo_n "checking for Palisade clock... " >&6; }
29339 # Check whether --enable-PALISADE was given.
29340 if test "${enable_PALISADE+set}" = set; then :
29341   enableval=$enable_PALISADE; ntp_ok=$enableval
29342 else
29343   ntp_ok=$ntp_enable_all_modem_control_clocks
29344
29345 fi
29346
29347 case "$ntp_ok" in
29348  yes)
29349     ntp_refclock=yes
29350
29351 $as_echo "#define CLOCK_PALISADE 1" >>confdefs.h
29352
29353     ;;
29354 esac
29355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29356 $as_echo "$ntp_ok" >&6; }
29357
29358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Conrad parallel port radio clock" >&5
29359 $as_echo_n "checking Conrad parallel port radio clock... " >&6; }
29360 # Check whether --enable-PCF was given.
29361 if test "${enable_PCF+set}" = set; then :
29362   enableval=$enable_PCF; ntp_ok=$enableval
29363 else
29364   ntp_ok=$ntp_eac
29365
29366 fi
29367
29368 case "$ntp_ok" in
29369  yes)
29370     ntp_refclock=yes
29371
29372 $as_echo "#define CLOCK_PCF 1" >>confdefs.h
29373
29374     ;;
29375 esac
29376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29377 $as_echo "$ntp_ok" >&6; }
29378
29379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking PST/Traconex 1020 WWV/WWVH receiver" >&5
29380 $as_echo_n "checking PST/Traconex 1020 WWV/WWVH receiver... " >&6; }
29381 # Check whether --enable-PST was given.
29382 if test "${enable_PST+set}" = set; then :
29383   enableval=$enable_PST; ntp_ok=$enableval
29384 else
29385   ntp_ok=$ntp_eac
29386
29387 fi
29388
29389 case "$ntp_ok" in
29390  yes)
29391     ntp_refclock=yes
29392
29393 $as_echo "#define CLOCK_PST 1" >>confdefs.h
29394
29395     ;;
29396 esac
29397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29398 $as_echo "$ntp_ok" >&6; }
29399
29400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RIPENCC specific Trimble driver" >&5
29401 $as_echo_n "checking RIPENCC specific Trimble driver... " >&6; }
29402 # Check whether --enable-RIPENCC was given.
29403 if test "${enable_RIPENCC+set}" = set; then :
29404   enableval=$enable_RIPENCC; ntp_ok=$enableval
29405 else
29406   ntp_ok=no
29407
29408 fi
29409
29410 # 020629: HMS: s/$ntp_eac -> -/no because of ptr += sprintf(ptr, ...) usage
29411 case "$ntp_ripe_ncc_ok" in
29412  no) ntp_ok=no ;;
29413 esac
29414 case "$ntp_ok" in
29415  yes)
29416     ntp_refclock=yes
29417
29418 $as_echo "#define CLOCK_RIPENCC /**/" >>confdefs.h
29419
29420     ;;
29421 esac
29422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29423 $as_echo "$ntp_ok" >&6; }
29424
29425 # Danny Meyer says SHM compiles (with a few warnings) under Win32.
29426 # For *IX, we need sys/ipc.h and sys/shm.h.
29427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHM clock attached thru shared memory" >&5
29428 $as_echo_n "checking for SHM clock attached thru shared memory... " >&6; }
29429 # Check whether --enable-SHM was given.
29430 if test "${enable_SHM+set}" = set; then :
29431   enableval=$enable_SHM; ntp_ok=$enableval
29432 else
29433
29434         case "$ntp_eac$ntp_canshm" in
29435          *no*)  ntp_ok=no  ;;
29436          *)     ntp_ok=yes ;;
29437         esac
29438
29439
29440 fi
29441
29442 case "$ntp_ok" in
29443  yes)
29444     ntp_refclock=yes
29445
29446 $as_echo "#define CLOCK_SHM 1" >>confdefs.h
29447
29448     ;;
29449 esac
29450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29451 $as_echo "$ntp_ok" >&6; }
29452
29453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Spectracom 8170/Netclock/2 WWVB receiver" >&5
29454 $as_echo_n "checking Spectracom 8170/Netclock/2 WWVB receiver... " >&6; }
29455 # Check whether --enable-SPECTRACOM was given.
29456 if test "${enable_SPECTRACOM+set}" = set; then :
29457   enableval=$enable_SPECTRACOM; ntp_ok=$enableval
29458 else
29459   ntp_ok=$ntp_eac
29460
29461 fi
29462
29463 case "$ntp_ok" in
29464  yes)
29465     ntp_refclock=yes
29466
29467 $as_echo "#define CLOCK_SPECTRACOM 1" >>confdefs.h
29468
29469     ;;
29470 esac
29471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29472 $as_echo "$ntp_ok" >&6; }
29473
29474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking KSI/Odetics TPRO/S GPS receiver/IRIG interface" >&5
29475 $as_echo_n "checking KSI/Odetics TPRO/S GPS receiver/IRIG interface... " >&6; }
29476 # Check whether --enable-TPRO was given.
29477 if test "${enable_TPRO+set}" = set; then :
29478   enableval=$enable_TPRO; ntp_ok=$enableval
29479 else
29480
29481         case "$ac_cv_header_sys_tpro_h" in
29482          yes)
29483             ntp_ok=$ntp_eac
29484             ;;
29485          *)
29486             ntp_ok=no
29487             ;;
29488         esac
29489
29490
29491 fi
29492
29493 case "$ntp_ok" in
29494  yes)
29495     ntp_refclock=yes
29496
29497 $as_echo "#define CLOCK_TPRO 1" >>confdefs.h
29498
29499     ;;
29500 esac
29501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29502 $as_echo "$ntp_ok" >&6; }
29503 case "$ntp_ok$ac_cv_header_sys_tpro" in
29504  yesno) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
29505 $as_echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
29506 esac
29507
29508 # Not on a vax-dec-bsd
29509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Kinemetrics/TrueTime receivers" >&5
29510 $as_echo_n "checking Kinemetrics/TrueTime receivers... " >&6; }
29511 # Check whether --enable-TRUETIME was given.
29512 if test "${enable_TRUETIME+set}" = set; then :
29513   enableval=$enable_TRUETIME; ntp_ok=$enableval
29514 else
29515
29516         case "$host" in
29517          vax-dec-bsd)
29518             ntp_ok=no
29519             ;;
29520          *)
29521             ntp_ok=$ntp_eac
29522             ;;
29523         esac
29524
29525
29526 fi
29527
29528 case "$ntp_ok" in
29529  yes)
29530     ntp_refclock=yes
29531
29532 $as_echo "#define CLOCK_TRUETIME 1" >>confdefs.h
29533
29534     ;;
29535 esac
29536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29537 $as_echo "$ntp_ok" >&6; }
29538 case "$ntp_ok$host" in
29539  yesvax-dec-bsd) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
29540 $as_echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
29541 esac
29542
29543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking TrueTime 560 IRIG-B decoder" >&5
29544 $as_echo_n "checking TrueTime 560 IRIG-B decoder... " >&6; }
29545 # Check whether --enable-TT560 was given.
29546 if test "${enable_TT560+set}" = set; then :
29547   enableval=$enable_TT560; ntp_ok=$enableval
29548 else
29549   ntp_ok=no
29550
29551 fi
29552
29553 case "$ntp_ok" in
29554  yes)
29555     ntp_refclock=yes
29556
29557 $as_echo "#define CLOCK_TT560 /**/" >>confdefs.h
29558
29559     ;;
29560 esac
29561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29562 $as_echo "$ntp_ok" >&6; }
29563
29564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ultralink M320 WWVB receiver" >&5
29565 $as_echo_n "checking Ultralink M320 WWVB receiver... " >&6; }
29566 # Check whether --enable-ULINK was given.
29567 if test "${enable_ULINK+set}" = set; then :
29568   enableval=$enable_ULINK; ntp_ok=$enableval
29569 else
29570   ntp_ok=$ntp_eac
29571
29572 fi
29573
29574 case "$ntp_ok" in
29575  yes)
29576     ntp_refclock=yes
29577
29578 $as_echo "#define CLOCK_ULINK 1" >>confdefs.h
29579
29580     ;;
29581 esac
29582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29583 $as_echo "$ntp_ok" >&6; }
29584
29585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Spectracom TSYNC PCI timing board" >&5
29586 $as_echo_n "checking Spectracom TSYNC PCI timing board... " >&6; }
29587 # Check whether --enable-TSYNCPCI was given.
29588 if test "${enable_TSYNCPCI+set}" = set; then :
29589   enableval=$enable_TSYNCPCI; ntp_ok=$enableval
29590 else
29591
29592         case "$host" in
29593          *-*-*linux*)
29594             ntp_ok=$ntp_eac
29595             ;;
29596          *)
29597             ntp_ok=no
29598         esac
29599
29600
29601 fi
29602
29603 case "$ntp_ok" in
29604  yes)
29605     ntp_refclock=yes
29606
29607 $as_echo "#define CLOCK_TSYNCPCI 1" >>confdefs.h
29608
29609     ;;
29610 esac
29611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29612 $as_echo "$ntp_ok" >&6; }
29613
29614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking WWV receiver" >&5
29615 $as_echo_n "checking WWV receiver... " >&6; }
29616 # Check whether --enable-WWV was given.
29617 if test "${enable_WWV+set}" = set; then :
29618   enableval=$enable_WWV; ntp_ok=$enableval
29619 else
29620
29621         case "$ntp_eac$ntp_canaudio" in
29622          *no*)  ntp_ok=no  ;;
29623          *)     ntp_ok=yes ;;
29624         esac
29625
29626
29627 fi
29628
29629 case "$ntp_ok" in
29630  yes)
29631     ntp_refclock=yes
29632
29633 $as_echo "#define CLOCK_WWV 1" >>confdefs.h
29634
29635     ;;
29636 esac
29637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29638 $as_echo "$ntp_ok" >&6; }
29639 case "$ntp_ok$ntp_canaudio" in
29640  yesno) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
29641 $as_echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
29642 esac
29643
29644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Zyfer receiver" >&5
29645 $as_echo_n "checking for Zyfer receiver... " >&6; }
29646 # Check whether --enable-ZYFER was given.
29647 if test "${enable_ZYFER+set}" = set; then :
29648   enableval=$enable_ZYFER; ntp_ok=$enableval
29649 else
29650   ntp_ok=$ntp_eac
29651
29652 fi
29653
29654 case "$ntp_ok" in
29655  yes)
29656     ntp_refclock=yes
29657
29658 $as_echo "#define CLOCK_ZYFER 1" >>confdefs.h
29659
29660     ;;
29661 esac
29662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29663 $as_echo "$ntp_ok" >&6; }
29664
29665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default inclusion of all suitable PARSE clocks" >&5
29666 $as_echo_n "checking for default inclusion of all suitable PARSE clocks... " >&6; }
29667 # Check whether --enable-parse-clocks was given.
29668 if test "${enable_parse_clocks+set}" = set; then :
29669   enableval=$enable_parse_clocks; ntp_eapc=$enableval
29670 else
29671
29672         case "$ntp_eac" in
29673          yes)   ntp_eapc=$ntp_canparse ;;
29674          *)     ntp_eapc=no ;;
29675         esac
29676         # Delete the next line one of these days
29677         ntp_eapc=no
29678
29679
29680 fi
29681
29682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_eapc" >&5
29683 $as_echo "$ntp_eapc" >&6; }
29684
29685 case "$ntp_eac$ntp_eapc$ntp_canparse" in
29686  noyes*)
29687     as_fn_error $? "\"--enable-parse-clocks\" requires \"--enable-all-clocks\"." "$LINENO" 5
29688     ;;
29689  yesyesno)
29690     as_fn_error $? "You said \"--enable-parse-clocks\" but PARSE isn't supported on this platform!" "$LINENO" 5
29691     ;;
29692 esac
29693
29694 ntp_libparse=no
29695 ntp_parseutil=no
29696 ntp_rawdcf=no
29697
29698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Diem Computime Radio Clock" >&5
29699 $as_echo_n "checking Diem Computime Radio Clock... " >&6; }
29700 # Check whether --enable-COMPUTIME was given.
29701 if test "${enable_COMPUTIME+set}" = set; then :
29702   enableval=$enable_COMPUTIME; ntp_ok=$enableval
29703 else
29704   ntp_ok=$ntp_eapc
29705
29706 fi
29707
29708 case "$ntp_ok" in
29709  yes)
29710     ntp_libparse=yes
29711     ntp_refclock=yes
29712
29713 $as_echo "#define CLOCK_COMPUTIME 1" >>confdefs.h
29714
29715     ;;
29716 esac
29717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29718 $as_echo "$ntp_ok" >&6; }
29719 case "$ntp_ok$ntp_canparse" in
29720  yesno)
29721     as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
29722 esac
29723
29724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ELV/DCF7000 clock" >&5
29725 $as_echo_n "checking ELV/DCF7000 clock... " >&6; }
29726 # Check whether --enable-DCF7000 was given.
29727 if test "${enable_DCF7000+set}" = set; then :
29728   enableval=$enable_DCF7000; ntp_ok=$enableval
29729 else
29730   ntp_ok=$ntp_eapc
29731
29732 fi
29733
29734 case "$ntp_ok" in
29735  yes)
29736     ntp_libparse=yes
29737     ntp_refclock=yes
29738
29739 $as_echo "#define CLOCK_DCF7000 1" >>confdefs.h
29740
29741     ;;
29742 esac
29743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29744 $as_echo "$ntp_ok" >&6; }
29745 case "$ntp_ok$ntp_canparse" in
29746  yesno)
29747     as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
29748 esac
29749
29750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking HOPF 6021 clock" >&5
29751 $as_echo_n "checking HOPF 6021 clock... " >&6; }
29752 # Check whether --enable-HOPF6021 was given.
29753 if test "${enable_HOPF6021+set}" = set; then :
29754   enableval=$enable_HOPF6021; ntp_ok=$enableval
29755 else
29756   ntp_ok=$ntp_eapc
29757
29758 fi
29759
29760 case "$ntp_ok" in
29761  yes)
29762     ntp_libparse=yes
29763     ntp_refclock=yes
29764
29765 $as_echo "#define CLOCK_HOPF6021 1" >>confdefs.h
29766
29767     ;;
29768 esac
29769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29770 $as_echo "$ntp_ok" >&6; }
29771 case "$ntp_ok$ntp_canparse" in
29772  yesno)
29773     as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
29774 esac
29775
29776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Meinberg clocks" >&5
29777 $as_echo_n "checking Meinberg clocks... " >&6; }
29778 # Check whether --enable-MEINBERG was given.
29779 if test "${enable_MEINBERG+set}" = set; then :
29780   enableval=$enable_MEINBERG; ntp_ok=$enableval
29781 else
29782   ntp_ok=$ntp_eapc
29783
29784 fi
29785
29786 case "$ntp_ok" in
29787  yes)
29788     ntp_libparse=yes
29789     ntp_refclock=yes
29790
29791 $as_echo "#define CLOCK_MEINBERG 1" >>confdefs.h
29792
29793     ;;
29794 esac
29795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29796 $as_echo "$ntp_ok" >&6; }
29797 case "$ntp_ok$ntp_canparse" in
29798  yesno)
29799     as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
29800 esac
29801
29802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DCF77 raw time code" >&5
29803 $as_echo_n "checking DCF77 raw time code... " >&6; }
29804 # Check whether --enable-RAWDCF was given.
29805 if test "${enable_RAWDCF+set}" = set; then :
29806   enableval=$enable_RAWDCF; ntp_ok=$enableval
29807 else
29808   ntp_ok=$ntp_eapc
29809
29810 fi
29811
29812 case "$ntp_ok" in
29813  yes)
29814     ntp_libparse=yes
29815     ntp_parseutil=yes
29816     ntp_refclock=yes
29817     ntp_rawdcf=yes
29818
29819 $as_echo "#define CLOCK_RAWDCF 1" >>confdefs.h
29820
29821     ;;
29822 esac
29823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29824 $as_echo "$ntp_ok" >&6; }
29825 case "$ntp_ok$ntp_canparse" in
29826  yesno)
29827     as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
29828 esac
29829
29830 case "$ntp_rawdcf" in
29831  yes)
29832     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we must enable parity for RAWDCF" >&5
29833 $as_echo_n "checking if we must enable parity for RAWDCF... " >&6; }
29834 if ${ntp_cv_rawdcf_parity+:} false; then :
29835   $as_echo_n "(cached) " >&6
29836 else
29837
29838             ans=no
29839             case "$host" in
29840              *-*-*linux*)
29841                 ans=yes
29842                 ;;
29843             esac
29844             ntp_cv_rawdcf_parity=$ans
29845
29846
29847 fi
29848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rawdcf_parity" >&5
29849 $as_echo "$ntp_cv_rawdcf_parity" >&6; }
29850     case "$ntp_cv_rawdcf_parity" in
29851      yes)
29852
29853 $as_echo "#define RAWDCF_NO_IGNPAR 1" >>confdefs.h
29854  ;;
29855     esac
29856 esac
29857
29858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RCC 8000 clock" >&5
29859 $as_echo_n "checking RCC 8000 clock... " >&6; }
29860 # Check whether --enable-RCC8000 was given.
29861 if test "${enable_RCC8000+set}" = set; then :
29862   enableval=$enable_RCC8000; ntp_ok=$enableval
29863 else
29864   ntp_ok=$ntp_eapc
29865
29866 fi
29867
29868 case "$ntp_ok" in
29869  yes)
29870     ntp_libparse=yes
29871     ntp_refclock=yes
29872
29873 $as_echo "#define CLOCK_RCC8000 1" >>confdefs.h
29874
29875     ;;
29876 esac
29877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29878 $as_echo "$ntp_ok" >&6; }
29879 case "$ntp_ok$ntp_canparse" in
29880  yesno)
29881     as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
29882 esac
29883
29884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Schmid DCF77 clock" >&5
29885 $as_echo_n "checking Schmid DCF77 clock... " >&6; }
29886 # Check whether --enable-SCHMID was given.
29887 if test "${enable_SCHMID+set}" = set; then :
29888   enableval=$enable_SCHMID; ntp_ok=$enableval
29889 else
29890   ntp_ok=$ntp_eapc
29891
29892 fi
29893
29894 case "$ntp_ok" in
29895  yes)
29896     ntp_libparse=yes
29897     ntp_refclock=yes
29898
29899 $as_echo "#define CLOCK_SCHMID 1" >>confdefs.h
29900
29901     ;;
29902 esac
29903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29904 $as_echo "$ntp_ok" >&6; }
29905 case "$ntp_ok$ntp_canparse" in
29906  yesno)
29907     as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
29908 esac
29909
29910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Trimble GPS receiver/TAIP protocol" >&5
29911 $as_echo_n "checking Trimble GPS receiver/TAIP protocol... " >&6; }
29912 # Check whether --enable-TRIMTAIP was given.
29913 if test "${enable_TRIMTAIP+set}" = set; then :
29914   enableval=$enable_TRIMTAIP; ntp_ok=$enableval
29915 else
29916   ntp_ok=$ntp_eapc
29917
29918 fi
29919
29920 case "$ntp_ok" in
29921  yes)
29922     ntp_libparse=yes
29923     ntp_refclock=yes
29924
29925 $as_echo "#define CLOCK_TRIMTAIP 1" >>confdefs.h
29926
29927     ;;
29928 esac
29929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29930 $as_echo "$ntp_ok" >&6; }
29931 case "$ntp_ok$ntp_canparse" in
29932  yesno)
29933     as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
29934 esac
29935
29936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Trimble GPS receiver/TSIP protocol" >&5
29937 $as_echo_n "checking Trimble GPS receiver/TSIP protocol... " >&6; }
29938 # Check whether --enable-TRIMTSIP was given.
29939 if test "${enable_TRIMTSIP+set}" = set; then :
29940   enableval=$enable_TRIMTSIP; ntp_ok=$enableval
29941 else
29942   ntp_ok=$ntp_eapc
29943
29944 fi
29945
29946 case "$ntp_ok" in
29947  yes)
29948     ntp_libparse=yes
29949     ntp_refclock=yes
29950
29951 $as_echo "#define CLOCK_TRIMTSIP 1" >>confdefs.h
29952
29953     ;;
29954 esac
29955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29956 $as_echo "$ntp_ok" >&6; }
29957 case "$ntp_ok$ntp_canparse" in
29958  yesno)
29959     as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
29960 esac
29961
29962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking WHARTON 400A Series clock" >&5
29963 $as_echo_n "checking WHARTON 400A Series clock... " >&6; }
29964 # Check whether --enable-WHARTON was given.
29965 if test "${enable_WHARTON+set}" = set; then :
29966   enableval=$enable_WHARTON; ntp_ok=$enableval
29967 else
29968   ntp_ok=$ntp_eapc
29969
29970 fi
29971
29972 case "$ntp_ok" in
29973  yes)
29974     ntp_libparse=yes
29975     ntp_refclock=yes
29976
29977 $as_echo "#define CLOCK_WHARTON_400A 1" >>confdefs.h
29978
29979     ;;
29980 esac
29981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29982 $as_echo "$ntp_ok" >&6; }
29983 case "$ntp_ok$ntp_canparse" in
29984  yesno)
29985     as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
29986 esac
29987
29988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking VARITEXT clock" >&5
29989 $as_echo_n "checking VARITEXT clock... " >&6; }
29990 # Check whether --enable-VARITEXT was given.
29991 if test "${enable_VARITEXT+set}" = set; then :
29992   enableval=$enable_VARITEXT; ntp_ok=$enableval
29993 else
29994   ntp_ok=$ntp_eapc
29995
29996 fi
29997
29998 case "$ntp_ok" in
29999  yes)
30000     ntp_libparse=yes
30001     ntp_refclock=yes
30002
30003 $as_echo "#define CLOCK_VARITEXT 1" >>confdefs.h
30004
30005     ;;
30006 esac
30007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30008 $as_echo "$ntp_ok" >&6; }
30009 case "$ntp_ok$ntp_canparse" in
30010  yesno)
30011     as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
30012 esac
30013
30014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking SEL240X clock" >&5
30015 $as_echo_n "checking SEL240X clock... " >&6; }
30016 # Check whether --enable-SEL240X was given.
30017 if test "${enable_SEL240X+set}" = set; then :
30018   enableval=$enable_SEL240X; ntp_ok=$enableval
30019 else
30020   ntp_ok=$ntp_eapc
30021 fi
30022
30023 if test "$ntp_ok" = "yes"; then
30024     ntp_libparse=yes
30025     ntp_refclock=yes
30026
30027 $as_echo "#define CLOCK_SEL240X 1" >>confdefs.h
30028
30029 fi
30030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30031 $as_echo "$ntp_ok" >&6; }
30032 case "$ntp_ok$ntp_canparse" in
30033  yesno)
30034     as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
30035     ;;
30036 esac
30037
30038
30039
30040
30041
30042
30043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to make and use the parse libraries" >&5
30044 $as_echo_n "checking if we need to make and use the parse libraries... " >&6; }
30045 ans=no
30046 case "$ntp_libparse" in
30047  yes)
30048     ans=yes
30049
30050 $as_echo "#define CLOCK_PARSE 1" >>confdefs.h
30051
30052     LIBPARSE=../libparse/libparse.a
30053     MAKE_LIBPARSE=libparse.a
30054     # HMS: check_y2k trips the 34 year problem now...
30055     false && MAKE_CHECK_Y2K=check_y2k
30056 esac
30057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
30058 $as_echo "$ans" >&6; }
30059
30060
30061
30062
30063 VER_SUFFIX=
30064
30065
30066
30067
30068 # Check whether --with-crypto was given.
30069 if test "${with_crypto+set}" = set; then :
30070   withval=$with_crypto;
30071 fi
30072
30073
30074 # Check whether --with-openssl-libdir was given.
30075 if test "${with_openssl_libdir+set}" = set; then :
30076   withval=$with_openssl_libdir;
30077 fi
30078
30079
30080 # Check whether --with-openssl-incdir was given.
30081 if test "${with_openssl_incdir+set}" = set; then :
30082   withval=$with_openssl_incdir;
30083 fi
30084
30085
30086 # Check whether --with-rpath was given.
30087 if test "${with_rpath+set}" = set; then :
30088   withval=$with_rpath;
30089 fi
30090
30091
30092 ntp_openssl=no
30093 ntp_openssl_from_pkg_config=no
30094
30095 with_crypto=${with_crypto:-openssl,libcrypto}
30096 case "$with_crypto" in
30097  yes)
30098     with_crypto=openssl,libcrypto
30099 esac
30100
30101
30102 case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
30103  no:*) ;;
30104  *:notempty:notgiven:notgiven)
30105     for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
30106         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
30107 $as_echo_n "checking pkg-config for $pkg... " >&6; }
30108         if $PKG_CONFIG --exists $pkg ; then
30109             CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
30110             CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
30111             LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`"
30112             LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l --static $pkg`"
30113             LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`"
30114             VER_SUFFIX=o
30115             ntp_openssl=yes
30116             ntp_openssl_from_pkg_config=yes
30117             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30118 $as_echo "yes" >&6; }
30119
30120             break
30121         fi
30122         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30123 $as_echo "no" >&6; }
30124     done
30125 esac
30126 case "$with_crypto:$ntp_openssl" in
30127  no:*) ;;
30128  *:no)
30129     need_dash_r=
30130     need_dash_Wlrpath=
30131     case "${with_rpath-notgiven}" in
30132      yes)
30133         # Lame - what to do if we need -Wl... but not -R?
30134         need_dash_r=1
30135         ;;
30136      notgiven)
30137         case "$host" in
30138          *-*-linux*)
30139             # This may really only be true for gcc
30140             need_dash_Wlrpath=1
30141             ;;
30142          *-*-netbsd*)
30143             need_dash_r=1
30144             ;;
30145          *-*-solaris*)
30146             need_dash_r=1
30147             ;;
30148         esac
30149         ;;
30150     esac
30151
30152     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
30153 $as_echo_n "checking for openssl library directory... " >&6; }
30154     with_openssl_libdir=${with_openssl_libdir-notgiven}
30155     case "$with_openssl_libdir" in
30156      notgiven)
30157         case "$build" in
30158          $host)
30159             with_openssl_libdir=default
30160             ;;
30161          *)
30162             with_openssl_libdir=no
30163             ;;
30164         esac
30165     esac
30166     case "$with_openssl_libdir" in
30167      default)
30168         # Look in:
30169         with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib"
30170         with_openssl_libdir="$with_openssl_libdir /usr/local/lib"
30171         with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib"
30172     esac
30173     case "$with_openssl_libdir" in
30174      no)
30175         ;;
30176      *) # Look for libcrypto.a and libssl.a:
30177         for i in $with_openssl_libdir no
30178         do
30179             case "$host" in
30180              *-*-darwin*)
30181                 test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
30182                 ;;
30183              *)
30184                 test -f $i/libcrypto.so -a -f $i/libssl.so && break
30185                 test -f $i/libcrypto.a -a -f $i/libssl.a && break
30186                 ;;
30187             esac
30188         done
30189         openssl_libdir=$i
30190         ;;
30191     esac
30192     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
30193 $as_echo "$openssl_libdir" >&6; }
30194     case "$openssl_libdir" in
30195      no)
30196         openssl_libdir=
30197         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
30198 $as_echo "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
30199     esac
30200
30201     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
30202 $as_echo_n "checking for openssl include directory... " >&6; }
30203     with_openssl_incdir=${with_openssl_incdir-notgiven}
30204     case "$with_openssl_incdir" in
30205      notgiven)
30206         # Look in:
30207         with_openssl_incdir="/usr/include /usr/sfw/include"
30208         with_openssl_incdir="$with_openssl_incdir /usr/local/include"
30209         with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include"
30210     esac
30211     case "$with_openssl_incdir" in
30212      no)
30213         ;;
30214      *) # look for openssl/evp.h:
30215         for i in $with_openssl_incdir no
30216         do
30217             test -f $i/openssl/evp.h && break
30218         done
30219         openssl_incdir=$i
30220         ;;
30221     esac
30222     { i=; unset i;}
30223     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
30224 $as_echo "$openssl_incdir" >&6; }
30225     case "$openssl_incdir" in
30226      no)
30227         openssl_incdir=
30228         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
30229 $as_echo "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
30230     esac
30231     if test -z "$openssl_libdir" -o -z "$openssl_incdir"
30232     then
30233         ntp_openssl=no
30234     else
30235         ntp_openssl=yes
30236         VER_SUFFIX=o
30237     fi
30238     case "$ntp_openssl" in
30239      yes)
30240         # We have OpenSSL inc/lib dirs - use them.
30241         case "$openssl_incdir" in
30242          /usr/include)
30243             ;;
30244          *)
30245             CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir"
30246             ;;
30247         esac
30248         case "$openssl_libdir" in
30249          /usr/lib)
30250             ;;
30251          *)
30252             LDADD_NTP="$LDADD_NTP -L$openssl_libdir"
30253             case "$need_dash_r" in
30254              1)
30255                 LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir"
30256             esac
30257             case "$need_dash_Wlrpath" in
30258              1)
30259                 LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir"
30260             esac
30261             ;;
30262         esac
30263         LDADD_NTP="$LDADD_NTP -lcrypto"
30264     esac
30265 esac
30266
30267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
30268 $as_echo_n "checking if we will use crypto... " >&6; }
30269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
30270 $as_echo "$ntp_openssl" >&6; }
30271
30272 case "$ntp_openssl" in
30273  yes)
30274
30275 $as_echo "#define OPENSSL /**/" >>confdefs.h
30276
30277     case "$VER_SUFFIX" in
30278      *o*) ;;
30279      *) as_fn_error $? "OPENSSL set but no 'o' in VER_SUFFIX!" "$LINENO" 5 ;;
30280     esac
30281     ;;
30282 esac
30283
30284 NTPO_SAVED_CPPFLAGS="$CPPFLAGS"
30285 CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP"
30286 NTPO_SAVED_LIBS="$LIBS"
30287
30288 #
30289 # check for linking with -lcrypto failure, and try -lcrypto -lz.
30290 # Helps m68k-atari-mint
30291 #
30292 case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
30293  yes:no)
30294     LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
30295     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
30296 $as_echo_n "checking if linking with -lcrypto alone works... " >&6; }
30297 if ${ntp_cv_bare_lcrypto+:} false; then :
30298   $as_echo_n "(cached) " >&6
30299 else
30300   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30301 /* end confdefs.h.  */
30302
30303                     #include "openssl/err.h"
30304                     #include "openssl/evp.h"
30305
30306 int
30307 main ()
30308 {
30309
30310                     ERR_load_crypto_strings();
30311                     OpenSSL_add_all_algorithms();
30312
30313
30314   ;
30315   return 0;
30316 }
30317 _ACEOF
30318 if ac_fn_c_try_link "$LINENO"; then :
30319   ntp_cv_bare_lcrypto=yes
30320 else
30321   ntp_cv_bare_lcrypto=no
30322
30323 fi
30324 rm -f core conftest.err conftest.$ac_objext \
30325     conftest$ac_exeext conftest.$ac_ext
30326
30327 fi
30328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
30329 $as_echo "$ntp_cv_bare_lcrypto" >&6; }
30330     case "$ntp_cv_bare_lcrypto" in
30331      no)
30332         LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
30333         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
30334 $as_echo_n "checking if linking with -lcrypto -lz works... " >&6; }
30335 if ${ntp_cv_lcrypto_lz+:} false; then :
30336   $as_echo_n "(cached) " >&6
30337 else
30338   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30339 /* end confdefs.h.  */
30340
30341                         #include "openssl/err.h"
30342                         #include "openssl/evp.h"
30343
30344 int
30345 main ()
30346 {
30347
30348                         ERR_load_crypto_strings();
30349                         OpenSSL_add_all_algorithms();
30350
30351
30352   ;
30353   return 0;
30354 }
30355 _ACEOF
30356 if ac_fn_c_try_link "$LINENO"; then :
30357   ntp_cv_lcrypto_lz=yes
30358 else
30359   ntp_cv_lcrypto_lz=no
30360
30361 fi
30362 rm -f core conftest.err conftest.$ac_objext \
30363     conftest$ac_exeext conftest.$ac_ext
30364
30365 fi
30366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
30367 $as_echo "$ntp_cv_lcrypto_lz" >&6; }
30368         case "$ntp_cv_lcrypto_lz" in
30369          yes)
30370              LDADD_NTP="$LDADD_NTP -lz"
30371         esac
30372     esac
30373 esac
30374
30375 #
30376 # Older OpenSSL headers have a number of callback prototypes inside
30377 # other function prototypes which trigger copious warnings with gcc's
30378 # -Wstrict-prototypes, which is included in -Wall.
30379 #
30380 # An example:
30381 #
30382 # int i2d_RSA_NET(const RSA *a, unsigned char **pp,
30383 #                 int (*cb)(), int sgckey);
30384 #                 ^^^^^^^^^^^
30385 #
30386 #
30387 #
30388 openssl_triggers_warnings=unknown
30389 NTPO_SAVED_CFLAGS="$CFLAGS"
30390
30391 case "$ntp_openssl:$GCC" in
30392  yes:yes)
30393     CFLAGS="$CFLAGS -Werror"
30394     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30395 /* end confdefs.h.  */
30396
30397
30398 int
30399 main ()
30400 {
30401
30402                 /* see if -Werror breaks gcc */
30403
30404
30405   ;
30406   return 0;
30407 }
30408 _ACEOF
30409 if ac_fn_c_try_compile "$LINENO"; then :
30410   gcc_handles_Werror=yes
30411 else
30412   gcc_handles_Werror=no
30413
30414 fi
30415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30416     case "$gcc_handles_Werror" in
30417      no)
30418         # if this gcc doesn't do -Werror go ahead and use
30419         # -Wstrict-prototypes.
30420         openssl_triggers_warnings=yes
30421         ;;
30422      yes)
30423         CFLAGS="$CFLAGS -Wstrict-prototypes"
30424         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30425 /* end confdefs.h.  */
30426
30427                     #include "openssl/asn1_mac.h"
30428                     #include "openssl/bn.h"
30429                     #include "openssl/err.h"
30430                     #include "openssl/evp.h"
30431                     #include "openssl/pem.h"
30432                     #include "openssl/rand.h"
30433                     #include "openssl/x509v3.h"
30434
30435 int
30436 main ()
30437 {
30438
30439                     /* empty body */
30440
30441
30442   ;
30443   return 0;
30444 }
30445 _ACEOF
30446 if ac_fn_c_try_compile "$LINENO"; then :
30447   openssl_triggers_warnings=no
30448 else
30449   openssl_triggers_warnings=yes
30450
30451 fi
30452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30453     esac
30454     case "$openssl_triggers_warnings" in
30455      yes)
30456         CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes"
30457         ;;
30458      *)
30459         CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
30460     esac
30461     ;;
30462  no:yes)
30463     # gcc without OpenSSL
30464     CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
30465 esac
30466
30467 # Because we don't want -Werror for the EVP_MD_do_all_sorted check
30468 CFLAGS="$NTPO_SAVED_CFLAGS"
30469
30470 case "$ntp_openssl" in
30471  yes)
30472     LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
30473     for ac_func in EVP_MD_do_all_sorted
30474 do :
30475   ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
30476 if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes; then :
30477   cat >>confdefs.h <<_ACEOF
30478 #define HAVE_EVP_MD_DO_ALL_SORTED 1
30479 _ACEOF
30480
30481 fi
30482 done
30483
30484     ;;
30485 esac
30486
30487
30488 CPPFLAGS="$NTPO_SAVED_CPPFLAGS"
30489 LIBS="$NTPO_SAVED_LIBS"
30490 { NTPO_SAVED_CFLAGS=; unset NTPO_SAVED_CFLAGS;}
30491 { NTPO_SAVED_CPPFLAGS=; unset NTPO_SAVED_CPPFLAGS;}
30492 { NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;}
30493 { openssl_triggers_warnings=; unset openssl_triggers_warnings;}
30494 { ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
30495
30496
30497
30498
30499
30500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use OpenSSL's crypto random (if available)" >&5
30501 $as_echo_n "checking if we want to use OpenSSL's crypto random (if available)... " >&6; }
30502 # Check whether --enable-openssl-random was given.
30503 if test "${enable_openssl_random+set}" = set; then :
30504   enableval=$enable_openssl_random; ntp_use_openssl_random=$enableval
30505 else
30506   ntp_use_openssl_random=yes
30507
30508 fi
30509
30510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_openssl_random" >&5
30511 $as_echo "$ntp_use_openssl_random" >&6; }
30512
30513 # The following might need extra libraries
30514 NTPO_SAVED_LIBS="$LIBS"
30515 LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
30516 for ac_func in RAND_bytes RAND_poll
30517 do :
30518   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
30519 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
30520 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
30521   cat >>confdefs.h <<_ACEOF
30522 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
30523 _ACEOF
30524
30525 fi
30526 done
30527
30528 LIBS="$NTPO_SAVED_LIBS"
30529 case "$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
30530  yesyesyes)
30531
30532 $as_echo "#define USE_OPENSSL_CRYPTO_RAND 1" >>confdefs.h
30533
30534      ;;
30535  *) ntp_use_openssl_random=no ;;
30536 esac
30537
30538
30539
30540 # if we are using OpenSSL (--with-crypto), by default Autokey is enabled
30541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to include NTP Autokey protocol support" >&5
30542 $as_echo_n "checking if we want to include NTP Autokey protocol support... " >&6; }
30543 # Check whether --enable-autokey was given.
30544 if test "${enable_autokey+set}" = set; then :
30545   enableval=$enable_autokey; ntp_autokey=$enableval
30546 else
30547   ntp_autokey=$ntp_openssl
30548
30549 fi
30550
30551 case "$ntp_autokey" in
30552  no)
30553     ;;
30554  *)
30555     case "$ntp_openssl" in
30556      no)
30557         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Autokey, --enable-autokey requires --with-crypto." >&5
30558 $as_echo "$as_me: WARNING: Disabling Autokey, --enable-autokey requires --with-crypto." >&2;}
30559         ntp_autokey=no
30560         ;;
30561      *)
30562
30563 $as_echo "#define AUTOKEY 1" >>confdefs.h
30564
30565         ntp_autokey=yes
30566         ;;
30567     esac
30568     ;;
30569 esac
30570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_autokey" >&5
30571 $as_echo "$ntp_autokey" >&6; }
30572
30573
30574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to run check-layout" >&5
30575 $as_echo_n "checking if we want to run check-layout... " >&6; }
30576 case "$cross_compiling$PATH_PERL" in
30577  no/*)
30578     MAKE_CHECK_LAYOUT=check-layout
30579     ans=yes
30580     ;;
30581  *)
30582     ans=no
30583     ;;
30584 esac
30585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
30586 $as_echo "$ans" >&6; }
30587
30588
30589
30590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make dcf parse utilities" >&5
30591 $as_echo_n "checking if we can make dcf parse utilities... " >&6; }
30592 ans=no
30593 case "$ntp_parseutil" in
30594  yes)
30595     case "$host" in
30596      *-*-sunos4*|*-*-solaris2*|*-*-*linux*|*-*-netbsd*)
30597         ans="dcfd testdcf"
30598         DCFD=dcfd
30599         TESTDCF=testdcf
30600     esac
30601     ;;
30602 esac
30603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
30604 $as_echo "$ans" >&6; }
30605
30606
30607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can build kernel streams modules for parse" >&5
30608 $as_echo_n "checking if we can build kernel streams modules for parse... " >&6; }
30609 ans=no
30610 case "$ntp_parseutil$ac_cv_header_sys_stropts_h" in
30611  yesyes)
30612     case "$host" in
30613      sparc-*-sunos4*)
30614         case "$ntp_cv_var_kernel_pll" in
30615         yes)
30616
30617 $as_echo "#define PPS_SYNC 1" >>confdefs.h
30618
30619             ;;
30620         esac
30621         ans=parsestreams
30622         MAKE_PARSEKMODULE=parsestreams.loadable_module.o
30623         ;;
30624      sparc-*-solaris2*)
30625         ans=parsesolaris
30626         MAKE_PARSEKMODULE=parse
30627         for ac_header in strings.h
30628 do :
30629   ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
30630 if test "x$ac_cv_header_strings_h" = xyes; then :
30631   cat >>confdefs.h <<_ACEOF
30632 #define HAVE_STRINGS_H 1
30633 _ACEOF
30634
30635 fi
30636
30637 done
30638
30639         ;;
30640     esac
30641     ;;
30642 esac
30643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
30644 $as_echo "$ans" >&6; }
30645
30646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need basic refclock support" >&5
30647 $as_echo_n "checking if we need basic refclock support... " >&6; }
30648 case "$ntp_refclock" in
30649  yes)
30650
30651 $as_echo "#define REFCLOCK 1" >>confdefs.h
30652
30653     ;;
30654 esac
30655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_refclock" >&5
30656 $as_echo "$ntp_refclock" >&6; }
30657
30658 PROPDELAY=propdelay
30659
30660
30661
30662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want HP-UX adjtimed support" >&5
30663 $as_echo_n "checking if we want HP-UX adjtimed support... " >&6; }
30664 case "$host" in
30665  *-*-hpux[56789]*)
30666     ans=yes
30667     ;;
30668  *) ans=no
30669     ;;
30670 esac
30671 case "$ans" in
30672  yes)
30673     MAKE_ADJTIMED=adjtimed
30674
30675 $as_echo "#define NEED_HPUX_ADJTIME 1" >>confdefs.h
30676
30677     ;;
30678  *) ADJTIMED_DB=
30679     ADJTIMED_DL=
30680     ADJTIMED_DS=
30681     ADJTIMED_MS=
30682     ;;
30683 esac
30684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
30685 $as_echo "$ans" >&6; }
30686
30687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want QNX adjtime support" >&5
30688 $as_echo_n "checking if we want QNX adjtime support... " >&6; }
30689 case "$host" in
30690  *-*-qnx*)
30691     ans=yes
30692     ;;
30693  *) ans=no
30694     ;;
30695 esac
30696 case "$ans" in
30697  yes)
30698
30699 $as_echo "#define NEED_QNX_ADJTIME 1" >>confdefs.h
30700
30701     ;;
30702 esac
30703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
30704 $as_echo "$ans" >&6; }
30705
30706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can read kmem" >&5
30707 $as_echo_n "checking if we can read kmem... " >&6; }
30708
30709 #  the default is to enable it if the system has the capability
30710
30711 case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in
30712  *yes*)
30713     ans=yes
30714     ;;
30715  *) ans=no
30716     ;;
30717 esac
30718
30719 case "$host" in
30720  *-*-domainos)  # Won't be found...
30721     ans=no
30722     ;;
30723  *-*-hpux*)
30724     #ans=no
30725     ;;
30726  *-*-irix[456]*)
30727     ans=no
30728     ;;
30729  *-*-*linux*)
30730     ans=no
30731     ;;
30732  *-*-winnt3.5)
30733     ans=no
30734     ;;
30735  *-*-unicosmp*)
30736     ans=no
30737     ;;
30738 esac
30739
30740 # --enable-kmem / --disable-kmem controls if present
30741 # Check whether --enable-kmem was given.
30742 if test "${enable_kmem+set}" = set; then :
30743   enableval=$enable_kmem; ans=$enableval
30744
30745 fi
30746
30747
30748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
30749 $as_echo "$ans" >&6; }
30750
30751 case "$ans" in
30752  yes)
30753     can_kmem=yes
30754     ;;
30755  *)
30756     can_kmem=no
30757
30758 $as_echo "#define NOKMEM 1" >>confdefs.h
30759
30760 esac
30761
30762
30763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if adjtime is accurate" >&5
30764 $as_echo_n "checking if adjtime is accurate... " >&6; }
30765
30766 # target-dependent defaults
30767
30768 case "$host" in
30769  i386-sequent-ptx*)
30770     ans=no
30771     ;;
30772  i386-unknown-osf1*)
30773     ans=yes
30774     ;;
30775  mips-sgi-irix[456]*)
30776     ans=yes
30777     ;;
30778  *-fujitsu-uxp*)
30779     ans=yes
30780     ;;
30781  *-ibm-aix[4-9]*)
30782     # XXX only verified thru AIX6.
30783     ans=yes
30784     ;;
30785  *-*-*linux*)
30786     ans=yes
30787     ;;
30788  *-*-solaris2.[01])
30789     ans=no
30790     ;;
30791  *-*-solaris2*)
30792     ans=yes
30793     ;;
30794  *-*-unicosmp*)
30795     ans=yes
30796     ;;
30797  *) ans=no
30798     ;;
30799 esac
30800
30801 # --enable-accurate-adjtime / --disable-accurate-adjtime
30802 # override the default
30803 # Check whether --enable-accurate-adjtime was given.
30804 if test "${enable_accurate_adjtime+set}" = set; then :
30805   enableval=$enable_accurate_adjtime; ans=$enableval
30806
30807 fi
30808
30809
30810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
30811 $as_echo "$ans" >&6; }
30812
30813 case "$ans" in
30814  yes)
30815
30816 $as_echo "#define ADJTIME_IS_ACCURATE 1" >>confdefs.h
30817
30818     adjtime_is_accurate=yes
30819     ;;
30820  *)
30821     adjtime_is_accurate=no
30822     ;;
30823 esac
30824
30825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name of 'tick' in the kernel" >&5
30826 $as_echo_n "checking the name of 'tick' in the kernel... " >&6; }
30827 if ${ntp_cv_nlist_tick+:} false; then :
30828   $as_echo_n "(cached) " >&6
30829 else
30830
30831         ans=_tick
30832         case "$host" in
30833          m68*-hp-hpux*) # HP9000/300?
30834             ans=_old_tick
30835             ;;
30836          *-apple-aux[23]*)
30837             ans=tick
30838             ;;
30839          *-hp-hpux*)
30840             ans=old_tick
30841             ;;
30842          *-ibm-aix[3-9]*)
30843             # XXX only verified thru AIX6.
30844             ans=no
30845             ;;
30846          *-*-mpeix*)
30847             ans=no
30848             ;;
30849          *-*-ptx*)
30850             ans=tick
30851             ;;
30852          *-*-sco3.2v[45]*)
30853             ans=no
30854             ;;
30855          *-*-solaris2*)
30856             ans=nsec_per_tick
30857             ;;
30858          *-*-sysv4*)
30859             ans=tick
30860             ;;
30861         esac
30862         ntp_cv_nlist_tick=$ans
30863
30864
30865 fi
30866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_tick" >&5
30867 $as_echo "$ntp_cv_nlist_tick" >&6; }
30868 case "$ntp_cv_nlist_tick" in
30869  ''|no)
30870     ;;  # HMS: I think we can only get 'no' here...
30871  *)
30872
30873 cat >>confdefs.h <<_ACEOF
30874 #define K_TICK_NAME "$ntp_cv_nlist_tick"
30875 _ACEOF
30876
30877 esac
30878
30879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the units of 'tick'" >&5
30880 $as_echo_n "checking for the units of 'tick'... " >&6; }
30881 if ${ntp_cv_tick_nano+:} false; then :
30882   $as_echo_n "(cached) " >&6
30883 else
30884
30885         ans=usec
30886         case "$host" in
30887          *-*-solaris2*)
30888             ans=nsec
30889             ;;
30890         esac
30891         ntp_cv_tick_nano=$ans
30892
30893
30894 fi
30895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_tick_nano" >&5
30896 $as_echo "$ntp_cv_tick_nano" >&6; }
30897 case "$ntp_cv_tick_nano" in
30898  nsec)
30899
30900 $as_echo "#define TICK_NANO 1" >>confdefs.h
30901
30902 esac
30903
30904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name of 'tickadj' in the kernel" >&5
30905 $as_echo_n "checking the name of 'tickadj' in the kernel... " >&6; }
30906 if ${ntp_cv_nlist_tickadj+:} false; then :
30907   $as_echo_n "(cached) " >&6
30908 else
30909
30910         ans=_tickadj
30911         case "$host" in
30912          m68*-hp-hpux*) # HP9000/300?
30913             ans=_tickadj
30914             ;;
30915          *-apple-aux[23]*)
30916             ans=tickadj
30917             ;;
30918          *-hp-hpux10*)
30919             ans=no
30920             ;;
30921          *-hp-hpux9*)
30922             ans=no
30923             ;;
30924          *-hp-hpux*)
30925             ans=tickadj
30926             ;;
30927          *-*-aix*)
30928             ans=tickadj
30929             ;;
30930          *-*-mpeix*)
30931             ans=no
30932             ;;
30933          *-*-ptx*)
30934             ans=tickadj
30935             ;;
30936          *-*-sco3.2v4*)
30937             ans=no
30938             ;;
30939          *-*-sco3.2v5.0*)
30940             ans=clock_drift
30941             ;;
30942          *-*-solaris2*)
30943             ans=no      # hrestime_adj
30944             ;;
30945          *-*-sysv4*)
30946             ans=tickadj
30947             ;;
30948         esac
30949         ntp_cv_nlist_tickadj=$ans
30950
30951
30952 fi
30953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_tickadj" >&5
30954 $as_echo "$ntp_cv_nlist_tickadj" >&6; }
30955 case "$ntp_cv_nlist_tickadj" in
30956  ''|no)
30957     ;;  # HMS: I think we can only get 'no' here...
30958  *)
30959
30960 cat >>confdefs.h <<_ACEOF
30961 #define K_TICKADJ_NAME "$ntp_cv_nlist_tickadj"
30962 _ACEOF
30963
30964 esac
30965
30966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the units of 'tickadj'" >&5
30967 $as_echo_n "checking for the units of 'tickadj'... " >&6; }
30968 if ${ntp_cv_tickadj_nano+:} false; then :
30969   $as_echo_n "(cached) " >&6
30970 else
30971
30972         ans=usec
30973         case "$host" in
30974          *-*-solaris2*)
30975             ans=nsec
30976             ;;
30977         esac
30978         ntp_cv_tickadj_nano=$ans
30979
30980
30981 fi
30982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_tickadj_nano" >&5
30983 $as_echo "$ntp_cv_tickadj_nano" >&6; }
30984 case "$ntp_cv_tickadj_nano" in
30985  nsec)
30986
30987 $as_echo "#define TICKADJ_NANO 1" >>confdefs.h
30988
30989 esac
30990
30991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking half-heartedly for 'dosynctodr' in the kernel" >&5
30992 $as_echo_n "checking half-heartedly for 'dosynctodr' in the kernel... " >&6; }
30993 if ${ntp_cv_nlist_dosynctodr+:} false; then :
30994   $as_echo_n "(cached) " >&6
30995 else
30996
30997         case "$host" in
30998          *-apple-aux[23]*)
30999             ans=no
31000             ;;
31001          *-sni-sysv*)
31002             ans=dosynctodr
31003             ;;
31004          *-stratus-vos)
31005             ans=no
31006             ;;
31007          *-*-aix*)
31008             ans=dosynctodr
31009             ;;
31010          *-*-hpux*)
31011             ans=no
31012             ;;
31013          *-*-mpeix*)
31014             ans=no
31015             ;;
31016          *-*-nextstep*)
31017             ans=_dosynctodr
31018             ;;
31019          *-*-ptx*)
31020             ans=doresettodr
31021             ;;
31022          *-*-sco3.2v4*)
31023             ans=no
31024             ;;
31025          *-*-sco3.2v5*)
31026             ans=track_rtc
31027             ;;
31028          *-*-solaris2*)
31029             ans=dosynctodr
31030             ;;
31031          *-*-sysv4*)
31032             ans=doresettodr
31033             ;;
31034          *)
31035             ans=_dosynctodr
31036             ;;
31037         esac
31038         ntp_cv_nlist_dosynctodr=$ans
31039
31040
31041 fi
31042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_dosynctodr" >&5
31043 $as_echo "$ntp_cv_nlist_dosynctodr" >&6; }
31044 case "$ntp_cv_nlist_dosynctodr" in
31045  no)
31046     ;;
31047  *)
31048
31049 cat >>confdefs.h <<_ACEOF
31050 #define K_DOSYNCTODR_NAME "$ntp_cv_nlist_dosynctodr"
31051 _ACEOF
31052
31053     ;;
31054 esac
31055
31056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking half-heartedly for 'noprintf' in the kernel" >&5
31057 $as_echo_n "checking half-heartedly for 'noprintf' in the kernel... " >&6; }
31058 if ${ntp_cv_nlist_noprintf+:} false; then :
31059   $as_echo_n "(cached) " >&6
31060 else
31061
31062         case "$host" in
31063          *-apple-aux[23]*)
31064             ans=no
31065             ;;
31066          *-sni-sysv*)
31067             ans=noprintf
31068             ;;
31069          *-stratus-vos)
31070             ans=no
31071             ;;
31072          *-*-aix*)
31073             ans=noprintf
31074             ;;
31075          *-*-hpux*)
31076             ans=no
31077             ;;
31078          *-*-mpeix*)
31079             ans=no
31080             ;;
31081          *-*-ptx*)
31082             ans=noprintf
31083             ;;
31084          *-*-nextstep*)
31085             ans=_noprintf
31086             ;;
31087          *-*-solaris2*)
31088             ans=noprintf
31089             ;;
31090          *-*-sysv4*)
31091             ans=noprintf
31092             ;;
31093          *)
31094             ans=_noprintf
31095             ;;
31096         esac
31097         ntp_cv_nlist_noprintf=$ans
31098
31099
31100 fi
31101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_noprintf" >&5
31102 $as_echo "$ntp_cv_nlist_noprintf" >&6; }
31103 case "$ntp_cv_nlist_noprintf" in
31104  no)
31105     ;;
31106  *)
31107
31108 cat >>confdefs.h <<_ACEOF
31109 #define K_NOPRINTF_NAME "$ntp_cv_nlist_noprintf"
31110 _ACEOF
31111
31112     ;;
31113 esac
31114
31115
31116
31117
31118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a default value for 'tick'" >&5
31119 $as_echo_n "checking for a default value for 'tick'... " >&6; }
31120
31121 # target-dependent default for tick
31122
31123 case "$host" in
31124  *-*-pc-cygwin*)
31125     as_fn_error $? "tick needs work for cygwin" "$LINENO" 5
31126     ;;
31127  *-univel-sysv*)
31128     ans=10000
31129     ;;
31130  *-*-irix*)
31131     ans=10000
31132     ;;
31133  *-*-*linux*)
31134     ans=txc.tick
31135     ;;
31136  *-*-mpeix*)
31137     ans=no
31138     ;;
31139  *-*-winnt3.5)
31140     ans='(every / 10)'
31141     ;;
31142  *-*-unicosmp*)
31143     ans=10000
31144     ;;
31145  *)
31146     ans='1000000L/hz'
31147     ;;
31148 esac
31149
31150 # Check whether --enable-tick was given.
31151 if test "${enable_tick+set}" = set; then :
31152   enableval=$enable_tick; ans=$enableval
31153
31154 fi
31155
31156
31157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31158 $as_echo "$ans" >&6; }
31159
31160 case "$ans" in
31161  ''|no)
31162     ;;  # HMS: I think we can only get 'no' here...
31163  *)
31164
31165 cat >>confdefs.h <<_ACEOF
31166 #define PRESET_TICK $ans
31167 _ACEOF
31168
31169 esac
31170
31171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a default value for 'tickadj'" >&5
31172 $as_echo_n "checking for a default value for 'tickadj'... " >&6; }
31173
31174 # target-specific default
31175 ans='500/hz'
31176 case "$host" in
31177  *-fujitsu-uxp*)
31178     case "$adjtime_is_accurate" in
31179      yes)
31180         ans='tick/16'
31181     esac
31182     ;;
31183  *-univel-sysv*)
31184     ans=80
31185     ;;
31186  *-*-aix*)
31187     case "$can_kmem" in
31188      no)
31189         ans=1000
31190         ;;
31191     esac
31192     ;;
31193  *-*-domainos)  # Skippy: won't be found...
31194     case "$can_kmem" in
31195      no)
31196         ans=668
31197         ;;
31198     esac
31199     ;;
31200  *-*-hpux*)
31201     case "$adjtime_is_accurate" in
31202      yes)
31203         ans='tick/16'
31204         ;;
31205     esac
31206     ;;
31207  *-*-irix*)
31208     ans=150
31209     ;;
31210  *-*-mpeix*)
31211     ans=no
31212     ;;
31213  *-*-sco3.2v5.0*)
31214     ans=10000L/hz
31215     ;;
31216  *-*-winnt3.5)
31217     ans=50
31218     ;;
31219  *-*-unicosmp*)
31220     ans=150
31221     ;;
31222 esac
31223
31224 # Check whether --enable-tickadj was given.
31225 if test "${enable_tickadj+set}" = set; then :
31226   enableval=$enable_tickadj; ans=$enableval
31227
31228 fi
31229
31230
31231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31232 $as_echo "$ans" >&6; }
31233
31234 default_tickadj=$ans
31235
31236 case "$default_tickadj" in
31237  ''|no)
31238     ;;  # HMS: I think we can only get 'no' here...
31239  *)
31240
31241 cat >>confdefs.h <<_ACEOF
31242 #define PRESET_TICKADJ $default_tickadj
31243 _ACEOF
31244  ;;
31245 esac
31246
31247 # Newer versions of ReliantUNIX round adjtime() values down to
31248 # 1/100s (system tick). Sigh ...
31249 # Unfortunately, there is no easy way to know if particular release
31250 # has this "feature" or any obvious way to test for it.
31251 case "$host" in
31252  mips-sni-sysv4*)
31253
31254 $as_echo "#define RELIANTUNIX_CLOCK 1" >>confdefs.h
31255
31256 esac
31257
31258 case "$host" in
31259  *-*-sco3.2v5*)
31260
31261 $as_echo "#define SCO5_CLOCK 1" >>confdefs.h
31262
31263 esac
31264
31265 ntp_cv_make_tickadj=yes
31266 case "$can_kmem$ac_cv_var_tick$default_tickadj" in
31267  nonono)        # Don't read KMEM, no presets.  Bogus.
31268     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't read kmem, no PRESET_TICK or PRESET_TICKADJ.  No tickadj." >&5
31269 $as_echo "$as_me: WARNING: Can't read kmem, no PRESET_TICK or PRESET_TICKADJ.  No tickadj." >&2;}
31270     ntp_cv_make_tickadj=no
31271     ;;
31272  nono*)         # Don't read KMEM, no PRESET_TICK but PRESET_TICKADJ.  Bogus.
31273     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't read kmem but no PRESET_TICK.  No tickadj." >&5
31274 $as_echo "$as_me: WARNING: Can't read kmem but no PRESET_TICK.  No tickadj." >&2;}
31275     ntp_cv_make_tickadj=no
31276     ;;
31277  no*no)         # Don't read KMEM, PRESET_TICK but no PRESET_TICKADJ.  Bogus.
31278     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't read kmem but no PRESET_TICKADJ.  No tickadj." >&5
31279 $as_echo "$as_me: WARNING: Can't read kmem but no PRESET_TICKADJ.  No tickadj." >&2;}
31280     ntp_cv_make_tickadj=no
31281     ;;
31282  no*)           # Don't read KMEM, PRESET_TICK and PRESET_TICKADJ.  Cool.
31283     ;;
31284  yesnono)       # Read KMEM, no presets.  Cool.
31285     ;;
31286  yesno*)        # Read KMEM, no PRESET_TICK but PRESET_TICKADJ.  Bogus.
31287     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PRESET_TICKADJ is defined but not PRESET_TICK.  Please report this." >&5
31288 $as_echo "$as_me: WARNING: PRESET_TICKADJ is defined but not PRESET_TICK.  Please report this." >&2;}
31289     ;;
31290  yes*no)        # Read KMEM, PRESET_TICK but no PRESET_TICKADJ.  Cool.
31291     ;;
31292  yes*)          # READ KMEM, PRESET_TICK and PRESET_TICKADJ.
31293     ;;
31294  *)             # Generally bogus.
31295     as_fn_error $? "This shouldn't happen." "$LINENO" 5
31296     ;;
31297 esac
31298
31299
31300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want and can make the ntptime utility" >&5
31301 $as_echo_n "checking if we want and can make the ntptime utility... " >&6; }
31302 if ${ac_cv_make_ntptime+:} false; then :
31303   $as_echo_n "(cached) " >&6
31304 else
31305   case "$host" in
31306  *) case "$ntp_cv_struct_ntptimeval$ntp_cv_var_kernel_pll" in
31307      yesyes)
31308         ans=yes
31309         ;;
31310      *)
31311         ans=no
31312         ;;
31313     esac
31314     ;;
31315 esac
31316 ac_cv_make_ntptime=$ans
31317 fi
31318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_make_ntptime" >&5
31319 $as_echo "$ac_cv_make_ntptime" >&6; }
31320 case "$ac_cv_make_ntptime" in
31321  yes)
31322     MAKE_NTPTIME=ntptime
31323     ;;
31324  *)
31325     NTPTIME_DB=
31326     NTPTIME_DL=
31327     NTPTIME_DS=
31328     NTPTIME_MS=
31329     ;;
31330 esac
31331
31332
31333 case "$host" in
31334  mips-sni-sysv4*)
31335     # tickadj is pretty useless on newer versions of ReliantUNIX
31336     # Do not bother
31337     ntp_cv_make_tickadj=no
31338     ;;
31339  *-*-irix*)
31340     ntp_cv_make_tickadj=no
31341     ;;
31342  *-*-solaris2*)
31343     # DLM says tickadj is a no-no starting with solaris2.5
31344     case "$host" in
31345      *-*-solaris2.1[0-9]*)
31346         ntp_cv_make_tickadj=no
31347         ;;
31348      *-*-solaris2.[0-4]*) ;;
31349      *) ntp_cv_make_tickadj=no ;;
31350     esac
31351     ;;
31352  *-*-unicosmp*)
31353     ntp_cv_make_tickadj=no
31354     ;;
31355 esac
31356
31357 #
31358 # Despite all the above, we always make tickadj.  Setting
31359 # ntp_cv_make_tickadj before AC_CACHE_CHECK will cause a false
31360 # report that the configuration variable was cached.  It may
31361 # be better to simply remove the hunk above, I did not want
31362 # to remove it if there is hope it will be used again.
31363 #
31364 { ntp_cv_make_tickadj=; unset ntp_cv_make_tickadj;}
31365
31366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want and can make the tickadj utility" >&5
31367 $as_echo_n "checking if we want and can make the tickadj utility... " >&6; }
31368 if ${ntp_cv_make_tickadj+:} false; then :
31369   $as_echo_n "(cached) " >&6
31370 else
31371   ntp_cv_make_tickadj=yes
31372
31373 fi
31374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_make_tickadj" >&5
31375 $as_echo "$ntp_cv_make_tickadj" >&6; }
31376 case "$ntp_cv_make_tickadj" in
31377  yes)
31378     MAKE_TICKADJ=tickadj
31379     ;;
31380  *)
31381     CALC_TICKADJ_DB=
31382     CALC_TICKADJ_DL=
31383     CALC_TICKADJ_DS=
31384     CALC_TICKADJ_MS=
31385     TICKADJ_DB=
31386     TICKADJ_DL=
31387     TICKADJ_DS=
31388     TICKADJ_MS=
31389     ;;
31390 esac
31391
31392
31393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want and can make the timetrim utility" >&5
31394 $as_echo_n "checking if we want and can make the timetrim utility... " >&6; }
31395 if ${ntp_cv_make_timetrim+:} false; then :
31396   $as_echo_n "(cached) " >&6
31397 else
31398
31399         case "$host" in
31400          *-*-irix*)
31401             ntp_cv_make_timetrim=yes
31402             ;;
31403          *-*-unicosmp*)
31404             ntp_cv_make_timetrim=yes
31405             ;;
31406          *)
31407             ntp_cv_make_timetrim=no
31408             ;;
31409         esac
31410
31411
31412 fi
31413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_make_timetrim" >&5
31414 $as_echo "$ntp_cv_make_timetrim" >&6; }
31415 case "$ntp_cv_make_timetrim" in
31416  yes)
31417     MAKE_TIMETRIM=timetrim
31418     ;;
31419  *) TIMETRIM_DB=
31420     TIMETRIM_DL=
31421     TIMETRIM_DS=
31422     TIMETRIM_MS=
31423     ;;
31424 esac
31425
31426
31427
31428
31429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to build the NTPD simulator" >&5
31430 $as_echo_n "checking if we want to build the NTPD simulator... " >&6; }
31431 # Check whether --enable-simulator was given.
31432 if test "${enable_simulator+set}" = set; then :
31433   enableval=$enable_simulator; ans=$enableval
31434 else
31435   ans=no
31436
31437 fi
31438
31439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31440 $as_echo "$ans" >&6; }
31441 case "$ans" in
31442  yes)
31443     MAKE_NTPDSIM=ntpdsim
31444     MAKE_LIBNTPSIM=libntpsim.a
31445     ;;
31446  *)
31447     NTPDSIM_DB=
31448     NTPDSIM_DL=
31449     NTPDSIM_DS=
31450     NTPDSIM_MS=
31451     ;;
31452 esac
31453
31454 case "$build" in
31455  $host)
31456     ;;
31457  *) case "$host" in
31458      *-*-vxworks*)
31459         LDFLAGS="$LDFLAGS -r"
31460         ;;
31461     esac
31462     ;;
31463 esac
31464
31465
31466
31467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
31468 $as_echo_n "checking if sntp will be built... " >&6; }
31469
31470 # Check whether --with-sntp was given.
31471 if test "${with_sntp+set}" = set; then :
31472   withval=$with_sntp;
31473 else
31474   with_sntp="${withsntp=yes}"
31475
31476 fi
31477
31478 case "$with_sntp" in
31479  no)
31480     SNTP=
31481     ;;
31482  *)
31483     SNTP=sntp
31484     ;;
31485 esac
31486
31487  if test -n "$SNTP"; then
31488   BUILD_SNTP_TRUE=
31489   BUILD_SNTP_FALSE='#'
31490 else
31491   BUILD_SNTP_TRUE='#'
31492   BUILD_SNTP_FALSE=
31493 fi
31494
31495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
31496 $as_echo "$with_sntp" >&6; }
31497
31498
31499
31500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to build ntpsnmpd" >&5
31501 $as_echo_n "checking if we want to build ntpsnmpd... " >&6; }
31502
31503 # Check whether --with-ntpsnmpd was given.
31504 if test "${with_ntpsnmpd+set}" = set; then :
31505   withval=$with_ntpsnmpd; ans=$withval
31506 else
31507
31508         case "$PATH_NET_SNMP_CONFIG" in
31509          /*)    ans=yes ;;
31510          *)     ans=no  ;;
31511         esac
31512
31513
31514 fi
31515
31516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31517 $as_echo "$ans" >&6; }
31518 case "$ans" in
31519  yes)
31520     case "$PATH_NET_SNMP_CONFIG" in
31521      /*)
31522         SNMP_LIBS=`$PATH_NET_SNMP_CONFIG --agent-libs`
31523         # Bug 2815.  This is a bit of a hack, but it works...
31524         case "$ntp_cv_net_snmp_version" in
31525          5.3*)  SNMP_LIBS=`echo $SNMP_LIBS | $SED -e 's/-lnetsnmpagent/-lnetsnmpagent -lnetsnmpmibs/'`
31526                 ;;
31527         esac
31528
31529         # HMS: we really want to separate CPPFLAGS and CFLAGS
31530         foo=`$PATH_NET_SNMP_CONFIG --cflags`
31531         SNMP_CPPFLAGS=
31532         SNMP_CFLAGS=
31533         for i in $foo; do
31534             case "$i" in
31535              -D*|-U*|-I*)
31536                 SNMP_CPPFLAGS="$SNMP_CPPFLAGS $i"
31537                 ;;
31538             *)  SNMP_CFLAGS="$SNMP_CFLAGS $i"
31539                 ;;
31540             esac
31541         done
31542
31543
31544
31545         save_CFLAGS=$CFLAGS
31546         save_CPPFLAGS=$CPPFLAGS
31547         save_LIBS=$LIBS
31548         CFLAGS=$SNMP_CFLAGS
31549         CPPFLAGS=$SNMP_CPPFLAGS
31550
31551         ac_fn_c_check_header_mongrel "$LINENO" "net-snmp/net-snmp-config.h" "ac_cv_header_net_snmp_net_snmp_config_h" "$ac_includes_default"
31552 if test "x$ac_cv_header_net_snmp_net_snmp_config_h" = xyes; then :
31553   MAKE_NTPSNMPD=ntpsnmpd
31554 else
31555   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: net-snmp-config present but net-snmp headers are not available!" >&5
31556 $as_echo "$as_me: WARNING: net-snmp-config present but net-snmp headers are not available!" >&2;}
31557
31558 fi
31559
31560
31561
31562         # Do this last, as we're messing up LIBS.
31563         # check -lnetsnmp for netsnmp_daemonize
31564         LIBS=`$PATH_NET_SNMP_CONFIG --libs`
31565         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for netsnmp_daemonize in -lnetsnmp" >&5
31566 $as_echo_n "checking for netsnmp_daemonize in -lnetsnmp... " >&6; }
31567 if ${ac_cv_lib_netsnmp_netsnmp_daemonize+:} false; then :
31568   $as_echo_n "(cached) " >&6
31569 else
31570   ac_check_lib_save_LIBS=$LIBS
31571 LIBS="-lnetsnmp  $LIBS"
31572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31573 /* end confdefs.h.  */
31574
31575 /* Override any GCC internal prototype to avoid an error.
31576    Use char because int might match the return type of a GCC
31577    builtin and then its argument prototype would still apply.  */
31578 #ifdef __cplusplus
31579 extern "C"
31580 #endif
31581 char netsnmp_daemonize ();
31582 int
31583 main ()
31584 {
31585 return netsnmp_daemonize ();
31586   ;
31587   return 0;
31588 }
31589 _ACEOF
31590 if ac_fn_c_try_link "$LINENO"; then :
31591   ac_cv_lib_netsnmp_netsnmp_daemonize=yes
31592 else
31593   ac_cv_lib_netsnmp_netsnmp_daemonize=no
31594 fi
31595 rm -f core conftest.err conftest.$ac_objext \
31596     conftest$ac_exeext conftest.$ac_ext
31597 LIBS=$ac_check_lib_save_LIBS
31598 fi
31599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netsnmp_netsnmp_daemonize" >&5
31600 $as_echo "$ac_cv_lib_netsnmp_netsnmp_daemonize" >&6; }
31601 if test "x$ac_cv_lib_netsnmp_netsnmp_daemonize" = xyes; then :
31602   ans=yes
31603 else
31604   ans=no
31605
31606 fi
31607
31608         case "$ans" in
31609          no)
31610
31611 $as_echo "#define NEED_NETSNMP_DAEMONIZE 1" >>confdefs.h
31612
31613         esac
31614
31615         CFLAGS=$save_CFLAGS
31616         { save_CFLAGS=; unset save_CFLAGS;}
31617         CPPFLAGS=$save_CPPFLAGS
31618         { save_CPPFLAGS=; unset save_CPPFLAGS;}
31619         LIBS=$save_LIBS
31620         { save_LIBS=; unset save_LIBS;}
31621         ;;
31622      *)
31623         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot build ntpsnmpd - net-snmp-config cannot be found" >&5
31624 $as_echo "$as_me: WARNING: Cannot build ntpsnmpd - net-snmp-config cannot be found" >&2;}
31625         ;;
31626     esac
31627     ;;
31628 esac
31629
31630
31631 case "$MAKE_NTPSNMPD" in
31632  '')
31633     NTPSNMPD_DB=
31634     NTPSNMPD_DL=
31635     NTPSNMPD_DS=
31636     NTPSNMPD_MS=
31637     ;;
31638 esac
31639
31640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should always slew the time" >&5
31641 $as_echo_n "checking if we should always slew the time... " >&6; }
31642
31643 # target-specific defaults
31644
31645 case "$host" in
31646  *-apple-aux[23]*)
31647     ans=yes
31648     ;;
31649  *-*-bsdi[012]*)
31650     ans=no
31651     ;;
31652  *-*-bsdi*)
31653     ans=yes
31654     ;;
31655  *-*-openvms*)  # HMS: won't be found
31656     ans=yes
31657     ;;
31658  *) ans=no
31659     ;;
31660 esac
31661
31662 # --enable-slew-always / --disable-slew-always overrides default
31663
31664 # Check whether --enable-slew-always was given.
31665 if test "${enable_slew_always+set}" = set; then :
31666   enableval=$enable_slew_always; ans=$enableval
31667
31668 fi
31669
31670
31671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31672 $as_echo "$ans" >&6; }
31673
31674 case "$ans" in
31675  yes)
31676
31677 $as_echo "#define SLEWALWAYS 1" >>confdefs.h
31678
31679 esac
31680
31681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should step and slew the time" >&5
31682 $as_echo_n "checking if we should step and slew the time... " >&6; }
31683
31684 case "$host" in
31685  *-sni-sysv*)
31686     ans=yes
31687     ;;
31688  *-stratus-vos)
31689     ans=no
31690     ;;
31691  *-univel-sysv*)
31692     ans=no
31693     ;;
31694  *-*-ptx*)
31695     ans=yes
31696     ;;
31697  *-*-solaris2.1[0-9]*)
31698     ans=no
31699     ;;
31700  *-*-solaris2.[012]*)
31701     ans=yes
31702     ;;
31703  *-*-sysv4*)    # HMS: Does this catch Fujitsu UXP?
31704     ans=yes
31705     ;;
31706  *) ans=no
31707     ;;
31708 esac
31709
31710 # Check whether --enable-step-slew was given.
31711 if test "${enable_step_slew+set}" = set; then :
31712   enableval=$enable_step_slew; ans=$enableval
31713
31714 fi
31715
31716
31717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31718 $as_echo "$ans" >&6; }
31719
31720 case "$ans" in
31721  yes)
31722
31723 $as_echo "#define STEP_SLEW 1" >>confdefs.h
31724
31725 esac
31726
31727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ntpdate should step the time" >&5
31728 $as_echo_n "checking if ntpdate should step the time... " >&6; }
31729
31730 case "$host" in
31731  *-apple-aux[23]*)
31732     ans=yes
31733     ;;
31734  *) ans=no
31735     ;;
31736 esac
31737
31738 # Check whether --enable-ntpdate-step was given.
31739 if test "${enable_ntpdate_step+set}" = set; then :
31740   enableval=$enable_ntpdate_step; ans=$enableval
31741
31742 fi
31743
31744
31745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31746 $as_echo "$ans" >&6; }
31747
31748 case "$ans" in
31749  yes)
31750
31751 $as_echo "#define FORCE_NTPDATE_STEP 1" >>confdefs.h
31752
31753 esac
31754
31755
31756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should sync TODR clock every hour" >&5
31757 $as_echo_n "checking if we should sync TODR clock every hour... " >&6; }
31758
31759 case "$host" in
31760  *-*-nextstep*)
31761     ans=yes
31762     ;;
31763  *-*-openvms*)  # HMS: won't be found
31764     ans=yes
31765     ;;
31766  *)
31767     ans=no
31768     ;;
31769 esac
31770
31771 # Check whether --enable-hourly-todr-sync was given.
31772 if test "${enable_hourly_todr_sync+set}" = set; then :
31773   enableval=$enable_hourly_todr_sync; ans=$enableval
31774
31775 fi
31776
31777
31778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31779 $as_echo "$ans" >&6; }
31780
31781 case "$ac_cv_var_sync_todr" in
31782  yes)
31783
31784 $as_echo "#define DOSYNCTODR 1" >>confdefs.h
31785  ;;
31786 esac
31787
31788
31789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should avoid kernel FLL bug" >&5
31790 $as_echo_n "checking if we should avoid kernel FLL bug... " >&6; }
31791
31792 case "$host" in
31793  *-*-solaris2.6)
31794     unamev=`uname -v`
31795     case "$unamev" in
31796      Generic_105181-*)
31797         old_IFS="$IFS"
31798         IFS="-"
31799         set $unamev
31800         IFS="$old_IFS"
31801         if test "$2" -ge 17
31802         then
31803             # Generic_105181-17 and higher
31804             ans=no
31805         else
31806             ans=yes
31807         fi
31808         ;;
31809      *)
31810         ans=yes
31811         ;;
31812     esac
31813     ;;
31814  *-*-solaris2.7)
31815     unamev=`uname -v`
31816     case "$unamev" in
31817      Generic_106541-*)
31818         old_IFS="$IFS"
31819         IFS="-"
31820         set $unamev
31821         IFS="$old_IFS"
31822         if test "$2" -ge 07
31823         then
31824             # Generic_106541-07 and higher
31825             ans=no
31826         else
31827             ans=yes
31828         fi
31829         ;;
31830      *)
31831         ans=yes
31832         ;;
31833     esac
31834     ;;
31835  *)
31836     ans=no
31837     ;;
31838 esac
31839
31840 # Check whether --enable-kernel-fll-bug was given.
31841 if test "${enable_kernel_fll_bug+set}" = set; then :
31842   enableval=$enable_kernel_fll_bug; ans=$enableval
31843
31844 fi
31845
31846
31847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31848 $as_echo "$ans" >&6; }
31849
31850 case "$ans" in
31851  yes)
31852
31853 $as_echo "#define KERNEL_FLL_BUG 1" >>confdefs.h
31854
31855 esac
31856
31857
31858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want new session key behavior" >&5
31859 $as_echo_n "checking if we want new session key behavior... " >&6; }
31860 # Check whether --enable-bug1243-fix was given.
31861 if test "${enable_bug1243_fix+set}" = set; then :
31862   enableval=$enable_bug1243_fix; ans=$enableval
31863 else
31864   ans=yes
31865
31866 fi
31867
31868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31869 $as_echo "$ans" >&6; }
31870 case "$ans" in
31871  no)
31872
31873 $as_echo "#define DISABLE_BUG1243_FIX 1" >>confdefs.h
31874
31875 esac
31876
31877
31878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want the explicit 127.0.0.0/8 martian filter" >&5
31879 $as_echo_n "checking if we want the explicit 127.0.0.0/8 martian filter... " >&6; }
31880 # Check whether --enable-bug3020-fix was given.
31881 if test "${enable_bug3020_fix+set}" = set; then :
31882   enableval=$enable_bug3020_fix; ans=$enableval
31883 else
31884   ans=yes
31885
31886 fi
31887
31888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31889 $as_echo "$ans" >&6; }
31890 case "$ans" in
31891  yes)
31892
31893 $as_echo "#define ENABLE_BUG3020_FIX 1" >>confdefs.h
31894
31895 esac
31896
31897
31898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use the IRIG sawtooth filter" >&5
31899 $as_echo_n "checking if we should use the IRIG sawtooth filter... " >&6; }
31900
31901 case "$host" in
31902  *-*-solaris2.[89])
31903     ans=yes
31904     ;;
31905  *-*-solaris2.1[0-9]*)
31906     ans=yes
31907     ;;
31908  *) ans=no
31909     ;;
31910 esac
31911
31912 # Check whether --enable-irig-sawtooth was given.
31913 if test "${enable_irig_sawtooth+set}" = set; then :
31914   enableval=$enable_irig_sawtooth; ans=$enableval
31915
31916 fi
31917
31918
31919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31920 $as_echo "$ans" >&6; }
31921
31922 case "$ans" in
31923  yes)
31924
31925 $as_echo "#define IRIG_SUCKS 1" >>confdefs.h
31926
31927 esac
31928
31929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should enable NIST lockclock scheme" >&5
31930 $as_echo_n "checking if we should enable NIST lockclock scheme... " >&6; }
31931 # Check whether --enable-nist was given.
31932 if test "${enable_nist+set}" = set; then :
31933   enableval=$enable_nist; ans=$enableval
31934 else
31935   ans=no
31936
31937 fi
31938
31939
31940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31941 $as_echo "$ans" >&6; }
31942
31943 case "$ans" in
31944  yes)
31945
31946 $as_echo "#define LOCKCLOCK 1" >>confdefs.h
31947  ;;
31948 esac
31949
31950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want support for Samba's signing daemon" >&5
31951 $as_echo_n "checking if we want support for Samba's signing daemon... " >&6; }
31952 # Check whether --enable-ntp-signd was given.
31953 if test "${enable_ntp_signd+set}" = set; then :
31954   enableval=$enable_ntp_signd; ans=$enableval
31955 else
31956   ans=no
31957
31958 fi
31959
31960
31961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31962 $as_echo "$ans" >&6; }
31963
31964 case "$ans" in
31965  no)
31966     ntp_signd_path=
31967     ;;
31968  yes)
31969     ntp_signd_path=/var/run/ntp_signd
31970     ;;
31971  *)
31972     ntp_signd_path="$ans"
31973 esac
31974
31975 case "$ntp_signd_path" in
31976  '')
31977     ;;
31978  *)
31979
31980 $as_echo "#define HAVE_NTP_SIGND 1" >>confdefs.h
31981
31982
31983 cat >>confdefs.h <<_ACEOF
31984 #define NTP_SIGND_PATH "$ntp_signd_path"
31985 _ACEOF
31986
31987     ;;
31988 esac
31989
31990 for ac_header in libscf.h
31991 do :
31992   ac_fn_c_check_header_mongrel "$LINENO" "libscf.h" "ac_cv_header_libscf_h" "$ac_includes_default"
31993 if test "x$ac_cv_header_libscf_h" = xyes; then :
31994   cat >>confdefs.h <<_ACEOF
31995 #define HAVE_LIBSCF_H 1
31996 _ACEOF
31997
31998 fi
31999
32000 done
32001
32002 LSCF=
32003 case "$ac_cv_header_libscf_h" in
32004  yes)
32005     LSCF='-lscf'
32006 esac
32007
32008
32009
32010
32011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
32012 $as_echo_n "checking for struct sockaddr_storage... " >&6; }
32013 if ${ntp_cv_sockaddr_storage+:} false; then :
32014   $as_echo_n "(cached) " >&6
32015 else
32016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32017 /* end confdefs.h.  */
32018
32019                 #ifdef HAVE_SYS_TYPES_H
32020                 # include <sys/types.h>
32021                 #endif
32022                 #ifdef HAVE_SYS_SOCKET_H
32023                 # include <sys/socket.h>
32024                 #endif
32025                 #ifdef HAVE_NETINET_IN_H
32026                 # include <netinet/in.h>
32027                 #endif
32028
32029 int
32030 main ()
32031 {
32032
32033                 struct sockaddr_storage n;
32034
32035
32036   ;
32037   return 0;
32038 }
32039 _ACEOF
32040 if ac_fn_c_try_compile "$LINENO"; then :
32041   ntp_cv_sockaddr_storage=yes
32042 else
32043   ntp_cv_sockaddr_storage=no
32044
32045 fi
32046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32047
32048 fi
32049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
32050 $as_echo "$ntp_cv_sockaddr_storage" >&6; }
32051 case "$ntp_cv_sockaddr_storage" in
32052  yes)
32053
32054 $as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
32055
32056     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
32057 $as_echo_n "checking for sockaddr_storage.__ss_family... " >&6; }
32058 if ${ntp_cv_have___ss_family+:} false; then :
32059   $as_echo_n "(cached) " >&6
32060 else
32061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32062 /* end confdefs.h.  */
32063
32064                     #ifdef HAVE_SYS_TYPES_H
32065                     # include <sys/types.h>
32066                     #endif
32067                     #ifdef HAVE_SYS_SOCKET_H
32068                     # include <sys/socket.h>
32069                     #endif
32070                     #ifdef HAVE_NETINET_IN_H
32071                     # include <netinet/in.h>
32072                     #endif
32073
32074 int
32075 main ()
32076 {
32077
32078                     struct sockaddr_storage s;
32079                     s.__ss_family = 1;
32080
32081
32082   ;
32083   return 0;
32084 }
32085 _ACEOF
32086 if ac_fn_c_try_compile "$LINENO"; then :
32087   ntp_cv_have___ss_family=yes
32088 else
32089   ntp_cv_have___ss_family=no
32090
32091 fi
32092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32093
32094 fi
32095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
32096 $as_echo "$ntp_cv_have___ss_family" >&6; }
32097     case "$ntp_cv_have___ss_family" in
32098      yes)
32099
32100 $as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
32101
32102     esac
32103
32104 esac
32105
32106
32107 #
32108 # Look for in_port_t.
32109 #
32110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
32111 $as_echo_n "checking for in_port_t... " >&6; }
32112 if ${isc_cv_have_in_port_t+:} false; then :
32113   $as_echo_n "(cached) " >&6
32114 else
32115   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32116 /* end confdefs.h.  */
32117
32118                 #include <sys/types.h>
32119                 #include <netinet/in.h>
32120
32121 int
32122 main ()
32123 {
32124
32125                 in_port_t port = 25;
32126                 return (0);
32127
32128
32129   ;
32130   return 0;
32131 }
32132 _ACEOF
32133 if ac_fn_c_try_compile "$LINENO"; then :
32134   isc_cv_have_in_port_t=yes
32135 else
32136   isc_cv_have_in_port_t=no
32137
32138 fi
32139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32140
32141 fi
32142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
32143 $as_echo "$isc_cv_have_in_port_t" >&6; }
32144 case "$isc_cv_have_in_port_t" in
32145  no)
32146
32147 $as_echo "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
32148
32149 esac
32150
32151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
32152 $as_echo_n "checking type of socklen arg for getsockname()... " >&6; }
32153 if ${ntp_cv_getsockname_socklen_type+:} false; then :
32154   $as_echo_n "(cached) " >&6
32155 else
32156
32157     getsockname_socklen_type_found=no
32158     for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
32159         for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
32160             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32161 /* end confdefs.h.  */
32162
32163                         #ifdef HAVE_SYS_TYPES_H
32164                         # include <sys/types.h>
32165                         #endif
32166                         #ifdef HAVE_SYS_SOCKET_H
32167                         # include <sys/socket.h>
32168                         #endif
32169
32170 int
32171 main ()
32172 {
32173
32174                         extern
32175                         getsockname(int, $getsockname_arg2,
32176                                 $ntp_cv_getsockname_socklen_type *);
32177
32178
32179   ;
32180   return 0;
32181 }
32182 _ACEOF
32183 if ac_fn_c_try_compile "$LINENO"; then :
32184   getsockname_socklen_type_found=yes ; break 2
32185 fi
32186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32187         done
32188     done
32189     case "$getsockname_socklen_type_found" in
32190      no)
32191         ntp_cv_getsockname_socklen_type='socklen_t'
32192     esac
32193     { getsockname_arg2=; unset getsockname_arg2;}
32194     { getsockname_socklen_type_found=; unset getsockname_socklen_type_found;}
32195
32196
32197 fi
32198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
32199 $as_echo "$ntp_cv_getsockname_socklen_type" >&6; }
32200
32201 cat >>confdefs.h <<_ACEOF
32202 #define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type
32203 _ACEOF
32204
32205
32206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
32207 $as_echo_n "checking struct sockaddr for sa_len... " >&6; }
32208 if ${isc_cv_platform_havesalen+:} false; then :
32209   $as_echo_n "(cached) " >&6
32210 else
32211   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32212 /* end confdefs.h.  */
32213
32214                 #include <sys/types.h>
32215                 #include <sys/socket.h>
32216
32217 int
32218 main ()
32219 {
32220
32221                 extern struct sockaddr *ps;
32222                 return ps->sa_len;
32223
32224
32225   ;
32226   return 0;
32227 }
32228 _ACEOF
32229 if ac_fn_c_try_compile "$LINENO"; then :
32230   isc_cv_platform_havesalen=yes
32231 else
32232   isc_cv_platform_havesalen=no
32233
32234 fi
32235 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32236
32237 fi
32238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_platform_havesalen" >&5
32239 $as_echo "$isc_cv_platform_havesalen" >&6; }
32240 case "$isc_cv_platform_havesalen" in
32241  yes)
32242
32243 $as_echo "#define ISC_PLATFORM_HAVESALEN 1" >>confdefs.h
32244
32245 esac
32246
32247 # Check whether --enable-ipv6 was given.
32248 if test "${enable_ipv6+set}" = set; then :
32249   enableval=$enable_ipv6;
32250 fi
32251
32252
32253 case "$enable_ipv6" in
32254  yes|''|autodetect)
32255     case "$host" in
32256      powerpc-ibm-aix4*)
32257         ;;
32258      *)
32259
32260 $as_echo "#define WANT_IPV6 1" >>confdefs.h
32261
32262         ;;
32263     esac
32264     ;;
32265  no)
32266     ;;
32267 esac
32268
32269
32270 case "$host" in
32271  *-*-darwin*)
32272
32273 $as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
32274
32275 esac
32276
32277
32278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5
32279 $as_echo_n "checking for IPv6 structures... " >&6; }
32280 if ${isc_cv_found_ipv6+:} false; then :
32281   $as_echo_n "(cached) " >&6
32282 else
32283   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32284 /* end confdefs.h.  */
32285
32286                 #include <sys/types.h>
32287                 #include <sys/socket.h>
32288                 #include <netinet/in.h>
32289
32290 int
32291 main ()
32292 {
32293
32294                 struct sockaddr_in6 sin6;
32295
32296
32297   ;
32298   return 0;
32299 }
32300 _ACEOF
32301 if ac_fn_c_try_compile "$LINENO"; then :
32302   isc_cv_found_ipv6=yes
32303 else
32304   isc_cv_found_ipv6=no
32305
32306 fi
32307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32308
32309 fi
32310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_found_ipv6" >&5
32311 $as_echo "$isc_cv_found_ipv6" >&6; }
32312
32313 #
32314 # See whether IPv6 support is provided via a Kame add-on.
32315 # This is done before other IPv6 linking tests so LIBS is properly set.
32316 #
32317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kame IPv6 support" >&5
32318 $as_echo_n "checking for Kame IPv6 support... " >&6; }
32319
32320 # Check whether --with-kame was given.
32321 if test "${with_kame+set}" = set; then :
32322   withval=$with_kame; use_kame="$withval"
32323 else
32324   use_kame="no"
32325
32326 fi
32327
32328 case "$use_kame" in
32329  no)
32330     ;;
32331  yes)
32332     kame_path=/usr/local/v6
32333     ;;
32334  *)
32335     kame_path="$use_kame"
32336     ;;
32337 esac
32338 case "$use_kame" in
32339  no)
32340     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32341 $as_echo "no" >&6; }
32342     ;;
32343  *)
32344     if test -f $kame_path/lib/libinet6.a; then
32345         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kame_path/lib/libinet6.a" >&5
32346 $as_echo "$kame_path/lib/libinet6.a" >&6; }
32347         LIBS="-L$kame_path/lib -linet6 $LIBS"
32348     else
32349         as_fn_error $? "$kame_path/lib/libinet6.a not found.
32350
32351 Please choose the proper path with the following command:
32352
32353     configure --with-kame=PATH
32354 " "$LINENO" 5
32355     fi
32356     ;;
32357 esac
32358
32359 #
32360 # Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
32361 # Including it on Kame-using platforms is very bad, though, because
32362 # Kame uses #error against direct inclusion.   So include it on only
32363 # the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
32364 # This is done before the in6_pktinfo check because that's what
32365 # netinet6/in6.h is needed for.
32366 #
32367 case "$host" in
32368  *-bsdi4.[01]*)
32369
32370 $as_echo "#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >>confdefs.h
32371
32372     isc_netinet6in6_hack="#include <netinet6/in6.h>"
32373     ;;
32374  *)
32375     isc_netinet6in6_hack=""
32376     ;;
32377 esac
32378
32379 #
32380 # This is similar to the netinet6/in6.h issue.
32381 #
32382 case "$host" in
32383  *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
32384
32385 $as_echo "#define ISC_PLATFORM_FIXIN6ISADDR 1" >>confdefs.h
32386
32387     isc_netinetin6_hack="#include <netinet/in6.h>"
32388     ;;
32389  *)
32390     isc_netinetin6_hack=""
32391     ;;
32392 esac
32393
32394
32395 case "$isc_cv_found_ipv6" in
32396  yes)
32397
32398 $as_echo "#define ISC_PLATFORM_HAVEIPV6 1" >>confdefs.h
32399
32400     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
32401 $as_echo_n "checking for in6_pktinfo... " >&6; }
32402 if ${isc_cv_have_in6_pktinfo+:} false; then :
32403   $as_echo_n "(cached) " >&6
32404 else
32405   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32406 /* end confdefs.h.  */
32407
32408                     #include <sys/types.h>
32409                     #include <sys/socket.h>
32410                     #include <netinet/in.h>
32411                     $isc_netinetin6_hack
32412                     $isc_netinet6in6_hack
32413
32414 int
32415 main ()
32416 {
32417
32418                     struct in6_pktinfo xyzzy;
32419
32420
32421   ;
32422   return 0;
32423 }
32424 _ACEOF
32425 if ac_fn_c_try_compile "$LINENO"; then :
32426   isc_cv_have_in6_pktinfo=yes
32427 else
32428   isc_cv_have_in6_pktinfo=no
32429
32430 fi
32431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32432
32433 fi
32434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6_pktinfo" >&5
32435 $as_echo "$isc_cv_have_in6_pktinfo" >&6; }
32436     case "$isc_cv_have_in6_pktinfo" in
32437      yes)
32438
32439 $as_echo "#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >>confdefs.h
32440
32441     esac
32442
32443
32444     # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
32445     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_in6.sin6_scope_id" >&5
32446 $as_echo_n "checking for sockaddr_in6.sin6_scope_id... " >&6; }
32447 if ${isc_cv_have_sin6_scope_id+:} false; then :
32448   $as_echo_n "(cached) " >&6
32449 else
32450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32451 /* end confdefs.h.  */
32452
32453                     #include <sys/types.h>
32454                     #include <sys/socket.h>
32455                     #include <netinet/in.h>
32456                     $isc_netinetin6_hack
32457                     $isc_netinet6in6_hack
32458
32459 int
32460 main ()
32461 {
32462
32463                     struct sockaddr_in6 xyzzy;
32464                     xyzzy.sin6_scope_id = 0;
32465
32466
32467   ;
32468   return 0;
32469 }
32470 _ACEOF
32471 if ac_fn_c_try_compile "$LINENO"; then :
32472   isc_cv_have_sin6_scope_id=yes
32473 else
32474   isc_cv_have_sin6_scope_id=no
32475
32476 fi
32477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32478
32479 fi
32480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_sin6_scope_id" >&5
32481 $as_echo "$isc_cv_have_sin6_scope_id" >&6; }
32482
32483     case "$isc_cv_have_sin6_scope_id" in
32484      yes)
32485
32486 $as_echo "#define ISC_PLATFORM_HAVESCOPEID 1" >>confdefs.h
32487
32488     esac
32489 esac
32490
32491
32492 # We need this check run even without isc_cv_found_ipv6=yes
32493
32494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
32495 $as_echo_n "checking for in6addr_any... " >&6; }
32496 if ${isc_cv_in6addr_any_links+:} false; then :
32497   $as_echo_n "(cached) " >&6
32498 else
32499
32500         SAVED_LIBS="$LIBS"
32501         LIBS="$LDADD_LIBNTP $LIBS"
32502         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32503 /* end confdefs.h.  */
32504 $ac_includes_default
32505                     #include <sys/socket.h>
32506                     #include <netinet/in.h>
32507                     $isc_netinetin6_hack
32508                     $isc_netinet6in6_hack
32509
32510 int
32511 main ()
32512 {
32513
32514                     printf("%x", in6addr_any.s6_addr[15]);
32515
32516
32517   ;
32518   return 0;
32519 }
32520 _ACEOF
32521 if ac_fn_c_try_link "$LINENO"; then :
32522   isc_cv_in6addr_any_links=yes
32523 else
32524   isc_cv_in6addr_any_links=no
32525
32526 fi
32527 rm -f core conftest.err conftest.$ac_objext \
32528     conftest$ac_exeext conftest.$ac_ext
32529         LIBS="$SAVED_LIBS"
32530         { SAVED_LIBS=; unset SAVED_LIBS;}
32531
32532
32533 fi
32534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
32535 $as_echo "$isc_cv_in6addr_any_links" >&6; }
32536
32537 case "$isc_cv_in6addr_any_links" in
32538  no)
32539
32540 $as_echo "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
32541
32542 esac
32543
32544
32545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5
32546 $as_echo_n "checking for struct if_laddrconf... " >&6; }
32547 if ${isc_cv_struct_if_laddrconf+:} false; then :
32548   $as_echo_n "(cached) " >&6
32549 else
32550   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32551 /* end confdefs.h.  */
32552
32553                 #include <sys/types.h>
32554                 #include <net/if6.h>
32555
32556 int
32557 main ()
32558 {
32559
32560                 struct if_laddrconf a;
32561
32562
32563   ;
32564   return 0;
32565 }
32566 _ACEOF
32567 if ac_fn_c_try_compile "$LINENO"; then :
32568   isc_cv_struct_if_laddrconf=yes
32569 else
32570   isc_cv_struct_if_laddrconf=no
32571
32572 fi
32573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32574
32575 fi
32576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrconf" >&5
32577 $as_echo "$isc_cv_struct_if_laddrconf" >&6; }
32578
32579 case "$isc_cv_struct_if_laddrconf" in
32580  yes)
32581
32582 $as_echo "#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" >>confdefs.h
32583
32584 esac
32585
32586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
32587 $as_echo_n "checking for struct if_laddrreq... " >&6; }
32588 if ${isc_cv_struct_if_laddrreq+:} false; then :
32589   $as_echo_n "(cached) " >&6
32590 else
32591   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32592 /* end confdefs.h.  */
32593
32594                 #include <sys/types.h>
32595                 #include <net/if6.h>
32596
32597 int
32598 main ()
32599 {
32600
32601                 struct if_laddrreq a;
32602
32603
32604   ;
32605   return 0;
32606 }
32607 _ACEOF
32608 if ac_fn_c_try_compile "$LINENO"; then :
32609   isc_cv_struct_if_laddrreq=yes
32610 else
32611   isc_cv_struct_if_laddrreq=no
32612
32613 fi
32614 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32615
32616 fi
32617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrreq" >&5
32618 $as_echo "$isc_cv_struct_if_laddrreq" >&6; }
32619
32620 case "$isc_cv_struct_if_laddrreq" in
32621  yes)
32622
32623 $as_echo "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
32624
32625 esac
32626
32627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
32628 $as_echo_n "checking for multicast IP support... " >&6; }
32629 if ${ntp_cv_multicast+:} false; then :
32630   $as_echo_n "(cached) " >&6
32631 else
32632
32633         ntp_cv_multicast=no
32634         case "$host" in
32635          i386-sequent-sysv4)
32636             ;;
32637          *)
32638             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32639 /* end confdefs.h.  */
32640
32641                         #ifdef HAVE_NETINET_IN_H
32642                         # include <netinet/in.h>
32643                         #endif
32644
32645 int
32646 main ()
32647 {
32648
32649                         struct ip_mreq ipmr;
32650                         ipmr.imr_interface.s_addr = 0;
32651
32652
32653   ;
32654   return 0;
32655 }
32656 _ACEOF
32657 if ac_fn_c_try_compile "$LINENO"; then :
32658   ntp_cv_multicast=yes
32659 fi
32660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32661             ;;
32662         esac
32663
32664
32665 fi
32666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
32667 $as_echo "$ntp_cv_multicast" >&6; }
32668 case "$ntp_cv_multicast" in
32669  yes)
32670
32671 $as_echo "#define MCAST 1" >>confdefs.h
32672
32673     { $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
32674 $as_echo_n "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
32675 if ${ntp_cv_typeof_ip_multicast_loop+:} false; then :
32676   $as_echo_n "(cached) " >&6
32677 else
32678
32679             case "$host" in
32680              *-*-netbsd*|*-*-*linux*)
32681                 ntp_cv_typeof_ip_multicast_loop=u_int
32682                 ;;
32683              *)
32684                 ntp_cv_typeof_ip_multicast_loop=u_char
32685                 ;;
32686             esac
32687
32688
32689 fi
32690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
32691 $as_echo "$ntp_cv_typeof_ip_multicast_loop" >&6; }
32692
32693 cat >>confdefs.h <<_ACEOF
32694 #define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop
32695 _ACEOF
32696
32697 esac
32698
32699 # Check whether --enable-getifaddrs was given.
32700 if test "${enable_getifaddrs+set}" = set; then :
32701   enableval=$enable_getifaddrs; want_getifaddrs="$enableval"
32702 else
32703   want_getifaddrs="yes"
32704
32705 fi
32706
32707
32708 case $want_getifaddrs in
32709  glibc)
32710     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
32711 $as_echo "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
32712 esac
32713 case $want_getifaddrs in
32714  no)
32715     ;;
32716  *)
32717     SAVED_LIBS="$LIBS"
32718     LIBS="$LDADD_LIBNTP $LIBS"
32719     for ac_func in getifaddrs
32720 do :
32721   ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
32722 if test "x$ac_cv_func_getifaddrs" = xyes; then :
32723   cat >>confdefs.h <<_ACEOF
32724 #define HAVE_GETIFADDRS 1
32725 _ACEOF
32726
32727 fi
32728 done
32729
32730     LIBS="$SAVED_LIBS"
32731     { SAVED_LIBS=; unset SAVED_LIBS;}
32732     ;;
32733 esac
32734
32735 #
32736 # Check for if_nametoindex() for IPv6 scoped addresses support
32737 #
32738 case "$host" in
32739  *-hp-hpux*)
32740     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
32741 $as_echo_n "checking for library containing if_nametoindex... " >&6; }
32742 if ${ac_cv_search_if_nametoindex+:} false; then :
32743   $as_echo_n "(cached) " >&6
32744 else
32745   ac_func_search_save_LIBS=$LIBS
32746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32747 /* end confdefs.h.  */
32748
32749 /* Override any GCC internal prototype to avoid an error.
32750    Use char because int might match the return type of a GCC
32751    builtin and then its argument prototype would still apply.  */
32752 #ifdef __cplusplus
32753 extern "C"
32754 #endif
32755 char if_nametoindex ();
32756 int
32757 main ()
32758 {
32759 return if_nametoindex ();
32760   ;
32761   return 0;
32762 }
32763 _ACEOF
32764 for ac_lib in '' ipv6; do
32765   if test -z "$ac_lib"; then
32766     ac_res="none required"
32767   else
32768     ac_res=-l$ac_lib
32769     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
32770   fi
32771   if ac_fn_c_try_link "$LINENO"; then :
32772   ac_cv_search_if_nametoindex=$ac_res
32773 fi
32774 rm -f core conftest.err conftest.$ac_objext \
32775     conftest$ac_exeext
32776   if ${ac_cv_search_if_nametoindex+:} false; then :
32777   break
32778 fi
32779 done
32780 if ${ac_cv_search_if_nametoindex+:} false; then :
32781
32782 else
32783   ac_cv_search_if_nametoindex=no
32784 fi
32785 rm conftest.$ac_ext
32786 LIBS=$ac_func_search_save_LIBS
32787 fi
32788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
32789 $as_echo "$ac_cv_search_if_nametoindex" >&6; }
32790 ac_res=$ac_cv_search_if_nametoindex
32791 if test "$ac_res" != no; then :
32792   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32793
32794 fi
32795
32796 esac
32797 SAVED_LIBS="$LIBS"
32798 LIBS="$LDADD_LIBNTP $LIBS"
32799 for ac_func in if_nametoindex
32800 do :
32801   ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
32802 if test "x$ac_cv_func_if_nametoindex" = xyes; then :
32803   cat >>confdefs.h <<_ACEOF
32804 #define HAVE_IF_NAMETOINDEX 1
32805 _ACEOF
32806
32807 fi
32808 done
32809
32810 LIBS="$SAVED_LIBS"
32811 { SAVED_LIBS=; unset SAVED_LIBS;}
32812 case "$ac_cv_func_if_nametoindex" in
32813  yes)
32814
32815 $as_echo "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
32816
32817 esac
32818
32819
32820
32821
32822 #
32823 # Look for a sysctl call to get the list of network interfaces.
32824 #
32825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for interface list sysctl" >&5
32826 $as_echo_n "checking for interface list sysctl... " >&6; }
32827 if ${ntp_cv_iflist_sysctl+:} false; then :
32828   $as_echo_n "(cached) " >&6
32829 else
32830   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32831 /* end confdefs.h.  */
32832
32833             #include <sys/param.h>
32834             #include <sys/sysctl.h>
32835             #include <sys/socket.h>
32836             #ifndef NET_RT_IFLIST
32837             # error
32838             #endif
32839
32840 _ACEOF
32841 if ac_fn_c_try_cpp "$LINENO"; then :
32842   ntp_cv_iflist_sysctl=yes
32843 else
32844   ntp_cv_iflist_sysctl=no
32845
32846 fi
32847 rm -f conftest.err conftest.i conftest.$ac_ext
32848
32849 fi
32850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_iflist_sysctl" >&5
32851 $as_echo "$ntp_cv_iflist_sysctl" >&6; }
32852 case "$ntp_cv_iflist_sysctl" in
32853  yes)
32854
32855 $as_echo "#define HAVE_IFLIST_SYSCTL 1" >>confdefs.h
32856
32857 esac
32858
32859 ###
32860
32861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want the saveconfig mechanism" >&5
32862 $as_echo_n "checking if we want the saveconfig mechanism... " >&6; }
32863 # Check whether --enable-saveconfig was given.
32864 if test "${enable_saveconfig+set}" = set; then :
32865   enableval=$enable_saveconfig; ntp_ok=$enableval
32866 else
32867   ntp_ok=yes
32868
32869 fi
32870
32871 ntp_saveconfig_enabled=0
32872 case "$ntp_ok" in
32873  yes)
32874     ntp_saveconfig_enabled=1
32875
32876 $as_echo "#define SAVECONFIG 1" >>confdefs.h
32877
32878     ;;
32879 esac
32880  if test x$ntp_saveconfig_enabled = x1; then
32881   SAVECONFIG_ENABLED_TRUE=
32882   SAVECONFIG_ENABLED_FALSE='#'
32883 else
32884   SAVECONFIG_ENABLED_TRUE='#'
32885   SAVECONFIG_ENABLED_FALSE=
32886 fi
32887
32888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
32889 $as_echo "$ntp_ok" >&6; }
32890
32891 ###
32892
32893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want the experimental leap smear code" >&5
32894 $as_echo_n "checking if we want the experimental leap smear code... " >&6; }
32895 # Check whether --enable-leap-smear was given.
32896 if test "${enable_leap_smear+set}" = set; then :
32897   enableval=$enable_leap_smear; ntp_ok=$enableval
32898 else
32899   ntp_ok=no
32900
32901 fi
32902
32903 ntp_leap_smear_enabled=0
32904 case "$ntp_ok" in
32905  yes)
32906     ntp_leap_smear_enabled=1
32907
32908 $as_echo "#define LEAP_SMEAR 1" >>confdefs.h
32909
32910
32911     HAVE_LEAPSMEARINTERVAL="leapsmearinterval 0"
32912     ;;
32913 esac
32914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
32915 $as_echo "$ntp_ok" >&6; }
32916
32917 ###
32918
32919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want dynamic interleave support" >&5
32920 $as_echo_n "checking if we want dynamic interleave support... " >&6; }
32921 # Check whether --enable-dynamic-interleave was given.
32922 if test "${enable_dynamic_interleave+set}" = set; then :
32923   enableval=$enable_dynamic_interleave; ntp_ok=$enableval
32924 else
32925   ntp_ok=no
32926
32927 fi
32928
32929 ntp_dynamic_interleave=0
32930 case "$ntp_ok" in
32931  yes)
32932     ntp_dynamic_interleave=1
32933     ;;
32934 esac
32935
32936 cat >>confdefs.h <<_ACEOF
32937 #define DYNAMIC_INTERLEAVE $ntp_dynamic_interleave
32938 _ACEOF
32939
32940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
32941 $as_echo "$ntp_ok" >&6; }
32942
32943
32944 # We may not need have_unity
32945 have_unity=false
32946 # Extract the first word of "ruby", so it can be a program name with args.
32947 set dummy ruby; ac_word=$2
32948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32949 $as_echo_n "checking for $ac_word... " >&6; }
32950 if ${ac_cv_path_PATH_RUBY+:} false; then :
32951   $as_echo_n "(cached) " >&6
32952 else
32953   case $PATH_RUBY in
32954   [\\/]* | ?:[\\/]*)
32955   ac_cv_path_PATH_RUBY="$PATH_RUBY" # Let the user override the test with a path.
32956   ;;
32957   *)
32958   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32959 for as_dir in $PATH
32960 do
32961   IFS=$as_save_IFS
32962   test -z "$as_dir" && as_dir=.
32963     for ac_exec_ext in '' $ac_executable_extensions; do
32964   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32965     ac_cv_path_PATH_RUBY="$as_dir/$ac_word$ac_exec_ext"
32966     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32967     break 2
32968   fi
32969 done
32970   done
32971 IFS=$as_save_IFS
32972
32973   ;;
32974 esac
32975 fi
32976 PATH_RUBY=$ac_cv_path_PATH_RUBY
32977 if test -n "$PATH_RUBY"; then
32978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_RUBY" >&5
32979 $as_echo "$PATH_RUBY" >&6; }
32980 else
32981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32982 $as_echo "no" >&6; }
32983 fi
32984
32985
32986 case "$PATH_RUBY" in
32987  /*)
32988     have_unity=true
32989     ;;
32990  *) PATH_RUBY="false"
32991     ;;
32992 esac
32993 # We may not need UNITYBUILD_AVAILABLE
32994  if $have_unity; then
32995   UNITYBUILD_AVAILABLE_TRUE=
32996   UNITYBUILD_AVAILABLE_FALSE='#'
32997 else
32998   UNITYBUILD_AVAILABLE_TRUE='#'
32999   UNITYBUILD_AVAILABLE_FALSE=
33000 fi
33001
33002
33003
33004
33005
33006 gta=false
33007
33008 # Check whether --with-gtest was given.
33009 if test "${with_gtest+set}" = set; then :
33010   withval=$with_gtest; try_gtest=$withval
33011 else
33012   try_gtest=yes
33013
33014 fi
33015
33016 case "$try_gtest" in
33017  yes)
33018     # Extract the first word of "gtest-config", so it can be a program name with args.
33019 set dummy gtest-config; ac_word=$2
33020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33021 $as_echo_n "checking for $ac_word... " >&6; }
33022 if ${ac_cv_path_GTEST_CONFIG+:} false; then :
33023   $as_echo_n "(cached) " >&6
33024 else
33025   case $GTEST_CONFIG in
33026   [\\/]* | ?:[\\/]*)
33027   ac_cv_path_GTEST_CONFIG="$GTEST_CONFIG" # Let the user override the test with a path.
33028   ;;
33029   *)
33030   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33031 for as_dir in $PATH
33032 do
33033   IFS=$as_save_IFS
33034   test -z "$as_dir" && as_dir=.
33035     for ac_exec_ext in '' $ac_executable_extensions; do
33036   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33037     ac_cv_path_GTEST_CONFIG="$as_dir/$ac_word$ac_exec_ext"
33038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33039     break 2
33040   fi
33041 done
33042   done
33043 IFS=$as_save_IFS
33044
33045   ;;
33046 esac
33047 fi
33048 GTEST_CONFIG=$ac_cv_path_GTEST_CONFIG
33049 if test -n "$GTEST_CONFIG"; then
33050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTEST_CONFIG" >&5
33051 $as_echo "$GTEST_CONFIG" >&6; }
33052 else
33053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33054 $as_echo "no" >&6; }
33055 fi
33056
33057
33058     { ac_cv_path_GTEST_CONFIG=; unset ac_cv_path_GTEST_CONFIG;}
33059     case x${GTEST_CONFIG} in
33060      x) ;;
33061      *)
33062         { $as_echo "$as_me:${as_lineno-$LINENO}: checking gtest version" >&5
33063 $as_echo_n "checking gtest version... " >&6; }
33064         gtest_version_test=`$GTEST_CONFIG --min-version=1.5 || echo toolow`
33065         case "$gtest_version_test" in
33066          toolow*)
33067             ;;
33068          *)
33069             GTEST_LDFLAGS=`$GTEST_CONFIG --ldflags`
33070             GTEST_LIBS=`$GTEST_CONFIG --libs`
33071             GTEST_CXXFLAGS=`$GTEST_CONFIG --cxxflags`
33072             GTEST_CPPFLAGS=`$GTEST_CONFIG --cppflags`
33073
33074
33075
33076
33077             gta=true
33078             ;;
33079         esac
33080         gtest_version=`$GTEST_CONFIG --version`
33081         case "$gta" in
33082          true)
33083             { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($gtest_version) ok" >&5
33084 $as_echo "($gtest_version) ok" >&6; }
33085             ;;
33086          *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($gtest_version) not ok" >&5
33087 $as_echo "($gtest_version) not ok" >&6; }
33088             ;;
33089         esac
33090         { gtest_version_test=; unset gtest_version_test;}
33091         { gtest_version=; unset gtest_version;}
33092     esac
33093 esac
33094  if $gta; then
33095   GTEST_AVAILABLE_TRUE=
33096   GTEST_AVAILABLE_FALSE='#'
33097 else
33098   GTEST_AVAILABLE_TRUE='#'
33099   GTEST_AVAILABLE_FALSE=
33100 fi
33101
33102
33103
33104
33105
33106 case "$build" in
33107  $host) cross=0 ;;
33108  *)     cross=1 ;;
33109 esac
33110
33111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to enable tests with undiagnosed problems" >&5
33112 $as_echo_n "checking if we want to enable tests with undiagnosed problems... " >&6; }
33113 # Check whether --enable-problem-tests was given.
33114 if test "${enable_problem_tests+set}" = set; then :
33115   enableval=$enable_problem_tests; ntp_ept=$enableval
33116 else
33117   ntp_ept=yes
33118
33119 fi
33120
33121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ept" >&5
33122 $as_echo "$ntp_ept" >&6; }
33123
33124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_restrict" >&5
33125 $as_echo_n "checking if we can run test-ntp_restrict... " >&6; }
33126 ntp_test_ntp_restrict="no"
33127 case "$ntp_ept:$cross:$host" in
33128  no:0:*-*-freebsd6.4) ;;
33129  no:0:*-*-hpux11.23*) ;;
33130  no:0:*-*-solaris*) ;;
33131  *) ntp_test_ntp_restrict="yes" ;;
33132 esac
33133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_restrict" >&5
33134 $as_echo "$ntp_test_ntp_restrict" >&6; }
33135  if test x$ntp_test_ntp_restrict = xyes; then
33136   BUILD_TEST_NTP_RESTRICT_TRUE=
33137   BUILD_TEST_NTP_RESTRICT_FALSE='#'
33138 else
33139   BUILD_TEST_NTP_RESTRICT_TRUE='#'
33140   BUILD_TEST_NTP_RESTRICT_FALSE=
33141 fi
33142
33143
33144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_scanner" >&5
33145 $as_echo_n "checking if we can run test-ntp_scanner... " >&6; }
33146 ntp_test_ntp_scanner="no"
33147 case "$ntp_ept:$cross:$host" in
33148  no:0:*-*-freebsd6.4) ;;
33149  no:0:*-*-solaris*) ;;
33150  *) ntp_test_ntp_scanner="yes" ;;
33151 esac
33152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_scanner" >&5
33153 $as_echo "$ntp_test_ntp_scanner" >&6; }
33154  if test x$ntp_test_ntp_scanner = xyes; then
33155   BUILD_TEST_NTP_SCANNER_TRUE=
33156   BUILD_TEST_NTP_SCANNER_FALSE='#'
33157 else
33158   BUILD_TEST_NTP_SCANNER_TRUE='#'
33159   BUILD_TEST_NTP_SCANNER_FALSE=
33160 fi
33161
33162
33163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_signd" >&5
33164 $as_echo_n "checking if we can run test-ntp_signd... " >&6; }
33165 ntp_test_ntp_signd="no"
33166 case "$ntp_ept:$cross:$host" in
33167  no:0:*-*-freebsd6.4) ;;
33168  no:0:*-*-solaris*) ;;
33169  *) ntp_test_ntp_signd="yes" ;;
33170 esac
33171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_signd" >&5
33172 $as_echo "$ntp_test_ntp_signd" >&6; }
33173  if test x$ntp_test_ntp_signd = xyes; then
33174   BUILD_TEST_NTP_SIGND_TRUE=
33175   BUILD_TEST_NTP_SIGND_FALSE='#'
33176 else
33177   BUILD_TEST_NTP_SIGND_TRUE='#'
33178   BUILD_TEST_NTP_SIGND_FALSE=
33179 fi
33180
33181
33182
33183
33184 ###
33185
33186
33187   prefix_NONE=
33188   exec_prefix_NONE=
33189   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
33190   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
33191   eval ac_define_dir="\"$sysconfdir\""
33192   eval ac_define_dir="\"$ac_define_dir\""
33193   NTP_KEYSDIR="$ac_define_dir"
33194
33195
33196 cat >>confdefs.h <<_ACEOF
33197 #define NTP_KEYSDIR "$ac_define_dir"
33198 _ACEOF
33199
33200   test "$prefix_NONE" && prefix=NONE
33201   test "$exec_prefix_NONE" && exec_prefix=NONE
33202
33203
33204 ac_config_files="$ac_config_files Makefile"
33205
33206 ac_config_files="$ac_config_files adjtimed/Makefile"
33207
33208 ac_config_files="$ac_config_files clockstuff/Makefile"
33209
33210 ac_config_files="$ac_config_files include/Makefile"
33211
33212 ac_config_files="$ac_config_files include/isc/Makefile"
33213
33214 ac_config_files="$ac_config_files kernel/Makefile"
33215
33216 ac_config_files="$ac_config_files kernel/sys/Makefile"
33217
33218 ac_config_files="$ac_config_files libntp/Makefile"
33219
33220 ac_config_files="$ac_config_files libparse/Makefile"
33221
33222 ac_config_files="$ac_config_files ntpd/Makefile"
33223
33224 ac_config_files="$ac_config_files ntpd/complete.conf"
33225
33226 ac_config_files="$ac_config_files ntpdate/Makefile"
33227
33228 ac_config_files="$ac_config_files ntpdc/Makefile"
33229
33230 ac_config_files="$ac_config_files ntpdc/nl.pl"
33231
33232 ac_config_files="$ac_config_files ntpq/Makefile"
33233
33234 ac_config_files="$ac_config_files ntpsnmpd/Makefile"
33235
33236 ac_config_files="$ac_config_files parseutil/Makefile"
33237
33238 ac_config_files="$ac_config_files scripts/Makefile"
33239
33240 ac_config_files="$ac_config_files scripts/build/Makefile"
33241
33242 ac_config_files="$ac_config_files scripts/build/genAuthors"
33243
33244 ac_config_files="$ac_config_files scripts/build/mkver"
33245
33246 ac_config_files="$ac_config_files scripts/calc_tickadj/Makefile"
33247
33248 ac_config_files="$ac_config_files scripts/calc_tickadj/calc_tickadj"
33249
33250 ac_config_files="$ac_config_files scripts/lib/Makefile"
33251
33252 ac_config_files="$ac_config_files scripts/ntp-wait/Makefile"
33253
33254 ac_config_files="$ac_config_files scripts/ntp-wait/ntp-wait"
33255
33256 ac_config_files="$ac_config_files scripts/ntpsweep/Makefile"
33257
33258 ac_config_files="$ac_config_files scripts/ntpsweep/ntpsweep"
33259
33260 ac_config_files="$ac_config_files scripts/ntptrace/Makefile"
33261
33262 ac_config_files="$ac_config_files scripts/ntptrace/ntptrace"
33263
33264 ac_config_files="$ac_config_files scripts/ntpver"
33265
33266 ac_config_files="$ac_config_files scripts/plot_summary"
33267
33268 ac_config_files="$ac_config_files scripts/summary"
33269
33270 ac_config_files="$ac_config_files scripts/update-leap/Makefile"
33271
33272 ac_config_files="$ac_config_files scripts/update-leap/update-leap"
33273
33274 ac_config_files="$ac_config_files tests/Makefile"
33275
33276 ac_config_files="$ac_config_files tests/bug-2803/Makefile"
33277
33278 ac_config_files="$ac_config_files tests/libntp/Makefile"
33279
33280 ac_config_files="$ac_config_files tests/ntpd/Makefile"
33281
33282 ac_config_files="$ac_config_files tests/ntpq/Makefile"
33283
33284 ac_config_files="$ac_config_files tests/sandbox/Makefile"
33285
33286 ac_config_files="$ac_config_files tests/sec-2853/Makefile"
33287
33288 ac_config_files="$ac_config_files util/Makefile"
33289
33290
33291 perllibdir="${datadir}/ntp/lib"
33292
33293   prefix_NONE=
33294   exec_prefix_NONE=
33295   test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
33296   test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
33297   eval ac_define_dir="\"$perllibdir\""
33298   eval ac_define_dir="\"$ac_define_dir\""
33299   PERLLIBDIR="$ac_define_dir"
33300
33301
33302 cat >>confdefs.h <<_ACEOF
33303 #define PERLLIBDIR "$ac_define_dir"
33304 _ACEOF
33305
33306   test "$prefix_NONE" && prefix=NONE
33307   test "$exec_prefix_NONE" && exec_prefix=NONE
33308
33309
33310 calc_tickadj_opts="$srcdir/scripts/calc_tickadj/calc_tickadj-opts"
33311
33312 ntp_wait_opts="$srcdir/scripts/ntp-wait/ntp-wait-opts"
33313
33314 ntpsweep_opts="$srcdir/scripts/ntpsweep/ntpsweep-opts"
33315
33316 ntptrace_opts="$srcdir/scripts/ntptrace/ntptrace-opts"
33317
33318 summary_opts="$srcdir/scripts/summary-opts"
33319
33320 plot_summary_opts="$srcdir/scripts/plot_summary-opts"
33321
33322
33323
33324
33325 subdirs="$subdirs sntp"
33326
33327
33328 cat >confcache <<\_ACEOF
33329 # This file is a shell script that caches the results of configure
33330 # tests run on this system so they can be shared between configure
33331 # scripts and configure runs, see configure's option --config-cache.
33332 # It is not useful on other systems.  If it contains results you don't
33333 # want to keep, you may remove or edit it.
33334 #
33335 # config.status only pays attention to the cache file if you give it
33336 # the --recheck option to rerun configure.
33337 #
33338 # `ac_cv_env_foo' variables (set or unset) will be overridden when
33339 # loading this file, other *unset* `ac_cv_foo' will be assigned the
33340 # following values.
33341
33342 _ACEOF
33343
33344 # The following way of writing the cache mishandles newlines in values,
33345 # but we know of no workaround that is simple, portable, and efficient.
33346 # So, we kill variables containing newlines.
33347 # Ultrix sh set writes to stderr and can't be redirected directly,
33348 # and sets the high bit in the cache file unless we assign to the vars.
33349 (
33350   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33351     eval ac_val=\$$ac_var
33352     case $ac_val in #(
33353     *${as_nl}*)
33354       case $ac_var in #(
33355       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33356 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33357       esac
33358       case $ac_var in #(
33359       _ | IFS | as_nl) ;; #(
33360       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33361       *) { eval $ac_var=; unset $ac_var;} ;;
33362       esac ;;
33363     esac
33364   done
33365
33366   (set) 2>&1 |
33367     case $as_nl`(ac_space=' '; set) 2>&1` in #(
33368     *${as_nl}ac_space=\ *)
33369       # `set' does not quote correctly, so add quotes: double-quote
33370       # substitution turns \\\\ into \\, and sed turns \\ into \.
33371       sed -n \
33372         "s/'/'\\\\''/g;
33373           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33374       ;; #(
33375     *)
33376       # `set' quotes correctly as required by POSIX, so do not add quotes.
33377       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33378       ;;
33379     esac |
33380     sort
33381 ) |
33382   sed '
33383      /^ac_cv_env_/b end
33384      t clear
33385      :clear
33386      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33387      t end
33388      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33389      :end' >>confcache
33390 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33391   if test -w "$cache_file"; then
33392     if test "x$cache_file" != "x/dev/null"; then
33393       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33394 $as_echo "$as_me: updating cache $cache_file" >&6;}
33395       if test ! -f "$cache_file" || test -h "$cache_file"; then
33396         cat confcache >"$cache_file"
33397       else
33398         case $cache_file in #(
33399         */* | ?:*)
33400           mv -f confcache "$cache_file"$$ &&
33401           mv -f "$cache_file"$$ "$cache_file" ;; #(
33402         *)
33403           mv -f confcache "$cache_file" ;;
33404         esac
33405       fi
33406     fi
33407   else
33408     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33409 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33410   fi
33411 fi
33412 rm -f confcache
33413
33414 test "x$prefix" = xNONE && prefix=$ac_default_prefix
33415 # Let make expand exec_prefix.
33416 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33417
33418 DEFS=-DHAVE_CONFIG_H
33419
33420 ac_libobjs=
33421 ac_ltlibobjs=
33422 U=
33423 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33424   # 1. Remove the extension, and $U if already installed.
33425   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33426   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33427   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33428   #    will be set to the directory where LIBOBJS objects are built.
33429   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33430   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33431 done
33432 LIBOBJS=$ac_libobjs
33433
33434 LTLIBOBJS=$ac_ltlibobjs
33435
33436
33437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
33438 $as_echo_n "checking that generated files are newer than configure... " >&6; }
33439    if test -n "$am_sleep_pid"; then
33440      # Hide warnings about reused PIDs.
33441      wait $am_sleep_pid 2>/dev/null
33442    fi
33443    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
33444 $as_echo "done" >&6; }
33445  if test -n "$EXEEXT"; then
33446   am__EXEEXT_TRUE=
33447   am__EXEEXT_FALSE='#'
33448 else
33449   am__EXEEXT_TRUE='#'
33450   am__EXEEXT_FALSE=
33451 fi
33452
33453 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
33454   as_fn_error $? "conditional \"AMDEP\" was never defined.
33455 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33456 fi
33457 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
33458   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
33459 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33460 fi
33461
33462 if test -z "${VPATH_HACK_TRUE}" && test -z "${VPATH_HACK_FALSE}"; then
33463   as_fn_error $? "conditional \"VPATH_HACK\" was never defined.
33464 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33465 fi
33466 if test -z "${WANT_CALC_TICKADJ_MS_TRUE}" && test -z "${WANT_CALC_TICKADJ_MS_FALSE}"; then
33467   as_fn_error $? "conditional \"WANT_CALC_TICKADJ_MS\" was never defined.
33468 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33469 fi
33470 if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; then
33471   as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
33472 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33473 fi
33474 if test -z "${INSTALL_UPDATE_LEAP_TRUE}" && test -z "${INSTALL_UPDATE_LEAP_FALSE}"; then
33475   as_fn_error $? "conditional \"INSTALL_UPDATE_LEAP\" was never defined.
33476 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33477 fi
33478 if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
33479   as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
33480 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33481 fi
33482 if test -z "${INSTALL_LIBOPTS_TRUE}" && test -z "${INSTALL_LIBOPTS_FALSE}"; then
33483   as_fn_error $? "conditional \"INSTALL_LIBOPTS\" was never defined.
33484 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33485 fi
33486 if test -z "${NEED_LIBOPTS_TRUE}" && test -z "${NEED_LIBOPTS_FALSE}"; then
33487   as_fn_error $? "conditional \"NEED_LIBOPTS\" was never defined.
33488 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33489 fi
33490 if test -z "${BUILD_LIBEVENT_TRUE}" && test -z "${BUILD_LIBEVENT_FALSE}"; then
33491   as_fn_error $? "conditional \"BUILD_LIBEVENT\" was never defined.
33492 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33493 fi
33494 if test -z "${NTP_CROSSCOMPILE_TRUE}" && test -z "${NTP_CROSSCOMPILE_FALSE}"; then
33495   as_fn_error $? "conditional \"NTP_CROSSCOMPILE\" was never defined.
33496 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33497 fi
33498 if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
33499   as_fn_error $? "conditional \"PTHREADS\" was never defined.
33500 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33501 fi
33502 if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then
33503   as_fn_error $? "conditional \"BUILD_SNTP\" was never defined.
33504 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33505 fi
33506 if test -z "${SAVECONFIG_ENABLED_TRUE}" && test -z "${SAVECONFIG_ENABLED_FALSE}"; then
33507   as_fn_error $? "conditional \"SAVECONFIG_ENABLED\" was never defined.
33508 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33509 fi
33510 if test -z "${UNITYBUILD_AVAILABLE_TRUE}" && test -z "${UNITYBUILD_AVAILABLE_FALSE}"; then
33511   as_fn_error $? "conditional \"UNITYBUILD_AVAILABLE\" was never defined.
33512 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33513 fi
33514 if test -z "${GTEST_AVAILABLE_TRUE}" && test -z "${GTEST_AVAILABLE_FALSE}"; then
33515   as_fn_error $? "conditional \"GTEST_AVAILABLE\" was never defined.
33516 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33517 fi
33518 if test -z "${BUILD_TEST_NTP_RESTRICT_TRUE}" && test -z "${BUILD_TEST_NTP_RESTRICT_FALSE}"; then
33519   as_fn_error $? "conditional \"BUILD_TEST_NTP_RESTRICT\" was never defined.
33520 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33521 fi
33522 if test -z "${BUILD_TEST_NTP_SCANNER_TRUE}" && test -z "${BUILD_TEST_NTP_SCANNER_FALSE}"; then
33523   as_fn_error $? "conditional \"BUILD_TEST_NTP_SCANNER\" was never defined.
33524 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33525 fi
33526 if test -z "${BUILD_TEST_NTP_SIGND_TRUE}" && test -z "${BUILD_TEST_NTP_SIGND_FALSE}"; then
33527   as_fn_error $? "conditional \"BUILD_TEST_NTP_SIGND\" was never defined.
33528 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33529 fi
33530
33531 : "${CONFIG_STATUS=./config.status}"
33532 ac_write_fail=0
33533 ac_clean_files_save=$ac_clean_files
33534 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33535 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33536 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33537 as_write_fail=0
33538 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33539 #! $SHELL
33540 # Generated by $as_me.
33541 # Run this file to recreate the current configuration.
33542 # Compiler output produced by configure, useful for debugging
33543 # configure, is in config.log if it exists.
33544
33545 debug=false
33546 ac_cs_recheck=false
33547 ac_cs_silent=false
33548
33549 SHELL=\${CONFIG_SHELL-$SHELL}
33550 export SHELL
33551 _ASEOF
33552 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33553 ## -------------------- ##
33554 ## M4sh Initialization. ##
33555 ## -------------------- ##
33556
33557 # Be more Bourne compatible
33558 DUALCASE=1; export DUALCASE # for MKS sh
33559 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33560   emulate sh
33561   NULLCMD=:
33562   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33563   # is contrary to our usage.  Disable this feature.
33564   alias -g '${1+"$@"}'='"$@"'
33565   setopt NO_GLOB_SUBST
33566 else
33567   case `(set -o) 2>/dev/null` in #(
33568   *posix*) :
33569     set -o posix ;; #(
33570   *) :
33571      ;;
33572 esac
33573 fi
33574
33575
33576 as_nl='
33577 '
33578 export as_nl
33579 # Printing a long string crashes Solaris 7 /usr/bin/printf.
33580 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33581 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33582 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33583 # Prefer a ksh shell builtin over an external printf program on Solaris,
33584 # but without wasting forks for bash or zsh.
33585 if test -z "$BASH_VERSION$ZSH_VERSION" \
33586     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33587   as_echo='print -r --'
33588   as_echo_n='print -rn --'
33589 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33590   as_echo='printf %s\n'
33591   as_echo_n='printf %s'
33592 else
33593   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33594     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33595     as_echo_n='/usr/ucb/echo -n'
33596   else
33597     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33598     as_echo_n_body='eval
33599       arg=$1;
33600       case $arg in #(
33601       *"$as_nl"*)
33602         expr "X$arg" : "X\\(.*\\)$as_nl";
33603         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33604       esac;
33605       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33606     '
33607     export as_echo_n_body
33608     as_echo_n='sh -c $as_echo_n_body as_echo'
33609   fi
33610   export as_echo_body
33611   as_echo='sh -c $as_echo_body as_echo'
33612 fi
33613
33614 # The user is always right.
33615 if test "${PATH_SEPARATOR+set}" != set; then
33616   PATH_SEPARATOR=:
33617   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33618     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33619       PATH_SEPARATOR=';'
33620   }
33621 fi
33622
33623
33624 # IFS
33625 # We need space, tab and new line, in precisely that order.  Quoting is
33626 # there to prevent editors from complaining about space-tab.
33627 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
33628 # splitting by setting IFS to empty value.)
33629 IFS=" ""        $as_nl"
33630
33631 # Find who we are.  Look in the path if we contain no directory separator.
33632 as_myself=
33633 case $0 in #((
33634   *[\\/]* ) as_myself=$0 ;;
33635   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33636 for as_dir in $PATH
33637 do
33638   IFS=$as_save_IFS
33639   test -z "$as_dir" && as_dir=.
33640     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33641   done
33642 IFS=$as_save_IFS
33643
33644      ;;
33645 esac
33646 # We did not find ourselves, most probably we were run as `sh COMMAND'
33647 # in which case we are not to be found in the path.
33648 if test "x$as_myself" = x; then
33649   as_myself=$0
33650 fi
33651 if test ! -f "$as_myself"; then
33652   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33653   exit 1
33654 fi
33655
33656 # Unset variables that we do not need and which cause bugs (e.g. in
33657 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33658 # suppresses any "Segmentation fault" message there.  '((' could
33659 # trigger a bug in pdksh 5.2.14.
33660 for as_var in BASH_ENV ENV MAIL MAILPATH
33661 do eval test x\${$as_var+set} = xset \
33662   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33663 done
33664 PS1='$ '
33665 PS2='> '
33666 PS4='+ '
33667
33668 # NLS nuisances.
33669 LC_ALL=C
33670 export LC_ALL
33671 LANGUAGE=C
33672 export LANGUAGE
33673
33674 # CDPATH.
33675 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33676
33677
33678 # as_fn_error STATUS ERROR [LINENO LOG_FD]
33679 # ----------------------------------------
33680 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33681 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33682 # script with STATUS, using 1 if that was 0.
33683 as_fn_error ()
33684 {
33685   as_status=$1; test $as_status -eq 0 && as_status=1
33686   if test "$4"; then
33687     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33688     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33689   fi
33690   $as_echo "$as_me: error: $2" >&2
33691   as_fn_exit $as_status
33692 } # as_fn_error
33693
33694
33695 # as_fn_set_status STATUS
33696 # -----------------------
33697 # Set $? to STATUS, without forking.
33698 as_fn_set_status ()
33699 {
33700   return $1
33701 } # as_fn_set_status
33702
33703 # as_fn_exit STATUS
33704 # -----------------
33705 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33706 as_fn_exit ()
33707 {
33708   set +e
33709   as_fn_set_status $1
33710   exit $1
33711 } # as_fn_exit
33712
33713 # as_fn_unset VAR
33714 # ---------------
33715 # Portably unset VAR.
33716 as_fn_unset ()
33717 {
33718   { eval $1=; unset $1;}
33719 }
33720 as_unset=as_fn_unset
33721 # as_fn_append VAR VALUE
33722 # ----------------------
33723 # Append the text in VALUE to the end of the definition contained in VAR. Take
33724 # advantage of any shell optimizations that allow amortized linear growth over
33725 # repeated appends, instead of the typical quadratic growth present in naive
33726 # implementations.
33727 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33728   eval 'as_fn_append ()
33729   {
33730     eval $1+=\$2
33731   }'
33732 else
33733   as_fn_append ()
33734   {
33735     eval $1=\$$1\$2
33736   }
33737 fi # as_fn_append
33738
33739 # as_fn_arith ARG...
33740 # ------------------
33741 # Perform arithmetic evaluation on the ARGs, and store the result in the
33742 # global $as_val. Take advantage of shells that can avoid forks. The arguments
33743 # must be portable across $(()) and expr.
33744 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33745   eval 'as_fn_arith ()
33746   {
33747     as_val=$(( $* ))
33748   }'
33749 else
33750   as_fn_arith ()
33751   {
33752     as_val=`expr "$@" || test $? -eq 1`
33753   }
33754 fi # as_fn_arith
33755
33756
33757 if expr a : '\(a\)' >/dev/null 2>&1 &&
33758    test "X`expr 00001 : '.*\(...\)'`" = X001; then
33759   as_expr=expr
33760 else
33761   as_expr=false
33762 fi
33763
33764 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33765   as_basename=basename
33766 else
33767   as_basename=false
33768 fi
33769
33770 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33771   as_dirname=dirname
33772 else
33773   as_dirname=false
33774 fi
33775
33776 as_me=`$as_basename -- "$0" ||
33777 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33778          X"$0" : 'X\(//\)$' \| \
33779          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33780 $as_echo X/"$0" |
33781     sed '/^.*\/\([^/][^/]*\)\/*$/{
33782             s//\1/
33783             q
33784           }
33785           /^X\/\(\/\/\)$/{
33786             s//\1/
33787             q
33788           }
33789           /^X\/\(\/\).*/{
33790             s//\1/
33791             q
33792           }
33793           s/.*/./; q'`
33794
33795 # Avoid depending upon Character Ranges.
33796 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33797 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33798 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33799 as_cr_digits='0123456789'
33800 as_cr_alnum=$as_cr_Letters$as_cr_digits
33801
33802 ECHO_C= ECHO_N= ECHO_T=
33803 case `echo -n x` in #(((((
33804 -n*)
33805   case `echo 'xy\c'` in
33806   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
33807   xy)  ECHO_C='\c';;
33808   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33809        ECHO_T=' ';;
33810   esac;;
33811 *)
33812   ECHO_N='-n';;
33813 esac
33814
33815 rm -f conf$$ conf$$.exe conf$$.file
33816 if test -d conf$$.dir; then
33817   rm -f conf$$.dir/conf$$.file
33818 else
33819   rm -f conf$$.dir
33820   mkdir conf$$.dir 2>/dev/null
33821 fi
33822 if (echo >conf$$.file) 2>/dev/null; then
33823   if ln -s conf$$.file conf$$ 2>/dev/null; then
33824     as_ln_s='ln -s'
33825     # ... but there are two gotchas:
33826     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33827     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33828     # In both cases, we have to default to `cp -pR'.
33829     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33830       as_ln_s='cp -pR'
33831   elif ln conf$$.file conf$$ 2>/dev/null; then
33832     as_ln_s=ln
33833   else
33834     as_ln_s='cp -pR'
33835   fi
33836 else
33837   as_ln_s='cp -pR'
33838 fi
33839 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33840 rmdir conf$$.dir 2>/dev/null
33841
33842
33843 # as_fn_mkdir_p
33844 # -------------
33845 # Create "$as_dir" as a directory, including parents if necessary.
33846 as_fn_mkdir_p ()
33847 {
33848
33849   case $as_dir in #(
33850   -*) as_dir=./$as_dir;;
33851   esac
33852   test -d "$as_dir" || eval $as_mkdir_p || {
33853     as_dirs=
33854     while :; do
33855       case $as_dir in #(
33856       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33857       *) as_qdir=$as_dir;;
33858       esac
33859       as_dirs="'$as_qdir' $as_dirs"
33860       as_dir=`$as_dirname -- "$as_dir" ||
33861 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33862          X"$as_dir" : 'X\(//\)[^/]' \| \
33863          X"$as_dir" : 'X\(//\)$' \| \
33864          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33865 $as_echo X"$as_dir" |
33866     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33867             s//\1/
33868             q
33869           }
33870           /^X\(\/\/\)[^/].*/{
33871             s//\1/
33872             q
33873           }
33874           /^X\(\/\/\)$/{
33875             s//\1/
33876             q
33877           }
33878           /^X\(\/\).*/{
33879             s//\1/
33880             q
33881           }
33882           s/.*/./; q'`
33883       test -d "$as_dir" && break
33884     done
33885     test -z "$as_dirs" || eval "mkdir $as_dirs"
33886   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33887
33888
33889 } # as_fn_mkdir_p
33890 if mkdir -p . 2>/dev/null; then
33891   as_mkdir_p='mkdir -p "$as_dir"'
33892 else
33893   test -d ./-p && rmdir ./-p
33894   as_mkdir_p=false
33895 fi
33896
33897
33898 # as_fn_executable_p FILE
33899 # -----------------------
33900 # Test if FILE is an executable regular file.
33901 as_fn_executable_p ()
33902 {
33903   test -f "$1" && test -x "$1"
33904 } # as_fn_executable_p
33905 as_test_x='test -x'
33906 as_executable_p=as_fn_executable_p
33907
33908 # Sed expression to map a string onto a valid CPP name.
33909 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33910
33911 # Sed expression to map a string onto a valid variable name.
33912 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33913
33914
33915 exec 6>&1
33916 ## ----------------------------------- ##
33917 ## Main body of $CONFIG_STATUS script. ##
33918 ## ----------------------------------- ##
33919 _ASEOF
33920 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33921
33922 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33923 # Save the log message, to keep $0 and so on meaningful, and to
33924 # report actual input values of CONFIG_FILES etc. instead of their
33925 # values after options handling.
33926 ac_log="
33927 This file was extended by ntp $as_me 4.2.8p10, which was
33928 generated by GNU Autoconf 2.69.  Invocation command line was
33929
33930   CONFIG_FILES    = $CONFIG_FILES
33931   CONFIG_HEADERS  = $CONFIG_HEADERS
33932   CONFIG_LINKS    = $CONFIG_LINKS
33933   CONFIG_COMMANDS = $CONFIG_COMMANDS
33934   $ $0 $@
33935
33936 on `(hostname || uname -n) 2>/dev/null | sed 1q`
33937 "
33938
33939 _ACEOF
33940
33941 case $ac_config_files in *"
33942 "*) set x $ac_config_files; shift; ac_config_files=$*;;
33943 esac
33944
33945 case $ac_config_headers in *"
33946 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33947 esac
33948
33949
33950 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33951 # Files that config.status was made for.
33952 config_files="$ac_config_files"
33953 config_headers="$ac_config_headers"
33954 config_commands="$ac_config_commands"
33955
33956 _ACEOF
33957
33958 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33959 ac_cs_usage="\
33960 \`$as_me' instantiates files and other configuration actions
33961 from templates according to the current configuration.  Unless the files
33962 and actions are specified as TAGs, all are instantiated by default.
33963
33964 Usage: $0 [OPTION]... [TAG]...
33965
33966   -h, --help       print this help, then exit
33967   -V, --version    print version number and configuration settings, then exit
33968       --config     print configuration, then exit
33969   -q, --quiet, --silent
33970                    do not print progress messages
33971   -d, --debug      don't remove temporary files
33972       --recheck    update $as_me by reconfiguring in the same conditions
33973       --file=FILE[:TEMPLATE]
33974                    instantiate the configuration file FILE
33975       --header=FILE[:TEMPLATE]
33976                    instantiate the configuration header FILE
33977
33978 Configuration files:
33979 $config_files
33980
33981 Configuration headers:
33982 $config_headers
33983
33984 Configuration commands:
33985 $config_commands
33986
33987 Report bugs to <http://bugs.ntp.org./>.
33988 ntp home page: <http://www.ntp.org./>."
33989
33990 _ACEOF
33991 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33992 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33993 ac_cs_version="\\
33994 ntp config.status 4.2.8p10
33995 configured by $0, generated by GNU Autoconf 2.69,
33996   with options \\"\$ac_cs_config\\"
33997
33998 Copyright (C) 2012 Free Software Foundation, Inc.
33999 This config.status script is free software; the Free Software Foundation
34000 gives unlimited permission to copy, distribute and modify it."
34001
34002 ac_pwd='$ac_pwd'
34003 srcdir='$srcdir'
34004 INSTALL='$INSTALL'
34005 MKDIR_P='$MKDIR_P'
34006 AWK='$AWK'
34007 test -n "\$AWK" || AWK=awk
34008 _ACEOF
34009
34010 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34011 # The default lists apply if the user does not specify any file.
34012 ac_need_defaults=:
34013 while test $# != 0
34014 do
34015   case $1 in
34016   --*=?*)
34017     ac_option=`expr "X$1" : 'X\([^=]*\)='`
34018     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34019     ac_shift=:
34020     ;;
34021   --*=)
34022     ac_option=`expr "X$1" : 'X\([^=]*\)='`
34023     ac_optarg=
34024     ac_shift=:
34025     ;;
34026   *)
34027     ac_option=$1
34028     ac_optarg=$2
34029     ac_shift=shift
34030     ;;
34031   esac
34032
34033   case $ac_option in
34034   # Handling of the options.
34035   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34036     ac_cs_recheck=: ;;
34037   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34038     $as_echo "$ac_cs_version"; exit ;;
34039   --config | --confi | --conf | --con | --co | --c )
34040     $as_echo "$ac_cs_config"; exit ;;
34041   --debug | --debu | --deb | --de | --d | -d )
34042     debug=: ;;
34043   --file | --fil | --fi | --f )
34044     $ac_shift
34045     case $ac_optarg in
34046     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34047     '') as_fn_error $? "missing file argument" ;;
34048     esac
34049     as_fn_append CONFIG_FILES " '$ac_optarg'"
34050     ac_need_defaults=false;;
34051   --header | --heade | --head | --hea )
34052     $ac_shift
34053     case $ac_optarg in
34054     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34055     esac
34056     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34057     ac_need_defaults=false;;
34058   --he | --h)
34059     # Conflict between --help and --header
34060     as_fn_error $? "ambiguous option: \`$1'
34061 Try \`$0 --help' for more information.";;
34062   --help | --hel | -h )
34063     $as_echo "$ac_cs_usage"; exit ;;
34064   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34065   | -silent | --silent | --silen | --sile | --sil | --si | --s)
34066     ac_cs_silent=: ;;
34067
34068   # This is an error.
34069   -*) as_fn_error $? "unrecognized option: \`$1'
34070 Try \`$0 --help' for more information." ;;
34071
34072   *) as_fn_append ac_config_targets " $1"
34073      ac_need_defaults=false ;;
34074
34075   esac
34076   shift
34077 done
34078
34079 ac_configure_extra_args=
34080
34081 if $ac_cs_silent; then
34082   exec 6>/dev/null
34083   ac_configure_extra_args="$ac_configure_extra_args --silent"
34084 fi
34085
34086 _ACEOF
34087 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34088 if \$ac_cs_recheck; then
34089   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34090   shift
34091   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34092   CONFIG_SHELL='$SHELL'
34093   export CONFIG_SHELL
34094   exec "\$@"
34095 fi
34096
34097 _ACEOF
34098 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34099 exec 5>>config.log
34100 {
34101   echo
34102   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34103 ## Running $as_me. ##
34104 _ASBOX
34105   $as_echo "$ac_log"
34106 } >&5
34107
34108 _ACEOF
34109 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34110 #
34111 # INIT-COMMANDS
34112 #
34113 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
34114
34115
34116 # The HP-UX ksh and POSIX shell print the target directory to stdout
34117 # if CDPATH is set.
34118 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
34119
34120 sed_quote_subst='$sed_quote_subst'
34121 double_quote_subst='$double_quote_subst'
34122 delay_variable_subst='$delay_variable_subst'
34123 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
34124 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
34125 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
34126 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
34127 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
34128 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
34129 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
34130 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
34131 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
34132 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
34133 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
34134 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
34135 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
34136 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
34137 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
34138 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
34139 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
34140 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
34141 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
34142 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
34143 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
34144 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
34145 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
34146 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
34147 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
34148 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
34149 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
34150 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
34151 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
34152 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
34153 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
34154 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
34155 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
34156 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
34157 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
34158 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
34159 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
34160 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
34161 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
34162 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
34163 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
34164 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
34165 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
34166 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
34167 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
34168 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
34169 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
34170 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
34171 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
34172 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
34173 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
34174 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
34175 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
34176 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
34177 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
34178 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
34179 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
34180 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
34181 lt_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"`'
34182 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
34183 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
34184 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
34185 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
34186 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
34187 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
34188 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
34189 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
34190 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
34191 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
34192 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
34193 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
34194 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
34195 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
34196 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
34197 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
34198 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
34199 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
34200 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
34201 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
34202 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
34203 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
34204 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
34205 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
34206 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
34207 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
34208 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
34209 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
34210 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
34211 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
34212 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
34213 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
34214 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
34215 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
34216 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
34217 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
34218 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
34219 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
34220 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
34221 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
34222 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
34223 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
34224 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
34225 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
34226 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
34227 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
34228 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
34229 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
34230 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
34231 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
34232 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
34233 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
34234 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
34235 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
34236 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
34237 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
34238 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
34239 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
34240 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
34241 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
34242 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
34243 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
34244 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
34245 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
34246 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
34247 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
34248 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
34249 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
34250 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
34251 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
34252 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
34253 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
34254 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
34255 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
34256 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
34257 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
34258
34259 LTCC='$LTCC'
34260 LTCFLAGS='$LTCFLAGS'
34261 compiler='$compiler_DEFAULT'
34262
34263 # A function that is used when there is no print builtin or printf.
34264 func_fallback_echo ()
34265 {
34266   eval 'cat <<_LTECHO_EOF
34267 \$1
34268 _LTECHO_EOF'
34269 }
34270
34271 # Quote evaled strings.
34272 for var in SHELL \
34273 ECHO \
34274 PATH_SEPARATOR \
34275 SED \
34276 GREP \
34277 EGREP \
34278 FGREP \
34279 LD \
34280 NM \
34281 LN_S \
34282 lt_SP2NL \
34283 lt_NL2SP \
34284 reload_flag \
34285 OBJDUMP \
34286 deplibs_check_method \
34287 file_magic_cmd \
34288 file_magic_glob \
34289 want_nocaseglob \
34290 DLLTOOL \
34291 sharedlib_from_linklib_cmd \
34292 AR \
34293 AR_FLAGS \
34294 archiver_list_spec \
34295 STRIP \
34296 RANLIB \
34297 CC \
34298 CFLAGS \
34299 compiler \
34300 lt_cv_sys_global_symbol_pipe \
34301 lt_cv_sys_global_symbol_to_cdecl \
34302 lt_cv_sys_global_symbol_to_import \
34303 lt_cv_sys_global_symbol_to_c_name_address \
34304 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
34305 lt_cv_nm_interface \
34306 nm_file_list_spec \
34307 lt_cv_truncate_bin \
34308 lt_prog_compiler_no_builtin_flag \
34309 lt_prog_compiler_pic \
34310 lt_prog_compiler_wl \
34311 lt_prog_compiler_static \
34312 lt_cv_prog_compiler_c_o \
34313 need_locks \
34314 MANIFEST_TOOL \
34315 DSYMUTIL \
34316 NMEDIT \
34317 LIPO \
34318 OTOOL \
34319 OTOOL64 \
34320 shrext_cmds \
34321 export_dynamic_flag_spec \
34322 whole_archive_flag_spec \
34323 compiler_needs_object \
34324 with_gnu_ld \
34325 allow_undefined_flag \
34326 no_undefined_flag \
34327 hardcode_libdir_flag_spec \
34328 hardcode_libdir_separator \
34329 exclude_expsyms \
34330 include_expsyms \
34331 file_list_spec \
34332 variables_saved_for_relink \
34333 libname_spec \
34334 library_names_spec \
34335 soname_spec \
34336 install_override_mode \
34337 finish_eval \
34338 old_striplib \
34339 striplib; do
34340     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
34341     *[\\\\\\\`\\"\\\$]*)
34342       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
34343       ;;
34344     *)
34345       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
34346       ;;
34347     esac
34348 done
34349
34350 # Double-quote double-evaled strings.
34351 for var in reload_cmds \
34352 old_postinstall_cmds \
34353 old_postuninstall_cmds \
34354 old_archive_cmds \
34355 extract_expsyms_cmds \
34356 old_archive_from_new_cmds \
34357 old_archive_from_expsyms_cmds \
34358 archive_cmds \
34359 archive_expsym_cmds \
34360 module_cmds \
34361 module_expsym_cmds \
34362 export_symbols_cmds \
34363 prelink_cmds \
34364 postlink_cmds \
34365 postinstall_cmds \
34366 postuninstall_cmds \
34367 finish_cmds \
34368 sys_lib_search_path_spec \
34369 configure_time_dlsearch_path \
34370 configure_time_lt_sys_library_path; do
34371     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
34372     *[\\\\\\\`\\"\\\$]*)
34373       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
34374       ;;
34375     *)
34376       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
34377       ;;
34378     esac
34379 done
34380
34381 ac_aux_dir='$ac_aux_dir'
34382
34383 # See if we are running on zsh, and set the options that allow our
34384 # commands through without removal of \ escapes INIT.
34385 if test -n "\${ZSH_VERSION+set}"; then
34386    setopt NO_GLOB_SUBST
34387 fi
34388
34389
34390     PACKAGE='$PACKAGE'
34391     VERSION='$VERSION'
34392     RM='$RM'
34393     ofile='$ofile'
34394
34395
34396
34397
34398 _ACEOF
34399
34400 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34401
34402 # Handling of arguments.
34403 for ac_config_target in $ac_config_targets
34404 do
34405   case $ac_config_target in
34406     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
34407     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
34408     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
34409     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
34410     "adjtimed/Makefile") CONFIG_FILES="$CONFIG_FILES adjtimed/Makefile" ;;
34411     "clockstuff/Makefile") CONFIG_FILES="$CONFIG_FILES clockstuff/Makefile" ;;
34412     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
34413     "include/isc/Makefile") CONFIG_FILES="$CONFIG_FILES include/isc/Makefile" ;;
34414     "kernel/Makefile") CONFIG_FILES="$CONFIG_FILES kernel/Makefile" ;;
34415     "kernel/sys/Makefile") CONFIG_FILES="$CONFIG_FILES kernel/sys/Makefile" ;;
34416     "libntp/Makefile") CONFIG_FILES="$CONFIG_FILES libntp/Makefile" ;;
34417     "libparse/Makefile") CONFIG_FILES="$CONFIG_FILES libparse/Makefile" ;;
34418     "ntpd/Makefile") CONFIG_FILES="$CONFIG_FILES ntpd/Makefile" ;;
34419     "ntpd/complete.conf") CONFIG_FILES="$CONFIG_FILES ntpd/complete.conf" ;;
34420     "ntpdate/Makefile") CONFIG_FILES="$CONFIG_FILES ntpdate/Makefile" ;;
34421     "ntpdc/Makefile") CONFIG_FILES="$CONFIG_FILES ntpdc/Makefile" ;;
34422     "ntpdc/nl.pl") CONFIG_FILES="$CONFIG_FILES ntpdc/nl.pl" ;;
34423     "ntpq/Makefile") CONFIG_FILES="$CONFIG_FILES ntpq/Makefile" ;;
34424     "ntpsnmpd/Makefile") CONFIG_FILES="$CONFIG_FILES ntpsnmpd/Makefile" ;;
34425     "parseutil/Makefile") CONFIG_FILES="$CONFIG_FILES parseutil/Makefile" ;;
34426     "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
34427     "scripts/build/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/build/Makefile" ;;
34428     "scripts/build/genAuthors") CONFIG_FILES="$CONFIG_FILES scripts/build/genAuthors" ;;
34429     "scripts/build/mkver") CONFIG_FILES="$CONFIG_FILES scripts/build/mkver" ;;
34430     "scripts/calc_tickadj/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/Makefile" ;;
34431     "scripts/calc_tickadj/calc_tickadj") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/calc_tickadj" ;;
34432     "scripts/lib/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/lib/Makefile" ;;
34433     "scripts/ntp-wait/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/Makefile" ;;
34434     "scripts/ntp-wait/ntp-wait") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/ntp-wait" ;;
34435     "scripts/ntpsweep/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/Makefile" ;;
34436     "scripts/ntpsweep/ntpsweep") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/ntpsweep" ;;
34437     "scripts/ntptrace/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/Makefile" ;;
34438     "scripts/ntptrace/ntptrace") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/ntptrace" ;;
34439     "scripts/ntpver") CONFIG_FILES="$CONFIG_FILES scripts/ntpver" ;;
34440     "scripts/plot_summary") CONFIG_FILES="$CONFIG_FILES scripts/plot_summary" ;;
34441     "scripts/summary") CONFIG_FILES="$CONFIG_FILES scripts/summary" ;;
34442     "scripts/update-leap/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/update-leap/Makefile" ;;
34443     "scripts/update-leap/update-leap") CONFIG_FILES="$CONFIG_FILES scripts/update-leap/update-leap" ;;
34444     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
34445     "tests/bug-2803/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bug-2803/Makefile" ;;
34446     "tests/libntp/Makefile") CONFIG_FILES="$CONFIG_FILES tests/libntp/Makefile" ;;
34447     "tests/ntpd/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ntpd/Makefile" ;;
34448     "tests/ntpq/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ntpq/Makefile" ;;
34449     "tests/sandbox/Makefile") CONFIG_FILES="$CONFIG_FILES tests/sandbox/Makefile" ;;
34450     "tests/sec-2853/Makefile") CONFIG_FILES="$CONFIG_FILES tests/sec-2853/Makefile" ;;
34451     "util/Makefile") CONFIG_FILES="$CONFIG_FILES util/Makefile" ;;
34452
34453   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
34454   esac
34455 done
34456
34457
34458 # If the user did not use the arguments to specify the items to instantiate,
34459 # then the envvar interface is used.  Set only those that are not.
34460 # We use the long form for the default assignment because of an extremely
34461 # bizarre bug on SunOS 4.1.3.
34462 if $ac_need_defaults; then
34463   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34464   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34465   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
34466 fi
34467
34468 # Have a temporary directory for convenience.  Make it in the build tree
34469 # simply because there is no reason against having it here, and in addition,
34470 # creating and moving files from /tmp can sometimes cause problems.
34471 # Hook for its removal unless debugging.
34472 # Note that there is a small window in which the directory will not be cleaned:
34473 # after its creation but before its name has been assigned to `$tmp'.
34474 $debug ||
34475 {
34476   tmp= ac_tmp=
34477   trap 'exit_status=$?
34478   : "${ac_tmp:=$tmp}"
34479   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
34480 ' 0
34481   trap 'as_fn_exit 1' 1 2 13 15
34482 }
34483 # Create a (secure) tmp directory for tmp files.
34484
34485 {
34486   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34487   test -d "$tmp"
34488 }  ||
34489 {
34490   tmp=./conf$$-$RANDOM
34491   (umask 077 && mkdir "$tmp")
34492 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34493 ac_tmp=$tmp
34494
34495 # Set up the scripts for CONFIG_FILES section.
34496 # No need to generate them if there are no CONFIG_FILES.
34497 # This happens for instance with `./config.status config.h'.
34498 if test -n "$CONFIG_FILES"; then
34499
34500 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
34501   ac_cs_awk_getline=:
34502   ac_cs_awk_pipe_init=
34503   ac_cs_awk_read_file='
34504       while ((getline aline < (F[key])) > 0)
34505         print(aline)
34506       close(F[key])'
34507   ac_cs_awk_pipe_fini=
34508 else
34509   ac_cs_awk_getline=false
34510   ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
34511   ac_cs_awk_read_file='
34512       print "|#_!!_#|"
34513       print "cat " F[key] " &&"
34514       '$ac_cs_awk_pipe_init
34515   # The final `:' finishes the AND list.
34516   ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
34517 fi
34518 ac_cr=`echo X | tr X '\015'`
34519 # On cygwin, bash can eat \r inside `` if the user requested igncr.
34520 # But we know of no other shell where ac_cr would be empty at this
34521 # point, so we can use a bashism as a fallback.
34522 if test "x$ac_cr" = x; then
34523   eval ac_cr=\$\'\\r\'
34524 fi
34525 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34526 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34527   ac_cs_awk_cr='\\r'
34528 else
34529   ac_cs_awk_cr=$ac_cr
34530 fi
34531
34532 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
34533 _ACEOF
34534
34535 # Create commands to substitute file output variables.
34536 {
34537   echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
34538   echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
34539   echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
34540   echo "_ACAWK" &&
34541   echo "_ACEOF"
34542 } >conf$$files.sh &&
34543 . ./conf$$files.sh ||
34544   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34545 rm -f conf$$files.sh
34546
34547 {
34548   echo "cat >conf$$subs.awk <<_ACEOF" &&
34549   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34550   echo "_ACEOF"
34551 } >conf$$subs.sh ||
34552   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34553 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34554 ac_delim='%!_!# '
34555 for ac_last_try in false false false false false :; do
34556   . ./conf$$subs.sh ||
34557     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34558
34559   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34560   if test $ac_delim_n = $ac_delim_num; then
34561     break
34562   elif $ac_last_try; then
34563     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34564   else
34565     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34566   fi
34567 done
34568 rm -f conf$$subs.sh
34569
34570 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34571 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
34572 _ACEOF
34573 sed -n '
34574 h
34575 s/^/S["/; s/!.*/"]=/
34576 p
34577 g
34578 s/^[^!]*!//
34579 :repl
34580 t repl
34581 s/'"$ac_delim"'$//
34582 t delim
34583 :nl
34584 h
34585 s/\(.\{148\}\)..*/\1/
34586 t more1
34587 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34588 p
34589 n
34590 b repl
34591 :more1
34592 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34593 p
34594 g
34595 s/.\{148\}//
34596 t nl
34597 :delim
34598 h
34599 s/\(.\{148\}\)..*/\1/
34600 t more2
34601 s/["\\]/\\&/g; s/^/"/; s/$/"/
34602 p
34603 b
34604 :more2
34605 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34606 p
34607 g
34608 s/.\{148\}//
34609 t delim
34610 ' <conf$$subs.awk | sed '
34611 /^[^""]/{
34612   N
34613   s/\n//
34614 }
34615 ' >>$CONFIG_STATUS || ac_write_fail=1
34616 rm -f conf$$subs.awk
34617 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34618 _ACAWK
34619 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34620   for (key in S) S_is_set[key] = 1
34621   FS = "\a"
34622   \$ac_cs_awk_pipe_init
34623 }
34624 {
34625   line = $ 0
34626   nfields = split(line, field, "@")
34627   substed = 0
34628   len = length(field[1])
34629   for (i = 2; i < nfields; i++) {
34630     key = field[i]
34631     keylen = length(key)
34632     if (S_is_set[key]) {
34633       value = S[key]
34634       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34635       len += length(value) + length(field[++i])
34636       substed = 1
34637     } else
34638       len += 1 + keylen
34639   }
34640   if (nfields == 3 && !substed) {
34641     key = field[2]
34642     if (F[key] != "" && line ~ /^[       ]*@.*@[         ]*$/) {
34643       \$ac_cs_awk_read_file
34644       next
34645     }
34646   }
34647   print line
34648 }
34649 \$ac_cs_awk_pipe_fini
34650 _ACAWK
34651 _ACEOF
34652 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34653 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34654   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34655 else
34656   cat
34657 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34658   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34659 _ACEOF
34660
34661 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34662 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34663 # trailing colons and then remove the whole line if VPATH becomes empty
34664 # (actually we leave an empty line to preserve line numbers).
34665 if test "x$srcdir" = x.; then
34666   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
34667 h
34668 s///
34669 s/^/:/
34670 s/[      ]*$/:/
34671 s/:\$(srcdir):/:/g
34672 s/:\${srcdir}:/:/g
34673 s/:@srcdir@:/:/g
34674 s/^:*//
34675 s/:*$//
34676 x
34677 s/\(=[   ]*\).*/\1/
34678 G
34679 s/\n//
34680 s/^[^=]*=[       ]*$//
34681 }'
34682 fi
34683
34684 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34685 fi # test -n "$CONFIG_FILES"
34686
34687 # Set up the scripts for CONFIG_HEADERS section.
34688 # No need to generate them if there are no CONFIG_HEADERS.
34689 # This happens for instance with `./config.status Makefile'.
34690 if test -n "$CONFIG_HEADERS"; then
34691 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34692 BEGIN {
34693 _ACEOF
34694
34695 # Transform confdefs.h into an awk script `defines.awk', embedded as
34696 # here-document in config.status, that substitutes the proper values into
34697 # config.h.in to produce config.h.
34698
34699 # Create a delimiter string that does not exist in confdefs.h, to ease
34700 # handling of long lines.
34701 ac_delim='%!_!# '
34702 for ac_last_try in false false :; do
34703   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34704   if test -z "$ac_tt"; then
34705     break
34706   elif $ac_last_try; then
34707     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34708   else
34709     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34710   fi
34711 done
34712
34713 # For the awk script, D is an array of macro values keyed by name,
34714 # likewise P contains macro parameters if any.  Preserve backslash
34715 # newline sequences.
34716
34717 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34718 sed -n '
34719 s/.\{148\}/&'"$ac_delim"'/g
34720 t rset
34721 :rset
34722 s/^[     ]*#[    ]*define[       ][      ]*/ /
34723 t def
34724 d
34725 :def
34726 s/\\$//
34727 t bsnl
34728 s/["\\]/\\&/g
34729 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
34730 D["\1"]=" \3"/p
34731 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
34732 d
34733 :bsnl
34734 s/["\\]/\\&/g
34735 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
34736 D["\1"]=" \3\\\\\\n"\\/p
34737 t cont
34738 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34739 t cont
34740 d
34741 :cont
34742 n
34743 s/.\{148\}/&'"$ac_delim"'/g
34744 t clear
34745 :clear
34746 s/\\$//
34747 t bsnlc
34748 s/["\\]/\\&/g; s/^/"/; s/$/"/p
34749 d
34750 :bsnlc
34751 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34752 b cont
34753 ' <confdefs.h | sed '
34754 s/'"$ac_delim"'/"\\\
34755 "/g' >>$CONFIG_STATUS || ac_write_fail=1
34756
34757 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34758   for (key in D) D_is_set[key] = 1
34759   FS = "\a"
34760 }
34761 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34762   line = \$ 0
34763   split(line, arg, " ")
34764   if (arg[1] == "#") {
34765     defundef = arg[2]
34766     mac1 = arg[3]
34767   } else {
34768     defundef = substr(arg[1], 2)
34769     mac1 = arg[2]
34770   }
34771   split(mac1, mac2, "(") #)
34772   macro = mac2[1]
34773   prefix = substr(line, 1, index(line, defundef) - 1)
34774   if (D_is_set[macro]) {
34775     # Preserve the white space surrounding the "#".
34776     print prefix "define", macro P[macro] D[macro]
34777     next
34778   } else {
34779     # Replace #undef with comments.  This is necessary, for example,
34780     # in the case of _POSIX_SOURCE, which is predefined and required
34781     # on some systems where configure will not decide to define it.
34782     if (defundef == "undef") {
34783       print "/*", prefix defundef, macro, "*/"
34784       next
34785     }
34786   }
34787 }
34788 { print }
34789 _ACAWK
34790 _ACEOF
34791 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34792   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34793 fi # test -n "$CONFIG_HEADERS"
34794
34795
34796 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
34797 shift
34798 for ac_tag
34799 do
34800   case $ac_tag in
34801   :[FHLC]) ac_mode=$ac_tag; continue;;
34802   esac
34803   case $ac_mode$ac_tag in
34804   :[FHL]*:*);;
34805   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34806   :[FH]-) ac_tag=-:-;;
34807   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34808   esac
34809   ac_save_IFS=$IFS
34810   IFS=:
34811   set x $ac_tag
34812   IFS=$ac_save_IFS
34813   shift
34814   ac_file=$1
34815   shift
34816
34817   case $ac_mode in
34818   :L) ac_source=$1;;
34819   :[FH])
34820     ac_file_inputs=
34821     for ac_f
34822     do
34823       case $ac_f in
34824       -) ac_f="$ac_tmp/stdin";;
34825       *) # Look for the file first in the build tree, then in the source tree
34826          # (if the path is not absolute).  The absolute path cannot be DOS-style,
34827          # because $ac_f cannot contain `:'.
34828          test -f "$ac_f" ||
34829            case $ac_f in
34830            [\\/$]*) false;;
34831            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34832            esac ||
34833            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34834       esac
34835       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34836       as_fn_append ac_file_inputs " '$ac_f'"
34837     done
34838
34839     # Let's still pretend it is `configure' which instantiates (i.e., don't
34840     # use $as_me), people would be surprised to read:
34841     #    /* config.h.  Generated by config.status.  */
34842     configure_input='Generated from '`
34843           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34844         `' by configure.'
34845     if test x"$ac_file" != x-; then
34846       configure_input="$ac_file.  $configure_input"
34847       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34848 $as_echo "$as_me: creating $ac_file" >&6;}
34849     fi
34850     # Neutralize special characters interpreted by sed in replacement strings.
34851     case $configure_input in #(
34852     *\&* | *\|* | *\\* )
34853        ac_sed_conf_input=`$as_echo "$configure_input" |
34854        sed 's/[\\\\&|]/\\\\&/g'`;; #(
34855     *) ac_sed_conf_input=$configure_input;;
34856     esac
34857
34858     case $ac_tag in
34859     *:-:* | *:-) cat >"$ac_tmp/stdin" \
34860       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34861     esac
34862     ;;
34863   esac
34864
34865   ac_dir=`$as_dirname -- "$ac_file" ||
34866 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34867          X"$ac_file" : 'X\(//\)[^/]' \| \
34868          X"$ac_file" : 'X\(//\)$' \| \
34869          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34870 $as_echo X"$ac_file" |
34871     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34872             s//\1/
34873             q
34874           }
34875           /^X\(\/\/\)[^/].*/{
34876             s//\1/
34877             q
34878           }
34879           /^X\(\/\/\)$/{
34880             s//\1/
34881             q
34882           }
34883           /^X\(\/\).*/{
34884             s//\1/
34885             q
34886           }
34887           s/.*/./; q'`
34888   as_dir="$ac_dir"; as_fn_mkdir_p
34889   ac_builddir=.
34890
34891 case "$ac_dir" in
34892 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34893 *)
34894   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34895   # A ".." for each directory in $ac_dir_suffix.
34896   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34897   case $ac_top_builddir_sub in
34898   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34899   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34900   esac ;;
34901 esac
34902 ac_abs_top_builddir=$ac_pwd
34903 ac_abs_builddir=$ac_pwd$ac_dir_suffix
34904 # for backward compatibility:
34905 ac_top_builddir=$ac_top_build_prefix
34906
34907 case $srcdir in
34908   .)  # We are building in place.
34909     ac_srcdir=.
34910     ac_top_srcdir=$ac_top_builddir_sub
34911     ac_abs_top_srcdir=$ac_pwd ;;
34912   [\\/]* | ?:[\\/]* )  # Absolute name.
34913     ac_srcdir=$srcdir$ac_dir_suffix;
34914     ac_top_srcdir=$srcdir
34915     ac_abs_top_srcdir=$srcdir ;;
34916   *) # Relative name.
34917     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34918     ac_top_srcdir=$ac_top_build_prefix$srcdir
34919     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34920 esac
34921 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34922
34923
34924   case $ac_mode in
34925   :F)
34926   #
34927   # CONFIG_FILE
34928   #
34929
34930   case $INSTALL in
34931   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
34932   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
34933   esac
34934   ac_MKDIR_P=$MKDIR_P
34935   case $MKDIR_P in
34936   [\\/$]* | ?:[\\/]* ) ;;
34937   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
34938   esac
34939 _ACEOF
34940
34941 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34942 # If the template does not know about datarootdir, expand it.
34943 # FIXME: This hack should be removed a few years after 2.60.
34944 ac_datarootdir_hack=; ac_datarootdir_seen=
34945 ac_sed_dataroot='
34946 /datarootdir/ {
34947   p
34948   q
34949 }
34950 /@datadir@/p
34951 /@docdir@/p
34952 /@infodir@/p
34953 /@localedir@/p
34954 /@mandir@/p'
34955 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34956 *datarootdir*) ac_datarootdir_seen=yes;;
34957 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34958   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34959 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34960 _ACEOF
34961 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34962   ac_datarootdir_hack='
34963   s&@datadir@&$datadir&g
34964   s&@docdir@&$docdir&g
34965   s&@infodir@&$infodir&g
34966   s&@localedir@&$localedir&g
34967   s&@mandir@&$mandir&g
34968   s&\\\${datarootdir}&$datarootdir&g' ;;
34969 esac
34970 _ACEOF
34971
34972 # Neutralize VPATH when `$srcdir' = `.'.
34973 # Shell code in configure.ac might set extrasub.
34974 # FIXME: do we really want to maintain this feature?
34975 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34976 ac_sed_extra="$ac_vpsub
34977 $extrasub
34978 _ACEOF
34979 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34980 :t
34981 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34982 s|@configure_input@|$ac_sed_conf_input|;t t
34983 s&@top_builddir@&$ac_top_builddir_sub&;t t
34984 s&@top_build_prefix@&$ac_top_build_prefix&;t t
34985 s&@srcdir@&$ac_srcdir&;t t
34986 s&@abs_srcdir@&$ac_abs_srcdir&;t t
34987 s&@top_srcdir@&$ac_top_srcdir&;t t
34988 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34989 s&@builddir@&$ac_builddir&;t t
34990 s&@abs_builddir@&$ac_abs_builddir&;t t
34991 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34992 s&@INSTALL@&$ac_INSTALL&;t t
34993 s&@MKDIR_P@&$ac_MKDIR_P&;t t
34994 $ac_datarootdir_hack
34995 "
34996 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
34997 if $ac_cs_awk_getline; then
34998   $AWK -f "$ac_tmp/subs.awk"
34999 else
35000   $AWK -f "$ac_tmp/subs.awk" | $SHELL
35001 fi \
35002   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35003
35004 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
35005   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
35006   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
35007       "$ac_tmp/out"`; test -z "$ac_out"; } &&
35008   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35009 which seems to be undefined.  Please make sure it is defined" >&5
35010 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35011 which seems to be undefined.  Please make sure it is defined" >&2;}
35012
35013   rm -f "$ac_tmp/stdin"
35014   case $ac_file in
35015   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
35016   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
35017   esac \
35018   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35019  ;;
35020   :H)
35021   #
35022   # CONFIG_HEADER
35023   #
35024   if test x"$ac_file" != x-; then
35025     {
35026       $as_echo "/* $configure_input  */" \
35027       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
35028     } >"$ac_tmp/config.h" \
35029       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35030     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
35031       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
35032 $as_echo "$as_me: $ac_file is unchanged" >&6;}
35033     else
35034       rm -f "$ac_file"
35035       mv "$ac_tmp/config.h" "$ac_file" \
35036         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35037     fi
35038   else
35039     $as_echo "/* $configure_input  */" \
35040       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
35041       || as_fn_error $? "could not create -" "$LINENO" 5
35042   fi
35043 # Compute "$ac_file"'s index in $config_headers.
35044 _am_arg="$ac_file"
35045 _am_stamp_count=1
35046 for _am_header in $config_headers :; do
35047   case $_am_header in
35048     $_am_arg | $_am_arg:* )
35049       break ;;
35050     * )
35051       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
35052   esac
35053 done
35054 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
35055 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35056          X"$_am_arg" : 'X\(//\)[^/]' \| \
35057          X"$_am_arg" : 'X\(//\)$' \| \
35058          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
35059 $as_echo X"$_am_arg" |
35060     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35061             s//\1/
35062             q
35063           }
35064           /^X\(\/\/\)[^/].*/{
35065             s//\1/
35066             q
35067           }
35068           /^X\(\/\/\)$/{
35069             s//\1/
35070             q
35071           }
35072           /^X\(\/\).*/{
35073             s//\1/
35074             q
35075           }
35076           s/.*/./; q'`/stamp-h$_am_stamp_count
35077  ;;
35078
35079   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
35080 $as_echo "$as_me: executing $ac_file commands" >&6;}
35081  ;;
35082   esac
35083
35084
35085   case $ac_file$ac_mode in
35086     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
35087   # Older Autoconf quotes --file arguments for eval, but not when files
35088   # are listed without --file.  Let's play safe and only enable the eval
35089   # if we detect the quoting.
35090   case $CONFIG_FILES in
35091   *\'*) eval set x "$CONFIG_FILES" ;;
35092   *)   set x $CONFIG_FILES ;;
35093   esac
35094   shift
35095   for mf
35096   do
35097     # Strip MF so we end up with the name of the file.
35098     mf=`echo "$mf" | sed -e 's/:.*$//'`
35099     # Check whether this is an Automake generated Makefile or not.
35100     # We used to match only the files named 'Makefile.in', but
35101     # some people rename them; so instead we look at the file content.
35102     # Grep'ing the first line is not enough: some people post-process
35103     # each Makefile.in and add a new line on top of each file to say so.
35104     # Grep'ing the whole file is not good either: AIX grep has a line
35105     # limit of 2048, but all sed's we know have understand at least 4000.
35106     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
35107       dirpart=`$as_dirname -- "$mf" ||
35108 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35109          X"$mf" : 'X\(//\)[^/]' \| \
35110          X"$mf" : 'X\(//\)$' \| \
35111          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
35112 $as_echo X"$mf" |
35113     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35114             s//\1/
35115             q
35116           }
35117           /^X\(\/\/\)[^/].*/{
35118             s//\1/
35119             q
35120           }
35121           /^X\(\/\/\)$/{
35122             s//\1/
35123             q
35124           }
35125           /^X\(\/\).*/{
35126             s//\1/
35127             q
35128           }
35129           s/.*/./; q'`
35130     else
35131       continue
35132     fi
35133     # Extract the definition of DEPDIR, am__include, and am__quote
35134     # from the Makefile without running 'make'.
35135     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
35136     test -z "$DEPDIR" && continue
35137     am__include=`sed -n 's/^am__include = //p' < "$mf"`
35138     test -z "$am__include" && continue
35139     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
35140     # Find all dependency output files, they are included files with
35141     # $(DEPDIR) in their names.  We invoke sed twice because it is the
35142     # simplest approach to changing $(DEPDIR) to its actual value in the
35143     # expansion.
35144     for file in `sed -n "
35145       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
35146          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
35147       # Make sure the directory exists.
35148       test -f "$dirpart/$file" && continue
35149       fdir=`$as_dirname -- "$file" ||
35150 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35151          X"$file" : 'X\(//\)[^/]' \| \
35152          X"$file" : 'X\(//\)$' \| \
35153          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
35154 $as_echo X"$file" |
35155     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35156             s//\1/
35157             q
35158           }
35159           /^X\(\/\/\)[^/].*/{
35160             s//\1/
35161             q
35162           }
35163           /^X\(\/\/\)$/{
35164             s//\1/
35165             q
35166           }
35167           /^X\(\/\).*/{
35168             s//\1/
35169             q
35170           }
35171           s/.*/./; q'`
35172       as_dir=$dirpart/$fdir; as_fn_mkdir_p
35173       # echo "creating $dirpart/$file"
35174       echo '# dummy' > "$dirpart/$file"
35175     done
35176   done
35177 }
35178  ;;
35179     "libtool":C)
35180
35181     # See if we are running on zsh, and set the options that allow our
35182     # commands through without removal of \ escapes.
35183     if test -n "${ZSH_VERSION+set}"; then
35184       setopt NO_GLOB_SUBST
35185     fi
35186
35187     cfgfile=${ofile}T
35188     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
35189     $RM "$cfgfile"
35190
35191     cat <<_LT_EOF >> "$cfgfile"
35192 #! $SHELL
35193 # Generated automatically by $as_me ($PACKAGE) $VERSION
35194 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
35195 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
35196
35197 # Provide generalized library-building support services.
35198 # Written by Gordon Matzigkeit, 1996
35199
35200 # Copyright (C) 2014 Free Software Foundation, Inc.
35201 # This is free software; see the source for copying conditions.  There is NO
35202 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35203
35204 # GNU Libtool is free software; you can redistribute it and/or modify
35205 # it under the terms of the GNU General Public License as published by
35206 # the Free Software Foundation; either version 2 of of the License, or
35207 # (at your option) any later version.
35208 #
35209 # As a special exception to the GNU General Public License, if you
35210 # distribute this file as part of a program or library that is built
35211 # using GNU Libtool, you may include this file under the  same
35212 # distribution terms that you use for the rest of that program.
35213 #
35214 # GNU Libtool is distributed in the hope that it will be useful, but
35215 # WITHOUT ANY WARRANTY; without even the implied warranty of
35216 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
35217 # GNU General Public License for more details.
35218 #
35219 # You should have received a copy of the GNU General Public License
35220 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
35221
35222
35223 # The names of the tagged configurations supported by this script.
35224 available_tags=''
35225
35226 # Configured defaults for sys_lib_dlsearch_path munging.
35227 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
35228
35229 # ### BEGIN LIBTOOL CONFIG
35230
35231 # Whether or not to build shared libraries.
35232 build_libtool_libs=$enable_shared
35233
35234 # Which release of libtool.m4 was used?
35235 macro_version=$macro_version
35236 macro_revision=$macro_revision
35237
35238 # Whether or not to build static libraries.
35239 build_old_libs=$enable_static
35240
35241 # What type of objects to build.
35242 pic_mode=$pic_mode
35243
35244 # Whether or not to optimize for fast installation.
35245 fast_install=$enable_fast_install
35246
35247 # Shared archive member basename,for filename based shared library versioning on AIX.
35248 shared_archive_member_spec=$shared_archive_member_spec
35249
35250 # Shell to use when invoking shell scripts.
35251 SHELL=$lt_SHELL
35252
35253 # An echo program that protects backslashes.
35254 ECHO=$lt_ECHO
35255
35256 # The PATH separator for the build system.
35257 PATH_SEPARATOR=$lt_PATH_SEPARATOR
35258
35259 # The host system.
35260 host_alias=$host_alias
35261 host=$host
35262 host_os=$host_os
35263
35264 # The build system.
35265 build_alias=$build_alias
35266 build=$build
35267 build_os=$build_os
35268
35269 # A sed program that does not truncate output.
35270 SED=$lt_SED
35271
35272 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
35273 Xsed="\$SED -e 1s/^X//"
35274
35275 # A grep program that handles long lines.
35276 GREP=$lt_GREP
35277
35278 # An ERE matcher.
35279 EGREP=$lt_EGREP
35280
35281 # A literal string matcher.
35282 FGREP=$lt_FGREP
35283
35284 # A BSD- or MS-compatible name lister.
35285 NM=$lt_NM
35286
35287 # Whether we need soft or hard links.
35288 LN_S=$lt_LN_S
35289
35290 # What is the maximum length of a command?
35291 max_cmd_len=$max_cmd_len
35292
35293 # Object file suffix (normally "o").
35294 objext=$ac_objext
35295
35296 # Executable file suffix (normally "").
35297 exeext=$exeext
35298
35299 # whether the shell understands "unset".
35300 lt_unset=$lt_unset
35301
35302 # turn spaces into newlines.
35303 SP2NL=$lt_lt_SP2NL
35304
35305 # turn newlines into spaces.
35306 NL2SP=$lt_lt_NL2SP
35307
35308 # convert \$build file names to \$host format.
35309 to_host_file_cmd=$lt_cv_to_host_file_cmd
35310
35311 # convert \$build files to toolchain format.
35312 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
35313
35314 # An object symbol dumper.
35315 OBJDUMP=$lt_OBJDUMP
35316
35317 # Method to check whether dependent libraries are shared objects.
35318 deplibs_check_method=$lt_deplibs_check_method
35319
35320 # Command to use when deplibs_check_method = "file_magic".
35321 file_magic_cmd=$lt_file_magic_cmd
35322
35323 # How to find potential files when deplibs_check_method = "file_magic".
35324 file_magic_glob=$lt_file_magic_glob
35325
35326 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
35327 want_nocaseglob=$lt_want_nocaseglob
35328
35329 # DLL creation program.
35330 DLLTOOL=$lt_DLLTOOL
35331
35332 # Command to associate shared and link libraries.
35333 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
35334
35335 # The archiver.
35336 AR=$lt_AR
35337
35338 # Flags to create an archive.
35339 AR_FLAGS=$lt_AR_FLAGS
35340
35341 # How to feed a file listing to the archiver.
35342 archiver_list_spec=$lt_archiver_list_spec
35343
35344 # A symbol stripping program.
35345 STRIP=$lt_STRIP
35346
35347 # Commands used to install an old-style archive.
35348 RANLIB=$lt_RANLIB
35349 old_postinstall_cmds=$lt_old_postinstall_cmds
35350 old_postuninstall_cmds=$lt_old_postuninstall_cmds
35351
35352 # Whether to use a lock for old archive extraction.
35353 lock_old_archive_extraction=$lock_old_archive_extraction
35354
35355 # A C compiler.
35356 LTCC=$lt_CC
35357
35358 # LTCC compiler flags.
35359 LTCFLAGS=$lt_CFLAGS
35360
35361 # Take the output of nm and produce a listing of raw symbols and C names.
35362 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
35363
35364 # Transform the output of nm in a proper C declaration.
35365 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
35366
35367 # Transform the output of nm into a list of symbols to manually relocate.
35368 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
35369
35370 # Transform the output of nm in a C name address pair.
35371 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
35372
35373 # Transform the output of nm in a C name address pair when lib prefix is needed.
35374 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
35375
35376 # The name lister interface.
35377 nm_interface=$lt_lt_cv_nm_interface
35378
35379 # Specify filename containing input files for \$NM.
35380 nm_file_list_spec=$lt_nm_file_list_spec
35381
35382 # The root where to search for dependent libraries,and where our libraries should be installed.
35383 lt_sysroot=$lt_sysroot
35384
35385 # Command to truncate a binary pipe.
35386 lt_truncate_bin=$lt_lt_cv_truncate_bin
35387
35388 # The name of the directory that contains temporary libtool files.
35389 objdir=$objdir
35390
35391 # Used to examine libraries when file_magic_cmd begins with "file".
35392 MAGIC_CMD=$MAGIC_CMD
35393
35394 # Must we lock files when doing compilation?
35395 need_locks=$lt_need_locks
35396
35397 # Manifest tool.
35398 MANIFEST_TOOL=$lt_MANIFEST_TOOL
35399
35400 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
35401 DSYMUTIL=$lt_DSYMUTIL
35402
35403 # Tool to change global to local symbols on Mac OS X.
35404 NMEDIT=$lt_NMEDIT
35405
35406 # Tool to manipulate fat objects and archives on Mac OS X.
35407 LIPO=$lt_LIPO
35408
35409 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
35410 OTOOL=$lt_OTOOL
35411
35412 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
35413 OTOOL64=$lt_OTOOL64
35414
35415 # Old archive suffix (normally "a").
35416 libext=$libext
35417
35418 # Shared library suffix (normally ".so").
35419 shrext_cmds=$lt_shrext_cmds
35420
35421 # The commands to extract the exported symbol list from a shared archive.
35422 extract_expsyms_cmds=$lt_extract_expsyms_cmds
35423
35424 # Variables whose values should be saved in libtool wrapper scripts and
35425 # restored at link time.
35426 variables_saved_for_relink=$lt_variables_saved_for_relink
35427
35428 # Do we need the "lib" prefix for modules?
35429 need_lib_prefix=$need_lib_prefix
35430
35431 # Do we need a version for libraries?
35432 need_version=$need_version
35433
35434 # Library versioning type.
35435 version_type=$version_type
35436
35437 # Shared library runtime path variable.
35438 runpath_var=$runpath_var
35439
35440 # Shared library path variable.
35441 shlibpath_var=$shlibpath_var
35442
35443 # Is shlibpath searched before the hard-coded library search path?
35444 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
35445
35446 # Format of library name prefix.
35447 libname_spec=$lt_libname_spec
35448
35449 # List of archive names.  First name is the real one, the rest are links.
35450 # The last name is the one that the linker finds with -lNAME
35451 library_names_spec=$lt_library_names_spec
35452
35453 # The coded name of the library, if different from the real name.
35454 soname_spec=$lt_soname_spec
35455
35456 # Permission mode override for installation of shared libraries.
35457 install_override_mode=$lt_install_override_mode
35458
35459 # Command to use after installation of a shared archive.
35460 postinstall_cmds=$lt_postinstall_cmds
35461
35462 # Command to use after uninstallation of a shared archive.
35463 postuninstall_cmds=$lt_postuninstall_cmds
35464
35465 # Commands used to finish a libtool library installation in a directory.
35466 finish_cmds=$lt_finish_cmds
35467
35468 # As "finish_cmds", except a single script fragment to be evaled but
35469 # not shown.
35470 finish_eval=$lt_finish_eval
35471
35472 # Whether we should hardcode library paths into libraries.
35473 hardcode_into_libs=$hardcode_into_libs
35474
35475 # Compile-time system search path for libraries.
35476 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
35477
35478 # Detected run-time system search path for libraries.
35479 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
35480
35481 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
35482 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
35483
35484 # Whether dlopen is supported.
35485 dlopen_support=$enable_dlopen
35486
35487 # Whether dlopen of programs is supported.
35488 dlopen_self=$enable_dlopen_self
35489
35490 # Whether dlopen of statically linked programs is supported.
35491 dlopen_self_static=$enable_dlopen_self_static
35492
35493 # Commands to strip libraries.
35494 old_striplib=$lt_old_striplib
35495 striplib=$lt_striplib
35496
35497
35498 # The linker used to build libraries.
35499 LD=$lt_LD
35500
35501 # How to create reloadable object files.
35502 reload_flag=$lt_reload_flag
35503 reload_cmds=$lt_reload_cmds
35504
35505 # Commands used to build an old-style archive.
35506 old_archive_cmds=$lt_old_archive_cmds
35507
35508 # A language specific compiler.
35509 CC=$lt_compiler
35510
35511 # Is the compiler the GNU compiler?
35512 with_gcc=$GCC
35513
35514 # Compiler flag to turn off builtin functions.
35515 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
35516
35517 # Additional compiler flags for building library objects.
35518 pic_flag=$lt_lt_prog_compiler_pic
35519
35520 # How to pass a linker flag through the compiler.
35521 wl=$lt_lt_prog_compiler_wl
35522
35523 # Compiler flag to prevent dynamic linking.
35524 link_static_flag=$lt_lt_prog_compiler_static
35525
35526 # Does compiler simultaneously support -c and -o options?
35527 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
35528
35529 # Whether or not to add -lc for building shared libraries.
35530 build_libtool_need_lc=$archive_cmds_need_lc
35531
35532 # Whether or not to disallow shared libs when runtime libs are static.
35533 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
35534
35535 # Compiler flag to allow reflexive dlopens.
35536 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
35537
35538 # Compiler flag to generate shared objects directly from archives.
35539 whole_archive_flag_spec=$lt_whole_archive_flag_spec
35540
35541 # Whether the compiler copes with passing no objects directly.
35542 compiler_needs_object=$lt_compiler_needs_object
35543
35544 # Create an old-style archive from a shared archive.
35545 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
35546
35547 # Create a temporary old-style archive to link instead of a shared archive.
35548 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
35549
35550 # Commands used to build a shared archive.
35551 archive_cmds=$lt_archive_cmds
35552 archive_expsym_cmds=$lt_archive_expsym_cmds
35553
35554 # Commands used to build a loadable module if different from building
35555 # a shared archive.
35556 module_cmds=$lt_module_cmds
35557 module_expsym_cmds=$lt_module_expsym_cmds
35558
35559 # Whether we are building with GNU ld or not.
35560 with_gnu_ld=$lt_with_gnu_ld
35561
35562 # Flag that allows shared libraries with undefined symbols to be built.
35563 allow_undefined_flag=$lt_allow_undefined_flag
35564
35565 # Flag that enforces no undefined symbols.
35566 no_undefined_flag=$lt_no_undefined_flag
35567
35568 # Flag to hardcode \$libdir into a binary during linking.
35569 # This must work even if \$libdir does not exist
35570 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
35571
35572 # Whether we need a single "-rpath" flag with a separated argument.
35573 hardcode_libdir_separator=$lt_hardcode_libdir_separator
35574
35575 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
35576 # DIR into the resulting binary.
35577 hardcode_direct=$hardcode_direct
35578
35579 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
35580 # DIR into the resulting binary and the resulting library dependency is
35581 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
35582 # library is relocated.
35583 hardcode_direct_absolute=$hardcode_direct_absolute
35584
35585 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
35586 # into the resulting binary.
35587 hardcode_minus_L=$hardcode_minus_L
35588
35589 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
35590 # into the resulting binary.
35591 hardcode_shlibpath_var=$hardcode_shlibpath_var
35592
35593 # Set to "yes" if building a shared library automatically hardcodes DIR
35594 # into the library and all subsequent libraries and executables linked
35595 # against it.
35596 hardcode_automatic=$hardcode_automatic
35597
35598 # Set to yes if linker adds runtime paths of dependent libraries
35599 # to runtime path list.
35600 inherit_rpath=$inherit_rpath
35601
35602 # Whether libtool must link a program against all its dependency libraries.
35603 link_all_deplibs=$link_all_deplibs
35604
35605 # Set to "yes" if exported symbols are required.
35606 always_export_symbols=$always_export_symbols
35607
35608 # The commands to list exported symbols.
35609 export_symbols_cmds=$lt_export_symbols_cmds
35610
35611 # Symbols that should not be listed in the preloaded symbols.
35612 exclude_expsyms=$lt_exclude_expsyms
35613
35614 # Symbols that must always be exported.
35615 include_expsyms=$lt_include_expsyms
35616
35617 # Commands necessary for linking programs (against libraries) with templates.
35618 prelink_cmds=$lt_prelink_cmds
35619
35620 # Commands necessary for finishing linking programs.
35621 postlink_cmds=$lt_postlink_cmds
35622
35623 # Specify filename containing input files.
35624 file_list_spec=$lt_file_list_spec
35625
35626 # How to hardcode a shared library path into an executable.
35627 hardcode_action=$hardcode_action
35628
35629 # ### END LIBTOOL CONFIG
35630
35631 _LT_EOF
35632
35633     cat <<'_LT_EOF' >> "$cfgfile"
35634
35635 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
35636
35637 # func_munge_path_list VARIABLE PATH
35638 # -----------------------------------
35639 # VARIABLE is name of variable containing _space_ separated list of
35640 # directories to be munged by the contents of PATH, which is string
35641 # having a format:
35642 # "DIR[:DIR]:"
35643 #       string "DIR[ DIR]" will be prepended to VARIABLE
35644 # ":DIR[:DIR]"
35645 #       string "DIR[ DIR]" will be appended to VARIABLE
35646 # "DIRP[:DIRP]::[DIRA:]DIRA"
35647 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
35648 #       "DIRA[ DIRA]" will be appended to VARIABLE
35649 # "DIR[:DIR]"
35650 #       VARIABLE will be replaced by "DIR[ DIR]"
35651 func_munge_path_list ()
35652 {
35653     case x$2 in
35654     x)
35655         ;;
35656     *:)
35657         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
35658         ;;
35659     x:*)
35660         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
35661         ;;
35662     *::*)
35663         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
35664         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
35665         ;;
35666     *)
35667         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
35668         ;;
35669     esac
35670 }
35671
35672
35673 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
35674 func_cc_basename ()
35675 {
35676     for cc_temp in $*""; do
35677       case $cc_temp in
35678         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
35679         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
35680         \-*) ;;
35681         *) break;;
35682       esac
35683     done
35684     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
35685 }
35686
35687
35688 # ### END FUNCTIONS SHARED WITH CONFIGURE
35689
35690 _LT_EOF
35691
35692   case $host_os in
35693   aix3*)
35694     cat <<\_LT_EOF >> "$cfgfile"
35695 # AIX sometimes has problems with the GCC collect2 program.  For some
35696 # reason, if we set the COLLECT_NAMES environment variable, the problems
35697 # vanish in a puff of smoke.
35698 if test set != "${COLLECT_NAMES+set}"; then
35699   COLLECT_NAMES=
35700   export COLLECT_NAMES
35701 fi
35702 _LT_EOF
35703     ;;
35704   esac
35705
35706
35707 ltmain=$ac_aux_dir/ltmain.sh
35708
35709
35710   # We use sed instead of cat because bash on DJGPP gets confused if
35711   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
35712   # text mode, it properly converts lines to CR/LF.  This bash problem
35713   # is reportedly fixed, but why not run on old versions too?
35714   sed '$q' "$ltmain" >> "$cfgfile" \
35715      || (rm -f "$cfgfile"; exit 1)
35716
35717    mv -f "$cfgfile" "$ofile" ||
35718     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
35719   chmod +x "$ofile"
35720
35721  ;;
35722     "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 ;;
35723     "ntpdc/nl.pl":F) chmod +x ntpdc/nl.pl ;;
35724     "scripts/build/genAuthors":F) chmod +x scripts/build/genAuthors ;;
35725     "scripts/build/mkver":F) chmod +x scripts/build/mkver ;;
35726     "scripts/calc_tickadj/calc_tickadj":F) chmod +x scripts/calc_tickadj/calc_tickadj ;;
35727     "scripts/ntp-wait/ntp-wait":F) chmod +x scripts/ntp-wait/ntp-wait ;;
35728     "scripts/ntpsweep/ntpsweep":F) chmod +x scripts/ntpsweep/ntpsweep ;;
35729     "scripts/ntptrace/ntptrace":F) chmod +x scripts/ntptrace/ntptrace ;;
35730     "scripts/ntpver":F) chmod +x scripts/ntpver ;;
35731     "scripts/plot_summary":F) chmod +x scripts/plot_summary ;;
35732     "scripts/summary":F) chmod +x scripts/summary ;;
35733     "scripts/update-leap/update-leap":F) chmod +x scripts/update-leap/update-leap ;;
35734
35735   esac
35736 done # for ac_tag
35737
35738
35739 as_fn_exit 0
35740 _ACEOF
35741 ac_clean_files=$ac_clean_files_save
35742
35743 test $ac_write_fail = 0 ||
35744   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
35745
35746
35747 # configure is writing to config.log, and then calls config.status.
35748 # config.status does its own redirection, appending to config.log.
35749 # Unfortunately, on DOS this fails, as config.log is still kept open
35750 # by configure, so config.status won't be able to write to it; its
35751 # output is simply discarded.  So we exec the FD to /dev/null,
35752 # effectively closing config.log, so it can be properly (re)opened and
35753 # appended to by config.status.  When coming back to configure, we
35754 # need to make the FD available again.
35755 if test "$no_create" != yes; then
35756   ac_cs_success=:
35757   ac_config_status_args=
35758   test "$silent" = yes &&
35759     ac_config_status_args="$ac_config_status_args --quiet"
35760   exec 5>/dev/null
35761   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
35762   exec 5>>config.log
35763   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
35764   # would make configure fail if this is the last instruction.
35765   $ac_cs_success || as_fn_exit 1
35766 fi
35767
35768 #
35769 # CONFIG_SUBDIRS section.
35770 #
35771 if test "$no_recursion" != yes; then
35772
35773   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
35774   # so they do not pile up.
35775   ac_sub_configure_args=
35776   ac_prev=
35777   eval "set x $ac_configure_args"
35778   shift
35779   for ac_arg
35780   do
35781     if test -n "$ac_prev"; then
35782       ac_prev=
35783       continue
35784     fi
35785     case $ac_arg in
35786     -cache-file | --cache-file | --cache-fil | --cache-fi \
35787     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
35788       ac_prev=cache_file ;;
35789     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
35790     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
35791     | --c=*)
35792       ;;
35793     --config-cache | -C)
35794       ;;
35795     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
35796       ac_prev=srcdir ;;
35797     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
35798       ;;
35799     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
35800       ac_prev=prefix ;;
35801     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
35802       ;;
35803     --disable-option-checking)
35804       ;;
35805     *)
35806       case $ac_arg in
35807       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
35808       esac
35809       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
35810     esac
35811   done
35812
35813   # Always prepend --prefix to ensure using the same prefix
35814   # in subdir configurations.
35815   ac_arg="--prefix=$prefix"
35816   case $ac_arg in
35817   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
35818   esac
35819   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
35820
35821   # Pass --silent
35822   if test "$silent" = yes; then
35823     ac_sub_configure_args="--silent $ac_sub_configure_args"
35824   fi
35825
35826   # Always prepend --disable-option-checking to silence warnings, since
35827   # different subdirs can have different --enable and --with options.
35828   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
35829
35830   ac_popdir=`pwd`
35831   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
35832
35833     # Do not complain, so a configure script can configure whichever
35834     # parts of a large source tree are present.
35835     test -d "$srcdir/$ac_dir" || continue
35836
35837     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
35838     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
35839     $as_echo "$ac_msg" >&6
35840     as_dir="$ac_dir"; as_fn_mkdir_p
35841     ac_builddir=.
35842
35843 case "$ac_dir" in
35844 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
35845 *)
35846   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
35847   # A ".." for each directory in $ac_dir_suffix.
35848   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
35849   case $ac_top_builddir_sub in
35850   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
35851   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
35852   esac ;;
35853 esac
35854 ac_abs_top_builddir=$ac_pwd
35855 ac_abs_builddir=$ac_pwd$ac_dir_suffix
35856 # for backward compatibility:
35857 ac_top_builddir=$ac_top_build_prefix
35858
35859 case $srcdir in
35860   .)  # We are building in place.
35861     ac_srcdir=.
35862     ac_top_srcdir=$ac_top_builddir_sub
35863     ac_abs_top_srcdir=$ac_pwd ;;
35864   [\\/]* | ?:[\\/]* )  # Absolute name.
35865     ac_srcdir=$srcdir$ac_dir_suffix;
35866     ac_top_srcdir=$srcdir
35867     ac_abs_top_srcdir=$srcdir ;;
35868   *) # Relative name.
35869     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
35870     ac_top_srcdir=$ac_top_build_prefix$srcdir
35871     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
35872 esac
35873 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
35874
35875
35876     cd "$ac_dir"
35877
35878     # Check for guested configure; otherwise get Cygnus style configure.
35879     if test -f "$ac_srcdir/configure.gnu"; then
35880       ac_sub_configure=$ac_srcdir/configure.gnu
35881     elif test -f "$ac_srcdir/configure"; then
35882       ac_sub_configure=$ac_srcdir/configure
35883     elif test -f "$ac_srcdir/configure.in"; then
35884       # This should be Cygnus configure.
35885       ac_sub_configure=$ac_aux_dir/configure
35886     else
35887       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
35888 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
35889       ac_sub_configure=
35890     fi
35891
35892     # The recursion is here.
35893     if test -n "$ac_sub_configure"; then
35894       # Make the cache file name correct relative to the subdirectory.
35895       case $cache_file in
35896       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
35897       *) # Relative name.
35898         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
35899       esac
35900
35901       { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
35902 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
35903       # The eval makes quoting arguments work.
35904       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
35905            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
35906         as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
35907     fi
35908
35909     cd "$ac_popdir"
35910   done
35911 fi
35912 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
35913   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
35914 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
35915 fi
35916