xref: /freebsd/contrib/ntp/sntp/configure (revision f5f40dd63bc7acbb5312b26ac1ea1103c12352a6)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.71 for sntp 4.2.8p18.
4#
5# Report bugs to <https://bugs.ntp.org/>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
9# Inc.
10#
11#
12# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
14## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
17
18# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
20as_nop=:
21if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
22then :
23  emulate sh
24  NULLCMD=:
25  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26  # is contrary to our usage.  Disable this feature.
27  alias -g '${1+"$@"}'='"$@"'
28  setopt NO_GLOB_SUBST
29else $as_nop
30  case `(set -o) 2>/dev/null` in #(
31  *posix*) :
32    set -o posix ;; #(
33  *) :
34     ;;
35esac
36fi
37
38
39
40# Reset variables that may have inherited troublesome values from
41# the environment.
42
43# IFS needs to be set, to space, tab, and newline, in precisely that order.
44# (If _AS_PATH_WALK were called with IFS unset, it would have the
45# side effect of setting IFS to empty, thus disabling word splitting.)
46# Quoting is to prevent editors from complaining about space-tab.
47as_nl='
48'
49export as_nl
50IFS=" ""	$as_nl"
51
52PS1='$ '
53PS2='> '
54PS4='+ '
55
56# Ensure predictable behavior from utilities with locale-dependent output.
57LC_ALL=C
58export LC_ALL
59LANGUAGE=C
60export LANGUAGE
61
62# We cannot yet rely on "unset" to work, but we need these variables
63# to be unset--not just set to an empty or harmless value--now, to
64# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
65# also avoids known problems related to "unset" and subshell syntax
66# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
67for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
68do eval test \${$as_var+y} \
69  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
70done
71
72# Ensure that fds 0, 1, and 2 are open.
73if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
74if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
75if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
76
77# The user is always right.
78if ${PATH_SEPARATOR+false} :; then
79  PATH_SEPARATOR=:
80  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82      PATH_SEPARATOR=';'
83  }
84fi
85
86
87# Find who we are.  Look in the path if we contain no directory separator.
88as_myself=
89case $0 in #((
90  *[\\/]* ) as_myself=$0 ;;
91  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
92for as_dir in $PATH
93do
94  IFS=$as_save_IFS
95  case $as_dir in #(((
96    '') as_dir=./ ;;
97    */) ;;
98    *) as_dir=$as_dir/ ;;
99  esac
100    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116
117# Use a proper internal environment variable to ensure we don't fall
118  # into an infinite loop, continuously re-executing ourselves.
119  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
120    _as_can_reexec=no; export _as_can_reexec;
121    # We cannot yet assume a decent shell, so we have to provide a
122# neutralization value for shells without unset; and this also
123# works around shells that cannot unset nonexistent variables.
124# Preserve -v and -x to the replacement shell.
125BASH_ENV=/dev/null
126ENV=/dev/null
127(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
128case $- in # ((((
129  *v*x* | *x*v* ) as_opts=-vx ;;
130  *v* ) as_opts=-v ;;
131  *x* ) as_opts=-x ;;
132  * ) as_opts= ;;
133esac
134exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
135# Admittedly, this is quite paranoid, since all the known shells bail
136# out after a failed `exec'.
137printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
138exit 255
139  fi
140  # We don't want this to propagate to other subprocesses.
141          { _as_can_reexec=; unset _as_can_reexec;}
142if test "x$CONFIG_SHELL" = x; then
143  as_bourne_compatible="as_nop=:
144if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
145then :
146  emulate sh
147  NULLCMD=:
148  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
149  # is contrary to our usage.  Disable this feature.
150  alias -g '\${1+\"\$@\"}'='\"\$@\"'
151  setopt NO_GLOB_SUBST
152else \$as_nop
153  case \`(set -o) 2>/dev/null\` in #(
154  *posix*) :
155    set -o posix ;; #(
156  *) :
157     ;;
158esac
159fi
160"
161  as_required="as_fn_return () { (exit \$1); }
162as_fn_success () { as_fn_return 0; }
163as_fn_failure () { as_fn_return 1; }
164as_fn_ret_success () { return 0; }
165as_fn_ret_failure () { return 1; }
166
167exitcode=0
168as_fn_success || { exitcode=1; echo as_fn_success failed.; }
169as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
170as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
171as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
172if ( set x; as_fn_ret_success y && test x = \"\$1\" )
173then :
174
175else \$as_nop
176  exitcode=1; echo positional parameters were not saved.
177fi
178test x\$exitcode = x0 || exit 1
179blah=\$(echo \$(echo blah))
180test x\"\$blah\" = xblah || exit 1
181test -x / || exit 1"
182  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
183  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
184  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
185  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
186test \$(( 1 + 1 )) = 2 || exit 1
187
188  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
189    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
190    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
191    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
192    PATH=/empty FPATH=/empty; export PATH FPATH
193    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
194      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
195  if (eval "$as_required") 2>/dev/null
196then :
197  as_have_required=yes
198else $as_nop
199  as_have_required=no
200fi
201  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
202then :
203
204else $as_nop
205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
206as_found=false
207for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
208do
209  IFS=$as_save_IFS
210  case $as_dir in #(((
211    '') as_dir=./ ;;
212    */) ;;
213    *) as_dir=$as_dir/ ;;
214  esac
215  as_found=:
216  case $as_dir in #(
217	 /*)
218	   for as_base in sh bash ksh sh5; do
219	     # Try only shells that exist, to save several forks.
220	     as_shell=$as_dir$as_base
221	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
222		    as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
223then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
226then :
227  break 2
228fi
229fi
230	   done;;
231       esac
232  as_found=false
233done
234IFS=$as_save_IFS
235if $as_found
236then :
237
238else $as_nop
239  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
241then :
242  CONFIG_SHELL=$SHELL as_have_required=yes
243fi
244fi
245
246
247      if test "x$CONFIG_SHELL" != x
248then :
249  export CONFIG_SHELL
250             # We cannot yet assume a decent shell, so we have to provide a
251# neutralization value for shells without unset; and this also
252# works around shells that cannot unset nonexistent variables.
253# Preserve -v and -x to the replacement shell.
254BASH_ENV=/dev/null
255ENV=/dev/null
256(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
257case $- in # ((((
258  *v*x* | *x*v* ) as_opts=-vx ;;
259  *v* ) as_opts=-v ;;
260  *x* ) as_opts=-x ;;
261  * ) as_opts= ;;
262esac
263exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
264# Admittedly, this is quite paranoid, since all the known shells bail
265# out after a failed `exec'.
266printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
267exit 255
268fi
269
270    if test x$as_have_required = xno
271then :
272  printf "%s\n" "$0: This script requires a shell more modern than all"
273  printf "%s\n" "$0: the shells that I found on your system."
274  if test ${ZSH_VERSION+y} ; then
275    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
276    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
277  else
278    printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
279$0: https://bugs.ntp.org/ about your system, including any
280$0: error possibly output before this message. Then install
281$0: a modern shell, or manually run the script under such a
282$0: shell if you do have one."
283  fi
284  exit 1
285fi
286fi
287fi
288SHELL=${CONFIG_SHELL-/bin/sh}
289export SHELL
290# Unset more variables known to interfere with behavior of common tools.
291CLICOLOR_FORCE= GREP_OPTIONS=
292unset CLICOLOR_FORCE GREP_OPTIONS
293
294## --------------------- ##
295## M4sh Shell Functions. ##
296## --------------------- ##
297# as_fn_unset VAR
298# ---------------
299# Portably unset VAR.
300as_fn_unset ()
301{
302  { eval $1=; unset $1;}
303}
304as_unset=as_fn_unset
305
306
307# as_fn_set_status STATUS
308# -----------------------
309# Set $? to STATUS, without forking.
310as_fn_set_status ()
311{
312  return $1
313} # as_fn_set_status
314
315# as_fn_exit STATUS
316# -----------------
317# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
318as_fn_exit ()
319{
320  set +e
321  as_fn_set_status $1
322  exit $1
323} # as_fn_exit
324# as_fn_nop
325# ---------
326# Do nothing but, unlike ":", preserve the value of $?.
327as_fn_nop ()
328{
329  return $?
330}
331as_nop=as_fn_nop
332
333# as_fn_mkdir_p
334# -------------
335# Create "$as_dir" as a directory, including parents if necessary.
336as_fn_mkdir_p ()
337{
338
339  case $as_dir in #(
340  -*) as_dir=./$as_dir;;
341  esac
342  test -d "$as_dir" || eval $as_mkdir_p || {
343    as_dirs=
344    while :; do
345      case $as_dir in #(
346      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
347      *) as_qdir=$as_dir;;
348      esac
349      as_dirs="'$as_qdir' $as_dirs"
350      as_dir=`$as_dirname -- "$as_dir" ||
351$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
352	 X"$as_dir" : 'X\(//\)[^/]' \| \
353	 X"$as_dir" : 'X\(//\)$' \| \
354	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
355printf "%s\n" X"$as_dir" |
356    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
357	    s//\1/
358	    q
359	  }
360	  /^X\(\/\/\)[^/].*/{
361	    s//\1/
362	    q
363	  }
364	  /^X\(\/\/\)$/{
365	    s//\1/
366	    q
367	  }
368	  /^X\(\/\).*/{
369	    s//\1/
370	    q
371	  }
372	  s/.*/./; q'`
373      test -d "$as_dir" && break
374    done
375    test -z "$as_dirs" || eval "mkdir $as_dirs"
376  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
377
378
379} # as_fn_mkdir_p
380
381# as_fn_executable_p FILE
382# -----------------------
383# Test if FILE is an executable regular file.
384as_fn_executable_p ()
385{
386  test -f "$1" && test -x "$1"
387} # as_fn_executable_p
388# as_fn_append VAR VALUE
389# ----------------------
390# Append the text in VALUE to the end of the definition contained in VAR. Take
391# advantage of any shell optimizations that allow amortized linear growth over
392# repeated appends, instead of the typical quadratic growth present in naive
393# implementations.
394if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
395then :
396  eval 'as_fn_append ()
397  {
398    eval $1+=\$2
399  }'
400else $as_nop
401  as_fn_append ()
402  {
403    eval $1=\$$1\$2
404  }
405fi # as_fn_append
406
407# as_fn_arith ARG...
408# ------------------
409# Perform arithmetic evaluation on the ARGs, and store the result in the
410# global $as_val. Take advantage of shells that can avoid forks. The arguments
411# must be portable across $(()) and expr.
412if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
413then :
414  eval 'as_fn_arith ()
415  {
416    as_val=$(( $* ))
417  }'
418else $as_nop
419  as_fn_arith ()
420  {
421    as_val=`expr "$@" || test $? -eq 1`
422  }
423fi # as_fn_arith
424
425# as_fn_nop
426# ---------
427# Do nothing but, unlike ":", preserve the value of $?.
428as_fn_nop ()
429{
430  return $?
431}
432as_nop=as_fn_nop
433
434# as_fn_error STATUS ERROR [LINENO LOG_FD]
435# ----------------------------------------
436# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
437# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
438# script with STATUS, using 1 if that was 0.
439as_fn_error ()
440{
441  as_status=$1; test $as_status -eq 0 && as_status=1
442  if test "$4"; then
443    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
444    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
445  fi
446  printf "%s\n" "$as_me: error: $2" >&2
447  as_fn_exit $as_status
448} # as_fn_error
449
450if expr a : '\(a\)' >/dev/null 2>&1 &&
451   test "X`expr 00001 : '.*\(...\)'`" = X001; then
452  as_expr=expr
453else
454  as_expr=false
455fi
456
457if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
458  as_basename=basename
459else
460  as_basename=false
461fi
462
463if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
464  as_dirname=dirname
465else
466  as_dirname=false
467fi
468
469as_me=`$as_basename -- "$0" ||
470$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
471	 X"$0" : 'X\(//\)$' \| \
472	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
473printf "%s\n" X/"$0" |
474    sed '/^.*\/\([^/][^/]*\)\/*$/{
475	    s//\1/
476	    q
477	  }
478	  /^X\/\(\/\/\)$/{
479	    s//\1/
480	    q
481	  }
482	  /^X\/\(\/\).*/{
483	    s//\1/
484	    q
485	  }
486	  s/.*/./; q'`
487
488# Avoid depending upon Character Ranges.
489as_cr_letters='abcdefghijklmnopqrstuvwxyz'
490as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
491as_cr_Letters=$as_cr_letters$as_cr_LETTERS
492as_cr_digits='0123456789'
493as_cr_alnum=$as_cr_Letters$as_cr_digits
494
495
496  as_lineno_1=$LINENO as_lineno_1a=$LINENO
497  as_lineno_2=$LINENO as_lineno_2a=$LINENO
498  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
499  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
500  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
501  sed -n '
502    p
503    /[$]LINENO/=
504  ' <$as_myself |
505    sed '
506      s/[$]LINENO.*/&-/
507      t lineno
508      b
509      :lineno
510      N
511      :loop
512      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
513      t loop
514      s/-\n.*//
515    ' >$as_me.lineno &&
516  chmod +x "$as_me.lineno" ||
517    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
518
519  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
520  # already done that, so ensure we don't try to do so again and fall
521  # in an infinite loop.  This has already happened in practice.
522  _as_can_reexec=no; export _as_can_reexec
523  # Don't try to exec as it changes $[0], causing all sort of problems
524  # (the dirname of $[0] is not the place where we might find the
525  # original and so on.  Autoconf is especially sensitive to this).
526  . "./$as_me.lineno"
527  # Exit status is that of the last command.
528  exit
529}
530
531
532# Determine whether it's possible to make 'echo' print without a newline.
533# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
534# for compatibility with existing Makefiles.
535ECHO_C= ECHO_N= ECHO_T=
536case `echo -n x` in #(((((
537-n*)
538  case `echo 'xy\c'` in
539  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
540  xy)  ECHO_C='\c';;
541  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
542       ECHO_T='	';;
543  esac;;
544*)
545  ECHO_N='-n';;
546esac
547
548# For backward compatibility with old third-party macros, we provide
549# the shell variables $as_echo and $as_echo_n.  New code should use
550# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
551as_echo='printf %s\n'
552as_echo_n='printf %s'
553
554
555rm -f conf$$ conf$$.exe conf$$.file
556if test -d conf$$.dir; then
557  rm -f conf$$.dir/conf$$.file
558else
559  rm -f conf$$.dir
560  mkdir conf$$.dir 2>/dev/null
561fi
562if (echo >conf$$.file) 2>/dev/null; then
563  if ln -s conf$$.file conf$$ 2>/dev/null; then
564    as_ln_s='ln -s'
565    # ... but there are two gotchas:
566    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
567    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
568    # In both cases, we have to default to `cp -pR'.
569    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
570      as_ln_s='cp -pR'
571  elif ln conf$$.file conf$$ 2>/dev/null; then
572    as_ln_s=ln
573  else
574    as_ln_s='cp -pR'
575  fi
576else
577  as_ln_s='cp -pR'
578fi
579rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
580rmdir conf$$.dir 2>/dev/null
581
582if mkdir -p . 2>/dev/null; then
583  as_mkdir_p='mkdir -p "$as_dir"'
584else
585  test -d ./-p && rmdir ./-p
586  as_mkdir_p=false
587fi
588
589as_test_x='test -x'
590as_executable_p=as_fn_executable_p
591
592# Sed expression to map a string onto a valid CPP name.
593as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
594
595# Sed expression to map a string onto a valid variable name.
596as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
597
598SHELL=${CONFIG_SHELL-/bin/sh}
599
600
601test -n "$DJDIR" || exec 7<&0 </dev/null
602exec 6>&1
603
604# Name of the host.
605# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
606# so uname gets run too.
607ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
608
609#
610# Initializations.
611#
612ac_default_prefix=/usr/local
613ac_clean_files=
614ac_config_libobj_dir=.
615LIBOBJS=
616cross_compiling=no
617subdirs=
618MFLAGS=
619MAKEFLAGS=
620
621# Identity of this package.
622PACKAGE_NAME='sntp'
623PACKAGE_TARNAME='sntp'
624PACKAGE_VERSION='4.2.8p18'
625PACKAGE_STRING='sntp 4.2.8p18'
626PACKAGE_BUGREPORT='https://bugs.ntp.org/'
627PACKAGE_URL='https://www.ntp.org/'
628
629# Factoring default headers for most tests.
630ac_includes_default="\
631#include <stddef.h>
632#ifdef HAVE_STDIO_H
633# include <stdio.h>
634#endif
635#ifdef HAVE_STDLIB_H
636# include <stdlib.h>
637#endif
638#ifdef HAVE_STRING_H
639# include <string.h>
640#endif
641#ifdef HAVE_INTTYPES_H
642# include <inttypes.h>
643#endif
644#ifdef HAVE_STDINT_H
645# include <stdint.h>
646#endif
647#ifdef HAVE_STRINGS_H
648# include <strings.h>
649#endif
650#ifdef HAVE_SYS_TYPES_H
651# include <sys/types.h>
652#endif
653#ifdef HAVE_SYS_STAT_H
654# include <sys/stat.h>
655#endif
656#ifdef HAVE_UNISTD_H
657# include <unistd.h>
658#endif"
659
660ac_header_c_list=
661ac_func_c_list=
662enable_option_checking=no
663ac_subst_vars='am__EXEEXT_FALSE
664am__EXEEXT_TRUE
665LTLIBOBJS
666BUILD_TEST_KODFILE_FALSE
667BUILD_TEST_KODFILE_TRUE
668BUILD_TEST_KODDATABASE_FALSE
669BUILD_TEST_KODDATABASE_TRUE
670UNITYBUILD_AVAILABLE_FALSE
671UNITYBUILD_AVAILABLE_TRUE
672PATH_RUBY
673LIB_SYSLOG
674subdirs
675BUILD_LIBEVENT_FALSE
676BUILD_LIBEVENT_TRUE
677LDADD_LIBEVENT
678CPPFLAGS_LIBEVENT
679CFLAGS_LIBEVENT
680NTP_FORCE_LIBEVENT_DIST
681LIBOPTS_DIR
682LIBOPTS_CFLAGS
683LIBOPTS_LDADD
684NEED_LIBOPTS_FALSE
685NEED_LIBOPTS_TRUE
686INSTALL_LIBOPTS_FALSE
687INSTALL_LIBOPTS_TRUE
688POSIX_SHELL
689GL_GENERATE_STDNORETURN_H_FALSE
690GL_GENERATE_STDNORETURN_H_TRUE
691STDNORETURN_H
692BUILD_SNTP_FALSE
693BUILD_SNTP_TRUE
694SNTP
695LIBTOOL_DEPS
696LT_SYS_LIBRARY_PATH
697OTOOL64
698OTOOL
699LIPO
700NMEDIT
701DSYMUTIL
702MANIFEST_TOOL
703RANLIB
704DLLTOOL
705OBJDUMP
706LN_S
707NM
708ac_ct_DUMPBIN
709DUMPBIN
710LIBTOOL
711PATH_OPENSSL
712VER_SUFFIX
713PKG_CONFIG
714LIBNTP_SUBMAKES_FALSE
715LIBNTP_SUBMAKES_TRUE
716LIBOBJS
717PTHREADS_FALSE
718PTHREADS_TRUE
719LIBISC_PTHREADS_NOTHREADS
720PTHREAD_LIBS
721LTHREAD_LIBS
722BUILD_THREAD
723HAVE_INLINE
724LDADD_LIBUTIL
725ALLOCA
726LIBM
727EDITLINE_LIBS
728LD
729FGREP
730EGREP
731GREP
732LDADD_LIBNTP
733NTP_CROSSCOMPILE_FALSE
734NTP_CROSSCOMPILE_TRUE
735SED
736ac_ct_AR
737AR
738INSTALL_UPDATE_LEAP_FALSE
739INSTALL_UPDATE_LEAP_TRUE
740UPDATE_LEAP_NI
741UPDATE_LEAP_MS
742UPDATE_LEAP_DS
743UPDATE_LEAP_DL
744UPDATE_LEAP_DB
745TIMETRIM_NI
746TIMETRIM_MS
747TIMETRIM_DS
748TIMETRIM_DL
749TIMETRIM_DB
750TICKADJ_NI
751TICKADJ_MS
752TICKADJ_DS
753TICKADJ_DL
754TICKADJ_DB
755SNTP_NI
756SNTP_MS
757SNTP_DS
758SNTP_DL
759SNTP_DB
760NTP_WAIT_NI
761NTP_WAIT_MS
762NTP_WAIT_DS
763NTP_WAIT_DL
764NTP_WAIT_DB
765NTP_KEYGEN_NI
766NTP_KEYGEN_MS
767NTP_KEYGEN_DS
768NTP_KEYGEN_DL
769NTP_KEYGEN_DB
770NTPTRACE_NI
771NTPTRACE_MS
772NTPTRACE_DS
773NTPTRACE_DL
774NTPTRACE_DB
775NTPTIME_NI
776NTPTIME_MS
777NTPTIME_DS
778NTPTIME_DL
779NTPTIME_DB
780INSTALL_NTPSWEEP_FALSE
781INSTALL_NTPSWEEP_TRUE
782NTPSWEEP_NI
783NTPSWEEP_MS
784NTPSWEEP_DS
785NTPSWEEP_DL
786NTPSWEEP_DB
787NTPSNMPD_NI
788NTPSNMPD_MS
789NTPSNMPD_DS
790NTPSNMPD_DL
791NTPSNMPD_DB
792NTPQ_NI
793NTPQ_MS
794NTPQ_DS
795NTPQ_DL
796NTPQ_DB
797NTPD_NI
798NTPD_MS
799NTPD_DS
800NTPD_DL
801NTPD_DB
802NTPDSIM_NI
803NTPDSIM_MS
804NTPDSIM_DS
805NTPDSIM_DL
806NTPDSIM_DB
807NTPDC_NI
808NTPDC_MS
809NTPDC_DS
810NTPDC_DL
811NTPDC_DB
812NTPDATE_NI
813NTPDATE_MS
814NTPDATE_DS
815NTPDATE_DL
816NTPDATE_DB
817MANTAGFMT
818CALC_TICKADJ_NI
819CALC_TICKADJ_MS
820CALC_TICKADJ_DS
821CALC_TICKADJ_DL
822CALC_TICKADJ_DB
823WANT_CALC_TICKADJ_MS_FALSE
824WANT_CALC_TICKADJ_MS_TRUE
825NTP_HARD_LDFLAGS
826NTP_HARD_CPPFLAGS
827NTP_HARD_CFLAGS
828CPP
829LDFLAGS_NTP
830LDADD_NTP
831CPPFLAGS_NTP
832CFLAGS_NTP
833CC_NOFORMAT
834am__fastdepCC_FALSE
835am__fastdepCC_TRUE
836CCDEPMODE
837am__nodep
838AMDEPBACKSLASH
839AMDEP_FALSE
840AMDEP_TRUE
841am__include
842DEPDIR
843OBJEXT
844EXEEXT
845ac_ct_CC
846CPPFLAGS
847LDFLAGS
848CFLAGS
849CC
850host_os
851host_vendor
852host_cpu
853host
854build_os
855build_vendor
856build_cpu
857build
858AM_BACKSLASH
859AM_DEFAULT_VERBOSITY
860AM_DEFAULT_V
861AM_V
862CSCOPE
863ETAGS
864CTAGS
865am__untar
866am__tar
867AMTAR
868am__leading_dot
869SET_MAKE
870AWK
871mkdir_p
872MKDIR_P
873INSTALL_STRIP_PROGRAM
874STRIP
875install_sh
876MAKEINFO
877AUTOHEADER
878AUTOMAKE
879AUTOCONF
880ACLOCAL
881VERSION
882PACKAGE
883CYGPATH_W
884am__isrc
885INSTALL_DATA
886INSTALL_SCRIPT
887INSTALL_PROGRAM
888target_alias
889host_alias
890build_alias
891LIBS
892ECHO_T
893ECHO_N
894ECHO_C
895DEFS
896mandir
897localedir
898libdir
899psdir
900pdfdir
901dvidir
902htmldir
903infodir
904docdir
905oldincludedir
906includedir
907runstatedir
908localstatedir
909sharedstatedir
910sysconfdir
911datadir
912datarootdir
913libexecdir
914sbindir
915bindir
916program_transform_name
917prefix
918exec_prefix
919PACKAGE_URL
920PACKAGE_BUGREPORT
921PACKAGE_STRING
922PACKAGE_VERSION
923PACKAGE_TARNAME
924PACKAGE_NAME
925PATH_SEPARATOR
926SHELL
927am__quote'
928ac_subst_files=''
929ac_user_opts='
930enable_option_checking
931enable_silent_rules
932enable_dependency_tracking
933with_hardenfile
934with_locfile
935with_gnu_ld
936with_lineeditlibs
937enable_debugging
938enable_thread_support
939with_threads
940with_yielding_select
941enable_c99_snprintf
942enable_clockctl
943enable_linuxcaps
944enable_solarisprivs
945enable_trustedbsd_mac
946enable_signalled_io
947with_crypto
948with_openssl_libdir
949with_openssl_incdir
950enable_verbose_ssl
951enable_openssl_random
952enable_shared
953enable_static
954with_pic
955enable_fast_install
956with_aix_soname
957with_sysroot
958enable_libtool_lock
959with_sntp
960enable_nls
961enable_local_libopts
962enable_libopts_install
963with_autoopts_config
964with_regex_header
965with_libregex
966with_libregex_cflags
967with_libregex_libs
968enable_optional_args
969enable_local_libevent
970enable_ipv6
971with_kame
972enable_getifaddrs
973enable_problem_tests
974'
975      ac_precious_vars='build_alias
976host_alias
977target_alias
978CC
979CFLAGS
980LDFLAGS
981LIBS
982CPPFLAGS
983CPP
984LT_SYS_LIBRARY_PATH'
985ac_subdirs_all='libevent'
986
987# Initialize some variables set by options.
988ac_init_help=
989ac_init_version=false
990ac_unrecognized_opts=
991ac_unrecognized_sep=
992# The variables have the same names as the options, with
993# dashes changed to underlines.
994cache_file=/dev/null
995exec_prefix=NONE
996no_create=
997no_recursion=
998prefix=NONE
999program_prefix=NONE
1000program_suffix=NONE
1001program_transform_name=s,x,x,
1002silent=
1003site=
1004srcdir=
1005verbose=
1006x_includes=NONE
1007x_libraries=NONE
1008
1009# Installation directory options.
1010# These are left unexpanded so users can "make install exec_prefix=/foo"
1011# and all the variables that are supposed to be based on exec_prefix
1012# by default will actually change.
1013# Use braces instead of parens because sh, perl, etc. also accept them.
1014# (The list follows the same order as the GNU Coding Standards.)
1015bindir='${exec_prefix}/bin'
1016sbindir='${exec_prefix}/sbin'
1017libexecdir='${exec_prefix}/libexec'
1018datarootdir='${prefix}/share'
1019datadir='${datarootdir}'
1020sysconfdir='${prefix}/etc'
1021sharedstatedir='${prefix}/com'
1022localstatedir='${prefix}/var'
1023runstatedir='${localstatedir}/run'
1024includedir='${prefix}/include'
1025oldincludedir='/usr/include'
1026docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1027infodir='${datarootdir}/info'
1028htmldir='${docdir}'
1029dvidir='${docdir}'
1030pdfdir='${docdir}'
1031psdir='${docdir}'
1032libdir='${exec_prefix}/lib'
1033localedir='${datarootdir}/locale'
1034mandir='${datarootdir}/man'
1035
1036ac_prev=
1037ac_dashdash=
1038for ac_option
1039do
1040  # If the previous option needs an argument, assign it.
1041  if test -n "$ac_prev"; then
1042    eval $ac_prev=\$ac_option
1043    ac_prev=
1044    continue
1045  fi
1046
1047  case $ac_option in
1048  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1049  *=)   ac_optarg= ;;
1050  *)    ac_optarg=yes ;;
1051  esac
1052
1053  case $ac_dashdash$ac_option in
1054  --)
1055    ac_dashdash=yes ;;
1056
1057  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1058    ac_prev=bindir ;;
1059  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1060    bindir=$ac_optarg ;;
1061
1062  -build | --build | --buil | --bui | --bu)
1063    ac_prev=build_alias ;;
1064  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1065    build_alias=$ac_optarg ;;
1066
1067  -cache-file | --cache-file | --cache-fil | --cache-fi \
1068  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1069    ac_prev=cache_file ;;
1070  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1071  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1072    cache_file=$ac_optarg ;;
1073
1074  --config-cache | -C)
1075    cache_file=config.cache ;;
1076
1077  -datadir | --datadir | --datadi | --datad)
1078    ac_prev=datadir ;;
1079  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1080    datadir=$ac_optarg ;;
1081
1082  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1083  | --dataroo | --dataro | --datar)
1084    ac_prev=datarootdir ;;
1085  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1086  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1087    datarootdir=$ac_optarg ;;
1088
1089  -disable-* | --disable-*)
1090    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1091    # Reject names that are not valid shell variable names.
1092    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1093      as_fn_error $? "invalid feature name: \`$ac_useropt'"
1094    ac_useropt_orig=$ac_useropt
1095    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1096    case $ac_user_opts in
1097      *"
1098"enable_$ac_useropt"
1099"*) ;;
1100      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1101	 ac_unrecognized_sep=', ';;
1102    esac
1103    eval enable_$ac_useropt=no ;;
1104
1105  -docdir | --docdir | --docdi | --doc | --do)
1106    ac_prev=docdir ;;
1107  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1108    docdir=$ac_optarg ;;
1109
1110  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1111    ac_prev=dvidir ;;
1112  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1113    dvidir=$ac_optarg ;;
1114
1115  -enable-* | --enable-*)
1116    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1117    # Reject names that are not valid shell variable names.
1118    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1119      as_fn_error $? "invalid feature name: \`$ac_useropt'"
1120    ac_useropt_orig=$ac_useropt
1121    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1122    case $ac_user_opts in
1123      *"
1124"enable_$ac_useropt"
1125"*) ;;
1126      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1127	 ac_unrecognized_sep=', ';;
1128    esac
1129    eval enable_$ac_useropt=\$ac_optarg ;;
1130
1131  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1132  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1133  | --exec | --exe | --ex)
1134    ac_prev=exec_prefix ;;
1135  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1136  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1137  | --exec=* | --exe=* | --ex=*)
1138    exec_prefix=$ac_optarg ;;
1139
1140  -gas | --gas | --ga | --g)
1141    # Obsolete; use --with-gas.
1142    with_gas=yes ;;
1143
1144  -help | --help | --hel | --he | -h)
1145    ac_init_help=long ;;
1146  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1147    ac_init_help=recursive ;;
1148  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1149    ac_init_help=short ;;
1150
1151  -host | --host | --hos | --ho)
1152    ac_prev=host_alias ;;
1153  -host=* | --host=* | --hos=* | --ho=*)
1154    host_alias=$ac_optarg ;;
1155
1156  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1157    ac_prev=htmldir ;;
1158  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1159  | --ht=*)
1160    htmldir=$ac_optarg ;;
1161
1162  -includedir | --includedir | --includedi | --included | --include \
1163  | --includ | --inclu | --incl | --inc)
1164    ac_prev=includedir ;;
1165  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1166  | --includ=* | --inclu=* | --incl=* | --inc=*)
1167    includedir=$ac_optarg ;;
1168
1169  -infodir | --infodir | --infodi | --infod | --info | --inf)
1170    ac_prev=infodir ;;
1171  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1172    infodir=$ac_optarg ;;
1173
1174  -libdir | --libdir | --libdi | --libd)
1175    ac_prev=libdir ;;
1176  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1177    libdir=$ac_optarg ;;
1178
1179  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1180  | --libexe | --libex | --libe)
1181    ac_prev=libexecdir ;;
1182  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1183  | --libexe=* | --libex=* | --libe=*)
1184    libexecdir=$ac_optarg ;;
1185
1186  -localedir | --localedir | --localedi | --localed | --locale)
1187    ac_prev=localedir ;;
1188  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1189    localedir=$ac_optarg ;;
1190
1191  -localstatedir | --localstatedir | --localstatedi | --localstated \
1192  | --localstate | --localstat | --localsta | --localst | --locals)
1193    ac_prev=localstatedir ;;
1194  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1195  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1196    localstatedir=$ac_optarg ;;
1197
1198  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1199    ac_prev=mandir ;;
1200  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1201    mandir=$ac_optarg ;;
1202
1203  -nfp | --nfp | --nf)
1204    # Obsolete; use --without-fp.
1205    with_fp=no ;;
1206
1207  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1208  | --no-cr | --no-c | -n)
1209    no_create=yes ;;
1210
1211  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1212  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1213    no_recursion=yes ;;
1214
1215  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1216  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1217  | --oldin | --oldi | --old | --ol | --o)
1218    ac_prev=oldincludedir ;;
1219  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1220  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1221  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1222    oldincludedir=$ac_optarg ;;
1223
1224  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1225    ac_prev=prefix ;;
1226  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1227    prefix=$ac_optarg ;;
1228
1229  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1230  | --program-pre | --program-pr | --program-p)
1231    ac_prev=program_prefix ;;
1232  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1233  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1234    program_prefix=$ac_optarg ;;
1235
1236  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1237  | --program-suf | --program-su | --program-s)
1238    ac_prev=program_suffix ;;
1239  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1240  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1241    program_suffix=$ac_optarg ;;
1242
1243  -program-transform-name | --program-transform-name \
1244  | --program-transform-nam | --program-transform-na \
1245  | --program-transform-n | --program-transform- \
1246  | --program-transform | --program-transfor \
1247  | --program-transfo | --program-transf \
1248  | --program-trans | --program-tran \
1249  | --progr-tra | --program-tr | --program-t)
1250    ac_prev=program_transform_name ;;
1251  -program-transform-name=* | --program-transform-name=* \
1252  | --program-transform-nam=* | --program-transform-na=* \
1253  | --program-transform-n=* | --program-transform-=* \
1254  | --program-transform=* | --program-transfor=* \
1255  | --program-transfo=* | --program-transf=* \
1256  | --program-trans=* | --program-tran=* \
1257  | --progr-tra=* | --program-tr=* | --program-t=*)
1258    program_transform_name=$ac_optarg ;;
1259
1260  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1261    ac_prev=pdfdir ;;
1262  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1263    pdfdir=$ac_optarg ;;
1264
1265  -psdir | --psdir | --psdi | --psd | --ps)
1266    ac_prev=psdir ;;
1267  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1268    psdir=$ac_optarg ;;
1269
1270  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1271  | -silent | --silent | --silen | --sile | --sil)
1272    silent=yes ;;
1273
1274  -runstatedir | --runstatedir | --runstatedi | --runstated \
1275  | --runstate | --runstat | --runsta | --runst | --runs \
1276  | --run | --ru | --r)
1277    ac_prev=runstatedir ;;
1278  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1279  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1280  | --run=* | --ru=* | --r=*)
1281    runstatedir=$ac_optarg ;;
1282
1283  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1284    ac_prev=sbindir ;;
1285  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1286  | --sbi=* | --sb=*)
1287    sbindir=$ac_optarg ;;
1288
1289  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1290  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1291  | --sharedst | --shareds | --shared | --share | --shar \
1292  | --sha | --sh)
1293    ac_prev=sharedstatedir ;;
1294  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1295  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1296  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1297  | --sha=* | --sh=*)
1298    sharedstatedir=$ac_optarg ;;
1299
1300  -site | --site | --sit)
1301    ac_prev=site ;;
1302  -site=* | --site=* | --sit=*)
1303    site=$ac_optarg ;;
1304
1305  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1306    ac_prev=srcdir ;;
1307  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1308    srcdir=$ac_optarg ;;
1309
1310  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1311  | --syscon | --sysco | --sysc | --sys | --sy)
1312    ac_prev=sysconfdir ;;
1313  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1314  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1315    sysconfdir=$ac_optarg ;;
1316
1317  -target | --target | --targe | --targ | --tar | --ta | --t)
1318    ac_prev=target_alias ;;
1319  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1320    target_alias=$ac_optarg ;;
1321
1322  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1323    verbose=yes ;;
1324
1325  -version | --version | --versio | --versi | --vers | -V)
1326    ac_init_version=: ;;
1327
1328  -with-* | --with-*)
1329    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1330    # Reject names that are not valid shell variable names.
1331    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1332      as_fn_error $? "invalid package name: \`$ac_useropt'"
1333    ac_useropt_orig=$ac_useropt
1334    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1335    case $ac_user_opts in
1336      *"
1337"with_$ac_useropt"
1338"*) ;;
1339      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1340	 ac_unrecognized_sep=', ';;
1341    esac
1342    eval with_$ac_useropt=\$ac_optarg ;;
1343
1344  -without-* | --without-*)
1345    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1346    # Reject names that are not valid shell variable names.
1347    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1348      as_fn_error $? "invalid package name: \`$ac_useropt'"
1349    ac_useropt_orig=$ac_useropt
1350    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1351    case $ac_user_opts in
1352      *"
1353"with_$ac_useropt"
1354"*) ;;
1355      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1356	 ac_unrecognized_sep=', ';;
1357    esac
1358    eval with_$ac_useropt=no ;;
1359
1360  --x)
1361    # Obsolete; use --with-x.
1362    with_x=yes ;;
1363
1364  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1365  | --x-incl | --x-inc | --x-in | --x-i)
1366    ac_prev=x_includes ;;
1367  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1368  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1369    x_includes=$ac_optarg ;;
1370
1371  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1372  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1373    ac_prev=x_libraries ;;
1374  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1375  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1376    x_libraries=$ac_optarg ;;
1377
1378  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1379Try \`$0 --help' for more information"
1380    ;;
1381
1382  *=*)
1383    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1384    # Reject names that are not valid shell variable names.
1385    case $ac_envvar in #(
1386      '' | [0-9]* | *[!_$as_cr_alnum]* )
1387      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1388    esac
1389    eval $ac_envvar=\$ac_optarg
1390    export $ac_envvar ;;
1391
1392  *)
1393    # FIXME: should be removed in autoconf 3.0.
1394    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1395    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1396      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1397    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1398    ;;
1399
1400  esac
1401done
1402
1403if test -n "$ac_prev"; then
1404  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1405  as_fn_error $? "missing argument to $ac_option"
1406fi
1407
1408if test -n "$ac_unrecognized_opts"; then
1409  case $enable_option_checking in
1410    no) ;;
1411    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1412    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1413  esac
1414fi
1415
1416# Check all directory arguments for consistency.
1417for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1418		datadir sysconfdir sharedstatedir localstatedir includedir \
1419		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1420		libdir localedir mandir runstatedir
1421do
1422  eval ac_val=\$$ac_var
1423  # Remove trailing slashes.
1424  case $ac_val in
1425    */ )
1426      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1427      eval $ac_var=\$ac_val;;
1428  esac
1429  # Be sure to have absolute directory names.
1430  case $ac_val in
1431    [\\/$]* | ?:[\\/]* )  continue;;
1432    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1433  esac
1434  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1435done
1436
1437# There might be people who depend on the old broken behavior: `$host'
1438# used to hold the argument of --host etc.
1439# FIXME: To remove some day.
1440build=$build_alias
1441host=$host_alias
1442target=$target_alias
1443
1444# FIXME: To remove some day.
1445if test "x$host_alias" != x; then
1446  if test "x$build_alias" = x; then
1447    cross_compiling=maybe
1448  elif test "x$build_alias" != "x$host_alias"; then
1449    cross_compiling=yes
1450  fi
1451fi
1452
1453ac_tool_prefix=
1454test -n "$host_alias" && ac_tool_prefix=$host_alias-
1455
1456test "$silent" = yes && exec 6>/dev/null
1457
1458
1459ac_pwd=`pwd` && test -n "$ac_pwd" &&
1460ac_ls_di=`ls -di .` &&
1461ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1462  as_fn_error $? "working directory cannot be determined"
1463test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1464  as_fn_error $? "pwd does not report name of working directory"
1465
1466
1467# Find the source files, if location was not specified.
1468if test -z "$srcdir"; then
1469  ac_srcdir_defaulted=yes
1470  # Try the directory containing this script, then the parent directory.
1471  ac_confdir=`$as_dirname -- "$as_myself" ||
1472$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1473	 X"$as_myself" : 'X\(//\)[^/]' \| \
1474	 X"$as_myself" : 'X\(//\)$' \| \
1475	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1476printf "%s\n" X"$as_myself" |
1477    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1478	    s//\1/
1479	    q
1480	  }
1481	  /^X\(\/\/\)[^/].*/{
1482	    s//\1/
1483	    q
1484	  }
1485	  /^X\(\/\/\)$/{
1486	    s//\1/
1487	    q
1488	  }
1489	  /^X\(\/\).*/{
1490	    s//\1/
1491	    q
1492	  }
1493	  s/.*/./; q'`
1494  srcdir=$ac_confdir
1495  if test ! -r "$srcdir/$ac_unique_file"; then
1496    srcdir=..
1497  fi
1498else
1499  ac_srcdir_defaulted=no
1500fi
1501if test ! -r "$srcdir/$ac_unique_file"; then
1502  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1503  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1504fi
1505ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1506ac_abs_confdir=`(
1507	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1508	pwd)`
1509# When building in place, set srcdir=.
1510if test "$ac_abs_confdir" = "$ac_pwd"; then
1511  srcdir=.
1512fi
1513# Remove unnecessary trailing slashes from srcdir.
1514# Double slashes in file names in object file debugging info
1515# mess up M-x gdb in Emacs.
1516case $srcdir in
1517*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1518esac
1519for ac_var in $ac_precious_vars; do
1520  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1521  eval ac_env_${ac_var}_value=\$${ac_var}
1522  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1523  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1524done
1525
1526#
1527# Report the --help message.
1528#
1529if test "$ac_init_help" = "long"; then
1530  # Omit some internal or obsolete options to make the list less imposing.
1531  # This message is too long to be a string in the A/UX 3.1 sh.
1532  cat <<_ACEOF
1533\`configure' configures sntp 4.2.8p18 to adapt to many kinds of systems.
1534
1535Usage: $0 [OPTION]... [VAR=VALUE]...
1536
1537To assign environment variables (e.g., CC, CFLAGS...), specify them as
1538VAR=VALUE.  See below for descriptions of some of the useful variables.
1539
1540Defaults for the options are specified in brackets.
1541
1542Configuration:
1543  -h, --help              display this help and exit
1544      --help=short        display options specific to this package
1545      --help=recursive    display the short help of all the included packages
1546  -V, --version           display version information and exit
1547  -q, --quiet, --silent   do not print \`checking ...' messages
1548      --cache-file=FILE   cache test results in FILE [disabled]
1549  -C, --config-cache      alias for \`--cache-file=config.cache'
1550  -n, --no-create         do not create output files
1551      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1552
1553Installation directories:
1554  --prefix=PREFIX         install architecture-independent files in PREFIX
1555                          [$ac_default_prefix]
1556  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1557                          [PREFIX]
1558
1559By default, \`make install' will install all the files in
1560\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1561an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1562for instance \`--prefix=\$HOME'.
1563
1564For better control, use the options below.
1565
1566Fine tuning of the installation directories:
1567  --bindir=DIR            user executables [EPREFIX/bin]
1568  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1569  --libexecdir=DIR        program executables [EPREFIX/libexec]
1570  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1571  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1572  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1573  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1574  --libdir=DIR            object code libraries [EPREFIX/lib]
1575  --includedir=DIR        C header files [PREFIX/include]
1576  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1577  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1578  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1579  --infodir=DIR           info documentation [DATAROOTDIR/info]
1580  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1581  --mandir=DIR            man documentation [DATAROOTDIR/man]
1582  --docdir=DIR            documentation root [DATAROOTDIR/doc/sntp]
1583  --htmldir=DIR           html documentation [DOCDIR]
1584  --dvidir=DIR            dvi documentation [DOCDIR]
1585  --pdfdir=DIR            pdf documentation [DOCDIR]
1586  --psdir=DIR             ps documentation [DOCDIR]
1587_ACEOF
1588
1589  cat <<\_ACEOF
1590
1591Program names:
1592  --program-prefix=PREFIX            prepend PREFIX to installed program names
1593  --program-suffix=SUFFIX            append SUFFIX to installed program names
1594  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1595
1596System types:
1597  --build=BUILD     configure for building on BUILD [guessed]
1598  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1599_ACEOF
1600fi
1601
1602if test -n "$ac_init_help"; then
1603  case $ac_init_help in
1604     short | recursive ) echo "Configuration of sntp 4.2.8p18:";;
1605   esac
1606  cat <<\_ACEOF
1607
1608Optional Features:
1609  --disable-option-checking  ignore unrecognized --enable/--with options
1610  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1611  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1612  --enable-silent-rules   less verbose build output (undo: "make V=1")
1613  --disable-silent-rules  verbose build output (undo: "make V=0")
1614  --enable-dependency-tracking
1615                          do not reject slow dependency extractors
1616  --disable-dependency-tracking
1617                          speeds up one-time build
1618  defaults:               + yes, - no, s system-specific
1619  --enable-debugging      + include ntpd debugging code
1620  --enable-thread-support s use threads (+ if available)
1621  --enable-c99-snprintf   s use replacement printf family
1622  --enable-clockctl       s Use /dev/clockctl for non-root clock control
1623  --enable-linuxcaps      + Use Linux capabilities for non-root clock control
1624  --enable-solarisprivs   + Use Solaris privileges for non-root clock control
1625  --enable-trustedbsd-mac s Use TrustedBSD MAC policy for non-root clock
1626                          control
1627  --enable-signalled-io   s Use signalled IO if we can
1628  --enable-verbose-ssl    - show crypto lib detection details
1629  --enable-openssl-random + Use SSL lib's secure random numbers
1630  --enable-shared[=PKGS]  build shared libraries [default=no]
1631  --enable-static[=PKGS]  build static libraries [default=yes]
1632  --enable-fast-install[=PKGS]
1633                          optimize for fast installation [default=yes]
1634  --disable-libtool-lock  avoid locking (might break parallel builds)
1635  --disable-nls           disable nls support in libopts
1636  --enable-local-libopts  Use the supplied libopts tearoff code
1637  --enable-libopts-install
1638                          Install libopts with client installation
1639  --disable-optional-args not wanting optional option args
1640  --enable-local-libevent Force using the supplied libevent tearoff code
1641  --enable-ipv6           s use IPv6?
1642
1643  --enable-getifaddrs     + Enable the use of getifaddrs() [[yes|no]].
1644  --enable-problem-tests  + enable tests with undiagnosed problems
1645
1646Optional Packages:
1647  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1648  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1649  --with-hardenfile=XXX   os-specific or "/dev/null"
1650  --with-locfile=XXX      os-specific or "legacy"
1651  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1652  --with-lineeditlibs     edit,editline (readline may be specified if desired)
1653  --with-threads	  with threads [auto]
1654  --with-yielding-select  with yielding select [auto]
1655  --with-crypto           + =openssl,libcrypto
1656  --with-openssl-libdir   + =/something/reasonable
1657
1658  --with-openssl-incdir   + =search likely dirs
1659
1660  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1661                          both]
1662  --with-aix-soname=aix|svr4|both
1663                          shared library versioning (aka "SONAME") variant to
1664                          provide on AIX, [default=aix].
1665  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1666                          compiler's sysroot if not specified).
1667  --without-sntp          - disable building sntp and sntp/tests
1668  --with-autoopts-config  specify the config-info script
1669  --with-regex-header     a reg expr header is specified
1670  --with-libregex         libregex installation prefix
1671  --with-libregex-cflags  libregex compile flags
1672  --with-libregex-libs    libregex link command arguments
1673  --with-kame             - =/usr/local/v6
1674
1675Some influential environment variables:
1676  CC          C compiler command
1677  CFLAGS      C compiler flags
1678  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1679              nonstandard directory <lib dir>
1680  LIBS        libraries to pass to the linker, e.g. -l<library>
1681  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1682              you have headers in a nonstandard directory <include dir>
1683  CPP         C preprocessor
1684  LT_SYS_LIBRARY_PATH
1685              User-defined run-time library search path.
1686
1687Use these variables to override the choices made by `configure' or to help
1688it to find libraries and programs with nonstandard names/locations.
1689
1690Report bugs to <https://bugs.ntp.org/>.
1691sntp home page: <https://www.ntp.org/>.
1692_ACEOF
1693ac_status=$?
1694fi
1695
1696if test "$ac_init_help" = "recursive"; then
1697  # If there are subdirs, report their specific --help.
1698  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1699    test -d "$ac_dir" ||
1700      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1701      continue
1702    ac_builddir=.
1703
1704case "$ac_dir" in
1705.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1706*)
1707  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1708  # A ".." for each directory in $ac_dir_suffix.
1709  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1710  case $ac_top_builddir_sub in
1711  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1712  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1713  esac ;;
1714esac
1715ac_abs_top_builddir=$ac_pwd
1716ac_abs_builddir=$ac_pwd$ac_dir_suffix
1717# for backward compatibility:
1718ac_top_builddir=$ac_top_build_prefix
1719
1720case $srcdir in
1721  .)  # We are building in place.
1722    ac_srcdir=.
1723    ac_top_srcdir=$ac_top_builddir_sub
1724    ac_abs_top_srcdir=$ac_pwd ;;
1725  [\\/]* | ?:[\\/]* )  # Absolute name.
1726    ac_srcdir=$srcdir$ac_dir_suffix;
1727    ac_top_srcdir=$srcdir
1728    ac_abs_top_srcdir=$srcdir ;;
1729  *) # Relative name.
1730    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1731    ac_top_srcdir=$ac_top_build_prefix$srcdir
1732    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1733esac
1734ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1735
1736    cd "$ac_dir" || { ac_status=$?; continue; }
1737    # Check for configure.gnu first; this name is used for a wrapper for
1738    # Metaconfig's "Configure" on case-insensitive file systems.
1739    if test -f "$ac_srcdir/configure.gnu"; then
1740      echo &&
1741      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1742    elif test -f "$ac_srcdir/configure"; then
1743      echo &&
1744      $SHELL "$ac_srcdir/configure" --help=recursive
1745    else
1746      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1747    fi || ac_status=$?
1748    cd "$ac_pwd" || { ac_status=$?; break; }
1749  done
1750fi
1751
1752test -n "$ac_init_help" && exit $ac_status
1753if $ac_init_version; then
1754  cat <<\_ACEOF
1755sntp configure 4.2.8p18
1756generated by GNU Autoconf 2.71
1757
1758Copyright (C) 2021 Free Software Foundation, Inc.
1759This configure script is free software; the Free Software Foundation
1760gives unlimited permission to copy, distribute and modify it.
1761_ACEOF
1762  exit
1763fi
1764
1765## ------------------------ ##
1766## Autoconf initialization. ##
1767## ------------------------ ##
1768
1769# ac_fn_c_try_compile LINENO
1770# --------------------------
1771# Try to compile conftest.$ac_ext, and return whether this succeeded.
1772ac_fn_c_try_compile ()
1773{
1774  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1775  rm -f conftest.$ac_objext conftest.beam
1776  if { { ac_try="$ac_compile"
1777case "(($ac_try" in
1778  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1779  *) ac_try_echo=$ac_try;;
1780esac
1781eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1782printf "%s\n" "$ac_try_echo"; } >&5
1783  (eval "$ac_compile") 2>conftest.err
1784  ac_status=$?
1785  if test -s conftest.err; then
1786    grep -v '^ *+' conftest.err >conftest.er1
1787    cat conftest.er1 >&5
1788    mv -f conftest.er1 conftest.err
1789  fi
1790  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1791  test $ac_status = 0; } && {
1792	 test -z "$ac_c_werror_flag" ||
1793	 test ! -s conftest.err
1794       } && test -s conftest.$ac_objext
1795then :
1796  ac_retval=0
1797else $as_nop
1798  printf "%s\n" "$as_me: failed program was:" >&5
1799sed 's/^/| /' conftest.$ac_ext >&5
1800
1801	ac_retval=1
1802fi
1803  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1804  as_fn_set_status $ac_retval
1805
1806} # ac_fn_c_try_compile
1807
1808# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1809# -------------------------------------------------------
1810# Tests whether HEADER exists and can be compiled using the include files in
1811# INCLUDES, setting the cache variable VAR accordingly.
1812ac_fn_c_check_header_compile ()
1813{
1814  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1815  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1816printf %s "checking for $2... " >&6; }
1817if eval test \${$3+y}
1818then :
1819  printf %s "(cached) " >&6
1820else $as_nop
1821  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1822/* end confdefs.h.  */
1823$4
1824#include <$2>
1825_ACEOF
1826if ac_fn_c_try_compile "$LINENO"
1827then :
1828  eval "$3=yes"
1829else $as_nop
1830  eval "$3=no"
1831fi
1832rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1833fi
1834eval ac_res=\$$3
1835	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1836printf "%s\n" "$ac_res" >&6; }
1837  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1838
1839} # ac_fn_c_check_header_compile
1840
1841# ac_fn_c_try_link LINENO
1842# -----------------------
1843# Try to link conftest.$ac_ext, and return whether this succeeded.
1844ac_fn_c_try_link ()
1845{
1846  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1847  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1848  if { { ac_try="$ac_link"
1849case "(($ac_try" in
1850  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1851  *) ac_try_echo=$ac_try;;
1852esac
1853eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1854printf "%s\n" "$ac_try_echo"; } >&5
1855  (eval "$ac_link") 2>conftest.err
1856  ac_status=$?
1857  if test -s conftest.err; then
1858    grep -v '^ *+' conftest.err >conftest.er1
1859    cat conftest.er1 >&5
1860    mv -f conftest.er1 conftest.err
1861  fi
1862  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1863  test $ac_status = 0; } && {
1864	 test -z "$ac_c_werror_flag" ||
1865	 test ! -s conftest.err
1866       } && test -s conftest$ac_exeext && {
1867	 test "$cross_compiling" = yes ||
1868	 test -x conftest$ac_exeext
1869       }
1870then :
1871  ac_retval=0
1872else $as_nop
1873  printf "%s\n" "$as_me: failed program was:" >&5
1874sed 's/^/| /' conftest.$ac_ext >&5
1875
1876	ac_retval=1
1877fi
1878  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1879  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1880  # interfere with the next link command; also delete a directory that is
1881  # left behind by Apple's compiler.  We do this before executing the actions.
1882  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1883  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1884  as_fn_set_status $ac_retval
1885
1886} # ac_fn_c_try_link
1887
1888# ac_fn_c_try_run LINENO
1889# ----------------------
1890# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1891# executables *can* be run.
1892ac_fn_c_try_run ()
1893{
1894  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1895  if { { ac_try="$ac_link"
1896case "(($ac_try" in
1897  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1898  *) ac_try_echo=$ac_try;;
1899esac
1900eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1901printf "%s\n" "$ac_try_echo"; } >&5
1902  (eval "$ac_link") 2>&5
1903  ac_status=$?
1904  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1905  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1906  { { case "(($ac_try" in
1907  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1908  *) ac_try_echo=$ac_try;;
1909esac
1910eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1911printf "%s\n" "$ac_try_echo"; } >&5
1912  (eval "$ac_try") 2>&5
1913  ac_status=$?
1914  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1915  test $ac_status = 0; }; }
1916then :
1917  ac_retval=0
1918else $as_nop
1919  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1920       printf "%s\n" "$as_me: failed program was:" >&5
1921sed 's/^/| /' conftest.$ac_ext >&5
1922
1923       ac_retval=$ac_status
1924fi
1925  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1926  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1927  as_fn_set_status $ac_retval
1928
1929} # ac_fn_c_try_run
1930
1931# ac_fn_c_try_cpp LINENO
1932# ----------------------
1933# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1934ac_fn_c_try_cpp ()
1935{
1936  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1937  if { { ac_try="$ac_cpp conftest.$ac_ext"
1938case "(($ac_try" in
1939  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1940  *) ac_try_echo=$ac_try;;
1941esac
1942eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1943printf "%s\n" "$ac_try_echo"; } >&5
1944  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1945  ac_status=$?
1946  if test -s conftest.err; then
1947    grep -v '^ *+' conftest.err >conftest.er1
1948    cat conftest.er1 >&5
1949    mv -f conftest.er1 conftest.err
1950  fi
1951  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1952  test $ac_status = 0; } > conftest.i && {
1953	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1954	 test ! -s conftest.err
1955       }
1956then :
1957  ac_retval=0
1958else $as_nop
1959  printf "%s\n" "$as_me: failed program was:" >&5
1960sed 's/^/| /' conftest.$ac_ext >&5
1961
1962    ac_retval=1
1963fi
1964  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1965  as_fn_set_status $ac_retval
1966
1967} # ac_fn_c_try_cpp
1968
1969# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1970# -------------------------------------------
1971# Tests whether TYPE exists after having included INCLUDES, setting cache
1972# variable VAR accordingly.
1973ac_fn_c_check_type ()
1974{
1975  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1976  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1977printf %s "checking for $2... " >&6; }
1978if eval test \${$3+y}
1979then :
1980  printf %s "(cached) " >&6
1981else $as_nop
1982  eval "$3=no"
1983  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1984/* end confdefs.h.  */
1985$4
1986int
1987main (void)
1988{
1989if (sizeof ($2))
1990	 return 0;
1991  ;
1992  return 0;
1993}
1994_ACEOF
1995if ac_fn_c_try_compile "$LINENO"
1996then :
1997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h.  */
1999$4
2000int
2001main (void)
2002{
2003if (sizeof (($2)))
2004	    return 0;
2005  ;
2006  return 0;
2007}
2008_ACEOF
2009if ac_fn_c_try_compile "$LINENO"
2010then :
2011
2012else $as_nop
2013  eval "$3=yes"
2014fi
2015rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2016fi
2017rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2018fi
2019eval ac_res=\$$3
2020	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2021printf "%s\n" "$ac_res" >&6; }
2022  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2023
2024} # ac_fn_c_check_type
2025
2026# ac_fn_c_check_func LINENO FUNC VAR
2027# ----------------------------------
2028# Tests whether FUNC exists, setting the cache variable VAR accordingly
2029ac_fn_c_check_func ()
2030{
2031  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2033printf %s "checking for $2... " >&6; }
2034if eval test \${$3+y}
2035then :
2036  printf %s "(cached) " >&6
2037else $as_nop
2038  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2039/* end confdefs.h.  */
2040/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2041   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2042#define $2 innocuous_$2
2043
2044/* System header to define __stub macros and hopefully few prototypes,
2045   which can conflict with char $2 (); below.  */
2046
2047#include <limits.h>
2048#undef $2
2049
2050/* Override any GCC internal prototype to avoid an error.
2051   Use char because int might match the return type of a GCC
2052   builtin and then its argument prototype would still apply.  */
2053#ifdef __cplusplus
2054extern "C"
2055#endif
2056char $2 ();
2057/* The GNU C library defines this for functions which it implements
2058    to always fail with ENOSYS.  Some functions are actually named
2059    something starting with __ and the normal name is an alias.  */
2060#if defined __stub_$2 || defined __stub___$2
2061choke me
2062#endif
2063
2064int
2065main (void)
2066{
2067return $2 ();
2068  ;
2069  return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_link "$LINENO"
2073then :
2074  eval "$3=yes"
2075else $as_nop
2076  eval "$3=no"
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.beam \
2079    conftest$ac_exeext conftest.$ac_ext
2080fi
2081eval ac_res=\$$3
2082	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2083printf "%s\n" "$ac_res" >&6; }
2084  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2085
2086} # ac_fn_c_check_func
2087
2088# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2089# ------------------------------------------------------------------
2090# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2091# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2092ac_fn_check_decl ()
2093{
2094  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2095  as_decl_name=`echo $2|sed 's/ *(.*//'`
2096  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2097printf %s "checking whether $as_decl_name is declared... " >&6; }
2098if eval test \${$3+y}
2099then :
2100  printf %s "(cached) " >&6
2101else $as_nop
2102  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2103  eval ac_save_FLAGS=\$$6
2104  as_fn_append $6 " $5"
2105  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h.  */
2107$4
2108int
2109main (void)
2110{
2111#ifndef $as_decl_name
2112#ifdef __cplusplus
2113  (void) $as_decl_use;
2114#else
2115  (void) $as_decl_name;
2116#endif
2117#endif
2118
2119  ;
2120  return 0;
2121}
2122_ACEOF
2123if ac_fn_c_try_compile "$LINENO"
2124then :
2125  eval "$3=yes"
2126else $as_nop
2127  eval "$3=no"
2128fi
2129rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2130  eval $6=\$ac_save_FLAGS
2131
2132fi
2133eval ac_res=\$$3
2134	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2135printf "%s\n" "$ac_res" >&6; }
2136  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2137
2138} # ac_fn_check_decl
2139
2140# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2141# --------------------------------------------
2142# Tries to find the compile-time value of EXPR in a program that includes
2143# INCLUDES, setting VAR accordingly. Returns whether the value could be
2144# computed
2145ac_fn_c_compute_int ()
2146{
2147  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2148  if test "$cross_compiling" = yes; then
2149    # Depending upon the size, compute the lo and hi bounds.
2150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2151/* end confdefs.h.  */
2152$4
2153int
2154main (void)
2155{
2156static int test_array [1 - 2 * !(($2) >= 0)];
2157test_array [0] = 0;
2158return test_array [0];
2159
2160  ;
2161  return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_compile "$LINENO"
2165then :
2166  ac_lo=0 ac_mid=0
2167  while :; do
2168    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2169/* end confdefs.h.  */
2170$4
2171int
2172main (void)
2173{
2174static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2175test_array [0] = 0;
2176return test_array [0];
2177
2178  ;
2179  return 0;
2180}
2181_ACEOF
2182if ac_fn_c_try_compile "$LINENO"
2183then :
2184  ac_hi=$ac_mid; break
2185else $as_nop
2186  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2187			if test $ac_lo -le $ac_mid; then
2188			  ac_lo= ac_hi=
2189			  break
2190			fi
2191			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2192fi
2193rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2194  done
2195else $as_nop
2196  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2197/* end confdefs.h.  */
2198$4
2199int
2200main (void)
2201{
2202static int test_array [1 - 2 * !(($2) < 0)];
2203test_array [0] = 0;
2204return test_array [0];
2205
2206  ;
2207  return 0;
2208}
2209_ACEOF
2210if ac_fn_c_try_compile "$LINENO"
2211then :
2212  ac_hi=-1 ac_mid=-1
2213  while :; do
2214    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2215/* end confdefs.h.  */
2216$4
2217int
2218main (void)
2219{
2220static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2221test_array [0] = 0;
2222return test_array [0];
2223
2224  ;
2225  return 0;
2226}
2227_ACEOF
2228if ac_fn_c_try_compile "$LINENO"
2229then :
2230  ac_lo=$ac_mid; break
2231else $as_nop
2232  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2233			if test $ac_mid -le $ac_hi; then
2234			  ac_lo= ac_hi=
2235			  break
2236			fi
2237			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2238fi
2239rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2240  done
2241else $as_nop
2242  ac_lo= ac_hi=
2243fi
2244rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2245fi
2246rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2247# Binary search between lo and hi bounds.
2248while test "x$ac_lo" != "x$ac_hi"; do
2249  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2250  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h.  */
2252$4
2253int
2254main (void)
2255{
2256static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2257test_array [0] = 0;
2258return test_array [0];
2259
2260  ;
2261  return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_compile "$LINENO"
2265then :
2266  ac_hi=$ac_mid
2267else $as_nop
2268  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2269fi
2270rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2271done
2272case $ac_lo in #((
2273?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2274'') ac_retval=1 ;;
2275esac
2276  else
2277    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278/* end confdefs.h.  */
2279$4
2280static long int longval (void) { return $2; }
2281static unsigned long int ulongval (void) { return $2; }
2282#include <stdio.h>
2283#include <stdlib.h>
2284int
2285main (void)
2286{
2287
2288  FILE *f = fopen ("conftest.val", "w");
2289  if (! f)
2290    return 1;
2291  if (($2) < 0)
2292    {
2293      long int i = longval ();
2294      if (i != ($2))
2295	return 1;
2296      fprintf (f, "%ld", i);
2297    }
2298  else
2299    {
2300      unsigned long int i = ulongval ();
2301      if (i != ($2))
2302	return 1;
2303      fprintf (f, "%lu", i);
2304    }
2305  /* Do not output a trailing newline, as this causes \r\n confusion
2306     on some platforms.  */
2307  return ferror (f) || fclose (f) != 0;
2308
2309  ;
2310  return 0;
2311}
2312_ACEOF
2313if ac_fn_c_try_run "$LINENO"
2314then :
2315  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2316else $as_nop
2317  ac_retval=1
2318fi
2319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2320  conftest.$ac_objext conftest.beam conftest.$ac_ext
2321rm -f conftest.val
2322
2323  fi
2324  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2325  as_fn_set_status $ac_retval
2326
2327} # ac_fn_c_compute_int
2328
2329# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2330# ----------------------------------------------------
2331# Tries to find if the field MEMBER exists in type AGGR, after including
2332# INCLUDES, setting cache variable VAR accordingly.
2333ac_fn_c_check_member ()
2334{
2335  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2336  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2337printf %s "checking for $2.$3... " >&6; }
2338if eval test \${$4+y}
2339then :
2340  printf %s "(cached) " >&6
2341else $as_nop
2342  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2343/* end confdefs.h.  */
2344$5
2345int
2346main (void)
2347{
2348static $2 ac_aggr;
2349if (ac_aggr.$3)
2350return 0;
2351  ;
2352  return 0;
2353}
2354_ACEOF
2355if ac_fn_c_try_compile "$LINENO"
2356then :
2357  eval "$4=yes"
2358else $as_nop
2359  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2360/* end confdefs.h.  */
2361$5
2362int
2363main (void)
2364{
2365static $2 ac_aggr;
2366if (sizeof ac_aggr.$3)
2367return 0;
2368  ;
2369  return 0;
2370}
2371_ACEOF
2372if ac_fn_c_try_compile "$LINENO"
2373then :
2374  eval "$4=yes"
2375else $as_nop
2376  eval "$4=no"
2377fi
2378rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2379fi
2380rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2381fi
2382eval ac_res=\$$4
2383	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2384printf "%s\n" "$ac_res" >&6; }
2385  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2386
2387} # ac_fn_c_check_member
2388ac_configure_args_raw=
2389for ac_arg
2390do
2391  case $ac_arg in
2392  *\'*)
2393    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2394  esac
2395  as_fn_append ac_configure_args_raw " '$ac_arg'"
2396done
2397
2398case $ac_configure_args_raw in
2399  *$as_nl*)
2400    ac_safe_unquote= ;;
2401  *)
2402    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
2403    ac_unsafe_a="$ac_unsafe_z#~"
2404    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2405    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2406esac
2407
2408cat >config.log <<_ACEOF
2409This file contains any messages produced by compilers while
2410running configure, to aid debugging if configure makes a mistake.
2411
2412It was created by sntp $as_me 4.2.8p18, which was
2413generated by GNU Autoconf 2.71.  Invocation command line was
2414
2415  $ $0$ac_configure_args_raw
2416
2417_ACEOF
2418exec 5>>config.log
2419{
2420cat <<_ASUNAME
2421## --------- ##
2422## Platform. ##
2423## --------- ##
2424
2425hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2426uname -m = `(uname -m) 2>/dev/null || echo unknown`
2427uname -r = `(uname -r) 2>/dev/null || echo unknown`
2428uname -s = `(uname -s) 2>/dev/null || echo unknown`
2429uname -v = `(uname -v) 2>/dev/null || echo unknown`
2430
2431/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2432/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2433
2434/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2435/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2436/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2437/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2438/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2439/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2440/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2441
2442_ASUNAME
2443
2444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2445for as_dir in $PATH
2446do
2447  IFS=$as_save_IFS
2448  case $as_dir in #(((
2449    '') as_dir=./ ;;
2450    */) ;;
2451    *) as_dir=$as_dir/ ;;
2452  esac
2453    printf "%s\n" "PATH: $as_dir"
2454  done
2455IFS=$as_save_IFS
2456
2457} >&5
2458
2459cat >&5 <<_ACEOF
2460
2461
2462## ----------- ##
2463## Core tests. ##
2464## ----------- ##
2465
2466_ACEOF
2467
2468
2469# Keep a trace of the command line.
2470# Strip out --no-create and --no-recursion so they do not pile up.
2471# Strip out --silent because we don't want to record it for future runs.
2472# Also quote any args containing shell meta-characters.
2473# Make two passes to allow for proper duplicate-argument suppression.
2474ac_configure_args=
2475ac_configure_args0=
2476ac_configure_args1=
2477ac_must_keep_next=false
2478for ac_pass in 1 2
2479do
2480  for ac_arg
2481  do
2482    case $ac_arg in
2483    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2484    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2485    | -silent | --silent | --silen | --sile | --sil)
2486      continue ;;
2487    *\'*)
2488      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2489    esac
2490    case $ac_pass in
2491    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2492    2)
2493      as_fn_append ac_configure_args1 " '$ac_arg'"
2494      if test $ac_must_keep_next = true; then
2495	ac_must_keep_next=false # Got value, back to normal.
2496      else
2497	case $ac_arg in
2498	  *=* | --config-cache | -C | -disable-* | --disable-* \
2499	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2500	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2501	  | -with-* | --with-* | -without-* | --without-* | --x)
2502	    case "$ac_configure_args0 " in
2503	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2504	    esac
2505	    ;;
2506	  -* ) ac_must_keep_next=true ;;
2507	esac
2508      fi
2509      as_fn_append ac_configure_args " '$ac_arg'"
2510      ;;
2511    esac
2512  done
2513done
2514{ ac_configure_args0=; unset ac_configure_args0;}
2515{ ac_configure_args1=; unset ac_configure_args1;}
2516
2517# When interrupted or exit'd, cleanup temporary files, and complete
2518# config.log.  We remove comments because anyway the quotes in there
2519# would cause problems or look ugly.
2520# WARNING: Use '\'' to represent an apostrophe within the trap.
2521# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2522trap 'exit_status=$?
2523  # Sanitize IFS.
2524  IFS=" ""	$as_nl"
2525  # Save into config.log some information that might help in debugging.
2526  {
2527    echo
2528
2529    printf "%s\n" "## ---------------- ##
2530## Cache variables. ##
2531## ---------------- ##"
2532    echo
2533    # The following way of writing the cache mishandles newlines in values,
2534(
2535  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2536    eval ac_val=\$$ac_var
2537    case $ac_val in #(
2538    *${as_nl}*)
2539      case $ac_var in #(
2540      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2541printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2542      esac
2543      case $ac_var in #(
2544      _ | IFS | as_nl) ;; #(
2545      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2546      *) { eval $ac_var=; unset $ac_var;} ;;
2547      esac ;;
2548    esac
2549  done
2550  (set) 2>&1 |
2551    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2552    *${as_nl}ac_space=\ *)
2553      sed -n \
2554	"s/'\''/'\''\\\\'\'''\''/g;
2555	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2556      ;; #(
2557    *)
2558      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2559      ;;
2560    esac |
2561    sort
2562)
2563    echo
2564
2565    printf "%s\n" "## ----------------- ##
2566## Output variables. ##
2567## ----------------- ##"
2568    echo
2569    for ac_var in $ac_subst_vars
2570    do
2571      eval ac_val=\$$ac_var
2572      case $ac_val in
2573      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2574      esac
2575      printf "%s\n" "$ac_var='\''$ac_val'\''"
2576    done | sort
2577    echo
2578
2579    if test -n "$ac_subst_files"; then
2580      printf "%s\n" "## ------------------- ##
2581## File substitutions. ##
2582## ------------------- ##"
2583      echo
2584      for ac_var in $ac_subst_files
2585      do
2586	eval ac_val=\$$ac_var
2587	case $ac_val in
2588	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2589	esac
2590	printf "%s\n" "$ac_var='\''$ac_val'\''"
2591      done | sort
2592      echo
2593    fi
2594
2595    if test -s confdefs.h; then
2596      printf "%s\n" "## ----------- ##
2597## confdefs.h. ##
2598## ----------- ##"
2599      echo
2600      cat confdefs.h
2601      echo
2602    fi
2603    test "$ac_signal" != 0 &&
2604      printf "%s\n" "$as_me: caught signal $ac_signal"
2605    printf "%s\n" "$as_me: exit $exit_status"
2606  } >&5
2607  rm -f core *.core core.conftest.* &&
2608    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2609    exit $exit_status
2610' 0
2611for ac_signal in 1 2 13 15; do
2612  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2613done
2614ac_signal=0
2615
2616# confdefs.h avoids OS command line length limits that DEFS can exceed.
2617rm -f -r conftest* confdefs.h
2618
2619printf "%s\n" "/* confdefs.h */" > confdefs.h
2620
2621# Predefined preprocessor variables.
2622
2623printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2624
2625printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2626
2627printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2628
2629printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2630
2631printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2632
2633printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2634
2635
2636# Let the site file select an alternate cache file if it wants to.
2637# Prefer an explicitly selected file to automatically selected ones.
2638if test -n "$CONFIG_SITE"; then
2639  ac_site_files="$CONFIG_SITE"
2640elif test "x$prefix" != xNONE; then
2641  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2642else
2643  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2644fi
2645
2646for ac_site_file in $ac_site_files
2647do
2648  case $ac_site_file in #(
2649  */*) :
2650     ;; #(
2651  *) :
2652    ac_site_file=./$ac_site_file ;;
2653esac
2654  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2655    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2656printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2657    sed 's/^/| /' "$ac_site_file" >&5
2658    . "$ac_site_file" \
2659      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2660printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2661as_fn_error $? "failed to load site script $ac_site_file
2662See \`config.log' for more details" "$LINENO" 5; }
2663  fi
2664done
2665
2666if test -r "$cache_file"; then
2667  # Some versions of bash will fail to source /dev/null (special files
2668  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2669  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2670    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2671printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2672    case $cache_file in
2673      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2674      *)                      . "./$cache_file";;
2675    esac
2676  fi
2677else
2678  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2679printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2680  >$cache_file
2681fi
2682
2683# Test code for whether the C compiler supports C89 (global declarations)
2684ac_c_conftest_c89_globals='
2685/* Does the compiler advertise C89 conformance?
2686   Do not test the value of __STDC__, because some compilers set it to 0
2687   while being otherwise adequately conformant. */
2688#if !defined __STDC__
2689# error "Compiler does not advertise C89 conformance"
2690#endif
2691
2692#include <stddef.h>
2693#include <stdarg.h>
2694struct stat;
2695/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
2696struct buf { int x; };
2697struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2698static char *e (p, i)
2699     char **p;
2700     int i;
2701{
2702  return p[i];
2703}
2704static char *f (char * (*g) (char **, int), char **p, ...)
2705{
2706  char *s;
2707  va_list v;
2708  va_start (v,p);
2709  s = g (p, va_arg (v,int));
2710  va_end (v);
2711  return s;
2712}
2713
2714/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2715   function prototypes and stuff, but not \xHH hex character constants.
2716   These do not provoke an error unfortunately, instead are silently treated
2717   as an "x".  The following induces an error, until -std is added to get
2718   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
2719   array size at least.  It is necessary to write \x00 == 0 to get something
2720   that is true only with -std.  */
2721int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2722
2723/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2724   inside strings and character constants.  */
2725#define FOO(x) '\''x'\''
2726int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2727
2728int test (int i, double x);
2729struct s1 {int (*f) (int a);};
2730struct s2 {int (*f) (double a);};
2731int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2732               int, int);'
2733
2734# Test code for whether the C compiler supports C89 (body of main).
2735ac_c_conftest_c89_main='
2736ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2737'
2738
2739# Test code for whether the C compiler supports C99 (global declarations)
2740ac_c_conftest_c99_globals='
2741// Does the compiler advertise C99 conformance?
2742#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2743# error "Compiler does not advertise C99 conformance"
2744#endif
2745
2746#include <stdbool.h>
2747extern int puts (const char *);
2748extern int printf (const char *, ...);
2749extern int dprintf (int, const char *, ...);
2750extern void *malloc (size_t);
2751
2752// Check varargs macros.  These examples are taken from C99 6.10.3.5.
2753// dprintf is used instead of fprintf to avoid needing to declare
2754// FILE and stderr.
2755#define debug(...) dprintf (2, __VA_ARGS__)
2756#define showlist(...) puts (#__VA_ARGS__)
2757#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2758static void
2759test_varargs_macros (void)
2760{
2761  int x = 1234;
2762  int y = 5678;
2763  debug ("Flag");
2764  debug ("X = %d\n", x);
2765  showlist (The first, second, and third items.);
2766  report (x>y, "x is %d but y is %d", x, y);
2767}
2768
2769// Check long long types.
2770#define BIG64 18446744073709551615ull
2771#define BIG32 4294967295ul
2772#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2773#if !BIG_OK
2774  #error "your preprocessor is broken"
2775#endif
2776#if BIG_OK
2777#else
2778  #error "your preprocessor is broken"
2779#endif
2780static long long int bignum = -9223372036854775807LL;
2781static unsigned long long int ubignum = BIG64;
2782
2783struct incomplete_array
2784{
2785  int datasize;
2786  double data[];
2787};
2788
2789struct named_init {
2790  int number;
2791  const wchar_t *name;
2792  double average;
2793};
2794
2795typedef const char *ccp;
2796
2797static inline int
2798test_restrict (ccp restrict text)
2799{
2800  // See if C++-style comments work.
2801  // Iterate through items via the restricted pointer.
2802  // Also check for declarations in for loops.
2803  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2804    continue;
2805  return 0;
2806}
2807
2808// Check varargs and va_copy.
2809static bool
2810test_varargs (const char *format, ...)
2811{
2812  va_list args;
2813  va_start (args, format);
2814  va_list args_copy;
2815  va_copy (args_copy, args);
2816
2817  const char *str = "";
2818  int number = 0;
2819  float fnumber = 0;
2820
2821  while (*format)
2822    {
2823      switch (*format++)
2824	{
2825	case '\''s'\'': // string
2826	  str = va_arg (args_copy, const char *);
2827	  break;
2828	case '\''d'\'': // int
2829	  number = va_arg (args_copy, int);
2830	  break;
2831	case '\''f'\'': // float
2832	  fnumber = va_arg (args_copy, double);
2833	  break;
2834	default:
2835	  break;
2836	}
2837    }
2838  va_end (args_copy);
2839  va_end (args);
2840
2841  return *str && number && fnumber;
2842}
2843'
2844
2845# Test code for whether the C compiler supports C99 (body of main).
2846ac_c_conftest_c99_main='
2847  // Check bool.
2848  _Bool success = false;
2849  success |= (argc != 0);
2850
2851  // Check restrict.
2852  if (test_restrict ("String literal") == 0)
2853    success = true;
2854  char *restrict newvar = "Another string";
2855
2856  // Check varargs.
2857  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2858  test_varargs_macros ();
2859
2860  // Check flexible array members.
2861  struct incomplete_array *ia =
2862    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2863  ia->datasize = 10;
2864  for (int i = 0; i < ia->datasize; ++i)
2865    ia->data[i] = i * 1.234;
2866
2867  // Check named initializers.
2868  struct named_init ni = {
2869    .number = 34,
2870    .name = L"Test wide string",
2871    .average = 543.34343,
2872  };
2873
2874  ni.number = 58;
2875
2876  int dynamic_array[ni.number];
2877  dynamic_array[0] = argv[0][0];
2878  dynamic_array[ni.number - 1] = 543;
2879
2880  // work around unused variable warnings
2881  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2882	 || dynamic_array[ni.number - 1] != 543);
2883'
2884
2885# Test code for whether the C compiler supports C11 (global declarations)
2886ac_c_conftest_c11_globals='
2887// Does the compiler advertise C11 conformance?
2888#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2889# error "Compiler does not advertise C11 conformance"
2890#endif
2891
2892// Check _Alignas.
2893char _Alignas (double) aligned_as_double;
2894char _Alignas (0) no_special_alignment;
2895extern char aligned_as_int;
2896char _Alignas (0) _Alignas (int) aligned_as_int;
2897
2898// Check _Alignof.
2899enum
2900{
2901  int_alignment = _Alignof (int),
2902  int_array_alignment = _Alignof (int[100]),
2903  char_alignment = _Alignof (char)
2904};
2905_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2906
2907// Check _Noreturn.
2908int _Noreturn does_not_return (void) { for (;;) continue; }
2909
2910// Check _Static_assert.
2911struct test_static_assert
2912{
2913  int x;
2914  _Static_assert (sizeof (int) <= sizeof (long int),
2915                  "_Static_assert does not work in struct");
2916  long int y;
2917};
2918
2919// Check UTF-8 literals.
2920#define u8 syntax error!
2921char const utf8_literal[] = u8"happens to be ASCII" "another string";
2922
2923// Check duplicate typedefs.
2924typedef long *long_ptr;
2925typedef long int *long_ptr;
2926typedef long_ptr long_ptr;
2927
2928// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2929struct anonymous
2930{
2931  union {
2932    struct { int i; int j; };
2933    struct { int k; long int l; } w;
2934  };
2935  int m;
2936} v1;
2937'
2938
2939# Test code for whether the C compiler supports C11 (body of main).
2940ac_c_conftest_c11_main='
2941  _Static_assert ((offsetof (struct anonymous, i)
2942		   == offsetof (struct anonymous, w.k)),
2943		  "Anonymous union alignment botch");
2944  v1.i = 2;
2945  v1.w.k = 5;
2946  ok |= v1.i != 5;
2947'
2948
2949# Test code for whether the C compiler supports C11 (complete).
2950ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2951${ac_c_conftest_c99_globals}
2952${ac_c_conftest_c11_globals}
2953
2954int
2955main (int argc, char **argv)
2956{
2957  int ok = 0;
2958  ${ac_c_conftest_c89_main}
2959  ${ac_c_conftest_c99_main}
2960  ${ac_c_conftest_c11_main}
2961  return ok;
2962}
2963"
2964
2965# Test code for whether the C compiler supports C99 (complete).
2966ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2967${ac_c_conftest_c99_globals}
2968
2969int
2970main (int argc, char **argv)
2971{
2972  int ok = 0;
2973  ${ac_c_conftest_c89_main}
2974  ${ac_c_conftest_c99_main}
2975  return ok;
2976}
2977"
2978
2979# Test code for whether the C compiler supports C89 (complete).
2980ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2981
2982int
2983main (int argc, char **argv)
2984{
2985  int ok = 0;
2986  ${ac_c_conftest_c89_main}
2987  return ok;
2988}
2989"
2990
2991as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2992as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2993as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2994as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2995as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2996as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2997as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2998as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2999as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3000as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3001as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
3002as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
3003as_fn_append ac_func_c_list " fork HAVE_FORK"
3004as_fn_append ac_func_c_list " vfork HAVE_VFORK"
3005as_fn_append ac_header_c_list " stdarg.h stdarg_h HAVE_STDARG_H"
3006as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF"
3007
3008# Auxiliary files required by this configure script.
3009ac_aux_files="ltmain.sh ar-lib compile config.guess config.sub missing install-sh"
3010
3011# Locations in which to look for auxiliary files.
3012ac_aux_dir_candidates="${srcdir}/libevent/build-aux"
3013
3014# Search for a directory containing all of the required auxiliary files,
3015# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
3016# If we don't find one directory that contains all the files we need,
3017# we report the set of missing files from the *first* directory in
3018# $ac_aux_dir_candidates and give up.
3019ac_missing_aux_files=""
3020ac_first_candidate=:
3021printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
3022as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3023as_found=false
3024for as_dir in $ac_aux_dir_candidates
3025do
3026  IFS=$as_save_IFS
3027  case $as_dir in #(((
3028    '') as_dir=./ ;;
3029    */) ;;
3030    *) as_dir=$as_dir/ ;;
3031  esac
3032  as_found=:
3033
3034  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
3035  ac_aux_dir_found=yes
3036  ac_install_sh=
3037  for ac_aux in $ac_aux_files
3038  do
3039    # As a special case, if "install-sh" is required, that requirement
3040    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
3041    # and $ac_install_sh is set appropriately for whichever one is found.
3042    if test x"$ac_aux" = x"install-sh"
3043    then
3044      if test -f "${as_dir}install-sh"; then
3045        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
3046        ac_install_sh="${as_dir}install-sh -c"
3047      elif test -f "${as_dir}install.sh"; then
3048        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
3049        ac_install_sh="${as_dir}install.sh -c"
3050      elif test -f "${as_dir}shtool"; then
3051        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
3052        ac_install_sh="${as_dir}shtool install -c"
3053      else
3054        ac_aux_dir_found=no
3055        if $ac_first_candidate; then
3056          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3057        else
3058          break
3059        fi
3060      fi
3061    else
3062      if test -f "${as_dir}${ac_aux}"; then
3063        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
3064      else
3065        ac_aux_dir_found=no
3066        if $ac_first_candidate; then
3067          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3068        else
3069          break
3070        fi
3071      fi
3072    fi
3073  done
3074  if test "$ac_aux_dir_found" = yes; then
3075    ac_aux_dir="$as_dir"
3076    break
3077  fi
3078  ac_first_candidate=false
3079
3080  as_found=false
3081done
3082IFS=$as_save_IFS
3083if $as_found
3084then :
3085
3086else $as_nop
3087  as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
3088fi
3089
3090
3091# These three variables are undocumented and unsupported,
3092# and are intended to be withdrawn in a future Autoconf release.
3093# They can cause serious problems if a builder's source tree is in a directory
3094# whose full name contains unusual characters.
3095if test -f "${ac_aux_dir}config.guess"; then
3096  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3097fi
3098if test -f "${ac_aux_dir}config.sub"; then
3099  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3100fi
3101if test -f "$ac_aux_dir/configure"; then
3102  ac_configure="$SHELL ${ac_aux_dir}configure"
3103fi
3104
3105# Check that the precious variables saved in the cache have kept the same
3106# value.
3107ac_cache_corrupted=false
3108for ac_var in $ac_precious_vars; do
3109  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3110  eval ac_new_set=\$ac_env_${ac_var}_set
3111  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3112  eval ac_new_val=\$ac_env_${ac_var}_value
3113  case $ac_old_set,$ac_new_set in
3114    set,)
3115      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3116printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3117      ac_cache_corrupted=: ;;
3118    ,set)
3119      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3120printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3121      ac_cache_corrupted=: ;;
3122    ,);;
3123    *)
3124      if test "x$ac_old_val" != "x$ac_new_val"; then
3125	# differences in whitespace do not lead to failure.
3126	ac_old_val_w=`echo x $ac_old_val`
3127	ac_new_val_w=`echo x $ac_new_val`
3128	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3129	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3130printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3131	  ac_cache_corrupted=:
3132	else
3133	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3134printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3135	  eval $ac_var=\$ac_old_val
3136	fi
3137	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3138printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
3139	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3140printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
3141      fi;;
3142  esac
3143  # Pass precious variables to config.status.
3144  if test "$ac_new_set" = set; then
3145    case $ac_new_val in
3146    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3147    *) ac_arg=$ac_var=$ac_new_val ;;
3148    esac
3149    case " $ac_configure_args " in
3150      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3151      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3152    esac
3153  fi
3154done
3155if $ac_cache_corrupted; then
3156  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3157printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3158  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3159printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3160  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
3161	    and start over" "$LINENO" 5
3162fi
3163## -------------------- ##
3164## Main body of script. ##
3165## -------------------- ##
3166
3167ac_ext=c
3168ac_cpp='$CPP $CPPFLAGS'
3169ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3170ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3171ac_compiler_gnu=$ac_cv_c_compiler_gnu
3172
3173
3174
3175
3176ac_ext=c
3177ac_cpp='$CPP $CPPFLAGS'
3178ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3179ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3180ac_compiler_gnu=$ac_cv_c_compiler_gnu
3181
3182
3183# Bump sntp_configure_cache_version for each change to configure.ac or
3184# .m4 files which invalidates cached values from previous configure
3185# runs.
3186#
3187# If the change affects cache variables used only by the main NTP
3188# configure.ac, then only its version number should be bumped, while
3189# the subdir configure.ac version numbers should be unchanged.  The
3190# same is true for a test/variable that is used only by one subdir
3191# being changed incompatibly; only that subdir's cache version needs
3192# bumping.
3193#
3194# If a change affects variables shared by all NTP configure scripts,
3195# please bump the version numbers of each.  If you are not sure, the
3196# safe choice is to bump all on any cache-invalidating change.
3197#
3198# In order to avoid the risk of version stamp collision between -stable
3199# and -dev branches, do not simply increment the version, instead use
3200# the date YYYYMMDD optionally with -HHMM if there is more than one
3201# bump in a day.
3202
3203sntp_configure_cache_version=20240218
3204
3205# When the version of config.cache and configure do not
3206# match, NTP_CACHEVERSION will flush the cache.
3207
3208
3209
3210    ntp_cache_flush=1
3211
3212    case "$ntp_cv_sntp_cache_version" in
3213     $sntp_configure_cache_version)
3214	# same version, good
3215	ntp_cache_flush=0
3216	;;
3217     '')
3218	# No cache, predates ntp_cv_sntp_cache_version, or is empty.
3219	case "$cache_file" in
3220	 /dev/null)
3221	    ntp_cache_flush=0
3222	    ;;
3223	 *)
3224	    case "$NTP_CACHEVERSION_PARENT" in
3225	     '')
3226		# Do not clear the cache immediately after it is created
3227		# empty as it is noisy.  Differentiate a newly-created
3228		# config.cache from one predating the cache version
3229		# mechanism by looking for the first cached variable set
3230		# by Autoconf
3231		case "$ac_cv_path_install" in
3232		 '')
3233		    # empty config.cache file
3234		    ntp_cache_flush=0
3235		esac
3236		;;
3237	     *)
3238		# Parent configure just created cache from empty,
3239		# flushing would be counterproductive.
3240		ntp_cache_flush=0;
3241		;;
3242	    esac
3243	esac
3244	;;
3245     *)
3246	# configure cache version mismatches config.cache version
3247	;;
3248    esac
3249
3250    case "$ntp_cache_flush" in
3251     1)
3252	c_version="${ntp_cv_sntp_cache_version:-(no version found)}"
3253
3254	# Do we flush all variables or exclude others' version stamps?
3255
3256	case "$NTP_CACHEVERSION_PARENT" in
3257	 '')
3258	    # Clear all *_cv_* variables including our child subdirs'
3259	    # ntp_cv_*_cache_version variables.  This prevents subdir
3260	    # configure scripts from noticing a version mismatch just
3261	    # after the top configure in the invocation cleared and
3262	    # recreated the cache.
3263
3264	    c_varname_list=`set |
3265			    sed -n -e 's/=.*$//' \
3266				   -e '/_cv_/p'
3267			   `
3268	    ;;
3269	 *)
3270	    # This is not the top configure this particular invocation.
3271	    # Clear all *_cv_* variables sparing the version stamps
3272	    # of other configure scripts, so we don't trigger
3273	    # useless repeated clearings.
3274
3275	    c_varname_list=`set |
3276			    sed -n -e 's/=.*$//' \
3277				   -e '/ntp_cv_.*_cache_version/d' \
3278				   -e '/_cv_/p'
3279			   `
3280	esac
3281
3282	for c_varname in $c_varname_list
3283	do
3284	    { eval $c_varname=; unset $c_varname;}
3285	done
3286
3287	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: $cache_file saved by another version, ignored." >&5
3288printf "%s\n" "$as_me: $cache_file saved by another version, ignored." >&6;}
3289	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: configure script cache version: $sntp_configure_cache_version" >&5
3290printf "%s\n" "$as_me: configure script cache version: $sntp_configure_cache_version" >&6;}
3291	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: $cache_file version: $c_version" >&5
3292printf "%s\n" "$as_me: $cache_file version: $c_version" >&6;}
3293	{ c_varname=; unset c_varname;}
3294	{ c_varname_list=; unset c_varname_list;}
3295	{ c_version=; unset c_version;}
3296    esac
3297
3298    { ntp_cache_flush=; unset ntp_cache_flush;}
3299
3300    # save configure version in config.cache for next time
3301    ntp_cv_sntp_cache_version="$sntp_configure_cache_version"
3302
3303    # let any subdir configure.ac NTP_CACHEVERSION invocations
3304    # know they are not the top level.
3305    NTP_CACHEVERSION_PARENT='sntp' ; export NTP_CACHEVERSION_PARENT
3306
3307
3308am__api_version='1.16'
3309
3310
3311
3312  # Find a good install program.  We prefer a C program (faster),
3313# so one script is as good as another.  But avoid the broken or
3314# incompatible versions:
3315# SysV /etc/install, /usr/sbin/install
3316# SunOS /usr/etc/install
3317# IRIX /sbin/install
3318# AIX /bin/install
3319# AmigaOS /C/install, which installs bootblocks on floppy discs
3320# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3321# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3322# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3323# OS/2's system install, which has a completely different semantic
3324# ./install, which can be erroneously created by make from ./install.sh.
3325# Reject install programs that cannot install multiple files.
3326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3327printf %s "checking for a BSD-compatible install... " >&6; }
3328if test -z "$INSTALL"; then
3329if test ${ac_cv_path_install+y}
3330then :
3331  printf %s "(cached) " >&6
3332else $as_nop
3333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3334for as_dir in $PATH
3335do
3336  IFS=$as_save_IFS
3337  case $as_dir in #(((
3338    '') as_dir=./ ;;
3339    */) ;;
3340    *) as_dir=$as_dir/ ;;
3341  esac
3342    # Account for fact that we put trailing slashes in our PATH walk.
3343case $as_dir in #((
3344  ./ | /[cC]/* | \
3345  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3346  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3347  /usr/ucb/* ) ;;
3348  *)
3349    # OSF1 and SCO ODT 3.0 have their own names for install.
3350    # Don't use installbsd from OSF since it installs stuff as root
3351    # by default.
3352    for ac_prog in ginstall scoinst install; do
3353      for ac_exec_ext in '' $ac_executable_extensions; do
3354	if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
3355	  if test $ac_prog = install &&
3356	    grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3357	    # AIX install.  It has an incompatible calling convention.
3358	    :
3359	  elif test $ac_prog = install &&
3360	    grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3361	    # program-specific install script used by HP pwplus--don't use.
3362	    :
3363	  else
3364	    rm -rf conftest.one conftest.two conftest.dir
3365	    echo one > conftest.one
3366	    echo two > conftest.two
3367	    mkdir conftest.dir
3368	    if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
3369	      test -s conftest.one && test -s conftest.two &&
3370	      test -s conftest.dir/conftest.one &&
3371	      test -s conftest.dir/conftest.two
3372	    then
3373	      ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
3374	      break 3
3375	    fi
3376	  fi
3377	fi
3378      done
3379    done
3380    ;;
3381esac
3382
3383  done
3384IFS=$as_save_IFS
3385
3386rm -rf conftest.one conftest.two conftest.dir
3387
3388fi
3389  if test ${ac_cv_path_install+y}; then
3390    INSTALL=$ac_cv_path_install
3391  else
3392    # As a last resort, use the slow shell script.  Don't cache a
3393    # value for INSTALL within a source directory, because that will
3394    # break other packages using the cache if that directory is
3395    # removed, or if the value is a relative name.
3396    INSTALL=$ac_install_sh
3397  fi
3398fi
3399{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3400printf "%s\n" "$INSTALL" >&6; }
3401
3402# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3403# It thinks the first close brace ends the variable substitution.
3404test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3405
3406test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3407
3408test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3409
3410{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3411printf %s "checking whether build environment is sane... " >&6; }
3412# Reject unsafe characters in $srcdir or the absolute working directory
3413# name.  Accept space and tab only in the latter.
3414am_lf='
3415'
3416case `pwd` in
3417  *[\\\"\#\$\&\'\`$am_lf]*)
3418    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3419esac
3420case $srcdir in
3421  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
3422    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3423esac
3424
3425# Do 'set' in a subshell so we don't clobber the current shell's
3426# arguments.  Must try -L first in case configure is actually a
3427# symlink; some systems play weird games with the mod time of symlinks
3428# (eg FreeBSD returns the mod time of the symlink's containing
3429# directory).
3430if (
3431   am_has_slept=no
3432   for am_try in 1 2; do
3433     echo "timestamp, slept: $am_has_slept" > conftest.file
3434     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3435     if test "$*" = "X"; then
3436	# -L didn't work.
3437	set X `ls -t "$srcdir/configure" conftest.file`
3438     fi
3439     if test "$*" != "X $srcdir/configure conftest.file" \
3440	&& test "$*" != "X conftest.file $srcdir/configure"; then
3441
3442	# If neither matched, then we have a broken ls.  This can happen
3443	# if, for instance, CONFIG_SHELL is bash and it inherits a
3444	# broken ls alias from the environment.  This has actually
3445	# happened.  Such a system could not be considered "sane".
3446	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3447  alias in your environment" "$LINENO" 5
3448     fi
3449     if test "$2" = conftest.file || test $am_try -eq 2; then
3450       break
3451     fi
3452     # Just in case.
3453     sleep 1
3454     am_has_slept=yes
3455   done
3456   test "$2" = conftest.file
3457   )
3458then
3459   # Ok.
3460   :
3461else
3462   as_fn_error $? "newly created file is older than distributed files!
3463Check your system clock" "$LINENO" 5
3464fi
3465{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3466printf "%s\n" "yes" >&6; }
3467# If we didn't sleep, we still need to ensure time stamps of config.status and
3468# generated files are strictly newer.
3469am_sleep_pid=
3470if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3471  ( sleep 1 ) &
3472  am_sleep_pid=$!
3473fi
3474
3475rm -f conftest.file
3476
3477test "$program_prefix" != NONE &&
3478  program_transform_name="s&^&$program_prefix&;$program_transform_name"
3479# Use a double $ so make ignores it.
3480test "$program_suffix" != NONE &&
3481  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3482# Double any \ or $.
3483# By default was `s,x,x', remove it if useless.
3484ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3485program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
3486
3487
3488# Expand $ac_aux_dir to an absolute path.
3489am_aux_dir=`cd "$ac_aux_dir" && pwd`
3490
3491
3492  if test x"${MISSING+set}" != xset; then
3493  MISSING="\${SHELL} '$am_aux_dir/missing'"
3494fi
3495# Use eval to expand $SHELL
3496if eval "$MISSING --is-lightweight"; then
3497  am_missing_run="$MISSING "
3498else
3499  am_missing_run=
3500  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3501printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3502fi
3503
3504if test x"${install_sh+set}" != xset; then
3505  case $am_aux_dir in
3506  *\ * | *\	*)
3507    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3508  *)
3509    install_sh="\${SHELL} $am_aux_dir/install-sh"
3510  esac
3511fi
3512
3513# Installed binaries are usually stripped using 'strip' when the user
3514# run "make install-strip".  However 'strip' might not be the right
3515# tool to use in cross-compilation environments, therefore Automake
3516# will honor the 'STRIP' environment variable to overrule this program.
3517if test "$cross_compiling" != no; then
3518  if test -n "$ac_tool_prefix"; then
3519  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3520set dummy ${ac_tool_prefix}strip; ac_word=$2
3521{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3522printf %s "checking for $ac_word... " >&6; }
3523if test ${ac_cv_prog_STRIP+y}
3524then :
3525  printf %s "(cached) " >&6
3526else $as_nop
3527  if test -n "$STRIP"; then
3528  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3529else
3530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3531for as_dir in $PATH
3532do
3533  IFS=$as_save_IFS
3534  case $as_dir in #(((
3535    '') as_dir=./ ;;
3536    */) ;;
3537    *) as_dir=$as_dir/ ;;
3538  esac
3539    for ac_exec_ext in '' $ac_executable_extensions; do
3540  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3541    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3542    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3543    break 2
3544  fi
3545done
3546  done
3547IFS=$as_save_IFS
3548
3549fi
3550fi
3551STRIP=$ac_cv_prog_STRIP
3552if test -n "$STRIP"; then
3553  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3554printf "%s\n" "$STRIP" >&6; }
3555else
3556  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3557printf "%s\n" "no" >&6; }
3558fi
3559
3560
3561fi
3562if test -z "$ac_cv_prog_STRIP"; then
3563  ac_ct_STRIP=$STRIP
3564  # Extract the first word of "strip", so it can be a program name with args.
3565set dummy strip; ac_word=$2
3566{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3567printf %s "checking for $ac_word... " >&6; }
3568if test ${ac_cv_prog_ac_ct_STRIP+y}
3569then :
3570  printf %s "(cached) " >&6
3571else $as_nop
3572  if test -n "$ac_ct_STRIP"; then
3573  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3574else
3575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3576for as_dir in $PATH
3577do
3578  IFS=$as_save_IFS
3579  case $as_dir in #(((
3580    '') as_dir=./ ;;
3581    */) ;;
3582    *) as_dir=$as_dir/ ;;
3583  esac
3584    for ac_exec_ext in '' $ac_executable_extensions; do
3585  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3586    ac_cv_prog_ac_ct_STRIP="strip"
3587    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3588    break 2
3589  fi
3590done
3591  done
3592IFS=$as_save_IFS
3593
3594fi
3595fi
3596ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3597if test -n "$ac_ct_STRIP"; then
3598  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3599printf "%s\n" "$ac_ct_STRIP" >&6; }
3600else
3601  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3602printf "%s\n" "no" >&6; }
3603fi
3604
3605  if test "x$ac_ct_STRIP" = x; then
3606    STRIP=":"
3607  else
3608    case $cross_compiling:$ac_tool_warned in
3609yes:)
3610{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3611printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3612ac_tool_warned=yes ;;
3613esac
3614    STRIP=$ac_ct_STRIP
3615  fi
3616else
3617  STRIP="$ac_cv_prog_STRIP"
3618fi
3619
3620fi
3621INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3622
3623
3624  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
3625printf %s "checking for a race-free mkdir -p... " >&6; }
3626if test -z "$MKDIR_P"; then
3627  if test ${ac_cv_path_mkdir+y}
3628then :
3629  printf %s "(cached) " >&6
3630else $as_nop
3631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3632for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3633do
3634  IFS=$as_save_IFS
3635  case $as_dir in #(((
3636    '') as_dir=./ ;;
3637    */) ;;
3638    *) as_dir=$as_dir/ ;;
3639  esac
3640    for ac_prog in mkdir gmkdir; do
3641	 for ac_exec_ext in '' $ac_executable_extensions; do
3642	   as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
3643	   case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
3644	     'mkdir ('*'coreutils) '* | \
3645	     'BusyBox '* | \
3646	     'mkdir (fileutils) '4.1*)
3647	       ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
3648	       break 3;;
3649	   esac
3650	 done
3651       done
3652  done
3653IFS=$as_save_IFS
3654
3655fi
3656
3657  test -d ./--version && rmdir ./--version
3658  if test ${ac_cv_path_mkdir+y}; then
3659    MKDIR_P="$ac_cv_path_mkdir -p"
3660  else
3661    # As a last resort, use the slow shell script.  Don't cache a
3662    # value for MKDIR_P within a source directory, because that will
3663    # break other packages using the cache if that directory is
3664    # removed, or if the value is a relative name.
3665    MKDIR_P="$ac_install_sh -d"
3666  fi
3667fi
3668{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3669printf "%s\n" "$MKDIR_P" >&6; }
3670
3671for ac_prog in gawk mawk nawk awk
3672do
3673  # Extract the first word of "$ac_prog", so it can be a program name with args.
3674set dummy $ac_prog; ac_word=$2
3675{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3676printf %s "checking for $ac_word... " >&6; }
3677if test ${ac_cv_prog_AWK+y}
3678then :
3679  printf %s "(cached) " >&6
3680else $as_nop
3681  if test -n "$AWK"; then
3682  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3683else
3684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3685for as_dir in $PATH
3686do
3687  IFS=$as_save_IFS
3688  case $as_dir in #(((
3689    '') as_dir=./ ;;
3690    */) ;;
3691    *) as_dir=$as_dir/ ;;
3692  esac
3693    for ac_exec_ext in '' $ac_executable_extensions; do
3694  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3695    ac_cv_prog_AWK="$ac_prog"
3696    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3697    break 2
3698  fi
3699done
3700  done
3701IFS=$as_save_IFS
3702
3703fi
3704fi
3705AWK=$ac_cv_prog_AWK
3706if test -n "$AWK"; then
3707  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3708printf "%s\n" "$AWK" >&6; }
3709else
3710  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3711printf "%s\n" "no" >&6; }
3712fi
3713
3714
3715  test -n "$AWK" && break
3716done
3717
3718{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3719printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3720set x ${MAKE-make}
3721ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3722if eval test \${ac_cv_prog_make_${ac_make}_set+y}
3723then :
3724  printf %s "(cached) " >&6
3725else $as_nop
3726  cat >conftest.make <<\_ACEOF
3727SHELL = /bin/sh
3728all:
3729	@echo '@@@%%%=$(MAKE)=@@@%%%'
3730_ACEOF
3731# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3732case `${MAKE-make} -f conftest.make 2>/dev/null` in
3733  *@@@%%%=?*=@@@%%%*)
3734    eval ac_cv_prog_make_${ac_make}_set=yes;;
3735  *)
3736    eval ac_cv_prog_make_${ac_make}_set=no;;
3737esac
3738rm -f conftest.make
3739fi
3740if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3741  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3742printf "%s\n" "yes" >&6; }
3743  SET_MAKE=
3744else
3745  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3746printf "%s\n" "no" >&6; }
3747  SET_MAKE="MAKE=${MAKE-make}"
3748fi
3749
3750rm -rf .tst 2>/dev/null
3751mkdir .tst 2>/dev/null
3752if test -d .tst; then
3753  am__leading_dot=.
3754else
3755  am__leading_dot=_
3756fi
3757rmdir .tst 2>/dev/null
3758
3759# Check whether --enable-silent-rules was given.
3760if test ${enable_silent_rules+y}
3761then :
3762  enableval=$enable_silent_rules;
3763fi
3764
3765case $enable_silent_rules in # (((
3766  yes) AM_DEFAULT_VERBOSITY=0;;
3767   no) AM_DEFAULT_VERBOSITY=1;;
3768    *) AM_DEFAULT_VERBOSITY=1;;
3769esac
3770am_make=${MAKE-make}
3771{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3772printf %s "checking whether $am_make supports nested variables... " >&6; }
3773if test ${am_cv_make_support_nested_variables+y}
3774then :
3775  printf %s "(cached) " >&6
3776else $as_nop
3777  if printf "%s\n" 'TRUE=$(BAR$(V))
3778BAR0=false
3779BAR1=true
3780V=1
3781am__doit:
3782	@$(TRUE)
3783.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3784  am_cv_make_support_nested_variables=yes
3785else
3786  am_cv_make_support_nested_variables=no
3787fi
3788fi
3789{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3790printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
3791if test $am_cv_make_support_nested_variables = yes; then
3792    AM_V='$(V)'
3793  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3794else
3795  AM_V=$AM_DEFAULT_VERBOSITY
3796  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3797fi
3798AM_BACKSLASH='\'
3799
3800if test "`cd $srcdir && pwd`" != "`pwd`"; then
3801  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3802  # is not polluted with repeated "-I."
3803  am__isrc=' -I$(srcdir)'
3804  # test to see if srcdir already configured
3805  if test -f $srcdir/config.status; then
3806    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3807  fi
3808fi
3809
3810# test whether we have cygpath
3811if test -z "$CYGPATH_W"; then
3812  if (cygpath --version) >/dev/null 2>/dev/null; then
3813    CYGPATH_W='cygpath -w'
3814  else
3815    CYGPATH_W=echo
3816  fi
3817fi
3818
3819
3820# Define the identity of the package.
3821 PACKAGE='sntp'
3822 VERSION='4.2.8p18'
3823
3824
3825printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
3826
3827
3828printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
3829
3830# Some tools Automake needs.
3831
3832ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3833
3834
3835AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3836
3837
3838AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3839
3840
3841AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3842
3843
3844MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3845
3846# For better backward compatibility.  To be removed once Automake 1.9.x
3847# dies out for good.  For more background, see:
3848# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3849# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3850mkdir_p='$(MKDIR_P)'
3851
3852# We need awk for the "check" target (and possibly the TAP driver).  The
3853# system "awk" is bad on some platforms.
3854# Always define AMTAR for backward compatibility.  Yes, it's still used
3855# in the wild :-(  We should find a proper way to deprecate it ...
3856AMTAR='$${TAR-tar}'
3857
3858
3859# We'll loop over all known methods to create a tar archive until one works.
3860_am_tools='gnutar  pax cpio none'
3861
3862am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3863
3864
3865
3866
3867
3868# Variables for tags utilities; see am/tags.am
3869if test -z "$CTAGS"; then
3870  CTAGS=ctags
3871fi
3872
3873if test -z "$ETAGS"; then
3874  ETAGS=etags
3875fi
3876
3877if test -z "$CSCOPE"; then
3878  CSCOPE=cscope
3879fi
3880
3881
3882
3883# POSIX will say in a future version that running "rm -f" with no argument
3884# is OK; and we want to be able to make that assumption in our Makefile
3885# recipes.  So use an aggressive probe to check that the usage we want is
3886# actually supported "in the wild" to an acceptable degree.
3887# See automake bug#10828.
3888# To make any issue more visible, cause the running configure to be aborted
3889# by default if the 'rm' program in use doesn't match our expectations; the
3890# user can still override this though.
3891if rm -f && rm -fr && rm -rf; then : OK; else
3892  cat >&2 <<'END'
3893Oops!
3894
3895Your 'rm' program seems unable to run without file operands specified
3896on the command line, even when the '-f' option is present.  This is contrary
3897to the behaviour of most rm programs out there, and not conforming with
3898the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3899
3900Please tell bug-automake@gnu.org about your system, including the value
3901of your $PATH and any error possibly output before this message.  This
3902can help us improve future automake versions.
3903
3904END
3905  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3906    echo 'Configuration will proceed anyway, since you have set the' >&2
3907    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3908    echo >&2
3909  else
3910    cat >&2 <<'END'
3911Aborting the configuration process, to ensure you take notice of the issue.
3912
3913You can download and install GNU coreutils to get an 'rm' implementation
3914that behaves properly: <https://www.gnu.org/software/coreutils/>.
3915
3916If you want to complete the configuration process using your problematic
3917'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3918to "yes", and re-run configure.
3919
3920END
3921    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3922  fi
3923fi
3924
3925
3926# Check whether --enable-silent-rules was given.
3927if test ${enable_silent_rules+y}
3928then :
3929  enableval=$enable_silent_rules;
3930fi
3931
3932case $enable_silent_rules in # (((
3933  yes) AM_DEFAULT_VERBOSITY=0;;
3934   no) AM_DEFAULT_VERBOSITY=1;;
3935    *) AM_DEFAULT_VERBOSITY=0;;
3936esac
3937am_make=${MAKE-make}
3938{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3939printf %s "checking whether $am_make supports nested variables... " >&6; }
3940if test ${am_cv_make_support_nested_variables+y}
3941then :
3942  printf %s "(cached) " >&6
3943else $as_nop
3944  if printf "%s\n" 'TRUE=$(BAR$(V))
3945BAR0=false
3946BAR1=true
3947V=1
3948am__doit:
3949	@$(TRUE)
3950.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3951  am_cv_make_support_nested_variables=yes
3952else
3953  am_cv_make_support_nested_variables=no
3954fi
3955fi
3956{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3957printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
3958if test $am_cv_make_support_nested_variables = yes; then
3959    AM_V='$(V)'
3960  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3961else
3962  AM_V=$AM_DEFAULT_VERBOSITY
3963  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3964fi
3965AM_BACKSLASH='\'
3966
3967
3968
3969
3970  # Make sure we can run config.sub.
3971$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
3972  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
3973
3974{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3975printf %s "checking build system type... " >&6; }
3976if test ${ac_cv_build+y}
3977then :
3978  printf %s "(cached) " >&6
3979else $as_nop
3980  ac_build_alias=$build_alias
3981test "x$ac_build_alias" = x &&
3982  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
3983test "x$ac_build_alias" = x &&
3984  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3985ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
3986  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
3987
3988fi
3989{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3990printf "%s\n" "$ac_cv_build" >&6; }
3991case $ac_cv_build in
3992*-*-*) ;;
3993*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3994esac
3995build=$ac_cv_build
3996ac_save_IFS=$IFS; IFS='-'
3997set x $ac_cv_build
3998shift
3999build_cpu=$1
4000build_vendor=$2
4001shift; shift
4002# Remember, the first character of IFS is used to create $*,
4003# except with old shells:
4004build_os=$*
4005IFS=$ac_save_IFS
4006case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4007
4008
4009{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4010printf %s "checking host system type... " >&6; }
4011if test ${ac_cv_host+y}
4012then :
4013  printf %s "(cached) " >&6
4014else $as_nop
4015  if test "x$host_alias" = x; then
4016  ac_cv_host=$ac_cv_build
4017else
4018  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
4019    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
4020fi
4021
4022fi
4023{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4024printf "%s\n" "$ac_cv_host" >&6; }
4025case $ac_cv_host in
4026*-*-*) ;;
4027*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4028esac
4029host=$ac_cv_host
4030ac_save_IFS=$IFS; IFS='-'
4031set x $ac_cv_host
4032shift
4033host_cpu=$1
4034host_vendor=$2
4035shift; shift
4036# Remember, the first character of IFS is used to create $*,
4037# except with old shells:
4038host_os=$*
4039IFS=$ac_save_IFS
4040case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4041
4042
4043
4044printf "%s\n" "#define STR_SYSTEM \"$host\"" >>confdefs.h
4045
4046ac_config_headers="$ac_config_headers config.h"
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058DEPDIR="${am__leading_dot}deps"
4059
4060ac_config_commands="$ac_config_commands depfiles"
4061
4062{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
4063printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
4064cat > confinc.mk << 'END'
4065am__doit:
4066	@echo this is the am__doit target >confinc.out
4067.PHONY: am__doit
4068END
4069am__include="#"
4070am__quote=
4071# BSD make does it like this.
4072echo '.include "confinc.mk" # ignored' > confmf.BSD
4073# Other make implementations (GNU, Solaris 10, AIX) do it like this.
4074echo 'include confinc.mk # ignored' > confmf.GNU
4075_am_result=no
4076for s in GNU BSD; do
4077  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
4078   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
4079   ac_status=$?
4080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4081   (exit $ac_status); }
4082  case $?:`cat confinc.out 2>/dev/null` in #(
4083  '0:this is the am__doit target') :
4084    case $s in #(
4085  BSD) :
4086    am__include='.include' am__quote='"' ;; #(
4087  *) :
4088    am__include='include' am__quote='' ;;
4089esac ;; #(
4090  *) :
4091     ;;
4092esac
4093  if test "$am__include" != "#"; then
4094    _am_result="yes ($s style)"
4095    break
4096  fi
4097done
4098rm -f confinc.* confmf.*
4099{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
4100printf "%s\n" "${_am_result}" >&6; }
4101
4102# Check whether --enable-dependency-tracking was given.
4103if test ${enable_dependency_tracking+y}
4104then :
4105  enableval=$enable_dependency_tracking;
4106fi
4107
4108if test "x$enable_dependency_tracking" != xno; then
4109  am_depcomp="$ac_aux_dir/depcomp"
4110  AMDEPBACKSLASH='\'
4111  am__nodep='_no'
4112fi
4113 if test "x$enable_dependency_tracking" != xno; then
4114  AMDEP_TRUE=
4115  AMDEP_FALSE='#'
4116else
4117  AMDEP_TRUE='#'
4118  AMDEP_FALSE=
4119fi
4120
4121
4122
4123case "$build" in
4124 *-*-freebsd1?.*)
4125    cclist=cc
4126    ;;
4127 *)
4128    cclist="cc gcc"
4129    ;;
4130esac
4131
4132
4133#AC_USE_SYSTEM_EXTENSIONS
4134
4135ac_ext=c
4136ac_cpp='$CPP $CPPFLAGS'
4137ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4138ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4139ac_compiler_gnu=$ac_cv_c_compiler_gnu
4140if test -n "$ac_tool_prefix"; then
4141  for ac_prog in $cclist
4142  do
4143    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4144set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4145{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4146printf %s "checking for $ac_word... " >&6; }
4147if test ${ac_cv_prog_CC+y}
4148then :
4149  printf %s "(cached) " >&6
4150else $as_nop
4151  if test -n "$CC"; then
4152  ac_cv_prog_CC="$CC" # Let the user override the test.
4153else
4154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4155for as_dir in $PATH
4156do
4157  IFS=$as_save_IFS
4158  case $as_dir in #(((
4159    '') as_dir=./ ;;
4160    */) ;;
4161    *) as_dir=$as_dir/ ;;
4162  esac
4163    for ac_exec_ext in '' $ac_executable_extensions; do
4164  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4165    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4166    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4167    break 2
4168  fi
4169done
4170  done
4171IFS=$as_save_IFS
4172
4173fi
4174fi
4175CC=$ac_cv_prog_CC
4176if test -n "$CC"; then
4177  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4178printf "%s\n" "$CC" >&6; }
4179else
4180  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4181printf "%s\n" "no" >&6; }
4182fi
4183
4184
4185    test -n "$CC" && break
4186  done
4187fi
4188if test -z "$CC"; then
4189  ac_ct_CC=$CC
4190  for ac_prog in $cclist
4191do
4192  # Extract the first word of "$ac_prog", so it can be a program name with args.
4193set dummy $ac_prog; ac_word=$2
4194{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4195printf %s "checking for $ac_word... " >&6; }
4196if test ${ac_cv_prog_ac_ct_CC+y}
4197then :
4198  printf %s "(cached) " >&6
4199else $as_nop
4200  if test -n "$ac_ct_CC"; then
4201  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4202else
4203as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4204for as_dir in $PATH
4205do
4206  IFS=$as_save_IFS
4207  case $as_dir in #(((
4208    '') as_dir=./ ;;
4209    */) ;;
4210    *) as_dir=$as_dir/ ;;
4211  esac
4212    for ac_exec_ext in '' $ac_executable_extensions; do
4213  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4214    ac_cv_prog_ac_ct_CC="$ac_prog"
4215    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4216    break 2
4217  fi
4218done
4219  done
4220IFS=$as_save_IFS
4221
4222fi
4223fi
4224ac_ct_CC=$ac_cv_prog_ac_ct_CC
4225if test -n "$ac_ct_CC"; then
4226  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4227printf "%s\n" "$ac_ct_CC" >&6; }
4228else
4229  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4230printf "%s\n" "no" >&6; }
4231fi
4232
4233
4234  test -n "$ac_ct_CC" && break
4235done
4236
4237  if test "x$ac_ct_CC" = x; then
4238    CC=""
4239  else
4240    case $cross_compiling:$ac_tool_warned in
4241yes:)
4242{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4243printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4244ac_tool_warned=yes ;;
4245esac
4246    CC=$ac_ct_CC
4247  fi
4248fi
4249
4250
4251test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4252printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4253as_fn_error $? "no acceptable C compiler found in \$PATH
4254See \`config.log' for more details" "$LINENO" 5; }
4255
4256# Provide some information about the compiler.
4257printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4258set X $ac_compile
4259ac_compiler=$2
4260for ac_option in --version -v -V -qversion -version; do
4261  { { ac_try="$ac_compiler $ac_option >&5"
4262case "(($ac_try" in
4263  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4264  *) ac_try_echo=$ac_try;;
4265esac
4266eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4267printf "%s\n" "$ac_try_echo"; } >&5
4268  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4269  ac_status=$?
4270  if test -s conftest.err; then
4271    sed '10a\
4272... rest of stderr output deleted ...
4273         10q' conftest.err >conftest.er1
4274    cat conftest.er1 >&5
4275  fi
4276  rm -f conftest.er1 conftest.err
4277  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4278  test $ac_status = 0; }
4279done
4280
4281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4282/* end confdefs.h.  */
4283
4284int
4285main (void)
4286{
4287
4288  ;
4289  return 0;
4290}
4291_ACEOF
4292ac_clean_files_save=$ac_clean_files
4293ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4294# Try to create an executable without -o first, disregard a.out.
4295# It will help us diagnose broken compilers, and finding out an intuition
4296# of exeext.
4297{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4298printf %s "checking whether the C compiler works... " >&6; }
4299ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4300
4301# The possible output files:
4302ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4303
4304ac_rmfiles=
4305for ac_file in $ac_files
4306do
4307  case $ac_file in
4308    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4309    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4310  esac
4311done
4312rm -f $ac_rmfiles
4313
4314if { { ac_try="$ac_link_default"
4315case "(($ac_try" in
4316  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4317  *) ac_try_echo=$ac_try;;
4318esac
4319eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4320printf "%s\n" "$ac_try_echo"; } >&5
4321  (eval "$ac_link_default") 2>&5
4322  ac_status=$?
4323  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4324  test $ac_status = 0; }
4325then :
4326  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4327# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4328# in a Makefile.  We should not override ac_cv_exeext if it was cached,
4329# so that the user can short-circuit this test for compilers unknown to
4330# Autoconf.
4331for ac_file in $ac_files ''
4332do
4333  test -f "$ac_file" || continue
4334  case $ac_file in
4335    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4336	;;
4337    [ab].out )
4338	# We found the default executable, but exeext='' is most
4339	# certainly right.
4340	break;;
4341    *.* )
4342	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
4343	then :; else
4344	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4345	fi
4346	# We set ac_cv_exeext here because the later test for it is not
4347	# safe: cross compilers may not add the suffix if given an `-o'
4348	# argument, so we may need to know it at that point already.
4349	# Even if this section looks crufty: it has the advantage of
4350	# actually working.
4351	break;;
4352    * )
4353	break;;
4354  esac
4355done
4356test "$ac_cv_exeext" = no && ac_cv_exeext=
4357
4358else $as_nop
4359  ac_file=''
4360fi
4361if test -z "$ac_file"
4362then :
4363  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4364printf "%s\n" "no" >&6; }
4365printf "%s\n" "$as_me: failed program was:" >&5
4366sed 's/^/| /' conftest.$ac_ext >&5
4367
4368{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4369printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4370as_fn_error 77 "C compiler cannot create executables
4371See \`config.log' for more details" "$LINENO" 5; }
4372else $as_nop
4373  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4374printf "%s\n" "yes" >&6; }
4375fi
4376{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4377printf %s "checking for C compiler default output file name... " >&6; }
4378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4379printf "%s\n" "$ac_file" >&6; }
4380ac_exeext=$ac_cv_exeext
4381
4382rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4383ac_clean_files=$ac_clean_files_save
4384{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4385printf %s "checking for suffix of executables... " >&6; }
4386if { { ac_try="$ac_link"
4387case "(($ac_try" in
4388  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4389  *) ac_try_echo=$ac_try;;
4390esac
4391eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4392printf "%s\n" "$ac_try_echo"; } >&5
4393  (eval "$ac_link") 2>&5
4394  ac_status=$?
4395  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4396  test $ac_status = 0; }
4397then :
4398  # If both `conftest.exe' and `conftest' are `present' (well, observable)
4399# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4400# work properly (i.e., refer to `conftest.exe'), while it won't with
4401# `rm'.
4402for ac_file in conftest.exe conftest conftest.*; do
4403  test -f "$ac_file" || continue
4404  case $ac_file in
4405    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4406    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4407	  break;;
4408    * ) break;;
4409  esac
4410done
4411else $as_nop
4412  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4413printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4414as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4415See \`config.log' for more details" "$LINENO" 5; }
4416fi
4417rm -f conftest conftest$ac_cv_exeext
4418{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4419printf "%s\n" "$ac_cv_exeext" >&6; }
4420
4421rm -f conftest.$ac_ext
4422EXEEXT=$ac_cv_exeext
4423ac_exeext=$EXEEXT
4424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4425/* end confdefs.h.  */
4426#include <stdio.h>
4427int
4428main (void)
4429{
4430FILE *f = fopen ("conftest.out", "w");
4431 return ferror (f) || fclose (f) != 0;
4432
4433  ;
4434  return 0;
4435}
4436_ACEOF
4437ac_clean_files="$ac_clean_files conftest.out"
4438# Check that the compiler produces executables we can run.  If not, either
4439# the compiler is broken, or we cross compile.
4440{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4441printf %s "checking whether we are cross compiling... " >&6; }
4442if test "$cross_compiling" != yes; then
4443  { { ac_try="$ac_link"
4444case "(($ac_try" in
4445  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4446  *) ac_try_echo=$ac_try;;
4447esac
4448eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4449printf "%s\n" "$ac_try_echo"; } >&5
4450  (eval "$ac_link") 2>&5
4451  ac_status=$?
4452  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4453  test $ac_status = 0; }
4454  if { ac_try='./conftest$ac_cv_exeext'
4455  { { case "(($ac_try" in
4456  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4457  *) ac_try_echo=$ac_try;;
4458esac
4459eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4460printf "%s\n" "$ac_try_echo"; } >&5
4461  (eval "$ac_try") 2>&5
4462  ac_status=$?
4463  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4464  test $ac_status = 0; }; }; then
4465    cross_compiling=no
4466  else
4467    if test "$cross_compiling" = maybe; then
4468	cross_compiling=yes
4469    else
4470	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4471printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4472as_fn_error 77 "cannot run C compiled programs.
4473If you meant to cross compile, use \`--host'.
4474See \`config.log' for more details" "$LINENO" 5; }
4475    fi
4476  fi
4477fi
4478{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4479printf "%s\n" "$cross_compiling" >&6; }
4480
4481rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4482ac_clean_files=$ac_clean_files_save
4483{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4484printf %s "checking for suffix of object files... " >&6; }
4485if test ${ac_cv_objext+y}
4486then :
4487  printf %s "(cached) " >&6
4488else $as_nop
4489  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4490/* end confdefs.h.  */
4491
4492int
4493main (void)
4494{
4495
4496  ;
4497  return 0;
4498}
4499_ACEOF
4500rm -f conftest.o conftest.obj
4501if { { ac_try="$ac_compile"
4502case "(($ac_try" in
4503  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4504  *) ac_try_echo=$ac_try;;
4505esac
4506eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4507printf "%s\n" "$ac_try_echo"; } >&5
4508  (eval "$ac_compile") 2>&5
4509  ac_status=$?
4510  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4511  test $ac_status = 0; }
4512then :
4513  for ac_file in conftest.o conftest.obj conftest.*; do
4514  test -f "$ac_file" || continue;
4515  case $ac_file in
4516    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4517    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4518       break;;
4519  esac
4520done
4521else $as_nop
4522  printf "%s\n" "$as_me: failed program was:" >&5
4523sed 's/^/| /' conftest.$ac_ext >&5
4524
4525{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4526printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4527as_fn_error $? "cannot compute suffix of object files: cannot compile
4528See \`config.log' for more details" "$LINENO" 5; }
4529fi
4530rm -f conftest.$ac_cv_objext conftest.$ac_ext
4531fi
4532{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4533printf "%s\n" "$ac_cv_objext" >&6; }
4534OBJEXT=$ac_cv_objext
4535ac_objext=$OBJEXT
4536{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4537printf %s "checking whether the compiler supports GNU C... " >&6; }
4538if test ${ac_cv_c_compiler_gnu+y}
4539then :
4540  printf %s "(cached) " >&6
4541else $as_nop
4542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4543/* end confdefs.h.  */
4544
4545int
4546main (void)
4547{
4548#ifndef __GNUC__
4549       choke me
4550#endif
4551
4552  ;
4553  return 0;
4554}
4555_ACEOF
4556if ac_fn_c_try_compile "$LINENO"
4557then :
4558  ac_compiler_gnu=yes
4559else $as_nop
4560  ac_compiler_gnu=no
4561fi
4562rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4563ac_cv_c_compiler_gnu=$ac_compiler_gnu
4564
4565fi
4566{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4567printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4568ac_compiler_gnu=$ac_cv_c_compiler_gnu
4569
4570if test $ac_compiler_gnu = yes; then
4571  GCC=yes
4572else
4573  GCC=
4574fi
4575ac_test_CFLAGS=${CFLAGS+y}
4576ac_save_CFLAGS=$CFLAGS
4577{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4578printf %s "checking whether $CC accepts -g... " >&6; }
4579if test ${ac_cv_prog_cc_g+y}
4580then :
4581  printf %s "(cached) " >&6
4582else $as_nop
4583  ac_save_c_werror_flag=$ac_c_werror_flag
4584   ac_c_werror_flag=yes
4585   ac_cv_prog_cc_g=no
4586   CFLAGS="-g"
4587   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4588/* end confdefs.h.  */
4589
4590int
4591main (void)
4592{
4593
4594  ;
4595  return 0;
4596}
4597_ACEOF
4598if ac_fn_c_try_compile "$LINENO"
4599then :
4600  ac_cv_prog_cc_g=yes
4601else $as_nop
4602  CFLAGS=""
4603      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4604/* end confdefs.h.  */
4605
4606int
4607main (void)
4608{
4609
4610  ;
4611  return 0;
4612}
4613_ACEOF
4614if ac_fn_c_try_compile "$LINENO"
4615then :
4616
4617else $as_nop
4618  ac_c_werror_flag=$ac_save_c_werror_flag
4619	 CFLAGS="-g"
4620	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4621/* end confdefs.h.  */
4622
4623int
4624main (void)
4625{
4626
4627  ;
4628  return 0;
4629}
4630_ACEOF
4631if ac_fn_c_try_compile "$LINENO"
4632then :
4633  ac_cv_prog_cc_g=yes
4634fi
4635rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4636fi
4637rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4638fi
4639rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4640   ac_c_werror_flag=$ac_save_c_werror_flag
4641fi
4642{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4643printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4644if test $ac_test_CFLAGS; then
4645  CFLAGS=$ac_save_CFLAGS
4646elif test $ac_cv_prog_cc_g = yes; then
4647  if test "$GCC" = yes; then
4648    CFLAGS="-g -O2"
4649  else
4650    CFLAGS="-g"
4651  fi
4652else
4653  if test "$GCC" = yes; then
4654    CFLAGS="-O2"
4655  else
4656    CFLAGS=
4657  fi
4658fi
4659ac_prog_cc_stdc=no
4660if test x$ac_prog_cc_stdc = xno
4661then :
4662  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4663printf %s "checking for $CC option to enable C11 features... " >&6; }
4664if test ${ac_cv_prog_cc_c11+y}
4665then :
4666  printf %s "(cached) " >&6
4667else $as_nop
4668  ac_cv_prog_cc_c11=no
4669ac_save_CC=$CC
4670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4671/* end confdefs.h.  */
4672$ac_c_conftest_c11_program
4673_ACEOF
4674for ac_arg in '' -std=gnu11
4675do
4676  CC="$ac_save_CC $ac_arg"
4677  if ac_fn_c_try_compile "$LINENO"
4678then :
4679  ac_cv_prog_cc_c11=$ac_arg
4680fi
4681rm -f core conftest.err conftest.$ac_objext conftest.beam
4682  test "x$ac_cv_prog_cc_c11" != "xno" && break
4683done
4684rm -f conftest.$ac_ext
4685CC=$ac_save_CC
4686fi
4687
4688if test "x$ac_cv_prog_cc_c11" = xno
4689then :
4690  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4691printf "%s\n" "unsupported" >&6; }
4692else $as_nop
4693  if test "x$ac_cv_prog_cc_c11" = x
4694then :
4695  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4696printf "%s\n" "none needed" >&6; }
4697else $as_nop
4698  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4699printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4700     CC="$CC $ac_cv_prog_cc_c11"
4701fi
4702  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4703  ac_prog_cc_stdc=c11
4704fi
4705fi
4706if test x$ac_prog_cc_stdc = xno
4707then :
4708  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4709printf %s "checking for $CC option to enable C99 features... " >&6; }
4710if test ${ac_cv_prog_cc_c99+y}
4711then :
4712  printf %s "(cached) " >&6
4713else $as_nop
4714  ac_cv_prog_cc_c99=no
4715ac_save_CC=$CC
4716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4717/* end confdefs.h.  */
4718$ac_c_conftest_c99_program
4719_ACEOF
4720for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4721do
4722  CC="$ac_save_CC $ac_arg"
4723  if ac_fn_c_try_compile "$LINENO"
4724then :
4725  ac_cv_prog_cc_c99=$ac_arg
4726fi
4727rm -f core conftest.err conftest.$ac_objext conftest.beam
4728  test "x$ac_cv_prog_cc_c99" != "xno" && break
4729done
4730rm -f conftest.$ac_ext
4731CC=$ac_save_CC
4732fi
4733
4734if test "x$ac_cv_prog_cc_c99" = xno
4735then :
4736  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4737printf "%s\n" "unsupported" >&6; }
4738else $as_nop
4739  if test "x$ac_cv_prog_cc_c99" = x
4740then :
4741  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4742printf "%s\n" "none needed" >&6; }
4743else $as_nop
4744  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4745printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4746     CC="$CC $ac_cv_prog_cc_c99"
4747fi
4748  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4749  ac_prog_cc_stdc=c99
4750fi
4751fi
4752if test x$ac_prog_cc_stdc = xno
4753then :
4754  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4755printf %s "checking for $CC option to enable C89 features... " >&6; }
4756if test ${ac_cv_prog_cc_c89+y}
4757then :
4758  printf %s "(cached) " >&6
4759else $as_nop
4760  ac_cv_prog_cc_c89=no
4761ac_save_CC=$CC
4762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4763/* end confdefs.h.  */
4764$ac_c_conftest_c89_program
4765_ACEOF
4766for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4767do
4768  CC="$ac_save_CC $ac_arg"
4769  if ac_fn_c_try_compile "$LINENO"
4770then :
4771  ac_cv_prog_cc_c89=$ac_arg
4772fi
4773rm -f core conftest.err conftest.$ac_objext conftest.beam
4774  test "x$ac_cv_prog_cc_c89" != "xno" && break
4775done
4776rm -f conftest.$ac_ext
4777CC=$ac_save_CC
4778fi
4779
4780if test "x$ac_cv_prog_cc_c89" = xno
4781then :
4782  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4783printf "%s\n" "unsupported" >&6; }
4784else $as_nop
4785  if test "x$ac_cv_prog_cc_c89" = x
4786then :
4787  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4788printf "%s\n" "none needed" >&6; }
4789else $as_nop
4790  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4791printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4792     CC="$CC $ac_cv_prog_cc_c89"
4793fi
4794  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4795  ac_prog_cc_stdc=c89
4796fi
4797fi
4798
4799ac_ext=c
4800ac_cpp='$CPP $CPPFLAGS'
4801ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4802ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4803ac_compiler_gnu=$ac_cv_c_compiler_gnu
4804
4805
4806  ac_ext=c
4807ac_cpp='$CPP $CPPFLAGS'
4808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4810ac_compiler_gnu=$ac_cv_c_compiler_gnu
4811{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4812printf %s "checking whether $CC understands -c and -o together... " >&6; }
4813if test ${am_cv_prog_cc_c_o+y}
4814then :
4815  printf %s "(cached) " >&6
4816else $as_nop
4817  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4818/* end confdefs.h.  */
4819
4820int
4821main (void)
4822{
4823
4824  ;
4825  return 0;
4826}
4827_ACEOF
4828  # Make sure it works both with $CC and with simple cc.
4829  # Following AC_PROG_CC_C_O, we do the test twice because some
4830  # compilers refuse to overwrite an existing .o file with -o,
4831  # though they will create one.
4832  am_cv_prog_cc_c_o=yes
4833  for am_i in 1 2; do
4834    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4835   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4836   ac_status=$?
4837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4838   (exit $ac_status); } \
4839         && test -f conftest2.$ac_objext; then
4840      : OK
4841    else
4842      am_cv_prog_cc_c_o=no
4843      break
4844    fi
4845  done
4846  rm -f core conftest*
4847  unset am_i
4848fi
4849{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4850printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
4851if test "$am_cv_prog_cc_c_o" != yes; then
4852   # Losing compiler, so override with the script.
4853   # FIXME: It is wrong to rewrite CC.
4854   # But if we don't then we get into trouble of one sort or another.
4855   # A longer-term fix would be to have automake use am__CC in this case,
4856   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4857   CC="$am_aux_dir/compile $CC"
4858fi
4859ac_ext=c
4860ac_cpp='$CPP $CPPFLAGS'
4861ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4862ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4863ac_compiler_gnu=$ac_cv_c_compiler_gnu
4864
4865
4866depcc="$CC"   am_compiler_list=
4867
4868{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4869printf %s "checking dependency style of $depcc... " >&6; }
4870if test ${am_cv_CC_dependencies_compiler_type+y}
4871then :
4872  printf %s "(cached) " >&6
4873else $as_nop
4874  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4875  # We make a subdir and do the tests there.  Otherwise we can end up
4876  # making bogus files that we don't know about and never remove.  For
4877  # instance it was reported that on HP-UX the gcc test will end up
4878  # making a dummy file named 'D' -- because '-MD' means "put the output
4879  # in D".
4880  rm -rf conftest.dir
4881  mkdir conftest.dir
4882  # Copy depcomp to subdir because otherwise we won't find it if we're
4883  # using a relative directory.
4884  cp "$am_depcomp" conftest.dir
4885  cd conftest.dir
4886  # We will build objects and dependencies in a subdirectory because
4887  # it helps to detect inapplicable dependency modes.  For instance
4888  # both Tru64's cc and ICC support -MD to output dependencies as a
4889  # side effect of compilation, but ICC will put the dependencies in
4890  # the current directory while Tru64 will put them in the object
4891  # directory.
4892  mkdir sub
4893
4894  am_cv_CC_dependencies_compiler_type=none
4895  if test "$am_compiler_list" = ""; then
4896     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4897  fi
4898  am__universal=false
4899  case " $depcc " in #(
4900     *\ -arch\ *\ -arch\ *) am__universal=true ;;
4901     esac
4902
4903  for depmode in $am_compiler_list; do
4904    # Setup a source with many dependencies, because some compilers
4905    # like to wrap large dependency lists on column 80 (with \), and
4906    # we should not choose a depcomp mode which is confused by this.
4907    #
4908    # We need to recreate these files for each test, as the compiler may
4909    # overwrite some of them when testing with obscure command lines.
4910    # This happens at least with the AIX C compiler.
4911    : > sub/conftest.c
4912    for i in 1 2 3 4 5 6; do
4913      echo '#include "conftst'$i'.h"' >> sub/conftest.c
4914      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4915      # Solaris 10 /bin/sh.
4916      echo '/* dummy */' > sub/conftst$i.h
4917    done
4918    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4919
4920    # We check with '-c' and '-o' for the sake of the "dashmstdout"
4921    # mode.  It turns out that the SunPro C++ compiler does not properly
4922    # handle '-M -o', and we need to detect this.  Also, some Intel
4923    # versions had trouble with output in subdirs.
4924    am__obj=sub/conftest.${OBJEXT-o}
4925    am__minus_obj="-o $am__obj"
4926    case $depmode in
4927    gcc)
4928      # This depmode causes a compiler race in universal mode.
4929      test "$am__universal" = false || continue
4930      ;;
4931    nosideeffect)
4932      # After this tag, mechanisms are not by side-effect, so they'll
4933      # only be used when explicitly requested.
4934      if test "x$enable_dependency_tracking" = xyes; then
4935	continue
4936      else
4937	break
4938      fi
4939      ;;
4940    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4941      # This compiler won't grok '-c -o', but also, the minuso test has
4942      # not run yet.  These depmodes are late enough in the game, and
4943      # so weak that their functioning should not be impacted.
4944      am__obj=conftest.${OBJEXT-o}
4945      am__minus_obj=
4946      ;;
4947    none) break ;;
4948    esac
4949    if depmode=$depmode \
4950       source=sub/conftest.c object=$am__obj \
4951       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4952       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4953         >/dev/null 2>conftest.err &&
4954       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4955       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4956       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4957       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4958      # icc doesn't choke on unknown options, it will just issue warnings
4959      # or remarks (even with -Werror).  So we grep stderr for any message
4960      # that says an option was ignored or not supported.
4961      # When given -MP, icc 7.0 and 7.1 complain thusly:
4962      #   icc: Command line warning: ignoring option '-M'; no argument required
4963      # The diagnosis changed in icc 8.0:
4964      #   icc: Command line remark: option '-MP' not supported
4965      if (grep 'ignoring option' conftest.err ||
4966          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4967        am_cv_CC_dependencies_compiler_type=$depmode
4968        break
4969      fi
4970    fi
4971  done
4972
4973  cd ..
4974  rm -rf conftest.dir
4975else
4976  am_cv_CC_dependencies_compiler_type=none
4977fi
4978
4979fi
4980{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4981printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
4982CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4983
4984 if
4985  test "x$enable_dependency_tracking" != xno \
4986  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4987  am__fastdepCC_TRUE=
4988  am__fastdepCC_FALSE='#'
4989else
4990  am__fastdepCC_TRUE='#'
4991  am__fastdepCC_FALSE=
4992fi
4993
4994
4995
4996
4997
4998
4999ac_header= ac_cache=
5000for ac_item in $ac_header_c_list
5001do
5002  if test $ac_cache; then
5003    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
5004    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
5005      printf "%s\n" "#define $ac_item 1" >> confdefs.h
5006    fi
5007    ac_header= ac_cache=
5008  elif test $ac_header; then
5009    ac_cache=$ac_item
5010  else
5011    ac_header=$ac_item
5012  fi
5013done
5014
5015
5016
5017
5018
5019
5020
5021
5022if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
5023then :
5024
5025printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
5026
5027fi
5028
5029
5030
5031
5032
5033
5034  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5035printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5036if test ${ac_cv_safe_to_define___extensions__+y}
5037then :
5038  printf %s "(cached) " >&6
5039else $as_nop
5040  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5041/* end confdefs.h.  */
5042
5043#         define __EXTENSIONS__ 1
5044          $ac_includes_default
5045int
5046main (void)
5047{
5048
5049  ;
5050  return 0;
5051}
5052_ACEOF
5053if ac_fn_c_try_compile "$LINENO"
5054then :
5055  ac_cv_safe_to_define___extensions__=yes
5056else $as_nop
5057  ac_cv_safe_to_define___extensions__=no
5058fi
5059rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5060fi
5061{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5062printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
5063
5064  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5065printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5066if test ${ac_cv_should_define__xopen_source+y}
5067then :
5068  printf %s "(cached) " >&6
5069else $as_nop
5070  ac_cv_should_define__xopen_source=no
5071    if test $ac_cv_header_wchar_h = yes
5072then :
5073  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5074/* end confdefs.h.  */
5075
5076          #include <wchar.h>
5077          mbstate_t x;
5078int
5079main (void)
5080{
5081
5082  ;
5083  return 0;
5084}
5085_ACEOF
5086if ac_fn_c_try_compile "$LINENO"
5087then :
5088
5089else $as_nop
5090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5091/* end confdefs.h.  */
5092
5093            #define _XOPEN_SOURCE 500
5094            #include <wchar.h>
5095            mbstate_t x;
5096int
5097main (void)
5098{
5099
5100  ;
5101  return 0;
5102}
5103_ACEOF
5104if ac_fn_c_try_compile "$LINENO"
5105then :
5106  ac_cv_should_define__xopen_source=yes
5107fi
5108rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5109fi
5110rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5111fi
5112fi
5113{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5114printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
5115
5116  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
5117
5118  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5119
5120  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
5121
5122  printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
5123
5124  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
5125
5126  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
5127
5128  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5129
5130  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5131
5132  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5133
5134  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5135
5136  printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5137
5138  printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5139
5140  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5141
5142  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5143
5144  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
5145
5146  if test $ac_cv_header_minix_config_h = yes
5147then :
5148  MINIX=yes
5149    printf "%s\n" "#define _MINIX 1" >>confdefs.h
5150
5151    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
5152
5153    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
5154
5155else $as_nop
5156  MINIX=
5157fi
5158  if test $ac_cv_safe_to_define___extensions__ = yes
5159then :
5160  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
5161
5162fi
5163  if test $ac_cv_should_define__xopen_source = yes
5164then :
5165  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
5166
5167fi
5168
5169
5170
5171
5172
5173
5174CC_NOFORMAT=
5175CFLAGS_NTP=
5176CPPFLAGS_NTP=
5177LDADD_NTP=
5178LDFLAGS_NTP=
5179
5180
5181
5182
5183
5184
5185case "$ac_cv_prog_cc_c89" in
5186 no)
5187    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
5188		 version 4.2.5 and higher." >&5
5189printf "%s\n" "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
5190		 version 4.2.5 and higher." >&2;}
5191    ;;
5192esac
5193
5194{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
5195printf %s "checking if $CC can handle #warning... " >&6; }
5196if test ${ntp_cv_cpp_warning+y}
5197then :
5198  printf %s "(cached) " >&6
5199else $as_nop
5200  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5201/* end confdefs.h.  */
5202
5203int
5204main (void)
5205{
5206#warning foo
5207  ;
5208  return 0;
5209}
5210_ACEOF
5211if ac_fn_c_try_compile "$LINENO"
5212then :
5213  ntp_cv_cpp_warning=yes
5214else $as_nop
5215  ntp_cv_cpp_warning=no
5216
5217fi
5218rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5219
5220fi
5221{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cpp_warning" >&5
5222printf "%s\n" "$ntp_cv_cpp_warning" >&6; }
5223case "$ntp_cv_cpp_warning" in
5224 no)
5225
5226printf "%s\n" "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
5227
5228esac
5229
5230{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__((...))" >&5
5231printf %s "checking if $CC supports __attribute__((...))... " >&6; }
5232if test ${ntp_cv_cc_attribute+y}
5233then :
5234  printf %s "(cached) " >&6
5235else $as_nop
5236  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5237/* end confdefs.h.  */
5238
5239int
5240main (void)
5241{
5242void foo(void) __attribute__((__noreturn__));
5243
5244  ;
5245  return 0;
5246}
5247_ACEOF
5248if ac_fn_c_try_compile "$LINENO"
5249then :
5250  ntp_cv_cc_attribute=yes
5251else $as_nop
5252  ntp_cv_cc_attribute=no
5253
5254fi
5255rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5256
5257fi
5258{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cc_attribute" >&5
5259printf "%s\n" "$ntp_cv_cc_attribute" >&6; }
5260case "$ntp_cv_cc_attribute" in
5261 yes)
5262
5263printf "%s\n" "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h
5264
5265esac
5266
5267
5268case "$GCC" in
5269 yes)
5270    SAVED_CFLAGS="$CFLAGS"
5271    CFLAGS="$SAVED_CFLAGS -Wstrict-overflow"
5272    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
5273printf %s "checking if $CC can handle -Wstrict-overflow... " >&6; }
5274if test ${ntp_cv_gcc_Wstrict_overflow+y}
5275then :
5276  printf %s "(cached) " >&6
5277else $as_nop
5278  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5279/* end confdefs.h.  */
5280
5281int
5282main (void)
5283{
5284
5285  ;
5286  return 0;
5287}
5288_ACEOF
5289if ac_fn_c_try_compile "$LINENO"
5290then :
5291  ntp_cv_gcc_Wstrict_overflow=yes
5292else $as_nop
5293  ntp_cv_gcc_Wstrict_overflow=no
5294
5295fi
5296rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5297
5298fi
5299{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wstrict_overflow" >&5
5300printf "%s\n" "$ntp_cv_gcc_Wstrict_overflow" >&6; }
5301    #
5302    # $ntp_cv_gcc_Wstrict_overflow is tested later to add the
5303    # flag to CFLAGS.
5304    #
5305    CFLAGS="$SAVED_CFLAGS -Winit-self"
5306    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
5307printf %s "checking if $CC can handle -Winit-self... " >&6; }
5308if test ${ntp_cv_gcc_Winit_self+y}
5309then :
5310  printf %s "(cached) " >&6
5311else $as_nop
5312
5313	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5314/* end confdefs.h.  */
5315
5316int
5317main (void)
5318{
5319
5320  ;
5321  return 0;
5322}
5323_ACEOF
5324if ac_fn_c_try_compile "$LINENO"
5325then :
5326  ntp_cv_gcc_Winit_self=yes
5327else $as_nop
5328  ntp_cv_gcc_Winit_self=no
5329
5330fi
5331rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5332
5333
5334fi
5335{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
5336printf "%s\n" "$ntp_cv_gcc_Winit_self" >&6; }
5337    #
5338    # $ntp_cv_gcc_Winit_self is tested later to add the
5339    # flag to CFLAGS_NTP.
5340    #
5341    # libopts specifically builds a string with embedded NULs.
5342    # This causes a bunch of distracting warnings due to -Wformat.
5343    #
5344    CFLAGS="$SAVED_CFLAGS -Wno-format -Wno-format-security"
5345    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wno-format -Wno-format-security" >&5
5346printf %s "checking if $CC can handle -Wno-format -Wno-format-security... " >&6; }
5347if test ${ntp_cv_gcc_Wno_format+y}
5348then :
5349  printf %s "(cached) " >&6
5350else $as_nop
5351
5352	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5353/* end confdefs.h.  */
5354
5355int
5356main (void)
5357{
5358
5359  ;
5360  return 0;
5361}
5362_ACEOF
5363if ac_fn_c_try_compile "$LINENO"
5364then :
5365  ntp_cv_gcc_Wno_format=yes
5366else $as_nop
5367  ntp_cv_gcc_Wno_format=no
5368
5369fi
5370rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5371
5372
5373fi
5374{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wno_format" >&5
5375printf "%s\n" "$ntp_cv_gcc_Wno_format" >&6; }
5376    case "$ntp_cv_gcc_Wno_format" in
5377      no) ntp_cv_gcc_Wno_format_truncation=no
5378	  ;;
5379     yes)
5380	CC_NOFORMAT="-Wno-format -Wno-format-security"
5381	CFLAGS="$SAVED_CFLAGS -Wformat -Wno-format-truncation -Werror"
5382	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wformat -Wno-format-truncation" >&5
5383printf %s "checking if $CC can handle -Wformat -Wno-format-truncation... " >&6; }
5384if test ${ntp_cv_gcc_Wno_format_truncation+y}
5385then :
5386  printf %s "(cached) " >&6
5387else $as_nop
5388  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5389/* end confdefs.h.  */
5390
5391int
5392main (void)
5393{
5394
5395  ;
5396  return 0;
5397}
5398_ACEOF
5399if ac_fn_c_try_compile "$LINENO"
5400then :
5401  ntp_cv_gcc_Wno_format_truncation=yes
5402else $as_nop
5403  ntp_cv_gcc_Wno_format_truncation=no
5404
5405fi
5406rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5407
5408fi
5409{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wno_format_truncation" >&5
5410printf "%s\n" "$ntp_cv_gcc_Wno_format_truncation" >&6; }
5411	#
5412	# $ntp_cv_gcc_Wno_format_truncation is tested later to add the
5413	# flag to CFLAGS.
5414	#
5415    esac
5416
5417    CFLAGS="$SAVED_CFLAGS"
5418    { SAVED_CFLAGS=; unset SAVED_CFLAGS;}
5419
5420    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
5421printf %s "checking if linker supports omitting unused code and data... " >&6; }
5422if test ${ntp_cv_gc_sections_runs+y}
5423then :
5424  printf %s "(cached) " >&6
5425else $as_nop
5426
5427	    #  NetBSD will link but likely not run with --gc-sections
5428	    #  http://bugs.ntp.org/1844
5429	    #  http://gnats.netbsd.org/40401
5430	    #  --gc-sections causes attempt to load as linux elf, with
5431	    #  wrong syscalls in place.  Test a little gauntlet of
5432	    #  simple stdio read code checking for errors, expecting
5433	    #  enough syscall differences that the NetBSD code will
5434	    #  fail even with Linux emulation working as designed.
5435	    #  A shorter test could be refined by someone with access
5436	    #  to a NetBSD host with Linux emulation working.
5437	    origCFLAGS="$CFLAGS"
5438	    CFLAGS="$CFLAGS -Wl,--gc-sections"
5439	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5440/* end confdefs.h.  */
5441
5442			#include <stdlib.h>
5443			#include <stdio.h>
5444
5445int
5446main (void)
5447{
5448
5449			FILE *	fpC;
5450			char	buf[32];
5451			size_t	cch;
5452			int	read_success_once;
5453
5454			fpC = fopen("conftest.c", "r");
5455			if (NULL == fpC)
5456				exit(1);
5457			do {
5458				cch = fread(buf, sizeof(buf), 1, fpC);
5459				read_success_once |= (0 != cch);
5460			} while (0 != cch);
5461			if (!read_success_once)
5462				exit(2);
5463			if (!feof(fpC))
5464				exit(3);
5465			if (0 != fclose(fpC))
5466				exit(4);
5467
5468			exit(EXIT_SUCCESS);
5469
5470
5471  ;
5472  return 0;
5473}
5474_ACEOF
5475if ac_fn_c_try_link "$LINENO"
5476then :
5477
5478		    if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
5479			ntp_cv_gc_sections_runs=no
5480		    else
5481			ntp_cv_gc_sections_runs=no
5482			./conftest >/dev/null 2>&1 && ntp_cv_gc_sections_runs=yes
5483		    fi
5484
5485else $as_nop
5486  ntp_cv_gc_sections_runs=no
5487
5488fi
5489rm -f core conftest.err conftest.$ac_objext conftest.beam \
5490    conftest$ac_exeext conftest.$ac_ext
5491	    CFLAGS="$origCFLAGS"
5492	    { origCFLAGS=; unset origCFLAGS;}
5493
5494
5495fi
5496{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gc_sections_runs" >&5
5497printf "%s\n" "$ntp_cv_gc_sections_runs" >&6; }
5498    case "$ntp_cv_gc_sections_runs" in
5499     yes)
5500	LDADD_LIBNTP="-Wl,--gc-sections"
5501	CFLAGS_NTP="$CFLAGS_NTP -ffunction-sections -fdata-sections"
5502	;;
5503     no)
5504	LDADD_LIBNTP=
5505	;;
5506    esac
5507    CFLAGS_NTP="$CFLAGS_NTP -Wall"
5508    CFLAGS_NTP="$CFLAGS_NTP -Wcast-align"
5509    CFLAGS_NTP="$CFLAGS_NTP -Wcast-qual"
5510    # CFLAGS_NTP="$CFLAGS_NTP -Wconversion"
5511    # CFLAGS_NTP="$CFLAGS_NTP -Werror"
5512    # CFLAGS_NTP="$CFLAGS_NTP -Wextra"
5513    # CFLAGS_NTP="$CFLAGS_NTP -Wfloat-equal"
5514    CFLAGS_NTP="$CFLAGS_NTP -Wmissing-prototypes"
5515    CFLAGS_NTP="$CFLAGS_NTP -Wpointer-arith"
5516    CFLAGS_NTP="$CFLAGS_NTP -Wshadow"
5517    # CFLAGS_NTP="$CFLAGS_NTP -Wtraditional"
5518    # CFLAGS_NTP="$CFLAGS_NTP -Wwrite-strings"
5519    case "$ntp_cv_gcc_Winit_self" in
5520     yes)
5521	CFLAGS_NTP="$CFLAGS_NTP -Winit-self"
5522    esac
5523    case "$ntp_cv_gcc_Wstrict_overflow" in
5524     yes)
5525	CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
5526    esac
5527    case "$ntp_cv_gcc_Wno_format_truncation" in
5528     yes)
5529	CFLAGS_NTP="$CFLAGS_NTP -Wno-format-truncation"
5530    esac
5531    # -W[no-]strict-prototypes might be added by NTP_OPENSSL
5532esac
5533
5534
5535    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
5536printf %s "checking additional compiler flags... " >&6; }
5537    # allow ntp_os_cflags to be preset to skip this stuff
5538    case "${ntp_os_cflags+set}" in
5539     set)
5540	;;
5541     *)
5542	ntp_os_cflags=
5543	case "$host_os" in
5544	 aix[1-3]*)
5545	    ;;
5546	 aix4.[0-2]*)
5547	    # turn on additional headers
5548	    ntp_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
5549	    ;;
5550	 aix5.3*)
5551	    # avoid circular dependencies in yp headers, and more
5552	    ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
5553	    ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS -D_MSGQSUPPORT"
5554	    ;;
5555	 aix*)
5556	    # XXX Only verified thru AIX6.
5557	    # aix7 seems to need a different XOPEN_SOURCE_EXTENDED thing.
5558	    # avoid circular dependencies in yp headers
5559	    # _XOPEN_SOURCE=500 = X/Open 5: POSIX 1995
5560	    # _XOPEN_SOURCE=600 = X/Open 6: POSIX 2004
5561	    # _XOPEN_SOURCE=700 = X/Open 7: POSIX 2008
5562	    ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_SOURCE=600"
5563	    ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS"
5564	    ;;
5565	 amigaos)
5566	    ntp_os_cflags="-DSYS_AMIGA"
5567	    ;;
5568	 darwin*|macosx*|rhapsody*)
5569	    ntp_os_cflags="-D_P1003_1B_VISIBLE"
5570	    ;;
5571	 hpux10.*)		# at least for hppa2.0-hp-hpux10.20
5572	    case "$GCC" in
5573	     yes)
5574		;;
5575	     *)
5576		# use Ansi compiler on HPUX, and some -Wp magic
5577		ntp_os_cflags="-Ae -Wp,-H18816"
5578		;;
5579	    esac
5580	    ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
5581	    ;;
5582	 hpux*)
5583	    case "$GCC" in
5584	     yes)
5585		;;
5586	     *)
5587		# use Ansi compiler on HPUX
5588		ntp_os_cflags="-Ae"
5589	    esac
5590	    ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
5591	    ;;
5592	 irix6*)
5593	    case "$CC" in
5594	     cc)
5595		# do not use 64-bit compiler
5596		ntp_os_cflags="-n32 -mips3 -Wl,-woff,84"
5597	    esac
5598	    ;;
5599	 nextstep3)
5600	    ntp_os_cflags="-posix"
5601	    ;;
5602	 solaris1*|solaris2.[0-5]|solaris2.5.*)
5603	    ;;
5604	 sunos[34]*|sunos5.[0-5]|sunos5.5.*)
5605	    ;;
5606	 solaris2*|sunos5*)
5607	    # turn on 64-bit file offset interface
5608	    ntp_os_cflags="-D_LARGEFILE64_SOURCE"
5609	    ;;
5610	 vxworks*)
5611	    case "$build" in
5612	     $host)
5613		;;
5614	     *)
5615		# Quick and dirty sanity check
5616		case "$VX_KERNEL" in
5617		 '')
5618		    as_fn_error $? "See html/build/hints/vxworks.html" "$LINENO" 5
5619		esac
5620		ntp_os_cflags="-DSYS_VXWORKS"
5621	    esac
5622	    ;;
5623	esac
5624    esac
5625    case "$ntp_os_cflags" in
5626     '')
5627	ntp_os_cflags_msg="none needed"
5628	;;
5629     *)
5630	ntp_os_cflags_msg="$ntp_os_cflags"
5631    esac
5632    CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
5633    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
5634printf "%s\n" "$ntp_os_cflags_msg" >&6; }
5635    { ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
5636    ###
5637    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5
5638printf %s "checking additional linker flags... " >&6; }
5639    # HMS: The following might still need tweaking
5640    # allow ntp_os_ldflags to be preset to skip this stuff
5641    case "${ntp_os_ldflags+set}" in
5642     set)
5643	;;
5644     *)
5645	ntp_os_ldflags=
5646	case "$host_os" in
5647	 hpux*)
5648	    case "$GCC" in
5649	     yes)
5650		ntp_os_ldflags="-Wl,+allowdups"
5651		;;
5652	    esac
5653	    ;;
5654	esac
5655	;;
5656    esac
5657    case "$ntp_os_ldflags" in
5658     '')
5659	ntp_os_ldflags_msg="none needed"
5660	;;
5661     *)
5662	ntp_os_ldflags_msg="$ntp_os_ldflags"
5663    esac
5664    LDFLAGS_NTP="$LDFLAGS_NTP $ntp_os_ldflags"
5665    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_os_ldflags_msg" >&5
5666printf "%s\n" "$ntp_os_ldflags_msg" >&6; }
5667    { ntp_os_ldflags_msg=; unset ntp_os_ldflags_msg;}
5668
5669
5670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
5671printf %s "checking whether byte ordering is bigendian... " >&6; }
5672if test ${ac_cv_c_bigendian+y}
5673then :
5674  printf %s "(cached) " >&6
5675else $as_nop
5676  ac_cv_c_bigendian=unknown
5677    # See if we're dealing with a universal compiler.
5678    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5679/* end confdefs.h.  */
5680#ifndef __APPLE_CC__
5681	       not a universal capable compiler
5682	     #endif
5683	     typedef int dummy;
5684
5685_ACEOF
5686if ac_fn_c_try_compile "$LINENO"
5687then :
5688
5689	# Check for potential -arch flags.  It is not universal unless
5690	# there are at least two -arch flags with different values.
5691	ac_arch=
5692	ac_prev=
5693	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
5694	 if test -n "$ac_prev"; then
5695	   case $ac_word in
5696	     i?86 | x86_64 | ppc | ppc64)
5697	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
5698		 ac_arch=$ac_word
5699	       else
5700		 ac_cv_c_bigendian=universal
5701		 break
5702	       fi
5703	       ;;
5704	   esac
5705	   ac_prev=
5706	 elif test "x$ac_word" = "x-arch"; then
5707	   ac_prev=arch
5708	 fi
5709       done
5710fi
5711rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5712    if test $ac_cv_c_bigendian = unknown; then
5713      # See if sys/param.h defines the BYTE_ORDER macro.
5714      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5715/* end confdefs.h.  */
5716#include <sys/types.h>
5717	     #include <sys/param.h>
5718
5719int
5720main (void)
5721{
5722#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
5723		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
5724		     && LITTLE_ENDIAN)
5725	      bogus endian macros
5726	     #endif
5727
5728  ;
5729  return 0;
5730}
5731_ACEOF
5732if ac_fn_c_try_compile "$LINENO"
5733then :
5734  # It does; now see whether it defined to BIG_ENDIAN or not.
5735	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5736/* end confdefs.h.  */
5737#include <sys/types.h>
5738		#include <sys/param.h>
5739
5740int
5741main (void)
5742{
5743#if BYTE_ORDER != BIG_ENDIAN
5744		 not big endian
5745		#endif
5746
5747  ;
5748  return 0;
5749}
5750_ACEOF
5751if ac_fn_c_try_compile "$LINENO"
5752then :
5753  ac_cv_c_bigendian=yes
5754else $as_nop
5755  ac_cv_c_bigendian=no
5756fi
5757rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5758fi
5759rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5760    fi
5761    if test $ac_cv_c_bigendian = unknown; then
5762      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
5763      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5764/* end confdefs.h.  */
5765#include <limits.h>
5766
5767int
5768main (void)
5769{
5770#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
5771	      bogus endian macros
5772	     #endif
5773
5774  ;
5775  return 0;
5776}
5777_ACEOF
5778if ac_fn_c_try_compile "$LINENO"
5779then :
5780  # It does; now see whether it defined to _BIG_ENDIAN or not.
5781	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5782/* end confdefs.h.  */
5783#include <limits.h>
5784
5785int
5786main (void)
5787{
5788#ifndef _BIG_ENDIAN
5789		 not big endian
5790		#endif
5791
5792  ;
5793  return 0;
5794}
5795_ACEOF
5796if ac_fn_c_try_compile "$LINENO"
5797then :
5798  ac_cv_c_bigendian=yes
5799else $as_nop
5800  ac_cv_c_bigendian=no
5801fi
5802rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5803fi
5804rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5805    fi
5806    if test $ac_cv_c_bigendian = unknown; then
5807      # Compile a test program.
5808      if test "$cross_compiling" = yes
5809then :
5810  # Try to guess by grepping values from an object file.
5811	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5812/* end confdefs.h.  */
5813unsigned short int ascii_mm[] =
5814		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
5815		unsigned short int ascii_ii[] =
5816		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
5817		int use_ascii (int i) {
5818		  return ascii_mm[i] + ascii_ii[i];
5819		}
5820		unsigned short int ebcdic_ii[] =
5821		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
5822		unsigned short int ebcdic_mm[] =
5823		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
5824		int use_ebcdic (int i) {
5825		  return ebcdic_mm[i] + ebcdic_ii[i];
5826		}
5827		extern int foo;
5828
5829int
5830main (void)
5831{
5832return use_ascii (foo) == use_ebcdic (foo);
5833  ;
5834  return 0;
5835}
5836_ACEOF
5837if ac_fn_c_try_compile "$LINENO"
5838then :
5839  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
5840	      ac_cv_c_bigendian=yes
5841	    fi
5842	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
5843	      if test "$ac_cv_c_bigendian" = unknown; then
5844		ac_cv_c_bigendian=no
5845	      else
5846		# finding both strings is unlikely to happen, but who knows?
5847		ac_cv_c_bigendian=unknown
5848	      fi
5849	    fi
5850fi
5851rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5852else $as_nop
5853  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5854/* end confdefs.h.  */
5855$ac_includes_default
5856int
5857main (void)
5858{
5859
5860	     /* Are we little or big endian?  From Harbison&Steele.  */
5861	     union
5862	     {
5863	       long int l;
5864	       char c[sizeof (long int)];
5865	     } u;
5866	     u.l = 1;
5867	     return u.c[sizeof (long int) - 1] == 1;
5868
5869  ;
5870  return 0;
5871}
5872_ACEOF
5873if ac_fn_c_try_run "$LINENO"
5874then :
5875  ac_cv_c_bigendian=no
5876else $as_nop
5877  ac_cv_c_bigendian=yes
5878fi
5879rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5880  conftest.$ac_objext conftest.beam conftest.$ac_ext
5881fi
5882
5883    fi
5884fi
5885{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
5886printf "%s\n" "$ac_cv_c_bigendian" >&6; }
5887 case $ac_cv_c_bigendian in #(
5888   yes)
5889     printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
5890;; #(
5891   no)
5892      ;; #(
5893   universal)
5894
5895printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5896
5897     ;; #(
5898   *)
5899     as_fn_error $? "unknown endianness
5900 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
5901 esac
5902
5903{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
5904printf %s "checking for working volatile... " >&6; }
5905if test ${ac_cv_c_volatile+y}
5906then :
5907  printf %s "(cached) " >&6
5908else $as_nop
5909  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5910/* end confdefs.h.  */
5911
5912int
5913main (void)
5914{
5915
5916volatile int x;
5917int * volatile y = (int *) 0;
5918return !x && !y;
5919  ;
5920  return 0;
5921}
5922_ACEOF
5923if ac_fn_c_try_compile "$LINENO"
5924then :
5925  ac_cv_c_volatile=yes
5926else $as_nop
5927  ac_cv_c_volatile=no
5928fi
5929rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5930fi
5931{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
5932printf "%s\n" "$ac_cv_c_volatile" >&6; }
5933if test $ac_cv_c_volatile = no; then
5934
5935printf "%s\n" "#define volatile /**/" >>confdefs.h
5936
5937fi
5938
5939ac_ext=c
5940ac_cpp='$CPP $CPPFLAGS'
5941ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5942ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5943ac_compiler_gnu=$ac_cv_c_compiler_gnu
5944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5945printf %s "checking how to run the C preprocessor... " >&6; }
5946# On Suns, sometimes $CPP names a directory.
5947if test -n "$CPP" && test -d "$CPP"; then
5948  CPP=
5949fi
5950if test -z "$CPP"; then
5951  if test ${ac_cv_prog_CPP+y}
5952then :
5953  printf %s "(cached) " >&6
5954else $as_nop
5955      # Double quotes because $CC needs to be expanded
5956    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
5957    do
5958      ac_preproc_ok=false
5959for ac_c_preproc_warn_flag in '' yes
5960do
5961  # Use a header file that comes with gcc, so configuring glibc
5962  # with a fresh cross-compiler works.
5963  # On the NeXT, cc -E runs the code through the compiler's parser,
5964  # not just through cpp. "Syntax error" is here to catch this case.
5965  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5966/* end confdefs.h.  */
5967#include <limits.h>
5968		     Syntax error
5969_ACEOF
5970if ac_fn_c_try_cpp "$LINENO"
5971then :
5972
5973else $as_nop
5974  # Broken: fails on valid input.
5975continue
5976fi
5977rm -f conftest.err conftest.i conftest.$ac_ext
5978
5979  # OK, works on sane cases.  Now check whether nonexistent headers
5980  # can be detected and how.
5981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5982/* end confdefs.h.  */
5983#include <ac_nonexistent.h>
5984_ACEOF
5985if ac_fn_c_try_cpp "$LINENO"
5986then :
5987  # Broken: success on invalid input.
5988continue
5989else $as_nop
5990  # Passes both tests.
5991ac_preproc_ok=:
5992break
5993fi
5994rm -f conftest.err conftest.i conftest.$ac_ext
5995
5996done
5997# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5998rm -f conftest.i conftest.err conftest.$ac_ext
5999if $ac_preproc_ok
6000then :
6001  break
6002fi
6003
6004    done
6005    ac_cv_prog_CPP=$CPP
6006
6007fi
6008  CPP=$ac_cv_prog_CPP
6009else
6010  ac_cv_prog_CPP=$CPP
6011fi
6012{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6013printf "%s\n" "$CPP" >&6; }
6014ac_preproc_ok=false
6015for ac_c_preproc_warn_flag in '' yes
6016do
6017  # Use a header file that comes with gcc, so configuring glibc
6018  # with a fresh cross-compiler works.
6019  # On the NeXT, cc -E runs the code through the compiler's parser,
6020  # not just through cpp. "Syntax error" is here to catch this case.
6021  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6022/* end confdefs.h.  */
6023#include <limits.h>
6024		     Syntax error
6025_ACEOF
6026if ac_fn_c_try_cpp "$LINENO"
6027then :
6028
6029else $as_nop
6030  # Broken: fails on valid input.
6031continue
6032fi
6033rm -f conftest.err conftest.i conftest.$ac_ext
6034
6035  # OK, works on sane cases.  Now check whether nonexistent headers
6036  # can be detected and how.
6037  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6038/* end confdefs.h.  */
6039#include <ac_nonexistent.h>
6040_ACEOF
6041if ac_fn_c_try_cpp "$LINENO"
6042then :
6043  # Broken: success on invalid input.
6044continue
6045else $as_nop
6046  # Passes both tests.
6047ac_preproc_ok=:
6048break
6049fi
6050rm -f conftest.err conftest.i conftest.$ac_ext
6051
6052done
6053# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6054rm -f conftest.i conftest.err conftest.$ac_ext
6055if $ac_preproc_ok
6056then :
6057
6058else $as_nop
6059  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6060printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
6061as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6062See \`config.log' for more details" "$LINENO" 5; }
6063fi
6064
6065ac_ext=c
6066ac_cpp='$CPP $CPPFLAGS'
6067ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6068ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6069ac_compiler_gnu=$ac_cv_c_compiler_gnu
6070
6071
6072
6073
6074
6075{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compile/link hardening flags" >&5
6076printf %s "checking for compile/link hardening flags... " >&6; }
6077
6078
6079# Check whether --with-hardenfile was given.
6080if test ${with_hardenfile+y}
6081then :
6082  withval=$with_hardenfile;
6083else $as_nop
6084  with_hardenfile=no
6085
6086fi
6087
6088
6089(									\
6090    SENTINEL_DIR="$PWD" &&						\
6091    cd $srcdir/ &&							\
6092    case "$with_hardenfile" in						\
6093     yes|no|'')								\
6094	scripts/genHardFlags -d "$SENTINEL_DIR"				\
6095	;;								\
6096     *)									\
6097	scripts/genHardFlags -d "$SENTINEL_DIR" -f "$with_hardenfile"	\
6098	;;								\
6099    esac								\
6100) > genHardFlags.i 2> genHardFlags.err
6101. ./genHardFlags.i
6102
6103case "$GENHARDFLAG" in
6104 OK)
6105    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in file $GENHARDFLAGFILE" >&5
6106printf "%s\n" "in file $GENHARDFLAGFILE" >&6; }
6107    rm genHardFlags.err genHardFlags.i
6108    ;;
6109 *)
6110    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed." >&5
6111printf "%s\n" "failed." >&6; }
6112    as_fn_error $? "Problem with genHardFlags!" "$LINENO" 5
6113    ;;
6114esac
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for install dir and man conventions" >&5
6125printf %s "checking for install dir and man conventions... " >&6; }
6126
6127
6128# Check whether --with-locfile was given.
6129if test ${with_locfile+y}
6130then :
6131  withval=$with_locfile;
6132else $as_nop
6133  with_locfile=no
6134
6135fi
6136
6137
6138(									\
6139    SENTINEL_DIR="$PWD" &&						\
6140    cd $srcdir/ &&							\
6141    case "$with_locfile" in						\
6142     yes|no|'')								\
6143	scripts/genLocInfo -d "$SENTINEL_DIR"				\
6144	;;								\
6145     *)									\
6146	scripts/genLocInfo -d "$SENTINEL_DIR" -f "$with_locfile"	\
6147	;;								\
6148    esac								\
6149) > genLocInfo.i 2> genLocInfo.err
6150. ./genLocInfo.i
6151
6152case "$GENLOCINFO" in
6153 OK)
6154    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in file $GENLOCINFOFILE" >&5
6155printf "%s\n" "in file $GENLOCINFOFILE" >&6; }
6156    rm genLocInfo.err genLocInfo.i
6157    ;;
6158 *)
6159    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed." >&5
6160printf "%s\n" "failed." >&6; }
6161    as_fn_error $? "Problem with genLocInfo!" "$LINENO" 5
6162    ;;
6163esac
6164
6165 if test "$CALC_TICKADJ_MS" ; then
6166  WANT_CALC_TICKADJ_MS_TRUE=
6167  WANT_CALC_TICKADJ_MS_FALSE='#'
6168else
6169  WANT_CALC_TICKADJ_MS_TRUE='#'
6170  WANT_CALC_TICKADJ_MS_FALSE=
6171fi
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215 if test -z "$NTPSWEEP_NI" ; then
6216  INSTALL_NTPSWEEP_TRUE=
6217  INSTALL_NTPSWEEP_FALSE='#'
6218else
6219  INSTALL_NTPSWEEP_TRUE='#'
6220  INSTALL_NTPSWEEP_FALSE=
6221fi
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263 if test -z "$UPDATE_LEAP_NI" ; then
6264  INSTALL_UPDATE_LEAP_TRUE=
6265  INSTALL_UPDATE_LEAP_FALSE='#'
6266else
6267  INSTALL_UPDATE_LEAP_TRUE='#'
6268  INSTALL_UPDATE_LEAP_FALSE=
6269fi
6270
6271
6272
6273
6274
6275  if test -n "$ac_tool_prefix"; then
6276  for ac_prog in ar lib "link -lib"
6277  do
6278    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6279set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6280{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6281printf %s "checking for $ac_word... " >&6; }
6282if test ${ac_cv_prog_AR+y}
6283then :
6284  printf %s "(cached) " >&6
6285else $as_nop
6286  if test -n "$AR"; then
6287  ac_cv_prog_AR="$AR" # Let the user override the test.
6288else
6289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6290for as_dir in $PATH
6291do
6292  IFS=$as_save_IFS
6293  case $as_dir in #(((
6294    '') as_dir=./ ;;
6295    */) ;;
6296    *) as_dir=$as_dir/ ;;
6297  esac
6298    for ac_exec_ext in '' $ac_executable_extensions; do
6299  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6300    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
6301    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6302    break 2
6303  fi
6304done
6305  done
6306IFS=$as_save_IFS
6307
6308fi
6309fi
6310AR=$ac_cv_prog_AR
6311if test -n "$AR"; then
6312  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6313printf "%s\n" "$AR" >&6; }
6314else
6315  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6316printf "%s\n" "no" >&6; }
6317fi
6318
6319
6320    test -n "$AR" && break
6321  done
6322fi
6323if test -z "$AR"; then
6324  ac_ct_AR=$AR
6325  for ac_prog in ar lib "link -lib"
6326do
6327  # Extract the first word of "$ac_prog", so it can be a program name with args.
6328set dummy $ac_prog; ac_word=$2
6329{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6330printf %s "checking for $ac_word... " >&6; }
6331if test ${ac_cv_prog_ac_ct_AR+y}
6332then :
6333  printf %s "(cached) " >&6
6334else $as_nop
6335  if test -n "$ac_ct_AR"; then
6336  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6337else
6338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6339for as_dir in $PATH
6340do
6341  IFS=$as_save_IFS
6342  case $as_dir in #(((
6343    '') as_dir=./ ;;
6344    */) ;;
6345    *) as_dir=$as_dir/ ;;
6346  esac
6347    for ac_exec_ext in '' $ac_executable_extensions; do
6348  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6349    ac_cv_prog_ac_ct_AR="$ac_prog"
6350    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6351    break 2
6352  fi
6353done
6354  done
6355IFS=$as_save_IFS
6356
6357fi
6358fi
6359ac_ct_AR=$ac_cv_prog_ac_ct_AR
6360if test -n "$ac_ct_AR"; then
6361  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6362printf "%s\n" "$ac_ct_AR" >&6; }
6363else
6364  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6365printf "%s\n" "no" >&6; }
6366fi
6367
6368
6369  test -n "$ac_ct_AR" && break
6370done
6371
6372  if test "x$ac_ct_AR" = x; then
6373    AR="false"
6374  else
6375    case $cross_compiling:$ac_tool_warned in
6376yes:)
6377{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6378printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6379ac_tool_warned=yes ;;
6380esac
6381    AR=$ac_ct_AR
6382  fi
6383fi
6384
6385: ${AR=ar}
6386
6387{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
6388printf %s "checking the archiver ($AR) interface... " >&6; }
6389if test ${am_cv_ar_interface+y}
6390then :
6391  printf %s "(cached) " >&6
6392else $as_nop
6393  ac_ext=c
6394ac_cpp='$CPP $CPPFLAGS'
6395ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6396ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6397ac_compiler_gnu=$ac_cv_c_compiler_gnu
6398
6399   am_cv_ar_interface=ar
6400   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6401/* end confdefs.h.  */
6402int some_variable = 0;
6403_ACEOF
6404if ac_fn_c_try_compile "$LINENO"
6405then :
6406  am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
6407      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6408  (eval $am_ar_try) 2>&5
6409  ac_status=$?
6410  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6411  test $ac_status = 0; }
6412      if test "$ac_status" -eq 0; then
6413        am_cv_ar_interface=ar
6414      else
6415        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
6416        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6417  (eval $am_ar_try) 2>&5
6418  ac_status=$?
6419  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6420  test $ac_status = 0; }
6421        if test "$ac_status" -eq 0; then
6422          am_cv_ar_interface=lib
6423        else
6424          am_cv_ar_interface=unknown
6425        fi
6426      fi
6427      rm -f conftest.lib libconftest.a
6428
6429fi
6430rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6431   ac_ext=c
6432ac_cpp='$CPP $CPPFLAGS'
6433ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6434ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6435ac_compiler_gnu=$ac_cv_c_compiler_gnu
6436
6437fi
6438{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
6439printf "%s\n" "$am_cv_ar_interface" >&6; }
6440
6441case $am_cv_ar_interface in
6442ar)
6443  ;;
6444lib)
6445  # Microsoft lib, so override with the ar-lib wrapper script.
6446  # FIXME: It is wrong to rewrite AR.
6447  # But if we don't then we get into trouble of one sort or another.
6448  # A longer-term fix would be to have automake use am__AR in this case,
6449  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
6450  # similar.
6451  AR="$am_aux_dir/ar-lib $AR"
6452  ;;
6453unknown)
6454  as_fn_error $? "could not determine $AR interface" "$LINENO" 5
6455  ;;
6456esac
6457
6458
6459{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6460printf %s "checking for a sed that does not truncate output... " >&6; }
6461if test ${ac_cv_path_SED+y}
6462then :
6463  printf %s "(cached) " >&6
6464else $as_nop
6465            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6466     for ac_i in 1 2 3 4 5 6 7; do
6467       ac_script="$ac_script$as_nl$ac_script"
6468     done
6469     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6470     { ac_script=; unset ac_script;}
6471     if test -z "$SED"; then
6472  ac_path_SED_found=false
6473  # Loop through the user's path and test for each of PROGNAME-LIST
6474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6475for as_dir in $PATH
6476do
6477  IFS=$as_save_IFS
6478  case $as_dir in #(((
6479    '') as_dir=./ ;;
6480    */) ;;
6481    *) as_dir=$as_dir/ ;;
6482  esac
6483    for ac_prog in sed gsed
6484   do
6485    for ac_exec_ext in '' $ac_executable_extensions; do
6486      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
6487      as_fn_executable_p "$ac_path_SED" || continue
6488# Check for GNU ac_path_SED and select it if it is found.
6489  # Check for GNU $ac_path_SED
6490case `"$ac_path_SED" --version 2>&1` in
6491*GNU*)
6492  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6493*)
6494  ac_count=0
6495  printf %s 0123456789 >"conftest.in"
6496  while :
6497  do
6498    cat "conftest.in" "conftest.in" >"conftest.tmp"
6499    mv "conftest.tmp" "conftest.in"
6500    cp "conftest.in" "conftest.nl"
6501    printf "%s\n" '' >> "conftest.nl"
6502    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6503    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6504    as_fn_arith $ac_count + 1 && ac_count=$as_val
6505    if test $ac_count -gt ${ac_path_SED_max-0}; then
6506      # Best one so far, save it but keep looking for a better one
6507      ac_cv_path_SED="$ac_path_SED"
6508      ac_path_SED_max=$ac_count
6509    fi
6510    # 10*(2^10) chars as input seems more than enough
6511    test $ac_count -gt 10 && break
6512  done
6513  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6514esac
6515
6516      $ac_path_SED_found && break 3
6517    done
6518  done
6519  done
6520IFS=$as_save_IFS
6521  if test -z "$ac_cv_path_SED"; then
6522    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6523  fi
6524else
6525  ac_cv_path_SED=$SED
6526fi
6527
6528fi
6529{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6530printf "%s\n" "$ac_cv_path_SED" >&6; }
6531 SED="$ac_cv_path_SED"
6532  rm -f conftest.sed
6533
6534
6535
6536# Expose a cross-compilation indicator to makefiles
6537 if test $build != $host; then
6538  NTP_CROSSCOMPILE_TRUE=
6539  NTP_CROSSCOMPILE_FALSE='#'
6540else
6541  NTP_CROSSCOMPILE_TRUE='#'
6542  NTP_CROSSCOMPILE_FALSE=
6543fi
6544
6545
6546
6547{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6548printf %s "checking for a sed that does not truncate output... " >&6; }
6549if test ${ac_cv_path_SED+y}
6550then :
6551  printf %s "(cached) " >&6
6552else $as_nop
6553            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6554     for ac_i in 1 2 3 4 5 6 7; do
6555       ac_script="$ac_script$as_nl$ac_script"
6556     done
6557     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6558     { ac_script=; unset ac_script;}
6559     if test -z "$SED"; then
6560  ac_path_SED_found=false
6561  # Loop through the user's path and test for each of PROGNAME-LIST
6562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6563for as_dir in $PATH
6564do
6565  IFS=$as_save_IFS
6566  case $as_dir in #(((
6567    '') as_dir=./ ;;
6568    */) ;;
6569    *) as_dir=$as_dir/ ;;
6570  esac
6571    for ac_prog in sed gsed
6572   do
6573    for ac_exec_ext in '' $ac_executable_extensions; do
6574      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
6575      as_fn_executable_p "$ac_path_SED" || continue
6576# Check for GNU ac_path_SED and select it if it is found.
6577  # Check for GNU $ac_path_SED
6578case `"$ac_path_SED" --version 2>&1` in
6579*GNU*)
6580  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6581*)
6582  ac_count=0
6583  printf %s 0123456789 >"conftest.in"
6584  while :
6585  do
6586    cat "conftest.in" "conftest.in" >"conftest.tmp"
6587    mv "conftest.tmp" "conftest.in"
6588    cp "conftest.in" "conftest.nl"
6589    printf "%s\n" '' >> "conftest.nl"
6590    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6591    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6592    as_fn_arith $ac_count + 1 && ac_count=$as_val
6593    if test $ac_count -gt ${ac_path_SED_max-0}; then
6594      # Best one so far, save it but keep looking for a better one
6595      ac_cv_path_SED="$ac_path_SED"
6596      ac_path_SED_max=$ac_count
6597    fi
6598    # 10*(2^10) chars as input seems more than enough
6599    test $ac_count -gt 10 && break
6600  done
6601  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6602esac
6603
6604      $ac_path_SED_found && break 3
6605    done
6606  done
6607  done
6608IFS=$as_save_IFS
6609  if test -z "$ac_cv_path_SED"; then
6610    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6611  fi
6612else
6613  ac_cv_path_SED=$SED
6614fi
6615
6616fi
6617{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6618printf "%s\n" "$ac_cv_path_SED" >&6; }
6619 SED="$ac_cv_path_SED"
6620  rm -f conftest.sed
6621
6622test -z "$SED" && SED=sed
6623Xsed="$SED -e 1s/^X//"
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6636printf %s "checking for grep that handles long lines and -e... " >&6; }
6637if test ${ac_cv_path_GREP+y}
6638then :
6639  printf %s "(cached) " >&6
6640else $as_nop
6641  if test -z "$GREP"; then
6642  ac_path_GREP_found=false
6643  # Loop through the user's path and test for each of PROGNAME-LIST
6644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6645for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6646do
6647  IFS=$as_save_IFS
6648  case $as_dir in #(((
6649    '') as_dir=./ ;;
6650    */) ;;
6651    *) as_dir=$as_dir/ ;;
6652  esac
6653    for ac_prog in grep ggrep
6654   do
6655    for ac_exec_ext in '' $ac_executable_extensions; do
6656      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
6657      as_fn_executable_p "$ac_path_GREP" || continue
6658# Check for GNU ac_path_GREP and select it if it is found.
6659  # Check for GNU $ac_path_GREP
6660case `"$ac_path_GREP" --version 2>&1` in
6661*GNU*)
6662  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6663*)
6664  ac_count=0
6665  printf %s 0123456789 >"conftest.in"
6666  while :
6667  do
6668    cat "conftest.in" "conftest.in" >"conftest.tmp"
6669    mv "conftest.tmp" "conftest.in"
6670    cp "conftest.in" "conftest.nl"
6671    printf "%s\n" 'GREP' >> "conftest.nl"
6672    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6673    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6674    as_fn_arith $ac_count + 1 && ac_count=$as_val
6675    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6676      # Best one so far, save it but keep looking for a better one
6677      ac_cv_path_GREP="$ac_path_GREP"
6678      ac_path_GREP_max=$ac_count
6679    fi
6680    # 10*(2^10) chars as input seems more than enough
6681    test $ac_count -gt 10 && break
6682  done
6683  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6684esac
6685
6686      $ac_path_GREP_found && break 3
6687    done
6688  done
6689  done
6690IFS=$as_save_IFS
6691  if test -z "$ac_cv_path_GREP"; then
6692    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6693  fi
6694else
6695  ac_cv_path_GREP=$GREP
6696fi
6697
6698fi
6699{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6700printf "%s\n" "$ac_cv_path_GREP" >&6; }
6701 GREP="$ac_cv_path_GREP"
6702
6703
6704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6705printf %s "checking for egrep... " >&6; }
6706if test ${ac_cv_path_EGREP+y}
6707then :
6708  printf %s "(cached) " >&6
6709else $as_nop
6710  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6711   then ac_cv_path_EGREP="$GREP -E"
6712   else
6713     if test -z "$EGREP"; then
6714  ac_path_EGREP_found=false
6715  # Loop through the user's path and test for each of PROGNAME-LIST
6716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6717for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6718do
6719  IFS=$as_save_IFS
6720  case $as_dir in #(((
6721    '') as_dir=./ ;;
6722    */) ;;
6723    *) as_dir=$as_dir/ ;;
6724  esac
6725    for ac_prog in egrep
6726   do
6727    for ac_exec_ext in '' $ac_executable_extensions; do
6728      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
6729      as_fn_executable_p "$ac_path_EGREP" || continue
6730# Check for GNU ac_path_EGREP and select it if it is found.
6731  # Check for GNU $ac_path_EGREP
6732case `"$ac_path_EGREP" --version 2>&1` in
6733*GNU*)
6734  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6735*)
6736  ac_count=0
6737  printf %s 0123456789 >"conftest.in"
6738  while :
6739  do
6740    cat "conftest.in" "conftest.in" >"conftest.tmp"
6741    mv "conftest.tmp" "conftest.in"
6742    cp "conftest.in" "conftest.nl"
6743    printf "%s\n" 'EGREP' >> "conftest.nl"
6744    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6745    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6746    as_fn_arith $ac_count + 1 && ac_count=$as_val
6747    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6748      # Best one so far, save it but keep looking for a better one
6749      ac_cv_path_EGREP="$ac_path_EGREP"
6750      ac_path_EGREP_max=$ac_count
6751    fi
6752    # 10*(2^10) chars as input seems more than enough
6753    test $ac_count -gt 10 && break
6754  done
6755  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6756esac
6757
6758      $ac_path_EGREP_found && break 3
6759    done
6760  done
6761  done
6762IFS=$as_save_IFS
6763  if test -z "$ac_cv_path_EGREP"; then
6764    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6765  fi
6766else
6767  ac_cv_path_EGREP=$EGREP
6768fi
6769
6770   fi
6771fi
6772{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6773printf "%s\n" "$ac_cv_path_EGREP" >&6; }
6774 EGREP="$ac_cv_path_EGREP"
6775
6776
6777{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6778printf %s "checking for fgrep... " >&6; }
6779if test ${ac_cv_path_FGREP+y}
6780then :
6781  printf %s "(cached) " >&6
6782else $as_nop
6783  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6784   then ac_cv_path_FGREP="$GREP -F"
6785   else
6786     if test -z "$FGREP"; then
6787  ac_path_FGREP_found=false
6788  # Loop through the user's path and test for each of PROGNAME-LIST
6789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6790for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6791do
6792  IFS=$as_save_IFS
6793  case $as_dir in #(((
6794    '') as_dir=./ ;;
6795    */) ;;
6796    *) as_dir=$as_dir/ ;;
6797  esac
6798    for ac_prog in fgrep
6799   do
6800    for ac_exec_ext in '' $ac_executable_extensions; do
6801      ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
6802      as_fn_executable_p "$ac_path_FGREP" || continue
6803# Check for GNU ac_path_FGREP and select it if it is found.
6804  # Check for GNU $ac_path_FGREP
6805case `"$ac_path_FGREP" --version 2>&1` in
6806*GNU*)
6807  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6808*)
6809  ac_count=0
6810  printf %s 0123456789 >"conftest.in"
6811  while :
6812  do
6813    cat "conftest.in" "conftest.in" >"conftest.tmp"
6814    mv "conftest.tmp" "conftest.in"
6815    cp "conftest.in" "conftest.nl"
6816    printf "%s\n" 'FGREP' >> "conftest.nl"
6817    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6818    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6819    as_fn_arith $ac_count + 1 && ac_count=$as_val
6820    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6821      # Best one so far, save it but keep looking for a better one
6822      ac_cv_path_FGREP="$ac_path_FGREP"
6823      ac_path_FGREP_max=$ac_count
6824    fi
6825    # 10*(2^10) chars as input seems more than enough
6826    test $ac_count -gt 10 && break
6827  done
6828  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6829esac
6830
6831      $ac_path_FGREP_found && break 3
6832    done
6833  done
6834  done
6835IFS=$as_save_IFS
6836  if test -z "$ac_cv_path_FGREP"; then
6837    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6838  fi
6839else
6840  ac_cv_path_FGREP=$FGREP
6841fi
6842
6843   fi
6844fi
6845{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6846printf "%s\n" "$ac_cv_path_FGREP" >&6; }
6847 FGREP="$ac_cv_path_FGREP"
6848
6849
6850test -z "$GREP" && GREP=grep
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6869ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6870ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6871
6872{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6873printf %s "checking how to print strings... " >&6; }
6874# Test print first, because it will be a builtin if present.
6875if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6876   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6877  ECHO='print -r --'
6878elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6879  ECHO='printf %s\n'
6880else
6881  # Use this function as a fallback that always works.
6882  func_fallback_echo ()
6883  {
6884    eval 'cat <<_LTECHO_EOF
6885$1
6886_LTECHO_EOF'
6887  }
6888  ECHO='func_fallback_echo'
6889fi
6890
6891# func_echo_all arg...
6892# Invoke $ECHO with all args, space-separated.
6893func_echo_all ()
6894{
6895    $ECHO ""
6896}
6897
6898case $ECHO in
6899  printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6900printf "%s\n" "printf" >&6; } ;;
6901  print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6902printf "%s\n" "print -r" >&6; } ;;
6903  *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6904printf "%s\n" "cat" >&6; } ;;
6905esac
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
6922"
6923if test "x$ac_cv_type_pid_t" = xyes
6924then :
6925
6926else $as_nop
6927                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6928/* end confdefs.h.  */
6929
6930          #if defined _WIN64 && !defined __CYGWIN__
6931          LLP64
6932          #endif
6933
6934int
6935main (void)
6936{
6937
6938  ;
6939  return 0;
6940}
6941
6942_ACEOF
6943if ac_fn_c_try_compile "$LINENO"
6944then :
6945  ac_pid_type='int'
6946else $as_nop
6947  ac_pid_type='__int64'
6948fi
6949rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6950
6951printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
6952
6953
6954fi
6955
6956
6957
6958ac_func=
6959for ac_item in $ac_func_c_list
6960do
6961  if test $ac_func; then
6962    ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
6963    if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
6964      echo "#define $ac_item 1" >> confdefs.h
6965    fi
6966    ac_func=
6967  else
6968    ac_func=$ac_item
6969  fi
6970done
6971
6972ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6973if test "x$ac_cv_type_size_t" = xyes
6974then :
6975
6976else $as_nop
6977
6978printf "%s\n" "#define size_t unsigned int" >>confdefs.h
6979
6980fi
6981
6982{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
6983printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
6984if test ${ac_cv_c_undeclared_builtin_options+y}
6985then :
6986  printf %s "(cached) " >&6
6987else $as_nop
6988  ac_save_CFLAGS=$CFLAGS
6989   ac_cv_c_undeclared_builtin_options='cannot detect'
6990   for ac_arg in '' -fno-builtin; do
6991     CFLAGS="$ac_save_CFLAGS $ac_arg"
6992     # This test program should *not* compile successfully.
6993     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6994/* end confdefs.h.  */
6995
6996int
6997main (void)
6998{
6999(void) strchr;
7000  ;
7001  return 0;
7002}
7003_ACEOF
7004if ac_fn_c_try_compile "$LINENO"
7005then :
7006
7007else $as_nop
7008  # This test program should compile successfully.
7009        # No library function is consistently available on
7010        # freestanding implementations, so test against a dummy
7011        # declaration.  Include always-available headers on the
7012        # off chance that they somehow elicit warnings.
7013        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7014/* end confdefs.h.  */
7015#include <float.h>
7016#include <limits.h>
7017#include <stdarg.h>
7018#include <stddef.h>
7019extern void ac_decl (int, char *);
7020
7021int
7022main (void)
7023{
7024(void) ac_decl (0, (char *) 0);
7025  (void) ac_decl;
7026
7027  ;
7028  return 0;
7029}
7030_ACEOF
7031if ac_fn_c_try_compile "$LINENO"
7032then :
7033  if test x"$ac_arg" = x
7034then :
7035  ac_cv_c_undeclared_builtin_options='none needed'
7036else $as_nop
7037  ac_cv_c_undeclared_builtin_options=$ac_arg
7038fi
7039          break
7040fi
7041rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7042fi
7043rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7044    done
7045    CFLAGS=$ac_save_CFLAGS
7046
7047fi
7048{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
7049printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
7050  case $ac_cv_c_undeclared_builtin_options in #(
7051  'cannot detect') :
7052    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7053printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
7054as_fn_error $? "cannot make $CC report undeclared builtins
7055See \`config.log' for more details" "$LINENO" 5; } ;; #(
7056  'none needed') :
7057    ac_c_undeclared_builtin_options='' ;; #(
7058  *) :
7059    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
7060esac
7061
7062ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
7063if test "x$ac_cv_have_decl_strerror_r" = xyes
7064then :
7065  ac_have_decl=1
7066else $as_nop
7067  ac_have_decl=0
7068fi
7069printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
7070
7071
7072
7073            # Check whether --enable-c99-snprintf was given.
7074if test ${enable_c99_snprintf+y}
7075then :
7076  enableval=$enable_c99_snprintf; force_c99_snprintf=$enableval
7077else $as_nop
7078  force_c99_snprintf=no
7079
7080fi
7081
7082    case "$force_c99_snprintf" in
7083     yes)
7084	hw_force_rpl_snprintf=yes
7085	hw_force_rpl_vsnprintf=yes
7086    esac
7087
7088
7089
7090
7091
7092
7093
7094
7095  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7096printf %s "checking for unsigned long long int... " >&6; }
7097if test ${ac_cv_type_unsigned_long_long_int+y}
7098then :
7099  printf %s "(cached) " >&6
7100else $as_nop
7101  ac_cv_type_unsigned_long_long_int=yes
7102     case $ac_prog_cc_stdc in
7103       no | c89) ;;
7104       *)
7105	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7106/* end confdefs.h.  */
7107
7108  /* For now, do not test the preprocessor; as of 2007 there are too many
7109	 implementations with broken preprocessors.  Perhaps this can
7110	 be revisited in 2012.  In the meantime, code should not expect
7111	 #if to work with literals wider than 32 bits.  */
7112      /* Test literals.  */
7113      long long int ll = 9223372036854775807ll;
7114      long long int nll = -9223372036854775807LL;
7115      unsigned long long int ull = 18446744073709551615ULL;
7116      /* Test constant expressions.   */
7117      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
7118		     ? 1 : -1)];
7119      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
7120		     ? 1 : -1)];
7121      int i = 63;
7122int
7123main (void)
7124{
7125/* Test availability of runtime routines for shift and division.  */
7126      long long int llmax = 9223372036854775807ll;
7127      unsigned long long int ullmax = 18446744073709551615ull;
7128      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
7129	      | (llmax / ll) | (llmax % ll)
7130	      | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
7131	      | (ullmax / ull) | (ullmax % ull));
7132  ;
7133  return 0;
7134}
7135
7136_ACEOF
7137if ac_fn_c_try_link "$LINENO"
7138then :
7139
7140else $as_nop
7141  ac_cv_type_unsigned_long_long_int=no
7142fi
7143rm -f core conftest.err conftest.$ac_objext conftest.beam \
7144    conftest$ac_exeext conftest.$ac_ext;;
7145     esac
7146fi
7147{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
7148printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
7149  if test $ac_cv_type_unsigned_long_long_int = yes; then
7150
7151printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
7152
7153  fi
7154
7155
7156      ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
7157if test "x$ac_cv_func_vsnprintf" = xyes
7158then :
7159  hw_cv_func_vsnprintf=yes
7160else $as_nop
7161  hw_cv_func_vsnprintf=no
7162fi
7163
7164  if test "$hw_cv_func_vsnprintf" = yes
7165then :
7166  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
7167printf %s "checking whether vsnprintf is C99 compliant... " >&6; }
7168if test ${hw_cv_func_vsnprintf_c99+y}
7169then :
7170  printf %s "(cached) " >&6
7171else $as_nop
7172  if test "$cross_compiling" = yes
7173then :
7174  hw_cv_func_vsnprintf_c99=no
7175else $as_nop
7176  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7177/* end confdefs.h.  */
7178#if HAVE_STDARG_H
7179          #include <stdarg.h>
7180          #endif
7181          #include <stdio.h>
7182          static int testprintf(char *buf, size_t size, const char *format, ...)
7183          {
7184            int result;
7185            va_list ap;
7186            va_start(ap, format);
7187            result = vsnprintf(buf, size, format, ap);
7188            va_end(ap);
7189            return result;
7190          }
7191int
7192main (void)
7193{
7194char buf[43];
7195          if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
7196              testprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
7197              buf[0] != 'T' || buf[3] != '\0')
7198            return 1;
7199  ;
7200  return 0;
7201}
7202_ACEOF
7203if ac_fn_c_try_run "$LINENO"
7204then :
7205  hw_cv_func_vsnprintf_c99=yes
7206else $as_nop
7207  hw_cv_func_vsnprintf_c99=no
7208fi
7209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7210  conftest.$ac_objext conftest.beam conftest.$ac_ext
7211fi
7212
7213fi
7214{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
7215printf "%s\n" "$hw_cv_func_vsnprintf_c99" >&6; }
7216else $as_nop
7217  hw_cv_func_vsnprintf_c99=no
7218fi
7219
7220printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h
7221
7222  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement vsnprintf will be used" >&5
7223printf %s "checking if C99-snprintf replacement vsnprintf will be used... " >&6; }
7224  if test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no
7225then :
7226  hw_use_rpl_vsnprintf=yes
7227else $as_nop
7228  hw_use_rpl_vsnprintf=no
7229fi
7230  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_vsnprintf" >&5
7231printf "%s\n" "$hw_use_rpl_vsnprintf" >&6; }
7232  if test "$hw_use_rpl_vsnprintf" = yes
7233then :
7234
7235printf "%s\n" "#define HW_WANT_RPL_VSNPRINTF 1" >>confdefs.h
7236
7237    if test ${hw_nodef_vsnprintf=no} = no
7238then :
7239
7240printf "%s\n" "#define vsnprintf rpl_vsnprintf" >>confdefs.h
7241
7242fi
7243    ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
7244if test "x$ac_cv_header_inttypes_h" = xyes
7245then :
7246  printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
7247
7248fi
7249ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
7250if test "x$ac_cv_header_locale_h" = xyes
7251then :
7252  printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
7253
7254fi
7255ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default"
7256if test "x$ac_cv_header_stddef_h" = xyes
7257then :
7258  printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h
7259
7260fi
7261ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
7262if test "x$ac_cv_header_stdint_h" = xyes
7263then :
7264  printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
7265
7266fi
7267
7268    ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
7269"
7270if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
7271then :
7272
7273printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
7274
7275
7276fi
7277ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include <locale.h>
7278"
7279if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes
7280then :
7281
7282printf "%s\n" "#define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1" >>confdefs.h
7283
7284
7285fi
7286
7287
7288  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
7289printf %s "checking for long double... " >&6; }
7290if test ${ac_cv_type_long_double+y}
7291then :
7292  printf %s "(cached) " >&6
7293else $as_nop
7294  if test "$GCC" = yes; then
7295       ac_cv_type_long_double=yes
7296     else
7297       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7298/* end confdefs.h.  */
7299/* The Stardent Vistra knows sizeof (long double), but does
7300		 not support it.  */
7301	      long double foo = 0.0L;
7302int
7303main (void)
7304{
7305static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
7306	      sizeof (double) <= sizeof (long double))];
7307test_array [0] = 0;
7308return test_array [0];
7309
7310  ;
7311  return 0;
7312}
7313_ACEOF
7314if ac_fn_c_try_compile "$LINENO"
7315then :
7316  ac_cv_type_long_double=yes
7317else $as_nop
7318  ac_cv_type_long_double=no
7319fi
7320rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7321     fi
7322fi
7323{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
7324printf "%s\n" "$ac_cv_type_long_double" >&6; }
7325  if test $ac_cv_type_long_double = yes; then
7326
7327printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
7328
7329  fi
7330
7331
7332
7333  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
7334printf %s "checking for long long int... " >&6; }
7335if test ${ac_cv_type_long_long_int+y}
7336then :
7337  printf %s "(cached) " >&6
7338else $as_nop
7339  ac_cv_type_long_long_int=yes
7340      case $ac_prog_cc_stdc in
7341	no | c89) ;;
7342	*)
7343	  ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
7344	  if test $ac_cv_type_long_long_int = yes; then
7345	    	    	    	    if test "$cross_compiling" = yes
7346then :
7347  :
7348else $as_nop
7349  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7350/* end confdefs.h.  */
7351#include <limits.h>
7352		   #ifndef LLONG_MAX
7353		   # define HALF \
7354			    (1LL << (sizeof (long long int) * CHAR_BIT - 2))
7355		   # define LLONG_MAX (HALF - 1 + HALF)
7356		   #endif
7357int
7358main (void)
7359{
7360long long int n = 1;
7361		   int i;
7362		   for (i = 0; ; i++)
7363		     {
7364		       long long int m = n << i;
7365		       if (m >> i != n)
7366			 return 1;
7367		       if (LLONG_MAX / 2 < m)
7368			 break;
7369		     }
7370		   return 0;
7371  ;
7372  return 0;
7373}
7374_ACEOF
7375if ac_fn_c_try_run "$LINENO"
7376then :
7377
7378else $as_nop
7379  ac_cv_type_long_long_int=no
7380fi
7381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7382  conftest.$ac_objext conftest.beam conftest.$ac_ext
7383fi
7384
7385	  fi;;
7386      esac
7387fi
7388{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
7389printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
7390  if test $ac_cv_type_long_long_int = yes; then
7391
7392printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
7393
7394  fi
7395
7396
7397  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7398printf %s "checking for unsigned long long int... " >&6; }
7399if test ${ac_cv_type_unsigned_long_long_int+y}
7400then :
7401  printf %s "(cached) " >&6
7402else $as_nop
7403  ac_cv_type_unsigned_long_long_int=yes
7404     case $ac_prog_cc_stdc in
7405       no | c89) ;;
7406       *)
7407	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7408/* end confdefs.h.  */
7409
7410  /* For now, do not test the preprocessor; as of 2007 there are too many
7411	 implementations with broken preprocessors.  Perhaps this can
7412	 be revisited in 2012.  In the meantime, code should not expect
7413	 #if to work with literals wider than 32 bits.  */
7414      /* Test literals.  */
7415      long long int ll = 9223372036854775807ll;
7416      long long int nll = -9223372036854775807LL;
7417      unsigned long long int ull = 18446744073709551615ULL;
7418      /* Test constant expressions.   */
7419      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
7420		     ? 1 : -1)];
7421      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
7422		     ? 1 : -1)];
7423      int i = 63;
7424int
7425main (void)
7426{
7427/* Test availability of runtime routines for shift and division.  */
7428      long long int llmax = 9223372036854775807ll;
7429      unsigned long long int ullmax = 18446744073709551615ull;
7430      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
7431	      | (llmax / ll) | (llmax % ll)
7432	      | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
7433	      | (ullmax / ull) | (ullmax % ull));
7434  ;
7435  return 0;
7436}
7437
7438_ACEOF
7439if ac_fn_c_try_link "$LINENO"
7440then :
7441
7442else $as_nop
7443  ac_cv_type_unsigned_long_long_int=no
7444fi
7445rm -f core conftest.err conftest.$ac_objext conftest.beam \
7446    conftest$ac_exeext conftest.$ac_ext;;
7447     esac
7448fi
7449{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
7450printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
7451  if test $ac_cv_type_unsigned_long_long_int = yes; then
7452
7453printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
7454
7455  fi
7456
7457    ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7458if test "x$ac_cv_type_size_t" = xyes
7459then :
7460
7461else $as_nop
7462
7463printf "%s\n" "#define size_t unsigned int" >>confdefs.h
7464
7465fi
7466
7467
7468
7469  ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
7470if test "x$ac_cv_type_intmax_t" = xyes
7471then :
7472
7473printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
7474
7475else $as_nop
7476  test $ac_cv_type_long_long_int = yes \
7477       && ac_type='long long int' \
7478       || ac_type='long int'
7479
7480printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h
7481
7482fi
7483
7484
7485
7486
7487  ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
7488if test "x$ac_cv_type_uintmax_t" = xyes
7489then :
7490
7491printf "%s\n" "#define HAVE_UINTMAX_T 1" >>confdefs.h
7492
7493else $as_nop
7494  test $ac_cv_type_unsigned_long_long_int = yes \
7495       && ac_type='unsigned long long int' \
7496       || ac_type='unsigned long int'
7497
7498printf "%s\n" "#define uintmax_t $ac_type" >>confdefs.h
7499
7500fi
7501
7502
7503
7504  ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
7505if test "x$ac_cv_type_uintptr_t" = xyes
7506then :
7507
7508printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
7509
7510else $as_nop
7511  for ac_type in 'unsigned int' 'unsigned long int' \
7512	'unsigned long long int'; do
7513       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7514/* end confdefs.h.  */
7515$ac_includes_default
7516int
7517main (void)
7518{
7519static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
7520test_array [0] = 0;
7521return test_array [0];
7522
7523  ;
7524  return 0;
7525}
7526_ACEOF
7527if ac_fn_c_try_compile "$LINENO"
7528then :
7529
7530printf "%s\n" "#define uintptr_t $ac_type" >>confdefs.h
7531
7532	  ac_type=
7533fi
7534rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7535       test -z "$ac_type" && break
7536     done
7537fi
7538
7539
7540    ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
7541if test "x$ac_cv_type_ptrdiff_t" = xyes
7542then :
7543
7544printf "%s\n" "#define HAVE_PTRDIFF_T 1" >>confdefs.h
7545
7546
7547fi
7548
7549    ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
7550if test "x$ac_cv_func_localeconv" = xyes
7551then :
7552  printf "%s\n" "#define HAVE_LOCALECONV 1" >>confdefs.h
7553
7554fi
7555
7556
7557  if test "x$_hw_cv_func_xprintf_replace_done" != xyes
7558then :
7559  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
7560printf %s "checking for an ANSI C-conforming const... " >&6; }
7561if test ${ac_cv_c_const+y}
7562then :
7563  printf %s "(cached) " >&6
7564else $as_nop
7565  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7566/* end confdefs.h.  */
7567
7568int
7569main (void)
7570{
7571
7572#ifndef __cplusplus
7573  /* Ultrix mips cc rejects this sort of thing.  */
7574  typedef int charset[2];
7575  const charset cs = { 0, 0 };
7576  /* SunOS 4.1.1 cc rejects this.  */
7577  char const *const *pcpcc;
7578  char **ppc;
7579  /* NEC SVR4.0.2 mips cc rejects this.  */
7580  struct point {int x, y;};
7581  static struct point const zero = {0,0};
7582  /* IBM XL C 1.02.0.0 rejects this.
7583     It does not let you subtract one const X* pointer from another in
7584     an arm of an if-expression whose if-part is not a constant
7585     expression */
7586  const char *g = "string";
7587  pcpcc = &g + (g ? g-g : 0);
7588  /* HPUX 7.0 cc rejects these. */
7589  ++pcpcc;
7590  ppc = (char**) pcpcc;
7591  pcpcc = (char const *const *) ppc;
7592  { /* SCO 3.2v4 cc rejects this sort of thing.  */
7593    char tx;
7594    char *t = &tx;
7595    char const *s = 0 ? (char *) 0 : (char const *) 0;
7596
7597    *t++ = 0;
7598    if (s) return 0;
7599  }
7600  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7601    int x[] = {25, 17};
7602    const int *foo = &x[0];
7603    ++foo;
7604  }
7605  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7606    typedef const int *iptr;
7607    iptr p = 0;
7608    ++p;
7609  }
7610  { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
7611       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7612    struct s { int j; const int *ap[3]; } bx;
7613    struct s *b = &bx; b->j = 5;
7614  }
7615  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7616    const int foo = 10;
7617    if (!foo) return 0;
7618  }
7619  return !cs[0] && !zero.x;
7620#endif
7621
7622  ;
7623  return 0;
7624}
7625_ACEOF
7626if ac_fn_c_try_compile "$LINENO"
7627then :
7628  ac_cv_c_const=yes
7629else $as_nop
7630  ac_cv_c_const=no
7631fi
7632rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7633fi
7634{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
7635printf "%s\n" "$ac_cv_c_const" >&6; }
7636if test $ac_cv_c_const = no; then
7637
7638printf "%s\n" "#define const /**/" >>confdefs.h
7639
7640fi
7641
7642
7643
7644
7645    case " $LIBOBJS " in
7646  *" snprintf.$ac_objext "* ) ;;
7647  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
7648 ;;
7649esac
7650
7651    _hw_cv_func_xprintf_replace_done=yes
7652fi
7653
7654fi
7655
7656
7657    ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
7658if test "x$ac_cv_func_snprintf" = xyes
7659then :
7660  hw_cv_func_snprintf=yes
7661else $as_nop
7662  hw_cv_func_snprintf=no
7663fi
7664
7665  if test "$hw_cv_func_snprintf" = yes
7666then :
7667  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
7668printf %s "checking whether snprintf is C99 compliant... " >&6; }
7669if test ${hw_cv_func_snprintf_c99+y}
7670then :
7671  printf %s "(cached) " >&6
7672else $as_nop
7673  if test "$cross_compiling" = yes
7674then :
7675  hw_cv_func_snprintf_c99=no
7676else $as_nop
7677  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7678/* end confdefs.h.  */
7679#include <stdio.h>
7680int
7681main (void)
7682{
7683char buf[43];
7684          if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
7685              snprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
7686              buf[0] != 'T' || buf[3] != '\0')
7687            return 1;
7688  ;
7689  return 0;
7690}
7691_ACEOF
7692if ac_fn_c_try_run "$LINENO"
7693then :
7694  hw_cv_func_snprintf_c99=yes
7695else $as_nop
7696  hw_cv_func_snprintf_c99=no
7697fi
7698rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7699  conftest.$ac_objext conftest.beam conftest.$ac_ext
7700fi
7701
7702fi
7703{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
7704printf "%s\n" "$hw_cv_func_snprintf_c99" >&6; }
7705else $as_nop
7706  hw_cv_func_snprintf_c99=no
7707fi
7708
7709printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
7710
7711  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement snprintf will be used" >&5
7712printf %s "checking if C99-snprintf replacement snprintf will be used... " >&6; }
7713  if test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no
7714then :
7715  hw_use_rpl_snprintf=yes
7716else $as_nop
7717  hw_use_rpl_snprintf=no
7718fi
7719  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_snprintf" >&5
7720printf "%s\n" "$hw_use_rpl_snprintf" >&6; }
7721  if test "$hw_use_rpl_snprintf" = yes
7722then :
7723
7724printf "%s\n" "#define HW_WANT_RPL_SNPRINTF 1" >>confdefs.h
7725
7726    if test ${hw_nodef_snprintf=no} = no
7727then :
7728
7729printf "%s\n" "#define snprintf rpl_snprintf" >>confdefs.h
7730
7731fi
7732
7733  if test "x$_hw_cv_func_xprintf_replace_done" != xyes
7734then :
7735  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
7736printf %s "checking for an ANSI C-conforming const... " >&6; }
7737if test ${ac_cv_c_const+y}
7738then :
7739  printf %s "(cached) " >&6
7740else $as_nop
7741  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7742/* end confdefs.h.  */
7743
7744int
7745main (void)
7746{
7747
7748#ifndef __cplusplus
7749  /* Ultrix mips cc rejects this sort of thing.  */
7750  typedef int charset[2];
7751  const charset cs = { 0, 0 };
7752  /* SunOS 4.1.1 cc rejects this.  */
7753  char const *const *pcpcc;
7754  char **ppc;
7755  /* NEC SVR4.0.2 mips cc rejects this.  */
7756  struct point {int x, y;};
7757  static struct point const zero = {0,0};
7758  /* IBM XL C 1.02.0.0 rejects this.
7759     It does not let you subtract one const X* pointer from another in
7760     an arm of an if-expression whose if-part is not a constant
7761     expression */
7762  const char *g = "string";
7763  pcpcc = &g + (g ? g-g : 0);
7764  /* HPUX 7.0 cc rejects these. */
7765  ++pcpcc;
7766  ppc = (char**) pcpcc;
7767  pcpcc = (char const *const *) ppc;
7768  { /* SCO 3.2v4 cc rejects this sort of thing.  */
7769    char tx;
7770    char *t = &tx;
7771    char const *s = 0 ? (char *) 0 : (char const *) 0;
7772
7773    *t++ = 0;
7774    if (s) return 0;
7775  }
7776  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7777    int x[] = {25, 17};
7778    const int *foo = &x[0];
7779    ++foo;
7780  }
7781  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7782    typedef const int *iptr;
7783    iptr p = 0;
7784    ++p;
7785  }
7786  { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
7787       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7788    struct s { int j; const int *ap[3]; } bx;
7789    struct s *b = &bx; b->j = 5;
7790  }
7791  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7792    const int foo = 10;
7793    if (!foo) return 0;
7794  }
7795  return !cs[0] && !zero.x;
7796#endif
7797
7798  ;
7799  return 0;
7800}
7801_ACEOF
7802if ac_fn_c_try_compile "$LINENO"
7803then :
7804  ac_cv_c_const=yes
7805else $as_nop
7806  ac_cv_c_const=no
7807fi
7808rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7809fi
7810{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
7811printf "%s\n" "$ac_cv_c_const" >&6; }
7812if test $ac_cv_c_const = no; then
7813
7814printf "%s\n" "#define const /**/" >>confdefs.h
7815
7816fi
7817
7818
7819
7820
7821    case " $LIBOBJS " in
7822  *" snprintf.$ac_objext "* ) ;;
7823  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
7824 ;;
7825esac
7826
7827    _hw_cv_func_xprintf_replace_done=yes
7828fi
7829
7830fi
7831
7832
7833
7834ntp_pkgconfig_min_version='0.15.0'
7835if test -n "$ac_tool_prefix"; then
7836  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7837set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7838{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7839printf %s "checking for $ac_word... " >&6; }
7840if test ${ac_cv_path_PKG_CONFIG+y}
7841then :
7842  printf %s "(cached) " >&6
7843else $as_nop
7844  case $PKG_CONFIG in
7845  [\\/]* | ?:[\\/]*)
7846  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7847  ;;
7848  *)
7849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7850for as_dir in $PATH
7851do
7852  IFS=$as_save_IFS
7853  case $as_dir in #(((
7854    '') as_dir=./ ;;
7855    */) ;;
7856    *) as_dir=$as_dir/ ;;
7857  esac
7858    for ac_exec_ext in '' $ac_executable_extensions; do
7859  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7860    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
7861    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7862    break 2
7863  fi
7864done
7865  done
7866IFS=$as_save_IFS
7867
7868  ;;
7869esac
7870fi
7871PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7872if test -n "$PKG_CONFIG"; then
7873  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7874printf "%s\n" "$PKG_CONFIG" >&6; }
7875else
7876  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7877printf "%s\n" "no" >&6; }
7878fi
7879
7880
7881fi
7882if test -z "$ac_cv_path_PKG_CONFIG"; then
7883  ac_pt_PKG_CONFIG=$PKG_CONFIG
7884  # Extract the first word of "pkg-config", so it can be a program name with args.
7885set dummy pkg-config; ac_word=$2
7886{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7887printf %s "checking for $ac_word... " >&6; }
7888if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
7889then :
7890  printf %s "(cached) " >&6
7891else $as_nop
7892  case $ac_pt_PKG_CONFIG in
7893  [\\/]* | ?:[\\/]*)
7894  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7895  ;;
7896  *)
7897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7898for as_dir in $PATH
7899do
7900  IFS=$as_save_IFS
7901  case $as_dir in #(((
7902    '') as_dir=./ ;;
7903    */) ;;
7904    *) as_dir=$as_dir/ ;;
7905  esac
7906    for ac_exec_ext in '' $ac_executable_extensions; do
7907  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7908    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
7909    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7910    break 2
7911  fi
7912done
7913  done
7914IFS=$as_save_IFS
7915
7916  ;;
7917esac
7918fi
7919ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7920if test -n "$ac_pt_PKG_CONFIG"; then
7921  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7922printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
7923else
7924  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7925printf "%s\n" "no" >&6; }
7926fi
7927
7928  if test "x$ac_pt_PKG_CONFIG" = x; then
7929    PKG_CONFIG=""
7930  else
7931    case $cross_compiling:$ac_tool_warned in
7932yes:)
7933{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7934printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7935ac_tool_warned=yes ;;
7936esac
7937    PKG_CONFIG=$ac_pt_PKG_CONFIG
7938  fi
7939else
7940  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7941fi
7942
7943{ ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
7944{ ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
7945
7946case "$PKG_CONFIG" in
7947 /*)
7948    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
7949printf %s "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
7950    if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
7951	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7952printf "%s\n" "yes" >&6; }
7953    else
7954	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7955printf "%s\n" "no" >&6; }
7956	PKG_CONFIG=""
7957    fi
7958    ;;
7959esac
7960
7961
7962
7963
7964
7965VER_SUFFIX=
7966
7967	case "$enable_verbose_ssl" in
7968	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: " >&5
7969printf "%s\n" "$as_me: " >&6;}
7970	esac
7971
7972
7973
7974
7975
7976
7977
7978# HMS: Save $LIBS and empty it.
7979# any LIBS we add here should go in to LDADD_LIBNTP
7980
7981SAVED_LIBS=$LIBS
7982LIBS=
7983
7984
7985
7986# [Bug 2332] because we need to know if we are using GNU ld...
7987
7988
7989# Check whether --with-gnu-ld was given.
7990if test ${with_gnu_ld+y}
7991then :
7992  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7993else $as_nop
7994  with_gnu_ld=no
7995fi
7996
7997ac_prog=ld
7998if test yes = "$GCC"; then
7999  # Check if gcc -print-prog-name=ld gives a path.
8000  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8001printf %s "checking for ld used by $CC... " >&6; }
8002  case $host in
8003  *-*-mingw*)
8004    # gcc leaves a trailing carriage return, which upsets mingw
8005    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8006  *)
8007    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8008  esac
8009  case $ac_prog in
8010    # Accept absolute paths.
8011    [\\/]* | ?:[\\/]*)
8012      re_direlt='/[^/][^/]*/\.\./'
8013      # Canonicalize the pathname of ld
8014      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
8015      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
8016	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
8017      done
8018      test -z "$LD" && LD=$ac_prog
8019      ;;
8020  "")
8021    # If it fails, then pretend we aren't using GCC.
8022    ac_prog=ld
8023    ;;
8024  *)
8025    # If it is relative, then search for the first ld in PATH.
8026    with_gnu_ld=unknown
8027    ;;
8028  esac
8029elif test yes = "$with_gnu_ld"; then
8030  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8031printf %s "checking for GNU ld... " >&6; }
8032else
8033  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8034printf %s "checking for non-GNU ld... " >&6; }
8035fi
8036if test ${lt_cv_path_LD+y}
8037then :
8038  printf %s "(cached) " >&6
8039else $as_nop
8040  if test -z "$LD"; then
8041  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8042  for ac_dir in $PATH; do
8043    IFS=$lt_save_ifs
8044    test -z "$ac_dir" && ac_dir=.
8045    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8046      lt_cv_path_LD=$ac_dir/$ac_prog
8047      # Check to see if the program is GNU ld.  I'd rather use --version,
8048      # but apparently some variants of GNU ld only accept -v.
8049      # Break only if it was the GNU/non-GNU ld that we prefer.
8050      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
8051      *GNU* | *'with BFD'*)
8052	test no != "$with_gnu_ld" && break
8053	;;
8054      *)
8055	test yes != "$with_gnu_ld" && break
8056	;;
8057      esac
8058    fi
8059  done
8060  IFS=$lt_save_ifs
8061else
8062  lt_cv_path_LD=$LD # Let the user override the test with a path.
8063fi
8064fi
8065
8066LD=$lt_cv_path_LD
8067if test -n "$LD"; then
8068  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8069printf "%s\n" "$LD" >&6; }
8070else
8071  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8072printf "%s\n" "no" >&6; }
8073fi
8074test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8075{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8076printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
8077if test ${lt_cv_prog_gnu_ld+y}
8078then :
8079  printf %s "(cached) " >&6
8080else $as_nop
8081  # I'd rather use --version here, but apparently some GNU lds only accept -v.
8082case `$LD -v 2>&1 </dev/null` in
8083*GNU* | *'with BFD'*)
8084  lt_cv_prog_gnu_ld=yes
8085  ;;
8086*)
8087  lt_cv_prog_gnu_ld=no
8088  ;;
8089esac
8090fi
8091{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
8092printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
8093with_gnu_ld=$lt_cv_prog_gnu_ld
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
8106printf %s "checking for directory path separator... " >&6; }
8107if test ${ntp_cv_dir_sep+y}
8108then :
8109  printf %s "(cached) " >&6
8110else $as_nop
8111
8112	case "$ntp_cv_dir_sep" in
8113	 '')
8114	    case "$host_os" in
8115	     *djgpp | *mingw32* | *emx*)
8116		ntp_cv_dir_sep="'\\'"
8117		;;
8118	     *)
8119		ntp_cv_dir_sep="'/'"
8120		;;
8121	    esac
8122	esac
8123
8124
8125fi
8126{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
8127printf "%s\n" "$ntp_cv_dir_sep" >&6; }
8128
8129printf "%s\n" "#define DIR_SEP $ntp_cv_dir_sep" >>confdefs.h
8130
8131
8132
8133    NTP_ORIG_LIBS="$LIBS"
8134
8135# Check whether --with-lineeditlibs was given.
8136if test ${with_lineeditlibs+y}
8137then :
8138  withval=$with_lineeditlibs; use_lineeditlibs="$withval"
8139else $as_nop
8140  use_lineeditlibs="edit,editline"
8141
8142fi
8143
8144    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking line editing libraries" >&5
8145printf %s "checking line editing libraries... " >&6; }
8146    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $use_lineeditlibs" >&5
8147printf "%s\n" "$use_lineeditlibs" >&6; }
8148    case "$use_lineeditlibs" in
8149     no)
8150	ntp_lib_lineedit=no
8151	;;
8152     *)
8153	for lineedit_lib in `echo $use_lineeditlibs | sed -e 's/,/ /'`; do
8154	    for term_lib in "" termcap curses ncurses; do
8155		case "$term_lib" in
8156		 '')
8157		    TRY_LIB="-l$lineedit_lib"
8158		    ;;
8159		 *)
8160		    TRY_LIB="-l$lineedit_lib -l$term_lib"
8161		    ;;
8162		esac
8163		LIBS="$NTP_ORIG_LIBS $TRY_LIB"
8164		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for readline() with $TRY_LIB" >&5
8165printf %s "checking for readline() with $TRY_LIB... " >&6; }
8166		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8167/* end confdefs.h.  */
8168
8169/* Override any GCC internal prototype to avoid an error.
8170   Use char because int might match the return type of a GCC
8171   builtin and then its argument prototype would still apply.  */
8172char readline ();
8173int
8174main (void)
8175{
8176return readline ();
8177  ;
8178  return 0;
8179}
8180_ACEOF
8181if ac_fn_c_try_link "$LINENO"
8182then :
8183  ntp_lib_lineedit="$TRY_LIB"
8184fi
8185rm -f core conftest.err conftest.$ac_objext conftest.beam \
8186    conftest$ac_exeext conftest.$ac_ext
8187		case "$ntp_lib_lineedit" in
8188		 '')
8189		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8190printf "%s\n" "no" >&6; }
8191		    ;;
8192		 *)
8193		    # Use readline()
8194		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8195printf "%s\n" "yes" >&6; }
8196		    break
8197		esac
8198		case "$term_lib" in
8199		 '')
8200		    # do not try el_gets without a terminal library
8201		    ;;
8202		 *)
8203		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for el_gets() with $TRY_LIB" >&5
8204printf %s "checking for el_gets() with $TRY_LIB... " >&6; }
8205		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8206/* end confdefs.h.  */
8207
8208/* Override any GCC internal prototype to avoid an error.
8209   Use char because int might match the return type of a GCC
8210   builtin and then its argument prototype would still apply.  */
8211char el_gets ();
8212int
8213main (void)
8214{
8215return el_gets ();
8216  ;
8217  return 0;
8218}
8219_ACEOF
8220if ac_fn_c_try_link "$LINENO"
8221then :
8222  ntp_lib_lineedit="$TRY_LIB"
8223fi
8224rm -f core conftest.err conftest.$ac_objext conftest.beam \
8225    conftest$ac_exeext conftest.$ac_ext
8226		    case "$ntp_lib_lineedit" in
8227		     '')
8228			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8229printf "%s\n" "no" >&6; }
8230			;;
8231		     *) # Use el_gets()
8232			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8233printf "%s\n" "yes" >&6; }
8234			break
8235			;;
8236		    esac	# $ntp_lib_lineedit
8237		esac		# $term_lib
8238	    done
8239	    case "$ntp_lib_lineedit" in
8240	     '')
8241		;;
8242	     *)
8243		break
8244		;;
8245	    esac
8246	done
8247	LIBS="$NTP_ORIG_LIBS"
8248	;;
8249    esac	# $use_lineeditlibs
8250
8251    case "$ntp_lib_lineedit" in
8252     '')
8253	ntp_lib_lineedit="no"
8254	;;
8255     no)
8256	;;
8257     *)
8258	EDITLINE_LIBS="$ntp_lib_lineedit"
8259
8260	;;
8261    esac	# $ntp_lib_lineedit
8262
8263    case "$ntp_lib_lineedit" in
8264     no)
8265	;;
8266     *)
8267	ac_fn_c_check_header_compile "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
8268if test "x$ac_cv_header_readline_h" = xyes
8269then :
8270  printf "%s\n" "#define HAVE_READLINE_H 1" >>confdefs.h
8271
8272fi
8273ac_fn_c_check_header_compile "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
8274if test "x$ac_cv_header_readline_readline_h" = xyes
8275then :
8276  printf "%s\n" "#define HAVE_READLINE_READLINE_H 1" >>confdefs.h
8277
8278fi
8279ac_fn_c_check_header_compile "$LINENO" "histedit.h" "ac_cv_header_histedit_h" "$ac_includes_default"
8280if test "x$ac_cv_header_histedit_h" = xyes
8281then :
8282  printf "%s\n" "#define HAVE_HISTEDIT_H 1" >>confdefs.h
8283
8284fi
8285
8286	ac_fn_c_check_header_compile "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
8287if test "x$ac_cv_header_history_h" = xyes
8288then :
8289  printf "%s\n" "#define HAVE_HISTORY_H 1" >>confdefs.h
8290
8291fi
8292ac_fn_c_check_header_compile "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
8293if test "x$ac_cv_header_readline_history_h" = xyes
8294then :
8295  printf "%s\n" "#define HAVE_READLINE_HISTORY_H 1" >>confdefs.h
8296
8297fi
8298
8299
8300	case "$ac_cv_header_histedit_h" in
8301	 yes)
8302	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of arguments to el_init()" >&5
8303printf %s "checking number of arguments to el_init()... " >&6; }
8304if test ${ntp_cv_el_init_args+y}
8305then :
8306  printf %s "(cached) " >&6
8307else $as_nop
8308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8309/* end confdefs.h.  */
8310
8311			    #include <stdio.h>
8312			    #include <histedit.h>
8313
8314int
8315main (void)
8316{
8317
8318			    el_init("conftest", stdin, stdout, stderr);
8319
8320
8321  ;
8322  return 0;
8323}
8324_ACEOF
8325if ac_fn_c_try_compile "$LINENO"
8326then :
8327  ntp_cv_el_init_args=4
8328else $as_nop
8329  ntp_cv_el_init_args=3
8330
8331fi
8332rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8333
8334fi
8335{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_el_init_args" >&5
8336printf "%s\n" "$ntp_cv_el_init_args" >&6; }
8337
8338printf "%s\n" "#define EL_INIT_ARGS $ntp_cv_el_init_args" >>confdefs.h
8339
8340	esac
8341
8342	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
8343printf %s "checking whether readline supports history... " >&6; }
8344
8345	ntp_lib_lineedit_history="no"
8346	ORIG_LIBS="$LIBS"
8347	LIBS="$ORIG_LIBS $ntp_lib_lineedit"
8348	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8349/* end confdefs.h.  */
8350
8351/* Override any GCC internal prototype to avoid an error.
8352   Use char because int might match the return type of a GCC
8353   builtin and then its argument prototype would still apply.  */
8354char add_history ();
8355int
8356main (void)
8357{
8358return add_history ();
8359  ;
8360  return 0;
8361}
8362_ACEOF
8363if ac_fn_c_try_link "$LINENO"
8364then :
8365  ntp_lib_lineedit_history="yes"
8366fi
8367rm -f core conftest.err conftest.$ac_objext conftest.beam \
8368    conftest$ac_exeext conftest.$ac_ext
8369	LIBS="$ORIG_LIBS"
8370
8371	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_lib_lineedit_history" >&5
8372printf "%s\n" "$ntp_lib_lineedit_history" >&6; }
8373
8374	case "$ntp_lib_lineedit_history" in
8375	 yes)
8376
8377printf "%s\n" "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
8378
8379	esac
8380    esac	# $ntp_lib_lineedit
8381    { NTP_ORIG_LIBS=; unset NTP_ORIG_LIBS;}
8382    { ORIG_LIBS=; unset ORIG_LIBS;}
8383    { TRY_LIB=; unset TRY_LIB;}
8384    { use_lineeditlibs=; unset use_lineeditlibs;}
8385
8386
8387LIBM=
8388case "$host" in
8389 *-*-darwin*)
8390    ;;
8391 *)
8392    _libs=$LIBS
8393    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
8394printf %s "checking for library containing cos... " >&6; }
8395if test ${ac_cv_search_cos+y}
8396then :
8397  printf %s "(cached) " >&6
8398else $as_nop
8399  ac_func_search_save_LIBS=$LIBS
8400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8401/* end confdefs.h.  */
8402
8403/* Override any GCC internal prototype to avoid an error.
8404   Use char because int might match the return type of a GCC
8405   builtin and then its argument prototype would still apply.  */
8406char cos ();
8407int
8408main (void)
8409{
8410return cos ();
8411  ;
8412  return 0;
8413}
8414_ACEOF
8415for ac_lib in '' m
8416do
8417  if test -z "$ac_lib"; then
8418    ac_res="none required"
8419  else
8420    ac_res=-l$ac_lib
8421    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8422  fi
8423  if ac_fn_c_try_link "$LINENO"
8424then :
8425  ac_cv_search_cos=$ac_res
8426fi
8427rm -f core conftest.err conftest.$ac_objext conftest.beam \
8428    conftest$ac_exeext
8429  if test ${ac_cv_search_cos+y}
8430then :
8431  break
8432fi
8433done
8434if test ${ac_cv_search_cos+y}
8435then :
8436
8437else $as_nop
8438  ac_cv_search_cos=no
8439fi
8440rm conftest.$ac_ext
8441LIBS=$ac_func_search_save_LIBS
8442fi
8443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
8444printf "%s\n" "$ac_cv_search_cos" >&6; }
8445ac_res=$ac_cv_search_cos
8446if test "$ac_res" != no
8447then :
8448  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8449  LIBM="-lm"
8450fi
8451
8452    LIBS=$_libs
8453    ;;
8454esac
8455
8456{ _libs=; unset _libs;}
8457
8458
8459
8460
8461if test "x$ac_cv_func_fork" = xyes; then
8462  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
8463printf %s "checking for working fork... " >&6; }
8464if test ${ac_cv_func_fork_works+y}
8465then :
8466  printf %s "(cached) " >&6
8467else $as_nop
8468  if test "$cross_compiling" = yes
8469then :
8470  ac_cv_func_fork_works=cross
8471else $as_nop
8472  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8473/* end confdefs.h.  */
8474$ac_includes_default
8475int
8476main (void)
8477{
8478
8479	  /* By Ruediger Kuhlmann. */
8480	  return fork () < 0;
8481
8482  ;
8483  return 0;
8484}
8485_ACEOF
8486if ac_fn_c_try_run "$LINENO"
8487then :
8488  ac_cv_func_fork_works=yes
8489else $as_nop
8490  ac_cv_func_fork_works=no
8491fi
8492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8493  conftest.$ac_objext conftest.beam conftest.$ac_ext
8494fi
8495
8496fi
8497{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
8498printf "%s\n" "$ac_cv_func_fork_works" >&6; }
8499
8500else
8501  ac_cv_func_fork_works=$ac_cv_func_fork
8502fi
8503if test "x$ac_cv_func_fork_works" = xcross; then
8504  case $host in
8505    *-*-amigaos* | *-*-msdosdjgpp*)
8506      # Override, as these systems have only a dummy fork() stub
8507      ac_cv_func_fork_works=no
8508      ;;
8509    *)
8510      ac_cv_func_fork_works=yes
8511      ;;
8512  esac
8513  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
8514printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
8515fi
8516ac_cv_func_vfork_works=$ac_cv_func_vfork
8517if test "x$ac_cv_func_vfork" = xyes; then
8518  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
8519printf %s "checking for working vfork... " >&6; }
8520if test ${ac_cv_func_vfork_works+y}
8521then :
8522  printf %s "(cached) " >&6
8523else $as_nop
8524  if test "$cross_compiling" = yes
8525then :
8526  ac_cv_func_vfork_works=cross
8527else $as_nop
8528  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8529/* end confdefs.h.  */
8530/* Thanks to Paul Eggert for this test.  */
8531$ac_includes_default
8532#include <signal.h>
8533#include <sys/wait.h>
8534#ifdef HAVE_VFORK_H
8535# include <vfork.h>
8536#endif
8537
8538static void
8539do_nothing (int sig)
8540{
8541  (void) sig;
8542}
8543
8544/* On some sparc systems, changes by the child to local and incoming
8545   argument registers are propagated back to the parent.  The compiler
8546   is told about this with #include <vfork.h>, but some compilers
8547   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
8548   static variable whose address is put into a register that is
8549   clobbered by the vfork.  */
8550static void
8551sparc_address_test (int arg)
8552{
8553  static pid_t child;
8554  if (!child) {
8555    child = vfork ();
8556    if (child < 0) {
8557      perror ("vfork");
8558      _exit(2);
8559    }
8560    if (!child) {
8561      arg = getpid();
8562      write(-1, "", 0);
8563      _exit (arg);
8564    }
8565  }
8566}
8567
8568int
8569main (void)
8570{
8571  pid_t parent = getpid ();
8572  pid_t child;
8573
8574  sparc_address_test (0);
8575
8576  /* On Solaris 2.4, changes by the child to the signal handler
8577     also munge signal handlers in the parent.  To detect this,
8578     start by putting the parent's handler in a known state.  */
8579  signal (SIGTERM, SIG_DFL);
8580
8581  child = vfork ();
8582
8583  if (child == 0) {
8584    /* Here is another test for sparc vfork register problems.  This
8585       test uses lots of local variables, at least as many local
8586       variables as main has allocated so far including compiler
8587       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
8588       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
8589       reuse the register of parent for one of the local variables,
8590       since it will think that parent can't possibly be used any more
8591       in this routine.  Assigning to the local variable will thus
8592       munge parent in the parent process.  */
8593    pid_t
8594      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8595      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8596    /* Convince the compiler that p..p7 are live; otherwise, it might
8597       use the same hardware register for all 8 local variables.  */
8598    if (p != p1 || p != p2 || p != p3 || p != p4
8599	|| p != p5 || p != p6 || p != p7)
8600      _exit(1);
8601
8602    /* Alter the child's signal handler.  */
8603    if (signal (SIGTERM, do_nothing) != SIG_DFL)
8604      _exit(1);
8605
8606    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
8607       from child file descriptors.  If the child closes a descriptor
8608       before it execs or exits, this munges the parent's descriptor
8609       as well.  Test for this by closing stdout in the child.  */
8610    _exit(close(fileno(stdout)) != 0);
8611  } else {
8612    int status;
8613    struct stat st;
8614
8615    while (wait(&status) != child)
8616      ;
8617    return (
8618	 /* Was there some problem with vforking?  */
8619	 child < 0
8620
8621	 /* Did the child munge the parent's signal handler?  */
8622	 || signal (SIGTERM, SIG_DFL) != SIG_DFL
8623
8624	 /* Did the child fail?  (This shouldn't happen.)  */
8625	 || status
8626
8627	 /* Did the vfork/compiler bug occur?  */
8628	 || parent != getpid()
8629
8630	 /* Did the file descriptor bug occur?  */
8631	 || fstat(fileno(stdout), &st) != 0
8632	 );
8633  }
8634}
8635_ACEOF
8636if ac_fn_c_try_run "$LINENO"
8637then :
8638  ac_cv_func_vfork_works=yes
8639else $as_nop
8640  ac_cv_func_vfork_works=no
8641fi
8642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8643  conftest.$ac_objext conftest.beam conftest.$ac_ext
8644fi
8645
8646fi
8647{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
8648printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
8649
8650fi;
8651if test "x$ac_cv_func_fork_works" = xcross; then
8652  ac_cv_func_vfork_works=$ac_cv_func_vfork
8653  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
8654printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
8655fi
8656
8657if test "x$ac_cv_func_vfork_works" = xyes; then
8658
8659printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
8660
8661else
8662
8663printf "%s\n" "#define vfork fork" >>confdefs.h
8664
8665fi
8666if test "x$ac_cv_func_fork_works" = xyes; then
8667
8668printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
8669
8670fi
8671
8672# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8673# for constant arguments.  Useless!
8674{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8675printf %s "checking for working alloca.h... " >&6; }
8676if test ${ac_cv_working_alloca_h+y}
8677then :
8678  printf %s "(cached) " >&6
8679else $as_nop
8680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8681/* end confdefs.h.  */
8682#include <alloca.h>
8683int
8684main (void)
8685{
8686char *p = (char *) alloca (2 * sizeof (int));
8687			  if (p) return 0;
8688  ;
8689  return 0;
8690}
8691_ACEOF
8692if ac_fn_c_try_link "$LINENO"
8693then :
8694  ac_cv_working_alloca_h=yes
8695else $as_nop
8696  ac_cv_working_alloca_h=no
8697fi
8698rm -f core conftest.err conftest.$ac_objext conftest.beam \
8699    conftest$ac_exeext conftest.$ac_ext
8700fi
8701{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8702printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
8703if test $ac_cv_working_alloca_h = yes; then
8704
8705printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
8706
8707fi
8708
8709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8710printf %s "checking for alloca... " >&6; }
8711if test ${ac_cv_func_alloca_works+y}
8712then :
8713  printf %s "(cached) " >&6
8714else $as_nop
8715  if test $ac_cv_working_alloca_h = yes; then
8716  ac_cv_func_alloca_works=yes
8717else
8718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8719/* end confdefs.h.  */
8720#include <stdlib.h>
8721#include <stddef.h>
8722#ifndef alloca
8723# ifdef __GNUC__
8724#  define alloca __builtin_alloca
8725# elif defined _MSC_VER
8726#  include <malloc.h>
8727#  define alloca _alloca
8728# else
8729#  ifdef  __cplusplus
8730extern "C"
8731#  endif
8732void *alloca (size_t);
8733# endif
8734#endif
8735
8736int
8737main (void)
8738{
8739char *p = (char *) alloca (1);
8740				    if (p) return 0;
8741  ;
8742  return 0;
8743}
8744_ACEOF
8745if ac_fn_c_try_link "$LINENO"
8746then :
8747  ac_cv_func_alloca_works=yes
8748else $as_nop
8749  ac_cv_func_alloca_works=no
8750fi
8751rm -f core conftest.err conftest.$ac_objext conftest.beam \
8752    conftest$ac_exeext conftest.$ac_ext
8753fi
8754{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8755printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
8756fi
8757
8758if test $ac_cv_func_alloca_works = yes; then
8759
8760printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
8761
8762else
8763  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8764# that cause trouble.  Some versions do not even contain alloca or
8765# contain a buggy version.  If you still want to use their alloca,
8766# use ar to extract alloca.o from them instead of compiling alloca.c.
8767
8768ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8769
8770printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
8771
8772
8773{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8774printf %s "checking stack direction for C alloca... " >&6; }
8775if test ${ac_cv_c_stack_direction+y}
8776then :
8777  printf %s "(cached) " >&6
8778else $as_nop
8779  if test "$cross_compiling" = yes
8780then :
8781  ac_cv_c_stack_direction=0
8782else $as_nop
8783  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8784/* end confdefs.h.  */
8785$ac_includes_default
8786int
8787find_stack_direction (int *addr, int depth)
8788{
8789  int dir, dummy = 0;
8790  if (! addr)
8791    addr = &dummy;
8792  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8793  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8794  return dir + dummy;
8795}
8796
8797int
8798main (int argc, char **argv)
8799{
8800  return find_stack_direction (0, argc + !argv + 20) < 0;
8801}
8802_ACEOF
8803if ac_fn_c_try_run "$LINENO"
8804then :
8805  ac_cv_c_stack_direction=1
8806else $as_nop
8807  ac_cv_c_stack_direction=-1
8808fi
8809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8810  conftest.$ac_objext conftest.beam conftest.$ac_ext
8811fi
8812
8813fi
8814{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8815printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
8816printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
8817
8818
8819fi
8820
8821
8822if test $ac_cv_have_decl_strerror_r = yes; then
8823  # For backward compatibility's sake, define HAVE_STRERROR_R.
8824  # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
8825  # as AC_CHECK_DECLS_ONCE.)
8826
8827printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
8828
8829fi
8830
8831{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8832printf %s "checking whether strerror_r returns char *... " >&6; }
8833if test ${ac_cv_func_strerror_r_char_p+y}
8834then :
8835  printf %s "(cached) " >&6
8836else $as_nop
8837
8838    ac_cv_func_strerror_r_char_p=no
8839    if test $ac_cv_have_decl_strerror_r = yes; then
8840      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8841/* end confdefs.h.  */
8842#include <string.h>
8843int
8844main (void)
8845{
8846
8847	  char buf[100];
8848	  char x = *strerror_r (0, buf, sizeof buf);
8849	  char *p = strerror_r (0, buf, sizeof buf);
8850	  return !p || x;
8851
8852  ;
8853  return 0;
8854}
8855_ACEOF
8856if ac_fn_c_try_compile "$LINENO"
8857then :
8858  ac_cv_func_strerror_r_char_p=yes
8859fi
8860rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8861
8862    fi
8863
8864fi
8865{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8866printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
8867if test $ac_cv_func_strerror_r_char_p = yes; then
8868
8869printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8870
8871fi
8872
8873
8874ac_busted_vpath_in_make=no
8875case "$build" in
8876 *-*-irix6.1*)	# 64 bit only
8877    # busted vpath?
8878    ;;
8879 *-*-irix6*)	# 6.2 (and later?)
8880    ac_busted_vpath_in_make=yes
8881    ;;
8882 *-*-solaris2.5.1)
8883    ac_busted_vpath_in_make=yes
8884    ;;
8885 *-*-unicosmp*)
8886    ac_busted_vpath_in_make=yes
8887    ;;
8888esac
8889
8890case "$ac_busted_vpath_in_make$srcdir" in
8891 yes.|no*)
8892    ;;
8893 *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
8894     '')
8895	as_fn_error $? "building outside of the main directory requires GNU make" "$LINENO" 5
8896    esac
8897    ;;
8898esac
8899
8900case "$host" in
8901 *-*-aix4*)
8902	# Bug 2516:
8903	# Was *-*-aix[[4-9]]*
8904	# XXX only verified thru AIX6.  But...
8905	# Ken Link says this is fine for AIX 5.3 and 7.1, and sees no reason
8906	# that this support would be in 5.3, removed in 6, and added back.
8907	#
8908	# (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
8909	# (returning ENOSYS).  I didn't check 4.2.  If, in the future,
8910	# IBM pulls its thumbs out long enough to implement clock_settime,
8911	# this conditional will need to change.  Maybe use AC_TRY_RUN
8912	# instead to try to set the time to itself and check errno.
8913    ;;
8914 *)
8915    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
8916printf %s "checking for library containing clock_gettime... " >&6; }
8917if test ${ac_cv_search_clock_gettime+y}
8918then :
8919  printf %s "(cached) " >&6
8920else $as_nop
8921  ac_func_search_save_LIBS=$LIBS
8922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8923/* end confdefs.h.  */
8924
8925/* Override any GCC internal prototype to avoid an error.
8926   Use char because int might match the return type of a GCC
8927   builtin and then its argument prototype would still apply.  */
8928char clock_gettime ();
8929int
8930main (void)
8931{
8932return clock_gettime ();
8933  ;
8934  return 0;
8935}
8936_ACEOF
8937for ac_lib in '' rt
8938do
8939  if test -z "$ac_lib"; then
8940    ac_res="none required"
8941  else
8942    ac_res=-l$ac_lib
8943    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8944  fi
8945  if ac_fn_c_try_link "$LINENO"
8946then :
8947  ac_cv_search_clock_gettime=$ac_res
8948fi
8949rm -f core conftest.err conftest.$ac_objext conftest.beam \
8950    conftest$ac_exeext
8951  if test ${ac_cv_search_clock_gettime+y}
8952then :
8953  break
8954fi
8955done
8956if test ${ac_cv_search_clock_gettime+y}
8957then :
8958
8959else $as_nop
8960  ac_cv_search_clock_gettime=no
8961fi
8962rm conftest.$ac_ext
8963LIBS=$ac_func_search_save_LIBS
8964fi
8965{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
8966printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
8967ac_res=$ac_cv_search_clock_gettime
8968if test "$ac_res" != no
8969then :
8970  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8971  case "$ac_cv_search_clock_gettime" in
8972 'none required') ;;
8973 no) ;;
8974 *) LDADD_LIBNTP="$ac_cv_search_clock_gettime $LDADD_LIBNTP" ;;
8975 esac
8976
8977fi
8978
8979    ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
8980if test "x$ac_cv_func_clock_getres" = xyes
8981then :
8982  printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
8983
8984fi
8985ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
8986if test "x$ac_cv_func_clock_gettime" = xyes
8987then :
8988  printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
8989
8990fi
8991ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
8992if test "x$ac_cv_func_clock_settime" = xyes
8993then :
8994  printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
8995
8996fi
8997
8998    ;;
8999esac
9000
9001ac_fn_c_check_func "$LINENO" "getclock" "ac_cv_func_getclock"
9002if test "x$ac_cv_func_getclock" = xyes
9003then :
9004  printf "%s\n" "#define HAVE_GETCLOCK 1" >>confdefs.h
9005
9006fi
9007ac_fn_c_check_func "$LINENO" "stime" "ac_cv_func_stime"
9008if test "x$ac_cv_func_stime" = xyes
9009then :
9010  printf "%s\n" "#define HAVE_STIME 1" >>confdefs.h
9011
9012fi
9013ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
9014if test "x$ac_cv_func_timegm" = xyes
9015then :
9016  printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h
9017
9018fi
9019ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
9020if test "x$ac_cv_func_strlcpy" = xyes
9021then :
9022  printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
9023
9024fi
9025ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
9026if test "x$ac_cv_func_strlcat" = xyes
9027then :
9028  printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
9029
9030fi
9031
9032
9033# Bug 2713
9034LDADD_LIBUTIL=
9035
9036{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing snprintb" >&5
9037printf %s "checking for library containing snprintb... " >&6; }
9038if test ${ac_cv_search_snprintb+y}
9039then :
9040  printf %s "(cached) " >&6
9041else $as_nop
9042  ac_func_search_save_LIBS=$LIBS
9043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9044/* end confdefs.h.  */
9045
9046/* Override any GCC internal prototype to avoid an error.
9047   Use char because int might match the return type of a GCC
9048   builtin and then its argument prototype would still apply.  */
9049char snprintb ();
9050int
9051main (void)
9052{
9053return snprintb ();
9054  ;
9055  return 0;
9056}
9057_ACEOF
9058for ac_lib in '' util
9059do
9060  if test -z "$ac_lib"; then
9061    ac_res="none required"
9062  else
9063    ac_res=-l$ac_lib
9064    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9065  fi
9066  if ac_fn_c_try_link "$LINENO"
9067then :
9068  ac_cv_search_snprintb=$ac_res
9069fi
9070rm -f core conftest.err conftest.$ac_objext conftest.beam \
9071    conftest$ac_exeext
9072  if test ${ac_cv_search_snprintb+y}
9073then :
9074  break
9075fi
9076done
9077if test ${ac_cv_search_snprintb+y}
9078then :
9079
9080else $as_nop
9081  ac_cv_search_snprintb=no
9082fi
9083rm conftest.$ac_ext
9084LIBS=$ac_func_search_save_LIBS
9085fi
9086{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_snprintb" >&5
9087printf "%s\n" "$ac_cv_search_snprintb" >&6; }
9088ac_res=$ac_cv_search_snprintb
9089if test "$ac_res" != no
9090then :
9091  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9092  case "$ac_cv_search_snprintb" in
9093 'none required') ;;
9094 no) ;;
9095 *) LDADD_LIBUTIL="$ac_cv_search_snprintb $LDADD_LIBUTIL" ;;
9096 esac
9097
9098printf "%s\n" "#define USE_SNPRINTB 1" >>confdefs.h
9099
9100fi
9101
9102
9103#
9104ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
9105if test "x$ac_cv_header_errno_h" = xyes
9106then :
9107  printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
9108
9109fi
9110ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
9111if test "x$ac_cv_header_sys_socket_h" = xyes
9112then :
9113  printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
9114
9115fi
9116ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
9117if test "x$ac_cv_header_sys_types_h" = xyes
9118then :
9119  printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
9120
9121fi
9122ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default"
9123if test "x$ac_cv_header_time_h" = xyes
9124then :
9125  printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h
9126
9127fi
9128
9129ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
9130    #ifdef HAVE_SYS_SOCKET_H
9131    # include <sys/socket.h>
9132    #endif
9133
9134"
9135if test "x$ac_cv_header_net_if_h" = xyes
9136then :
9137  printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
9138
9139fi
9140
9141case "$host" in
9142 *-hp-hpux*)
9143    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if net/if.h requires mpinfou predeclaration" >&5
9144printf %s "checking if net/if.h requires mpinfou predeclaration... " >&6; }
9145if test ${ntp_cv_predecl_mpinfou+y}
9146then :
9147  printf %s "(cached) " >&6
9148else $as_nop
9149
9150	    np_cv_predecl_mpinfou=no
9151	    case "$ac_cv_header_net_if_h" in
9152	     no)
9153		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9154/* end confdefs.h.  */
9155
9156			    typedef union mpinfou {
9157				    struct pdk_mpinfo *pdkptr;
9158				    struct mpinfo *pikptr;
9159			    } mpinfou_t;
9160			    #ifdef HAVE_SYS_SOCKET_H
9161			    # include <sys/socket.h>
9162			    #endif
9163			    #include <net/if.h>
9164
9165int
9166main (void)
9167{
9168
9169
9170
9171  ;
9172  return 0;
9173}
9174_ACEOF
9175if ac_fn_c_try_compile "$LINENO"
9176then :
9177
9178			ntp_cv_predecl_mpinfou=yes
9179			ac_cv_header_net_if_h=yes
9180
9181
9182fi
9183rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9184	    esac
9185
9186
9187fi
9188{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_predecl_mpinfou" >&5
9189printf "%s\n" "$ntp_cv_predecl_mpinfou" >&6; }
9190    case "$ntp_cv_predecl_mpinfou" in
9191     yes)
9192	cat >>confdefs.h <<_ACEOF
9193#ifndef MPINFOU_PREDECLARED
9194# define MPINFOU_PREDECLARED
9195typedef union mpinfou {
9196	struct pdk_mpinfo *pdkptr;
9197	struct mpinfo *pikptr;
9198} mpinfou_t;
9199#endif
9200_ACEOF
9201
9202    esac
9203esac
9204
9205case "$host" in
9206 *-linux*)
9207    ac_fn_c_check_header_compile "$LINENO" "linux/if_addr.h" "ac_cv_header_linux_if_addr_h" "
9208	#ifdef HAVE_SYS_SOCKET_H
9209	# include <sys/socket.h>
9210	#endif
9211
9212"
9213if test "x$ac_cv_header_linux_if_addr_h" = xyes
9214then :
9215  printf "%s\n" "#define HAVE_LINUX_IF_ADDR_H 1" >>confdefs.h
9216
9217fi
9218
9219
9220printf "%s\n" "#define NEED_EARLY_FORK 1" >>confdefs.h
9221
9222esac
9223
9224ac_fn_c_check_header_compile "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "$ac_includes_default"
9225if test "x$ac_cv_header_arpa_nameser_h" = xyes
9226then :
9227  printf "%s\n" "#define HAVE_ARPA_NAMESER_H 1" >>confdefs.h
9228
9229fi
9230ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
9231if test "x$ac_cv_header_sys_param_h" = xyes
9232then :
9233  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
9234
9235fi
9236ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
9237if test "x$ac_cv_header_sys_time_h" = xyes
9238then :
9239  printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
9240
9241fi
9242ac_fn_c_check_header_compile "$LINENO" "sys/timers.h" "ac_cv_header_sys_timers_h" "$ac_includes_default"
9243if test "x$ac_cv_header_sys_timers_h" = xyes
9244then :
9245  printf "%s\n" "#define HAVE_SYS_TIMERS_H 1" >>confdefs.h
9246
9247fi
9248
9249# sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
9250ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
9251    #if defined HAVE_SYS_PARAM_H
9252    # include <sys/param.h>
9253    #endif
9254
9255"
9256if test "x$ac_cv_header_sys_sysctl_h" = xyes
9257then :
9258  printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
9259
9260fi
9261
9262ac_fn_c_check_header_compile "$LINENO" "netinet/in_system.h" "ac_cv_header_netinet_in_system_h" "$ac_includes_default"
9263if test "x$ac_cv_header_netinet_in_system_h" = xyes
9264then :
9265  printf "%s\n" "#define HAVE_NETINET_IN_SYSTEM_H 1" >>confdefs.h
9266
9267fi
9268ac_fn_c_check_header_compile "$LINENO" "netinet/in_systm.h" "ac_cv_header_netinet_in_systm_h" "$ac_includes_default"
9269if test "x$ac_cv_header_netinet_in_systm_h" = xyes
9270then :
9271  printf "%s\n" "#define HAVE_NETINET_IN_SYSTM_H 1" >>confdefs.h
9272
9273fi
9274ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
9275if test "x$ac_cv_header_netinet_in_h" = xyes
9276then :
9277  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
9278
9279fi
9280
9281
9282ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
9283    #ifdef HAVE_SYS_TYPES_H
9284    # include <sys/types.h>
9285    #endif
9286    #ifdef HAVE_NETINET_IN_H
9287    # include <netinet/in.h>
9288    #endif
9289    #ifdef HAVE_ARPA_NAMESER_H
9290    # include <arpa/nameser.h>
9291    #endif
9292
9293"
9294if test "x$ac_cv_header_resolv_h" = xyes
9295then :
9296  printf "%s\n" "#define HAVE_RESOLV_H 1" >>confdefs.h
9297
9298fi
9299
9300
9301ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
9302    #if HAVE_SYS_TYPES_H
9303    # include <sys/types.h>
9304    #endif
9305    #ifdef HAVE_SYS_SOCKET_H
9306    # include <sys/socket.h>
9307    #endif
9308    #ifdef HAVE_NETINET_IN_H
9309    # include <netinet/in.h>
9310    #endif
9311    #ifdef HAVE_NET_IF_H
9312    # include <net/if.h>
9313    #endif
9314
9315"
9316if test "x$ac_cv_header_net_if_var_h" = xyes
9317then :
9318  printf "%s\n" "#define HAVE_NET_IF_VAR_H 1" >>confdefs.h
9319
9320fi
9321
9322
9323ac_fn_c_check_header_compile "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "
9324    #ifdef HAVE_SYS_TYPES_H
9325    # include <sys/types.h>
9326    #endif
9327    #ifdef HAVE_SYS_SOCKET_H
9328    # include <sys/socket.h>
9329    #endif
9330    #ifdef HAVE_NET_IF_H
9331    # include <net/if.h>
9332    #endif
9333    #ifdef HAVE_NETINET_IN_H
9334    # include <netinet/in.h>
9335    #endif
9336    #ifdef HAVE_NET_IF_VAR_H
9337    # include <net/if_var.h>
9338    #endif
9339    #ifdef HAVE_NETINET_IN_SYSTM_H
9340    # include <netinet/in_systm.h>
9341    #endif
9342
9343"
9344if test "x$ac_cv_header_netinet_ip_h" = xyes
9345then :
9346  printf "%s\n" "#define HAVE_NETINET_IP_H 1" >>confdefs.h
9347
9348fi
9349ac_fn_c_check_header_compile "$LINENO" "netinet/in_var.h" "ac_cv_header_netinet_in_var_h" "
9350    #ifdef HAVE_SYS_TYPES_H
9351    # include <sys/types.h>
9352    #endif
9353    #ifdef HAVE_SYS_SOCKET_H
9354    # include <sys/socket.h>
9355    #endif
9356    #ifdef HAVE_NET_IF_H
9357    # include <net/if.h>
9358    #endif
9359    #ifdef HAVE_NETINET_IN_H
9360    # include <netinet/in.h>
9361    #endif
9362    #ifdef HAVE_NET_IF_VAR_H
9363    # include <net/if_var.h>
9364    #endif
9365    #ifdef HAVE_NETINET_IN_SYSTM_H
9366    # include <netinet/in_systm.h>
9367    #endif
9368
9369"
9370if test "x$ac_cv_header_netinet_in_var_h" = xyes
9371then :
9372  printf "%s\n" "#define HAVE_NETINET_IN_VAR_H 1" >>confdefs.h
9373
9374fi
9375
9376
9377# HMS: Do we need to check for -lsocket before or after these tests?
9378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
9379printf %s "checking for library containing inet_pton... " >&6; }
9380if test ${ac_cv_search_inet_pton+y}
9381then :
9382  printf %s "(cached) " >&6
9383else $as_nop
9384  ac_func_search_save_LIBS=$LIBS
9385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9386/* end confdefs.h.  */
9387
9388/* Override any GCC internal prototype to avoid an error.
9389   Use char because int might match the return type of a GCC
9390   builtin and then its argument prototype would still apply.  */
9391char inet_pton ();
9392int
9393main (void)
9394{
9395return inet_pton ();
9396  ;
9397  return 0;
9398}
9399_ACEOF
9400for ac_lib in '' nsl
9401do
9402  if test -z "$ac_lib"; then
9403    ac_res="none required"
9404  else
9405    ac_res=-l$ac_lib
9406    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9407  fi
9408  if ac_fn_c_try_link "$LINENO"
9409then :
9410  ac_cv_search_inet_pton=$ac_res
9411fi
9412rm -f core conftest.err conftest.$ac_objext conftest.beam \
9413    conftest$ac_exeext
9414  if test ${ac_cv_search_inet_pton+y}
9415then :
9416  break
9417fi
9418done
9419if test ${ac_cv_search_inet_pton+y}
9420then :
9421
9422else $as_nop
9423  ac_cv_search_inet_pton=no
9424fi
9425rm conftest.$ac_ext
9426LIBS=$ac_func_search_save_LIBS
9427fi
9428{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
9429printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
9430ac_res=$ac_cv_search_inet_pton
9431if test "$ac_res" != no
9432then :
9433  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9434  case "$ac_cv_search_inet_pton" in
9435 'none required') ;;
9436 no) ;;
9437 *) LDADD_LIBNTP="$ac_cv_search_inet_pton $LDADD_LIBNTP" ;;
9438 esac
9439
9440fi
9441
9442{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
9443printf %s "checking for library containing inet_ntop... " >&6; }
9444if test ${ac_cv_search_inet_ntop+y}
9445then :
9446  printf %s "(cached) " >&6
9447else $as_nop
9448  ac_func_search_save_LIBS=$LIBS
9449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9450/* end confdefs.h.  */
9451
9452/* Override any GCC internal prototype to avoid an error.
9453   Use char because int might match the return type of a GCC
9454   builtin and then its argument prototype would still apply.  */
9455char inet_ntop ();
9456int
9457main (void)
9458{
9459return inet_ntop ();
9460  ;
9461  return 0;
9462}
9463_ACEOF
9464for ac_lib in '' resolv
9465do
9466  if test -z "$ac_lib"; then
9467    ac_res="none required"
9468  else
9469    ac_res=-l$ac_lib
9470    LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
9471  fi
9472  if ac_fn_c_try_link "$LINENO"
9473then :
9474  ac_cv_search_inet_ntop=$ac_res
9475fi
9476rm -f core conftest.err conftest.$ac_objext conftest.beam \
9477    conftest$ac_exeext
9478  if test ${ac_cv_search_inet_ntop+y}
9479then :
9480  break
9481fi
9482done
9483if test ${ac_cv_search_inet_ntop+y}
9484then :
9485
9486else $as_nop
9487  ac_cv_search_inet_ntop=no
9488fi
9489rm conftest.$ac_ext
9490LIBS=$ac_func_search_save_LIBS
9491fi
9492{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
9493printf "%s\n" "$ac_cv_search_inet_ntop" >&6; }
9494ac_res=$ac_cv_search_inet_ntop
9495if test "$ac_res" != no
9496then :
9497  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9498  case "$ac_cv_search_inet_ntop" in
9499 'none required') ;;
9500 no) ;;
9501 *) LDADD_LIBNTP="$ac_cv_search_inet_ntop $LDADD_LIBNTP" ;;
9502 esac
9503
9504fi
9505
9506
9507# [Bug 1628] On Solaris, we need -lxnet -lsocket.  Generalize this to
9508# avoid keying on the OS name:  If we find socket functions in
9509# libsocket, next try for them in libxnet without libsocket, if found,
9510# list both.  If we simply tested libxnet first, we would find the
9511# functions there and never add libsocket.  See also [Bug 660]
9512# http://bugs.ntp.org/show_bug.cgi?id=660#c9
9513saved_LIBS=$LIBS
9514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
9515printf %s "checking for library containing setsockopt... " >&6; }
9516if test ${ac_cv_search_setsockopt+y}
9517then :
9518  printf %s "(cached) " >&6
9519else $as_nop
9520  ac_func_search_save_LIBS=$LIBS
9521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9522/* end confdefs.h.  */
9523
9524/* Override any GCC internal prototype to avoid an error.
9525   Use char because int might match the return type of a GCC
9526   builtin and then its argument prototype would still apply.  */
9527char setsockopt ();
9528int
9529main (void)
9530{
9531return setsockopt ();
9532  ;
9533  return 0;
9534}
9535_ACEOF
9536for ac_lib in '' socket
9537do
9538  if test -z "$ac_lib"; then
9539    ac_res="none required"
9540  else
9541    ac_res=-l$ac_lib
9542    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9543  fi
9544  if ac_fn_c_try_link "$LINENO"
9545then :
9546  ac_cv_search_setsockopt=$ac_res
9547fi
9548rm -f core conftest.err conftest.$ac_objext conftest.beam \
9549    conftest$ac_exeext
9550  if test ${ac_cv_search_setsockopt+y}
9551then :
9552  break
9553fi
9554done
9555if test ${ac_cv_search_setsockopt+y}
9556then :
9557
9558else $as_nop
9559  ac_cv_search_setsockopt=no
9560fi
9561rm conftest.$ac_ext
9562LIBS=$ac_func_search_save_LIBS
9563fi
9564{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
9565printf "%s\n" "$ac_cv_search_setsockopt" >&6; }
9566ac_res=$ac_cv_search_setsockopt
9567if test "$ac_res" != no
9568then :
9569  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9570  case "$ac_cv_search_setsockopt" in
9571 'none required') ;;
9572 no) ;;
9573 *) LDADD_LIBNTP="$ac_cv_search_setsockopt $LDADD_LIBNTP" ;;
9574 esac
9575
9576fi
9577
9578case "$ac_cv_search_setsockopt" in
9579 -lsocket)
9580    LIBS="$saved_LIBS"
9581    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
9582printf %s "checking for library containing getsockopt... " >&6; }
9583if test ${ac_cv_search_getsockopt+y}
9584then :
9585  printf %s "(cached) " >&6
9586else $as_nop
9587  ac_func_search_save_LIBS=$LIBS
9588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9589/* end confdefs.h.  */
9590
9591/* Override any GCC internal prototype to avoid an error.
9592   Use char because int might match the return type of a GCC
9593   builtin and then its argument prototype would still apply.  */
9594char getsockopt ();
9595int
9596main (void)
9597{
9598return getsockopt ();
9599  ;
9600  return 0;
9601}
9602_ACEOF
9603for ac_lib in '' xnet
9604do
9605  if test -z "$ac_lib"; then
9606    ac_res="none required"
9607  else
9608    ac_res=-l$ac_lib
9609    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9610  fi
9611  if ac_fn_c_try_link "$LINENO"
9612then :
9613  ac_cv_search_getsockopt=$ac_res
9614fi
9615rm -f core conftest.err conftest.$ac_objext conftest.beam \
9616    conftest$ac_exeext
9617  if test ${ac_cv_search_getsockopt+y}
9618then :
9619  break
9620fi
9621done
9622if test ${ac_cv_search_getsockopt+y}
9623then :
9624
9625else $as_nop
9626  ac_cv_search_getsockopt=no
9627fi
9628rm conftest.$ac_ext
9629LIBS=$ac_func_search_save_LIBS
9630fi
9631{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
9632printf "%s\n" "$ac_cv_search_getsockopt" >&6; }
9633ac_res=$ac_cv_search_getsockopt
9634if test "$ac_res" != no
9635then :
9636  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9637  case "$ac_cv_search_getsockopt" in
9638 'none required') ;;
9639 no) ;;
9640 *) LDADD_LIBNTP="$ac_cv_search_getsockopt $LDADD_LIBNTP" ;;
9641 esac
9642
9643fi
9644
9645    # XXX Possible trouble here - reading the comments above and looking at the
9646    # code below I wonder if we'll add -lxnet when we don't need it.
9647    # Also, do we need to add -lxnet to LDADD_LIBNTP, or perhaps see if it's
9648    # there when it is not needed?
9649    case "$ac_cv_search_getsockopt" in
9650     -lxnet)
9651	LIBS="-lxnet -lsocket $saved_LIBS"
9652	;;
9653     *) LIBS="-lsocket $saved_LIBS"
9654	;;
9655    esac
9656    ;;
9657esac
9658{ saved_LIBS=; unset saved_LIBS;}
9659
9660# Bug 2427 - look for recvmsg here.
9661ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
9662if test "x$ac_cv_func_recvmsg" = xyes
9663then :
9664  printf "%s\n" "#define HAVE_RECVMSG 1" >>confdefs.h
9665
9666fi
9667
9668
9669{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9670printf %s "checking for inline... " >&6; }
9671if test ${ac_cv_c_inline+y}
9672then :
9673  printf %s "(cached) " >&6
9674else $as_nop
9675  ac_cv_c_inline=no
9676for ac_kw in inline __inline__ __inline; do
9677  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9678/* end confdefs.h.  */
9679#ifndef __cplusplus
9680typedef int foo_t;
9681static $ac_kw foo_t static_foo (void) {return 0; }
9682$ac_kw foo_t foo (void) {return 0; }
9683#endif
9684
9685_ACEOF
9686if ac_fn_c_try_compile "$LINENO"
9687then :
9688  ac_cv_c_inline=$ac_kw
9689fi
9690rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9691  test "$ac_cv_c_inline" != no && break
9692done
9693
9694fi
9695{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9696printf "%s\n" "$ac_cv_c_inline" >&6; }
9697
9698case $ac_cv_c_inline in
9699  inline | yes) ;;
9700  *)
9701    case $ac_cv_c_inline in
9702      no) ac_val=;;
9703      *) ac_val=$ac_cv_c_inline;;
9704    esac
9705    cat >>confdefs.h <<_ACEOF
9706#ifndef __cplusplus
9707#define inline $ac_val
9708#endif
9709_ACEOF
9710    ;;
9711esac
9712
9713
9714case "$ac_cv_c_inline" in
9715 '')
9716    ;;
9717 *)
9718
9719printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
9720
9721
9722esac
9723
9724
9725# The cast to long int works around a bug in the HP C Compiler
9726# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9727# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9728# This bug is HP SR number 8606223364.
9729{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9730printf %s "checking size of time_t... " >&6; }
9731if test ${ac_cv_sizeof_time_t+y}
9732then :
9733  printf %s "(cached) " >&6
9734else $as_nop
9735  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"
9736then :
9737
9738else $as_nop
9739  if test "$ac_cv_type_time_t" = yes; then
9740     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9741printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
9742as_fn_error 77 "cannot compute sizeof (time_t)
9743See \`config.log' for more details" "$LINENO" 5; }
9744   else
9745     ac_cv_sizeof_time_t=0
9746   fi
9747fi
9748
9749fi
9750{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9751printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
9752
9753
9754
9755printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
9756
9757
9758{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
9759printf %s "checking whether char is unsigned... " >&6; }
9760if test ${ac_cv_c_char_unsigned+y}
9761then :
9762  printf %s "(cached) " >&6
9763else $as_nop
9764  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9765/* end confdefs.h.  */
9766$ac_includes_default
9767int
9768main (void)
9769{
9770static int test_array [1 - 2 * !(((char) -1) < 0)];
9771test_array [0] = 0;
9772return test_array [0];
9773
9774  ;
9775  return 0;
9776}
9777_ACEOF
9778if ac_fn_c_try_compile "$LINENO"
9779then :
9780  ac_cv_c_char_unsigned=no
9781else $as_nop
9782  ac_cv_c_char_unsigned=yes
9783fi
9784rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9785fi
9786{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
9787printf "%s\n" "$ac_cv_c_char_unsigned" >&6; }
9788if test $ac_cv_c_char_unsigned = yes; then
9789  printf "%s\n" "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
9790
9791fi
9792		# The cast to long int works around a bug in the HP C Compiler
9793# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9794# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9795# This bug is HP SR number 8606223364.
9796{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
9797printf %s "checking size of signed char... " >&6; }
9798if test ${ac_cv_sizeof_signed_char+y}
9799then :
9800  printf %s "(cached) " >&6
9801else $as_nop
9802  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char"        "$ac_includes_default"
9803then :
9804
9805else $as_nop
9806  if test "$ac_cv_type_signed_char" = yes; then
9807     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9808printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
9809as_fn_error 77 "cannot compute sizeof (signed char)
9810See \`config.log' for more details" "$LINENO" 5; }
9811   else
9812     ac_cv_sizeof_signed_char=0
9813   fi
9814fi
9815
9816fi
9817{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
9818printf "%s\n" "$ac_cv_sizeof_signed_char" >&6; }
9819
9820
9821
9822printf "%s\n" "#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char" >>confdefs.h
9823
9824
9825ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
9826if test "x$ac_cv_type_s_char" = xyes
9827then :
9828
9829printf "%s\n" "#define HAVE_S_CHAR 1" >>confdefs.h
9830
9831
9832fi
9833ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
9834if test "x$ac_cv_type_long_long" = xyes
9835then :
9836
9837printf "%s\n" "#define HAVE_LONG_LONG 1" >>confdefs.h
9838
9839
9840fi
9841
9842# The cast to long int works around a bug in the HP C Compiler
9843# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9844# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9845# This bug is HP SR number 8606223364.
9846{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
9847printf %s "checking size of short... " >&6; }
9848if test ${ac_cv_sizeof_short+y}
9849then :
9850  printf %s "(cached) " >&6
9851else $as_nop
9852  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"
9853then :
9854
9855else $as_nop
9856  if test "$ac_cv_type_short" = yes; then
9857     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9858printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
9859as_fn_error 77 "cannot compute sizeof (short)
9860See \`config.log' for more details" "$LINENO" 5; }
9861   else
9862     ac_cv_sizeof_short=0
9863   fi
9864fi
9865
9866fi
9867{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
9868printf "%s\n" "$ac_cv_sizeof_short" >&6; }
9869
9870
9871
9872printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
9873
9874
9875# The cast to long int works around a bug in the HP C Compiler
9876# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9877# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9878# This bug is HP SR number 8606223364.
9879{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
9880printf %s "checking size of int... " >&6; }
9881if test ${ac_cv_sizeof_int+y}
9882then :
9883  printf %s "(cached) " >&6
9884else $as_nop
9885  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"
9886then :
9887
9888else $as_nop
9889  if test "$ac_cv_type_int" = yes; then
9890     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9891printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
9892as_fn_error 77 "cannot compute sizeof (int)
9893See \`config.log' for more details" "$LINENO" 5; }
9894   else
9895     ac_cv_sizeof_int=0
9896   fi
9897fi
9898
9899fi
9900{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
9901printf "%s\n" "$ac_cv_sizeof_int" >&6; }
9902
9903
9904
9905printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
9906
9907
9908# The cast to long int works around a bug in the HP C Compiler
9909# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9910# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9911# This bug is HP SR number 8606223364.
9912{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
9913printf %s "checking size of long... " >&6; }
9914if test ${ac_cv_sizeof_long+y}
9915then :
9916  printf %s "(cached) " >&6
9917else $as_nop
9918  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"
9919then :
9920
9921else $as_nop
9922  if test "$ac_cv_type_long" = yes; then
9923     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9924printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
9925as_fn_error 77 "cannot compute sizeof (long)
9926See \`config.log' for more details" "$LINENO" 5; }
9927   else
9928     ac_cv_sizeof_long=0
9929   fi
9930fi
9931
9932fi
9933{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
9934printf "%s\n" "$ac_cv_sizeof_long" >&6; }
9935
9936
9937
9938printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
9939
9940
9941
9942case "$ac_cv_type_long_long" in
9943 no)
9944    ;;
9945 *)
9946    # The cast to long int works around a bug in the HP C Compiler
9947# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9948# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9949# This bug is HP SR number 8606223364.
9950{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
9951printf %s "checking size of long long... " >&6; }
9952if test ${ac_cv_sizeof_long_long+y}
9953then :
9954  printf %s "(cached) " >&6
9955else $as_nop
9956  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"
9957then :
9958
9959else $as_nop
9960  if test "$ac_cv_type_long_long" = yes; then
9961     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9962printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
9963as_fn_error 77 "cannot compute sizeof (long long)
9964See \`config.log' for more details" "$LINENO" 5; }
9965   else
9966     ac_cv_sizeof_long_long=0
9967   fi
9968fi
9969
9970fi
9971{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
9972printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
9973
9974
9975
9976printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
9977
9978
9979    ;;
9980esac
9981
9982case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
9983 *yes)
9984    # We have a typedef for s_char.  Might as well believe it...
9985    ;;
9986 no0no)
9987    # We have signed chars, can't say 'signed char', no s_char typedef.
9988
9989printf "%s\n" "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
9990
9991    ;;
9992 no1no)
9993    # We have signed chars, can say 'signed char', no s_char typedef.
9994
9995printf "%s\n" "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
9996
9997    ;;
9998 yes0no)
9999    # We have unsigned chars, can't say 'signed char', no s_char typedef.
10000    as_fn_error $? "No way to specify a signed character!" "$LINENO" 5
10001    ;;
10002 yes1no)
10003    # We have unsigned chars, can say 'signed char', no s_char typedef.
10004
10005printf "%s\n" "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
10006
10007    ;;
10008esac
10009
10010{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
10011printf %s "checking for uid_t in sys/types.h... " >&6; }
10012if test ${ac_cv_type_uid_t+y}
10013then :
10014  printf %s "(cached) " >&6
10015else $as_nop
10016  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10017/* end confdefs.h.  */
10018#include <sys/types.h>
10019
10020_ACEOF
10021if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10022  $EGREP "uid_t" >/dev/null 2>&1
10023then :
10024  ac_cv_type_uid_t=yes
10025else $as_nop
10026  ac_cv_type_uid_t=no
10027fi
10028rm -rf conftest*
10029
10030fi
10031{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
10032printf "%s\n" "$ac_cv_type_uid_t" >&6; }
10033if test $ac_cv_type_uid_t = no; then
10034
10035printf "%s\n" "#define uid_t int" >>confdefs.h
10036
10037
10038printf "%s\n" "#define gid_t int" >>confdefs.h
10039
10040fi
10041
10042
10043
10044
10045
10046
10047{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
10048printf %s "checking if we're including debugging code... " >&6; }
10049# Check whether --enable-debugging was given.
10050if test ${enable_debugging+y}
10051then :
10052  enableval=$enable_debugging; ntp_ok=$enableval
10053else $as_nop
10054  ntp_ok=yes
10055
10056fi
10057
10058case "$ntp_ok" in
10059 yes)
10060
10061printf "%s\n" "#define DEBUG 1" >>confdefs.h
10062
10063esac
10064{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
10065printf "%s\n" "$ntp_ok" >&6; }
10066
10067
10068
10069# check if we can compile with pthreads
10070ac_fn_c_check_header_compile "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
10071if test "x$ac_cv_header_semaphore_h" = xyes
10072then :
10073  printf "%s\n" "#define HAVE_SEMAPHORE_H 1" >>confdefs.h
10074
10075fi
10076
10077ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
10078if test "x$ac_cv_func_socketpair" = xyes
10079then :
10080  printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
10081
10082fi
10083
10084# Check whether --enable-thread-support was given.
10085if test ${enable_thread_support+y}
10086then :
10087  enableval=$enable_thread_support;
10088else $as_nop
10089  enable_thread_support=yes
10090
10091fi
10092
10093have_pthreads=no
10094case "$enable_thread_support" in
10095 no) ;;
10096 *)
10097    ol_found_pthreads=no
10098
10099
10100
10101ac_ext=c
10102ac_cpp='$CPP $CPPFLAGS'
10103ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10104ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10105ac_compiler_gnu=$ac_cv_c_compiler_gnu
10106
10107# OpenLDAP --with-threads
10108
10109# Check whether --with-threads was given.
10110if test ${with_threads+y}
10111then :
10112  withval=$with_threads;
10113	ol_arg=invalid
10114	for ol_val in auto nt posix mach pth lwp yes no manual  ; do
10115		if test "$withval" = "$ol_val" ; then
10116			ol_arg="$ol_val"
10117		fi
10118	done
10119	if test "$ol_arg" = "invalid" ; then
10120		as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
10121	fi
10122	ol_with_threads="$ol_arg"
10123
10124else $as_nop
10125  	ol_with_threads="auto"
10126fi
10127# end --with-threads
10128
10129
10130case "$ol_with_threads$host" in
10131 auto*-*-solaris2.[0-6])
10132        ol_with_threads=no
10133    ;;
10134esac
10135
10136
10137ol_aix_threads=no
10138case "$host" in
10139*-*-aix*) 	if test -z "$CC" ; then
10140		case "$ol_with_threads" in
10141		auto | yes |  posix) ol_aix_threads=yes ;;
10142		esac
10143	fi
10144;;
10145esac
10146
10147if test $ol_aix_threads = yes ; then
10148	if test -z "${CC}" ; then
10149		for ac_prog in cc_r xlc_r cc
10150do
10151  # Extract the first word of "$ac_prog", so it can be a program name with args.
10152set dummy $ac_prog; ac_word=$2
10153{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10154printf %s "checking for $ac_word... " >&6; }
10155if test ${ac_cv_prog_CC+y}
10156then :
10157  printf %s "(cached) " >&6
10158else $as_nop
10159  if test -n "$CC"; then
10160  ac_cv_prog_CC="$CC" # Let the user override the test.
10161else
10162as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10163for as_dir in $PATH
10164do
10165  IFS=$as_save_IFS
10166  case $as_dir in #(((
10167    '') as_dir=./ ;;
10168    */) ;;
10169    *) as_dir=$as_dir/ ;;
10170  esac
10171    for ac_exec_ext in '' $ac_executable_extensions; do
10172  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10173    ac_cv_prog_CC="$ac_prog"
10174    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10175    break 2
10176  fi
10177done
10178  done
10179IFS=$as_save_IFS
10180
10181fi
10182fi
10183CC=$ac_cv_prog_CC
10184if test -n "$CC"; then
10185  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
10186printf "%s\n" "$CC" >&6; }
10187else
10188  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10189printf "%s\n" "no" >&6; }
10190fi
10191
10192
10193  test -n "$CC" && break
10194done
10195
10196
10197		if test "$CC" = cc ; then
10198						if test $ol_with_threads != auto ; then
10199				as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
10200			else
10201				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
10202printf "%s\n" "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
10203			fi
10204			ol_with_threads=no
10205  		fi
10206	fi
10207
10208	case ${CC} in cc_r | xlc_r)
10209		ol_with_threads=posix
10210		ol_cv_pthread_create=yes
10211		;;
10212	esac
10213fi
10214
10215ol_link_threads=no
10216# OpenLDAP --with-yielding_select
10217
10218# Check whether --with-yielding_select was given.
10219if test ${with_yielding_select+y}
10220then :
10221  withval=$with_yielding_select;
10222	ol_arg=invalid
10223	for ol_val in auto yes no manual  ; do
10224		if test "$withval" = "$ol_val" ; then
10225			ol_arg="$ol_val"
10226		fi
10227	done
10228	if test "$ol_arg" = "invalid" ; then
10229		as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
10230	fi
10231	ol_with_yielding_select="$ol_arg"
10232
10233else $as_nop
10234  	ol_with_yielding_select="auto"
10235fi
10236# end --with-yielding_select
10237
10238
10239case $ol_with_threads in auto | yes | nt)
10240
10241
10242	ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
10243if test "x$ac_cv_func__beginthread" = xyes
10244then :
10245
10246fi
10247
10248
10249	if test $ac_cv_func__beginthread = yes ; then
10250
10251printf "%s\n" "#define HAVE_NT_THREADS 1" >>confdefs.h
10252
10253		ol_cv_nt_threads=yes
10254	fi
10255
10256
10257	if test "$ol_cv_nt_threads" = yes ; then
10258		ol_link_threads=nt
10259		ol_with_threads=found
10260		ol_with_yielding_select=yes
10261
10262
10263printf "%s\n" "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
10264
10265
10266printf "%s\n" "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
10267
10268	fi
10269
10270	if test $ol_with_threads = nt ; then
10271		as_fn_error $? "could not locate NT Threads" "$LINENO" 5
10272	fi
10273	;;
10274esac
10275
10276case $ol_with_threads in auto | yes | posix)
10277
10278	ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10279if test "x$ac_cv_header_pthread_h" = xyes
10280then :
10281  printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h
10282
10283fi
10284
10285
10286	if test $ac_cv_header_pthread_h = yes ; then
10287		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
10288printf %s "checking POSIX thread version... " >&6; }
10289if test ${ol_cv_pthread_version+y}
10290then :
10291  printf %s "(cached) " >&6
10292else $as_nop
10293
10294	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10295/* end confdefs.h.  */
10296
10297#		include <pthread.h>
10298
10299int
10300main (void)
10301{
10302
10303		int i = PTHREAD_CREATE_JOINABLE;
10304
10305  ;
10306  return 0;
10307}
10308_ACEOF
10309if ac_fn_c_try_compile "$LINENO"
10310then :
10311
10312	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10313/* end confdefs.h.  */
10314#include <pthread.h>
10315
10316_ACEOF
10317if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10318  $EGREP "pthread_detach" >/dev/null 2>&1
10319then :
10320  ol_cv_pthread_version=10
10321else $as_nop
10322  ol_cv_pthread_version=8
10323fi
10324rm -rf conftest*
10325
10326else $as_nop
10327
10328	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10329/* end confdefs.h.  */
10330
10331#		include <pthread.h>
10332#		ifdef PTHREAD_CREATE_UNDETACHED
10333		draft7
10334#		endif
10335
10336_ACEOF
10337if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10338  $EGREP "draft7" >/dev/null 2>&1
10339then :
10340  ol_cv_pthread_version=7
10341else $as_nop
10342
10343	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10344/* end confdefs.h.  */
10345#include <pthread.h>
10346
10347_ACEOF
10348if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10349  $EGREP "pthread_attr_init" >/dev/null 2>&1
10350then :
10351  ol_cv_pthread_version=6
10352else $as_nop
10353
10354	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10355/* end confdefs.h.  */
10356
10357#		include <pthread.h>
10358#ifdef		PTHREAD_MUTEX_INITIALIZER
10359		draft5
10360#endif
10361
10362_ACEOF
10363if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10364  $EGREP "draft5" >/dev/null 2>&1
10365then :
10366  ol_cv_pthread_version=5
10367else $as_nop
10368  ol_cv_pthread_version=4
10369fi
10370rm -rf conftest*
10371
10372fi
10373rm -rf conftest*
10374
10375fi
10376rm -rf conftest*
10377
10378fi
10379rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10380
10381fi
10382{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
10383printf "%s\n" "$ol_cv_pthread_version" >&6; }
10384
10385
10386		if test $ol_cv_pthread_version != 0 ; then
10387
10388printf "%s\n" "#define HAVE_PTHREADS $ol_cv_pthread_version" >>confdefs.h
10389
10390		else
10391			as_fn_error $? "unknown pthread version" "$LINENO" 5
10392		fi
10393
10394		# consider threads found
10395		ol_with_threads=found
10396
10397
10398	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
10399printf %s "checking for LinuxThreads pthread.h... " >&6; }
10400if test ${ol_cv_header_linux_threads+y}
10401then :
10402  printf %s "(cached) " >&6
10403else $as_nop
10404  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10405/* end confdefs.h.  */
10406#include <pthread.h>
10407_ACEOF
10408if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10409  $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1
10410then :
10411  ol_cv_header_linux_threads=yes
10412else $as_nop
10413  ol_cv_header_linux_threads=no
10414fi
10415rm -rf conftest*
10416
10417
10418fi
10419{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
10420printf "%s\n" "$ol_cv_header_linux_threads" >&6; }
10421	if test $ol_cv_header_linux_threads = yes; then
10422
10423printf "%s\n" "#define HAVE_LINUX_THREADS 1" >>confdefs.h
10424
10425	fi
10426
10427
10428	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
10429printf %s "checking for GNU Pth pthread.h... " >&6; }
10430if test ${ol_cv_header_gnu_pth_pthread_h+y}
10431then :
10432  printf %s "(cached) " >&6
10433else $as_nop
10434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10435/* end confdefs.h.  */
10436#include <pthread.h>
10437#ifdef _POSIX_THREAD_IS_GNU_PTH
10438	__gnu_pth__;
10439#endif
10440
10441_ACEOF
10442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10443  $EGREP "__gnu_pth__" >/dev/null 2>&1
10444then :
10445  ol_cv_header_gnu_pth_pthread_h=yes
10446else $as_nop
10447  ol_cv_header_gnu_pth_pthread_h=no
10448fi
10449rm -rf conftest*
10450
10451
10452fi
10453{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
10454printf "%s\n" "$ol_cv_header_gnu_pth_pthread_h" >&6; }
10455
10456
10457		if test $ol_cv_header_gnu_pth_pthread_h = no ; then
10458			ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
10459if test "x$ac_cv_header_sched_h" = xyes
10460then :
10461  printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
10462
10463fi
10464
10465		fi
10466
10467
10468				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
10469printf %s "checking for pthread_create in default libraries... " >&6; }
10470if test ${ol_cv_pthread_create+y}
10471then :
10472  printf %s "(cached) " >&6
10473else $as_nop
10474
10475			if test "$cross_compiling" = yes
10476then :
10477  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10478/* end confdefs.h.  */
10479
10480/* pthread test headers */
10481#include <pthread.h>
10482#if HAVE_PTHREADS < 7
10483#include <errno.h>
10484#endif
10485#ifndef NULL
10486#define NULL (void*)0
10487#endif
10488
10489static void *task(p)
10490	void *p;
10491{
10492	return (void *) (p == NULL);
10493}
10494
10495int
10496main (void)
10497{
10498
10499	/* pthread test function */
10500#ifndef PTHREAD_CREATE_DETACHED
10501#define	PTHREAD_CREATE_DETACHED	1
10502#endif
10503	pthread_t t;
10504	int status;
10505	int detach = PTHREAD_CREATE_DETACHED;
10506
10507#if HAVE_PTHREADS > 4
10508	/* Final pthreads */
10509	pthread_attr_t attr;
10510
10511	status = pthread_attr_init(&attr);
10512	if( status ) return status;
10513
10514#if HAVE_PTHREADS < 7
10515	status = pthread_attr_setdetachstate(&attr, &detach);
10516	if( status < 0 ) status = errno;
10517#else
10518	status = pthread_attr_setdetachstate(&attr, detach);
10519#endif
10520	if( status ) return status;
10521	status = pthread_create( &t, &attr, task, NULL );
10522#if HAVE_PTHREADS < 7
10523	if( status < 0 ) status = errno;
10524#endif
10525	if( status ) return status;
10526#else
10527	/* Draft 4 pthreads */
10528	status = pthread_create( &t, pthread_attr_default, task, NULL );
10529	if( status ) return errno;
10530
10531	/* give thread a chance to complete */
10532	/* it should remain joinable and hence detachable */
10533	sleep( 1 );
10534
10535	status = pthread_detach( &t );
10536	if( status ) return errno;
10537#endif
10538
10539#ifdef HAVE_LINUX_THREADS
10540	pthread_kill_other_threads_np();
10541#endif
10542
10543	return 0;
10544
10545  ;
10546  return 0;
10547}
10548_ACEOF
10549if ac_fn_c_try_link "$LINENO"
10550then :
10551  ol_cv_pthread_create=yes
10552else $as_nop
10553  ol_cv_pthread_create=no
10554fi
10555rm -f core conftest.err conftest.$ac_objext conftest.beam \
10556    conftest$ac_exeext conftest.$ac_ext
10557else $as_nop
10558  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10559/* end confdefs.h.  */
10560
10561
10562/* pthread test headers */
10563#include <pthread.h>
10564#if HAVE_PTHREADS < 7
10565#include <errno.h>
10566#endif
10567#ifndef NULL
10568#define NULL (void*)0
10569#endif
10570
10571static void *task(p)
10572	void *p;
10573{
10574	return (void *) (p == NULL);
10575}
10576
10577
10578int main(argc, argv)
10579	int argc;
10580	char **argv;
10581{
10582
10583	/* pthread test function */
10584#ifndef PTHREAD_CREATE_DETACHED
10585#define	PTHREAD_CREATE_DETACHED	1
10586#endif
10587	pthread_t t;
10588	int status;
10589	int detach = PTHREAD_CREATE_DETACHED;
10590
10591#if HAVE_PTHREADS > 4
10592	/* Final pthreads */
10593	pthread_attr_t attr;
10594
10595	status = pthread_attr_init(&attr);
10596	if( status ) return status;
10597
10598#if HAVE_PTHREADS < 7
10599	status = pthread_attr_setdetachstate(&attr, &detach);
10600	if( status < 0 ) status = errno;
10601#else
10602	status = pthread_attr_setdetachstate(&attr, detach);
10603#endif
10604	if( status ) return status;
10605	status = pthread_create( &t, &attr, task, NULL );
10606#if HAVE_PTHREADS < 7
10607	if( status < 0 ) status = errno;
10608#endif
10609	if( status ) return status;
10610#else
10611	/* Draft 4 pthreads */
10612	status = pthread_create( &t, pthread_attr_default, task, NULL );
10613	if( status ) return errno;
10614
10615	/* give thread a chance to complete */
10616	/* it should remain joinable and hence detachable */
10617	sleep( 1 );
10618
10619	status = pthread_detach( &t );
10620	if( status ) return errno;
10621#endif
10622
10623#ifdef HAVE_LINUX_THREADS
10624	pthread_kill_other_threads_np();
10625#endif
10626
10627	return 0;
10628
10629}
10630
10631_ACEOF
10632if ac_fn_c_try_run "$LINENO"
10633then :
10634  ol_cv_pthread_create=yes
10635else $as_nop
10636  ol_cv_pthread_create=no
10637fi
10638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10639  conftest.$ac_objext conftest.beam conftest.$ac_ext
10640fi
10641
10642fi
10643{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
10644printf "%s\n" "$ol_cv_pthread_create" >&6; }
10645
10646		if test $ol_cv_pthread_create != no ; then
10647			ol_link_threads=posix
10648			ol_link_pthreads=""
10649		fi
10650
10651		# Pthread try link: -kthread (ol_cv_pthread_kthread)
10652if test "$ol_link_threads" = no ; then
10653	# try -kthread
10654	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
10655printf %s "checking for pthread link with -kthread... " >&6; }
10656if test ${ol_cv_pthread_kthread+y}
10657then :
10658  printf %s "(cached) " >&6
10659else $as_nop
10660
10661		# save the flags
10662		ol_LIBS="$LIBS"
10663		LIBS="-kthread $LIBS"
10664
10665		if test "$cross_compiling" = yes
10666then :
10667  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10668/* end confdefs.h.  */
10669
10670/* pthread test headers */
10671#include <pthread.h>
10672#if HAVE_PTHREADS < 7
10673#include <errno.h>
10674#endif
10675#ifndef NULL
10676#define NULL (void*)0
10677#endif
10678
10679static void *task(p)
10680	void *p;
10681{
10682	return (void *) (p == NULL);
10683}
10684
10685int
10686main (void)
10687{
10688
10689	/* pthread test function */
10690#ifndef PTHREAD_CREATE_DETACHED
10691#define	PTHREAD_CREATE_DETACHED	1
10692#endif
10693	pthread_t t;
10694	int status;
10695	int detach = PTHREAD_CREATE_DETACHED;
10696
10697#if HAVE_PTHREADS > 4
10698	/* Final pthreads */
10699	pthread_attr_t attr;
10700
10701	status = pthread_attr_init(&attr);
10702	if( status ) return status;
10703
10704#if HAVE_PTHREADS < 7
10705	status = pthread_attr_setdetachstate(&attr, &detach);
10706	if( status < 0 ) status = errno;
10707#else
10708	status = pthread_attr_setdetachstate(&attr, detach);
10709#endif
10710	if( status ) return status;
10711	status = pthread_create( &t, &attr, task, NULL );
10712#if HAVE_PTHREADS < 7
10713	if( status < 0 ) status = errno;
10714#endif
10715	if( status ) return status;
10716#else
10717	/* Draft 4 pthreads */
10718	status = pthread_create( &t, pthread_attr_default, task, NULL );
10719	if( status ) return errno;
10720
10721	/* give thread a chance to complete */
10722	/* it should remain joinable and hence detachable */
10723	sleep( 1 );
10724
10725	status = pthread_detach( &t );
10726	if( status ) return errno;
10727#endif
10728
10729#ifdef HAVE_LINUX_THREADS
10730	pthread_kill_other_threads_np();
10731#endif
10732
10733	return 0;
10734
10735  ;
10736  return 0;
10737}
10738_ACEOF
10739if ac_fn_c_try_link "$LINENO"
10740then :
10741  ol_cv_pthread_kthread=yes
10742else $as_nop
10743  ol_cv_pthread_kthread=no
10744fi
10745rm -f core conftest.err conftest.$ac_objext conftest.beam \
10746    conftest$ac_exeext conftest.$ac_ext
10747else $as_nop
10748  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10749/* end confdefs.h.  */
10750
10751
10752/* pthread test headers */
10753#include <pthread.h>
10754#if HAVE_PTHREADS < 7
10755#include <errno.h>
10756#endif
10757#ifndef NULL
10758#define NULL (void*)0
10759#endif
10760
10761static void *task(p)
10762	void *p;
10763{
10764	return (void *) (p == NULL);
10765}
10766
10767
10768int main(argc, argv)
10769	int argc;
10770	char **argv;
10771{
10772
10773	/* pthread test function */
10774#ifndef PTHREAD_CREATE_DETACHED
10775#define	PTHREAD_CREATE_DETACHED	1
10776#endif
10777	pthread_t t;
10778	int status;
10779	int detach = PTHREAD_CREATE_DETACHED;
10780
10781#if HAVE_PTHREADS > 4
10782	/* Final pthreads */
10783	pthread_attr_t attr;
10784
10785	status = pthread_attr_init(&attr);
10786	if( status ) return status;
10787
10788#if HAVE_PTHREADS < 7
10789	status = pthread_attr_setdetachstate(&attr, &detach);
10790	if( status < 0 ) status = errno;
10791#else
10792	status = pthread_attr_setdetachstate(&attr, detach);
10793#endif
10794	if( status ) return status;
10795	status = pthread_create( &t, &attr, task, NULL );
10796#if HAVE_PTHREADS < 7
10797	if( status < 0 ) status = errno;
10798#endif
10799	if( status ) return status;
10800#else
10801	/* Draft 4 pthreads */
10802	status = pthread_create( &t, pthread_attr_default, task, NULL );
10803	if( status ) return errno;
10804
10805	/* give thread a chance to complete */
10806	/* it should remain joinable and hence detachable */
10807	sleep( 1 );
10808
10809	status = pthread_detach( &t );
10810	if( status ) return errno;
10811#endif
10812
10813#ifdef HAVE_LINUX_THREADS
10814	pthread_kill_other_threads_np();
10815#endif
10816
10817	return 0;
10818
10819}
10820
10821_ACEOF
10822if ac_fn_c_try_run "$LINENO"
10823then :
10824  ol_cv_pthread_kthread=yes
10825else $as_nop
10826  ol_cv_pthread_kthread=no
10827fi
10828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10829  conftest.$ac_objext conftest.beam conftest.$ac_ext
10830fi
10831
10832
10833		# restore the LIBS
10834		LIBS="$ol_LIBS"
10835
10836fi
10837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
10838printf "%s\n" "$ol_cv_pthread_kthread" >&6; }
10839
10840	if test $ol_cv_pthread_kthread = yes ; then
10841		ol_link_pthreads="-kthread"
10842		ol_link_threads=posix
10843	fi
10844fi
10845
10846		# Pthread try link: -pthread (ol_cv_pthread_pthread)
10847if test "$ol_link_threads" = no ; then
10848	# try -pthread
10849	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
10850printf %s "checking for pthread link with -pthread... " >&6; }
10851if test ${ol_cv_pthread_pthread+y}
10852then :
10853  printf %s "(cached) " >&6
10854else $as_nop
10855
10856		# save the flags
10857		ol_LIBS="$LIBS"
10858		LIBS="-pthread $LIBS"
10859
10860		if test "$cross_compiling" = yes
10861then :
10862  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10863/* end confdefs.h.  */
10864
10865/* pthread test headers */
10866#include <pthread.h>
10867#if HAVE_PTHREADS < 7
10868#include <errno.h>
10869#endif
10870#ifndef NULL
10871#define NULL (void*)0
10872#endif
10873
10874static void *task(p)
10875	void *p;
10876{
10877	return (void *) (p == NULL);
10878}
10879
10880int
10881main (void)
10882{
10883
10884	/* pthread test function */
10885#ifndef PTHREAD_CREATE_DETACHED
10886#define	PTHREAD_CREATE_DETACHED	1
10887#endif
10888	pthread_t t;
10889	int status;
10890	int detach = PTHREAD_CREATE_DETACHED;
10891
10892#if HAVE_PTHREADS > 4
10893	/* Final pthreads */
10894	pthread_attr_t attr;
10895
10896	status = pthread_attr_init(&attr);
10897	if( status ) return status;
10898
10899#if HAVE_PTHREADS < 7
10900	status = pthread_attr_setdetachstate(&attr, &detach);
10901	if( status < 0 ) status = errno;
10902#else
10903	status = pthread_attr_setdetachstate(&attr, detach);
10904#endif
10905	if( status ) return status;
10906	status = pthread_create( &t, &attr, task, NULL );
10907#if HAVE_PTHREADS < 7
10908	if( status < 0 ) status = errno;
10909#endif
10910	if( status ) return status;
10911#else
10912	/* Draft 4 pthreads */
10913	status = pthread_create( &t, pthread_attr_default, task, NULL );
10914	if( status ) return errno;
10915
10916	/* give thread a chance to complete */
10917	/* it should remain joinable and hence detachable */
10918	sleep( 1 );
10919
10920	status = pthread_detach( &t );
10921	if( status ) return errno;
10922#endif
10923
10924#ifdef HAVE_LINUX_THREADS
10925	pthread_kill_other_threads_np();
10926#endif
10927
10928	return 0;
10929
10930  ;
10931  return 0;
10932}
10933_ACEOF
10934if ac_fn_c_try_link "$LINENO"
10935then :
10936  ol_cv_pthread_pthread=yes
10937else $as_nop
10938  ol_cv_pthread_pthread=no
10939fi
10940rm -f core conftest.err conftest.$ac_objext conftest.beam \
10941    conftest$ac_exeext conftest.$ac_ext
10942else $as_nop
10943  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10944/* end confdefs.h.  */
10945
10946
10947/* pthread test headers */
10948#include <pthread.h>
10949#if HAVE_PTHREADS < 7
10950#include <errno.h>
10951#endif
10952#ifndef NULL
10953#define NULL (void*)0
10954#endif
10955
10956static void *task(p)
10957	void *p;
10958{
10959	return (void *) (p == NULL);
10960}
10961
10962
10963int main(argc, argv)
10964	int argc;
10965	char **argv;
10966{
10967
10968	/* pthread test function */
10969#ifndef PTHREAD_CREATE_DETACHED
10970#define	PTHREAD_CREATE_DETACHED	1
10971#endif
10972	pthread_t t;
10973	int status;
10974	int detach = PTHREAD_CREATE_DETACHED;
10975
10976#if HAVE_PTHREADS > 4
10977	/* Final pthreads */
10978	pthread_attr_t attr;
10979
10980	status = pthread_attr_init(&attr);
10981	if( status ) return status;
10982
10983#if HAVE_PTHREADS < 7
10984	status = pthread_attr_setdetachstate(&attr, &detach);
10985	if( status < 0 ) status = errno;
10986#else
10987	status = pthread_attr_setdetachstate(&attr, detach);
10988#endif
10989	if( status ) return status;
10990	status = pthread_create( &t, &attr, task, NULL );
10991#if HAVE_PTHREADS < 7
10992	if( status < 0 ) status = errno;
10993#endif
10994	if( status ) return status;
10995#else
10996	/* Draft 4 pthreads */
10997	status = pthread_create( &t, pthread_attr_default, task, NULL );
10998	if( status ) return errno;
10999
11000	/* give thread a chance to complete */
11001	/* it should remain joinable and hence detachable */
11002	sleep( 1 );
11003
11004	status = pthread_detach( &t );
11005	if( status ) return errno;
11006#endif
11007
11008#ifdef HAVE_LINUX_THREADS
11009	pthread_kill_other_threads_np();
11010#endif
11011
11012	return 0;
11013
11014}
11015
11016_ACEOF
11017if ac_fn_c_try_run "$LINENO"
11018then :
11019  ol_cv_pthread_pthread=yes
11020else $as_nop
11021  ol_cv_pthread_pthread=no
11022fi
11023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11024  conftest.$ac_objext conftest.beam conftest.$ac_ext
11025fi
11026
11027
11028		# restore the LIBS
11029		LIBS="$ol_LIBS"
11030
11031fi
11032{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
11033printf "%s\n" "$ol_cv_pthread_pthread" >&6; }
11034
11035	if test $ol_cv_pthread_pthread = yes ; then
11036		ol_link_pthreads="-pthread"
11037		ol_link_threads=posix
11038	fi
11039fi
11040
11041		# Pthread try link: -pthreads (ol_cv_pthread_pthreads)
11042if test "$ol_link_threads" = no ; then
11043	# try -pthreads
11044	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
11045printf %s "checking for pthread link with -pthreads... " >&6; }
11046if test ${ol_cv_pthread_pthreads+y}
11047then :
11048  printf %s "(cached) " >&6
11049else $as_nop
11050
11051		# save the flags
11052		ol_LIBS="$LIBS"
11053		LIBS="-pthreads $LIBS"
11054
11055		if test "$cross_compiling" = yes
11056then :
11057  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11058/* end confdefs.h.  */
11059
11060/* pthread test headers */
11061#include <pthread.h>
11062#if HAVE_PTHREADS < 7
11063#include <errno.h>
11064#endif
11065#ifndef NULL
11066#define NULL (void*)0
11067#endif
11068
11069static void *task(p)
11070	void *p;
11071{
11072	return (void *) (p == NULL);
11073}
11074
11075int
11076main (void)
11077{
11078
11079	/* pthread test function */
11080#ifndef PTHREAD_CREATE_DETACHED
11081#define	PTHREAD_CREATE_DETACHED	1
11082#endif
11083	pthread_t t;
11084	int status;
11085	int detach = PTHREAD_CREATE_DETACHED;
11086
11087#if HAVE_PTHREADS > 4
11088	/* Final pthreads */
11089	pthread_attr_t attr;
11090
11091	status = pthread_attr_init(&attr);
11092	if( status ) return status;
11093
11094#if HAVE_PTHREADS < 7
11095	status = pthread_attr_setdetachstate(&attr, &detach);
11096	if( status < 0 ) status = errno;
11097#else
11098	status = pthread_attr_setdetachstate(&attr, detach);
11099#endif
11100	if( status ) return status;
11101	status = pthread_create( &t, &attr, task, NULL );
11102#if HAVE_PTHREADS < 7
11103	if( status < 0 ) status = errno;
11104#endif
11105	if( status ) return status;
11106#else
11107	/* Draft 4 pthreads */
11108	status = pthread_create( &t, pthread_attr_default, task, NULL );
11109	if( status ) return errno;
11110
11111	/* give thread a chance to complete */
11112	/* it should remain joinable and hence detachable */
11113	sleep( 1 );
11114
11115	status = pthread_detach( &t );
11116	if( status ) return errno;
11117#endif
11118
11119#ifdef HAVE_LINUX_THREADS
11120	pthread_kill_other_threads_np();
11121#endif
11122
11123	return 0;
11124
11125  ;
11126  return 0;
11127}
11128_ACEOF
11129if ac_fn_c_try_link "$LINENO"
11130then :
11131  ol_cv_pthread_pthreads=yes
11132else $as_nop
11133  ol_cv_pthread_pthreads=no
11134fi
11135rm -f core conftest.err conftest.$ac_objext conftest.beam \
11136    conftest$ac_exeext conftest.$ac_ext
11137else $as_nop
11138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11139/* end confdefs.h.  */
11140
11141
11142/* pthread test headers */
11143#include <pthread.h>
11144#if HAVE_PTHREADS < 7
11145#include <errno.h>
11146#endif
11147#ifndef NULL
11148#define NULL (void*)0
11149#endif
11150
11151static void *task(p)
11152	void *p;
11153{
11154	return (void *) (p == NULL);
11155}
11156
11157
11158int main(argc, argv)
11159	int argc;
11160	char **argv;
11161{
11162
11163	/* pthread test function */
11164#ifndef PTHREAD_CREATE_DETACHED
11165#define	PTHREAD_CREATE_DETACHED	1
11166#endif
11167	pthread_t t;
11168	int status;
11169	int detach = PTHREAD_CREATE_DETACHED;
11170
11171#if HAVE_PTHREADS > 4
11172	/* Final pthreads */
11173	pthread_attr_t attr;
11174
11175	status = pthread_attr_init(&attr);
11176	if( status ) return status;
11177
11178#if HAVE_PTHREADS < 7
11179	status = pthread_attr_setdetachstate(&attr, &detach);
11180	if( status < 0 ) status = errno;
11181#else
11182	status = pthread_attr_setdetachstate(&attr, detach);
11183#endif
11184	if( status ) return status;
11185	status = pthread_create( &t, &attr, task, NULL );
11186#if HAVE_PTHREADS < 7
11187	if( status < 0 ) status = errno;
11188#endif
11189	if( status ) return status;
11190#else
11191	/* Draft 4 pthreads */
11192	status = pthread_create( &t, pthread_attr_default, task, NULL );
11193	if( status ) return errno;
11194
11195	/* give thread a chance to complete */
11196	/* it should remain joinable and hence detachable */
11197	sleep( 1 );
11198
11199	status = pthread_detach( &t );
11200	if( status ) return errno;
11201#endif
11202
11203#ifdef HAVE_LINUX_THREADS
11204	pthread_kill_other_threads_np();
11205#endif
11206
11207	return 0;
11208
11209}
11210
11211_ACEOF
11212if ac_fn_c_try_run "$LINENO"
11213then :
11214  ol_cv_pthread_pthreads=yes
11215else $as_nop
11216  ol_cv_pthread_pthreads=no
11217fi
11218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11219  conftest.$ac_objext conftest.beam conftest.$ac_ext
11220fi
11221
11222
11223		# restore the LIBS
11224		LIBS="$ol_LIBS"
11225
11226fi
11227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
11228printf "%s\n" "$ol_cv_pthread_pthreads" >&6; }
11229
11230	if test $ol_cv_pthread_pthreads = yes ; then
11231		ol_link_pthreads="-pthreads"
11232		ol_link_threads=posix
11233	fi
11234fi
11235
11236		# Pthread try link: -mthreads (ol_cv_pthread_mthreads)
11237if test "$ol_link_threads" = no ; then
11238	# try -mthreads
11239	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
11240printf %s "checking for pthread link with -mthreads... " >&6; }
11241if test ${ol_cv_pthread_mthreads+y}
11242then :
11243  printf %s "(cached) " >&6
11244else $as_nop
11245
11246		# save the flags
11247		ol_LIBS="$LIBS"
11248		LIBS="-mthreads $LIBS"
11249
11250		if test "$cross_compiling" = yes
11251then :
11252  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11253/* end confdefs.h.  */
11254
11255/* pthread test headers */
11256#include <pthread.h>
11257#if HAVE_PTHREADS < 7
11258#include <errno.h>
11259#endif
11260#ifndef NULL
11261#define NULL (void*)0
11262#endif
11263
11264static void *task(p)
11265	void *p;
11266{
11267	return (void *) (p == NULL);
11268}
11269
11270int
11271main (void)
11272{
11273
11274	/* pthread test function */
11275#ifndef PTHREAD_CREATE_DETACHED
11276#define	PTHREAD_CREATE_DETACHED	1
11277#endif
11278	pthread_t t;
11279	int status;
11280	int detach = PTHREAD_CREATE_DETACHED;
11281
11282#if HAVE_PTHREADS > 4
11283	/* Final pthreads */
11284	pthread_attr_t attr;
11285
11286	status = pthread_attr_init(&attr);
11287	if( status ) return status;
11288
11289#if HAVE_PTHREADS < 7
11290	status = pthread_attr_setdetachstate(&attr, &detach);
11291	if( status < 0 ) status = errno;
11292#else
11293	status = pthread_attr_setdetachstate(&attr, detach);
11294#endif
11295	if( status ) return status;
11296	status = pthread_create( &t, &attr, task, NULL );
11297#if HAVE_PTHREADS < 7
11298	if( status < 0 ) status = errno;
11299#endif
11300	if( status ) return status;
11301#else
11302	/* Draft 4 pthreads */
11303	status = pthread_create( &t, pthread_attr_default, task, NULL );
11304	if( status ) return errno;
11305
11306	/* give thread a chance to complete */
11307	/* it should remain joinable and hence detachable */
11308	sleep( 1 );
11309
11310	status = pthread_detach( &t );
11311	if( status ) return errno;
11312#endif
11313
11314#ifdef HAVE_LINUX_THREADS
11315	pthread_kill_other_threads_np();
11316#endif
11317
11318	return 0;
11319
11320  ;
11321  return 0;
11322}
11323_ACEOF
11324if ac_fn_c_try_link "$LINENO"
11325then :
11326  ol_cv_pthread_mthreads=yes
11327else $as_nop
11328  ol_cv_pthread_mthreads=no
11329fi
11330rm -f core conftest.err conftest.$ac_objext conftest.beam \
11331    conftest$ac_exeext conftest.$ac_ext
11332else $as_nop
11333  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11334/* end confdefs.h.  */
11335
11336
11337/* pthread test headers */
11338#include <pthread.h>
11339#if HAVE_PTHREADS < 7
11340#include <errno.h>
11341#endif
11342#ifndef NULL
11343#define NULL (void*)0
11344#endif
11345
11346static void *task(p)
11347	void *p;
11348{
11349	return (void *) (p == NULL);
11350}
11351
11352
11353int main(argc, argv)
11354	int argc;
11355	char **argv;
11356{
11357
11358	/* pthread test function */
11359#ifndef PTHREAD_CREATE_DETACHED
11360#define	PTHREAD_CREATE_DETACHED	1
11361#endif
11362	pthread_t t;
11363	int status;
11364	int detach = PTHREAD_CREATE_DETACHED;
11365
11366#if HAVE_PTHREADS > 4
11367	/* Final pthreads */
11368	pthread_attr_t attr;
11369
11370	status = pthread_attr_init(&attr);
11371	if( status ) return status;
11372
11373#if HAVE_PTHREADS < 7
11374	status = pthread_attr_setdetachstate(&attr, &detach);
11375	if( status < 0 ) status = errno;
11376#else
11377	status = pthread_attr_setdetachstate(&attr, detach);
11378#endif
11379	if( status ) return status;
11380	status = pthread_create( &t, &attr, task, NULL );
11381#if HAVE_PTHREADS < 7
11382	if( status < 0 ) status = errno;
11383#endif
11384	if( status ) return status;
11385#else
11386	/* Draft 4 pthreads */
11387	status = pthread_create( &t, pthread_attr_default, task, NULL );
11388	if( status ) return errno;
11389
11390	/* give thread a chance to complete */
11391	/* it should remain joinable and hence detachable */
11392	sleep( 1 );
11393
11394	status = pthread_detach( &t );
11395	if( status ) return errno;
11396#endif
11397
11398#ifdef HAVE_LINUX_THREADS
11399	pthread_kill_other_threads_np();
11400#endif
11401
11402	return 0;
11403
11404}
11405
11406_ACEOF
11407if ac_fn_c_try_run "$LINENO"
11408then :
11409  ol_cv_pthread_mthreads=yes
11410else $as_nop
11411  ol_cv_pthread_mthreads=no
11412fi
11413rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11414  conftest.$ac_objext conftest.beam conftest.$ac_ext
11415fi
11416
11417
11418		# restore the LIBS
11419		LIBS="$ol_LIBS"
11420
11421fi
11422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
11423printf "%s\n" "$ol_cv_pthread_mthreads" >&6; }
11424
11425	if test $ol_cv_pthread_mthreads = yes ; then
11426		ol_link_pthreads="-mthreads"
11427		ol_link_threads=posix
11428	fi
11429fi
11430
11431		# Pthread try link: -thread (ol_cv_pthread_thread)
11432if test "$ol_link_threads" = no ; then
11433	# try -thread
11434	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
11435printf %s "checking for pthread link with -thread... " >&6; }
11436if test ${ol_cv_pthread_thread+y}
11437then :
11438  printf %s "(cached) " >&6
11439else $as_nop
11440
11441		# save the flags
11442		ol_LIBS="$LIBS"
11443		LIBS="-thread $LIBS"
11444
11445		if test "$cross_compiling" = yes
11446then :
11447  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11448/* end confdefs.h.  */
11449
11450/* pthread test headers */
11451#include <pthread.h>
11452#if HAVE_PTHREADS < 7
11453#include <errno.h>
11454#endif
11455#ifndef NULL
11456#define NULL (void*)0
11457#endif
11458
11459static void *task(p)
11460	void *p;
11461{
11462	return (void *) (p == NULL);
11463}
11464
11465int
11466main (void)
11467{
11468
11469	/* pthread test function */
11470#ifndef PTHREAD_CREATE_DETACHED
11471#define	PTHREAD_CREATE_DETACHED	1
11472#endif
11473	pthread_t t;
11474	int status;
11475	int detach = PTHREAD_CREATE_DETACHED;
11476
11477#if HAVE_PTHREADS > 4
11478	/* Final pthreads */
11479	pthread_attr_t attr;
11480
11481	status = pthread_attr_init(&attr);
11482	if( status ) return status;
11483
11484#if HAVE_PTHREADS < 7
11485	status = pthread_attr_setdetachstate(&attr, &detach);
11486	if( status < 0 ) status = errno;
11487#else
11488	status = pthread_attr_setdetachstate(&attr, detach);
11489#endif
11490	if( status ) return status;
11491	status = pthread_create( &t, &attr, task, NULL );
11492#if HAVE_PTHREADS < 7
11493	if( status < 0 ) status = errno;
11494#endif
11495	if( status ) return status;
11496#else
11497	/* Draft 4 pthreads */
11498	status = pthread_create( &t, pthread_attr_default, task, NULL );
11499	if( status ) return errno;
11500
11501	/* give thread a chance to complete */
11502	/* it should remain joinable and hence detachable */
11503	sleep( 1 );
11504
11505	status = pthread_detach( &t );
11506	if( status ) return errno;
11507#endif
11508
11509#ifdef HAVE_LINUX_THREADS
11510	pthread_kill_other_threads_np();
11511#endif
11512
11513	return 0;
11514
11515  ;
11516  return 0;
11517}
11518_ACEOF
11519if ac_fn_c_try_link "$LINENO"
11520then :
11521  ol_cv_pthread_thread=yes
11522else $as_nop
11523  ol_cv_pthread_thread=no
11524fi
11525rm -f core conftest.err conftest.$ac_objext conftest.beam \
11526    conftest$ac_exeext conftest.$ac_ext
11527else $as_nop
11528  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11529/* end confdefs.h.  */
11530
11531
11532/* pthread test headers */
11533#include <pthread.h>
11534#if HAVE_PTHREADS < 7
11535#include <errno.h>
11536#endif
11537#ifndef NULL
11538#define NULL (void*)0
11539#endif
11540
11541static void *task(p)
11542	void *p;
11543{
11544	return (void *) (p == NULL);
11545}
11546
11547
11548int main(argc, argv)
11549	int argc;
11550	char **argv;
11551{
11552
11553	/* pthread test function */
11554#ifndef PTHREAD_CREATE_DETACHED
11555#define	PTHREAD_CREATE_DETACHED	1
11556#endif
11557	pthread_t t;
11558	int status;
11559	int detach = PTHREAD_CREATE_DETACHED;
11560
11561#if HAVE_PTHREADS > 4
11562	/* Final pthreads */
11563	pthread_attr_t attr;
11564
11565	status = pthread_attr_init(&attr);
11566	if( status ) return status;
11567
11568#if HAVE_PTHREADS < 7
11569	status = pthread_attr_setdetachstate(&attr, &detach);
11570	if( status < 0 ) status = errno;
11571#else
11572	status = pthread_attr_setdetachstate(&attr, detach);
11573#endif
11574	if( status ) return status;
11575	status = pthread_create( &t, &attr, task, NULL );
11576#if HAVE_PTHREADS < 7
11577	if( status < 0 ) status = errno;
11578#endif
11579	if( status ) return status;
11580#else
11581	/* Draft 4 pthreads */
11582	status = pthread_create( &t, pthread_attr_default, task, NULL );
11583	if( status ) return errno;
11584
11585	/* give thread a chance to complete */
11586	/* it should remain joinable and hence detachable */
11587	sleep( 1 );
11588
11589	status = pthread_detach( &t );
11590	if( status ) return errno;
11591#endif
11592
11593#ifdef HAVE_LINUX_THREADS
11594	pthread_kill_other_threads_np();
11595#endif
11596
11597	return 0;
11598
11599}
11600
11601_ACEOF
11602if ac_fn_c_try_run "$LINENO"
11603then :
11604  ol_cv_pthread_thread=yes
11605else $as_nop
11606  ol_cv_pthread_thread=no
11607fi
11608rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11609  conftest.$ac_objext conftest.beam conftest.$ac_ext
11610fi
11611
11612
11613		# restore the LIBS
11614		LIBS="$ol_LIBS"
11615
11616fi
11617{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
11618printf "%s\n" "$ol_cv_pthread_thread" >&6; }
11619
11620	if test $ol_cv_pthread_thread = yes ; then
11621		ol_link_pthreads="-thread"
11622		ol_link_threads=posix
11623	fi
11624fi
11625
11626
11627		# Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
11628if test "$ol_link_threads" = no ; then
11629	# try -lpthread -lmach -lexc -lc_r
11630	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
11631printf %s "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
11632if test ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+y}
11633then :
11634  printf %s "(cached) " >&6
11635else $as_nop
11636
11637		# save the flags
11638		ol_LIBS="$LIBS"
11639		LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
11640
11641		if test "$cross_compiling" = yes
11642then :
11643  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11644/* end confdefs.h.  */
11645
11646/* pthread test headers */
11647#include <pthread.h>
11648#if HAVE_PTHREADS < 7
11649#include <errno.h>
11650#endif
11651#ifndef NULL
11652#define NULL (void*)0
11653#endif
11654
11655static void *task(p)
11656	void *p;
11657{
11658	return (void *) (p == NULL);
11659}
11660
11661int
11662main (void)
11663{
11664
11665	/* pthread test function */
11666#ifndef PTHREAD_CREATE_DETACHED
11667#define	PTHREAD_CREATE_DETACHED	1
11668#endif
11669	pthread_t t;
11670	int status;
11671	int detach = PTHREAD_CREATE_DETACHED;
11672
11673#if HAVE_PTHREADS > 4
11674	/* Final pthreads */
11675	pthread_attr_t attr;
11676
11677	status = pthread_attr_init(&attr);
11678	if( status ) return status;
11679
11680#if HAVE_PTHREADS < 7
11681	status = pthread_attr_setdetachstate(&attr, &detach);
11682	if( status < 0 ) status = errno;
11683#else
11684	status = pthread_attr_setdetachstate(&attr, detach);
11685#endif
11686	if( status ) return status;
11687	status = pthread_create( &t, &attr, task, NULL );
11688#if HAVE_PTHREADS < 7
11689	if( status < 0 ) status = errno;
11690#endif
11691	if( status ) return status;
11692#else
11693	/* Draft 4 pthreads */
11694	status = pthread_create( &t, pthread_attr_default, task, NULL );
11695	if( status ) return errno;
11696
11697	/* give thread a chance to complete */
11698	/* it should remain joinable and hence detachable */
11699	sleep( 1 );
11700
11701	status = pthread_detach( &t );
11702	if( status ) return errno;
11703#endif
11704
11705#ifdef HAVE_LINUX_THREADS
11706	pthread_kill_other_threads_np();
11707#endif
11708
11709	return 0;
11710
11711  ;
11712  return 0;
11713}
11714_ACEOF
11715if ac_fn_c_try_link "$LINENO"
11716then :
11717  ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
11718else $as_nop
11719  ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
11720fi
11721rm -f core conftest.err conftest.$ac_objext conftest.beam \
11722    conftest$ac_exeext conftest.$ac_ext
11723else $as_nop
11724  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11725/* end confdefs.h.  */
11726
11727
11728/* pthread test headers */
11729#include <pthread.h>
11730#if HAVE_PTHREADS < 7
11731#include <errno.h>
11732#endif
11733#ifndef NULL
11734#define NULL (void*)0
11735#endif
11736
11737static void *task(p)
11738	void *p;
11739{
11740	return (void *) (p == NULL);
11741}
11742
11743
11744int main(argc, argv)
11745	int argc;
11746	char **argv;
11747{
11748
11749	/* pthread test function */
11750#ifndef PTHREAD_CREATE_DETACHED
11751#define	PTHREAD_CREATE_DETACHED	1
11752#endif
11753	pthread_t t;
11754	int status;
11755	int detach = PTHREAD_CREATE_DETACHED;
11756
11757#if HAVE_PTHREADS > 4
11758	/* Final pthreads */
11759	pthread_attr_t attr;
11760
11761	status = pthread_attr_init(&attr);
11762	if( status ) return status;
11763
11764#if HAVE_PTHREADS < 7
11765	status = pthread_attr_setdetachstate(&attr, &detach);
11766	if( status < 0 ) status = errno;
11767#else
11768	status = pthread_attr_setdetachstate(&attr, detach);
11769#endif
11770	if( status ) return status;
11771	status = pthread_create( &t, &attr, task, NULL );
11772#if HAVE_PTHREADS < 7
11773	if( status < 0 ) status = errno;
11774#endif
11775	if( status ) return status;
11776#else
11777	/* Draft 4 pthreads */
11778	status = pthread_create( &t, pthread_attr_default, task, NULL );
11779	if( status ) return errno;
11780
11781	/* give thread a chance to complete */
11782	/* it should remain joinable and hence detachable */
11783	sleep( 1 );
11784
11785	status = pthread_detach( &t );
11786	if( status ) return errno;
11787#endif
11788
11789#ifdef HAVE_LINUX_THREADS
11790	pthread_kill_other_threads_np();
11791#endif
11792
11793	return 0;
11794
11795}
11796
11797_ACEOF
11798if ac_fn_c_try_run "$LINENO"
11799then :
11800  ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
11801else $as_nop
11802  ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
11803fi
11804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11805  conftest.$ac_objext conftest.beam conftest.$ac_ext
11806fi
11807
11808
11809		# restore the LIBS
11810		LIBS="$ol_LIBS"
11811
11812fi
11813{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
11814printf "%s\n" "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
11815
11816	if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
11817		ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
11818		ol_link_threads=posix
11819	fi
11820fi
11821
11822		# Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
11823if test "$ol_link_threads" = no ; then
11824	# try -lpthread -lmach -lexc
11825	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
11826printf %s "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
11827if test ${ol_cv_pthread_lpthread_lmach_lexc+y}
11828then :
11829  printf %s "(cached) " >&6
11830else $as_nop
11831
11832		# save the flags
11833		ol_LIBS="$LIBS"
11834		LIBS="-lpthread -lmach -lexc $LIBS"
11835
11836		if test "$cross_compiling" = yes
11837then :
11838  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11839/* end confdefs.h.  */
11840
11841/* pthread test headers */
11842#include <pthread.h>
11843#if HAVE_PTHREADS < 7
11844#include <errno.h>
11845#endif
11846#ifndef NULL
11847#define NULL (void*)0
11848#endif
11849
11850static void *task(p)
11851	void *p;
11852{
11853	return (void *) (p == NULL);
11854}
11855
11856int
11857main (void)
11858{
11859
11860	/* pthread test function */
11861#ifndef PTHREAD_CREATE_DETACHED
11862#define	PTHREAD_CREATE_DETACHED	1
11863#endif
11864	pthread_t t;
11865	int status;
11866	int detach = PTHREAD_CREATE_DETACHED;
11867
11868#if HAVE_PTHREADS > 4
11869	/* Final pthreads */
11870	pthread_attr_t attr;
11871
11872	status = pthread_attr_init(&attr);
11873	if( status ) return status;
11874
11875#if HAVE_PTHREADS < 7
11876	status = pthread_attr_setdetachstate(&attr, &detach);
11877	if( status < 0 ) status = errno;
11878#else
11879	status = pthread_attr_setdetachstate(&attr, detach);
11880#endif
11881	if( status ) return status;
11882	status = pthread_create( &t, &attr, task, NULL );
11883#if HAVE_PTHREADS < 7
11884	if( status < 0 ) status = errno;
11885#endif
11886	if( status ) return status;
11887#else
11888	/* Draft 4 pthreads */
11889	status = pthread_create( &t, pthread_attr_default, task, NULL );
11890	if( status ) return errno;
11891
11892	/* give thread a chance to complete */
11893	/* it should remain joinable and hence detachable */
11894	sleep( 1 );
11895
11896	status = pthread_detach( &t );
11897	if( status ) return errno;
11898#endif
11899
11900#ifdef HAVE_LINUX_THREADS
11901	pthread_kill_other_threads_np();
11902#endif
11903
11904	return 0;
11905
11906  ;
11907  return 0;
11908}
11909_ACEOF
11910if ac_fn_c_try_link "$LINENO"
11911then :
11912  ol_cv_pthread_lpthread_lmach_lexc=yes
11913else $as_nop
11914  ol_cv_pthread_lpthread_lmach_lexc=no
11915fi
11916rm -f core conftest.err conftest.$ac_objext conftest.beam \
11917    conftest$ac_exeext conftest.$ac_ext
11918else $as_nop
11919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11920/* end confdefs.h.  */
11921
11922
11923/* pthread test headers */
11924#include <pthread.h>
11925#if HAVE_PTHREADS < 7
11926#include <errno.h>
11927#endif
11928#ifndef NULL
11929#define NULL (void*)0
11930#endif
11931
11932static void *task(p)
11933	void *p;
11934{
11935	return (void *) (p == NULL);
11936}
11937
11938
11939int main(argc, argv)
11940	int argc;
11941	char **argv;
11942{
11943
11944	/* pthread test function */
11945#ifndef PTHREAD_CREATE_DETACHED
11946#define	PTHREAD_CREATE_DETACHED	1
11947#endif
11948	pthread_t t;
11949	int status;
11950	int detach = PTHREAD_CREATE_DETACHED;
11951
11952#if HAVE_PTHREADS > 4
11953	/* Final pthreads */
11954	pthread_attr_t attr;
11955
11956	status = pthread_attr_init(&attr);
11957	if( status ) return status;
11958
11959#if HAVE_PTHREADS < 7
11960	status = pthread_attr_setdetachstate(&attr, &detach);
11961	if( status < 0 ) status = errno;
11962#else
11963	status = pthread_attr_setdetachstate(&attr, detach);
11964#endif
11965	if( status ) return status;
11966	status = pthread_create( &t, &attr, task, NULL );
11967#if HAVE_PTHREADS < 7
11968	if( status < 0 ) status = errno;
11969#endif
11970	if( status ) return status;
11971#else
11972	/* Draft 4 pthreads */
11973	status = pthread_create( &t, pthread_attr_default, task, NULL );
11974	if( status ) return errno;
11975
11976	/* give thread a chance to complete */
11977	/* it should remain joinable and hence detachable */
11978	sleep( 1 );
11979
11980	status = pthread_detach( &t );
11981	if( status ) return errno;
11982#endif
11983
11984#ifdef HAVE_LINUX_THREADS
11985	pthread_kill_other_threads_np();
11986#endif
11987
11988	return 0;
11989
11990}
11991
11992_ACEOF
11993if ac_fn_c_try_run "$LINENO"
11994then :
11995  ol_cv_pthread_lpthread_lmach_lexc=yes
11996else $as_nop
11997  ol_cv_pthread_lpthread_lmach_lexc=no
11998fi
11999rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12000  conftest.$ac_objext conftest.beam conftest.$ac_ext
12001fi
12002
12003
12004		# restore the LIBS
12005		LIBS="$ol_LIBS"
12006
12007fi
12008{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
12009printf "%s\n" "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
12010
12011	if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
12012		ol_link_pthreads="-lpthread -lmach -lexc"
12013		ol_link_threads=posix
12014	fi
12015fi
12016
12017
12018		# Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
12019if test "$ol_link_threads" = no ; then
12020	# try -lpthread -Wl,-woff,85
12021	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
12022printf %s "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
12023if test ${ol_cv_pthread_lib_lpthread_woff+y}
12024then :
12025  printf %s "(cached) " >&6
12026else $as_nop
12027
12028		# save the flags
12029		ol_LIBS="$LIBS"
12030		LIBS="-lpthread -Wl,-woff,85 $LIBS"
12031
12032		if test "$cross_compiling" = yes
12033then :
12034  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12035/* end confdefs.h.  */
12036
12037/* pthread test headers */
12038#include <pthread.h>
12039#if HAVE_PTHREADS < 7
12040#include <errno.h>
12041#endif
12042#ifndef NULL
12043#define NULL (void*)0
12044#endif
12045
12046static void *task(p)
12047	void *p;
12048{
12049	return (void *) (p == NULL);
12050}
12051
12052int
12053main (void)
12054{
12055
12056	/* pthread test function */
12057#ifndef PTHREAD_CREATE_DETACHED
12058#define	PTHREAD_CREATE_DETACHED	1
12059#endif
12060	pthread_t t;
12061	int status;
12062	int detach = PTHREAD_CREATE_DETACHED;
12063
12064#if HAVE_PTHREADS > 4
12065	/* Final pthreads */
12066	pthread_attr_t attr;
12067
12068	status = pthread_attr_init(&attr);
12069	if( status ) return status;
12070
12071#if HAVE_PTHREADS < 7
12072	status = pthread_attr_setdetachstate(&attr, &detach);
12073	if( status < 0 ) status = errno;
12074#else
12075	status = pthread_attr_setdetachstate(&attr, detach);
12076#endif
12077	if( status ) return status;
12078	status = pthread_create( &t, &attr, task, NULL );
12079#if HAVE_PTHREADS < 7
12080	if( status < 0 ) status = errno;
12081#endif
12082	if( status ) return status;
12083#else
12084	/* Draft 4 pthreads */
12085	status = pthread_create( &t, pthread_attr_default, task, NULL );
12086	if( status ) return errno;
12087
12088	/* give thread a chance to complete */
12089	/* it should remain joinable and hence detachable */
12090	sleep( 1 );
12091
12092	status = pthread_detach( &t );
12093	if( status ) return errno;
12094#endif
12095
12096#ifdef HAVE_LINUX_THREADS
12097	pthread_kill_other_threads_np();
12098#endif
12099
12100	return 0;
12101
12102  ;
12103  return 0;
12104}
12105_ACEOF
12106if ac_fn_c_try_link "$LINENO"
12107then :
12108  ol_cv_pthread_lib_lpthread_woff=yes
12109else $as_nop
12110  ol_cv_pthread_lib_lpthread_woff=no
12111fi
12112rm -f core conftest.err conftest.$ac_objext conftest.beam \
12113    conftest$ac_exeext conftest.$ac_ext
12114else $as_nop
12115  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12116/* end confdefs.h.  */
12117
12118
12119/* pthread test headers */
12120#include <pthread.h>
12121#if HAVE_PTHREADS < 7
12122#include <errno.h>
12123#endif
12124#ifndef NULL
12125#define NULL (void*)0
12126#endif
12127
12128static void *task(p)
12129	void *p;
12130{
12131	return (void *) (p == NULL);
12132}
12133
12134
12135int main(argc, argv)
12136	int argc;
12137	char **argv;
12138{
12139
12140	/* pthread test function */
12141#ifndef PTHREAD_CREATE_DETACHED
12142#define	PTHREAD_CREATE_DETACHED	1
12143#endif
12144	pthread_t t;
12145	int status;
12146	int detach = PTHREAD_CREATE_DETACHED;
12147
12148#if HAVE_PTHREADS > 4
12149	/* Final pthreads */
12150	pthread_attr_t attr;
12151
12152	status = pthread_attr_init(&attr);
12153	if( status ) return status;
12154
12155#if HAVE_PTHREADS < 7
12156	status = pthread_attr_setdetachstate(&attr, &detach);
12157	if( status < 0 ) status = errno;
12158#else
12159	status = pthread_attr_setdetachstate(&attr, detach);
12160#endif
12161	if( status ) return status;
12162	status = pthread_create( &t, &attr, task, NULL );
12163#if HAVE_PTHREADS < 7
12164	if( status < 0 ) status = errno;
12165#endif
12166	if( status ) return status;
12167#else
12168	/* Draft 4 pthreads */
12169	status = pthread_create( &t, pthread_attr_default, task, NULL );
12170	if( status ) return errno;
12171
12172	/* give thread a chance to complete */
12173	/* it should remain joinable and hence detachable */
12174	sleep( 1 );
12175
12176	status = pthread_detach( &t );
12177	if( status ) return errno;
12178#endif
12179
12180#ifdef HAVE_LINUX_THREADS
12181	pthread_kill_other_threads_np();
12182#endif
12183
12184	return 0;
12185
12186}
12187
12188_ACEOF
12189if ac_fn_c_try_run "$LINENO"
12190then :
12191  ol_cv_pthread_lib_lpthread_woff=yes
12192else $as_nop
12193  ol_cv_pthread_lib_lpthread_woff=no
12194fi
12195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12196  conftest.$ac_objext conftest.beam conftest.$ac_ext
12197fi
12198
12199
12200		# restore the LIBS
12201		LIBS="$ol_LIBS"
12202
12203fi
12204{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
12205printf "%s\n" "$ol_cv_pthread_lib_lpthread_woff" >&6; }
12206
12207	if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
12208		ol_link_pthreads="-lpthread -Wl,-woff,85"
12209		ol_link_threads=posix
12210	fi
12211fi
12212
12213
12214		# Pthread try link: -lpthread (ol_cv_pthread_lpthread)
12215if test "$ol_link_threads" = no ; then
12216	# try -lpthread
12217	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
12218printf %s "checking for pthread link with -lpthread... " >&6; }
12219if test ${ol_cv_pthread_lpthread+y}
12220then :
12221  printf %s "(cached) " >&6
12222else $as_nop
12223
12224		# save the flags
12225		ol_LIBS="$LIBS"
12226		LIBS="-lpthread $LIBS"
12227
12228		if test "$cross_compiling" = yes
12229then :
12230  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12231/* end confdefs.h.  */
12232
12233/* pthread test headers */
12234#include <pthread.h>
12235#if HAVE_PTHREADS < 7
12236#include <errno.h>
12237#endif
12238#ifndef NULL
12239#define NULL (void*)0
12240#endif
12241
12242static void *task(p)
12243	void *p;
12244{
12245	return (void *) (p == NULL);
12246}
12247
12248int
12249main (void)
12250{
12251
12252	/* pthread test function */
12253#ifndef PTHREAD_CREATE_DETACHED
12254#define	PTHREAD_CREATE_DETACHED	1
12255#endif
12256	pthread_t t;
12257	int status;
12258	int detach = PTHREAD_CREATE_DETACHED;
12259
12260#if HAVE_PTHREADS > 4
12261	/* Final pthreads */
12262	pthread_attr_t attr;
12263
12264	status = pthread_attr_init(&attr);
12265	if( status ) return status;
12266
12267#if HAVE_PTHREADS < 7
12268	status = pthread_attr_setdetachstate(&attr, &detach);
12269	if( status < 0 ) status = errno;
12270#else
12271	status = pthread_attr_setdetachstate(&attr, detach);
12272#endif
12273	if( status ) return status;
12274	status = pthread_create( &t, &attr, task, NULL );
12275#if HAVE_PTHREADS < 7
12276	if( status < 0 ) status = errno;
12277#endif
12278	if( status ) return status;
12279#else
12280	/* Draft 4 pthreads */
12281	status = pthread_create( &t, pthread_attr_default, task, NULL );
12282	if( status ) return errno;
12283
12284	/* give thread a chance to complete */
12285	/* it should remain joinable and hence detachable */
12286	sleep( 1 );
12287
12288	status = pthread_detach( &t );
12289	if( status ) return errno;
12290#endif
12291
12292#ifdef HAVE_LINUX_THREADS
12293	pthread_kill_other_threads_np();
12294#endif
12295
12296	return 0;
12297
12298  ;
12299  return 0;
12300}
12301_ACEOF
12302if ac_fn_c_try_link "$LINENO"
12303then :
12304  ol_cv_pthread_lpthread=yes
12305else $as_nop
12306  ol_cv_pthread_lpthread=no
12307fi
12308rm -f core conftest.err conftest.$ac_objext conftest.beam \
12309    conftest$ac_exeext conftest.$ac_ext
12310else $as_nop
12311  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12312/* end confdefs.h.  */
12313
12314
12315/* pthread test headers */
12316#include <pthread.h>
12317#if HAVE_PTHREADS < 7
12318#include <errno.h>
12319#endif
12320#ifndef NULL
12321#define NULL (void*)0
12322#endif
12323
12324static void *task(p)
12325	void *p;
12326{
12327	return (void *) (p == NULL);
12328}
12329
12330
12331int main(argc, argv)
12332	int argc;
12333	char **argv;
12334{
12335
12336	/* pthread test function */
12337#ifndef PTHREAD_CREATE_DETACHED
12338#define	PTHREAD_CREATE_DETACHED	1
12339#endif
12340	pthread_t t;
12341	int status;
12342	int detach = PTHREAD_CREATE_DETACHED;
12343
12344#if HAVE_PTHREADS > 4
12345	/* Final pthreads */
12346	pthread_attr_t attr;
12347
12348	status = pthread_attr_init(&attr);
12349	if( status ) return status;
12350
12351#if HAVE_PTHREADS < 7
12352	status = pthread_attr_setdetachstate(&attr, &detach);
12353	if( status < 0 ) status = errno;
12354#else
12355	status = pthread_attr_setdetachstate(&attr, detach);
12356#endif
12357	if( status ) return status;
12358	status = pthread_create( &t, &attr, task, NULL );
12359#if HAVE_PTHREADS < 7
12360	if( status < 0 ) status = errno;
12361#endif
12362	if( status ) return status;
12363#else
12364	/* Draft 4 pthreads */
12365	status = pthread_create( &t, pthread_attr_default, task, NULL );
12366	if( status ) return errno;
12367
12368	/* give thread a chance to complete */
12369	/* it should remain joinable and hence detachable */
12370	sleep( 1 );
12371
12372	status = pthread_detach( &t );
12373	if( status ) return errno;
12374#endif
12375
12376#ifdef HAVE_LINUX_THREADS
12377	pthread_kill_other_threads_np();
12378#endif
12379
12380	return 0;
12381
12382}
12383
12384_ACEOF
12385if ac_fn_c_try_run "$LINENO"
12386then :
12387  ol_cv_pthread_lpthread=yes
12388else $as_nop
12389  ol_cv_pthread_lpthread=no
12390fi
12391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12392  conftest.$ac_objext conftest.beam conftest.$ac_ext
12393fi
12394
12395
12396		# restore the LIBS
12397		LIBS="$ol_LIBS"
12398
12399fi
12400{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
12401printf "%s\n" "$ol_cv_pthread_lpthread" >&6; }
12402
12403	if test $ol_cv_pthread_lpthread = yes ; then
12404		ol_link_pthreads="-lpthread"
12405		ol_link_threads=posix
12406	fi
12407fi
12408
12409		# Pthread try link: -lc_r (ol_cv_pthread_lc_r)
12410if test "$ol_link_threads" = no ; then
12411	# try -lc_r
12412	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
12413printf %s "checking for pthread link with -lc_r... " >&6; }
12414if test ${ol_cv_pthread_lc_r+y}
12415then :
12416  printf %s "(cached) " >&6
12417else $as_nop
12418
12419		# save the flags
12420		ol_LIBS="$LIBS"
12421		LIBS="-lc_r $LIBS"
12422
12423		if test "$cross_compiling" = yes
12424then :
12425  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12426/* end confdefs.h.  */
12427
12428/* pthread test headers */
12429#include <pthread.h>
12430#if HAVE_PTHREADS < 7
12431#include <errno.h>
12432#endif
12433#ifndef NULL
12434#define NULL (void*)0
12435#endif
12436
12437static void *task(p)
12438	void *p;
12439{
12440	return (void *) (p == NULL);
12441}
12442
12443int
12444main (void)
12445{
12446
12447	/* pthread test function */
12448#ifndef PTHREAD_CREATE_DETACHED
12449#define	PTHREAD_CREATE_DETACHED	1
12450#endif
12451	pthread_t t;
12452	int status;
12453	int detach = PTHREAD_CREATE_DETACHED;
12454
12455#if HAVE_PTHREADS > 4
12456	/* Final pthreads */
12457	pthread_attr_t attr;
12458
12459	status = pthread_attr_init(&attr);
12460	if( status ) return status;
12461
12462#if HAVE_PTHREADS < 7
12463	status = pthread_attr_setdetachstate(&attr, &detach);
12464	if( status < 0 ) status = errno;
12465#else
12466	status = pthread_attr_setdetachstate(&attr, detach);
12467#endif
12468	if( status ) return status;
12469	status = pthread_create( &t, &attr, task, NULL );
12470#if HAVE_PTHREADS < 7
12471	if( status < 0 ) status = errno;
12472#endif
12473	if( status ) return status;
12474#else
12475	/* Draft 4 pthreads */
12476	status = pthread_create( &t, pthread_attr_default, task, NULL );
12477	if( status ) return errno;
12478
12479	/* give thread a chance to complete */
12480	/* it should remain joinable and hence detachable */
12481	sleep( 1 );
12482
12483	status = pthread_detach( &t );
12484	if( status ) return errno;
12485#endif
12486
12487#ifdef HAVE_LINUX_THREADS
12488	pthread_kill_other_threads_np();
12489#endif
12490
12491	return 0;
12492
12493  ;
12494  return 0;
12495}
12496_ACEOF
12497if ac_fn_c_try_link "$LINENO"
12498then :
12499  ol_cv_pthread_lc_r=yes
12500else $as_nop
12501  ol_cv_pthread_lc_r=no
12502fi
12503rm -f core conftest.err conftest.$ac_objext conftest.beam \
12504    conftest$ac_exeext conftest.$ac_ext
12505else $as_nop
12506  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12507/* end confdefs.h.  */
12508
12509
12510/* pthread test headers */
12511#include <pthread.h>
12512#if HAVE_PTHREADS < 7
12513#include <errno.h>
12514#endif
12515#ifndef NULL
12516#define NULL (void*)0
12517#endif
12518
12519static void *task(p)
12520	void *p;
12521{
12522	return (void *) (p == NULL);
12523}
12524
12525
12526int main(argc, argv)
12527	int argc;
12528	char **argv;
12529{
12530
12531	/* pthread test function */
12532#ifndef PTHREAD_CREATE_DETACHED
12533#define	PTHREAD_CREATE_DETACHED	1
12534#endif
12535	pthread_t t;
12536	int status;
12537	int detach = PTHREAD_CREATE_DETACHED;
12538
12539#if HAVE_PTHREADS > 4
12540	/* Final pthreads */
12541	pthread_attr_t attr;
12542
12543	status = pthread_attr_init(&attr);
12544	if( status ) return status;
12545
12546#if HAVE_PTHREADS < 7
12547	status = pthread_attr_setdetachstate(&attr, &detach);
12548	if( status < 0 ) status = errno;
12549#else
12550	status = pthread_attr_setdetachstate(&attr, detach);
12551#endif
12552	if( status ) return status;
12553	status = pthread_create( &t, &attr, task, NULL );
12554#if HAVE_PTHREADS < 7
12555	if( status < 0 ) status = errno;
12556#endif
12557	if( status ) return status;
12558#else
12559	/* Draft 4 pthreads */
12560	status = pthread_create( &t, pthread_attr_default, task, NULL );
12561	if( status ) return errno;
12562
12563	/* give thread a chance to complete */
12564	/* it should remain joinable and hence detachable */
12565	sleep( 1 );
12566
12567	status = pthread_detach( &t );
12568	if( status ) return errno;
12569#endif
12570
12571#ifdef HAVE_LINUX_THREADS
12572	pthread_kill_other_threads_np();
12573#endif
12574
12575	return 0;
12576
12577}
12578
12579_ACEOF
12580if ac_fn_c_try_run "$LINENO"
12581then :
12582  ol_cv_pthread_lc_r=yes
12583else $as_nop
12584  ol_cv_pthread_lc_r=no
12585fi
12586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12587  conftest.$ac_objext conftest.beam conftest.$ac_ext
12588fi
12589
12590
12591		# restore the LIBS
12592		LIBS="$ol_LIBS"
12593
12594fi
12595{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
12596printf "%s\n" "$ol_cv_pthread_lc_r" >&6; }
12597
12598	if test $ol_cv_pthread_lc_r = yes ; then
12599		ol_link_pthreads="-lc_r"
12600		ol_link_threads=posix
12601	fi
12602fi
12603
12604
12605		# Pthread try link: -threads (ol_cv_pthread_threads)
12606if test "$ol_link_threads" = no ; then
12607	# try -threads
12608	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
12609printf %s "checking for pthread link with -threads... " >&6; }
12610if test ${ol_cv_pthread_threads+y}
12611then :
12612  printf %s "(cached) " >&6
12613else $as_nop
12614
12615		# save the flags
12616		ol_LIBS="$LIBS"
12617		LIBS="-threads $LIBS"
12618
12619		if test "$cross_compiling" = yes
12620then :
12621  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12622/* end confdefs.h.  */
12623
12624/* pthread test headers */
12625#include <pthread.h>
12626#if HAVE_PTHREADS < 7
12627#include <errno.h>
12628#endif
12629#ifndef NULL
12630#define NULL (void*)0
12631#endif
12632
12633static void *task(p)
12634	void *p;
12635{
12636	return (void *) (p == NULL);
12637}
12638
12639int
12640main (void)
12641{
12642
12643	/* pthread test function */
12644#ifndef PTHREAD_CREATE_DETACHED
12645#define	PTHREAD_CREATE_DETACHED	1
12646#endif
12647	pthread_t t;
12648	int status;
12649	int detach = PTHREAD_CREATE_DETACHED;
12650
12651#if HAVE_PTHREADS > 4
12652	/* Final pthreads */
12653	pthread_attr_t attr;
12654
12655	status = pthread_attr_init(&attr);
12656	if( status ) return status;
12657
12658#if HAVE_PTHREADS < 7
12659	status = pthread_attr_setdetachstate(&attr, &detach);
12660	if( status < 0 ) status = errno;
12661#else
12662	status = pthread_attr_setdetachstate(&attr, detach);
12663#endif
12664	if( status ) return status;
12665	status = pthread_create( &t, &attr, task, NULL );
12666#if HAVE_PTHREADS < 7
12667	if( status < 0 ) status = errno;
12668#endif
12669	if( status ) return status;
12670#else
12671	/* Draft 4 pthreads */
12672	status = pthread_create( &t, pthread_attr_default, task, NULL );
12673	if( status ) return errno;
12674
12675	/* give thread a chance to complete */
12676	/* it should remain joinable and hence detachable */
12677	sleep( 1 );
12678
12679	status = pthread_detach( &t );
12680	if( status ) return errno;
12681#endif
12682
12683#ifdef HAVE_LINUX_THREADS
12684	pthread_kill_other_threads_np();
12685#endif
12686
12687	return 0;
12688
12689  ;
12690  return 0;
12691}
12692_ACEOF
12693if ac_fn_c_try_link "$LINENO"
12694then :
12695  ol_cv_pthread_threads=yes
12696else $as_nop
12697  ol_cv_pthread_threads=no
12698fi
12699rm -f core conftest.err conftest.$ac_objext conftest.beam \
12700    conftest$ac_exeext conftest.$ac_ext
12701else $as_nop
12702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12703/* end confdefs.h.  */
12704
12705
12706/* pthread test headers */
12707#include <pthread.h>
12708#if HAVE_PTHREADS < 7
12709#include <errno.h>
12710#endif
12711#ifndef NULL
12712#define NULL (void*)0
12713#endif
12714
12715static void *task(p)
12716	void *p;
12717{
12718	return (void *) (p == NULL);
12719}
12720
12721
12722int main(argc, argv)
12723	int argc;
12724	char **argv;
12725{
12726
12727	/* pthread test function */
12728#ifndef PTHREAD_CREATE_DETACHED
12729#define	PTHREAD_CREATE_DETACHED	1
12730#endif
12731	pthread_t t;
12732	int status;
12733	int detach = PTHREAD_CREATE_DETACHED;
12734
12735#if HAVE_PTHREADS > 4
12736	/* Final pthreads */
12737	pthread_attr_t attr;
12738
12739	status = pthread_attr_init(&attr);
12740	if( status ) return status;
12741
12742#if HAVE_PTHREADS < 7
12743	status = pthread_attr_setdetachstate(&attr, &detach);
12744	if( status < 0 ) status = errno;
12745#else
12746	status = pthread_attr_setdetachstate(&attr, detach);
12747#endif
12748	if( status ) return status;
12749	status = pthread_create( &t, &attr, task, NULL );
12750#if HAVE_PTHREADS < 7
12751	if( status < 0 ) status = errno;
12752#endif
12753	if( status ) return status;
12754#else
12755	/* Draft 4 pthreads */
12756	status = pthread_create( &t, pthread_attr_default, task, NULL );
12757	if( status ) return errno;
12758
12759	/* give thread a chance to complete */
12760	/* it should remain joinable and hence detachable */
12761	sleep( 1 );
12762
12763	status = pthread_detach( &t );
12764	if( status ) return errno;
12765#endif
12766
12767#ifdef HAVE_LINUX_THREADS
12768	pthread_kill_other_threads_np();
12769#endif
12770
12771	return 0;
12772
12773}
12774
12775_ACEOF
12776if ac_fn_c_try_run "$LINENO"
12777then :
12778  ol_cv_pthread_threads=yes
12779else $as_nop
12780  ol_cv_pthread_threads=no
12781fi
12782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12783  conftest.$ac_objext conftest.beam conftest.$ac_ext
12784fi
12785
12786
12787		# restore the LIBS
12788		LIBS="$ol_LIBS"
12789
12790fi
12791{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
12792printf "%s\n" "$ol_cv_pthread_threads" >&6; }
12793
12794	if test $ol_cv_pthread_threads = yes ; then
12795		ol_link_pthreads="-threads"
12796		ol_link_threads=posix
12797	fi
12798fi
12799
12800
12801		# Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
12802if test "$ol_link_threads" = no ; then
12803	# try -lpthreads -lmach -lexc -lc_r
12804	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
12805printf %s "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
12806if test ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+y}
12807then :
12808  printf %s "(cached) " >&6
12809else $as_nop
12810
12811		# save the flags
12812		ol_LIBS="$LIBS"
12813		LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
12814
12815		if test "$cross_compiling" = yes
12816then :
12817  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12818/* end confdefs.h.  */
12819
12820/* pthread test headers */
12821#include <pthread.h>
12822#if HAVE_PTHREADS < 7
12823#include <errno.h>
12824#endif
12825#ifndef NULL
12826#define NULL (void*)0
12827#endif
12828
12829static void *task(p)
12830	void *p;
12831{
12832	return (void *) (p == NULL);
12833}
12834
12835int
12836main (void)
12837{
12838
12839	/* pthread test function */
12840#ifndef PTHREAD_CREATE_DETACHED
12841#define	PTHREAD_CREATE_DETACHED	1
12842#endif
12843	pthread_t t;
12844	int status;
12845	int detach = PTHREAD_CREATE_DETACHED;
12846
12847#if HAVE_PTHREADS > 4
12848	/* Final pthreads */
12849	pthread_attr_t attr;
12850
12851	status = pthread_attr_init(&attr);
12852	if( status ) return status;
12853
12854#if HAVE_PTHREADS < 7
12855	status = pthread_attr_setdetachstate(&attr, &detach);
12856	if( status < 0 ) status = errno;
12857#else
12858	status = pthread_attr_setdetachstate(&attr, detach);
12859#endif
12860	if( status ) return status;
12861	status = pthread_create( &t, &attr, task, NULL );
12862#if HAVE_PTHREADS < 7
12863	if( status < 0 ) status = errno;
12864#endif
12865	if( status ) return status;
12866#else
12867	/* Draft 4 pthreads */
12868	status = pthread_create( &t, pthread_attr_default, task, NULL );
12869	if( status ) return errno;
12870
12871	/* give thread a chance to complete */
12872	/* it should remain joinable and hence detachable */
12873	sleep( 1 );
12874
12875	status = pthread_detach( &t );
12876	if( status ) return errno;
12877#endif
12878
12879#ifdef HAVE_LINUX_THREADS
12880	pthread_kill_other_threads_np();
12881#endif
12882
12883	return 0;
12884
12885  ;
12886  return 0;
12887}
12888_ACEOF
12889if ac_fn_c_try_link "$LINENO"
12890then :
12891  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
12892else $as_nop
12893  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
12894fi
12895rm -f core conftest.err conftest.$ac_objext conftest.beam \
12896    conftest$ac_exeext conftest.$ac_ext
12897else $as_nop
12898  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12899/* end confdefs.h.  */
12900
12901
12902/* pthread test headers */
12903#include <pthread.h>
12904#if HAVE_PTHREADS < 7
12905#include <errno.h>
12906#endif
12907#ifndef NULL
12908#define NULL (void*)0
12909#endif
12910
12911static void *task(p)
12912	void *p;
12913{
12914	return (void *) (p == NULL);
12915}
12916
12917
12918int main(argc, argv)
12919	int argc;
12920	char **argv;
12921{
12922
12923	/* pthread test function */
12924#ifndef PTHREAD_CREATE_DETACHED
12925#define	PTHREAD_CREATE_DETACHED	1
12926#endif
12927	pthread_t t;
12928	int status;
12929	int detach = PTHREAD_CREATE_DETACHED;
12930
12931#if HAVE_PTHREADS > 4
12932	/* Final pthreads */
12933	pthread_attr_t attr;
12934
12935	status = pthread_attr_init(&attr);
12936	if( status ) return status;
12937
12938#if HAVE_PTHREADS < 7
12939	status = pthread_attr_setdetachstate(&attr, &detach);
12940	if( status < 0 ) status = errno;
12941#else
12942	status = pthread_attr_setdetachstate(&attr, detach);
12943#endif
12944	if( status ) return status;
12945	status = pthread_create( &t, &attr, task, NULL );
12946#if HAVE_PTHREADS < 7
12947	if( status < 0 ) status = errno;
12948#endif
12949	if( status ) return status;
12950#else
12951	/* Draft 4 pthreads */
12952	status = pthread_create( &t, pthread_attr_default, task, NULL );
12953	if( status ) return errno;
12954
12955	/* give thread a chance to complete */
12956	/* it should remain joinable and hence detachable */
12957	sleep( 1 );
12958
12959	status = pthread_detach( &t );
12960	if( status ) return errno;
12961#endif
12962
12963#ifdef HAVE_LINUX_THREADS
12964	pthread_kill_other_threads_np();
12965#endif
12966
12967	return 0;
12968
12969}
12970
12971_ACEOF
12972if ac_fn_c_try_run "$LINENO"
12973then :
12974  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
12975else $as_nop
12976  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
12977fi
12978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12979  conftest.$ac_objext conftest.beam conftest.$ac_ext
12980fi
12981
12982
12983		# restore the LIBS
12984		LIBS="$ol_LIBS"
12985
12986fi
12987{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
12988printf "%s\n" "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
12989
12990	if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
12991		ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
12992		ol_link_threads=posix
12993	fi
12994fi
12995
12996		# Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
12997if test "$ol_link_threads" = no ; then
12998	# try -lpthreads -lmach -lexc
12999	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
13000printf %s "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
13001if test ${ol_cv_pthread_lpthreads_lmach_lexc+y}
13002then :
13003  printf %s "(cached) " >&6
13004else $as_nop
13005
13006		# save the flags
13007		ol_LIBS="$LIBS"
13008		LIBS="-lpthreads -lmach -lexc $LIBS"
13009
13010		if test "$cross_compiling" = yes
13011then :
13012  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13013/* end confdefs.h.  */
13014
13015/* pthread test headers */
13016#include <pthread.h>
13017#if HAVE_PTHREADS < 7
13018#include <errno.h>
13019#endif
13020#ifndef NULL
13021#define NULL (void*)0
13022#endif
13023
13024static void *task(p)
13025	void *p;
13026{
13027	return (void *) (p == NULL);
13028}
13029
13030int
13031main (void)
13032{
13033
13034	/* pthread test function */
13035#ifndef PTHREAD_CREATE_DETACHED
13036#define	PTHREAD_CREATE_DETACHED	1
13037#endif
13038	pthread_t t;
13039	int status;
13040	int detach = PTHREAD_CREATE_DETACHED;
13041
13042#if HAVE_PTHREADS > 4
13043	/* Final pthreads */
13044	pthread_attr_t attr;
13045
13046	status = pthread_attr_init(&attr);
13047	if( status ) return status;
13048
13049#if HAVE_PTHREADS < 7
13050	status = pthread_attr_setdetachstate(&attr, &detach);
13051	if( status < 0 ) status = errno;
13052#else
13053	status = pthread_attr_setdetachstate(&attr, detach);
13054#endif
13055	if( status ) return status;
13056	status = pthread_create( &t, &attr, task, NULL );
13057#if HAVE_PTHREADS < 7
13058	if( status < 0 ) status = errno;
13059#endif
13060	if( status ) return status;
13061#else
13062	/* Draft 4 pthreads */
13063	status = pthread_create( &t, pthread_attr_default, task, NULL );
13064	if( status ) return errno;
13065
13066	/* give thread a chance to complete */
13067	/* it should remain joinable and hence detachable */
13068	sleep( 1 );
13069
13070	status = pthread_detach( &t );
13071	if( status ) return errno;
13072#endif
13073
13074#ifdef HAVE_LINUX_THREADS
13075	pthread_kill_other_threads_np();
13076#endif
13077
13078	return 0;
13079
13080  ;
13081  return 0;
13082}
13083_ACEOF
13084if ac_fn_c_try_link "$LINENO"
13085then :
13086  ol_cv_pthread_lpthreads_lmach_lexc=yes
13087else $as_nop
13088  ol_cv_pthread_lpthreads_lmach_lexc=no
13089fi
13090rm -f core conftest.err conftest.$ac_objext conftest.beam \
13091    conftest$ac_exeext conftest.$ac_ext
13092else $as_nop
13093  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13094/* end confdefs.h.  */
13095
13096
13097/* pthread test headers */
13098#include <pthread.h>
13099#if HAVE_PTHREADS < 7
13100#include <errno.h>
13101#endif
13102#ifndef NULL
13103#define NULL (void*)0
13104#endif
13105
13106static void *task(p)
13107	void *p;
13108{
13109	return (void *) (p == NULL);
13110}
13111
13112
13113int main(argc, argv)
13114	int argc;
13115	char **argv;
13116{
13117
13118	/* pthread test function */
13119#ifndef PTHREAD_CREATE_DETACHED
13120#define	PTHREAD_CREATE_DETACHED	1
13121#endif
13122	pthread_t t;
13123	int status;
13124	int detach = PTHREAD_CREATE_DETACHED;
13125
13126#if HAVE_PTHREADS > 4
13127	/* Final pthreads */
13128	pthread_attr_t attr;
13129
13130	status = pthread_attr_init(&attr);
13131	if( status ) return status;
13132
13133#if HAVE_PTHREADS < 7
13134	status = pthread_attr_setdetachstate(&attr, &detach);
13135	if( status < 0 ) status = errno;
13136#else
13137	status = pthread_attr_setdetachstate(&attr, detach);
13138#endif
13139	if( status ) return status;
13140	status = pthread_create( &t, &attr, task, NULL );
13141#if HAVE_PTHREADS < 7
13142	if( status < 0 ) status = errno;
13143#endif
13144	if( status ) return status;
13145#else
13146	/* Draft 4 pthreads */
13147	status = pthread_create( &t, pthread_attr_default, task, NULL );
13148	if( status ) return errno;
13149
13150	/* give thread a chance to complete */
13151	/* it should remain joinable and hence detachable */
13152	sleep( 1 );
13153
13154	status = pthread_detach( &t );
13155	if( status ) return errno;
13156#endif
13157
13158#ifdef HAVE_LINUX_THREADS
13159	pthread_kill_other_threads_np();
13160#endif
13161
13162	return 0;
13163
13164}
13165
13166_ACEOF
13167if ac_fn_c_try_run "$LINENO"
13168then :
13169  ol_cv_pthread_lpthreads_lmach_lexc=yes
13170else $as_nop
13171  ol_cv_pthread_lpthreads_lmach_lexc=no
13172fi
13173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13174  conftest.$ac_objext conftest.beam conftest.$ac_ext
13175fi
13176
13177
13178		# restore the LIBS
13179		LIBS="$ol_LIBS"
13180
13181fi
13182{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
13183printf "%s\n" "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
13184
13185	if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
13186		ol_link_pthreads="-lpthreads -lmach -lexc"
13187		ol_link_threads=posix
13188	fi
13189fi
13190
13191		# Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
13192if test "$ol_link_threads" = no ; then
13193	# try -lpthreads -lexc
13194	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
13195printf %s "checking for pthread link with -lpthreads -lexc... " >&6; }
13196if test ${ol_cv_pthread_lpthreads_lexc+y}
13197then :
13198  printf %s "(cached) " >&6
13199else $as_nop
13200
13201		# save the flags
13202		ol_LIBS="$LIBS"
13203		LIBS="-lpthreads -lexc $LIBS"
13204
13205		if test "$cross_compiling" = yes
13206then :
13207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13208/* end confdefs.h.  */
13209
13210/* pthread test headers */
13211#include <pthread.h>
13212#if HAVE_PTHREADS < 7
13213#include <errno.h>
13214#endif
13215#ifndef NULL
13216#define NULL (void*)0
13217#endif
13218
13219static void *task(p)
13220	void *p;
13221{
13222	return (void *) (p == NULL);
13223}
13224
13225int
13226main (void)
13227{
13228
13229	/* pthread test function */
13230#ifndef PTHREAD_CREATE_DETACHED
13231#define	PTHREAD_CREATE_DETACHED	1
13232#endif
13233	pthread_t t;
13234	int status;
13235	int detach = PTHREAD_CREATE_DETACHED;
13236
13237#if HAVE_PTHREADS > 4
13238	/* Final pthreads */
13239	pthread_attr_t attr;
13240
13241	status = pthread_attr_init(&attr);
13242	if( status ) return status;
13243
13244#if HAVE_PTHREADS < 7
13245	status = pthread_attr_setdetachstate(&attr, &detach);
13246	if( status < 0 ) status = errno;
13247#else
13248	status = pthread_attr_setdetachstate(&attr, detach);
13249#endif
13250	if( status ) return status;
13251	status = pthread_create( &t, &attr, task, NULL );
13252#if HAVE_PTHREADS < 7
13253	if( status < 0 ) status = errno;
13254#endif
13255	if( status ) return status;
13256#else
13257	/* Draft 4 pthreads */
13258	status = pthread_create( &t, pthread_attr_default, task, NULL );
13259	if( status ) return errno;
13260
13261	/* give thread a chance to complete */
13262	/* it should remain joinable and hence detachable */
13263	sleep( 1 );
13264
13265	status = pthread_detach( &t );
13266	if( status ) return errno;
13267#endif
13268
13269#ifdef HAVE_LINUX_THREADS
13270	pthread_kill_other_threads_np();
13271#endif
13272
13273	return 0;
13274
13275  ;
13276  return 0;
13277}
13278_ACEOF
13279if ac_fn_c_try_link "$LINENO"
13280then :
13281  ol_cv_pthread_lpthreads_lexc=yes
13282else $as_nop
13283  ol_cv_pthread_lpthreads_lexc=no
13284fi
13285rm -f core conftest.err conftest.$ac_objext conftest.beam \
13286    conftest$ac_exeext conftest.$ac_ext
13287else $as_nop
13288  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13289/* end confdefs.h.  */
13290
13291
13292/* pthread test headers */
13293#include <pthread.h>
13294#if HAVE_PTHREADS < 7
13295#include <errno.h>
13296#endif
13297#ifndef NULL
13298#define NULL (void*)0
13299#endif
13300
13301static void *task(p)
13302	void *p;
13303{
13304	return (void *) (p == NULL);
13305}
13306
13307
13308int main(argc, argv)
13309	int argc;
13310	char **argv;
13311{
13312
13313	/* pthread test function */
13314#ifndef PTHREAD_CREATE_DETACHED
13315#define	PTHREAD_CREATE_DETACHED	1
13316#endif
13317	pthread_t t;
13318	int status;
13319	int detach = PTHREAD_CREATE_DETACHED;
13320
13321#if HAVE_PTHREADS > 4
13322	/* Final pthreads */
13323	pthread_attr_t attr;
13324
13325	status = pthread_attr_init(&attr);
13326	if( status ) return status;
13327
13328#if HAVE_PTHREADS < 7
13329	status = pthread_attr_setdetachstate(&attr, &detach);
13330	if( status < 0 ) status = errno;
13331#else
13332	status = pthread_attr_setdetachstate(&attr, detach);
13333#endif
13334	if( status ) return status;
13335	status = pthread_create( &t, &attr, task, NULL );
13336#if HAVE_PTHREADS < 7
13337	if( status < 0 ) status = errno;
13338#endif
13339	if( status ) return status;
13340#else
13341	/* Draft 4 pthreads */
13342	status = pthread_create( &t, pthread_attr_default, task, NULL );
13343	if( status ) return errno;
13344
13345	/* give thread a chance to complete */
13346	/* it should remain joinable and hence detachable */
13347	sleep( 1 );
13348
13349	status = pthread_detach( &t );
13350	if( status ) return errno;
13351#endif
13352
13353#ifdef HAVE_LINUX_THREADS
13354	pthread_kill_other_threads_np();
13355#endif
13356
13357	return 0;
13358
13359}
13360
13361_ACEOF
13362if ac_fn_c_try_run "$LINENO"
13363then :
13364  ol_cv_pthread_lpthreads_lexc=yes
13365else $as_nop
13366  ol_cv_pthread_lpthreads_lexc=no
13367fi
13368rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13369  conftest.$ac_objext conftest.beam conftest.$ac_ext
13370fi
13371
13372
13373		# restore the LIBS
13374		LIBS="$ol_LIBS"
13375
13376fi
13377{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
13378printf "%s\n" "$ol_cv_pthread_lpthreads_lexc" >&6; }
13379
13380	if test $ol_cv_pthread_lpthreads_lexc = yes ; then
13381		ol_link_pthreads="-lpthreads -lexc"
13382		ol_link_threads=posix
13383	fi
13384fi
13385
13386
13387		# Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
13388if test "$ol_link_threads" = no ; then
13389	# try -lpthreads
13390	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
13391printf %s "checking for pthread link with -lpthreads... " >&6; }
13392if test ${ol_cv_pthread_lib_lpthreads+y}
13393then :
13394  printf %s "(cached) " >&6
13395else $as_nop
13396
13397		# save the flags
13398		ol_LIBS="$LIBS"
13399		LIBS="-lpthreads $LIBS"
13400
13401		if test "$cross_compiling" = yes
13402then :
13403  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13404/* end confdefs.h.  */
13405
13406/* pthread test headers */
13407#include <pthread.h>
13408#if HAVE_PTHREADS < 7
13409#include <errno.h>
13410#endif
13411#ifndef NULL
13412#define NULL (void*)0
13413#endif
13414
13415static void *task(p)
13416	void *p;
13417{
13418	return (void *) (p == NULL);
13419}
13420
13421int
13422main (void)
13423{
13424
13425	/* pthread test function */
13426#ifndef PTHREAD_CREATE_DETACHED
13427#define	PTHREAD_CREATE_DETACHED	1
13428#endif
13429	pthread_t t;
13430	int status;
13431	int detach = PTHREAD_CREATE_DETACHED;
13432
13433#if HAVE_PTHREADS > 4
13434	/* Final pthreads */
13435	pthread_attr_t attr;
13436
13437	status = pthread_attr_init(&attr);
13438	if( status ) return status;
13439
13440#if HAVE_PTHREADS < 7
13441	status = pthread_attr_setdetachstate(&attr, &detach);
13442	if( status < 0 ) status = errno;
13443#else
13444	status = pthread_attr_setdetachstate(&attr, detach);
13445#endif
13446	if( status ) return status;
13447	status = pthread_create( &t, &attr, task, NULL );
13448#if HAVE_PTHREADS < 7
13449	if( status < 0 ) status = errno;
13450#endif
13451	if( status ) return status;
13452#else
13453	/* Draft 4 pthreads */
13454	status = pthread_create( &t, pthread_attr_default, task, NULL );
13455	if( status ) return errno;
13456
13457	/* give thread a chance to complete */
13458	/* it should remain joinable and hence detachable */
13459	sleep( 1 );
13460
13461	status = pthread_detach( &t );
13462	if( status ) return errno;
13463#endif
13464
13465#ifdef HAVE_LINUX_THREADS
13466	pthread_kill_other_threads_np();
13467#endif
13468
13469	return 0;
13470
13471  ;
13472  return 0;
13473}
13474_ACEOF
13475if ac_fn_c_try_link "$LINENO"
13476then :
13477  ol_cv_pthread_lib_lpthreads=yes
13478else $as_nop
13479  ol_cv_pthread_lib_lpthreads=no
13480fi
13481rm -f core conftest.err conftest.$ac_objext conftest.beam \
13482    conftest$ac_exeext conftest.$ac_ext
13483else $as_nop
13484  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13485/* end confdefs.h.  */
13486
13487
13488/* pthread test headers */
13489#include <pthread.h>
13490#if HAVE_PTHREADS < 7
13491#include <errno.h>
13492#endif
13493#ifndef NULL
13494#define NULL (void*)0
13495#endif
13496
13497static void *task(p)
13498	void *p;
13499{
13500	return (void *) (p == NULL);
13501}
13502
13503
13504int main(argc, argv)
13505	int argc;
13506	char **argv;
13507{
13508
13509	/* pthread test function */
13510#ifndef PTHREAD_CREATE_DETACHED
13511#define	PTHREAD_CREATE_DETACHED	1
13512#endif
13513	pthread_t t;
13514	int status;
13515	int detach = PTHREAD_CREATE_DETACHED;
13516
13517#if HAVE_PTHREADS > 4
13518	/* Final pthreads */
13519	pthread_attr_t attr;
13520
13521	status = pthread_attr_init(&attr);
13522	if( status ) return status;
13523
13524#if HAVE_PTHREADS < 7
13525	status = pthread_attr_setdetachstate(&attr, &detach);
13526	if( status < 0 ) status = errno;
13527#else
13528	status = pthread_attr_setdetachstate(&attr, detach);
13529#endif
13530	if( status ) return status;
13531	status = pthread_create( &t, &attr, task, NULL );
13532#if HAVE_PTHREADS < 7
13533	if( status < 0 ) status = errno;
13534#endif
13535	if( status ) return status;
13536#else
13537	/* Draft 4 pthreads */
13538	status = pthread_create( &t, pthread_attr_default, task, NULL );
13539	if( status ) return errno;
13540
13541	/* give thread a chance to complete */
13542	/* it should remain joinable and hence detachable */
13543	sleep( 1 );
13544
13545	status = pthread_detach( &t );
13546	if( status ) return errno;
13547#endif
13548
13549#ifdef HAVE_LINUX_THREADS
13550	pthread_kill_other_threads_np();
13551#endif
13552
13553	return 0;
13554
13555}
13556
13557_ACEOF
13558if ac_fn_c_try_run "$LINENO"
13559then :
13560  ol_cv_pthread_lib_lpthreads=yes
13561else $as_nop
13562  ol_cv_pthread_lib_lpthreads=no
13563fi
13564rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13565  conftest.$ac_objext conftest.beam conftest.$ac_ext
13566fi
13567
13568
13569		# restore the LIBS
13570		LIBS="$ol_LIBS"
13571
13572fi
13573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
13574printf "%s\n" "$ol_cv_pthread_lib_lpthreads" >&6; }
13575
13576	if test $ol_cv_pthread_lib_lpthreads = yes ; then
13577		ol_link_pthreads="-lpthreads"
13578		ol_link_threads=posix
13579	fi
13580fi
13581
13582
13583{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
13584printf "%s\n" "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
13585
13586		if test $ol_link_threads != no ; then
13587			LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
13588
13589						save_CPPFLAGS="$CPPFLAGS"
13590			save_LIBS="$LIBS"
13591			LIBS="$LTHREAD_LIBS $LIBS"
13592
13593												ac_fn_c_check_func "$LINENO" "sched_yield" "ac_cv_func_sched_yield"
13594if test "x$ac_cv_func_sched_yield" = xyes
13595then :
13596  printf "%s\n" "#define HAVE_SCHED_YIELD 1" >>confdefs.h
13597
13598fi
13599ac_fn_c_check_func "$LINENO" "pthread_yield" "ac_cv_func_pthread_yield"
13600if test "x$ac_cv_func_pthread_yield" = xyes
13601then :
13602  printf "%s\n" "#define HAVE_PTHREAD_YIELD 1" >>confdefs.h
13603
13604fi
13605ac_fn_c_check_func "$LINENO" "thr_yield" "ac_cv_func_thr_yield"
13606if test "x$ac_cv_func_thr_yield" = xyes
13607then :
13608  printf "%s\n" "#define HAVE_THR_YIELD 1" >>confdefs.h
13609
13610fi
13611
13612
13613			if test $ac_cv_func_sched_yield = no &&
13614			   test $ac_cv_func_pthread_yield = no &&
13615			   test $ac_cv_func_thr_yield = no ; then
13616								{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
13617printf %s "checking for sched_yield in -lrt... " >&6; }
13618if test ${ac_cv_lib_rt_sched_yield+y}
13619then :
13620  printf %s "(cached) " >&6
13621else $as_nop
13622  ac_check_lib_save_LIBS=$LIBS
13623LIBS="-lrt  $LIBS"
13624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13625/* end confdefs.h.  */
13626
13627/* Override any GCC internal prototype to avoid an error.
13628   Use char because int might match the return type of a GCC
13629   builtin and then its argument prototype would still apply.  */
13630char sched_yield ();
13631int
13632main (void)
13633{
13634return sched_yield ();
13635  ;
13636  return 0;
13637}
13638_ACEOF
13639if ac_fn_c_try_link "$LINENO"
13640then :
13641  ac_cv_lib_rt_sched_yield=yes
13642else $as_nop
13643  ac_cv_lib_rt_sched_yield=no
13644fi
13645rm -f core conftest.err conftest.$ac_objext conftest.beam \
13646    conftest$ac_exeext conftest.$ac_ext
13647LIBS=$ac_check_lib_save_LIBS
13648fi
13649{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
13650printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
13651if test "x$ac_cv_lib_rt_sched_yield" = xyes
13652then :
13653  LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
13654
13655printf "%s\n" "#define HAVE_SCHED_YIELD 1" >>confdefs.h
13656
13657					ac_cv_func_sched_yield=yes
13658else $as_nop
13659  ac_cv_func_sched_yield=no
13660fi
13661
13662			fi
13663			if test $ac_cv_func_sched_yield = no &&
13664			   test $ac_cv_func_pthread_yield = no &&
13665			   test "$ac_cv_func_thr_yield" = no ; then
13666				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
13667printf "%s\n" "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
13668			fi
13669
13670						ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
13671if test "x$ac_cv_func_pthread_kill" = xyes
13672then :
13673  printf "%s\n" "#define HAVE_PTHREAD_KILL 1" >>confdefs.h
13674
13675fi
13676
13677
13678									{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
13679printf %s "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
13680if test ${ol_cv_func_pthread_rwlock_destroy+y}
13681then :
13682  printf %s "(cached) " >&6
13683else $as_nop
13684
13685								cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13686/* end confdefs.h.  */
13687
13688#include <pthread.h>
13689pthread_rwlock_t rwlock;
13690
13691int
13692main (void)
13693{
13694pthread_rwlock_destroy(&rwlock);
13695  ;
13696  return 0;
13697}
13698_ACEOF
13699if ac_fn_c_try_link "$LINENO"
13700then :
13701  ol_cv_func_pthread_rwlock_destroy=yes
13702else $as_nop
13703  ol_cv_func_pthread_rwlock_destroy=no
13704fi
13705rm -f core conftest.err conftest.$ac_objext conftest.beam \
13706    conftest$ac_exeext conftest.$ac_ext
13707
13708fi
13709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
13710printf "%s\n" "$ol_cv_func_pthread_rwlock_destroy" >&6; }
13711			if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
13712
13713printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
13714
13715			fi
13716
13717									{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
13718printf %s "checking for pthread_detach with <pthread.h>... " >&6; }
13719if test ${ol_cv_func_pthread_detach+y}
13720then :
13721  printf %s "(cached) " >&6
13722else $as_nop
13723
13724								cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13725/* end confdefs.h.  */
13726
13727#include <pthread.h>
13728#ifndef NULL
13729#define NULL (void*)0
13730#endif
13731
13732int
13733main (void)
13734{
13735pthread_detach(NULL);
13736  ;
13737  return 0;
13738}
13739_ACEOF
13740if ac_fn_c_try_link "$LINENO"
13741then :
13742  ol_cv_func_pthread_detach=yes
13743else $as_nop
13744  ol_cv_func_pthread_detach=no
13745fi
13746rm -f core conftest.err conftest.$ac_objext conftest.beam \
13747    conftest$ac_exeext conftest.$ac_ext
13748
13749fi
13750{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
13751printf "%s\n" "$ol_cv_func_pthread_detach" >&6; }
13752
13753			if test $ol_cv_func_pthread_detach = no ; then
13754				as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
13755			fi
13756
13757
13758printf "%s\n" "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
13759
13760
13761						ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
13762if test "x$ac_cv_func_pthread_setconcurrency" = xyes
13763then :
13764  printf "%s\n" "#define HAVE_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
13765
13766fi
13767ac_fn_c_check_func "$LINENO" "pthread_getconcurrency" "ac_cv_func_pthread_getconcurrency"
13768if test "x$ac_cv_func_pthread_getconcurrency" = xyes
13769then :
13770  printf "%s\n" "#define HAVE_PTHREAD_GETCONCURRENCY 1" >>confdefs.h
13771
13772fi
13773ac_fn_c_check_func "$LINENO" "thr_setconcurrency" "ac_cv_func_thr_setconcurrency"
13774if test "x$ac_cv_func_thr_setconcurrency" = xyes
13775then :
13776  printf "%s\n" "#define HAVE_THR_SETCONCURRENCY 1" >>confdefs.h
13777
13778fi
13779ac_fn_c_check_func "$LINENO" "thr_getconcurrency" "ac_cv_func_thr_getconcurrency"
13780if test "x$ac_cv_func_thr_getconcurrency" = xyes
13781then :
13782  printf "%s\n" "#define HAVE_THR_GETCONCURRENCY 1" >>confdefs.h
13783
13784fi
13785
13786
13787
13788	ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
13789if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes
13790then :
13791  printf "%s\n" "#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1" >>confdefs.h
13792
13793fi
13794
13795	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
13796printf %s "checking for LinuxThreads implementation... " >&6; }
13797if test ${ol_cv_sys_linux_threads+y}
13798then :
13799  printf %s "(cached) " >&6
13800else $as_nop
13801  ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
13802fi
13803{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
13804printf "%s\n" "$ol_cv_sys_linux_threads" >&6; }
13805
13806
13807
13808
13809	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
13810printf %s "checking for LinuxThreads consistency... " >&6; }
13811if test ${ol_cv_linux_threads+y}
13812then :
13813  printf %s "(cached) " >&6
13814else $as_nop
13815
13816		if test $ol_cv_header_linux_threads = yes &&
13817		   test $ol_cv_sys_linux_threads = yes; then
13818			ol_cv_linux_threads=yes
13819		elif test $ol_cv_header_linux_threads = no &&
13820		     test $ol_cv_sys_linux_threads = no; then
13821			ol_cv_linux_threads=no
13822		else
13823			ol_cv_linux_threads=error
13824		fi
13825
13826fi
13827{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
13828printf "%s\n" "$ol_cv_linux_threads" >&6; }
13829
13830
13831			if test $ol_cv_linux_threads = error; then
13832				as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
13833			fi
13834
13835			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
13836printf %s "checking if pthread_create() works... " >&6; }
13837if test ${ol_cv_pthread_create_works+y}
13838then :
13839  printf %s "(cached) " >&6
13840else $as_nop
13841
13842			if test "$cross_compiling" = yes
13843then :
13844  				ol_cv_pthread_create_works=yes
13845else $as_nop
13846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13847/* end confdefs.h.  */
13848
13849
13850/* pthread test headers */
13851#include <pthread.h>
13852#if HAVE_PTHREADS < 7
13853#include <errno.h>
13854#endif
13855#ifndef NULL
13856#define NULL (void*)0
13857#endif
13858
13859static void *task(p)
13860	void *p;
13861{
13862	return (void *) (p == NULL);
13863}
13864
13865
13866int main(argc, argv)
13867	int argc;
13868	char **argv;
13869{
13870
13871	/* pthread test function */
13872#ifndef PTHREAD_CREATE_DETACHED
13873#define	PTHREAD_CREATE_DETACHED	1
13874#endif
13875	pthread_t t;
13876	int status;
13877	int detach = PTHREAD_CREATE_DETACHED;
13878
13879#if HAVE_PTHREADS > 4
13880	/* Final pthreads */
13881	pthread_attr_t attr;
13882
13883	status = pthread_attr_init(&attr);
13884	if( status ) return status;
13885
13886#if HAVE_PTHREADS < 7
13887	status = pthread_attr_setdetachstate(&attr, &detach);
13888	if( status < 0 ) status = errno;
13889#else
13890	status = pthread_attr_setdetachstate(&attr, detach);
13891#endif
13892	if( status ) return status;
13893	status = pthread_create( &t, &attr, task, NULL );
13894#if HAVE_PTHREADS < 7
13895	if( status < 0 ) status = errno;
13896#endif
13897	if( status ) return status;
13898#else
13899	/* Draft 4 pthreads */
13900	status = pthread_create( &t, pthread_attr_default, task, NULL );
13901	if( status ) return errno;
13902
13903	/* give thread a chance to complete */
13904	/* it should remain joinable and hence detachable */
13905	sleep( 1 );
13906
13907	status = pthread_detach( &t );
13908	if( status ) return errno;
13909#endif
13910
13911#ifdef HAVE_LINUX_THREADS
13912	pthread_kill_other_threads_np();
13913#endif
13914
13915	return 0;
13916
13917}
13918
13919_ACEOF
13920if ac_fn_c_try_run "$LINENO"
13921then :
13922  ol_cv_pthread_create_works=yes
13923else $as_nop
13924  ol_cv_pthread_create_works=no
13925fi
13926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13927  conftest.$ac_objext conftest.beam conftest.$ac_ext
13928fi
13929
13930fi
13931{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
13932printf "%s\n" "$ol_cv_pthread_create_works" >&6; }
13933
13934			if test $ol_cv_pthread_create_works = no ; then
13935				as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
13936			fi
13937
13938			ol_replace_broken_yield=no
13939
13940			if test $ol_replace_broken_yield = yes ; then
13941
13942printf "%s\n" "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
13943
13944			fi
13945
13946						if test x$ol_with_yielding_select = xauto ; then
13947				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
13948printf %s "checking if select yields when using pthreads... " >&6; }
13949if test ${ol_cv_pthread_select_yields+y}
13950then :
13951  printf %s "(cached) " >&6
13952else $as_nop
13953
13954				if test "$cross_compiling" = yes
13955then :
13956  ol_cv_pthread_select_yields=cross
13957else $as_nop
13958  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13959/* end confdefs.h.  */
13960
13961#include <sys/types.h>
13962#include <sys/time.h>
13963#include <unistd.h>
13964#include <pthread.h>
13965#ifndef NULL
13966#define NULL (void*) 0
13967#endif
13968
13969static int fildes[2];
13970
13971static void *task(p)
13972	void *p;
13973{
13974	int i;
13975	struct timeval tv;
13976
13977	fd_set rfds;
13978
13979	tv.tv_sec=10;
13980	tv.tv_usec=0;
13981
13982	FD_ZERO(&rfds);
13983	FD_SET(fildes[0], &rfds);
13984
13985	/* we're not interested in any fds */
13986	i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
13987
13988	if(i < 0) {
13989		perror("select");
13990		exit(10);
13991	}
13992
13993	exit(0); /* if we exit here, the select blocked the whole process */
13994}
13995
13996int main(argc, argv)
13997	int argc;
13998	char **argv;
13999{
14000	pthread_t t;
14001
14002	/* create a pipe to select */
14003	if(pipe(&fildes[0])) {
14004		perror("select");
14005		exit(1);
14006	}
14007
14008#ifdef HAVE_PTHREAD_SETCONCURRENCY
14009	(void) pthread_setconcurrency(2);
14010#else
14011#ifdef HAVE_THR_SETCONCURRENCY
14012	/* Set Solaris LWP concurrency to 2 */
14013	thr_setconcurrency(2);
14014#endif
14015#endif
14016
14017#if HAVE_PTHREADS < 6
14018	pthread_create(&t, pthread_attr_default, task, NULL);
14019#else
14020	pthread_create(&t, NULL, task, NULL);
14021#endif
14022
14023	/* make sure task runs first */
14024#ifdef HAVE_THR_YIELD
14025	thr_yield();
14026#elif defined( HAVE_SCHED_YIELD )
14027	sched_yield();
14028#elif defined( HAVE_PTHREAD_YIELD )
14029	pthread_yield();
14030#endif
14031
14032	exit(2);
14033}
14034_ACEOF
14035if ac_fn_c_try_run "$LINENO"
14036then :
14037  ol_cv_pthread_select_yields=no
14038else $as_nop
14039  ol_cv_pthread_select_yields=yes
14040fi
14041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14042  conftest.$ac_objext conftest.beam conftest.$ac_ext
14043fi
14044
14045fi
14046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
14047printf "%s\n" "$ol_cv_pthread_select_yields" >&6; }
14048
14049				if test $ol_cv_pthread_select_yields = cross ; then
14050					as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
14051				fi
14052
14053				if test $ol_cv_pthread_select_yields = yes ; then
14054					ol_with_yielding_select=yes
14055				fi
14056			fi
14057
14058						CPPFLAGS="$save_CPPFLAGS"
14059			LIBS="$save_LIBS"
14060		else
14061			as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
14062		fi
14063	fi
14064
14065	if test $ol_with_threads = posix ; then
14066		as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
14067	fi
14068	;;
14069esac
14070
14071case $ol_with_threads in auto | yes | mach)
14072
14073		ac_fn_c_check_header_compile "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
14074if test "x$ac_cv_header_mach_cthreads_h" = xyes
14075then :
14076  printf "%s\n" "#define HAVE_MACH_CTHREADS_H 1" >>confdefs.h
14077
14078fi
14079ac_fn_c_check_header_compile "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
14080if test "x$ac_cv_header_cthreads_h" = xyes
14081then :
14082  printf "%s\n" "#define HAVE_CTHREADS_H 1" >>confdefs.h
14083
14084fi
14085
14086	if test $ac_cv_header_mach_cthreads_h = yes ; then
14087		ol_with_threads=found
14088
14089				ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
14090if test "x$ac_cv_func_cthread_fork" = xyes
14091then :
14092  ol_link_threads=yes
14093fi
14094
14095
14096		if test $ol_link_threads = no ; then
14097									{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
14098printf %s "checking for cthread_fork with -all_load... " >&6; }
14099if test ${ol_cv_cthread_all_load+y}
14100then :
14101  printf %s "(cached) " >&6
14102else $as_nop
14103
14104								save_LIBS="$LIBS"
14105				LIBS="-all_load $LIBS"
14106				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14107/* end confdefs.h.  */
14108#include <mach/cthreads.h>
14109int
14110main (void)
14111{
14112
14113					cthread_fork((void *)0, (void *)0);
14114
14115  ;
14116  return 0;
14117}
14118_ACEOF
14119if ac_fn_c_try_link "$LINENO"
14120then :
14121  ol_cv_cthread_all_load=yes
14122else $as_nop
14123  ol_cv_cthread_all_load=no
14124fi
14125rm -f core conftest.err conftest.$ac_objext conftest.beam \
14126    conftest$ac_exeext conftest.$ac_ext
14127								LIBS="$save_LIBS"
14128
14129fi
14130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
14131printf "%s\n" "$ol_cv_cthread_all_load" >&6; }
14132
14133			if test $ol_cv_cthread_all_load = yes ; then
14134				LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
14135				ol_link_threads=mach
14136				ol_with_threads=found
14137			fi
14138		fi
14139
14140	elif test $ac_cv_header_cthreads_h = yes ; then
14141
14142		ol_with_threads=found
14143
14144				save_LIBS="$LIBS"
14145		LIBS="$LIBS -lthreads"
14146		ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
14147if test "x$ac_cv_func_cthread_fork" = xyes
14148then :
14149  ol_link_threads=yes
14150fi
14151
14152		LIBS="$save_LIBS"
14153
14154		if test $ol_link_threads = yes ; then
14155			LTHREAD_LIBS="-lthreads"
14156			ol_link_threads=mach
14157			ol_with_threads=found
14158		else
14159			as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
14160		fi
14161
14162	elif test $ol_with_threads = mach ; then
14163		as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
14164	fi
14165
14166	if test $ol_link_threads = mach ; then
14167
14168printf "%s\n" "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
14169
14170	elif test $ol_with_threads = found ; then
14171		as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
14172	fi
14173	;;
14174esac
14175
14176case $ol_with_threads in auto | yes | pth)
14177
14178	ac_fn_c_check_header_compile "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
14179if test "x$ac_cv_header_pth_h" = xyes
14180then :
14181  printf "%s\n" "#define HAVE_PTH_H 1" >>confdefs.h
14182
14183fi
14184
14185
14186	if test $ac_cv_header_pth_h = yes ; then
14187		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
14188printf %s "checking for pth_version in -lpth... " >&6; }
14189if test ${ac_cv_lib_pth_pth_version+y}
14190then :
14191  printf %s "(cached) " >&6
14192else $as_nop
14193  ac_check_lib_save_LIBS=$LIBS
14194LIBS="-lpth  $LIBS"
14195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14196/* end confdefs.h.  */
14197
14198/* Override any GCC internal prototype to avoid an error.
14199   Use char because int might match the return type of a GCC
14200   builtin and then its argument prototype would still apply.  */
14201char pth_version ();
14202int
14203main (void)
14204{
14205return pth_version ();
14206  ;
14207  return 0;
14208}
14209_ACEOF
14210if ac_fn_c_try_link "$LINENO"
14211then :
14212  ac_cv_lib_pth_pth_version=yes
14213else $as_nop
14214  ac_cv_lib_pth_pth_version=no
14215fi
14216rm -f core conftest.err conftest.$ac_objext conftest.beam \
14217    conftest$ac_exeext conftest.$ac_ext
14218LIBS=$ac_check_lib_save_LIBS
14219fi
14220{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
14221printf "%s\n" "$ac_cv_lib_pth_pth_version" >&6; }
14222if test "x$ac_cv_lib_pth_pth_version" = xyes
14223then :
14224  have_pth=yes
14225else $as_nop
14226  have_pth=no
14227fi
14228
14229
14230		if test $have_pth = yes ; then
14231
14232printf "%s\n" "#define HAVE_GNU_PTH 1" >>confdefs.h
14233
14234			LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
14235			ol_link_threads=pth
14236			ol_with_threads=found
14237
14238			if test x$ol_with_yielding_select = xauto ; then
14239				ol_with_yielding_select=yes
14240			fi
14241		fi
14242	fi
14243	;;
14244esac
14245
14246case $ol_with_threads in auto | yes | lwp)
14247
14248		ac_fn_c_check_header_compile "$LINENO" "thread.h" "ac_cv_header_thread_h" "$ac_includes_default"
14249if test "x$ac_cv_header_thread_h" = xyes
14250then :
14251  printf "%s\n" "#define HAVE_THREAD_H 1" >>confdefs.h
14252
14253fi
14254ac_fn_c_check_header_compile "$LINENO" "synch.h" "ac_cv_header_synch_h" "$ac_includes_default"
14255if test "x$ac_cv_header_synch_h" = xyes
14256then :
14257  printf "%s\n" "#define HAVE_SYNCH_H 1" >>confdefs.h
14258
14259fi
14260
14261	if test $ac_cv_header_thread_h = yes &&
14262	   test $ac_cv_header_synch_h = yes ; then
14263		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
14264printf %s "checking for thr_create in -lthread... " >&6; }
14265if test ${ac_cv_lib_thread_thr_create+y}
14266then :
14267  printf %s "(cached) " >&6
14268else $as_nop
14269  ac_check_lib_save_LIBS=$LIBS
14270LIBS="-lthread  $LIBS"
14271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14272/* end confdefs.h.  */
14273
14274/* Override any GCC internal prototype to avoid an error.
14275   Use char because int might match the return type of a GCC
14276   builtin and then its argument prototype would still apply.  */
14277char thr_create ();
14278int
14279main (void)
14280{
14281return thr_create ();
14282  ;
14283  return 0;
14284}
14285_ACEOF
14286if ac_fn_c_try_link "$LINENO"
14287then :
14288  ac_cv_lib_thread_thr_create=yes
14289else $as_nop
14290  ac_cv_lib_thread_thr_create=no
14291fi
14292rm -f core conftest.err conftest.$ac_objext conftest.beam \
14293    conftest$ac_exeext conftest.$ac_ext
14294LIBS=$ac_check_lib_save_LIBS
14295fi
14296{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
14297printf "%s\n" "$ac_cv_lib_thread_thr_create" >&6; }
14298if test "x$ac_cv_lib_thread_thr_create" = xyes
14299then :
14300  have_thr=yes
14301else $as_nop
14302  have_thr=no
14303fi
14304
14305
14306		if test $have_thr = yes ; then
14307
14308printf "%s\n" "#define HAVE_THR 1" >>confdefs.h
14309
14310			LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
14311			ol_link_threads=thr
14312
14313			if test x$ol_with_yielding_select = xauto ; then
14314				ol_with_yielding_select=yes
14315			fi
14316
14317						ac_fn_c_check_func "$LINENO" "thr_setconcurrency" "ac_cv_func_thr_setconcurrency"
14318if test "x$ac_cv_func_thr_setconcurrency" = xyes
14319then :
14320  printf "%s\n" "#define HAVE_THR_SETCONCURRENCY 1" >>confdefs.h
14321
14322fi
14323ac_fn_c_check_func "$LINENO" "thr_getconcurrency" "ac_cv_func_thr_getconcurrency"
14324if test "x$ac_cv_func_thr_getconcurrency" = xyes
14325then :
14326  printf "%s\n" "#define HAVE_THR_GETCONCURRENCY 1" >>confdefs.h
14327
14328fi
14329
14330		fi
14331	fi
14332
14333		ac_fn_c_check_header_compile "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
14334if test "x$ac_cv_header_lwp_lwp_h" = xyes
14335then :
14336  printf "%s\n" "#define HAVE_LWP_LWP_H 1" >>confdefs.h
14337
14338fi
14339
14340	if test $ac_cv_header_lwp_lwp_h = yes ; then
14341		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
14342printf %s "checking for lwp_create in -llwp... " >&6; }
14343if test ${ac_cv_lib_lwp_lwp_create+y}
14344then :
14345  printf %s "(cached) " >&6
14346else $as_nop
14347  ac_check_lib_save_LIBS=$LIBS
14348LIBS="-llwp  $LIBS"
14349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14350/* end confdefs.h.  */
14351
14352/* Override any GCC internal prototype to avoid an error.
14353   Use char because int might match the return type of a GCC
14354   builtin and then its argument prototype would still apply.  */
14355char lwp_create ();
14356int
14357main (void)
14358{
14359return lwp_create ();
14360  ;
14361  return 0;
14362}
14363_ACEOF
14364if ac_fn_c_try_link "$LINENO"
14365then :
14366  ac_cv_lib_lwp_lwp_create=yes
14367else $as_nop
14368  ac_cv_lib_lwp_lwp_create=no
14369fi
14370rm -f core conftest.err conftest.$ac_objext conftest.beam \
14371    conftest$ac_exeext conftest.$ac_ext
14372LIBS=$ac_check_lib_save_LIBS
14373fi
14374{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
14375printf "%s\n" "$ac_cv_lib_lwp_lwp_create" >&6; }
14376if test "x$ac_cv_lib_lwp_lwp_create" = xyes
14377then :
14378  have_lwp=yes
14379else $as_nop
14380  have_lwp=no
14381fi
14382
14383
14384		if test $have_lwp = yes ; then
14385
14386printf "%s\n" "#define HAVE_LWP 1" >>confdefs.h
14387
14388			LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
14389			ol_link_threads=lwp
14390
14391			if test x$ol_with_yielding_select = xauto ; then
14392				ol_with_yielding_select=no
14393			fi
14394		fi
14395	fi
14396	;;
14397esac
14398
14399if test $ol_with_yielding_select = yes ; then
14400
14401printf "%s\n" "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
14402
14403fi
14404
14405if test $ol_with_threads = manual ; then
14406		ol_link_threads=yes
14407
14408	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
14409printf "%s\n" "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
14410
14411	ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14412if test "x$ac_cv_header_pthread_h" = xyes
14413then :
14414  printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h
14415
14416fi
14417ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
14418if test "x$ac_cv_header_sched_h" = xyes
14419then :
14420  printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
14421
14422fi
14423
14424	ac_fn_c_check_func "$LINENO" "sched_yield" "ac_cv_func_sched_yield"
14425if test "x$ac_cv_func_sched_yield" = xyes
14426then :
14427  printf "%s\n" "#define HAVE_SCHED_YIELD 1" >>confdefs.h
14428
14429fi
14430ac_fn_c_check_func "$LINENO" "pthread_yield" "ac_cv_func_pthread_yield"
14431if test "x$ac_cv_func_pthread_yield" = xyes
14432then :
14433  printf "%s\n" "#define HAVE_PTHREAD_YIELD 1" >>confdefs.h
14434
14435fi
14436
14437
14438	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
14439printf %s "checking for LinuxThreads pthread.h... " >&6; }
14440if test ${ol_cv_header_linux_threads+y}
14441then :
14442  printf %s "(cached) " >&6
14443else $as_nop
14444  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14445/* end confdefs.h.  */
14446#include <pthread.h>
14447_ACEOF
14448if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14449  $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1
14450then :
14451  ol_cv_header_linux_threads=yes
14452else $as_nop
14453  ol_cv_header_linux_threads=no
14454fi
14455rm -rf conftest*
14456
14457
14458fi
14459{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
14460printf "%s\n" "$ol_cv_header_linux_threads" >&6; }
14461	if test $ol_cv_header_linux_threads = yes; then
14462
14463printf "%s\n" "#define HAVE_LINUX_THREADS 1" >>confdefs.h
14464
14465	fi
14466
14467
14468	ac_fn_c_check_header_compile "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
14469if test "x$ac_cv_header_mach_cthreads_h" = xyes
14470then :
14471  printf "%s\n" "#define HAVE_MACH_CTHREADS_H 1" >>confdefs.h
14472
14473fi
14474
14475	ac_fn_c_check_header_compile "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
14476if test "x$ac_cv_header_lwp_lwp_h" = xyes
14477then :
14478  printf "%s\n" "#define HAVE_LWP_LWP_H 1" >>confdefs.h
14479
14480fi
14481
14482	ac_fn_c_check_header_compile "$LINENO" "thread.h" "ac_cv_header_thread_h" "$ac_includes_default"
14483if test "x$ac_cv_header_thread_h" = xyes
14484then :
14485  printf "%s\n" "#define HAVE_THREAD_H 1" >>confdefs.h
14486
14487fi
14488ac_fn_c_check_header_compile "$LINENO" "synch.h" "ac_cv_header_synch_h" "$ac_includes_default"
14489if test "x$ac_cv_header_synch_h" = xyes
14490then :
14491  printf "%s\n" "#define HAVE_SYNCH_H 1" >>confdefs.h
14492
14493fi
14494
14495fi
14496
14497if test $ol_link_threads != no && test $ol_link_threads != nt ; then
14498
14499printf "%s\n" "#define REENTRANT 1" >>confdefs.h
14500
14501
14502printf "%s\n" "#define _REENTRANT 1" >>confdefs.h
14503
14504
14505printf "%s\n" "#define THREAD_SAFE 1" >>confdefs.h
14506
14507
14508printf "%s\n" "#define _THREAD_SAFE 1" >>confdefs.h
14509
14510
14511printf "%s\n" "#define THREADSAFE 1" >>confdefs.h
14512
14513
14514printf "%s\n" "#define _THREADSAFE 1" >>confdefs.h
14515
14516
14517printf "%s\n" "#define _SGI_MP_SOURCE 1" >>confdefs.h
14518
14519
14520			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
14521printf %s "checking for thread specific errno... " >&6; }
14522if test ${ol_cv_errno_thread_specific+y}
14523then :
14524  printf %s "(cached) " >&6
14525else $as_nop
14526
14527		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14528/* end confdefs.h.  */
14529#include <errno.h>
14530int
14531main (void)
14532{
14533errno = 0;
14534  ;
14535  return 0;
14536}
14537_ACEOF
14538if ac_fn_c_try_link "$LINENO"
14539then :
14540  ol_cv_errno_thread_specific=yes
14541else $as_nop
14542  ol_cv_errno_thread_specific=no
14543fi
14544rm -f core conftest.err conftest.$ac_objext conftest.beam \
14545    conftest$ac_exeext conftest.$ac_ext
14546
14547fi
14548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
14549printf "%s\n" "$ol_cv_errno_thread_specific" >&6; }
14550
14551			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
14552printf %s "checking for thread specific h_errno... " >&6; }
14553if test ${ol_cv_h_errno_thread_specific+y}
14554then :
14555  printf %s "(cached) " >&6
14556else $as_nop
14557
14558		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14559/* end confdefs.h.  */
14560#include <netdb.h>
14561int
14562main (void)
14563{
14564h_errno = 0;
14565  ;
14566  return 0;
14567}
14568_ACEOF
14569if ac_fn_c_try_link "$LINENO"
14570then :
14571  ol_cv_h_errno_thread_specific=yes
14572else $as_nop
14573  ol_cv_h_errno_thread_specific=no
14574fi
14575rm -f core conftest.err conftest.$ac_objext conftest.beam \
14576    conftest$ac_exeext conftest.$ac_ext
14577
14578fi
14579{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
14580printf "%s\n" "$ol_cv_h_errno_thread_specific" >&6; }
14581
14582	if test $ol_cv_errno_thread_specific != yes ||
14583	   test $ol_cv_h_errno_thread_specific != yes ; then
14584		LIBS="$LTHREAD_LIBS $LIBS"
14585		LTHREAD_LIBS=""
14586	fi
14587
14588fi
14589
14590if test $ol_link_threads = no ; then
14591	if test $ol_with_threads = yes ; then
14592		as_fn_error $? "no suitable thread support" "$LINENO" 5
14593	fi
14594
14595	if test $ol_with_threads = auto ; then
14596		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
14597printf "%s\n" "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
14598		ol_with_threads=no
14599	fi
14600
14601
14602printf "%s\n" "#define NO_THREADS 1" >>confdefs.h
14603
14604	LTHREAD_LIBS=""
14605	BUILD_THREAD=no
14606else
14607	BUILD_THREAD=yes
14608fi
14609
14610if test $ol_link_threads != no ; then
14611
14612printf "%s\n" "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
14613
14614fi
14615
14616# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14617case "$ol_with_threads" in
14618 no)
14619    ol_pthread_ok=no
14620
14621    ;;
14622 *)
14623    ol_found_pthreads=yes
14624    ;;
14625esac
14626
14627ac_ext=c
14628ac_cpp='$CPP $CPPFLAGS'
14629ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14630ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14631ac_compiler_gnu=$ac_cv_c_compiler_gnu
14632
14633
14634
14635
14636
14637
14638    case "$ol_found_pthreads" in
14639     yes)
14640	saved_LIBS="$LIBS"
14641	LIBS="$LTHREAD_LIBS $LIBS"
14642	saved_CFLAGS="$CFLAGS"
14643	CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
14644	ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
14645if test "x$ac_cv_func_sem_timedwait" = xyes
14646then :
14647  printf "%s\n" "#define HAVE_SEM_TIMEDWAIT 1" >>confdefs.h
14648
14649fi
14650
14651	LIBS="$saved_LIBS"
14652	{ saved_LIBS=; unset saved_LIBS;}
14653	CFLAGS="$saved_CFLAGS"
14654	{ saved_CFLAGS=; unset saved_CFLAGS;}
14655	case "$ac_cv_func_sem_timedwait" in
14656	 yes)
14657	    PTHREAD_LIBS="$LTHREAD_LIBS"
14658	    have_pthreads=yes
14659	esac
14660    esac
14661esac
14662
14663case "$have_pthreads" in
14664 yes)
14665    CFLAGS_NTP="$CFLAGS_NTP $PTHREAD_CFLAGS"
14666    saved_LIBS="$LIBS"
14667    LIBS="$LTHREAD_LIBS $LIBS"
14668    saved_CFLAGS="$CFLAGS"
14669    CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
14670    # The cast to long int works around a bug in the HP C Compiler
14671# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14672# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14673# This bug is HP SR number 8606223364.
14674{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
14675printf %s "checking size of pthread_t... " >&6; }
14676if test ${ac_cv_sizeof_pthread_t+y}
14677then :
14678  printf %s "(cached) " >&6
14679else $as_nop
14680  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "
14681	    $ac_includes_default
14682	    #include <pthread.h>
14683
14684
14685"
14686then :
14687
14688else $as_nop
14689  if test "$ac_cv_type_pthread_t" = yes; then
14690     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14691printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
14692as_fn_error 77 "cannot compute sizeof (pthread_t)
14693See \`config.log' for more details" "$LINENO" 5; }
14694   else
14695     ac_cv_sizeof_pthread_t=0
14696   fi
14697fi
14698
14699fi
14700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
14701printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
14702
14703
14704
14705printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
14706
14707
14708    LIBISC_PTHREADS_NOTHREADS=pthreads
14709
14710printf "%s\n" "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
14711
14712    #
14713    # We'd like to use sigwait() too
14714    #
14715    ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
14716if test "x$ac_cv_func_sigwait" = xyes
14717then :
14718  have_sigwait=yes
14719else $as_nop
14720  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
14721printf %s "checking for sigwait in -lc... " >&6; }
14722if test ${ac_cv_lib_c_sigwait+y}
14723then :
14724  printf %s "(cached) " >&6
14725else $as_nop
14726  ac_check_lib_save_LIBS=$LIBS
14727LIBS="-lc  $LIBS"
14728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14729/* end confdefs.h.  */
14730
14731/* Override any GCC internal prototype to avoid an error.
14732   Use char because int might match the return type of a GCC
14733   builtin and then its argument prototype would still apply.  */
14734char sigwait ();
14735int
14736main (void)
14737{
14738return sigwait ();
14739  ;
14740  return 0;
14741}
14742_ACEOF
14743if ac_fn_c_try_link "$LINENO"
14744then :
14745  ac_cv_lib_c_sigwait=yes
14746else $as_nop
14747  ac_cv_lib_c_sigwait=no
14748fi
14749rm -f core conftest.err conftest.$ac_objext conftest.beam \
14750    conftest$ac_exeext conftest.$ac_ext
14751LIBS=$ac_check_lib_save_LIBS
14752fi
14753{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
14754printf "%s\n" "$ac_cv_lib_c_sigwait" >&6; }
14755if test "x$ac_cv_lib_c_sigwait" = xyes
14756then :
14757  have_sigwait=yes
14758else $as_nop
14759  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
14760printf %s "checking for sigwait in -lpthread... " >&6; }
14761if test ${ac_cv_lib_pthread_sigwait+y}
14762then :
14763  printf %s "(cached) " >&6
14764else $as_nop
14765  ac_check_lib_save_LIBS=$LIBS
14766LIBS="-lpthread  $LIBS"
14767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14768/* end confdefs.h.  */
14769
14770/* Override any GCC internal prototype to avoid an error.
14771   Use char because int might match the return type of a GCC
14772   builtin and then its argument prototype would still apply.  */
14773char sigwait ();
14774int
14775main (void)
14776{
14777return sigwait ();
14778  ;
14779  return 0;
14780}
14781_ACEOF
14782if ac_fn_c_try_link "$LINENO"
14783then :
14784  ac_cv_lib_pthread_sigwait=yes
14785else $as_nop
14786  ac_cv_lib_pthread_sigwait=no
14787fi
14788rm -f core conftest.err conftest.$ac_objext conftest.beam \
14789    conftest$ac_exeext conftest.$ac_ext
14790LIBS=$ac_check_lib_save_LIBS
14791fi
14792{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
14793printf "%s\n" "$ac_cv_lib_pthread_sigwait" >&6; }
14794if test "x$ac_cv_lib_pthread_sigwait" = xyes
14795then :
14796  have_sigwait=yes
14797else $as_nop
14798  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
14799printf %s "checking for _Psigwait in -lpthread... " >&6; }
14800if test ${ac_cv_lib_pthread__Psigwait+y}
14801then :
14802  printf %s "(cached) " >&6
14803else $as_nop
14804  ac_check_lib_save_LIBS=$LIBS
14805LIBS="-lpthread  $LIBS"
14806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14807/* end confdefs.h.  */
14808
14809/* Override any GCC internal prototype to avoid an error.
14810   Use char because int might match the return type of a GCC
14811   builtin and then its argument prototype would still apply.  */
14812char _Psigwait ();
14813int
14814main (void)
14815{
14816return _Psigwait ();
14817  ;
14818  return 0;
14819}
14820_ACEOF
14821if ac_fn_c_try_link "$LINENO"
14822then :
14823  ac_cv_lib_pthread__Psigwait=yes
14824else $as_nop
14825  ac_cv_lib_pthread__Psigwait=no
14826fi
14827rm -f core conftest.err conftest.$ac_objext conftest.beam \
14828    conftest$ac_exeext conftest.$ac_ext
14829LIBS=$ac_check_lib_save_LIBS
14830fi
14831{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
14832printf "%s\n" "$ac_cv_lib_pthread__Psigwait" >&6; }
14833if test "x$ac_cv_lib_pthread__Psigwait" = xyes
14834then :
14835  have_sigwait=yes
14836else $as_nop
14837  have_sigwait=no
14838
14839fi
14840
14841
14842fi
14843
14844
14845fi
14846
14847
14848fi
14849
14850    case "$host:$have_sigwait" in
14851     *-freebsd*:no)
14852	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
14853printf %s "checking for sigwait in -lc_r... " >&6; }
14854if test ${ac_cv_lib_c_r_sigwait+y}
14855then :
14856  printf %s "(cached) " >&6
14857else $as_nop
14858  ac_check_lib_save_LIBS=$LIBS
14859LIBS="-lc_r  $LIBS"
14860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14861/* end confdefs.h.  */
14862
14863/* Override any GCC internal prototype to avoid an error.
14864   Use char because int might match the return type of a GCC
14865   builtin and then its argument prototype would still apply.  */
14866char sigwait ();
14867int
14868main (void)
14869{
14870return sigwait ();
14871  ;
14872  return 0;
14873}
14874_ACEOF
14875if ac_fn_c_try_link "$LINENO"
14876then :
14877  ac_cv_lib_c_r_sigwait=yes
14878else $as_nop
14879  ac_cv_lib_c_r_sigwait=no
14880fi
14881rm -f core conftest.err conftest.$ac_objext conftest.beam \
14882    conftest$ac_exeext conftest.$ac_ext
14883LIBS=$ac_check_lib_save_LIBS
14884fi
14885{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
14886printf "%s\n" "$ac_cv_lib_c_r_sigwait" >&6; }
14887if test "x$ac_cv_lib_c_r_sigwait" = xyes
14888then :
14889  have_sigwait=yes
14890
14891fi
14892
14893    esac
14894    case "$have_sigwait" in
14895     yes)
14896	ac_cv_func_sigwait=yes
14897
14898printf "%s\n" "#define HAVE_SIGWAIT 1" >>confdefs.h
14899
14900    esac
14901
14902    ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
14903if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes
14904then :
14905  printf "%s\n" "#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1" >>confdefs.h
14906
14907fi
14908
14909    ac_fn_c_check_func "$LINENO" "pthread_attr_setstacksize" "ac_cv_func_pthread_attr_setstacksize"
14910if test "x$ac_cv_func_pthread_attr_setstacksize" = xyes
14911then :
14912  printf "%s\n" "#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1" >>confdefs.h
14913
14914fi
14915ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
14916if test "x$ac_cv_func_sysconf" = xyes
14917then :
14918  printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
14919
14920fi
14921
14922
14923    case "$host" in
14924     *-freebsd5.[012]|*-freebsd5.[012].*)
14925	;;
14926     *-freebsd5.[3456789]|*-freebsd5.[3456789].*|*-freebsd6.*)
14927
14928printf "%s\n" "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
14929
14930	;;
14931     *-bsdi3.*|*-bsdi4.0*)
14932
14933printf "%s\n" "#define NEED_PTHREAD_INIT 1" >>confdefs.h
14934
14935	;;
14936     *-linux*)
14937
14938printf "%s\n" "#define HAVE_LINUXTHREADS 1" >>confdefs.h
14939
14940	;;
14941     *-solaris*)
14942	printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
14943
14944	ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
14945if test "x$ac_cv_func_pthread_setconcurrency" = xyes
14946then :
14947  printf "%s\n" "#define HAVE_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
14948
14949fi
14950
14951	case "$ac_cv_func_pthread_setconcurrency" in
14952	 yes)
14953
14954printf "%s\n" "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
14955
14956	esac
14957	;;
14958     *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
14959
14960printf "%s\n" "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
14961
14962	;;
14963    esac
14964    hack_shutup_pthreadonceinit=no
14965    case "$host" in
14966     *-aix5.[123].*)
14967	hack_shutup_pthreadonceinit=yes
14968	;;
14969     *-solaris2.[89])
14970	hack_shutup_pthreadonceinit=yes
14971	;;
14972     *-solaris2.1[0-9])
14973	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
14974printf %s "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
14975if test ${ntp_cv_braces_around_pthread_once_init+y}
14976then :
14977  printf %s "(cached) " >&6
14978else $as_nop
14979  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14980/* end confdefs.h.  */
14981
14982			#include <pthread.h>
14983
14984int
14985main (void)
14986{
14987
14988		        static pthread_once_t once_test =
14989						PTHREAD_ONCE_INIT;
14990
14991
14992  ;
14993  return 0;
14994}
14995_ACEOF
14996if ac_fn_c_try_compile "$LINENO"
14997then :
14998  ntp_cv_braces_around_pthread_once_init=no
14999else $as_nop
15000  ntp_cv_braces_around_pthread_once_init=yes
15001
15002fi
15003rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15004
15005fi
15006{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
15007printf "%s\n" "$ntp_cv_braces_around_pthread_once_init" >&6; }
15008	case "$ntp_cv_braces_around_pthread_once_init" in
15009	 yes)
15010	    hack_shutup_pthreadonceinit=yes
15011	esac
15012	;;
15013    esac
15014    case "$hack_shutup_pthreadonceinit" in
15015     yes)
15016
15017printf "%s\n" "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
15018
15019    esac
15020    LIBS="$saved_LIBS"
15021    { saved_LIBS=; unset saved_LIBS;}
15022    CFLAGS="$saved_CFLAGS"
15023    { saved_CFLAGS=; unset saved_CFLAGS;}
15024    ;;
15025 *)
15026    LIBISC_PTHREADS_NOTHREADS=nothreads
15027    ;;
15028esac
15029
15030 if test "$have_pthreads" != "no"; then
15031  PTHREADS_TRUE=
15032  PTHREADS_FALSE='#'
15033else
15034  PTHREADS_TRUE='#'
15035  PTHREADS_FALSE=
15036fi
15037
15038
15039
15040
15041
15042
15043
15044case "$hw_use_rpl_vsnprintf:$hw_cv_func_vsnprintf" in
15045 no:yes)
15046    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
15047printf %s "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
15048if test ${ntp_cv_vsnprintf_percent_m+y}
15049then :
15050  printf %s "(cached) " >&6
15051else $as_nop
15052  if test "$cross_compiling" = yes
15053then :
15054  ntp_cv_vsnprintf_percent_m=no
15055
15056else $as_nop
15057  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15058/* end confdefs.h.  */
15059
15060		    #include <stdarg.h>
15061		    #include <errno.h>
15062		    #include <stdio.h>
15063		    #include <string.h>
15064
15065		    int call_vsnprintf(
15066			    char *	dst,
15067			    size_t	sz,
15068			    const char *fmt,
15069			    ...
15070			    );
15071
15072		    int call_vsnprintf(
15073			    char *	dst,
15074			    size_t	sz,
15075			    const char *fmt,
15076			    ...
15077			    )
15078		    {
15079			    va_list	ap;
15080			    int		rc;
15081
15082			    va_start(ap, fmt);
15083			    rc = vsnprintf(dst, sz, fmt, ap);
15084			    va_end(ap);
15085
15086			    return rc;
15087		    }
15088
15089int
15090main (void)
15091{
15092
15093		    char	sbuf[512];
15094		    char	pbuf[512];
15095		    int		slen;
15096
15097		    strcpy(sbuf, strerror(ENOENT));
15098		    errno = ENOENT;
15099		    slen = call_vsnprintf(pbuf, sizeof(pbuf), "%m",
15100					  "wrong");
15101		    return strcmp(sbuf, pbuf);
15102
15103
15104  ;
15105  return 0;
15106}
15107_ACEOF
15108if ac_fn_c_try_run "$LINENO"
15109then :
15110  ntp_cv_vsnprintf_percent_m=yes
15111else $as_nop
15112  ntp_cv_vsnprintf_percent_m=no
15113fi
15114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15115  conftest.$ac_objext conftest.beam conftest.$ac_ext
15116fi
15117
15118
15119fi
15120{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
15121printf "%s\n" "$ntp_cv_vsnprintf_percent_m" >&6; }
15122    case "$ntp_cv_vsnprintf_percent_m" in
15123     yes)
15124
15125printf "%s\n" "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
15126
15127    esac
15128esac
15129
15130ac_fn_c_check_header_compile "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
15131if test "x$ac_cv_header_sys_clockctl_h" = xyes
15132then :
15133  printf "%s\n" "#define HAVE_SYS_CLOCKCTL_H 1" >>confdefs.h
15134
15135fi
15136
15137
15138# Check whether --enable-clockctl was given.
15139if test ${enable_clockctl+y}
15140then :
15141  enableval=$enable_clockctl; ntp_use_dev_clockctl=$enableval
15142else $as_nop
15143  ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h
15144
15145fi
15146
15147
15148{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
15149printf %s "checking if we should use /dev/clockctl... " >&6; }
15150{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
15151printf "%s\n" "$ntp_use_dev_clockctl" >&6; }
15152
15153
15154ac_fn_c_check_header_compile "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default"
15155if test "x$ac_cv_header_sys_capability_h" = xyes
15156then :
15157  printf "%s\n" "#define HAVE_SYS_CAPABILITY_H 1" >>confdefs.h
15158
15159fi
15160ac_fn_c_check_header_compile "$LINENO" "sys/prctl.h" "ac_cv_header_sys_prctl_h" "$ac_includes_default"
15161if test "x$ac_cv_header_sys_prctl_h" = xyes
15162then :
15163  printf "%s\n" "#define HAVE_SYS_PRCTL_H 1" >>confdefs.h
15164
15165fi
15166
15167
15168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
15169printf %s "checking if we have linux capabilities (libcap)... " >&6; }
15170
15171case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
15172 yesyes)
15173    case "$host" in
15174     mips-sgi-irix*)
15175	ntp_have_linuxcaps=no
15176	;;
15177     *) ntp_have_linuxcaps=yes
15178	;;
15179    esac
15180    ;;
15181 *)
15182    ntp_have_linuxcaps=no
15183    ;;
15184esac
15185
15186# Check whether --enable-linuxcaps was given.
15187if test ${enable_linuxcaps+y}
15188then :
15189  enableval=$enable_linuxcaps; ntp_have_linuxcaps=$enableval
15190
15191fi
15192
15193
15194{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
15195printf "%s\n" "$ntp_have_linuxcaps" >&6; }
15196
15197case "$ntp_have_linuxcaps" in
15198 yes)
15199
15200printf "%s\n" "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
15201
15202    LIBS="$LIBS -lcap"
15203    ;;
15204esac
15205
15206
15207ac_fn_c_check_header_compile "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
15208if test "x$ac_cv_header_priv_h" = xyes
15209then :
15210  printf "%s\n" "#define HAVE_PRIV_H 1" >>confdefs.h
15211
15212fi
15213
15214case "$ac_cv_header_priv_h" in
15215 yes)
15216    case "$host" in
15217     *-solaris*)
15218	ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
15219if test "x$ac_cv_func_setppriv" = xyes
15220then :
15221  ntp_have_solarisprivs=yes
15222else $as_nop
15223  ntp_have_solarisprivs=no
15224
15225fi
15226
15227	;;
15228    esac
15229esac
15230
15231# Check whether --enable-solarisprivs was given.
15232if test ${enable_solarisprivs+y}
15233then :
15234  enableval=$enable_solarisprivs; ntp_have_solarisprivs=$enableval
15235
15236fi
15237
15238
15239{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
15240printf %s "checking if we have solaris privileges... " >&6; }
15241
15242case "$ntp_have_solarisprivs" in
15243 yes)
15244
15245printf "%s\n" "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
15246
15247    ;;
15248 '') ntp_have_solarisprivs="no"
15249    ;;
15250esac
15251
15252{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
15253printf "%s\n" "$ntp_have_solarisprivs" >&6; }
15254
15255ac_fn_c_check_header_compile "$LINENO" "sys/mac.h" "ac_cv_header_sys_mac_h" "$ac_includes_default"
15256if test "x$ac_cv_header_sys_mac_h" = xyes
15257then :
15258  printf "%s\n" "#define HAVE_SYS_MAC_H 1" >>confdefs.h
15259
15260fi
15261
15262
15263# Check whether --enable-trustedbsd_mac was given.
15264if test ${enable_trustedbsd_mac+y}
15265then :
15266  enableval=$enable_trustedbsd_mac; ntp_use_trustedbsd_mac=$enableval
15267
15268fi
15269
15270
15271{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should use TrustedBSD MAC privileges" >&5
15272printf %s "checking if we should use TrustedBSD MAC privileges... " >&6; }
15273
15274case "$ntp_use_trustedbsd_mac$ac_cv_header_sys_mac_h" in
15275 yesyes)
15276
15277printf "%s\n" "#define HAVE_TRUSTEDBSD_MAC 1" >>confdefs.h
15278
15279    ;;
15280 *) ntp_use_trustedbsd_mac="no";
15281    ;;
15282esac
15283
15284{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_trustedbsd_mac" >&5
15285printf "%s\n" "$ntp_use_trustedbsd_mac" >&6; }
15286
15287case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs$ntp_use_trustedbsd_mac" in
15288 *yes*)
15289
15290printf "%s\n" "#define HAVE_DROPROOT 1" >>confdefs.h
15291
15292esac
15293
15294case "$host" in
15295 *-*-darwin*)
15296    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
15297printf %s "checking for library containing res_9_init... " >&6; }
15298if test ${ac_cv_search_res_9_init+y}
15299then :
15300  printf %s "(cached) " >&6
15301else $as_nop
15302  ac_func_search_save_LIBS=$LIBS
15303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15304/* end confdefs.h.  */
15305
15306/* Override any GCC internal prototype to avoid an error.
15307   Use char because int might match the return type of a GCC
15308   builtin and then its argument prototype would still apply.  */
15309char res_9_init ();
15310int
15311main (void)
15312{
15313return res_9_init ();
15314  ;
15315  return 0;
15316}
15317_ACEOF
15318for ac_lib in '' resolv
15319do
15320  if test -z "$ac_lib"; then
15321    ac_res="none required"
15322  else
15323    ac_res=-l$ac_lib
15324    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15325  fi
15326  if ac_fn_c_try_link "$LINENO"
15327then :
15328  ac_cv_search_res_9_init=$ac_res
15329fi
15330rm -f core conftest.err conftest.$ac_objext conftest.beam \
15331    conftest$ac_exeext
15332  if test ${ac_cv_search_res_9_init+y}
15333then :
15334  break
15335fi
15336done
15337if test ${ac_cv_search_res_9_init+y}
15338then :
15339
15340else $as_nop
15341  ac_cv_search_res_9_init=no
15342fi
15343rm conftest.$ac_ext
15344LIBS=$ac_func_search_save_LIBS
15345fi
15346{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
15347printf "%s\n" "$ac_cv_search_res_9_init" >&6; }
15348ac_res=$ac_cv_search_res_9_init
15349if test "$ac_res" != no
15350then :
15351  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15352
15353fi
15354
15355    ;;
15356 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
15357printf %s "checking for library containing res_init... " >&6; }
15358if test ${ac_cv_search_res_init+y}
15359then :
15360  printf %s "(cached) " >&6
15361else $as_nop
15362  ac_func_search_save_LIBS=$LIBS
15363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15364/* end confdefs.h.  */
15365
15366/* Override any GCC internal prototype to avoid an error.
15367   Use char because int might match the return type of a GCC
15368   builtin and then its argument prototype would still apply.  */
15369char res_init ();
15370int
15371main (void)
15372{
15373return res_init ();
15374  ;
15375  return 0;
15376}
15377_ACEOF
15378for ac_lib in '' resolv
15379do
15380  if test -z "$ac_lib"; then
15381    ac_res="none required"
15382  else
15383    ac_res=-l$ac_lib
15384    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15385  fi
15386  if ac_fn_c_try_link "$LINENO"
15387then :
15388  ac_cv_search_res_init=$ac_res
15389fi
15390rm -f core conftest.err conftest.$ac_objext conftest.beam \
15391    conftest$ac_exeext
15392  if test ${ac_cv_search_res_init+y}
15393then :
15394  break
15395fi
15396done
15397if test ${ac_cv_search_res_init+y}
15398then :
15399
15400else $as_nop
15401  ac_cv_search_res_init=no
15402fi
15403rm conftest.$ac_ext
15404LIBS=$ac_func_search_save_LIBS
15405fi
15406{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
15407printf "%s\n" "$ac_cv_search_res_init" >&6; }
15408ac_res=$ac_cv_search_res_init
15409if test "$ac_res" != no
15410then :
15411  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15412
15413fi
15414
15415    ;;
15416esac
15417ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "#ifdef HAVE_SYS_TYPES_H
15418#  include <sys/types.h>
15419#endif
15420#ifdef HAVE_NETINET_IN_H
15421#  include <netinet/in.h>   /* inet_ functions / structs */
15422#endif
15423#ifdef HAVE_ARPA_NAMESER_H
15424#  include <arpa/nameser.h> /* DNS HEADER struct */
15425#endif
15426#ifdef HAVE_NETDB_H
15427#  include <netdb.h>
15428#endif
15429"
15430if test "x$ac_cv_header_sys_types_h" = xyes
15431then :
15432  printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
15433
15434fi
15435ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "#ifdef HAVE_SYS_TYPES_H
15436#  include <sys/types.h>
15437#endif
15438#ifdef HAVE_NETINET_IN_H
15439#  include <netinet/in.h>   /* inet_ functions / structs */
15440#endif
15441#ifdef HAVE_ARPA_NAMESER_H
15442#  include <arpa/nameser.h> /* DNS HEADER struct */
15443#endif
15444#ifdef HAVE_NETDB_H
15445#  include <netdb.h>
15446#endif
15447"
15448if test "x$ac_cv_header_netinet_in_h" = xyes
15449then :
15450  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
15451
15452fi
15453ac_fn_c_check_header_compile "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "#ifdef HAVE_SYS_TYPES_H
15454#  include <sys/types.h>
15455#endif
15456#ifdef HAVE_NETINET_IN_H
15457#  include <netinet/in.h>   /* inet_ functions / structs */
15458#endif
15459#ifdef HAVE_ARPA_NAMESER_H
15460#  include <arpa/nameser.h> /* DNS HEADER struct */
15461#endif
15462#ifdef HAVE_NETDB_H
15463#  include <netdb.h>
15464#endif
15465"
15466if test "x$ac_cv_header_arpa_nameser_h" = xyes
15467then :
15468  printf "%s\n" "#define HAVE_ARPA_NAMESER_H 1" >>confdefs.h
15469
15470fi
15471ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "#ifdef HAVE_SYS_TYPES_H
15472#  include <sys/types.h>
15473#endif
15474#ifdef HAVE_NETINET_IN_H
15475#  include <netinet/in.h>   /* inet_ functions / structs */
15476#endif
15477#ifdef HAVE_ARPA_NAMESER_H
15478#  include <arpa/nameser.h> /* DNS HEADER struct */
15479#endif
15480#ifdef HAVE_NETDB_H
15481#  include <netdb.h>
15482#endif
15483"
15484if test "x$ac_cv_header_netdb_h" = xyes
15485then :
15486  printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
15487
15488fi
15489ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "#ifdef HAVE_SYS_TYPES_H
15490#  include <sys/types.h>
15491#endif
15492#ifdef HAVE_NETINET_IN_H
15493#  include <netinet/in.h>   /* inet_ functions / structs */
15494#endif
15495#ifdef HAVE_ARPA_NAMESER_H
15496#  include <arpa/nameser.h> /* DNS HEADER struct */
15497#endif
15498#ifdef HAVE_NETDB_H
15499#  include <netdb.h>
15500#endif
15501"
15502if test "x$ac_cv_header_resolv_h" = xyes
15503then :
15504  printf "%s\n" "#define HAVE_RESOLV_H 1" >>confdefs.h
15505
15506fi
15507
15508
15509#HMS: Why do we do this check so "early"?
15510
15511  for ac_func in res_init
15512do :
15513  ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
15514if test "x$ac_cv_func_res_init" = xyes
15515then :
15516  printf "%s\n" "#define HAVE_RES_INIT 1" >>confdefs.h
15517
15518else $as_nop
15519  ac_fn_c_check_func "$LINENO" "__res_init" "ac_cv_func___res_init"
15520if test "x$ac_cv_func___res_init" = xyes
15521then :
15522  printf "%s\n" "#define HAVE___RES_INIT 1" >>confdefs.h
15523
15524fi
15525
15526fi
15527
15528done
15529
15530# We also need -lsocket, but we have tested for that already.
15531ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
15532if test "x$ac_cv_func_inet_ntop" = xyes
15533then :
15534
15535else $as_nop
15536
15537printf "%s\n" "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
15538
15539fi
15540
15541ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
15542if test "x$ac_cv_func_inet_pton" = xyes
15543then :
15544
15545else $as_nop
15546
15547printf "%s\n" "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
15548
15549fi
15550
15551
15552ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
15553if test "x$ac_cv_type_uintptr_t" = xyes
15554then :
15555
15556printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
15557
15558
15559fi
15560ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" "$ac_includes_default"
15561if test "x$ac_cv_type_int32" = xyes
15562then :
15563
15564printf "%s\n" "#define HAVE_INT32 1" >>confdefs.h
15565
15566
15567fi
15568ac_fn_c_check_type "$LINENO" "u_int32" "ac_cv_type_u_int32" "$ac_includes_default"
15569if test "x$ac_cv_type_u_int32" = xyes
15570then :
15571
15572printf "%s\n" "#define HAVE_U_INT32 1" >>confdefs.h
15573
15574
15575fi
15576
15577
15578
15579
15580ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
15581	#ifdef HAVE_SYS_TIME_H
15582	# include <sys/time.h>
15583	#endif
15584	#ifdef HAVE_ERRNO_H
15585	# include <errno.h>
15586	#endif
15587
15588
15589"
15590if test "x$ac_cv_header_sys_timepps_h" = xyes
15591then :
15592  printf "%s\n" "#define HAVE_SYS_TIMEPPS_H 1" >>confdefs.h
15593
15594fi
15595
15596
15597{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
15598printf %s "checking for struct timespec... " >&6; }
15599if test ${ntp_cv_struct_timespec+y}
15600then :
15601  printf %s "(cached) " >&6
15602else $as_nop
15603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15604/* end confdefs.h.  */
15605
15606		#include <sys/time.h>
15607		/* Under SunOS, timespec is in sys/timepps.h,
15608		   which needs errno.h and FRAC */
15609		#ifdef HAVE_ERRNO_H
15610		# include <errno.h>
15611		#endif
15612		#ifdef HAVE_SYS_TIMEPPS_H
15613		# define FRAC 4294967296
15614		# include <sys/timepps.h>
15615		#endif
15616
15617int
15618main (void)
15619{
15620
15621		struct timespec n;
15622
15623
15624  ;
15625  return 0;
15626}
15627_ACEOF
15628if ac_fn_c_try_compile "$LINENO"
15629then :
15630  ntp_cv_struct_timespec=yes
15631else $as_nop
15632  ntp_cv_struct_timespec=no
15633
15634fi
15635rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15636
15637fi
15638{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_timespec" >&5
15639printf "%s\n" "$ntp_cv_struct_timespec" >&6; }
15640case "$ntp_cv_struct_timespec" in
15641 yes)
15642
15643printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
15644
15645esac
15646
15647{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct ntptimeval" >&5
15648printf %s "checking for struct ntptimeval... " >&6; }
15649if test ${ntp_cv_struct_ntptimeval+y}
15650then :
15651  printf %s "(cached) " >&6
15652else $as_nop
15653  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15654/* end confdefs.h.  */
15655
15656		#include <sys/time.h>
15657		#include <sys/timex.h>
15658
15659int
15660main (void)
15661{
15662
15663		struct ntptimeval n;
15664
15665
15666  ;
15667  return 0;
15668}
15669_ACEOF
15670if ac_fn_c_try_compile "$LINENO"
15671then :
15672  ntp_cv_struct_ntptimeval=yes
15673else $as_nop
15674  ntp_cv_struct_ntptimeval=no
15675
15676fi
15677rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15678
15679fi
15680{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ntptimeval" >&5
15681printf "%s\n" "$ntp_cv_struct_ntptimeval" >&6; }
15682case "$ntp_cv_struct_ntptimeval" in
15683 yes)
15684
15685printf "%s\n" "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
15686
15687esac
15688
15689ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
15690	#ifdef HAVE_SYS_TYPES_H
15691	# include <sys/types.h>
15692	#endif
15693
15694
15695"
15696if test "x$ac_cv_header_md5_h" = xyes
15697then :
15698  printf "%s\n" "#define HAVE_MD5_H 1" >>confdefs.h
15699
15700fi
15701
15702
15703{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
15704printf %s "checking for library containing MD5Init... " >&6; }
15705if test ${ac_cv_search_MD5Init+y}
15706then :
15707  printf %s "(cached) " >&6
15708else $as_nop
15709  ac_func_search_save_LIBS=$LIBS
15710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15711/* end confdefs.h.  */
15712
15713/* Override any GCC internal prototype to avoid an error.
15714   Use char because int might match the return type of a GCC
15715   builtin and then its argument prototype would still apply.  */
15716char MD5Init ();
15717int
15718main (void)
15719{
15720return MD5Init ();
15721  ;
15722  return 0;
15723}
15724_ACEOF
15725for ac_lib in '' md5 md
15726do
15727  if test -z "$ac_lib"; then
15728    ac_res="none required"
15729  else
15730    ac_res=-l$ac_lib
15731    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15732  fi
15733  if ac_fn_c_try_link "$LINENO"
15734then :
15735  ac_cv_search_MD5Init=$ac_res
15736fi
15737rm -f core conftest.err conftest.$ac_objext conftest.beam \
15738    conftest$ac_exeext
15739  if test ${ac_cv_search_MD5Init+y}
15740then :
15741  break
15742fi
15743done
15744if test ${ac_cv_search_MD5Init+y}
15745then :
15746
15747else $as_nop
15748  ac_cv_search_MD5Init=no
15749fi
15750rm conftest.$ac_ext
15751LIBS=$ac_func_search_save_LIBS
15752fi
15753{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
15754printf "%s\n" "$ac_cv_search_MD5Init" >&6; }
15755ac_res=$ac_cv_search_MD5Init
15756if test "$ac_res" != no
15757then :
15758  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15759
15760fi
15761
15762ac_fn_c_check_func "$LINENO" "MD5Init" "ac_cv_func_MD5Init"
15763if test "x$ac_cv_func_MD5Init" = xyes
15764then :
15765  printf "%s\n" "#define HAVE_MD5INIT 1" >>confdefs.h
15766
15767fi
15768ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
15769if test "x$ac_cv_func_sysconf" = xyes
15770then :
15771  printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
15772
15773fi
15774ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize"
15775if test "x$ac_cv_func_getdtablesize" = xyes
15776then :
15777  printf "%s\n" "#define HAVE_GETDTABLESIZE 1" >>confdefs.h
15778
15779fi
15780ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
15781if test "x$ac_cv_func_sigaction" = xyes
15782then :
15783  printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
15784
15785fi
15786ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
15787if test "x$ac_cv_func_sigset" = xyes
15788then :
15789  printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h
15790
15791fi
15792ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec"
15793if test "x$ac_cv_func_sigvec" = xyes
15794then :
15795  printf "%s\n" "#define HAVE_SIGVEC 1" >>confdefs.h
15796
15797fi
15798
15799
15800# HMS: does this need to be a cached variable?
15801# Check whether --enable-signalled-io was given.
15802if test ${enable_signalled_io+y}
15803then :
15804  enableval=$enable_signalled_io; use_signalled_io=$enableval
15805else $as_nop
15806  use_signalled_io=yes
15807
15808fi
15809
15810
15811{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
15812printf %s "checking for SIGIO... " >&6; }
15813if test ${ntp_cv_hdr_def_sigio+y}
15814then :
15815  printf %s "(cached) " >&6
15816else $as_nop
15817  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15818/* end confdefs.h.  */
15819
15820	    #include <signal.h>
15821
15822	    #ifndef SIGIO
15823	    # error
15824	    #endif
15825
15826_ACEOF
15827if ac_fn_c_try_cpp "$LINENO"
15828then :
15829  ntp_cv_hdr_def_sigio=yes
15830else $as_nop
15831  ntp_cv_hdr_def_sigio=no
15832
15833fi
15834rm -f conftest.err conftest.i conftest.$ac_ext
15835
15836fi
15837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
15838printf "%s\n" "$ntp_cv_hdr_def_sigio" >&6; }
15839
15840{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
15841printf %s "checking if we want to use SIGIO... " >&6; }
15842ans=no
15843case "$ntp_cv_hdr_def_sigio" in
15844 yes)
15845    ans=yes
15846    case "$host" in
15847     alpha*-dec-osf4*|alpha*-dec-osf5*)
15848	ans=no
15849	;;
15850     *-convex-*)
15851	ans=no
15852	;;
15853     *-dec-*)
15854	ans=no
15855	;;
15856     *-pc-cygwin*)
15857	ans=no
15858	;;
15859     *-sni-sysv*)
15860	ans=no
15861	;;
15862     *-stratus-vos)
15863	ans=no
15864	;;
15865     *-univel-sysv*)
15866	ans=no
15867	;;
15868     *-*-irix6*)
15869	ans=no
15870	;;
15871     *-*-freebsd*)
15872	ans=no
15873	;;
15874     *-*-*linux*)
15875	ans=no
15876	;;
15877     *-*-unicosmp*)
15878	ans=no
15879	;;
15880     *-*-kfreebsd*)
15881	ans=no
15882	;;
15883     m68k-*-mint*)
15884	ans=no
15885	;;
15886    esac
15887    case "$ans" in
15888     no)
15889	ans="Possible for $host but disabled because of reported problems"
15890	;;
15891    esac
15892    ;;
15893esac
15894case "$ans" in
15895 yes)
15896    case "$use_signalled_io" in
15897     yes)
15898
15899printf "%s\n" "#define HAVE_SIGNALED_IO 1" >>confdefs.h
15900
15901	;;
15902     *) ans="Allowed for $host but --disable-signalled-io was given"
15903	;;
15904    esac
15905esac
15906{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
15907printf "%s\n" "$ans" >&6; }
15908
15909{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
15910printf %s "checking for SIGPOLL... " >&6; }
15911if test ${ntp_cv_hdr_def_sigpoll+y}
15912then :
15913  printf %s "(cached) " >&6
15914else $as_nop
15915  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15916/* end confdefs.h.  */
15917
15918	    #include <signal.h>
15919
15920	    #ifndef SIGPOLL
15921	    # error
15922	    #endif
15923
15924_ACEOF
15925if ac_fn_c_try_cpp "$LINENO"
15926then :
15927  ntp_cv_hdr_def_sigpoll=yes
15928else $as_nop
15929  ntp_cv_hdr_def_sigpoll=no
15930
15931fi
15932rm -f conftest.err conftest.i conftest.$ac_ext
15933
15934fi
15935{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
15936printf "%s\n" "$ntp_cv_hdr_def_sigpoll" >&6; }
15937
15938{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
15939printf %s "checking if we can use SIGPOLL for UDP I/O... " >&6; }
15940ans=no
15941case "$ntp_cv_hdr_def_sigpoll" in
15942 yes)
15943    case "$host" in
15944     mips-sgi-irix*)
15945	ans=no
15946	;;
15947     vax-dec-bsd)
15948	ans=no
15949	;;
15950     *-pc-cygwin*)
15951	ans=no
15952	;;
15953     *-sni-sysv*)
15954	ans=no
15955	;;
15956     *-stratus-vos)
15957	ans=no
15958	;;
15959     *-*-aix[4-9]*)
15960	# XXX Only verified thru AIX6
15961	ans=no
15962	;;
15963     *-*-hpux*)
15964	ans=no
15965	;;
15966     *-*-*linux*)
15967	ans=no
15968	;;
15969     *-*-osf*)
15970	ans=no
15971	;;
15972     *-*-qnx*)
15973	ans=no
15974	;;
15975     *-*-sunos*)
15976	ans=no
15977	;;
15978     *-*-solaris*)
15979	ans=no
15980	;;
15981     *-*-ultrix*)
15982	ans=no
15983	;;
15984     *-*-unicosmp*)
15985	ans=no
15986	;;
15987     *-*-kfreebsd*)
15988	ans=no
15989	;;
15990     *) ans=yes
15991	;;
15992    esac
15993    ;;
15994esac
15995case "$ans" in
15996 yes)
15997
15998printf "%s\n" "#define USE_UDP_SIGPOLL 1" >>confdefs.h
15999
16000esac
16001{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16002printf "%s\n" "$ans" >&6; }
16003
16004{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
16005printf %s "checking if we can use SIGPOLL for TTY I/O... " >&6; }
16006ans=no
16007case "$ntp_cv_hdr_def_sigpoll" in
16008 yes)
16009    case "$host" in
16010     mips-sgi-irix*)
16011	ans=no
16012	;;
16013     vax-dec-bsd)
16014	ans=no
16015	;;
16016     *-pc-cygwin*)
16017	ans=no
16018	;;
16019     *-sni-sysv*)
16020	ans=no
16021	;;
16022     *-stratus-vos)
16023	ans=no
16024	;;
16025     *-*-aix[4-9]*)
16026	# XXX Only verified thru AIX6
16027	ans=no
16028	;;
16029     *-*-hpux*)
16030	ans=no
16031	;;
16032     *-*-*linux*)
16033	ans=no
16034	;;
16035     *-*-osf*)
16036	ans=no
16037	;;
16038     *-*-sunos*)
16039	ans=no
16040	;;
16041     *-*-ultrix*)
16042	ans=no
16043	;;
16044     *-*-qnx*)
16045	ans=no
16046	;;
16047     *-*-unicosmp*)
16048	ans=no
16049	;;
16050     *-*-kfreebsd*)
16051	ans=no
16052	;;
16053     *) ans=yes
16054	;;
16055    esac
16056    ;;
16057esac
16058case "$ans" in
16059 yes)
16060
16061printf "%s\n" "#define USE_TTY_SIGPOLL 1" >>confdefs.h
16062
16063esac
16064{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16065printf "%s\n" "$ans" >&6; }
16066
16067{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
16068printf %s "checking number of arguments to gettimeofday()... " >&6; }
16069if test ${ntp_cv_func_Xettimeofday_nargs+y}
16070then :
16071  printf %s "(cached) " >&6
16072else $as_nop
16073  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16074/* end confdefs.h.  */
16075
16076		#include <sys/time.h>
16077
16078int
16079main (void)
16080{
16081
16082		gettimeofday(0, 0);
16083		settimeofday(0, 0);
16084
16085
16086  ;
16087  return 0;
16088}
16089_ACEOF
16090if ac_fn_c_try_compile "$LINENO"
16091then :
16092  ntp_cv_func_Xettimeofday_nargs=2
16093else $as_nop
16094  ntp_cv_func_Xettimeofday_nargs=1
16095
16096fi
16097rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16098
16099fi
16100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
16101printf "%s\n" "$ntp_cv_func_Xettimeofday_nargs" >&6; }
16102case "$ntp_cv_func_Xettimeofday_nargs" in
16103 1)
16104
16105printf "%s\n" "#define SYSV_TIMEOFDAY 1" >>confdefs.h
16106
16107esac
16108
16109
16110  for ac_func in settimeofday
16111do :
16112  ac_fn_c_check_func "$LINENO" "settimeofday" "ac_cv_func_settimeofday"
16113if test "x$ac_cv_func_settimeofday" = xyes
16114then :
16115  printf "%s\n" "#define HAVE_SETTIMEOFDAY 1" >>confdefs.h
16116
16117else $as_nop
16118
16119    case "$host" in
16120     *-*-mpeix*) ac_cv_func_settimeofday=yes
16121    esac
16122
16123fi
16124
16125done
16126
16127{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
16128printf %s "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
16129ntp_warning='GRONK'
16130ans=none
16131case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
16132 yes*)
16133    ntp_warning=''
16134    ans='clock_settime()'
16135    ;;
16136 noyes*)
16137    ntp_warning='But clock_settime() would be better (if we had it)'
16138    ans='settimeofday()'
16139    ;;
16140 nonoyes)
16141    ntp_warning='Which is the worst of the three'
16142    ans='stime()'
16143    ;;
16144 *)
16145    case "$build" in
16146     $host)
16147	ntp_warning='Which leaves us with nothing to use!'
16148    esac
16149esac
16150{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16151printf "%s\n" "$ans" >&6; }
16152case "$ntp_warning" in
16153 '')
16154    ;;
16155 *)
16156    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
16157printf "%s\n" "$as_me: WARNING: *** $ntp_warning ***" >&2;}
16158    ;;
16159esac
16160
16161 if test x"$enable_dependency_tracking" = x"yes"; then
16162  LIBNTP_SUBMAKES_TRUE=
16163  LIBNTP_SUBMAKES_FALSE='#'
16164else
16165  LIBNTP_SUBMAKES_TRUE='#'
16166  LIBNTP_SUBMAKES_FALSE=
16167fi
16168
16169
16170
16171
16172
16173# Check whether --with-crypto was given.
16174if test ${with_crypto+y}
16175then :
16176  withval=$with_crypto; 		case "$with_crypto" in
16177	 yes)
16178	    with_crypto=openssl,libcrypto
16179	esac
16180
16181else $as_nop
16182  with_crypto=openssl,libcrypto
16183fi
16184
16185
16186# Check whether --with-openssl-libdir was given.
16187if test ${with_openssl_libdir+y}
16188then :
16189  withval=$with_openssl_libdir;
16190fi
16191
16192
16193# Check whether --with-openssl-incdir was given.
16194if test ${with_openssl_incdir+y}
16195then :
16196  withval=$with_openssl_incdir;
16197fi
16198
16199# Check whether --enable-verbose-ssl was given.
16200if test ${enable_verbose_ssl+y}
16201then :
16202  enableval=$enable_verbose_ssl;
16203else $as_nop
16204  enable_verbose_ssl=no
16205fi
16206
16207
16208ntp_openssl=no
16209ntp_openssl_from_pkg_config=no
16210ntp_ssl_incdir=
16211ntp_ssl_cflags=
16212ntp_ssl_cppflags=
16213ntp_ssl_libdir=
16214ntp_ssl_libs_L=
16215ntp_ssl_libs_l=
16216ntp_ssl_libs=
16217ntp_ssl_ldflags=
16218
16219NTPSSL_SAVED_CFLAGS="$CFLAGS"
16220NTPSSL_SAVED_CPPFLAGS="$CPPFLAGS"
16221NTPSSL_SAVED_LIBS="$LIBS"
16222NTPSSL_SAVED_LDFLAGS="$LDFLAGS"
16223
16224# Extract the first word of "openssl", so it can be a program name with args.
16225set dummy openssl; ac_word=$2
16226{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16227printf %s "checking for $ac_word... " >&6; }
16228if test ${ac_cv_path_PATH_OPENSSL+y}
16229then :
16230  printf %s "(cached) " >&6
16231else $as_nop
16232  case $PATH_OPENSSL in
16233  [\\/]* | ?:[\\/]*)
16234  ac_cv_path_PATH_OPENSSL="$PATH_OPENSSL" # Let the user override the test with a path.
16235  ;;
16236  *)
16237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16238for as_dir in $PATH
16239do
16240  IFS=$as_save_IFS
16241  case $as_dir in #(((
16242    '') as_dir=./ ;;
16243    */) ;;
16244    *) as_dir=$as_dir/ ;;
16245  esac
16246    for ac_exec_ext in '' $ac_executable_extensions; do
16247  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16248    ac_cv_path_PATH_OPENSSL="$as_dir$ac_word$ac_exec_ext"
16249    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16250    break 2
16251  fi
16252done
16253  done
16254IFS=$as_save_IFS
16255
16256  ;;
16257esac
16258fi
16259PATH_OPENSSL=$ac_cv_path_PATH_OPENSSL
16260if test -n "$PATH_OPENSSL"; then
16261  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_OPENSSL" >&5
16262printf "%s\n" "$PATH_OPENSSL" >&6; }
16263else
16264  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16265printf "%s\n" "no" >&6; }
16266fi
16267
16268
16269
16270str="$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}"
16271	case "$enable_verbose_ssl" in
16272	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $str" >&5
16273printf "%s\n" "$as_me: $str" >&6;}
16274	esac
16275
16276
16277{ str=; unset str;}
16278
16279# Make sure neither/both --with_openssl-{inc,lib}dir are given
16280case "${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
16281 notgiven:notgiven) ;;
16282 *notgiven*)
16283    as_fn_error $? "only one of --with-openssl-{inc,lib}dir=... given - provide both or neither" "$LINENO" 5
16284    ;;
16285esac
16286
16287# HMS: Today there are only 2 case options.  We probably want a third
16288# *:*:notgiven:notgiven
16289# and in that case we would validate the path in PKG_CONFIG_PATH.
16290# Unless we can do it with 2 cases, where the 2nd case is *:*:...
16291# and we do a reality check on execpath and the headers/libraries.
16292#
16293##
16294# if $with_crypto is not "no":
16295#   if --with-openssl-{inc,lib}dir are not given:
16296#     we should use pkg-config to find openssl
16297#     if we don't have pkg-config, if openssl is in the base OS, use that.
16298##
16299case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
16300 no:*) ;;
16301 *:notempty:notgiven:notgiven)
16302    # If PKG_CONFIG is notempty and we haven't been given openssl paths,
16303    # then let's make sure that the openssl executable's path corresponds
16304    # to the path in openssl.pc, and 'openssl version' matches the Version
16305    # in openssl.pc.  If $PKG_CONFIG tells us an INCPATH and/or a LIBPATH,
16306    # then should we reality check them?
16307    ## INCPATH
16308    # harlan@ntp-testbuild.tal1> openssl version
16309    # OpenSSL 1.1.1t  7 Feb 2023
16310    # harlan@ntp-testbuild.tal1> grep 1.1.1t /ntpbuild/include/openssl/*
16311    # /ntpbuild/include/openssl/opensslv.h:# define OPENSSL_VERSION_TEXT    "OpenSSL 1.1.1t  7 Feb 2023"
16312    # harlan@ntp-testbuild.tal1>
16313    ## LIBPATH
16314    # harlan@ntp-testbuild.tal1> strings -a /ntpbuild/lib/libcrypto.* | fgrep 1.1.1t
16315    # OpenSSL 1.1.1t  7 Feb 2023
16316    # OpenSSL 1.1.1t  7 Feb 2023
16317    # OpenSSL 1.1.1t  7 Feb 2023
16318    # harlan@ntp-testbuild.tal1> ls /ntpbuild/lib/libcrypto.*
16319    # /ntpbuild/lib/libcrypto.a       /ntpbuild/lib/libcrypto.so.1.1*
16320    # /ntpbuild/lib/libcrypto.so@
16321    # harlan@ntp-testbuild.tal1>
16322    ##
16323    # Having said this, do we really care if the openssl executable that
16324    # we have found is matched with the INCPATH and LIBPATH?
16325    # One answer: Probably not, but we should complain on a mismatch as
16326    # otherwise runtime differences could easily cause problems/drama.
16327
16328    ##BO
16329    # ntp_cv_build_framework_help=yes
16330    save_PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
16331    for pkg in `echo $with_crypto | $SED -e 's/,/ /'`; do
16332        case "$pkg" in
16333	 openssl)
16334	    if $PKG_CONFIG --exists $pkg ; then
16335		# Found it - yay
16336		# Do we want to check we found the right one?
16337		# --modver
16338		# --variable={libdir,includedir} (varname)
16339		overf=`openssl version`
16340		overs=`echo $overf | awk '{print }'`
16341		case "$overs" in
16342		 0.*) ;;	# Should we squawk?
16343		 1.0.*) ;;	# Should we squawk?
16344		 1.1.*) ;;	# Should we squawk?
16345		 3.*)
16346		    oinc=`openssl --variable=includedir`
16347		    olib=`openssl --variable=libdir`
16348		    # How should we use these?
16349		    ;;
16350		 *) ;;	# Should we squawk?
16351		esac
16352		# /ntpbuild/include/openssl/opensslv.h:# define OPENSSL_VERSION_TEXT    "OpenSSL 1.1.1t  7 Feb 2023"
16353		# grep 1.1.1t /ntpbuild/lib/libcrypto.a
16354		# strings -a /ntpbuild/lib/libcrypto.a | grep 1.1.1t
16355		# OpenSSL 1.1.1t  7 Feb 2023
16356		# harlan@ntp-testbuild.tal1>
16357		# which should match $overf
16358		##
16359		# harlan@ntp-testbuild.tal1> echo '"OpenSSL 1.1.1t  7 Feb 2023"' | cut -f 2 -d\"
16360		# OpenSSL 1.1.1t  7 Feb 2023
16361		# harlan@ntp-testbuild.tal1> grep OPENSSL_VERSION_TEXT /ntpbuild/include/openssl/opensslv.h
16362		# # define OPENSSL_VERSION_TEXT    "OpenSSL 1.1.1t  7 Feb 2023"
16363		# harlan@ntp-testbuild.tal1>
16364		##
16365
16366	    else
16367		# This is a hack, but it's reasonable.
16368		pkgpath="`echo $PATH_OPENSSL | sed -e 's:/bin/openssl$::'`/lib/pkgconfig"
16369		test -d "$pkgpath" || pkgpath=
16370		# echo "pkgpath is <$pkgpath>"
16371		# echo "PKG_CONFIG_PATH is <$PKG_CONFIG_PATH>"
16372		case "$pkgpath" in
16373		 '') ;;	# Nothing to see here...
16374		 *) case ":$PKG_CONFIG_PATH:" in
16375		     ::)
16376			PKG_CONFIG_PATH=$pkgpath
16377			export PKG_CONFIG_PATH
16378			;;
16379		     *:$pkgpath:*)
16380			# Already there...
16381			;;
16382		     *)
16383			PKG_CONFIG_PATH="$pkgpath:$PKG_CONFIG_PATH"
16384			export PKG_CONFIG_PATH
16385			;;
16386		    esac
16387		    ;;
16388		esac
16389	    fi
16390	    ;;
16391        esac
16392    done
16393    ##EO
16394
16395    for pkg in `echo $with_crypto | $SED -e 's/,/ /'`; do
16396	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
16397printf %s "checking pkg-config for $pkg... " >&6; }
16398	if $PKG_CONFIG --exists $pkg ; then
16399	    ntp_ssl_cppflags="`$PKG_CONFIG --cflags-only-I $pkg`"
16400	    case "$ntp_ssl_cppflags" in
16401	     '')
16402		ntp_ssl_incdir='not needed'
16403		;;
16404	     *)
16405		ntp_ssl_incdir="`echo $ntp_ssl_cppflags | $SED -e 's/-I//'`"
16406	    esac
16407	    ntp_ssl_cflags="`$PKG_CONFIG --cflags-only-other $pkg`"
16408	    ntp_ssl_libs_L="`$PKG_CONFIG --libs-only-L $pkg`"
16409	    case "$ntp_ssl_libs_L" in
16410	     '')
16411		ntp_ssl_libdir='not needed'
16412		;;
16413	     *)
16414		ntp_ssl_libdir="`echo $ntp_ssl_libs_L | $SED -e 's/-L//'`"
16415	    esac
16416	    ntp_ssl_libs_l="`$PKG_CONFIG --libs-only-l $pkg`"
16417	    ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
16418	    ntp_ssl_ldflags="`$PKG_CONFIG --libs-only-other $pkg`"
16419	    ntp_openssl=yes
16420	    ntp_openssl_from_pkg_config=yes
16421	    ntp_openssl_version="`$PKG_CONFIG --modversion $pkg`"
16422	    case "$ntp_openssl_version" in
16423	     *.*) ;;
16424	     *) ntp_openssl_version='(unknown)' ;;
16425	    esac
16426	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5
16427printf "%s\n" "yes, version $ntp_openssl_version" >&6; }
16428
16429	    break
16430	fi
16431	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16432printf "%s\n" "no" >&6; }
16433    done
16434    { pkg=; unset pkg;}
16435esac
16436case "$with_crypto" in
16437 no) ;;
16438 *)
16439    case "$with_openssl_libdir" in
16440     '') ;;
16441     *)
16442	ntp_ssl_libdir="$with_openssl_libdir"
16443	ntp_ssl_libs_L="-L$with_openssl_libdir"
16444	ntp_ssl_libs_l="-lcrypto"
16445	ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
16446    esac
16447    case "$with_openssl_incdir" in
16448     '') ;;
16449     *)
16450	ntp_ssl_incdir="$with_openssl_incdir"
16451	ntp_ssl_cppflags="-I$with_openssl_incdir"
16452    esac
16453esac
16454
16455	case "$enable_verbose_ssl" in
16456	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL Phase I checks:" >&5
16457printf "%s\n" "$as_me: OpenSSL Phase I checks:" >&6;}
16458	esac
16459
16460
16461	case "$enable_verbose_ssl" in
16462	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&5
16463printf "%s\n" "$as_me: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&6;}
16464	esac
16465
16466
16467	case "$enable_verbose_ssl" in
16468	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CFLAGS_NTP:   ($CFLAGS_NTP)" >&5
16469printf "%s\n" "$as_me: CFLAGS_NTP:   ($CFLAGS_NTP)" >&6;}
16470	esac
16471
16472
16473	case "$enable_verbose_ssl" in
16474	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDADD_NTP:    ($LDADD_NTP)" >&5
16475printf "%s\n" "$as_me: LDADD_NTP:    ($LDADD_NTP)" >&6;}
16476	esac
16477
16478
16479	case "$enable_verbose_ssl" in
16480	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDFLAGS_NTP:  ($LDFLAGS_NTP)" >&5
16481printf "%s\n" "$as_me: LDFLAGS_NTP:  ($LDFLAGS_NTP)" >&6;}
16482	esac
16483
16484
16485	case "$enable_verbose_ssl" in
16486	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_openssl_from_pkg_config: $ntp_openssl_from_pkg_config" >&5
16487printf "%s\n" "$as_me: ntp_openssl_from_pkg_config: $ntp_openssl_from_pkg_config" >&6;}
16488	esac
16489
16490
16491	case "$enable_verbose_ssl" in
16492	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_incdir:   ($ntp_ssl_incdir)" >&5
16493printf "%s\n" "$as_me: ntp_ssl_incdir:   ($ntp_ssl_incdir)" >&6;}
16494	esac
16495
16496
16497	case "$enable_verbose_ssl" in
16498	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libdir:   ($ntp_ssl_libdir)" >&5
16499printf "%s\n" "$as_me: ntp_ssl_libdir:   ($ntp_ssl_libdir)" >&6;}
16500	esac
16501
16502
16503	case "$enable_verbose_ssl" in
16504	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cflags:   ($ntp_ssl_cflags)" >&5
16505printf "%s\n" "$as_me: ntp_ssl_cflags:   ($ntp_ssl_cflags)" >&6;}
16506	esac
16507
16508
16509	case "$enable_verbose_ssl" in
16510	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&5
16511printf "%s\n" "$as_me: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&6;}
16512	esac
16513
16514
16515	case "$enable_verbose_ssl" in
16516	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_L:   ($ntp_ssl_libs_L)" >&5
16517printf "%s\n" "$as_me: ntp_ssl_libs_L:   ($ntp_ssl_libs_L)" >&6;}
16518	esac
16519
16520
16521	case "$enable_verbose_ssl" in
16522	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_l:   ($ntp_ssl_libs_l)" >&5
16523printf "%s\n" "$as_me: ntp_ssl_libs_l:   ($ntp_ssl_libs_l)" >&6;}
16524	esac
16525
16526
16527	case "$enable_verbose_ssl" in
16528	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs:     ($ntp_ssl_libs)" >&5
16529printf "%s\n" "$as_me: ntp_ssl_libs:     ($ntp_ssl_libs)" >&6;}
16530	esac
16531
16532
16533	case "$enable_verbose_ssl" in
16534	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_ldflags:  ($ntp_ssl_ldflags)" >&5
16535printf "%s\n" "$as_me: ntp_ssl_ldflags:  ($ntp_ssl_ldflags)" >&6;}
16536	esac
16537
16538
16539
16540case "$with_crypto" in
16541 no)
16542    ntp_openssl=no
16543    ;;
16544 *)
16545    ntp_ssl_libs_l="${ntp_ssl_libs_l:--lcrypto}"
16546    ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
16547    case "$ntp_ssl_libdir" in
16548     '')
16549
16550		{ ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;}
16551	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for libcrypto without -L" >&5
16552printf "%s\n" "$as_me: Searching for libcrypto without -L" >&6;}
16553	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5
16554printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; }
16555if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y}
16556then :
16557  printf %s "(cached) " >&6
16558else $as_nop
16559  ac_check_lib_save_LIBS=$LIBS
16560LIBS="-lcrypto  $LIBS"
16561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16562/* end confdefs.h.  */
16563
16564/* Override any GCC internal prototype to avoid an error.
16565   Use char because int might match the return type of a GCC
16566   builtin and then its argument prototype would still apply.  */
16567char EVP_MD_CTX_new ();
16568int
16569main (void)
16570{
16571return EVP_MD_CTX_new ();
16572  ;
16573  return 0;
16574}
16575_ACEOF
16576if ac_fn_c_try_link "$LINENO"
16577then :
16578  ac_cv_lib_crypto_EVP_MD_CTX_new=yes
16579else $as_nop
16580  ac_cv_lib_crypto_EVP_MD_CTX_new=no
16581fi
16582rm -f core conftest.err conftest.$ac_objext conftest.beam \
16583    conftest$ac_exeext conftest.$ac_ext
16584LIBS=$ac_check_lib_save_LIBS
16585fi
16586{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5
16587printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; }
16588if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes
16589then :
16590  ntp_ssl_libdir='not needed'
16591
16592fi
16593
16594		{ ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;}
16595    esac
16596    case "$ntp_ssl_libdir" in
16597     '')
16598	ntp_ssl_libdir_search="/usr/lib /usr/lib/openssl /usr/sfw/lib"
16599	ntp_ssl_libdir_search="$ntp_ssl_libdir_search /usr/local/lib"
16600	ntp_ssl_libdir_search="$ntp_ssl_libdir_search /usr/local/ssl/lib"
16601	ntp_ssl_libdir_search="$ntp_ssl_libdir_search /opt/local/lib"
16602	ntp_ssl_libdir_search="$ntp_ssl_libdir_search /lib /lib64"
16603	;;
16604     *)
16605	ntp_ssl_libdir_search="$ntp_ssl_libdir"
16606    esac
16607    case $ntp_ssl_libdir_search in
16608     'not needed') ;;
16609     *)
16610	for i in $ntp_ssl_libdir_search not_found
16611	do
16612	    case "$i" in
16613	     not_found) ;;
16614	     *)
16615		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for libcrypto in $i" >&5
16616printf "%s\n" "$as_me: Searching for libcrypto in $i" >&6;}
16617		LIBS="-L$i $NTPSSL_SAVED_LIBS"
16618		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5
16619printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; }
16620if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y}
16621then :
16622  printf %s "(cached) " >&6
16623else $as_nop
16624  ac_check_lib_save_LIBS=$LIBS
16625LIBS="-lcrypto  $LIBS"
16626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16627/* end confdefs.h.  */
16628
16629/* Override any GCC internal prototype to avoid an error.
16630   Use char because int might match the return type of a GCC
16631   builtin and then its argument prototype would still apply.  */
16632char EVP_MD_CTX_new ();
16633int
16634main (void)
16635{
16636return EVP_MD_CTX_new ();
16637  ;
16638  return 0;
16639}
16640_ACEOF
16641if ac_fn_c_try_link "$LINENO"
16642then :
16643  ac_cv_lib_crypto_EVP_MD_CTX_new=yes
16644else $as_nop
16645  ac_cv_lib_crypto_EVP_MD_CTX_new=no
16646fi
16647rm -f core conftest.err conftest.$ac_objext conftest.beam \
16648    conftest$ac_exeext conftest.$ac_ext
16649LIBS=$ac_check_lib_save_LIBS
16650fi
16651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5
16652printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; }
16653if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes
16654then :
16655  break
16656
16657fi
16658
16659				{ ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;}
16660	    esac
16661	done
16662	ntp_ssl_libdir="$i"
16663	ntp_ssl_libs_L="-L$i"
16664	ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
16665	LIBS="$NTPSSL_SAVED_LIBS"
16666	case "$ntp_ssl_libdir" in
16667	 not_found)
16668	    as_fn_error $? "You may want to use --without-crypto, or add
16669openssl.pc/libcrypto.pc to PKG_CONFIG_PATH, or use the
16670--with-openssl-libdir=/some/path option to configure.
16671libcrypto not found in any of the following directories:
16672$ntp_ssl_libdir_search
16673	    " "$LINENO" 5
16674	esac
16675	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: libcrypto found in $ntp_ssl_libdir" >&5
16676printf "%s\n" "$as_me: libcrypto found in $ntp_ssl_libdir" >&6;}
16677    esac
16678
16679    case "$ntp_openssl_from_pkg_config:$ntp_ssl_incdir" in
16680     'yes:not needed' | no:)
16681	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl/evp.h without -I" >&5
16682printf "%s\n" "$as_me: Searching for openssl/evp.h without -I" >&6;}
16683		{ ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;}
16684	ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
16685if test "x$ac_cv_header_openssl_evp_h" = xyes
16686then :
16687  ntp_ssl_incdir='not needed'
16688
16689fi
16690
16691    esac
16692    case "$ntp_ssl_incdir" in
16693     'not needed')
16694	ntp_ssl_incdir_search="$ntp_ssl_incdir"
16695	;;
16696     *)
16697	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl include directory" >&5
16698printf "%s\n" "$as_me: Searching for openssl include directory" >&6;}
16699	case "$with_openssl_incdir" in
16700	 '')
16701	    case "$ntp_ssl_incdir" in
16702	     '')
16703		ntp_ssl_incdir_search="/usr/include /usr/sfw/include"
16704		ntp_ssl_incdir_search="$ntp_ssl_incdir_search /usr/local/include"
16705		ntp_ssl_incdir_search="$ntp_ssl_incdir_search /opt/local/include"
16706		ntp_ssl_incdir_search="$ntp_ssl_incdir_search /usr/local/ssl/include"
16707		;;
16708	     *)
16709	    esac
16710	    ;;
16711	 *)
16712	    ntp_ssl_incdir_search="$with_openssl_incdir"
16713	esac
16714	case $ntp_ssl_incdir_search in
16715	 'not needed') ;;
16716	 *)
16717	    for i in $ntp_ssl_incdir_search
16718	    do
16719		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl/evp.h in $i" >&5
16720printf "%s\n" "$as_me: Searching for openssl/evp.h in $i" >&6;}
16721		CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS -I$i"
16722				{ ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;}
16723		ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
16724if test "x$ac_cv_header_openssl_evp_h" = xyes
16725then :
16726  ntp_ssl_incdir="$i" ; break
16727
16728fi
16729
16730	    done
16731	    { ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;}
16732	    { i=; unset i;}
16733	    CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS"
16734	    case "$ntp_ssl_incdir" in
16735	     '')
16736		as_fn_error $? "You may want to use --without-crypto, or add
16737openssl.pc/libcrypto.pc to PKG_CONFIG_PATH, or use the
16738-with-openssl-incdir=/some/path option to configure.
16739No usable openssl/evp.h found in any of the following direcotries:
16740$ntp_ssl_incdir_search
16741		" "$LINENO" 5
16742	    esac
16743	    ntp_ssl_cppflags="-I$ntp_ssl_incdir"
16744	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Found evp.h in $ntp_ssl_incdir/openssl" >&5
16745printf "%s\n" "$as_me: Found evp.h in $ntp_ssl_incdir/openssl" >&6;}
16746	esac
16747    esac
16748    ntp_openssl=yes
16749esac
16750case "$ntp_openssl:$ntp_ssl_libdir" in
16751 'yes:not needed')
16752    ;;
16753 yes:*)
16754    CFLAGS="$NTPSSL_SAVED_CFLAGS $ntp_ssl_cflags"
16755    CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
16756    LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
16757    LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
16758        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto works without runpath" >&5
16759printf %s "checking if crypto works without runpath... " >&6; }
16760if test ${ntp_cv_ssl_without_runpath+y}
16761then :
16762  printf %s "(cached) " >&6
16763else $as_nop
16764  if test "$cross_compiling" = yes
16765then :
16766  ntp_cv_ssl_without_runpath=yes
16767else $as_nop
16768  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16769/* end confdefs.h.  */
16770
16771		    #include "openssl/evp.h"
16772
16773int
16774main (void)
16775{
16776
16777		    if (!EVP_MD_CTX_new()) {
16778			return 1;
16779		    }
16780
16781
16782  ;
16783  return 0;
16784}
16785_ACEOF
16786if ac_fn_c_try_run "$LINENO"
16787then :
16788  ntp_cv_ssl_without_runpath=yes
16789else $as_nop
16790  ntp_cv_ssl_without_runpath=no
16791fi
16792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16793  conftest.$ac_objext conftest.beam conftest.$ac_ext
16794fi
16795
16796
16797fi
16798{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_without_runpath" >&5
16799printf "%s\n" "$ntp_cv_ssl_without_runpath" >&6; }
16800    case "$ntp_cv_ssl_without_runpath" in
16801     no)
16802	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto needs -Wl,-rpath,$ntp_ssl_libdir" >&5
16803printf %s "checking if crypto needs -Wl,-rpath,$ntp_ssl_libdir... " >&6; }
16804if test ${ntp_cv_ssl_needs_dashWl_rpath+y}
16805then :
16806  printf %s "(cached) " >&6
16807else $as_nop
16808
16809		LDFLAGS="$ntp_ssl_ldflags -Wl,-rpath,$ntp_ssl_libdir $NTPSSL_SAVED_LDFLAGS"
16810		if test "$cross_compiling" = yes
16811then :
16812  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16813printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16814as_fn_error $? "cannot run test program while cross compiling
16815See \`config.log' for more details" "$LINENO" 5; }
16816else $as_nop
16817  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16818/* end confdefs.h.  */
16819
16820			    #include "openssl/evp.h"
16821
16822int
16823main (void)
16824{
16825
16826			    if (!EVP_MD_CTX_new()) {
16827				return 1;
16828			    }
16829
16830
16831  ;
16832  return 0;
16833}
16834_ACEOF
16835if ac_fn_c_try_run "$LINENO"
16836then :
16837  ntp_cv_ssl_needs_dashWl_rpath=yes
16838else $as_nop
16839  ntp_cv_ssl_needs_dashWl_rpath=no
16840
16841fi
16842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16843  conftest.$ac_objext conftest.beam conftest.$ac_ext
16844fi
16845
16846
16847
16848fi
16849{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_needs_dashWl_rpath" >&5
16850printf "%s\n" "$ntp_cv_ssl_needs_dashWl_rpath" >&6; }
16851	case "$ntp_cv_ssl_needs_dashWl_rpath" in
16852	 yes)
16853	    ntp_ssl_ldflags="$ntp_ssl_ldflags -Wl,-rpath,$ntp_ssl_libdir"
16854	    ;;
16855	 no)
16856	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto needs -R$ntp_ssl_libdir" >&5
16857printf %s "checking if crypto needs -R$ntp_ssl_libdir... " >&6; }
16858if test ${ntp_cv_ssl_needs_dashR+y}
16859then :
16860  printf %s "(cached) " >&6
16861else $as_nop
16862
16863		    LDFLAGS="$NTPSSL_SAVED_LDFLAGS $ntp_ssl_ldflags -R$ntp_ssl_libdir"
16864		    if test "$cross_compiling" = yes
16865then :
16866  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16867printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16868as_fn_error $? "cannot run test program while cross compiling
16869See \`config.log' for more details" "$LINENO" 5; }
16870else $as_nop
16871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16872/* end confdefs.h.  */
16873
16874				#include "openssl/evp.h"
16875
16876int
16877main (void)
16878{
16879
16880				if (!EVP_MD_CTX_new()) {
16881				    return 1;
16882				}
16883
16884
16885  ;
16886  return 0;
16887}
16888_ACEOF
16889if ac_fn_c_try_run "$LINENO"
16890then :
16891  ntp_cv_ssl_needs_dashR=yes
16892else $as_nop
16893  ntp_cv_ssl_needs_dashR=no
16894
16895fi
16896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16897  conftest.$ac_objext conftest.beam conftest.$ac_ext
16898fi
16899
16900
16901
16902fi
16903{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_needs_dashR" >&5
16904printf "%s\n" "$ntp_cv_ssl_needs_dashR" >&6; }
16905	    case "$ntp_cv_ssl_needs_dashR" in
16906	     yes)
16907		ntp_ssl_ldflags="$ntp_ssl_ldflags -R$ntp_ssl_libdir"
16908	    esac
16909	    case "$build:$ntp_cv_ssl_needs_dashR" in
16910	     $host:no)
16911		{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16912printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16913as_fn_error $? "Unable to run program using crypto, check openssl.pc
16914or libcrypto.pc are in PKG_CONFIG_PATH, or provide the
16915 --with-openssl-libdir=/some/path option to configure.
16916
16917See \`config.log' for more details" "$LINENO" 5; }
16918	    esac
16919	esac
16920    esac
16921esac
16922	case "$enable_verbose_ssl" in
16923	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL Phase II checks:" >&5
16924printf "%s\n" "$as_me: OpenSSL Phase II checks:" >&6;}
16925	esac
16926
16927
16928	case "$enable_verbose_ssl" in
16929	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_incdir:   ($ntp_ssl_incdir)" >&5
16930printf "%s\n" "$as_me: ntp_ssl_incdir:   ($ntp_ssl_incdir)" >&6;}
16931	esac
16932
16933
16934	case "$enable_verbose_ssl" in
16935	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libdir:   ($ntp_ssl_libdir)" >&5
16936printf "%s\n" "$as_me: ntp_ssl_libdir:   ($ntp_ssl_libdir)" >&6;}
16937	esac
16938
16939
16940	case "$enable_verbose_ssl" in
16941	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cflags:   ($ntp_ssl_cflags)" >&5
16942printf "%s\n" "$as_me: ntp_ssl_cflags:   ($ntp_ssl_cflags)" >&6;}
16943	esac
16944
16945
16946	case "$enable_verbose_ssl" in
16947	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&5
16948printf "%s\n" "$as_me: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&6;}
16949	esac
16950
16951
16952	case "$enable_verbose_ssl" in
16953	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_L:   ($ntp_ssl_libs_L)" >&5
16954printf "%s\n" "$as_me: ntp_ssl_libs_L:   ($ntp_ssl_libs_L)" >&6;}
16955	esac
16956
16957
16958	case "$enable_verbose_ssl" in
16959	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_l:   ($ntp_ssl_libs_l)" >&5
16960printf "%s\n" "$as_me: ntp_ssl_libs_l:   ($ntp_ssl_libs_l)" >&6;}
16961	esac
16962
16963
16964	case "$enable_verbose_ssl" in
16965	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs:     ($ntp_ssl_libs)" >&5
16966printf "%s\n" "$as_me: ntp_ssl_libs:     ($ntp_ssl_libs)" >&6;}
16967	esac
16968
16969
16970	case "$enable_verbose_ssl" in
16971	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_ldflags:  ($ntp_ssl_ldflags)" >&5
16972printf "%s\n" "$as_me: ntp_ssl_ldflags:  ($ntp_ssl_ldflags)" >&6;}
16973	esac
16974
16975
16976
16977case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
16978 yes:no)
16979    CFLAGS="$NTPSSL_SAVED_CFLAGS $ntp_ssl_cflags"
16980    CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
16981    LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
16982    LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
16983    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with $ntp_ssl_libs_l alone works" >&5
16984printf %s "checking if linking with $ntp_ssl_libs_l alone works... " >&6; }
16985if test ${ntp_cv_bare_lcrypto+y}
16986then :
16987  printf %s "(cached) " >&6
16988else $as_nop
16989  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16990/* end confdefs.h.  */
16991
16992		    #include "openssl/evp.h"
16993
16994int
16995main (void)
16996{
16997
16998		    EVP_MD_CTX_new();
16999
17000
17001  ;
17002  return 0;
17003}
17004_ACEOF
17005if ac_fn_c_try_link "$LINENO"
17006then :
17007  ntp_cv_bare_lcrypto=yes
17008else $as_nop
17009  ntp_cv_bare_lcrypto=no
17010
17011fi
17012rm -f core conftest.err conftest.$ac_objext conftest.beam \
17013    conftest$ac_exeext conftest.$ac_ext
17014
17015fi
17016{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
17017printf "%s\n" "$ntp_cv_bare_lcrypto" >&6; }
17018    case "$ntp_cv_bare_lcrypto" in
17019     no)
17020	LIBS="-$ntp_ssl_libs -lz $NTPSSL_SAVED_LIBS"
17021	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with $ntp_ssl_libs_l -lz works" >&5
17022printf %s "checking if linking with $ntp_ssl_libs_l -lz works... " >&6; }
17023if test ${ntp_cv_lcrypto_lz+y}
17024then :
17025  printf %s "(cached) " >&6
17026else $as_nop
17027  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17028/* end confdefs.h.  */
17029
17030			#include "openssl/evp.h"
17031
17032int
17033main (void)
17034{
17035
17036			EVP_MD_CTX_new();
17037
17038
17039  ;
17040  return 0;
17041}
17042_ACEOF
17043if ac_fn_c_try_link "$LINENO"
17044then :
17045  ntp_cv_lcrypto_lz=yes
17046else $as_nop
17047  ntp_cv_lcrypto_lz=no
17048
17049fi
17050rm -f core conftest.err conftest.$ac_objext conftest.beam \
17051    conftest$ac_exeext conftest.$ac_ext
17052
17053fi
17054{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
17055printf "%s\n" "$ntp_cv_lcrypto_lz" >&6; }
17056	case "$ntp_cv_lcrypto_lz" in
17057	 yes)
17058	     ntp_ssl_libs_l="$ntp_ssl_libs_l -lz"
17059	     ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
17060	esac
17061    esac	esac
17062case "$ntp_openssl:$GCC" in
17063 yes:yes)
17064    CFLAGS="$NTP_SAVED_CFLAGS $ntp_ssl_cflags -Werror"
17065    CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
17066    LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
17067    LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
17068    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking If $CC supports -Werror" >&5
17069printf %s "checking If $CC supports -Werror... " >&6; }
17070if test ${ntp_cv_gcc_supports_Werror+y}
17071then :
17072  printf %s "(cached) " >&6
17073else $as_nop
17074  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17075/* end confdefs.h.  */
17076
17077int
17078main (void)
17079{
17080
17081  ;
17082  return 0;
17083}
17084_ACEOF
17085if ac_fn_c_try_compile "$LINENO"
17086then :
17087  ntp_cv_gcc_supports_Werror=yes
17088else $as_nop
17089  ntp_cv_gcc_supports_Werror=no
17090
17091fi
17092rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17093
17094fi
17095{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_supports_Werror" >&5
17096printf "%s\n" "$ntp_cv_gcc_supports_Werror" >&6; }
17097    case "ntp_cv_gcc_supports_Werror" in
17098     no)
17099	ntp_use_Wstrict_prototypes=yes
17100	;;
17101     yes)
17102	CFLAGS="$CFLAGS -Wstrict-prototypes"
17103	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if OpenSSL triggers warnings" >&5
17104printf %s "checking if OpenSSL triggers warnings... " >&6; }
17105if test ${ntp_cv_ssl_triggers_warnings+y}
17106then :
17107  printf %s "(cached) " >&6
17108else $as_nop
17109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17110/* end confdefs.h.  */
17111
17112			#include "openssl/asn1_mac.h"
17113			#include "openssl/bn.h"
17114			#include "openssl/err.h"
17115			#include "openssl/evp.h"
17116			#include "openssl/pem.h"
17117			#include "openssl/rand.h"
17118			#include "openssl/x509v3.h"
17119
17120int
17121main (void)
17122{
17123
17124			/* empty body */
17125
17126
17127  ;
17128  return 0;
17129}
17130_ACEOF
17131if ac_fn_c_try_compile "$LINENO"
17132then :
17133  ntp_cv_ssl_triggers_warnings=no
17134else $as_nop
17135  ntp_cv_ssl_triggers_warnings=yes
17136
17137fi
17138rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17139
17140fi
17141{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_triggers_warnings" >&5
17142printf "%s\n" "$ntp_cv_ssl_triggers_warnings" >&6; }
17143	case "$ntp_cv_ssl_triggers_warnings" in
17144	 yes)
17145	    ntp_use_Wstrict_prototypes=no
17146	    ;;
17147	 *)
17148	    ntp_use_Wstrict_prototypes=yes
17149	esac
17150    esac
17151    case "$ntp_use_Wstrict_prototypes" in
17152     no)
17153	ntp_ssl_cflags="$ntp_ssl_cflags -Wno-strict-prototypes"
17154	;;
17155     *)
17156	ntp_ssl_cflags="$ntp_ssl_cflags -Wstrict-prototypes"
17157    esac
17158    ;;
17159 no:yes)
17160        ntp_ssl_cflags="$ntp_ssl_cflags -Wstrict-prototypes"
17161esac
17162{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we will link to ssl library" >&5
17163printf %s "checking if we will link to ssl library... " >&6; }
17164{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
17165printf "%s\n" "$ntp_openssl" >&6; }
17166
17167case "$ntp_openssl" in
17168 yes)
17169    VER_SUFFIX=o
17170           for ac_header in openssl/cmac.h
17171do :
17172  ac_fn_c_check_header_compile "$LINENO" "openssl/cmac.h" "ac_cv_header_openssl_cmac_h" "$ac_includes_default"
17173if test "x$ac_cv_header_openssl_cmac_h" = xyes
17174then :
17175  printf "%s\n" "#define HAVE_OPENSSL_CMAC_H 1" >>confdefs.h
17176 ntp_enable_cmac=yes
17177else $as_nop
17178  ntp_enable_cmac=no
17179
17180fi
17181
17182done
17183    case "$ntp_enable_cmac" in
17184     yes)
17185
17186printf "%s\n" "#define ENABLE_CMAC 1" >>confdefs.h
17187
17188    esac
17189
17190printf "%s\n" "#define OPENSSL /**/" >>confdefs.h
17191
17192
17193printf "%s\n" "#define OPENSSL_SUPPRESS_DEPRECATED 1" >>confdefs.h
17194
17195        CFLAGS="$NTPSSL_SAVED_CFLAGS"
17196    ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
17197if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes
17198then :
17199  printf "%s\n" "#define HAVE_EVP_MD_DO_ALL_SORTED 1" >>confdefs.h
17200
17201fi
17202
17203    CPPFLAGS_NTP="$CPPFLAGS_NTP $ntp_ssl_cppflags"
17204    CFLAGS_NTP="$CFLAGS_NTP $ntp_ssl_cflags"
17205    LDADD_NTP="$ntp_ssl_libs $LDADD_NTP"
17206    LDFLAGS_NTP="$ntp_ssl_ldflags $LDFLAGS_NTP"
17207esac
17208
17209	case "$enable_verbose_ssl" in
17210	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL final checks:" >&5
17211printf "%s\n" "$as_me: OpenSSL final checks:" >&6;}
17212	esac
17213
17214
17215	case "$enable_verbose_ssl" in
17216	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_openssl:  $ntp_openssl" >&5
17217printf "%s\n" "$as_me: ntp_openssl:  $ntp_openssl" >&6;}
17218	esac
17219
17220
17221	case "$enable_verbose_ssl" in
17222	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&5
17223printf "%s\n" "$as_me: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&6;}
17224	esac
17225
17226
17227	case "$enable_verbose_ssl" in
17228	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CFLAGS_NTP:   ($CFLAGS_NTP)" >&5
17229printf "%s\n" "$as_me: CFLAGS_NTP:   ($CFLAGS_NTP)" >&6;}
17230	esac
17231
17232
17233	case "$enable_verbose_ssl" in
17234	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDADD_NTP:    ($LDADD_NTP)" >&5
17235printf "%s\n" "$as_me: LDADD_NTP:    ($LDADD_NTP)" >&6;}
17236	esac
17237
17238
17239	case "$enable_verbose_ssl" in
17240	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDFLAGS_NTP:  ($LDFLAGS_NTP)" >&5
17241printf "%s\n" "$as_me: LDFLAGS_NTP:  ($LDFLAGS_NTP)" >&6;}
17242	esac
17243
17244
17245
17246CFLAGS="$NTPSSL_SAVED_CFLAGS"
17247CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS"
17248LIBS="$NTPSSL_SAVED_LIBS"
17249LDFLAGS="$NTPSSL_SAVED_LDFLAGS"
17250
17251{ NTPSSL_SAVED_CFLAGS=; unset NTPSSL_SAVED_CFLAGS;}
17252{ NTPSSL_SAVED_CPPFLAGS=; unset NTPSSL_SAVED_CPPFLAGS;}
17253{ NTPSSL_SAVED_LIBS=; unset NTPSSL_SAVED_LIBS;}
17254{ NTPSSL_SAVED_LDFLAGS=; unset NTPSSL_SAVED_LDFLAGS;}
17255{ ntp_enable_cmac=; unset ntp_enable_cmac;}
17256{ ntp_use_Wstrict_prototypes=; unset ntp_use_Wstrict_prototypes;}
17257{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
17258{ ntp_openssl_version=; unset ntp_openssl_version;}
17259{ ntp_ssl_cflags=; unset ntp_ssl_cflags;}
17260{ ntp_ssl_cppflags=; unset ntp_ssl_cppflags;}
17261{ ntp_ssl_libdir_search=; unset ntp_ssl_libdir_search;}
17262{ ntp_ssl_incdir_search=; unset ntp_ssl_incdir_search;}
17263{ ntp_ssl_libdir=; unset ntp_ssl_libdir;}
17264{ ntp_ssl_incdir=; unset ntp_ssl_incdir;}
17265{ ntp_ssl_libs_l=; unset ntp_ssl_libs_l;}
17266{ ntp_ssl_libs_L=; unset ntp_ssl_libs_L;}
17267{ ntp_ssl_ldflags=; unset ntp_ssl_ldflags;}
17268
17269
17270
17271
17272
17273{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use SSL library's secure random numbers" >&5
17274printf %s "checking if we want to use SSL library's secure random numbers... " >&6; }
17275# Check whether --enable-openssl-random was given.
17276if test ${enable_openssl_random+y}
17277then :
17278  enableval=$enable_openssl_random; ntp_use_openssl_random=$enableval ; ntp_ssl_random_mandatory=$enableval
17279else $as_nop
17280  ntp_use_openssl_random=yes ; ntp_ssl_random_mandatory=no
17281
17282fi
17283
17284{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_openssl_random" >&5
17285printf "%s\n" "$ntp_use_openssl_random" >&6; }
17286
17287# The following might need extra libraries
17288NTPO_SAVED_LIBS="$LIBS"
17289LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
17290ac_fn_c_check_func "$LINENO" "RAND_bytes" "ac_cv_func_RAND_bytes"
17291if test "x$ac_cv_func_RAND_bytes" = xyes
17292then :
17293  printf "%s\n" "#define HAVE_RAND_BYTES 1" >>confdefs.h
17294
17295fi
17296ac_fn_c_check_func "$LINENO" "RAND_poll" "ac_cv_func_RAND_poll"
17297if test "x$ac_cv_func_RAND_poll" = xyes
17298then :
17299  printf "%s\n" "#define HAVE_RAND_POLL 1" >>confdefs.h
17300
17301fi
17302
17303LIBS="$NTPO_SAVED_LIBS"
17304case "$ntp_openssl$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
17305 yesyesyesyes)
17306    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using SSL library's secure random number generator" >&5
17307printf "%s\n" "$as_me: Using SSL library's secure random number generator" >&6;}
17308
17309printf "%s\n" "#define USE_OPENSSL_CRYPTO_RAND 1" >>confdefs.h
17310
17311    ;;
17312 *)
17313    ntp_use_openssl_random=no
17314    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: SSL library's secure random number generator unavailable." >&5
17315printf "%s\n" "$as_me: SSL library's secure random number generator unavailable." >&6;}
17316    case "$ntp_ssl_random_mandatory" in
17317     yes)
17318	as_fn_error $? "No suitable SSL library was found and
17319--enable-openssl-random was given..  Remove --enable-openssl-random
17320if you wish to build without a cryptographically secure random number
17321generator.
17322
17323WARNING: Use of ntp-keygen without a secure RNG may generate
17324-------  keys that are predictable.
17325	" "$LINENO" 5
17326	;;
17327     *)
17328	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: WARNING: Use of ntp-keygen without a secure RNG may generate
17329-------  keys that are predictable.
17330	" >&5
17331printf "%s\n" "$as_me: WARNING: WARNING: Use of ntp-keygen without a secure RNG may generate
17332-------  keys that are predictable.
17333	" >&2;}
17334    esac
17335esac
17336
17337{ ntp_ssl_random_mandatory=; unset ntp_ssl_random_mandatory;}
17338
17339
17340
17341LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
17342LIBS=$SAVED_LIBS
17343{ SAVED_LIBS=; unset SAVED_LIBS;}
17344
17345
17346
17347case `pwd` in
17348  *\ * | *\	*)
17349    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
17350printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
17351esac
17352
17353
17354
17355macro_version='2.4.6'
17356macro_revision='2.4.6'
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371ltmain=$ac_aux_dir/ltmain.sh
17372
17373# Backslashify metacharacters that are still active within
17374# double-quoted strings.
17375sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
17376
17377# Same as above, but do not quote variable references.
17378double_quote_subst='s/\(["`\\]\)/\\\1/g'
17379
17380# Sed substitution to delay expansion of an escaped shell variable in a
17381# double_quote_subst'ed string.
17382delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
17383
17384# Sed substitution to delay expansion of an escaped single quote.
17385delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
17386
17387# Sed substitution to avoid accidental globbing in evaled expressions
17388no_glob_subst='s/\*/\\\*/g'
17389
17390{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
17391printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
17392if test ${lt_cv_path_NM+y}
17393then :
17394  printf %s "(cached) " >&6
17395else $as_nop
17396  if test -n "$NM"; then
17397  # Let the user override the test.
17398  lt_cv_path_NM=$NM
17399else
17400  lt_nm_to_check=${ac_tool_prefix}nm
17401  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
17402    lt_nm_to_check="$lt_nm_to_check nm"
17403  fi
17404  for lt_tmp_nm in $lt_nm_to_check; do
17405    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
17406    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
17407      IFS=$lt_save_ifs
17408      test -z "$ac_dir" && ac_dir=.
17409      tmp_nm=$ac_dir/$lt_tmp_nm
17410      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
17411	# Check to see if the nm accepts a BSD-compat flag.
17412	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
17413	#   nm: unknown option "B" ignored
17414	# Tru64's nm complains that /dev/null is an invalid object file
17415	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
17416	case $build_os in
17417	mingw*) lt_bad_file=conftest.nm/nofile ;;
17418	*) lt_bad_file=/dev/null ;;
17419	esac
17420	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
17421	*$lt_bad_file* | *'Invalid file or object type'*)
17422	  lt_cv_path_NM="$tmp_nm -B"
17423	  break 2
17424	  ;;
17425	*)
17426	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
17427	  */dev/null*)
17428	    lt_cv_path_NM="$tmp_nm -p"
17429	    break 2
17430	    ;;
17431	  *)
17432	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
17433	    continue # so that we can try to find one that supports BSD flags
17434	    ;;
17435	  esac
17436	  ;;
17437	esac
17438      fi
17439    done
17440    IFS=$lt_save_ifs
17441  done
17442  : ${lt_cv_path_NM=no}
17443fi
17444fi
17445{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
17446printf "%s\n" "$lt_cv_path_NM" >&6; }
17447if test no != "$lt_cv_path_NM"; then
17448  NM=$lt_cv_path_NM
17449else
17450  # Didn't find any BSD compatible name lister, look for dumpbin.
17451  if test -n "$DUMPBIN"; then :
17452    # Let the user override the test.
17453  else
17454    if test -n "$ac_tool_prefix"; then
17455  for ac_prog in dumpbin "link -dump"
17456  do
17457    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
17458set dummy $ac_tool_prefix$ac_prog; ac_word=$2
17459{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17460printf %s "checking for $ac_word... " >&6; }
17461if test ${ac_cv_prog_DUMPBIN+y}
17462then :
17463  printf %s "(cached) " >&6
17464else $as_nop
17465  if test -n "$DUMPBIN"; then
17466  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
17467else
17468as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17469for as_dir in $PATH
17470do
17471  IFS=$as_save_IFS
17472  case $as_dir in #(((
17473    '') as_dir=./ ;;
17474    */) ;;
17475    *) as_dir=$as_dir/ ;;
17476  esac
17477    for ac_exec_ext in '' $ac_executable_extensions; do
17478  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
17479    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
17480    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
17481    break 2
17482  fi
17483done
17484  done
17485IFS=$as_save_IFS
17486
17487fi
17488fi
17489DUMPBIN=$ac_cv_prog_DUMPBIN
17490if test -n "$DUMPBIN"; then
17491  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
17492printf "%s\n" "$DUMPBIN" >&6; }
17493else
17494  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17495printf "%s\n" "no" >&6; }
17496fi
17497
17498
17499    test -n "$DUMPBIN" && break
17500  done
17501fi
17502if test -z "$DUMPBIN"; then
17503  ac_ct_DUMPBIN=$DUMPBIN
17504  for ac_prog in dumpbin "link -dump"
17505do
17506  # Extract the first word of "$ac_prog", so it can be a program name with args.
17507set dummy $ac_prog; ac_word=$2
17508{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17509printf %s "checking for $ac_word... " >&6; }
17510if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
17511then :
17512  printf %s "(cached) " >&6
17513else $as_nop
17514  if test -n "$ac_ct_DUMPBIN"; then
17515  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
17516else
17517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17518for as_dir in $PATH
17519do
17520  IFS=$as_save_IFS
17521  case $as_dir in #(((
17522    '') as_dir=./ ;;
17523    */) ;;
17524    *) as_dir=$as_dir/ ;;
17525  esac
17526    for ac_exec_ext in '' $ac_executable_extensions; do
17527  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
17528    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
17529    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
17530    break 2
17531  fi
17532done
17533  done
17534IFS=$as_save_IFS
17535
17536fi
17537fi
17538ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
17539if test -n "$ac_ct_DUMPBIN"; then
17540  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
17541printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
17542else
17543  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17544printf "%s\n" "no" >&6; }
17545fi
17546
17547
17548  test -n "$ac_ct_DUMPBIN" && break
17549done
17550
17551  if test "x$ac_ct_DUMPBIN" = x; then
17552    DUMPBIN=":"
17553  else
17554    case $cross_compiling:$ac_tool_warned in
17555yes:)
17556{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17557printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17558ac_tool_warned=yes ;;
17559esac
17560    DUMPBIN=$ac_ct_DUMPBIN
17561  fi
17562fi
17563
17564    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
17565    *COFF*)
17566      DUMPBIN="$DUMPBIN -symbols -headers"
17567      ;;
17568    *)
17569      DUMPBIN=:
17570      ;;
17571    esac
17572  fi
17573
17574  if test : != "$DUMPBIN"; then
17575    NM=$DUMPBIN
17576  fi
17577fi
17578test -z "$NM" && NM=nm
17579
17580
17581
17582
17583
17584
17585{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
17586printf %s "checking the name lister ($NM) interface... " >&6; }
17587if test ${lt_cv_nm_interface+y}
17588then :
17589  printf %s "(cached) " >&6
17590else $as_nop
17591  lt_cv_nm_interface="BSD nm"
17592  echo "int some_variable = 0;" > conftest.$ac_ext
17593  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
17594  (eval "$ac_compile" 2>conftest.err)
17595  cat conftest.err >&5
17596  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
17597  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
17598  cat conftest.err >&5
17599  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
17600  cat conftest.out >&5
17601  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
17602    lt_cv_nm_interface="MS dumpbin"
17603  fi
17604  rm -f conftest*
17605fi
17606{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
17607printf "%s\n" "$lt_cv_nm_interface" >&6; }
17608
17609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
17610printf %s "checking whether ln -s works... " >&6; }
17611LN_S=$as_ln_s
17612if test "$LN_S" = "ln -s"; then
17613  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17614printf "%s\n" "yes" >&6; }
17615else
17616  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
17617printf "%s\n" "no, using $LN_S" >&6; }
17618fi
17619
17620# find the maximum length of command line arguments
17621{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
17622printf %s "checking the maximum length of command line arguments... " >&6; }
17623if test ${lt_cv_sys_max_cmd_len+y}
17624then :
17625  printf %s "(cached) " >&6
17626else $as_nop
17627    i=0
17628  teststring=ABCD
17629
17630  case $build_os in
17631  msdosdjgpp*)
17632    # On DJGPP, this test can blow up pretty badly due to problems in libc
17633    # (any single argument exceeding 2000 bytes causes a buffer overrun
17634    # during glob expansion).  Even if it were fixed, the result of this
17635    # check would be larger than it should be.
17636    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
17637    ;;
17638
17639  gnu*)
17640    # Under GNU Hurd, this test is not required because there is
17641    # no limit to the length of command line arguments.
17642    # Libtool will interpret -1 as no limit whatsoever
17643    lt_cv_sys_max_cmd_len=-1;
17644    ;;
17645
17646  cygwin* | mingw* | cegcc*)
17647    # On Win9x/ME, this test blows up -- it succeeds, but takes
17648    # about 5 minutes as the teststring grows exponentially.
17649    # Worse, since 9x/ME are not pre-emptively multitasking,
17650    # you end up with a "frozen" computer, even though with patience
17651    # the test eventually succeeds (with a max line length of 256k).
17652    # Instead, let's just punt: use the minimum linelength reported by
17653    # all of the supported platforms: 8192 (on NT/2K/XP).
17654    lt_cv_sys_max_cmd_len=8192;
17655    ;;
17656
17657  mint*)
17658    # On MiNT this can take a long time and run out of memory.
17659    lt_cv_sys_max_cmd_len=8192;
17660    ;;
17661
17662  amigaos*)
17663    # On AmigaOS with pdksh, this test takes hours, literally.
17664    # So we just punt and use a minimum line length of 8192.
17665    lt_cv_sys_max_cmd_len=8192;
17666    ;;
17667
17668  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
17669    # This has been around since 386BSD, at least.  Likely further.
17670    if test -x /sbin/sysctl; then
17671      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
17672    elif test -x /usr/sbin/sysctl; then
17673      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
17674    else
17675      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
17676    fi
17677    # And add a safety zone
17678    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17679    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17680    ;;
17681
17682  interix*)
17683    # We know the value 262144 and hardcode it with a safety zone (like BSD)
17684    lt_cv_sys_max_cmd_len=196608
17685    ;;
17686
17687  os2*)
17688    # The test takes a long time on OS/2.
17689    lt_cv_sys_max_cmd_len=8192
17690    ;;
17691
17692  osf*)
17693    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
17694    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
17695    # nice to cause kernel panics so lets avoid the loop below.
17696    # First set a reasonable default.
17697    lt_cv_sys_max_cmd_len=16384
17698    #
17699    if test -x /sbin/sysconfig; then
17700      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
17701        *1*) lt_cv_sys_max_cmd_len=-1 ;;
17702      esac
17703    fi
17704    ;;
17705  sco3.2v5*)
17706    lt_cv_sys_max_cmd_len=102400
17707    ;;
17708  sysv5* | sco5v6* | sysv4.2uw2*)
17709    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
17710    if test -n "$kargmax"; then
17711      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
17712    else
17713      lt_cv_sys_max_cmd_len=32768
17714    fi
17715    ;;
17716  *)
17717    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
17718    if test -n "$lt_cv_sys_max_cmd_len" && \
17719       test undefined != "$lt_cv_sys_max_cmd_len"; then
17720      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17721      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17722    else
17723      # Make teststring a little bigger before we do anything with it.
17724      # a 1K string should be a reasonable start.
17725      for i in 1 2 3 4 5 6 7 8; do
17726        teststring=$teststring$teststring
17727      done
17728      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
17729      # If test is not a shell built-in, we'll probably end up computing a
17730      # maximum length that is only half of the actual maximum length, but
17731      # we can't tell.
17732      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
17733	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
17734	      test 17 != "$i" # 1/2 MB should be enough
17735      do
17736        i=`expr $i + 1`
17737        teststring=$teststring$teststring
17738      done
17739      # Only check the string length outside the loop.
17740      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
17741      teststring=
17742      # Add a significant safety factor because C++ compilers can tack on
17743      # massive amounts of additional arguments before passing them to the
17744      # linker.  It appears as though 1/2 is a usable value.
17745      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
17746    fi
17747    ;;
17748  esac
17749
17750fi
17751
17752if test -n "$lt_cv_sys_max_cmd_len"; then
17753  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
17754printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
17755else
17756  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
17757printf "%s\n" "none" >&6; }
17758fi
17759max_cmd_len=$lt_cv_sys_max_cmd_len
17760
17761
17762
17763
17764
17765
17766: ${CP="cp -f"}
17767: ${MV="mv -f"}
17768: ${RM="rm -f"}
17769
17770if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
17771  lt_unset=unset
17772else
17773  lt_unset=false
17774fi
17775
17776
17777
17778
17779
17780# test EBCDIC or ASCII
17781case `echo X|tr X '\101'` in
17782 A) # ASCII based system
17783    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
17784  lt_SP2NL='tr \040 \012'
17785  lt_NL2SP='tr \015\012 \040\040'
17786  ;;
17787 *) # EBCDIC based system
17788  lt_SP2NL='tr \100 \n'
17789  lt_NL2SP='tr \r\n \100\100'
17790  ;;
17791esac
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
17802printf %s "checking how to convert $build file names to $host format... " >&6; }
17803if test ${lt_cv_to_host_file_cmd+y}
17804then :
17805  printf %s "(cached) " >&6
17806else $as_nop
17807  case $host in
17808  *-*-mingw* )
17809    case $build in
17810      *-*-mingw* ) # actually msys
17811        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
17812        ;;
17813      *-*-cygwin* )
17814        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
17815        ;;
17816      * ) # otherwise, assume *nix
17817        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
17818        ;;
17819    esac
17820    ;;
17821  *-*-cygwin* )
17822    case $build in
17823      *-*-mingw* ) # actually msys
17824        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
17825        ;;
17826      *-*-cygwin* )
17827        lt_cv_to_host_file_cmd=func_convert_file_noop
17828        ;;
17829      * ) # otherwise, assume *nix
17830        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
17831        ;;
17832    esac
17833    ;;
17834  * ) # unhandled hosts (and "normal" native builds)
17835    lt_cv_to_host_file_cmd=func_convert_file_noop
17836    ;;
17837esac
17838
17839fi
17840
17841to_host_file_cmd=$lt_cv_to_host_file_cmd
17842{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
17843printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
17844
17845
17846
17847
17848
17849{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
17850printf %s "checking how to convert $build file names to toolchain format... " >&6; }
17851if test ${lt_cv_to_tool_file_cmd+y}
17852then :
17853  printf %s "(cached) " >&6
17854else $as_nop
17855  #assume ordinary cross tools, or native build.
17856lt_cv_to_tool_file_cmd=func_convert_file_noop
17857case $host in
17858  *-*-mingw* )
17859    case $build in
17860      *-*-mingw* ) # actually msys
17861        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
17862        ;;
17863    esac
17864    ;;
17865esac
17866
17867fi
17868
17869to_tool_file_cmd=$lt_cv_to_tool_file_cmd
17870{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
17871printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
17872
17873
17874
17875
17876
17877{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
17878printf %s "checking for $LD option to reload object files... " >&6; }
17879if test ${lt_cv_ld_reload_flag+y}
17880then :
17881  printf %s "(cached) " >&6
17882else $as_nop
17883  lt_cv_ld_reload_flag='-r'
17884fi
17885{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
17886printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
17887reload_flag=$lt_cv_ld_reload_flag
17888case $reload_flag in
17889"" | " "*) ;;
17890*) reload_flag=" $reload_flag" ;;
17891esac
17892reload_cmds='$LD$reload_flag -o $output$reload_objs'
17893case $host_os in
17894  cygwin* | mingw* | pw32* | cegcc*)
17895    if test yes != "$GCC"; then
17896      reload_cmds=false
17897    fi
17898    ;;
17899  darwin*)
17900    if test yes = "$GCC"; then
17901      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
17902    else
17903      reload_cmds='$LD$reload_flag -o $output$reload_objs'
17904    fi
17905    ;;
17906esac
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916if test -n "$ac_tool_prefix"; then
17917  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
17918set dummy ${ac_tool_prefix}objdump; ac_word=$2
17919{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17920printf %s "checking for $ac_word... " >&6; }
17921if test ${ac_cv_prog_OBJDUMP+y}
17922then :
17923  printf %s "(cached) " >&6
17924else $as_nop
17925  if test -n "$OBJDUMP"; then
17926  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
17927else
17928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17929for as_dir in $PATH
17930do
17931  IFS=$as_save_IFS
17932  case $as_dir in #(((
17933    '') as_dir=./ ;;
17934    */) ;;
17935    *) as_dir=$as_dir/ ;;
17936  esac
17937    for ac_exec_ext in '' $ac_executable_extensions; do
17938  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
17939    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
17940    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
17941    break 2
17942  fi
17943done
17944  done
17945IFS=$as_save_IFS
17946
17947fi
17948fi
17949OBJDUMP=$ac_cv_prog_OBJDUMP
17950if test -n "$OBJDUMP"; then
17951  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
17952printf "%s\n" "$OBJDUMP" >&6; }
17953else
17954  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17955printf "%s\n" "no" >&6; }
17956fi
17957
17958
17959fi
17960if test -z "$ac_cv_prog_OBJDUMP"; then
17961  ac_ct_OBJDUMP=$OBJDUMP
17962  # Extract the first word of "objdump", so it can be a program name with args.
17963set dummy objdump; ac_word=$2
17964{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17965printf %s "checking for $ac_word... " >&6; }
17966if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
17967then :
17968  printf %s "(cached) " >&6
17969else $as_nop
17970  if test -n "$ac_ct_OBJDUMP"; then
17971  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
17972else
17973as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17974for as_dir in $PATH
17975do
17976  IFS=$as_save_IFS
17977  case $as_dir in #(((
17978    '') as_dir=./ ;;
17979    */) ;;
17980    *) as_dir=$as_dir/ ;;
17981  esac
17982    for ac_exec_ext in '' $ac_executable_extensions; do
17983  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
17984    ac_cv_prog_ac_ct_OBJDUMP="objdump"
17985    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
17986    break 2
17987  fi
17988done
17989  done
17990IFS=$as_save_IFS
17991
17992fi
17993fi
17994ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
17995if test -n "$ac_ct_OBJDUMP"; then
17996  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
17997printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
17998else
17999  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18000printf "%s\n" "no" >&6; }
18001fi
18002
18003  if test "x$ac_ct_OBJDUMP" = x; then
18004    OBJDUMP="false"
18005  else
18006    case $cross_compiling:$ac_tool_warned in
18007yes:)
18008{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18009printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18010ac_tool_warned=yes ;;
18011esac
18012    OBJDUMP=$ac_ct_OBJDUMP
18013  fi
18014else
18015  OBJDUMP="$ac_cv_prog_OBJDUMP"
18016fi
18017
18018test -z "$OBJDUMP" && OBJDUMP=objdump
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
18029printf %s "checking how to recognize dependent libraries... " >&6; }
18030if test ${lt_cv_deplibs_check_method+y}
18031then :
18032  printf %s "(cached) " >&6
18033else $as_nop
18034  lt_cv_file_magic_cmd='$MAGIC_CMD'
18035lt_cv_file_magic_test_file=
18036lt_cv_deplibs_check_method='unknown'
18037# Need to set the preceding variable on all platforms that support
18038# interlibrary dependencies.
18039# 'none' -- dependencies not supported.
18040# 'unknown' -- same as none, but documents that we really don't know.
18041# 'pass_all' -- all dependencies passed with no checks.
18042# 'test_compile' -- check by making test program.
18043# 'file_magic [[regex]]' -- check by looking for files in library path
18044# that responds to the $file_magic_cmd with a given extended regex.
18045# If you have 'file' or equivalent on your system and you're not sure
18046# whether 'pass_all' will *always* work, you probably want this one.
18047
18048case $host_os in
18049aix[4-9]*)
18050  lt_cv_deplibs_check_method=pass_all
18051  ;;
18052
18053beos*)
18054  lt_cv_deplibs_check_method=pass_all
18055  ;;
18056
18057bsdi[45]*)
18058  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
18059  lt_cv_file_magic_cmd='/usr/bin/file -L'
18060  lt_cv_file_magic_test_file=/shlib/libc.so
18061  ;;
18062
18063cygwin*)
18064  # func_win32_libid is a shell function defined in ltmain.sh
18065  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
18066  lt_cv_file_magic_cmd='func_win32_libid'
18067  ;;
18068
18069mingw* | pw32*)
18070  # Base MSYS/MinGW do not provide the 'file' command needed by
18071  # func_win32_libid shell function, so use a weaker test based on 'objdump',
18072  # unless we find 'file', for example because we are cross-compiling.
18073  if ( file / ) >/dev/null 2>&1; then
18074    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
18075    lt_cv_file_magic_cmd='func_win32_libid'
18076  else
18077    # Keep this pattern in sync with the one in func_win32_libid.
18078    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
18079    lt_cv_file_magic_cmd='$OBJDUMP -f'
18080  fi
18081  ;;
18082
18083cegcc*)
18084  # use the weaker test based on 'objdump'. See mingw*.
18085  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
18086  lt_cv_file_magic_cmd='$OBJDUMP -f'
18087  ;;
18088
18089darwin* | rhapsody*)
18090  lt_cv_deplibs_check_method=pass_all
18091  ;;
18092
18093freebsd* | dragonfly*)
18094  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
18095    case $host_cpu in
18096    i*86 )
18097      # Not sure whether the presence of OpenBSD here was a mistake.
18098      # Let's accept both of them until this is cleared up.
18099      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
18100      lt_cv_file_magic_cmd=/usr/bin/file
18101      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
18102      ;;
18103    esac
18104  else
18105    lt_cv_deplibs_check_method=pass_all
18106  fi
18107  ;;
18108
18109haiku*)
18110  lt_cv_deplibs_check_method=pass_all
18111  ;;
18112
18113hpux10.20* | hpux11*)
18114  lt_cv_file_magic_cmd=/usr/bin/file
18115  case $host_cpu in
18116  ia64*)
18117    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
18118    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
18119    ;;
18120  hppa*64*)
18121    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]'
18122    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
18123    ;;
18124  *)
18125    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
18126    lt_cv_file_magic_test_file=/usr/lib/libc.sl
18127    ;;
18128  esac
18129  ;;
18130
18131interix[3-9]*)
18132  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
18133  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
18134  ;;
18135
18136irix5* | irix6* | nonstopux*)
18137  case $LD in
18138  *-32|*"-32 ") libmagic=32-bit;;
18139  *-n32|*"-n32 ") libmagic=N32;;
18140  *-64|*"-64 ") libmagic=64-bit;;
18141  *) libmagic=never-match;;
18142  esac
18143  lt_cv_deplibs_check_method=pass_all
18144  ;;
18145
18146# This must be glibc/ELF.
18147linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
18148  lt_cv_deplibs_check_method=pass_all
18149  ;;
18150
18151netbsd*)
18152  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
18153    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
18154  else
18155    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
18156  fi
18157  ;;
18158
18159newos6*)
18160  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
18161  lt_cv_file_magic_cmd=/usr/bin/file
18162  lt_cv_file_magic_test_file=/usr/lib/libnls.so
18163  ;;
18164
18165*nto* | *qnx*)
18166  lt_cv_deplibs_check_method=pass_all
18167  ;;
18168
18169openbsd* | bitrig*)
18170  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
18171    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
18172  else
18173    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
18174  fi
18175  ;;
18176
18177osf3* | osf4* | osf5*)
18178  lt_cv_deplibs_check_method=pass_all
18179  ;;
18180
18181rdos*)
18182  lt_cv_deplibs_check_method=pass_all
18183  ;;
18184
18185solaris*)
18186  lt_cv_deplibs_check_method=pass_all
18187  ;;
18188
18189sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
18190  lt_cv_deplibs_check_method=pass_all
18191  ;;
18192
18193sysv4 | sysv4.3*)
18194  case $host_vendor in
18195  motorola)
18196    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]'
18197    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
18198    ;;
18199  ncr)
18200    lt_cv_deplibs_check_method=pass_all
18201    ;;
18202  sequent)
18203    lt_cv_file_magic_cmd='/bin/file'
18204    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
18205    ;;
18206  sni)
18207    lt_cv_file_magic_cmd='/bin/file'
18208    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
18209    lt_cv_file_magic_test_file=/lib/libc.so
18210    ;;
18211  siemens)
18212    lt_cv_deplibs_check_method=pass_all
18213    ;;
18214  pc)
18215    lt_cv_deplibs_check_method=pass_all
18216    ;;
18217  esac
18218  ;;
18219
18220tpf*)
18221  lt_cv_deplibs_check_method=pass_all
18222  ;;
18223os2*)
18224  lt_cv_deplibs_check_method=pass_all
18225  ;;
18226esac
18227
18228fi
18229{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
18230printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
18231
18232file_magic_glob=
18233want_nocaseglob=no
18234if test "$build" = "$host"; then
18235  case $host_os in
18236  mingw* | pw32*)
18237    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
18238      want_nocaseglob=yes
18239    else
18240      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
18241    fi
18242    ;;
18243  esac
18244fi
18245
18246file_magic_cmd=$lt_cv_file_magic_cmd
18247deplibs_check_method=$lt_cv_deplibs_check_method
18248test -z "$deplibs_check_method" && deplibs_check_method=unknown
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271if test -n "$ac_tool_prefix"; then
18272  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
18273set dummy ${ac_tool_prefix}dlltool; ac_word=$2
18274{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18275printf %s "checking for $ac_word... " >&6; }
18276if test ${ac_cv_prog_DLLTOOL+y}
18277then :
18278  printf %s "(cached) " >&6
18279else $as_nop
18280  if test -n "$DLLTOOL"; then
18281  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
18282else
18283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18284for as_dir in $PATH
18285do
18286  IFS=$as_save_IFS
18287  case $as_dir in #(((
18288    '') as_dir=./ ;;
18289    */) ;;
18290    *) as_dir=$as_dir/ ;;
18291  esac
18292    for ac_exec_ext in '' $ac_executable_extensions; do
18293  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18294    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
18295    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18296    break 2
18297  fi
18298done
18299  done
18300IFS=$as_save_IFS
18301
18302fi
18303fi
18304DLLTOOL=$ac_cv_prog_DLLTOOL
18305if test -n "$DLLTOOL"; then
18306  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
18307printf "%s\n" "$DLLTOOL" >&6; }
18308else
18309  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18310printf "%s\n" "no" >&6; }
18311fi
18312
18313
18314fi
18315if test -z "$ac_cv_prog_DLLTOOL"; then
18316  ac_ct_DLLTOOL=$DLLTOOL
18317  # Extract the first word of "dlltool", so it can be a program name with args.
18318set dummy dlltool; ac_word=$2
18319{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18320printf %s "checking for $ac_word... " >&6; }
18321if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
18322then :
18323  printf %s "(cached) " >&6
18324else $as_nop
18325  if test -n "$ac_ct_DLLTOOL"; then
18326  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
18327else
18328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18329for as_dir in $PATH
18330do
18331  IFS=$as_save_IFS
18332  case $as_dir in #(((
18333    '') as_dir=./ ;;
18334    */) ;;
18335    *) as_dir=$as_dir/ ;;
18336  esac
18337    for ac_exec_ext in '' $ac_executable_extensions; do
18338  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18339    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
18340    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18341    break 2
18342  fi
18343done
18344  done
18345IFS=$as_save_IFS
18346
18347fi
18348fi
18349ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
18350if test -n "$ac_ct_DLLTOOL"; then
18351  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
18352printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
18353else
18354  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18355printf "%s\n" "no" >&6; }
18356fi
18357
18358  if test "x$ac_ct_DLLTOOL" = x; then
18359    DLLTOOL="false"
18360  else
18361    case $cross_compiling:$ac_tool_warned in
18362yes:)
18363{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18364printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18365ac_tool_warned=yes ;;
18366esac
18367    DLLTOOL=$ac_ct_DLLTOOL
18368  fi
18369else
18370  DLLTOOL="$ac_cv_prog_DLLTOOL"
18371fi
18372
18373test -z "$DLLTOOL" && DLLTOOL=dlltool
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
18385printf %s "checking how to associate runtime and link libraries... " >&6; }
18386if test ${lt_cv_sharedlib_from_linklib_cmd+y}
18387then :
18388  printf %s "(cached) " >&6
18389else $as_nop
18390  lt_cv_sharedlib_from_linklib_cmd='unknown'
18391
18392case $host_os in
18393cygwin* | mingw* | pw32* | cegcc*)
18394  # two different shell functions defined in ltmain.sh;
18395  # decide which one to use based on capabilities of $DLLTOOL
18396  case `$DLLTOOL --help 2>&1` in
18397  *--identify-strict*)
18398    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
18399    ;;
18400  *)
18401    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
18402    ;;
18403  esac
18404  ;;
18405*)
18406  # fallback: assume linklib IS sharedlib
18407  lt_cv_sharedlib_from_linklib_cmd=$ECHO
18408  ;;
18409esac
18410
18411fi
18412{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
18413printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
18414sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
18415test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
18416
18417
18418
18419
18420
18421
18422
18423if test -n "$ac_tool_prefix"; then
18424  for ac_prog in ar
18425  do
18426    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18427set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18428{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18429printf %s "checking for $ac_word... " >&6; }
18430if test ${ac_cv_prog_AR+y}
18431then :
18432  printf %s "(cached) " >&6
18433else $as_nop
18434  if test -n "$AR"; then
18435  ac_cv_prog_AR="$AR" # Let the user override the test.
18436else
18437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18438for as_dir in $PATH
18439do
18440  IFS=$as_save_IFS
18441  case $as_dir in #(((
18442    '') as_dir=./ ;;
18443    */) ;;
18444    *) as_dir=$as_dir/ ;;
18445  esac
18446    for ac_exec_ext in '' $ac_executable_extensions; do
18447  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18448    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
18449    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18450    break 2
18451  fi
18452done
18453  done
18454IFS=$as_save_IFS
18455
18456fi
18457fi
18458AR=$ac_cv_prog_AR
18459if test -n "$AR"; then
18460  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
18461printf "%s\n" "$AR" >&6; }
18462else
18463  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18464printf "%s\n" "no" >&6; }
18465fi
18466
18467
18468    test -n "$AR" && break
18469  done
18470fi
18471if test -z "$AR"; then
18472  ac_ct_AR=$AR
18473  for ac_prog in ar
18474do
18475  # Extract the first word of "$ac_prog", so it can be a program name with args.
18476set dummy $ac_prog; ac_word=$2
18477{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18478printf %s "checking for $ac_word... " >&6; }
18479if test ${ac_cv_prog_ac_ct_AR+y}
18480then :
18481  printf %s "(cached) " >&6
18482else $as_nop
18483  if test -n "$ac_ct_AR"; then
18484  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
18485else
18486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18487for as_dir in $PATH
18488do
18489  IFS=$as_save_IFS
18490  case $as_dir in #(((
18491    '') as_dir=./ ;;
18492    */) ;;
18493    *) as_dir=$as_dir/ ;;
18494  esac
18495    for ac_exec_ext in '' $ac_executable_extensions; do
18496  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18497    ac_cv_prog_ac_ct_AR="$ac_prog"
18498    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18499    break 2
18500  fi
18501done
18502  done
18503IFS=$as_save_IFS
18504
18505fi
18506fi
18507ac_ct_AR=$ac_cv_prog_ac_ct_AR
18508if test -n "$ac_ct_AR"; then
18509  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
18510printf "%s\n" "$ac_ct_AR" >&6; }
18511else
18512  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18513printf "%s\n" "no" >&6; }
18514fi
18515
18516
18517  test -n "$ac_ct_AR" && break
18518done
18519
18520  if test "x$ac_ct_AR" = x; then
18521    AR="false"
18522  else
18523    case $cross_compiling:$ac_tool_warned in
18524yes:)
18525{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18526printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18527ac_tool_warned=yes ;;
18528esac
18529    AR=$ac_ct_AR
18530  fi
18531fi
18532
18533: ${AR=ar}
18534: ${AR_FLAGS=cru}
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
18547printf %s "checking for archiver @FILE support... " >&6; }
18548if test ${lt_cv_ar_at_file+y}
18549then :
18550  printf %s "(cached) " >&6
18551else $as_nop
18552  lt_cv_ar_at_file=no
18553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18554/* end confdefs.h.  */
18555
18556int
18557main (void)
18558{
18559
18560  ;
18561  return 0;
18562}
18563_ACEOF
18564if ac_fn_c_try_compile "$LINENO"
18565then :
18566  echo conftest.$ac_objext > conftest.lst
18567      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
18568      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
18569  (eval $lt_ar_try) 2>&5
18570  ac_status=$?
18571  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18572  test $ac_status = 0; }
18573      if test 0 -eq "$ac_status"; then
18574	# Ensure the archiver fails upon bogus file names.
18575	rm -f conftest.$ac_objext libconftest.a
18576	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
18577  (eval $lt_ar_try) 2>&5
18578  ac_status=$?
18579  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18580  test $ac_status = 0; }
18581	if test 0 -ne "$ac_status"; then
18582          lt_cv_ar_at_file=@
18583        fi
18584      fi
18585      rm -f conftest.* libconftest.a
18586
18587fi
18588rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18589
18590fi
18591{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
18592printf "%s\n" "$lt_cv_ar_at_file" >&6; }
18593
18594if test no = "$lt_cv_ar_at_file"; then
18595  archiver_list_spec=
18596else
18597  archiver_list_spec=$lt_cv_ar_at_file
18598fi
18599
18600
18601
18602
18603
18604
18605
18606if test -n "$ac_tool_prefix"; then
18607  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
18608set dummy ${ac_tool_prefix}strip; ac_word=$2
18609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18610printf %s "checking for $ac_word... " >&6; }
18611if test ${ac_cv_prog_STRIP+y}
18612then :
18613  printf %s "(cached) " >&6
18614else $as_nop
18615  if test -n "$STRIP"; then
18616  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
18617else
18618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18619for as_dir in $PATH
18620do
18621  IFS=$as_save_IFS
18622  case $as_dir in #(((
18623    '') as_dir=./ ;;
18624    */) ;;
18625    *) as_dir=$as_dir/ ;;
18626  esac
18627    for ac_exec_ext in '' $ac_executable_extensions; do
18628  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18629    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
18630    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18631    break 2
18632  fi
18633done
18634  done
18635IFS=$as_save_IFS
18636
18637fi
18638fi
18639STRIP=$ac_cv_prog_STRIP
18640if test -n "$STRIP"; then
18641  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
18642printf "%s\n" "$STRIP" >&6; }
18643else
18644  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18645printf "%s\n" "no" >&6; }
18646fi
18647
18648
18649fi
18650if test -z "$ac_cv_prog_STRIP"; then
18651  ac_ct_STRIP=$STRIP
18652  # Extract the first word of "strip", so it can be a program name with args.
18653set dummy strip; ac_word=$2
18654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18655printf %s "checking for $ac_word... " >&6; }
18656if test ${ac_cv_prog_ac_ct_STRIP+y}
18657then :
18658  printf %s "(cached) " >&6
18659else $as_nop
18660  if test -n "$ac_ct_STRIP"; then
18661  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
18662else
18663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18664for as_dir in $PATH
18665do
18666  IFS=$as_save_IFS
18667  case $as_dir in #(((
18668    '') as_dir=./ ;;
18669    */) ;;
18670    *) as_dir=$as_dir/ ;;
18671  esac
18672    for ac_exec_ext in '' $ac_executable_extensions; do
18673  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18674    ac_cv_prog_ac_ct_STRIP="strip"
18675    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18676    break 2
18677  fi
18678done
18679  done
18680IFS=$as_save_IFS
18681
18682fi
18683fi
18684ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
18685if test -n "$ac_ct_STRIP"; then
18686  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
18687printf "%s\n" "$ac_ct_STRIP" >&6; }
18688else
18689  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18690printf "%s\n" "no" >&6; }
18691fi
18692
18693  if test "x$ac_ct_STRIP" = x; then
18694    STRIP=":"
18695  else
18696    case $cross_compiling:$ac_tool_warned in
18697yes:)
18698{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18699printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18700ac_tool_warned=yes ;;
18701esac
18702    STRIP=$ac_ct_STRIP
18703  fi
18704else
18705  STRIP="$ac_cv_prog_STRIP"
18706fi
18707
18708test -z "$STRIP" && STRIP=:
18709
18710
18711
18712
18713
18714
18715if test -n "$ac_tool_prefix"; then
18716  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
18717set dummy ${ac_tool_prefix}ranlib; ac_word=$2
18718{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18719printf %s "checking for $ac_word... " >&6; }
18720if test ${ac_cv_prog_RANLIB+y}
18721then :
18722  printf %s "(cached) " >&6
18723else $as_nop
18724  if test -n "$RANLIB"; then
18725  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
18726else
18727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18728for as_dir in $PATH
18729do
18730  IFS=$as_save_IFS
18731  case $as_dir in #(((
18732    '') as_dir=./ ;;
18733    */) ;;
18734    *) as_dir=$as_dir/ ;;
18735  esac
18736    for ac_exec_ext in '' $ac_executable_extensions; do
18737  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18738    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
18739    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18740    break 2
18741  fi
18742done
18743  done
18744IFS=$as_save_IFS
18745
18746fi
18747fi
18748RANLIB=$ac_cv_prog_RANLIB
18749if test -n "$RANLIB"; then
18750  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
18751printf "%s\n" "$RANLIB" >&6; }
18752else
18753  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18754printf "%s\n" "no" >&6; }
18755fi
18756
18757
18758fi
18759if test -z "$ac_cv_prog_RANLIB"; then
18760  ac_ct_RANLIB=$RANLIB
18761  # Extract the first word of "ranlib", so it can be a program name with args.
18762set dummy ranlib; ac_word=$2
18763{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18764printf %s "checking for $ac_word... " >&6; }
18765if test ${ac_cv_prog_ac_ct_RANLIB+y}
18766then :
18767  printf %s "(cached) " >&6
18768else $as_nop
18769  if test -n "$ac_ct_RANLIB"; then
18770  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
18771else
18772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18773for as_dir in $PATH
18774do
18775  IFS=$as_save_IFS
18776  case $as_dir in #(((
18777    '') as_dir=./ ;;
18778    */) ;;
18779    *) as_dir=$as_dir/ ;;
18780  esac
18781    for ac_exec_ext in '' $ac_executable_extensions; do
18782  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18783    ac_cv_prog_ac_ct_RANLIB="ranlib"
18784    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18785    break 2
18786  fi
18787done
18788  done
18789IFS=$as_save_IFS
18790
18791fi
18792fi
18793ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
18794if test -n "$ac_ct_RANLIB"; then
18795  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
18796printf "%s\n" "$ac_ct_RANLIB" >&6; }
18797else
18798  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18799printf "%s\n" "no" >&6; }
18800fi
18801
18802  if test "x$ac_ct_RANLIB" = x; then
18803    RANLIB=":"
18804  else
18805    case $cross_compiling:$ac_tool_warned in
18806yes:)
18807{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18808printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18809ac_tool_warned=yes ;;
18810esac
18811    RANLIB=$ac_ct_RANLIB
18812  fi
18813else
18814  RANLIB="$ac_cv_prog_RANLIB"
18815fi
18816
18817test -z "$RANLIB" && RANLIB=:
18818
18819
18820
18821
18822
18823
18824# Determine commands to create old-style static archives.
18825old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
18826old_postinstall_cmds='chmod 644 $oldlib'
18827old_postuninstall_cmds=
18828
18829if test -n "$RANLIB"; then
18830  case $host_os in
18831  bitrig* | openbsd*)
18832    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
18833    ;;
18834  *)
18835    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
18836    ;;
18837  esac
18838  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
18839fi
18840
18841case $host_os in
18842  darwin*)
18843    lock_old_archive_extraction=yes ;;
18844  *)
18845    lock_old_archive_extraction=no ;;
18846esac
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886# If no C compiler was specified, use CC.
18887LTCC=${LTCC-"$CC"}
18888
18889# If no C compiler flags were specified, use CFLAGS.
18890LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
18891
18892# Allow CC to be a program name with arguments.
18893compiler=$CC
18894
18895
18896# Check for command to grab the raw symbol name followed by C symbol from nm.
18897{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
18898printf %s "checking command to parse $NM output from $compiler object... " >&6; }
18899if test ${lt_cv_sys_global_symbol_pipe+y}
18900then :
18901  printf %s "(cached) " >&6
18902else $as_nop
18903
18904# These are sane defaults that work on at least a few old systems.
18905# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
18906
18907# Character class describing NM global symbol codes.
18908symcode='[BCDEGRST]'
18909
18910# Regexp to match symbols that can be accessed directly from C.
18911sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
18912
18913# Define system-specific variables.
18914case $host_os in
18915aix*)
18916  symcode='[BCDT]'
18917  ;;
18918cygwin* | mingw* | pw32* | cegcc*)
18919  symcode='[ABCDGISTW]'
18920  ;;
18921hpux*)
18922  if test ia64 = "$host_cpu"; then
18923    symcode='[ABCDEGRST]'
18924  fi
18925  ;;
18926irix* | nonstopux*)
18927  symcode='[BCDEGRST]'
18928  ;;
18929osf*)
18930  symcode='[BCDEGQRST]'
18931  ;;
18932solaris*)
18933  symcode='[BDRT]'
18934  ;;
18935sco3.2v5*)
18936  symcode='[DT]'
18937  ;;
18938sysv4.2uw2*)
18939  symcode='[DT]'
18940  ;;
18941sysv5* | sco5v6* | unixware* | OpenUNIX*)
18942  symcode='[ABDT]'
18943  ;;
18944sysv4)
18945  symcode='[DFNSTU]'
18946  ;;
18947esac
18948
18949# If we're using GNU nm, then use its standard symbol codes.
18950case `$NM -V 2>&1` in
18951*GNU* | *'with BFD'*)
18952  symcode='[ABCDGIRSTW]' ;;
18953esac
18954
18955if test "$lt_cv_nm_interface" = "MS dumpbin"; then
18956  # Gets list of data symbols to import.
18957  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
18958  # Adjust the below global symbol transforms to fixup imported variables.
18959  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
18960  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
18961  lt_c_name_lib_hook="\
18962  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
18963  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
18964else
18965  # Disable hooks by default.
18966  lt_cv_sys_global_symbol_to_import=
18967  lt_cdecl_hook=
18968  lt_c_name_hook=
18969  lt_c_name_lib_hook=
18970fi
18971
18972# Transform an extracted symbol line into a proper C declaration.
18973# Some systems (esp. on ia64) link data and code symbols differently,
18974# so use this general approach.
18975lt_cv_sys_global_symbol_to_cdecl="sed -n"\
18976$lt_cdecl_hook\
18977" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
18978" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
18979
18980# Transform an extracted symbol line into symbol name and symbol address
18981lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
18982$lt_c_name_hook\
18983" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
18984" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
18985
18986# Transform an extracted symbol line into symbol name with lib prefix and
18987# symbol address.
18988lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
18989$lt_c_name_lib_hook\
18990" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
18991" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
18992" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
18993
18994# Handle CRLF in mingw tool chain
18995opt_cr=
18996case $build_os in
18997mingw*)
18998  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
18999  ;;
19000esac
19001
19002# Try without a prefix underscore, then with it.
19003for ac_symprfx in "" "_"; do
19004
19005  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
19006  symxfrm="\\1 $ac_symprfx\\2 \\2"
19007
19008  # Write the raw and C identifiers.
19009  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
19010    # Fake it for dumpbin and say T for any non-static function,
19011    # D for any global variable and I for any imported variable.
19012    # Also find C++ and __fastcall symbols from MSVC++,
19013    # which start with @ or ?.
19014    lt_cv_sys_global_symbol_pipe="$AWK '"\
19015"     {last_section=section; section=\$ 3};"\
19016"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
19017"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
19018"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
19019"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
19020"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
19021"     \$ 0!~/External *\|/{next};"\
19022"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
19023"     {if(hide[section]) next};"\
19024"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
19025"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
19026"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
19027"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
19028"     ' prfx=^$ac_symprfx"
19029  else
19030    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
19031  fi
19032  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
19033
19034  # Check to see that the pipe works correctly.
19035  pipe_works=no
19036
19037  rm -f conftest*
19038  cat > conftest.$ac_ext <<_LT_EOF
19039#ifdef __cplusplus
19040extern "C" {
19041#endif
19042char nm_test_var;
19043void nm_test_func(void);
19044void nm_test_func(void){}
19045#ifdef __cplusplus
19046}
19047#endif
19048int main(){nm_test_var='a';nm_test_func();return(0);}
19049_LT_EOF
19050
19051  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
19052  (eval $ac_compile) 2>&5
19053  ac_status=$?
19054  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19055  test $ac_status = 0; }; then
19056    # Now try to grab the symbols.
19057    nlist=conftest.nm
19058    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
19059  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
19060  ac_status=$?
19061  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19062  test $ac_status = 0; } && test -s "$nlist"; then
19063      # Try sorting and uniquifying the output.
19064      if sort "$nlist" | uniq > "$nlist"T; then
19065	mv -f "$nlist"T "$nlist"
19066      else
19067	rm -f "$nlist"T
19068      fi
19069
19070      # Make sure that we snagged all the symbols we need.
19071      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
19072	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
19073	  cat <<_LT_EOF > conftest.$ac_ext
19074/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
19075#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
19076/* DATA imports from DLLs on WIN32 can't be const, because runtime
19077   relocations are performed -- see ld's documentation on pseudo-relocs.  */
19078# define LT_DLSYM_CONST
19079#elif defined __osf__
19080/* This system does not cope well with relocations in const data.  */
19081# define LT_DLSYM_CONST
19082#else
19083# define LT_DLSYM_CONST const
19084#endif
19085
19086#ifdef __cplusplus
19087extern "C" {
19088#endif
19089
19090_LT_EOF
19091	  # Now generate the symbol file.
19092	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
19093
19094	  cat <<_LT_EOF >> conftest.$ac_ext
19095
19096/* The mapping between symbol names and symbols.  */
19097LT_DLSYM_CONST struct {
19098  const char *name;
19099  void       *address;
19100}
19101lt__PROGRAM__LTX_preloaded_symbols[] =
19102{
19103  { "@PROGRAM@", (void *) 0 },
19104_LT_EOF
19105	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
19106	  cat <<\_LT_EOF >> conftest.$ac_ext
19107  {0, (void *) 0}
19108};
19109
19110/* This works around a problem in FreeBSD linker */
19111#ifdef FREEBSD_WORKAROUND
19112static const void *lt_preloaded_setup() {
19113  return lt__PROGRAM__LTX_preloaded_symbols;
19114}
19115#endif
19116
19117#ifdef __cplusplus
19118}
19119#endif
19120_LT_EOF
19121	  # Now try linking the two files.
19122	  mv conftest.$ac_objext conftstm.$ac_objext
19123	  lt_globsym_save_LIBS=$LIBS
19124	  lt_globsym_save_CFLAGS=$CFLAGS
19125	  LIBS=conftstm.$ac_objext
19126	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
19127	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
19128  (eval $ac_link) 2>&5
19129  ac_status=$?
19130  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19131  test $ac_status = 0; } && test -s conftest$ac_exeext; then
19132	    pipe_works=yes
19133	  fi
19134	  LIBS=$lt_globsym_save_LIBS
19135	  CFLAGS=$lt_globsym_save_CFLAGS
19136	else
19137	  echo "cannot find nm_test_func in $nlist" >&5
19138	fi
19139      else
19140	echo "cannot find nm_test_var in $nlist" >&5
19141      fi
19142    else
19143      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
19144    fi
19145  else
19146    echo "$progname: failed program was:" >&5
19147    cat conftest.$ac_ext >&5
19148  fi
19149  rm -rf conftest* conftst*
19150
19151  # Do not use the global_symbol_pipe unless it works.
19152  if test yes = "$pipe_works"; then
19153    break
19154  else
19155    lt_cv_sys_global_symbol_pipe=
19156  fi
19157done
19158
19159fi
19160
19161if test -z "$lt_cv_sys_global_symbol_pipe"; then
19162  lt_cv_sys_global_symbol_to_cdecl=
19163fi
19164if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
19165  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
19166printf "%s\n" "failed" >&6; }
19167else
19168  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
19169printf "%s\n" "ok" >&6; }
19170fi
19171
19172# Response file support.
19173if test "$lt_cv_nm_interface" = "MS dumpbin"; then
19174  nm_file_list_spec='@'
19175elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
19176  nm_file_list_spec='@'
19177fi
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
19216printf %s "checking for sysroot... " >&6; }
19217
19218# Check whether --with-sysroot was given.
19219if test ${with_sysroot+y}
19220then :
19221  withval=$with_sysroot;
19222else $as_nop
19223  with_sysroot=no
19224fi
19225
19226
19227lt_sysroot=
19228case $with_sysroot in #(
19229 yes)
19230   if test yes = "$GCC"; then
19231     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
19232   fi
19233   ;; #(
19234 /*)
19235   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
19236   ;; #(
19237 no|'')
19238   ;; #(
19239 *)
19240   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
19241printf "%s\n" "$with_sysroot" >&6; }
19242   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
19243   ;;
19244esac
19245
19246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
19247printf "%s\n" "${lt_sysroot:-no}" >&6; }
19248
19249
19250
19251
19252
19253{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
19254printf %s "checking for a working dd... " >&6; }
19255if test ${ac_cv_path_lt_DD+y}
19256then :
19257  printf %s "(cached) " >&6
19258else $as_nop
19259  printf 0123456789abcdef0123456789abcdef >conftest.i
19260cat conftest.i conftest.i >conftest2.i
19261: ${lt_DD:=$DD}
19262if test -z "$lt_DD"; then
19263  ac_path_lt_DD_found=false
19264  # Loop through the user's path and test for each of PROGNAME-LIST
19265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19266for as_dir in $PATH
19267do
19268  IFS=$as_save_IFS
19269  case $as_dir in #(((
19270    '') as_dir=./ ;;
19271    */) ;;
19272    *) as_dir=$as_dir/ ;;
19273  esac
19274    for ac_prog in dd
19275   do
19276    for ac_exec_ext in '' $ac_executable_extensions; do
19277      ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
19278      as_fn_executable_p "$ac_path_lt_DD" || continue
19279if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
19280  cmp -s conftest.i conftest.out \
19281  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
19282fi
19283      $ac_path_lt_DD_found && break 3
19284    done
19285  done
19286  done
19287IFS=$as_save_IFS
19288  if test -z "$ac_cv_path_lt_DD"; then
19289    :
19290  fi
19291else
19292  ac_cv_path_lt_DD=$lt_DD
19293fi
19294
19295rm -f conftest.i conftest2.i conftest.out
19296fi
19297{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
19298printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
19299
19300
19301{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
19302printf %s "checking how to truncate binary pipes... " >&6; }
19303if test ${lt_cv_truncate_bin+y}
19304then :
19305  printf %s "(cached) " >&6
19306else $as_nop
19307  printf 0123456789abcdef0123456789abcdef >conftest.i
19308cat conftest.i conftest.i >conftest2.i
19309lt_cv_truncate_bin=
19310if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
19311  cmp -s conftest.i conftest.out \
19312  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
19313fi
19314rm -f conftest.i conftest2.i conftest.out
19315test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
19316fi
19317{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
19318printf "%s\n" "$lt_cv_truncate_bin" >&6; }
19319
19320
19321
19322
19323
19324
19325
19326# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
19327func_cc_basename ()
19328{
19329    for cc_temp in $*""; do
19330      case $cc_temp in
19331        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
19332        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
19333        \-*) ;;
19334        *) break;;
19335      esac
19336    done
19337    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
19338}
19339
19340# Check whether --enable-libtool-lock was given.
19341if test ${enable_libtool_lock+y}
19342then :
19343  enableval=$enable_libtool_lock;
19344fi
19345
19346test no = "$enable_libtool_lock" || enable_libtool_lock=yes
19347
19348# Some flags need to be propagated to the compiler or linker for good
19349# libtool support.
19350case $host in
19351ia64-*-hpux*)
19352  # Find out what ABI is being produced by ac_compile, and set mode
19353  # options accordingly.
19354  echo 'int i;' > conftest.$ac_ext
19355  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
19356  (eval $ac_compile) 2>&5
19357  ac_status=$?
19358  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19359  test $ac_status = 0; }; then
19360    case `/usr/bin/file conftest.$ac_objext` in
19361      *ELF-32*)
19362	HPUX_IA64_MODE=32
19363	;;
19364      *ELF-64*)
19365	HPUX_IA64_MODE=64
19366	;;
19367    esac
19368  fi
19369  rm -rf conftest*
19370  ;;
19371*-*-irix6*)
19372  # Find out what ABI is being produced by ac_compile, and set linker
19373  # options accordingly.
19374  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
19375  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
19376  (eval $ac_compile) 2>&5
19377  ac_status=$?
19378  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19379  test $ac_status = 0; }; then
19380    if test yes = "$lt_cv_prog_gnu_ld"; then
19381      case `/usr/bin/file conftest.$ac_objext` in
19382	*32-bit*)
19383	  LD="${LD-ld} -melf32bsmip"
19384	  ;;
19385	*N32*)
19386	  LD="${LD-ld} -melf32bmipn32"
19387	  ;;
19388	*64-bit*)
19389	  LD="${LD-ld} -melf64bmip"
19390	;;
19391      esac
19392    else
19393      case `/usr/bin/file conftest.$ac_objext` in
19394	*32-bit*)
19395	  LD="${LD-ld} -32"
19396	  ;;
19397	*N32*)
19398	  LD="${LD-ld} -n32"
19399	  ;;
19400	*64-bit*)
19401	  LD="${LD-ld} -64"
19402	  ;;
19403      esac
19404    fi
19405  fi
19406  rm -rf conftest*
19407  ;;
19408
19409mips64*-*linux*)
19410  # Find out what ABI is being produced by ac_compile, and set linker
19411  # options accordingly.
19412  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
19413  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
19414  (eval $ac_compile) 2>&5
19415  ac_status=$?
19416  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19417  test $ac_status = 0; }; then
19418    emul=elf
19419    case `/usr/bin/file conftest.$ac_objext` in
19420      *32-bit*)
19421	emul="${emul}32"
19422	;;
19423      *64-bit*)
19424	emul="${emul}64"
19425	;;
19426    esac
19427    case `/usr/bin/file conftest.$ac_objext` in
19428      *MSB*)
19429	emul="${emul}btsmip"
19430	;;
19431      *LSB*)
19432	emul="${emul}ltsmip"
19433	;;
19434    esac
19435    case `/usr/bin/file conftest.$ac_objext` in
19436      *N32*)
19437	emul="${emul}n32"
19438	;;
19439    esac
19440    LD="${LD-ld} -m $emul"
19441  fi
19442  rm -rf conftest*
19443  ;;
19444
19445x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
19446s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
19447  # Find out what ABI is being produced by ac_compile, and set linker
19448  # options accordingly.  Note that the listed cases only cover the
19449  # situations where additional linker options are needed (such as when
19450  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
19451  # vice versa); the common cases where no linker options are needed do
19452  # not appear in the list.
19453  echo 'int i;' > conftest.$ac_ext
19454  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
19455  (eval $ac_compile) 2>&5
19456  ac_status=$?
19457  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19458  test $ac_status = 0; }; then
19459    case `/usr/bin/file conftest.o` in
19460      *32-bit*)
19461	case $host in
19462	  x86_64-*kfreebsd*-gnu)
19463	    LD="${LD-ld} -m elf_i386_fbsd"
19464	    ;;
19465	  x86_64-*linux*)
19466	    case `/usr/bin/file conftest.o` in
19467	      *x86-64*)
19468		LD="${LD-ld} -m elf32_x86_64"
19469		;;
19470	      *)
19471		LD="${LD-ld} -m elf_i386"
19472		;;
19473	    esac
19474	    ;;
19475	  powerpc64le-*linux*)
19476	    LD="${LD-ld} -m elf32lppclinux"
19477	    ;;
19478	  powerpc64-*linux*)
19479	    LD="${LD-ld} -m elf32ppclinux"
19480	    ;;
19481	  s390x-*linux*)
19482	    LD="${LD-ld} -m elf_s390"
19483	    ;;
19484	  sparc64-*linux*)
19485	    LD="${LD-ld} -m elf32_sparc"
19486	    ;;
19487	esac
19488	;;
19489      *64-bit*)
19490	case $host in
19491	  x86_64-*kfreebsd*-gnu)
19492	    LD="${LD-ld} -m elf_x86_64_fbsd"
19493	    ;;
19494	  x86_64-*linux*)
19495	    LD="${LD-ld} -m elf_x86_64"
19496	    ;;
19497	  powerpcle-*linux*)
19498	    LD="${LD-ld} -m elf64lppc"
19499	    ;;
19500	  powerpc-*linux*)
19501	    LD="${LD-ld} -m elf64ppc"
19502	    ;;
19503	  s390*-*linux*|s390*-*tpf*)
19504	    LD="${LD-ld} -m elf64_s390"
19505	    ;;
19506	  sparc*-*linux*)
19507	    LD="${LD-ld} -m elf64_sparc"
19508	    ;;
19509	esac
19510	;;
19511    esac
19512  fi
19513  rm -rf conftest*
19514  ;;
19515
19516*-*-sco3.2v5*)
19517  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
19518  SAVE_CFLAGS=$CFLAGS
19519  CFLAGS="$CFLAGS -belf"
19520  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
19521printf %s "checking whether the C compiler needs -belf... " >&6; }
19522if test ${lt_cv_cc_needs_belf+y}
19523then :
19524  printf %s "(cached) " >&6
19525else $as_nop
19526  ac_ext=c
19527ac_cpp='$CPP $CPPFLAGS'
19528ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19529ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19530ac_compiler_gnu=$ac_cv_c_compiler_gnu
19531
19532     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19533/* end confdefs.h.  */
19534
19535int
19536main (void)
19537{
19538
19539  ;
19540  return 0;
19541}
19542_ACEOF
19543if ac_fn_c_try_link "$LINENO"
19544then :
19545  lt_cv_cc_needs_belf=yes
19546else $as_nop
19547  lt_cv_cc_needs_belf=no
19548fi
19549rm -f core conftest.err conftest.$ac_objext conftest.beam \
19550    conftest$ac_exeext conftest.$ac_ext
19551     ac_ext=c
19552ac_cpp='$CPP $CPPFLAGS'
19553ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19554ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19555ac_compiler_gnu=$ac_cv_c_compiler_gnu
19556
19557fi
19558{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
19559printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
19560  if test yes != "$lt_cv_cc_needs_belf"; then
19561    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
19562    CFLAGS=$SAVE_CFLAGS
19563  fi
19564  ;;
19565*-*solaris*)
19566  # Find out what ABI is being produced by ac_compile, and set linker
19567  # options accordingly.
19568  echo 'int i;' > conftest.$ac_ext
19569  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
19570  (eval $ac_compile) 2>&5
19571  ac_status=$?
19572  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19573  test $ac_status = 0; }; then
19574    case `/usr/bin/file conftest.o` in
19575    *64-bit*)
19576      case $lt_cv_prog_gnu_ld in
19577      yes*)
19578        case $host in
19579        i?86-*-solaris*|x86_64-*-solaris*)
19580          LD="${LD-ld} -m elf_x86_64"
19581          ;;
19582        sparc*-*-solaris*)
19583          LD="${LD-ld} -m elf64_sparc"
19584          ;;
19585        esac
19586        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
19587        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
19588          LD=${LD-ld}_sol2
19589        fi
19590        ;;
19591      *)
19592	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
19593	  LD="${LD-ld} -64"
19594	fi
19595	;;
19596      esac
19597      ;;
19598    esac
19599  fi
19600  rm -rf conftest*
19601  ;;
19602esac
19603
19604need_locks=$enable_libtool_lock
19605
19606if test -n "$ac_tool_prefix"; then
19607  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
19608set dummy ${ac_tool_prefix}mt; ac_word=$2
19609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19610printf %s "checking for $ac_word... " >&6; }
19611if test ${ac_cv_prog_MANIFEST_TOOL+y}
19612then :
19613  printf %s "(cached) " >&6
19614else $as_nop
19615  if test -n "$MANIFEST_TOOL"; then
19616  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
19617else
19618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19619for as_dir in $PATH
19620do
19621  IFS=$as_save_IFS
19622  case $as_dir in #(((
19623    '') as_dir=./ ;;
19624    */) ;;
19625    *) as_dir=$as_dir/ ;;
19626  esac
19627    for ac_exec_ext in '' $ac_executable_extensions; do
19628  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19629    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
19630    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19631    break 2
19632  fi
19633done
19634  done
19635IFS=$as_save_IFS
19636
19637fi
19638fi
19639MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
19640if test -n "$MANIFEST_TOOL"; then
19641  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
19642printf "%s\n" "$MANIFEST_TOOL" >&6; }
19643else
19644  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19645printf "%s\n" "no" >&6; }
19646fi
19647
19648
19649fi
19650if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
19651  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
19652  # Extract the first word of "mt", so it can be a program name with args.
19653set dummy mt; ac_word=$2
19654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19655printf %s "checking for $ac_word... " >&6; }
19656if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
19657then :
19658  printf %s "(cached) " >&6
19659else $as_nop
19660  if test -n "$ac_ct_MANIFEST_TOOL"; then
19661  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
19662else
19663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19664for as_dir in $PATH
19665do
19666  IFS=$as_save_IFS
19667  case $as_dir in #(((
19668    '') as_dir=./ ;;
19669    */) ;;
19670    *) as_dir=$as_dir/ ;;
19671  esac
19672    for ac_exec_ext in '' $ac_executable_extensions; do
19673  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19674    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
19675    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19676    break 2
19677  fi
19678done
19679  done
19680IFS=$as_save_IFS
19681
19682fi
19683fi
19684ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
19685if test -n "$ac_ct_MANIFEST_TOOL"; then
19686  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
19687printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
19688else
19689  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19690printf "%s\n" "no" >&6; }
19691fi
19692
19693  if test "x$ac_ct_MANIFEST_TOOL" = x; then
19694    MANIFEST_TOOL=":"
19695  else
19696    case $cross_compiling:$ac_tool_warned in
19697yes:)
19698{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19699printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19700ac_tool_warned=yes ;;
19701esac
19702    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
19703  fi
19704else
19705  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
19706fi
19707
19708test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
19709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
19710printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
19711if test ${lt_cv_path_mainfest_tool+y}
19712then :
19713  printf %s "(cached) " >&6
19714else $as_nop
19715  lt_cv_path_mainfest_tool=no
19716  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
19717  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
19718  cat conftest.err >&5
19719  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
19720    lt_cv_path_mainfest_tool=yes
19721  fi
19722  rm -f conftest*
19723fi
19724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
19725printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
19726if test yes != "$lt_cv_path_mainfest_tool"; then
19727  MANIFEST_TOOL=:
19728fi
19729
19730
19731
19732
19733
19734
19735  case $host_os in
19736    rhapsody* | darwin*)
19737    if test -n "$ac_tool_prefix"; then
19738  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
19739set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
19740{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19741printf %s "checking for $ac_word... " >&6; }
19742if test ${ac_cv_prog_DSYMUTIL+y}
19743then :
19744  printf %s "(cached) " >&6
19745else $as_nop
19746  if test -n "$DSYMUTIL"; then
19747  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
19748else
19749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19750for as_dir in $PATH
19751do
19752  IFS=$as_save_IFS
19753  case $as_dir in #(((
19754    '') as_dir=./ ;;
19755    */) ;;
19756    *) as_dir=$as_dir/ ;;
19757  esac
19758    for ac_exec_ext in '' $ac_executable_extensions; do
19759  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19760    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
19761    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19762    break 2
19763  fi
19764done
19765  done
19766IFS=$as_save_IFS
19767
19768fi
19769fi
19770DSYMUTIL=$ac_cv_prog_DSYMUTIL
19771if test -n "$DSYMUTIL"; then
19772  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19773printf "%s\n" "$DSYMUTIL" >&6; }
19774else
19775  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19776printf "%s\n" "no" >&6; }
19777fi
19778
19779
19780fi
19781if test -z "$ac_cv_prog_DSYMUTIL"; then
19782  ac_ct_DSYMUTIL=$DSYMUTIL
19783  # Extract the first word of "dsymutil", so it can be a program name with args.
19784set dummy dsymutil; ac_word=$2
19785{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19786printf %s "checking for $ac_word... " >&6; }
19787if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
19788then :
19789  printf %s "(cached) " >&6
19790else $as_nop
19791  if test -n "$ac_ct_DSYMUTIL"; then
19792  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
19793else
19794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19795for as_dir in $PATH
19796do
19797  IFS=$as_save_IFS
19798  case $as_dir in #(((
19799    '') as_dir=./ ;;
19800    */) ;;
19801    *) as_dir=$as_dir/ ;;
19802  esac
19803    for ac_exec_ext in '' $ac_executable_extensions; do
19804  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19805    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
19806    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19807    break 2
19808  fi
19809done
19810  done
19811IFS=$as_save_IFS
19812
19813fi
19814fi
19815ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
19816if test -n "$ac_ct_DSYMUTIL"; then
19817  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
19818printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
19819else
19820  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19821printf "%s\n" "no" >&6; }
19822fi
19823
19824  if test "x$ac_ct_DSYMUTIL" = x; then
19825    DSYMUTIL=":"
19826  else
19827    case $cross_compiling:$ac_tool_warned in
19828yes:)
19829{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19830printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19831ac_tool_warned=yes ;;
19832esac
19833    DSYMUTIL=$ac_ct_DSYMUTIL
19834  fi
19835else
19836  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
19837fi
19838
19839    if test -n "$ac_tool_prefix"; then
19840  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
19841set dummy ${ac_tool_prefix}nmedit; ac_word=$2
19842{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19843printf %s "checking for $ac_word... " >&6; }
19844if test ${ac_cv_prog_NMEDIT+y}
19845then :
19846  printf %s "(cached) " >&6
19847else $as_nop
19848  if test -n "$NMEDIT"; then
19849  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
19850else
19851as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19852for as_dir in $PATH
19853do
19854  IFS=$as_save_IFS
19855  case $as_dir in #(((
19856    '') as_dir=./ ;;
19857    */) ;;
19858    *) as_dir=$as_dir/ ;;
19859  esac
19860    for ac_exec_ext in '' $ac_executable_extensions; do
19861  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19862    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
19863    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19864    break 2
19865  fi
19866done
19867  done
19868IFS=$as_save_IFS
19869
19870fi
19871fi
19872NMEDIT=$ac_cv_prog_NMEDIT
19873if test -n "$NMEDIT"; then
19874  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
19875printf "%s\n" "$NMEDIT" >&6; }
19876else
19877  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19878printf "%s\n" "no" >&6; }
19879fi
19880
19881
19882fi
19883if test -z "$ac_cv_prog_NMEDIT"; then
19884  ac_ct_NMEDIT=$NMEDIT
19885  # Extract the first word of "nmedit", so it can be a program name with args.
19886set dummy nmedit; ac_word=$2
19887{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19888printf %s "checking for $ac_word... " >&6; }
19889if test ${ac_cv_prog_ac_ct_NMEDIT+y}
19890then :
19891  printf %s "(cached) " >&6
19892else $as_nop
19893  if test -n "$ac_ct_NMEDIT"; then
19894  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
19895else
19896as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19897for as_dir in $PATH
19898do
19899  IFS=$as_save_IFS
19900  case $as_dir in #(((
19901    '') as_dir=./ ;;
19902    */) ;;
19903    *) as_dir=$as_dir/ ;;
19904  esac
19905    for ac_exec_ext in '' $ac_executable_extensions; do
19906  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19907    ac_cv_prog_ac_ct_NMEDIT="nmedit"
19908    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19909    break 2
19910  fi
19911done
19912  done
19913IFS=$as_save_IFS
19914
19915fi
19916fi
19917ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
19918if test -n "$ac_ct_NMEDIT"; then
19919  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
19920printf "%s\n" "$ac_ct_NMEDIT" >&6; }
19921else
19922  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19923printf "%s\n" "no" >&6; }
19924fi
19925
19926  if test "x$ac_ct_NMEDIT" = x; then
19927    NMEDIT=":"
19928  else
19929    case $cross_compiling:$ac_tool_warned in
19930yes:)
19931{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19932printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19933ac_tool_warned=yes ;;
19934esac
19935    NMEDIT=$ac_ct_NMEDIT
19936  fi
19937else
19938  NMEDIT="$ac_cv_prog_NMEDIT"
19939fi
19940
19941    if test -n "$ac_tool_prefix"; then
19942  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
19943set dummy ${ac_tool_prefix}lipo; ac_word=$2
19944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19945printf %s "checking for $ac_word... " >&6; }
19946if test ${ac_cv_prog_LIPO+y}
19947then :
19948  printf %s "(cached) " >&6
19949else $as_nop
19950  if test -n "$LIPO"; then
19951  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
19952else
19953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19954for as_dir in $PATH
19955do
19956  IFS=$as_save_IFS
19957  case $as_dir in #(((
19958    '') as_dir=./ ;;
19959    */) ;;
19960    *) as_dir=$as_dir/ ;;
19961  esac
19962    for ac_exec_ext in '' $ac_executable_extensions; do
19963  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19964    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
19965    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19966    break 2
19967  fi
19968done
19969  done
19970IFS=$as_save_IFS
19971
19972fi
19973fi
19974LIPO=$ac_cv_prog_LIPO
19975if test -n "$LIPO"; then
19976  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
19977printf "%s\n" "$LIPO" >&6; }
19978else
19979  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19980printf "%s\n" "no" >&6; }
19981fi
19982
19983
19984fi
19985if test -z "$ac_cv_prog_LIPO"; then
19986  ac_ct_LIPO=$LIPO
19987  # Extract the first word of "lipo", so it can be a program name with args.
19988set dummy lipo; ac_word=$2
19989{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19990printf %s "checking for $ac_word... " >&6; }
19991if test ${ac_cv_prog_ac_ct_LIPO+y}
19992then :
19993  printf %s "(cached) " >&6
19994else $as_nop
19995  if test -n "$ac_ct_LIPO"; then
19996  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
19997else
19998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19999for as_dir in $PATH
20000do
20001  IFS=$as_save_IFS
20002  case $as_dir in #(((
20003    '') as_dir=./ ;;
20004    */) ;;
20005    *) as_dir=$as_dir/ ;;
20006  esac
20007    for ac_exec_ext in '' $ac_executable_extensions; do
20008  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
20009    ac_cv_prog_ac_ct_LIPO="lipo"
20010    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
20011    break 2
20012  fi
20013done
20014  done
20015IFS=$as_save_IFS
20016
20017fi
20018fi
20019ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
20020if test -n "$ac_ct_LIPO"; then
20021  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
20022printf "%s\n" "$ac_ct_LIPO" >&6; }
20023else
20024  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20025printf "%s\n" "no" >&6; }
20026fi
20027
20028  if test "x$ac_ct_LIPO" = x; then
20029    LIPO=":"
20030  else
20031    case $cross_compiling:$ac_tool_warned in
20032yes:)
20033{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20034printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20035ac_tool_warned=yes ;;
20036esac
20037    LIPO=$ac_ct_LIPO
20038  fi
20039else
20040  LIPO="$ac_cv_prog_LIPO"
20041fi
20042
20043    if test -n "$ac_tool_prefix"; then
20044  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
20045set dummy ${ac_tool_prefix}otool; ac_word=$2
20046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20047printf %s "checking for $ac_word... " >&6; }
20048if test ${ac_cv_prog_OTOOL+y}
20049then :
20050  printf %s "(cached) " >&6
20051else $as_nop
20052  if test -n "$OTOOL"; then
20053  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
20054else
20055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20056for as_dir in $PATH
20057do
20058  IFS=$as_save_IFS
20059  case $as_dir in #(((
20060    '') as_dir=./ ;;
20061    */) ;;
20062    *) as_dir=$as_dir/ ;;
20063  esac
20064    for ac_exec_ext in '' $ac_executable_extensions; do
20065  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
20066    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
20067    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
20068    break 2
20069  fi
20070done
20071  done
20072IFS=$as_save_IFS
20073
20074fi
20075fi
20076OTOOL=$ac_cv_prog_OTOOL
20077if test -n "$OTOOL"; then
20078  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20079printf "%s\n" "$OTOOL" >&6; }
20080else
20081  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20082printf "%s\n" "no" >&6; }
20083fi
20084
20085
20086fi
20087if test -z "$ac_cv_prog_OTOOL"; then
20088  ac_ct_OTOOL=$OTOOL
20089  # Extract the first word of "otool", so it can be a program name with args.
20090set dummy otool; ac_word=$2
20091{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20092printf %s "checking for $ac_word... " >&6; }
20093if test ${ac_cv_prog_ac_ct_OTOOL+y}
20094then :
20095  printf %s "(cached) " >&6
20096else $as_nop
20097  if test -n "$ac_ct_OTOOL"; then
20098  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
20099else
20100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20101for as_dir in $PATH
20102do
20103  IFS=$as_save_IFS
20104  case $as_dir in #(((
20105    '') as_dir=./ ;;
20106    */) ;;
20107    *) as_dir=$as_dir/ ;;
20108  esac
20109    for ac_exec_ext in '' $ac_executable_extensions; do
20110  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
20111    ac_cv_prog_ac_ct_OTOOL="otool"
20112    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
20113    break 2
20114  fi
20115done
20116  done
20117IFS=$as_save_IFS
20118
20119fi
20120fi
20121ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
20122if test -n "$ac_ct_OTOOL"; then
20123  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
20124printf "%s\n" "$ac_ct_OTOOL" >&6; }
20125else
20126  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20127printf "%s\n" "no" >&6; }
20128fi
20129
20130  if test "x$ac_ct_OTOOL" = x; then
20131    OTOOL=":"
20132  else
20133    case $cross_compiling:$ac_tool_warned in
20134yes:)
20135{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20136printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20137ac_tool_warned=yes ;;
20138esac
20139    OTOOL=$ac_ct_OTOOL
20140  fi
20141else
20142  OTOOL="$ac_cv_prog_OTOOL"
20143fi
20144
20145    if test -n "$ac_tool_prefix"; then
20146  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
20147set dummy ${ac_tool_prefix}otool64; ac_word=$2
20148{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20149printf %s "checking for $ac_word... " >&6; }
20150if test ${ac_cv_prog_OTOOL64+y}
20151then :
20152  printf %s "(cached) " >&6
20153else $as_nop
20154  if test -n "$OTOOL64"; then
20155  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
20156else
20157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20158for as_dir in $PATH
20159do
20160  IFS=$as_save_IFS
20161  case $as_dir in #(((
20162    '') as_dir=./ ;;
20163    */) ;;
20164    *) as_dir=$as_dir/ ;;
20165  esac
20166    for ac_exec_ext in '' $ac_executable_extensions; do
20167  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
20168    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
20169    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
20170    break 2
20171  fi
20172done
20173  done
20174IFS=$as_save_IFS
20175
20176fi
20177fi
20178OTOOL64=$ac_cv_prog_OTOOL64
20179if test -n "$OTOOL64"; then
20180  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
20181printf "%s\n" "$OTOOL64" >&6; }
20182else
20183  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20184printf "%s\n" "no" >&6; }
20185fi
20186
20187
20188fi
20189if test -z "$ac_cv_prog_OTOOL64"; then
20190  ac_ct_OTOOL64=$OTOOL64
20191  # Extract the first word of "otool64", so it can be a program name with args.
20192set dummy otool64; ac_word=$2
20193{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20194printf %s "checking for $ac_word... " >&6; }
20195if test ${ac_cv_prog_ac_ct_OTOOL64+y}
20196then :
20197  printf %s "(cached) " >&6
20198else $as_nop
20199  if test -n "$ac_ct_OTOOL64"; then
20200  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
20201else
20202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20203for as_dir in $PATH
20204do
20205  IFS=$as_save_IFS
20206  case $as_dir in #(((
20207    '') as_dir=./ ;;
20208    */) ;;
20209    *) as_dir=$as_dir/ ;;
20210  esac
20211    for ac_exec_ext in '' $ac_executable_extensions; do
20212  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
20213    ac_cv_prog_ac_ct_OTOOL64="otool64"
20214    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
20215    break 2
20216  fi
20217done
20218  done
20219IFS=$as_save_IFS
20220
20221fi
20222fi
20223ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
20224if test -n "$ac_ct_OTOOL64"; then
20225  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
20226printf "%s\n" "$ac_ct_OTOOL64" >&6; }
20227else
20228  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20229printf "%s\n" "no" >&6; }
20230fi
20231
20232  if test "x$ac_ct_OTOOL64" = x; then
20233    OTOOL64=":"
20234  else
20235    case $cross_compiling:$ac_tool_warned in
20236yes:)
20237{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20238printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20239ac_tool_warned=yes ;;
20240esac
20241    OTOOL64=$ac_ct_OTOOL64
20242  fi
20243else
20244  OTOOL64="$ac_cv_prog_OTOOL64"
20245fi
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
20271
20272
20273    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
20274printf %s "checking for -single_module linker flag... " >&6; }
20275if test ${lt_cv_apple_cc_single_mod+y}
20276then :
20277  printf %s "(cached) " >&6
20278else $as_nop
20279  lt_cv_apple_cc_single_mod=no
20280      if test -z "$LT_MULTI_MODULE"; then
20281	# By default we will add the -single_module flag. You can override
20282	# by either setting the environment variable LT_MULTI_MODULE
20283	# non-empty at configure time, or by adding -multi_module to the
20284	# link flags.
20285	rm -rf libconftest.dylib*
20286	echo "int foo(void){return 1;}" > conftest.c
20287	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
20288-dynamiclib -Wl,-single_module conftest.c" >&5
20289	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
20290	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
20291        _lt_result=$?
20292	# If there is a non-empty error log, and "single_module"
20293	# appears in it, assume the flag caused a linker warning
20294        if test -s conftest.err && $GREP single_module conftest.err; then
20295	  cat conftest.err >&5
20296	# Otherwise, if the output was created with a 0 exit code from
20297	# the compiler, it worked.
20298	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
20299	  lt_cv_apple_cc_single_mod=yes
20300	else
20301	  cat conftest.err >&5
20302	fi
20303	rm -rf libconftest.dylib*
20304	rm -f conftest.*
20305      fi
20306fi
20307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
20308printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
20309
20310    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
20311printf %s "checking for -exported_symbols_list linker flag... " >&6; }
20312if test ${lt_cv_ld_exported_symbols_list+y}
20313then :
20314  printf %s "(cached) " >&6
20315else $as_nop
20316  lt_cv_ld_exported_symbols_list=no
20317      save_LDFLAGS=$LDFLAGS
20318      echo "_main" > conftest.sym
20319      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
20320      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20321/* end confdefs.h.  */
20322
20323int
20324main (void)
20325{
20326
20327  ;
20328  return 0;
20329}
20330_ACEOF
20331if ac_fn_c_try_link "$LINENO"
20332then :
20333  lt_cv_ld_exported_symbols_list=yes
20334else $as_nop
20335  lt_cv_ld_exported_symbols_list=no
20336fi
20337rm -f core conftest.err conftest.$ac_objext conftest.beam \
20338    conftest$ac_exeext conftest.$ac_ext
20339	LDFLAGS=$save_LDFLAGS
20340
20341fi
20342{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
20343printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
20344
20345    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
20346printf %s "checking for -force_load linker flag... " >&6; }
20347if test ${lt_cv_ld_force_load+y}
20348then :
20349  printf %s "(cached) " >&6
20350else $as_nop
20351  lt_cv_ld_force_load=no
20352      cat > conftest.c << _LT_EOF
20353int forced_loaded() { return 2;}
20354_LT_EOF
20355      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
20356      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
20357      echo "$AR cru libconftest.a conftest.o" >&5
20358      $AR cru libconftest.a conftest.o 2>&5
20359      echo "$RANLIB libconftest.a" >&5
20360      $RANLIB libconftest.a 2>&5
20361      cat > conftest.c << _LT_EOF
20362int main() { return 0;}
20363_LT_EOF
20364      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
20365      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
20366      _lt_result=$?
20367      if test -s conftest.err && $GREP force_load conftest.err; then
20368	cat conftest.err >&5
20369      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
20370	lt_cv_ld_force_load=yes
20371      else
20372	cat conftest.err >&5
20373      fi
20374        rm -f conftest.err libconftest.a conftest conftest.c
20375        rm -rf conftest.dSYM
20376
20377fi
20378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
20379printf "%s\n" "$lt_cv_ld_force_load" >&6; }
20380    case $host_os in
20381    rhapsody* | darwin1.[012])
20382      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
20383    darwin1.*)
20384      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
20385    darwin*) # darwin 5.x on
20386      # if running on 10.5 or later, the deployment target defaults
20387      # to the OS version, if on x86, and 10.4, the deployment
20388      # target defaults to 10.4. Don't you love it?
20389      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
20390	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
20391	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
20392	10.[012][,.]*)
20393	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
20394	10.*)
20395	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
20396      esac
20397    ;;
20398  esac
20399    if test yes = "$lt_cv_apple_cc_single_mod"; then
20400      _lt_dar_single_mod='$single_module'
20401    fi
20402    if test yes = "$lt_cv_ld_exported_symbols_list"; then
20403      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
20404    else
20405      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
20406    fi
20407    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
20408      _lt_dsymutil='~$DSYMUTIL $lib || :'
20409    else
20410      _lt_dsymutil=
20411    fi
20412    ;;
20413  esac
20414
20415# func_munge_path_list VARIABLE PATH
20416# -----------------------------------
20417# VARIABLE is name of variable containing _space_ separated list of
20418# directories to be munged by the contents of PATH, which is string
20419# having a format:
20420# "DIR[:DIR]:"
20421#       string "DIR[ DIR]" will be prepended to VARIABLE
20422# ":DIR[:DIR]"
20423#       string "DIR[ DIR]" will be appended to VARIABLE
20424# "DIRP[:DIRP]::[DIRA:]DIRA"
20425#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
20426#       "DIRA[ DIRA]" will be appended to VARIABLE
20427# "DIR[:DIR]"
20428#       VARIABLE will be replaced by "DIR[ DIR]"
20429func_munge_path_list ()
20430{
20431    case x$2 in
20432    x)
20433        ;;
20434    *:)
20435        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
20436        ;;
20437    x:*)
20438        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
20439        ;;
20440    *::*)
20441        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
20442        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
20443        ;;
20444    *)
20445        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
20446        ;;
20447    esac
20448}
20449
20450ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
20451"
20452if test "x$ac_cv_header_dlfcn_h" = xyes
20453then :
20454  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
20455
20456fi
20457
20458
20459
20460
20461
20462# Set options
20463# Check whether --enable-shared was given.
20464if test ${enable_shared+y}
20465then :
20466  enableval=$enable_shared; p=${PACKAGE-default}
20467    case $enableval in
20468    yes) enable_shared=yes ;;
20469    no) enable_shared=no ;;
20470    *)
20471      enable_shared=no
20472      # Look at the argument we got.  We use all the common list separators.
20473      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
20474      for pkg in $enableval; do
20475	IFS=$lt_save_ifs
20476	if test "X$pkg" = "X$p"; then
20477	  enable_shared=yes
20478	fi
20479      done
20480      IFS=$lt_save_ifs
20481      ;;
20482    esac
20483else $as_nop
20484  enable_shared=no
20485fi
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496        enable_dlopen=no
20497
20498
20499  enable_win32_dll=no
20500
20501
20502
20503  # Check whether --enable-static was given.
20504if test ${enable_static+y}
20505then :
20506  enableval=$enable_static; p=${PACKAGE-default}
20507    case $enableval in
20508    yes) enable_static=yes ;;
20509    no) enable_static=no ;;
20510    *)
20511     enable_static=no
20512      # Look at the argument we got.  We use all the common list separators.
20513      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
20514      for pkg in $enableval; do
20515	IFS=$lt_save_ifs
20516	if test "X$pkg" = "X$p"; then
20517	  enable_static=yes
20518	fi
20519      done
20520      IFS=$lt_save_ifs
20521      ;;
20522    esac
20523else $as_nop
20524  enable_static=yes
20525fi
20526
20527
20528
20529
20530
20531
20532
20533
20534
20535
20536# Check whether --with-pic was given.
20537if test ${with_pic+y}
20538then :
20539  withval=$with_pic; lt_p=${PACKAGE-default}
20540    case $withval in
20541    yes|no) pic_mode=$withval ;;
20542    *)
20543      pic_mode=default
20544      # Look at the argument we got.  We use all the common list separators.
20545      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
20546      for lt_pkg in $withval; do
20547	IFS=$lt_save_ifs
20548	if test "X$lt_pkg" = "X$lt_p"; then
20549	  pic_mode=yes
20550	fi
20551      done
20552      IFS=$lt_save_ifs
20553      ;;
20554    esac
20555else $as_nop
20556  pic_mode=default
20557fi
20558
20559
20560
20561
20562
20563
20564
20565
20566  # Check whether --enable-fast-install was given.
20567if test ${enable_fast_install+y}
20568then :
20569  enableval=$enable_fast_install; p=${PACKAGE-default}
20570    case $enableval in
20571    yes) enable_fast_install=yes ;;
20572    no) enable_fast_install=no ;;
20573    *)
20574      enable_fast_install=no
20575      # Look at the argument we got.  We use all the common list separators.
20576      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
20577      for pkg in $enableval; do
20578	IFS=$lt_save_ifs
20579	if test "X$pkg" = "X$p"; then
20580	  enable_fast_install=yes
20581	fi
20582      done
20583      IFS=$lt_save_ifs
20584      ;;
20585    esac
20586else $as_nop
20587  enable_fast_install=yes
20588fi
20589
20590
20591
20592
20593
20594
20595
20596
20597  shared_archive_member_spec=
20598case $host,$enable_shared in
20599power*-*-aix[5-9]*,yes)
20600  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
20601printf %s "checking which variant of shared library versioning to provide... " >&6; }
20602
20603# Check whether --with-aix-soname was given.
20604if test ${with_aix_soname+y}
20605then :
20606  withval=$with_aix_soname; case $withval in
20607    aix|svr4|both)
20608      ;;
20609    *)
20610      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
20611      ;;
20612    esac
20613    lt_cv_with_aix_soname=$with_aix_soname
20614else $as_nop
20615  if test ${lt_cv_with_aix_soname+y}
20616then :
20617  printf %s "(cached) " >&6
20618else $as_nop
20619  lt_cv_with_aix_soname=aix
20620fi
20621
20622    with_aix_soname=$lt_cv_with_aix_soname
20623fi
20624
20625  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
20626printf "%s\n" "$with_aix_soname" >&6; }
20627  if test aix != "$with_aix_soname"; then
20628    # For the AIX way of multilib, we name the shared archive member
20629    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
20630    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
20631    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
20632    # the AIX toolchain works better with OBJECT_MODE set (default 32).
20633    if test 64 = "${OBJECT_MODE-32}"; then
20634      shared_archive_member_spec=shr_64
20635    else
20636      shared_archive_member_spec=shr
20637    fi
20638  fi
20639  ;;
20640*)
20641  with_aix_soname=aix
20642  ;;
20643esac
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654# This can be used to rebuild libtool when needed
20655LIBTOOL_DEPS=$ltmain
20656
20657# Always use our own libtool.
20658LIBTOOL='$(SHELL) $(top_builddir)/libtool'
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689test -z "$LN_S" && LN_S="ln -s"
20690
20691
20692
20693
20694
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704if test -n "${ZSH_VERSION+set}"; then
20705   setopt NO_GLOB_SUBST
20706fi
20707
20708{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
20709printf %s "checking for objdir... " >&6; }
20710if test ${lt_cv_objdir+y}
20711then :
20712  printf %s "(cached) " >&6
20713else $as_nop
20714  rm -f .libs 2>/dev/null
20715mkdir .libs 2>/dev/null
20716if test -d .libs; then
20717  lt_cv_objdir=.libs
20718else
20719  # MS-DOS does not allow filenames that begin with a dot.
20720  lt_cv_objdir=_libs
20721fi
20722rmdir .libs 2>/dev/null
20723fi
20724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
20725printf "%s\n" "$lt_cv_objdir" >&6; }
20726objdir=$lt_cv_objdir
20727
20728
20729
20730
20731
20732printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
20733
20734
20735
20736
20737case $host_os in
20738aix3*)
20739  # AIX sometimes has problems with the GCC collect2 program.  For some
20740  # reason, if we set the COLLECT_NAMES environment variable, the problems
20741  # vanish in a puff of smoke.
20742  if test set != "${COLLECT_NAMES+set}"; then
20743    COLLECT_NAMES=
20744    export COLLECT_NAMES
20745  fi
20746  ;;
20747esac
20748
20749# Global variables:
20750ofile=libtool
20751can_build_shared=yes
20752
20753# All known linkers require a '.a' archive for static linking (except MSVC,
20754# which needs '.lib').
20755libext=a
20756
20757with_gnu_ld=$lt_cv_prog_gnu_ld
20758
20759old_CC=$CC
20760old_CFLAGS=$CFLAGS
20761
20762# Set sane defaults for various variables
20763test -z "$CC" && CC=cc
20764test -z "$LTCC" && LTCC=$CC
20765test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
20766test -z "$LD" && LD=ld
20767test -z "$ac_objext" && ac_objext=o
20768
20769func_cc_basename $compiler
20770cc_basename=$func_cc_basename_result
20771
20772
20773# Only perform the check for file, if the check method requires it
20774test -z "$MAGIC_CMD" && MAGIC_CMD=file
20775case $deplibs_check_method in
20776file_magic*)
20777  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
20778    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
20779printf %s "checking for ${ac_tool_prefix}file... " >&6; }
20780if test ${lt_cv_path_MAGIC_CMD+y}
20781then :
20782  printf %s "(cached) " >&6
20783else $as_nop
20784  case $MAGIC_CMD in
20785[\\/*] |  ?:[\\/]*)
20786  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
20787  ;;
20788*)
20789  lt_save_MAGIC_CMD=$MAGIC_CMD
20790  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
20791  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
20792  for ac_dir in $ac_dummy; do
20793    IFS=$lt_save_ifs
20794    test -z "$ac_dir" && ac_dir=.
20795    if test -f "$ac_dir/${ac_tool_prefix}file"; then
20796      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
20797      if test -n "$file_magic_test_file"; then
20798	case $deplibs_check_method in
20799	"file_magic "*)
20800	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
20801	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
20802	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
20803	    $EGREP "$file_magic_regex" > /dev/null; then
20804	    :
20805	  else
20806	    cat <<_LT_EOF 1>&2
20807
20808*** Warning: the command libtool uses to detect shared libraries,
20809*** $file_magic_cmd, produces output that libtool cannot recognize.
20810*** The result is that libtool may fail to recognize shared libraries
20811*** as such.  This will affect the creation of libtool libraries that
20812*** depend on shared libraries, but programs linked with such libtool
20813*** libraries will work regardless of this problem.  Nevertheless, you
20814*** may want to report the problem to your system manager and/or to
20815*** bug-libtool@gnu.org
20816
20817_LT_EOF
20818	  fi ;;
20819	esac
20820      fi
20821      break
20822    fi
20823  done
20824  IFS=$lt_save_ifs
20825  MAGIC_CMD=$lt_save_MAGIC_CMD
20826  ;;
20827esac
20828fi
20829
20830MAGIC_CMD=$lt_cv_path_MAGIC_CMD
20831if test -n "$MAGIC_CMD"; then
20832  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
20833printf "%s\n" "$MAGIC_CMD" >&6; }
20834else
20835  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20836printf "%s\n" "no" >&6; }
20837fi
20838
20839
20840
20841
20842
20843if test -z "$lt_cv_path_MAGIC_CMD"; then
20844  if test -n "$ac_tool_prefix"; then
20845    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
20846printf %s "checking for file... " >&6; }
20847if test ${lt_cv_path_MAGIC_CMD+y}
20848then :
20849  printf %s "(cached) " >&6
20850else $as_nop
20851  case $MAGIC_CMD in
20852[\\/*] |  ?:[\\/]*)
20853  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
20854  ;;
20855*)
20856  lt_save_MAGIC_CMD=$MAGIC_CMD
20857  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
20858  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
20859  for ac_dir in $ac_dummy; do
20860    IFS=$lt_save_ifs
20861    test -z "$ac_dir" && ac_dir=.
20862    if test -f "$ac_dir/file"; then
20863      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
20864      if test -n "$file_magic_test_file"; then
20865	case $deplibs_check_method in
20866	"file_magic "*)
20867	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
20868	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
20869	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
20870	    $EGREP "$file_magic_regex" > /dev/null; then
20871	    :
20872	  else
20873	    cat <<_LT_EOF 1>&2
20874
20875*** Warning: the command libtool uses to detect shared libraries,
20876*** $file_magic_cmd, produces output that libtool cannot recognize.
20877*** The result is that libtool may fail to recognize shared libraries
20878*** as such.  This will affect the creation of libtool libraries that
20879*** depend on shared libraries, but programs linked with such libtool
20880*** libraries will work regardless of this problem.  Nevertheless, you
20881*** may want to report the problem to your system manager and/or to
20882*** bug-libtool@gnu.org
20883
20884_LT_EOF
20885	  fi ;;
20886	esac
20887      fi
20888      break
20889    fi
20890  done
20891  IFS=$lt_save_ifs
20892  MAGIC_CMD=$lt_save_MAGIC_CMD
20893  ;;
20894esac
20895fi
20896
20897MAGIC_CMD=$lt_cv_path_MAGIC_CMD
20898if test -n "$MAGIC_CMD"; then
20899  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
20900printf "%s\n" "$MAGIC_CMD" >&6; }
20901else
20902  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
20903printf "%s\n" "no" >&6; }
20904fi
20905
20906
20907  else
20908    MAGIC_CMD=:
20909  fi
20910fi
20911
20912  fi
20913  ;;
20914esac
20915
20916# Use C for the default configuration in the libtool script
20917
20918lt_save_CC=$CC
20919ac_ext=c
20920ac_cpp='$CPP $CPPFLAGS'
20921ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20922ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20923ac_compiler_gnu=$ac_cv_c_compiler_gnu
20924
20925
20926# Source file extension for C test sources.
20927ac_ext=c
20928
20929# Object file extension for compiled C test sources.
20930objext=o
20931objext=$objext
20932
20933# Code to be used in simple compile tests
20934lt_simple_compile_test_code="int some_variable = 0;"
20935
20936# Code to be used in simple link tests
20937lt_simple_link_test_code='int main(){return(0);}'
20938
20939
20940
20941
20942
20943
20944
20945# If no C compiler was specified, use CC.
20946LTCC=${LTCC-"$CC"}
20947
20948# If no C compiler flags were specified, use CFLAGS.
20949LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
20950
20951# Allow CC to be a program name with arguments.
20952compiler=$CC
20953
20954# Save the default compiler, since it gets overwritten when the other
20955# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
20956compiler_DEFAULT=$CC
20957
20958# save warnings/boilerplate of simple test code
20959ac_outfile=conftest.$ac_objext
20960echo "$lt_simple_compile_test_code" >conftest.$ac_ext
20961eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
20962_lt_compiler_boilerplate=`cat conftest.err`
20963$RM conftest*
20964
20965ac_outfile=conftest.$ac_objext
20966echo "$lt_simple_link_test_code" >conftest.$ac_ext
20967eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
20968_lt_linker_boilerplate=`cat conftest.err`
20969$RM -r conftest*
20970
20971
20972## CAVEAT EMPTOR:
20973## There is no encapsulation within the following macros, do not change
20974## the running order or otherwise move them around unless you know exactly
20975## what you are doing...
20976if test -n "$compiler"; then
20977
20978lt_prog_compiler_no_builtin_flag=
20979
20980if test yes = "$GCC"; then
20981  case $cc_basename in
20982  nvcc*)
20983    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
20984  *)
20985    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
20986  esac
20987
20988  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
20989printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
20990if test ${lt_cv_prog_compiler_rtti_exceptions+y}
20991then :
20992  printf %s "(cached) " >&6
20993else $as_nop
20994  lt_cv_prog_compiler_rtti_exceptions=no
20995   ac_outfile=conftest.$ac_objext
20996   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20997   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
20998   # Insert the option either (1) after the last *FLAGS variable, or
20999   # (2) before a word containing "conftest.", or (3) at the end.
21000   # Note that $ac_compile itself does not contain backslashes and begins
21001   # with a dollar sign (not a hyphen), so the echo should work correctly.
21002   # The option is referenced via a variable to avoid confusing sed.
21003   lt_compile=`echo "$ac_compile" | $SED \
21004   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
21005   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
21006   -e 's:$: $lt_compiler_flag:'`
21007   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
21008   (eval "$lt_compile" 2>conftest.err)
21009   ac_status=$?
21010   cat conftest.err >&5
21011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21012   if (exit $ac_status) && test -s "$ac_outfile"; then
21013     # The compiler can only warn and ignore the option if not recognized
21014     # So say no if there are warnings other than the usual output.
21015     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
21016     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
21017     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
21018       lt_cv_prog_compiler_rtti_exceptions=yes
21019     fi
21020   fi
21021   $RM conftest*
21022
21023fi
21024{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
21025printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
21026
21027if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
21028    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
21029else
21030    :
21031fi
21032
21033fi
21034
21035
21036
21037
21038
21039
21040  lt_prog_compiler_wl=
21041lt_prog_compiler_pic=
21042lt_prog_compiler_static=
21043
21044
21045  if test yes = "$GCC"; then
21046    lt_prog_compiler_wl='-Wl,'
21047    lt_prog_compiler_static='-static'
21048
21049    case $host_os in
21050      aix*)
21051      # All AIX code is PIC.
21052      if test ia64 = "$host_cpu"; then
21053	# AIX 5 now supports IA64 processor
21054	lt_prog_compiler_static='-Bstatic'
21055      fi
21056      lt_prog_compiler_pic='-fPIC'
21057      ;;
21058
21059    amigaos*)
21060      case $host_cpu in
21061      powerpc)
21062            # see comment about AmigaOS4 .so support
21063            lt_prog_compiler_pic='-fPIC'
21064        ;;
21065      m68k)
21066            # FIXME: we need at least 68020 code to build shared libraries, but
21067            # adding the '-m68020' flag to GCC prevents building anything better,
21068            # like '-m68040'.
21069            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
21070        ;;
21071      esac
21072      ;;
21073
21074    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
21075      # PIC is the default for these OSes.
21076      ;;
21077
21078    mingw* | cygwin* | pw32* | os2* | cegcc*)
21079      # This hack is so that the source file can tell whether it is being
21080      # built for inclusion in a dll (and should export symbols for example).
21081      # Although the cygwin gcc ignores -fPIC, still need this for old-style
21082      # (--disable-auto-import) libraries
21083      lt_prog_compiler_pic='-DDLL_EXPORT'
21084      case $host_os in
21085      os2*)
21086	lt_prog_compiler_static='$wl-static'
21087	;;
21088      esac
21089      ;;
21090
21091    darwin* | rhapsody*)
21092      # PIC is the default on this platform
21093      # Common symbols not allowed in MH_DYLIB files
21094      lt_prog_compiler_pic='-fno-common'
21095      ;;
21096
21097    haiku*)
21098      # PIC is the default for Haiku.
21099      # The "-static" flag exists, but is broken.
21100      lt_prog_compiler_static=
21101      ;;
21102
21103    hpux*)
21104      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
21105      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
21106      # sets the default TLS model and affects inlining.
21107      case $host_cpu in
21108      hppa*64*)
21109	# +Z the default
21110	;;
21111      *)
21112	lt_prog_compiler_pic='-fPIC'
21113	;;
21114      esac
21115      ;;
21116
21117    interix[3-9]*)
21118      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
21119      # Instead, we relocate shared libraries at runtime.
21120      ;;
21121
21122    msdosdjgpp*)
21123      # Just because we use GCC doesn't mean we suddenly get shared libraries
21124      # on systems that don't support them.
21125      lt_prog_compiler_can_build_shared=no
21126      enable_shared=no
21127      ;;
21128
21129    *nto* | *qnx*)
21130      # QNX uses GNU C++, but need to define -shared option too, otherwise
21131      # it will coredump.
21132      lt_prog_compiler_pic='-fPIC -shared'
21133      ;;
21134
21135    sysv4*MP*)
21136      if test -d /usr/nec; then
21137	lt_prog_compiler_pic=-Kconform_pic
21138      fi
21139      ;;
21140
21141    *)
21142      lt_prog_compiler_pic='-fPIC'
21143      ;;
21144    esac
21145
21146    case $cc_basename in
21147    nvcc*) # Cuda Compiler Driver 2.2
21148      lt_prog_compiler_wl='-Xlinker '
21149      if test -n "$lt_prog_compiler_pic"; then
21150        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
21151      fi
21152      ;;
21153    esac
21154  else
21155    # PORTME Check for flag to pass linker flags through the system compiler.
21156    case $host_os in
21157    aix*)
21158      lt_prog_compiler_wl='-Wl,'
21159      if test ia64 = "$host_cpu"; then
21160	# AIX 5 now supports IA64 processor
21161	lt_prog_compiler_static='-Bstatic'
21162      else
21163	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
21164      fi
21165      ;;
21166
21167    darwin* | rhapsody*)
21168      # PIC is the default on this platform
21169      # Common symbols not allowed in MH_DYLIB files
21170      lt_prog_compiler_pic='-fno-common'
21171      case $cc_basename in
21172      nagfor*)
21173        # NAG Fortran compiler
21174        lt_prog_compiler_wl='-Wl,-Wl,,'
21175        lt_prog_compiler_pic='-PIC'
21176        lt_prog_compiler_static='-Bstatic'
21177        ;;
21178      esac
21179      ;;
21180
21181    mingw* | cygwin* | pw32* | os2* | cegcc*)
21182      # This hack is so that the source file can tell whether it is being
21183      # built for inclusion in a dll (and should export symbols for example).
21184      lt_prog_compiler_pic='-DDLL_EXPORT'
21185      case $host_os in
21186      os2*)
21187	lt_prog_compiler_static='$wl-static'
21188	;;
21189      esac
21190      ;;
21191
21192    hpux9* | hpux10* | hpux11*)
21193      lt_prog_compiler_wl='-Wl,'
21194      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
21195      # not for PA HP-UX.
21196      case $host_cpu in
21197      hppa*64*|ia64*)
21198	# +Z the default
21199	;;
21200      *)
21201	lt_prog_compiler_pic='+Z'
21202	;;
21203      esac
21204      # Is there a better lt_prog_compiler_static that works with the bundled CC?
21205      lt_prog_compiler_static='$wl-a ${wl}archive'
21206      ;;
21207
21208    irix5* | irix6* | nonstopux*)
21209      lt_prog_compiler_wl='-Wl,'
21210      # PIC (with -KPIC) is the default.
21211      lt_prog_compiler_static='-non_shared'
21212      ;;
21213
21214    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
21215      case $cc_basename in
21216      # old Intel for x86_64, which still supported -KPIC.
21217      ecc*)
21218	lt_prog_compiler_wl='-Wl,'
21219	lt_prog_compiler_pic='-KPIC'
21220	lt_prog_compiler_static='-static'
21221        ;;
21222      # icc used to be incompatible with GCC.
21223      # ICC 10 doesn't accept -KPIC any more.
21224      icc* | ifort*)
21225	lt_prog_compiler_wl='-Wl,'
21226	lt_prog_compiler_pic='-fPIC'
21227	lt_prog_compiler_static='-static'
21228        ;;
21229      # Lahey Fortran 8.1.
21230      lf95*)
21231	lt_prog_compiler_wl='-Wl,'
21232	lt_prog_compiler_pic='--shared'
21233	lt_prog_compiler_static='--static'
21234	;;
21235      nagfor*)
21236	# NAG Fortran compiler
21237	lt_prog_compiler_wl='-Wl,-Wl,,'
21238	lt_prog_compiler_pic='-PIC'
21239	lt_prog_compiler_static='-Bstatic'
21240	;;
21241      tcc*)
21242	# Fabrice Bellard et al's Tiny C Compiler
21243	lt_prog_compiler_wl='-Wl,'
21244	lt_prog_compiler_pic='-fPIC'
21245	lt_prog_compiler_static='-static'
21246	;;
21247      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
21248        # Portland Group compilers (*not* the Pentium gcc compiler,
21249	# which looks to be a dead project)
21250	lt_prog_compiler_wl='-Wl,'
21251	lt_prog_compiler_pic='-fpic'
21252	lt_prog_compiler_static='-Bstatic'
21253        ;;
21254      ccc*)
21255        lt_prog_compiler_wl='-Wl,'
21256        # All Alpha code is PIC.
21257        lt_prog_compiler_static='-non_shared'
21258        ;;
21259      xl* | bgxl* | bgf* | mpixl*)
21260	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
21261	lt_prog_compiler_wl='-Wl,'
21262	lt_prog_compiler_pic='-qpic'
21263	lt_prog_compiler_static='-qstaticlink'
21264	;;
21265      *)
21266	case `$CC -V 2>&1 | sed 5q` in
21267	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
21268	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
21269	  lt_prog_compiler_pic='-KPIC'
21270	  lt_prog_compiler_static='-Bstatic'
21271	  lt_prog_compiler_wl=''
21272	  ;;
21273	*Sun\ F* | *Sun*Fortran*)
21274	  lt_prog_compiler_pic='-KPIC'
21275	  lt_prog_compiler_static='-Bstatic'
21276	  lt_prog_compiler_wl='-Qoption ld '
21277	  ;;
21278	*Sun\ C*)
21279	  # Sun C 5.9
21280	  lt_prog_compiler_pic='-KPIC'
21281	  lt_prog_compiler_static='-Bstatic'
21282	  lt_prog_compiler_wl='-Wl,'
21283	  ;;
21284        *Intel*\ [CF]*Compiler*)
21285	  lt_prog_compiler_wl='-Wl,'
21286	  lt_prog_compiler_pic='-fPIC'
21287	  lt_prog_compiler_static='-static'
21288	  ;;
21289	*Portland\ Group*)
21290	  lt_prog_compiler_wl='-Wl,'
21291	  lt_prog_compiler_pic='-fpic'
21292	  lt_prog_compiler_static='-Bstatic'
21293	  ;;
21294	esac
21295	;;
21296      esac
21297      ;;
21298
21299    newsos6)
21300      lt_prog_compiler_pic='-KPIC'
21301      lt_prog_compiler_static='-Bstatic'
21302      ;;
21303
21304    *nto* | *qnx*)
21305      # QNX uses GNU C++, but need to define -shared option too, otherwise
21306      # it will coredump.
21307      lt_prog_compiler_pic='-fPIC -shared'
21308      ;;
21309
21310    osf3* | osf4* | osf5*)
21311      lt_prog_compiler_wl='-Wl,'
21312      # All OSF/1 code is PIC.
21313      lt_prog_compiler_static='-non_shared'
21314      ;;
21315
21316    rdos*)
21317      lt_prog_compiler_static='-non_shared'
21318      ;;
21319
21320    solaris*)
21321      lt_prog_compiler_pic='-KPIC'
21322      lt_prog_compiler_static='-Bstatic'
21323      case $cc_basename in
21324      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
21325	lt_prog_compiler_wl='-Qoption ld ';;
21326      *)
21327	lt_prog_compiler_wl='-Wl,';;
21328      esac
21329      ;;
21330
21331    sunos4*)
21332      lt_prog_compiler_wl='-Qoption ld '
21333      lt_prog_compiler_pic='-PIC'
21334      lt_prog_compiler_static='-Bstatic'
21335      ;;
21336
21337    sysv4 | sysv4.2uw2* | sysv4.3*)
21338      lt_prog_compiler_wl='-Wl,'
21339      lt_prog_compiler_pic='-KPIC'
21340      lt_prog_compiler_static='-Bstatic'
21341      ;;
21342
21343    sysv4*MP*)
21344      if test -d /usr/nec; then
21345	lt_prog_compiler_pic='-Kconform_pic'
21346	lt_prog_compiler_static='-Bstatic'
21347      fi
21348      ;;
21349
21350    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
21351      lt_prog_compiler_wl='-Wl,'
21352      lt_prog_compiler_pic='-KPIC'
21353      lt_prog_compiler_static='-Bstatic'
21354      ;;
21355
21356    unicos*)
21357      lt_prog_compiler_wl='-Wl,'
21358      lt_prog_compiler_can_build_shared=no
21359      ;;
21360
21361    uts4*)
21362      lt_prog_compiler_pic='-pic'
21363      lt_prog_compiler_static='-Bstatic'
21364      ;;
21365
21366    *)
21367      lt_prog_compiler_can_build_shared=no
21368      ;;
21369    esac
21370  fi
21371
21372case $host_os in
21373  # For platforms that do not support PIC, -DPIC is meaningless:
21374  *djgpp*)
21375    lt_prog_compiler_pic=
21376    ;;
21377  *)
21378    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
21379    ;;
21380esac
21381
21382{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
21383printf %s "checking for $compiler option to produce PIC... " >&6; }
21384if test ${lt_cv_prog_compiler_pic+y}
21385then :
21386  printf %s "(cached) " >&6
21387else $as_nop
21388  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
21389fi
21390{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
21391printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
21392lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
21393
21394#
21395# Check to make sure the PIC flag actually works.
21396#
21397if test -n "$lt_prog_compiler_pic"; then
21398  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
21399printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
21400if test ${lt_cv_prog_compiler_pic_works+y}
21401then :
21402  printf %s "(cached) " >&6
21403else $as_nop
21404  lt_cv_prog_compiler_pic_works=no
21405   ac_outfile=conftest.$ac_objext
21406   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
21407   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
21408   # Insert the option either (1) after the last *FLAGS variable, or
21409   # (2) before a word containing "conftest.", or (3) at the end.
21410   # Note that $ac_compile itself does not contain backslashes and begins
21411   # with a dollar sign (not a hyphen), so the echo should work correctly.
21412   # The option is referenced via a variable to avoid confusing sed.
21413   lt_compile=`echo "$ac_compile" | $SED \
21414   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
21415   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
21416   -e 's:$: $lt_compiler_flag:'`
21417   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
21418   (eval "$lt_compile" 2>conftest.err)
21419   ac_status=$?
21420   cat conftest.err >&5
21421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21422   if (exit $ac_status) && test -s "$ac_outfile"; then
21423     # The compiler can only warn and ignore the option if not recognized
21424     # So say no if there are warnings other than the usual output.
21425     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
21426     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
21427     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
21428       lt_cv_prog_compiler_pic_works=yes
21429     fi
21430   fi
21431   $RM conftest*
21432
21433fi
21434{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
21435printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
21436
21437if test yes = "$lt_cv_prog_compiler_pic_works"; then
21438    case $lt_prog_compiler_pic in
21439     "" | " "*) ;;
21440     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
21441     esac
21442else
21443    lt_prog_compiler_pic=
21444     lt_prog_compiler_can_build_shared=no
21445fi
21446
21447fi
21448
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458
21459#
21460# Check to make sure the static flag actually works.
21461#
21462wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
21463{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
21464printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
21465if test ${lt_cv_prog_compiler_static_works+y}
21466then :
21467  printf %s "(cached) " >&6
21468else $as_nop
21469  lt_cv_prog_compiler_static_works=no
21470   save_LDFLAGS=$LDFLAGS
21471   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
21472   echo "$lt_simple_link_test_code" > conftest.$ac_ext
21473   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
21474     # The linker can only warn and ignore the option if not recognized
21475     # So say no if there are warnings
21476     if test -s conftest.err; then
21477       # Append any errors to the config.log.
21478       cat conftest.err 1>&5
21479       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
21480       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
21481       if diff conftest.exp conftest.er2 >/dev/null; then
21482         lt_cv_prog_compiler_static_works=yes
21483       fi
21484     else
21485       lt_cv_prog_compiler_static_works=yes
21486     fi
21487   fi
21488   $RM -r conftest*
21489   LDFLAGS=$save_LDFLAGS
21490
21491fi
21492{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
21493printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
21494
21495if test yes = "$lt_cv_prog_compiler_static_works"; then
21496    :
21497else
21498    lt_prog_compiler_static=
21499fi
21500
21501
21502
21503
21504
21505
21506
21507  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
21508printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
21509if test ${lt_cv_prog_compiler_c_o+y}
21510then :
21511  printf %s "(cached) " >&6
21512else $as_nop
21513  lt_cv_prog_compiler_c_o=no
21514   $RM -r conftest 2>/dev/null
21515   mkdir conftest
21516   cd conftest
21517   mkdir out
21518   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
21519
21520   lt_compiler_flag="-o out/conftest2.$ac_objext"
21521   # Insert the option either (1) after the last *FLAGS variable, or
21522   # (2) before a word containing "conftest.", or (3) at the end.
21523   # Note that $ac_compile itself does not contain backslashes and begins
21524   # with a dollar sign (not a hyphen), so the echo should work correctly.
21525   lt_compile=`echo "$ac_compile" | $SED \
21526   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
21527   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
21528   -e 's:$: $lt_compiler_flag:'`
21529   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
21530   (eval "$lt_compile" 2>out/conftest.err)
21531   ac_status=$?
21532   cat out/conftest.err >&5
21533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21534   if (exit $ac_status) && test -s out/conftest2.$ac_objext
21535   then
21536     # The compiler can only warn and ignore the option if not recognized
21537     # So say no if there are warnings
21538     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
21539     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
21540     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
21541       lt_cv_prog_compiler_c_o=yes
21542     fi
21543   fi
21544   chmod u+w . 2>&5
21545   $RM conftest*
21546   # SGI C++ compiler will create directory out/ii_files/ for
21547   # template instantiation
21548   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
21549   $RM out/* && rmdir out
21550   cd ..
21551   $RM -r conftest
21552   $RM conftest*
21553
21554fi
21555{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
21556printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
21557
21558
21559
21560
21561
21562
21563  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
21564printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
21565if test ${lt_cv_prog_compiler_c_o+y}
21566then :
21567  printf %s "(cached) " >&6
21568else $as_nop
21569  lt_cv_prog_compiler_c_o=no
21570   $RM -r conftest 2>/dev/null
21571   mkdir conftest
21572   cd conftest
21573   mkdir out
21574   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
21575
21576   lt_compiler_flag="-o out/conftest2.$ac_objext"
21577   # Insert the option either (1) after the last *FLAGS variable, or
21578   # (2) before a word containing "conftest.", or (3) at the end.
21579   # Note that $ac_compile itself does not contain backslashes and begins
21580   # with a dollar sign (not a hyphen), so the echo should work correctly.
21581   lt_compile=`echo "$ac_compile" | $SED \
21582   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
21583   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
21584   -e 's:$: $lt_compiler_flag:'`
21585   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
21586   (eval "$lt_compile" 2>out/conftest.err)
21587   ac_status=$?
21588   cat out/conftest.err >&5
21589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21590   if (exit $ac_status) && test -s out/conftest2.$ac_objext
21591   then
21592     # The compiler can only warn and ignore the option if not recognized
21593     # So say no if there are warnings
21594     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
21595     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
21596     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
21597       lt_cv_prog_compiler_c_o=yes
21598     fi
21599   fi
21600   chmod u+w . 2>&5
21601   $RM conftest*
21602   # SGI C++ compiler will create directory out/ii_files/ for
21603   # template instantiation
21604   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
21605   $RM out/* && rmdir out
21606   cd ..
21607   $RM -r conftest
21608   $RM conftest*
21609
21610fi
21611{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
21612printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
21613
21614
21615
21616
21617hard_links=nottested
21618if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
21619  # do not overwrite the value of need_locks provided by the user
21620  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
21621printf %s "checking if we can lock with hard links... " >&6; }
21622  hard_links=yes
21623  $RM conftest*
21624  ln conftest.a conftest.b 2>/dev/null && hard_links=no
21625  touch conftest.a
21626  ln conftest.a conftest.b 2>&5 || hard_links=no
21627  ln conftest.a conftest.b 2>/dev/null && hard_links=no
21628  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
21629printf "%s\n" "$hard_links" >&6; }
21630  if test no = "$hard_links"; then
21631    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
21632printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
21633    need_locks=warn
21634  fi
21635else
21636  need_locks=no
21637fi
21638
21639
21640
21641
21642
21643
21644  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
21645printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
21646
21647  runpath_var=
21648  allow_undefined_flag=
21649  always_export_symbols=no
21650  archive_cmds=
21651  archive_expsym_cmds=
21652  compiler_needs_object=no
21653  enable_shared_with_static_runtimes=no
21654  export_dynamic_flag_spec=
21655  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
21656  hardcode_automatic=no
21657  hardcode_direct=no
21658  hardcode_direct_absolute=no
21659  hardcode_libdir_flag_spec=
21660  hardcode_libdir_separator=
21661  hardcode_minus_L=no
21662  hardcode_shlibpath_var=unsupported
21663  inherit_rpath=no
21664  link_all_deplibs=unknown
21665  module_cmds=
21666  module_expsym_cmds=
21667  old_archive_from_new_cmds=
21668  old_archive_from_expsyms_cmds=
21669  thread_safe_flag_spec=
21670  whole_archive_flag_spec=
21671  # include_expsyms should be a list of space-separated symbols to be *always*
21672  # included in the symbol list
21673  include_expsyms=
21674  # exclude_expsyms can be an extended regexp of symbols to exclude
21675  # it will be wrapped by ' (' and ')$', so one must not match beginning or
21676  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
21677  # as well as any symbol that contains 'd'.
21678  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
21679  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
21680  # platforms (ab)use it in PIC code, but their linkers get confused if
21681  # the symbol is explicitly referenced.  Since portable code cannot
21682  # rely on this symbol name, it's probably fine to never include it in
21683  # preloaded symbol tables.
21684  # Exclude shared library initialization/finalization symbols.
21685  extract_expsyms_cmds=
21686
21687  case $host_os in
21688  cygwin* | mingw* | pw32* | cegcc*)
21689    # FIXME: the MSVC++ port hasn't been tested in a loooong time
21690    # When not using gcc, we currently assume that we are using
21691    # Microsoft Visual C++.
21692    if test yes != "$GCC"; then
21693      with_gnu_ld=no
21694    fi
21695    ;;
21696  interix*)
21697    # we just hope/assume this is gcc and not c89 (= MSVC++)
21698    with_gnu_ld=yes
21699    ;;
21700  openbsd* | bitrig*)
21701    with_gnu_ld=no
21702    ;;
21703  esac
21704
21705  ld_shlibs=yes
21706
21707  # On some targets, GNU ld is compatible enough with the native linker
21708  # that we're better off using the native interface for both.
21709  lt_use_gnu_ld_interface=no
21710  if test yes = "$with_gnu_ld"; then
21711    case $host_os in
21712      aix*)
21713	# The AIX port of GNU ld has always aspired to compatibility
21714	# with the native linker.  However, as the warning in the GNU ld
21715	# block says, versions before 2.19.5* couldn't really create working
21716	# shared libraries, regardless of the interface used.
21717	case `$LD -v 2>&1` in
21718	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
21719	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
21720	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
21721	  *)
21722	    lt_use_gnu_ld_interface=yes
21723	    ;;
21724	esac
21725	;;
21726      *)
21727	lt_use_gnu_ld_interface=yes
21728	;;
21729    esac
21730  fi
21731
21732  if test yes = "$lt_use_gnu_ld_interface"; then
21733    # If archive_cmds runs LD, not CC, wlarc should be empty
21734    wlarc='$wl'
21735
21736    # Set some defaults for GNU ld with shared library support. These
21737    # are reset later if shared libraries are not supported. Putting them
21738    # here allows them to be overridden if necessary.
21739    runpath_var=LD_RUN_PATH
21740    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
21741    export_dynamic_flag_spec='$wl--export-dynamic'
21742    # ancient GNU ld didn't support --whole-archive et. al.
21743    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
21744      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
21745    else
21746      whole_archive_flag_spec=
21747    fi
21748    supports_anon_versioning=no
21749    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
21750      *GNU\ gold*) supports_anon_versioning=yes ;;
21751      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
21752      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
21753      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
21754      *\ 2.11.*) ;; # other 2.11 versions
21755      *) supports_anon_versioning=yes ;;
21756    esac
21757
21758    # See if GNU ld supports shared libraries.
21759    case $host_os in
21760    aix[3-9]*)
21761      # On AIX/PPC, the GNU linker is very broken
21762      if test ia64 != "$host_cpu"; then
21763	ld_shlibs=no
21764	cat <<_LT_EOF 1>&2
21765
21766*** Warning: the GNU linker, at least up to release 2.19, is reported
21767*** to be unable to reliably create shared libraries on AIX.
21768*** Therefore, libtool is disabling shared libraries support.  If you
21769*** really care for shared libraries, you may want to install binutils
21770*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
21771*** You will then need to restart the configuration process.
21772
21773_LT_EOF
21774      fi
21775      ;;
21776
21777    amigaos*)
21778      case $host_cpu in
21779      powerpc)
21780            # see comment about AmigaOS4 .so support
21781            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
21782            archive_expsym_cmds=''
21783        ;;
21784      m68k)
21785            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)'
21786            hardcode_libdir_flag_spec='-L$libdir'
21787            hardcode_minus_L=yes
21788        ;;
21789      esac
21790      ;;
21791
21792    beos*)
21793      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
21794	allow_undefined_flag=unsupported
21795	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
21796	# support --undefined.  This deserves some investigation.  FIXME
21797	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
21798      else
21799	ld_shlibs=no
21800      fi
21801      ;;
21802
21803    cygwin* | mingw* | pw32* | cegcc*)
21804      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
21805      # as there is no search path for DLLs.
21806      hardcode_libdir_flag_spec='-L$libdir'
21807      export_dynamic_flag_spec='$wl--export-all-symbols'
21808      allow_undefined_flag=unsupported
21809      always_export_symbols=no
21810      enable_shared_with_static_runtimes=yes
21811      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'
21812      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
21813
21814      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
21815        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
21816	# If the export-symbols file already is a .def file, use it as
21817	# is; otherwise, prepend EXPORTS...
21818	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
21819          cp $export_symbols $output_objdir/$soname.def;
21820        else
21821          echo EXPORTS > $output_objdir/$soname.def;
21822          cat $export_symbols >> $output_objdir/$soname.def;
21823        fi~
21824        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
21825      else
21826	ld_shlibs=no
21827      fi
21828      ;;
21829
21830    haiku*)
21831      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
21832      link_all_deplibs=yes
21833      ;;
21834
21835    os2*)
21836      hardcode_libdir_flag_spec='-L$libdir'
21837      hardcode_minus_L=yes
21838      allow_undefined_flag=unsupported
21839      shrext_cmds=.dll
21840      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
21841	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
21842	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
21843	$ECHO EXPORTS >> $output_objdir/$libname.def~
21844	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
21845	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
21846	emximp -o $lib $output_objdir/$libname.def'
21847      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
21848	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
21849	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
21850	$ECHO EXPORTS >> $output_objdir/$libname.def~
21851	prefix_cmds="$SED"~
21852	if test EXPORTS = "`$SED 1q $export_symbols`"; then
21853	  prefix_cmds="$prefix_cmds -e 1d";
21854	fi~
21855	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
21856	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
21857	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
21858	emximp -o $lib $output_objdir/$libname.def'
21859      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
21860      enable_shared_with_static_runtimes=yes
21861      ;;
21862
21863    interix[3-9]*)
21864      hardcode_direct=no
21865      hardcode_shlibpath_var=no
21866      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
21867      export_dynamic_flag_spec='$wl-E'
21868      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
21869      # Instead, shared libraries are loaded at an image base (0x10000000 by
21870      # default) and relocated if they conflict, which is a slow very memory
21871      # consuming and fragmenting process.  To avoid this, we pick a random,
21872      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
21873      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
21874      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
21875      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'
21876      ;;
21877
21878    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
21879      tmp_diet=no
21880      if test linux-dietlibc = "$host_os"; then
21881	case $cc_basename in
21882	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
21883	esac
21884      fi
21885      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
21886	 && test no = "$tmp_diet"
21887      then
21888	tmp_addflag=' $pic_flag'
21889	tmp_sharedflag='-shared'
21890	case $cc_basename,$host_cpu in
21891        pgcc*)				# Portland Group C compiler
21892	  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'
21893	  tmp_addflag=' $pic_flag'
21894	  ;;
21895	pgf77* | pgf90* | pgf95* | pgfortran*)
21896					# Portland Group f77 and f90 compilers
21897	  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'
21898	  tmp_addflag=' $pic_flag -Mnomain' ;;
21899	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
21900	  tmp_addflag=' -i_dynamic' ;;
21901	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
21902	  tmp_addflag=' -i_dynamic -nofor_main' ;;
21903	ifc* | ifort*)			# Intel Fortran compiler
21904	  tmp_addflag=' -nofor_main' ;;
21905	lf95*)				# Lahey Fortran 8.1
21906	  whole_archive_flag_spec=
21907	  tmp_sharedflag='--shared' ;;
21908        nagfor*)                        # NAGFOR 5.3
21909          tmp_sharedflag='-Wl,-shared' ;;
21910	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
21911	  tmp_sharedflag='-qmkshrobj'
21912	  tmp_addflag= ;;
21913	nvcc*)	# Cuda Compiler Driver 2.2
21914	  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'
21915	  compiler_needs_object=yes
21916	  ;;
21917	esac
21918	case `$CC -V 2>&1 | sed 5q` in
21919	*Sun\ C*)			# Sun C 5.9
21920	  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'
21921	  compiler_needs_object=yes
21922	  tmp_sharedflag='-G' ;;
21923	*Sun\ F*)			# Sun Fortran 8.3
21924	  tmp_sharedflag='-G' ;;
21925	esac
21926	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
21927
21928        if test yes = "$supports_anon_versioning"; then
21929          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
21930            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
21931            echo "local: *; };" >> $output_objdir/$libname.ver~
21932            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
21933        fi
21934
21935	case $cc_basename in
21936	tcc*)
21937	  export_dynamic_flag_spec='-rdynamic'
21938	  ;;
21939	xlf* | bgf* | bgxlf* | mpixlf*)
21940	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
21941	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
21942	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
21943	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
21944	  if test yes = "$supports_anon_versioning"; then
21945	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
21946              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
21947              echo "local: *; };" >> $output_objdir/$libname.ver~
21948              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
21949	  fi
21950	  ;;
21951	esac
21952      else
21953        ld_shlibs=no
21954      fi
21955      ;;
21956
21957    netbsd*)
21958      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
21959	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
21960	wlarc=
21961      else
21962	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
21963	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
21964      fi
21965      ;;
21966
21967    solaris*)
21968      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
21969	ld_shlibs=no
21970	cat <<_LT_EOF 1>&2
21971
21972*** Warning: The releases 2.8.* of the GNU linker cannot reliably
21973*** create shared libraries on Solaris systems.  Therefore, libtool
21974*** is disabling shared libraries support.  We urge you to upgrade GNU
21975*** binutils to release 2.9.1 or newer.  Another option is to modify
21976*** your PATH or compiler configuration so that the native linker is
21977*** used, and then restart.
21978
21979_LT_EOF
21980      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
21981	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
21982	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
21983      else
21984	ld_shlibs=no
21985      fi
21986      ;;
21987
21988    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
21989      case `$LD -v 2>&1` in
21990        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
21991	ld_shlibs=no
21992	cat <<_LT_EOF 1>&2
21993
21994*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
21995*** reliably create shared libraries on SCO systems.  Therefore, libtool
21996*** is disabling shared libraries support.  We urge you to upgrade GNU
21997*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
21998*** your PATH or compiler configuration so that the native linker is
21999*** used, and then restart.
22000
22001_LT_EOF
22002	;;
22003	*)
22004	  # For security reasons, it is highly recommended that you always
22005	  # use absolute paths for naming shared libraries, and exclude the
22006	  # DT_RUNPATH tag from executables and libraries.  But doing so
22007	  # requires that you compile everything twice, which is a pain.
22008	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
22009	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
22010	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
22011	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
22012	  else
22013	    ld_shlibs=no
22014	  fi
22015	;;
22016      esac
22017      ;;
22018
22019    sunos4*)
22020      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
22021      wlarc=
22022      hardcode_direct=yes
22023      hardcode_shlibpath_var=no
22024      ;;
22025
22026    *)
22027      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
22028	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
22029	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
22030      else
22031	ld_shlibs=no
22032      fi
22033      ;;
22034    esac
22035
22036    if test no = "$ld_shlibs"; then
22037      runpath_var=
22038      hardcode_libdir_flag_spec=
22039      export_dynamic_flag_spec=
22040      whole_archive_flag_spec=
22041    fi
22042  else
22043    # PORTME fill in a description of your system's linker (not GNU ld)
22044    case $host_os in
22045    aix3*)
22046      allow_undefined_flag=unsupported
22047      always_export_symbols=yes
22048      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'
22049      # Note: this linker hardcodes the directories in LIBPATH if there
22050      # are no directories specified by -L.
22051      hardcode_minus_L=yes
22052      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
22053	# Neither direct hardcoding nor static linking is supported with a
22054	# broken collect2.
22055	hardcode_direct=unsupported
22056      fi
22057      ;;
22058
22059    aix[4-9]*)
22060      if test ia64 = "$host_cpu"; then
22061	# On IA64, the linker does run time linking by default, so we don't
22062	# have to do anything special.
22063	aix_use_runtimelinking=no
22064	exp_sym_flag='-Bexport'
22065	no_entry_flag=
22066      else
22067	# If we're using GNU nm, then we don't want the "-C" option.
22068	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
22069	# Without the "-l" option, or with the "-B" option, AIX nm treats
22070	# weak defined symbols like other global defined symbols, whereas
22071	# GNU nm marks them as "W".
22072	# While the 'weak' keyword is ignored in the Export File, we need
22073	# it in the Import File for the 'aix-soname' feature, so we have
22074	# to replace the "-B" option with "-P" for AIX nm.
22075	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
22076	  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'
22077	else
22078	  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'
22079	fi
22080	aix_use_runtimelinking=no
22081
22082	# Test if we are trying to use run time linking or normal
22083	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
22084	# have runtime linking enabled, and use it for executables.
22085	# For shared libraries, we enable/disable runtime linking
22086	# depending on the kind of the shared library created -
22087	# when "with_aix_soname,aix_use_runtimelinking" is:
22088	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
22089	# "aix,yes"  lib.so          shared, rtl:yes, for executables
22090	#            lib.a           static archive
22091	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
22092	#            lib.a(lib.so.V) shared, rtl:no,  for executables
22093	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
22094	#            lib.a(lib.so.V) shared, rtl:no
22095	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
22096	#            lib.a           static archive
22097	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
22098	  for ld_flag in $LDFLAGS; do
22099	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
22100	    aix_use_runtimelinking=yes
22101	    break
22102	  fi
22103	  done
22104	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
22105	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
22106	    # so we don't have lib.a shared libs to link our executables.
22107	    # We have to force runtime linking in this case.
22108	    aix_use_runtimelinking=yes
22109	    LDFLAGS="$LDFLAGS -Wl,-brtl"
22110	  fi
22111	  ;;
22112	esac
22113
22114	exp_sym_flag='-bexport'
22115	no_entry_flag='-bnoentry'
22116      fi
22117
22118      # When large executables or shared objects are built, AIX ld can
22119      # have problems creating the table of contents.  If linking a library
22120      # or program results in "error TOC overflow" add -mminimal-toc to
22121      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
22122      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
22123
22124      archive_cmds=''
22125      hardcode_direct=yes
22126      hardcode_direct_absolute=yes
22127      hardcode_libdir_separator=':'
22128      link_all_deplibs=yes
22129      file_list_spec='$wl-f,'
22130      case $with_aix_soname,$aix_use_runtimelinking in
22131      aix,*) ;; # traditional, no import file
22132      svr4,* | *,yes) # use import file
22133	# The Import File defines what to hardcode.
22134	hardcode_direct=no
22135	hardcode_direct_absolute=no
22136	;;
22137      esac
22138
22139      if test yes = "$GCC"; then
22140	case $host_os in aix4.[012]|aix4.[012].*)
22141	# We only want to do this on AIX 4.2 and lower, the check
22142	# below for broken collect2 doesn't work under 4.3+
22143	  collect2name=`$CC -print-prog-name=collect2`
22144	  if test -f "$collect2name" &&
22145	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
22146	  then
22147	  # We have reworked collect2
22148	  :
22149	  else
22150	  # We have old collect2
22151	  hardcode_direct=unsupported
22152	  # It fails to find uninstalled libraries when the uninstalled
22153	  # path is not listed in the libpath.  Setting hardcode_minus_L
22154	  # to unsupported forces relinking
22155	  hardcode_minus_L=yes
22156	  hardcode_libdir_flag_spec='-L$libdir'
22157	  hardcode_libdir_separator=
22158	  fi
22159	  ;;
22160	esac
22161	shared_flag='-shared'
22162	if test yes = "$aix_use_runtimelinking"; then
22163	  shared_flag="$shared_flag "'$wl-G'
22164	fi
22165	# Need to ensure runtime linking is disabled for the traditional
22166	# shared library, or the linker may eventually find shared libraries
22167	# /with/ Import File - we do not want to mix them.
22168	shared_flag_aix='-shared'
22169	shared_flag_svr4='-shared $wl-G'
22170      else
22171	# not using gcc
22172	if test ia64 = "$host_cpu"; then
22173	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
22174	# chokes on -Wl,-G. The following line is correct:
22175	  shared_flag='-G'
22176	else
22177	  if test yes = "$aix_use_runtimelinking"; then
22178	    shared_flag='$wl-G'
22179	  else
22180	    shared_flag='$wl-bM:SRE'
22181	  fi
22182	  shared_flag_aix='$wl-bM:SRE'
22183	  shared_flag_svr4='$wl-G'
22184	fi
22185      fi
22186
22187      export_dynamic_flag_spec='$wl-bexpall'
22188      # It seems that -bexpall does not export symbols beginning with
22189      # underscore (_), so it is better to generate a list of symbols to export.
22190      always_export_symbols=yes
22191      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
22192	# Warning - without using the other runtime loading flags (-brtl),
22193	# -berok will link without error, but may produce a broken library.
22194	allow_undefined_flag='-berok'
22195        # Determine the default libpath from the value encoded in an
22196        # empty executable.
22197        if test set = "${lt_cv_aix_libpath+set}"; then
22198  aix_libpath=$lt_cv_aix_libpath
22199else
22200  if test ${lt_cv_aix_libpath_+y}
22201then :
22202  printf %s "(cached) " >&6
22203else $as_nop
22204  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22205/* end confdefs.h.  */
22206
22207int
22208main (void)
22209{
22210
22211  ;
22212  return 0;
22213}
22214_ACEOF
22215if ac_fn_c_try_link "$LINENO"
22216then :
22217
22218  lt_aix_libpath_sed='
22219      /Import File Strings/,/^$/ {
22220	  /^0/ {
22221	      s/^0  *\([^ ]*\) *$/\1/
22222	      p
22223	  }
22224      }'
22225  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
22226  # Check for a 64-bit object if we didn't find anything.
22227  if test -z "$lt_cv_aix_libpath_"; then
22228    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
22229  fi
22230fi
22231rm -f core conftest.err conftest.$ac_objext conftest.beam \
22232    conftest$ac_exeext conftest.$ac_ext
22233  if test -z "$lt_cv_aix_libpath_"; then
22234    lt_cv_aix_libpath_=/usr/lib:/lib
22235  fi
22236
22237fi
22238
22239  aix_libpath=$lt_cv_aix_libpath_
22240fi
22241
22242        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
22243        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
22244      else
22245	if test ia64 = "$host_cpu"; then
22246	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
22247	  allow_undefined_flag="-z nodefs"
22248	  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"
22249	else
22250	 # Determine the default libpath from the value encoded in an
22251	 # empty executable.
22252	 if test set = "${lt_cv_aix_libpath+set}"; then
22253  aix_libpath=$lt_cv_aix_libpath
22254else
22255  if test ${lt_cv_aix_libpath_+y}
22256then :
22257  printf %s "(cached) " >&6
22258else $as_nop
22259  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22260/* end confdefs.h.  */
22261
22262int
22263main (void)
22264{
22265
22266  ;
22267  return 0;
22268}
22269_ACEOF
22270if ac_fn_c_try_link "$LINENO"
22271then :
22272
22273  lt_aix_libpath_sed='
22274      /Import File Strings/,/^$/ {
22275	  /^0/ {
22276	      s/^0  *\([^ ]*\) *$/\1/
22277	      p
22278	  }
22279      }'
22280  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
22281  # Check for a 64-bit object if we didn't find anything.
22282  if test -z "$lt_cv_aix_libpath_"; then
22283    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
22284  fi
22285fi
22286rm -f core conftest.err conftest.$ac_objext conftest.beam \
22287    conftest$ac_exeext conftest.$ac_ext
22288  if test -z "$lt_cv_aix_libpath_"; then
22289    lt_cv_aix_libpath_=/usr/lib:/lib
22290  fi
22291
22292fi
22293
22294  aix_libpath=$lt_cv_aix_libpath_
22295fi
22296
22297	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
22298	  # Warning - without using the other run time loading flags,
22299	  # -berok will link without error, but may produce a broken library.
22300	  no_undefined_flag=' $wl-bernotok'
22301	  allow_undefined_flag=' $wl-berok'
22302	  if test yes = "$with_gnu_ld"; then
22303	    # We only use this code for GNU lds that support --whole-archive.
22304	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
22305	  else
22306	    # Exported symbols can be pulled into shared objects from archives
22307	    whole_archive_flag_spec='$convenience'
22308	  fi
22309	  archive_cmds_need_lc=yes
22310	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
22311	  # -brtl affects multiple linker settings, -berok does not and is overridden later
22312	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
22313	  if test svr4 != "$with_aix_soname"; then
22314	    # This is similar to how AIX traditionally builds its shared libraries.
22315	    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'
22316	  fi
22317	  if test aix != "$with_aix_soname"; then
22318	    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'
22319	  else
22320	    # used by -dlpreopen to get the symbols
22321	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
22322	  fi
22323	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
22324	fi
22325      fi
22326      ;;
22327
22328    amigaos*)
22329      case $host_cpu in
22330      powerpc)
22331            # see comment about AmigaOS4 .so support
22332            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
22333            archive_expsym_cmds=''
22334        ;;
22335      m68k)
22336            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)'
22337            hardcode_libdir_flag_spec='-L$libdir'
22338            hardcode_minus_L=yes
22339        ;;
22340      esac
22341      ;;
22342
22343    bsdi[45]*)
22344      export_dynamic_flag_spec=-rdynamic
22345      ;;
22346
22347    cygwin* | mingw* | pw32* | cegcc*)
22348      # When not using gcc, we currently assume that we are using
22349      # Microsoft Visual C++.
22350      # hardcode_libdir_flag_spec is actually meaningless, as there is
22351      # no search path for DLLs.
22352      case $cc_basename in
22353      cl*)
22354	# Native MSVC
22355	hardcode_libdir_flag_spec=' '
22356	allow_undefined_flag=unsupported
22357	always_export_symbols=yes
22358	file_list_spec='@'
22359	# Tell ltmain to make .lib files, not .a files.
22360	libext=lib
22361	# Tell ltmain to make .dll files, not .so files.
22362	shrext_cmds=.dll
22363	# FIXME: Setting linknames here is a bad hack.
22364	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
22365	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
22366            cp "$export_symbols" "$output_objdir/$soname.def";
22367            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
22368          else
22369            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
22370          fi~
22371          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
22372          linknames='
22373	# The linker will not automatically build a static lib if we build a DLL.
22374	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
22375	enable_shared_with_static_runtimes=yes
22376	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
22377	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
22378	# Don't use ranlib
22379	old_postinstall_cmds='chmod 644 $oldlib'
22380	postlink_cmds='lt_outputfile="@OUTPUT@"~
22381          lt_tool_outputfile="@TOOL_OUTPUT@"~
22382          case $lt_outputfile in
22383            *.exe|*.EXE) ;;
22384            *)
22385              lt_outputfile=$lt_outputfile.exe
22386              lt_tool_outputfile=$lt_tool_outputfile.exe
22387              ;;
22388          esac~
22389          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
22390            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
22391            $RM "$lt_outputfile.manifest";
22392          fi'
22393	;;
22394      *)
22395	# Assume MSVC wrapper
22396	hardcode_libdir_flag_spec=' '
22397	allow_undefined_flag=unsupported
22398	# Tell ltmain to make .lib files, not .a files.
22399	libext=lib
22400	# Tell ltmain to make .dll files, not .so files.
22401	shrext_cmds=.dll
22402	# FIXME: Setting linknames here is a bad hack.
22403	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
22404	# The linker will automatically build a .lib file if we build a DLL.
22405	old_archive_from_new_cmds='true'
22406	# FIXME: Should let the user specify the lib program.
22407	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
22408	enable_shared_with_static_runtimes=yes
22409	;;
22410      esac
22411      ;;
22412
22413    darwin* | rhapsody*)
22414
22415
22416  archive_cmds_need_lc=no
22417  hardcode_direct=no
22418  hardcode_automatic=yes
22419  hardcode_shlibpath_var=unsupported
22420  if test yes = "$lt_cv_ld_force_load"; then
22421    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\"`'
22422
22423  else
22424    whole_archive_flag_spec=''
22425  fi
22426  link_all_deplibs=yes
22427  allow_undefined_flag=$_lt_dar_allow_undefined
22428  case $cc_basename in
22429     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
22430     *) _lt_dar_can_shared=$GCC ;;
22431  esac
22432  if test yes = "$_lt_dar_can_shared"; then
22433    output_verbose_link_cmd=func_echo_all
22434    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
22435    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
22436    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"
22437    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"
22438
22439  else
22440  ld_shlibs=no
22441  fi
22442
22443      ;;
22444
22445    dgux*)
22446      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
22447      hardcode_libdir_flag_spec='-L$libdir'
22448      hardcode_shlibpath_var=no
22449      ;;
22450
22451    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
22452    # support.  Future versions do this automatically, but an explicit c++rt0.o
22453    # does not break anything, and helps significantly (at the cost of a little
22454    # extra space).
22455    freebsd2.2*)
22456      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
22457      hardcode_libdir_flag_spec='-R$libdir'
22458      hardcode_direct=yes
22459      hardcode_shlibpath_var=no
22460      ;;
22461
22462    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
22463    freebsd2.*)
22464      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
22465      hardcode_direct=yes
22466      hardcode_minus_L=yes
22467      hardcode_shlibpath_var=no
22468      ;;
22469
22470    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
22471    freebsd* | dragonfly*)
22472      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
22473      hardcode_libdir_flag_spec='-R$libdir'
22474      hardcode_direct=yes
22475      hardcode_shlibpath_var=no
22476      ;;
22477
22478    hpux9*)
22479      if test yes = "$GCC"; then
22480	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'
22481      else
22482	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'
22483      fi
22484      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
22485      hardcode_libdir_separator=:
22486      hardcode_direct=yes
22487
22488      # hardcode_minus_L: Not really in the search PATH,
22489      # but as the default location of the library.
22490      hardcode_minus_L=yes
22491      export_dynamic_flag_spec='$wl-E'
22492      ;;
22493
22494    hpux10*)
22495      if test yes,no = "$GCC,$with_gnu_ld"; then
22496	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
22497      else
22498	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
22499      fi
22500      if test no = "$with_gnu_ld"; then
22501	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
22502	hardcode_libdir_separator=:
22503	hardcode_direct=yes
22504	hardcode_direct_absolute=yes
22505	export_dynamic_flag_spec='$wl-E'
22506	# hardcode_minus_L: Not really in the search PATH,
22507	# but as the default location of the library.
22508	hardcode_minus_L=yes
22509      fi
22510      ;;
22511
22512    hpux11*)
22513      if test yes,no = "$GCC,$with_gnu_ld"; then
22514	case $host_cpu in
22515	hppa*64*)
22516	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
22517	  ;;
22518	ia64*)
22519	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
22520	  ;;
22521	*)
22522	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
22523	  ;;
22524	esac
22525      else
22526	case $host_cpu in
22527	hppa*64*)
22528	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
22529	  ;;
22530	ia64*)
22531	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
22532	  ;;
22533	*)
22534
22535	  # Older versions of the 11.00 compiler do not understand -b yet
22536	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
22537	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
22538printf %s "checking if $CC understands -b... " >&6; }
22539if test ${lt_cv_prog_compiler__b+y}
22540then :
22541  printf %s "(cached) " >&6
22542else $as_nop
22543  lt_cv_prog_compiler__b=no
22544   save_LDFLAGS=$LDFLAGS
22545   LDFLAGS="$LDFLAGS -b"
22546   echo "$lt_simple_link_test_code" > conftest.$ac_ext
22547   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
22548     # The linker can only warn and ignore the option if not recognized
22549     # So say no if there are warnings
22550     if test -s conftest.err; then
22551       # Append any errors to the config.log.
22552       cat conftest.err 1>&5
22553       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
22554       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
22555       if diff conftest.exp conftest.er2 >/dev/null; then
22556         lt_cv_prog_compiler__b=yes
22557       fi
22558     else
22559       lt_cv_prog_compiler__b=yes
22560     fi
22561   fi
22562   $RM -r conftest*
22563   LDFLAGS=$save_LDFLAGS
22564
22565fi
22566{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
22567printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
22568
22569if test yes = "$lt_cv_prog_compiler__b"; then
22570    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
22571else
22572    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
22573fi
22574
22575	  ;;
22576	esac
22577      fi
22578      if test no = "$with_gnu_ld"; then
22579	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
22580	hardcode_libdir_separator=:
22581
22582	case $host_cpu in
22583	hppa*64*|ia64*)
22584	  hardcode_direct=no
22585	  hardcode_shlibpath_var=no
22586	  ;;
22587	*)
22588	  hardcode_direct=yes
22589	  hardcode_direct_absolute=yes
22590	  export_dynamic_flag_spec='$wl-E'
22591
22592	  # hardcode_minus_L: Not really in the search PATH,
22593	  # but as the default location of the library.
22594	  hardcode_minus_L=yes
22595	  ;;
22596	esac
22597      fi
22598      ;;
22599
22600    irix5* | irix6* | nonstopux*)
22601      if test yes = "$GCC"; then
22602	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'
22603	# Try to use the -exported_symbol ld option, if it does not
22604	# work, assume that -exports_file does not work either and
22605	# implicitly export all symbols.
22606	# This should be the same for all languages, so no per-tag cache variable.
22607	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
22608printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
22609if test ${lt_cv_irix_exported_symbol+y}
22610then :
22611  printf %s "(cached) " >&6
22612else $as_nop
22613  save_LDFLAGS=$LDFLAGS
22614	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
22615	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22616/* end confdefs.h.  */
22617int foo (void) { return 0; }
22618_ACEOF
22619if ac_fn_c_try_link "$LINENO"
22620then :
22621  lt_cv_irix_exported_symbol=yes
22622else $as_nop
22623  lt_cv_irix_exported_symbol=no
22624fi
22625rm -f core conftest.err conftest.$ac_objext conftest.beam \
22626    conftest$ac_exeext conftest.$ac_ext
22627           LDFLAGS=$save_LDFLAGS
22628fi
22629{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
22630printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
22631	if test yes = "$lt_cv_irix_exported_symbol"; then
22632          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'
22633	fi
22634      else
22635	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'
22636	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'
22637      fi
22638      archive_cmds_need_lc='no'
22639      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
22640      hardcode_libdir_separator=:
22641      inherit_rpath=yes
22642      link_all_deplibs=yes
22643      ;;
22644
22645    linux*)
22646      case $cc_basename in
22647      tcc*)
22648	# Fabrice Bellard et al's Tiny C Compiler
22649	ld_shlibs=yes
22650	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
22651	;;
22652      esac
22653      ;;
22654
22655    netbsd*)
22656      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
22657	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
22658      else
22659	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
22660      fi
22661      hardcode_libdir_flag_spec='-R$libdir'
22662      hardcode_direct=yes
22663      hardcode_shlibpath_var=no
22664      ;;
22665
22666    newsos6)
22667      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
22668      hardcode_direct=yes
22669      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
22670      hardcode_libdir_separator=:
22671      hardcode_shlibpath_var=no
22672      ;;
22673
22674    *nto* | *qnx*)
22675      ;;
22676
22677    openbsd* | bitrig*)
22678      if test -f /usr/libexec/ld.so; then
22679	hardcode_direct=yes
22680	hardcode_shlibpath_var=no
22681	hardcode_direct_absolute=yes
22682	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
22683	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
22684	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
22685	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
22686	  export_dynamic_flag_spec='$wl-E'
22687	else
22688	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
22689	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
22690	fi
22691      else
22692	ld_shlibs=no
22693      fi
22694      ;;
22695
22696    os2*)
22697      hardcode_libdir_flag_spec='-L$libdir'
22698      hardcode_minus_L=yes
22699      allow_undefined_flag=unsupported
22700      shrext_cmds=.dll
22701      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
22702	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
22703	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
22704	$ECHO EXPORTS >> $output_objdir/$libname.def~
22705	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
22706	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
22707	emximp -o $lib $output_objdir/$libname.def'
22708      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
22709	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
22710	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
22711	$ECHO EXPORTS >> $output_objdir/$libname.def~
22712	prefix_cmds="$SED"~
22713	if test EXPORTS = "`$SED 1q $export_symbols`"; then
22714	  prefix_cmds="$prefix_cmds -e 1d";
22715	fi~
22716	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
22717	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
22718	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
22719	emximp -o $lib $output_objdir/$libname.def'
22720      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
22721      enable_shared_with_static_runtimes=yes
22722      ;;
22723
22724    osf3*)
22725      if test yes = "$GCC"; then
22726	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
22727	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'
22728      else
22729	allow_undefined_flag=' -expect_unresolved \*'
22730	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'
22731      fi
22732      archive_cmds_need_lc='no'
22733      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
22734      hardcode_libdir_separator=:
22735      ;;
22736
22737    osf4* | osf5*)	# as osf3* with the addition of -msym flag
22738      if test yes = "$GCC"; then
22739	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
22740	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'
22741	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
22742      else
22743	allow_undefined_flag=' -expect_unresolved \*'
22744	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'
22745	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~
22746          $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'
22747
22748	# Both c and cxx compiler support -rpath directly
22749	hardcode_libdir_flag_spec='-rpath $libdir'
22750      fi
22751      archive_cmds_need_lc='no'
22752      hardcode_libdir_separator=:
22753      ;;
22754
22755    solaris*)
22756      no_undefined_flag=' -z defs'
22757      if test yes = "$GCC"; then
22758	wlarc='$wl'
22759	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
22760	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
22761          $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'
22762      else
22763	case `$CC -V 2>&1` in
22764	*"Compilers 5.0"*)
22765	  wlarc=''
22766	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
22767	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
22768            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
22769	  ;;
22770	*)
22771	  wlarc='$wl'
22772	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
22773	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
22774            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
22775	  ;;
22776	esac
22777      fi
22778      hardcode_libdir_flag_spec='-R$libdir'
22779      hardcode_shlibpath_var=no
22780      case $host_os in
22781      solaris2.[0-5] | solaris2.[0-5].*) ;;
22782      *)
22783	# The compiler driver will combine and reorder linker options,
22784	# but understands '-z linker_flag'.  GCC discards it without '$wl',
22785	# but is careful enough not to reorder.
22786	# Supported since Solaris 2.6 (maybe 2.5.1?)
22787	if test yes = "$GCC"; then
22788	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
22789	else
22790	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
22791	fi
22792	;;
22793      esac
22794      link_all_deplibs=yes
22795      ;;
22796
22797    sunos4*)
22798      if test sequent = "$host_vendor"; then
22799	# Use $CC to link under sequent, because it throws in some extra .o
22800	# files that make .init and .fini sections work.
22801	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
22802      else
22803	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
22804      fi
22805      hardcode_libdir_flag_spec='-L$libdir'
22806      hardcode_direct=yes
22807      hardcode_minus_L=yes
22808      hardcode_shlibpath_var=no
22809      ;;
22810
22811    sysv4)
22812      case $host_vendor in
22813	sni)
22814	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
22815	  hardcode_direct=yes # is this really true???
22816	;;
22817	siemens)
22818	  ## LD is ld it makes a PLAMLIB
22819	  ## CC just makes a GrossModule.
22820	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
22821	  reload_cmds='$CC -r -o $output$reload_objs'
22822	  hardcode_direct=no
22823        ;;
22824	motorola)
22825	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
22826	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
22827	;;
22828      esac
22829      runpath_var='LD_RUN_PATH'
22830      hardcode_shlibpath_var=no
22831      ;;
22832
22833    sysv4.3*)
22834      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
22835      hardcode_shlibpath_var=no
22836      export_dynamic_flag_spec='-Bexport'
22837      ;;
22838
22839    sysv4*MP*)
22840      if test -d /usr/nec; then
22841	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
22842	hardcode_shlibpath_var=no
22843	runpath_var=LD_RUN_PATH
22844	hardcode_runpath_var=yes
22845	ld_shlibs=yes
22846      fi
22847      ;;
22848
22849    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
22850      no_undefined_flag='$wl-z,text'
22851      archive_cmds_need_lc=no
22852      hardcode_shlibpath_var=no
22853      runpath_var='LD_RUN_PATH'
22854
22855      if test yes = "$GCC"; then
22856	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
22857	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
22858      else
22859	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
22860	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
22861      fi
22862      ;;
22863
22864    sysv5* | sco3.2v5* | sco5v6*)
22865      # Note: We CANNOT use -z defs as we might desire, because we do not
22866      # link with -lc, and that would cause any symbols used from libc to
22867      # always be unresolved, which means just about no library would
22868      # ever link correctly.  If we're not using GNU ld we use -z text
22869      # though, which does catch some bad symbols but isn't as heavy-handed
22870      # as -z defs.
22871      no_undefined_flag='$wl-z,text'
22872      allow_undefined_flag='$wl-z,nodefs'
22873      archive_cmds_need_lc=no
22874      hardcode_shlibpath_var=no
22875      hardcode_libdir_flag_spec='$wl-R,$libdir'
22876      hardcode_libdir_separator=':'
22877      link_all_deplibs=yes
22878      export_dynamic_flag_spec='$wl-Bexport'
22879      runpath_var='LD_RUN_PATH'
22880
22881      if test yes = "$GCC"; then
22882	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
22883	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
22884      else
22885	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
22886	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
22887      fi
22888      ;;
22889
22890    uts4*)
22891      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
22892      hardcode_libdir_flag_spec='-L$libdir'
22893      hardcode_shlibpath_var=no
22894      ;;
22895
22896    *)
22897      ld_shlibs=no
22898      ;;
22899    esac
22900
22901    if test sni = "$host_vendor"; then
22902      case $host in
22903      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
22904	export_dynamic_flag_spec='$wl-Blargedynsym'
22905	;;
22906      esac
22907    fi
22908  fi
22909
22910{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
22911printf "%s\n" "$ld_shlibs" >&6; }
22912test no = "$ld_shlibs" && can_build_shared=no
22913
22914with_gnu_ld=$with_gnu_ld
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930#
22931# Do we need to explicitly link libc?
22932#
22933case "x$archive_cmds_need_lc" in
22934x|xyes)
22935  # Assume -lc should be added
22936  archive_cmds_need_lc=yes
22937
22938  if test yes,yes = "$GCC,$enable_shared"; then
22939    case $archive_cmds in
22940    *'~'*)
22941      # FIXME: we may have to deal with multi-command sequences.
22942      ;;
22943    '$CC '*)
22944      # Test whether the compiler implicitly links with -lc since on some
22945      # systems, -lgcc has to come before -lc. If gcc already passes -lc
22946      # to ld, don't add -lc before -lgcc.
22947      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
22948printf %s "checking whether -lc should be explicitly linked in... " >&6; }
22949if test ${lt_cv_archive_cmds_need_lc+y}
22950then :
22951  printf %s "(cached) " >&6
22952else $as_nop
22953  $RM conftest*
22954	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
22955
22956	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
22957  (eval $ac_compile) 2>&5
22958  ac_status=$?
22959  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22960  test $ac_status = 0; } 2>conftest.err; then
22961	  soname=conftest
22962	  lib=conftest
22963	  libobjs=conftest.$ac_objext
22964	  deplibs=
22965	  wl=$lt_prog_compiler_wl
22966	  pic_flag=$lt_prog_compiler_pic
22967	  compiler_flags=-v
22968	  linker_flags=-v
22969	  verstring=
22970	  output_objdir=.
22971	  libname=conftest
22972	  lt_save_allow_undefined_flag=$allow_undefined_flag
22973	  allow_undefined_flag=
22974	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
22975  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
22976  ac_status=$?
22977  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22978  test $ac_status = 0; }
22979	  then
22980	    lt_cv_archive_cmds_need_lc=no
22981	  else
22982	    lt_cv_archive_cmds_need_lc=yes
22983	  fi
22984	  allow_undefined_flag=$lt_save_allow_undefined_flag
22985	else
22986	  cat conftest.err 1>&5
22987	fi
22988	$RM conftest*
22989
22990fi
22991{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
22992printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
22993      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
22994      ;;
22995    esac
22996  fi
22997  ;;
22998esac
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040
23041
23042
23043
23044
23045
23046
23047
23048
23049
23050
23051
23052
23053
23054
23055
23056
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102
23103
23104
23105
23106
23107
23108
23109
23110
23111
23112
23113
23114
23115
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
23152printf %s "checking dynamic linker characteristics... " >&6; }
23153
23154if test yes = "$GCC"; then
23155  case $host_os in
23156    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
23157    *) lt_awk_arg='/^libraries:/' ;;
23158  esac
23159  case $host_os in
23160    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
23161    *) lt_sed_strip_eq='s|=/|/|g' ;;
23162  esac
23163  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
23164  case $lt_search_path_spec in
23165  *\;*)
23166    # if the path contains ";" then we assume it to be the separator
23167    # otherwise default to the standard path separator (i.e. ":") - it is
23168    # assumed that no part of a normal pathname contains ";" but that should
23169    # okay in the real world where ";" in dirpaths is itself problematic.
23170    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
23171    ;;
23172  *)
23173    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
23174    ;;
23175  esac
23176  # Ok, now we have the path, separated by spaces, we can step through it
23177  # and add multilib dir if necessary...
23178  lt_tmp_lt_search_path_spec=
23179  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
23180  # ...but if some path component already ends with the multilib dir we assume
23181  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
23182  case "$lt_multi_os_dir; $lt_search_path_spec " in
23183  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
23184    lt_multi_os_dir=
23185    ;;
23186  esac
23187  for lt_sys_path in $lt_search_path_spec; do
23188    if test -d "$lt_sys_path$lt_multi_os_dir"; then
23189      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
23190    elif test -n "$lt_multi_os_dir"; then
23191      test -d "$lt_sys_path" && \
23192	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
23193    fi
23194  done
23195  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
23196BEGIN {RS = " "; FS = "/|\n";} {
23197  lt_foo = "";
23198  lt_count = 0;
23199  for (lt_i = NF; lt_i > 0; lt_i--) {
23200    if ($lt_i != "" && $lt_i != ".") {
23201      if ($lt_i == "..") {
23202        lt_count++;
23203      } else {
23204        if (lt_count == 0) {
23205          lt_foo = "/" $lt_i lt_foo;
23206        } else {
23207          lt_count--;
23208        }
23209      }
23210    }
23211  }
23212  if (lt_foo != "") { lt_freq[lt_foo]++; }
23213  if (lt_freq[lt_foo] == 1) { print lt_foo; }
23214}'`
23215  # AWK program above erroneously prepends '/' to C:/dos/paths
23216  # for these hosts.
23217  case $host_os in
23218    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
23219      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
23220  esac
23221  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
23222else
23223  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
23224fi
23225library_names_spec=
23226libname_spec='lib$name'
23227soname_spec=
23228shrext_cmds=.so
23229postinstall_cmds=
23230postuninstall_cmds=
23231finish_cmds=
23232finish_eval=
23233shlibpath_var=
23234shlibpath_overrides_runpath=unknown
23235version_type=none
23236dynamic_linker="$host_os ld.so"
23237sys_lib_dlsearch_path_spec="/lib /usr/lib"
23238need_lib_prefix=unknown
23239hardcode_into_libs=no
23240
23241# when you set need_version to no, make sure it does not cause -set_version
23242# flags to be left without arguments
23243need_version=unknown
23244
23245
23246
23247case $host_os in
23248aix3*)
23249  version_type=linux # correct to gnu/linux during the next big refactor
23250  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
23251  shlibpath_var=LIBPATH
23252
23253  # AIX 3 has no versioning support, so we append a major version to the name.
23254  soname_spec='$libname$release$shared_ext$major'
23255  ;;
23256
23257aix[4-9]*)
23258  version_type=linux # correct to gnu/linux during the next big refactor
23259  need_lib_prefix=no
23260  need_version=no
23261  hardcode_into_libs=yes
23262  if test ia64 = "$host_cpu"; then
23263    # AIX 5 supports IA64
23264    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
23265    shlibpath_var=LD_LIBRARY_PATH
23266  else
23267    # With GCC up to 2.95.x, collect2 would create an import file
23268    # for dependence libraries.  The import file would start with
23269    # the line '#! .'.  This would cause the generated library to
23270    # depend on '.', always an invalid library.  This was fixed in
23271    # development snapshots of GCC prior to 3.0.
23272    case $host_os in
23273      aix4 | aix4.[01] | aix4.[01].*)
23274      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
23275	   echo ' yes '
23276	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
23277	:
23278      else
23279	can_build_shared=no
23280      fi
23281      ;;
23282    esac
23283    # Using Import Files as archive members, it is possible to support
23284    # filename-based versioning of shared library archives on AIX. While
23285    # this would work for both with and without runtime linking, it will
23286    # prevent static linking of such archives. So we do filename-based
23287    # shared library versioning with .so extension only, which is used
23288    # when both runtime linking and shared linking is enabled.
23289    # Unfortunately, runtime linking may impact performance, so we do
23290    # not want this to be the default eventually. Also, we use the
23291    # versioned .so libs for executables only if there is the -brtl
23292    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
23293    # To allow for filename-based versioning support, we need to create
23294    # libNAME.so.V as an archive file, containing:
23295    # *) an Import File, referring to the versioned filename of the
23296    #    archive as well as the shared archive member, telling the
23297    #    bitwidth (32 or 64) of that shared object, and providing the
23298    #    list of exported symbols of that shared object, eventually
23299    #    decorated with the 'weak' keyword
23300    # *) the shared object with the F_LOADONLY flag set, to really avoid
23301    #    it being seen by the linker.
23302    # At run time we better use the real file rather than another symlink,
23303    # but for link time we create the symlink libNAME.so -> libNAME.so.V
23304
23305    case $with_aix_soname,$aix_use_runtimelinking in
23306    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
23307    # soname into executable. Probably we can add versioning support to
23308    # collect2, so additional links can be useful in future.
23309    aix,yes) # traditional libtool
23310      dynamic_linker='AIX unversionable lib.so'
23311      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
23312      # instead of lib<name>.a to let people know that these are not
23313      # typical AIX shared libraries.
23314      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23315      ;;
23316    aix,no) # traditional AIX only
23317      dynamic_linker='AIX lib.a(lib.so.V)'
23318      # We preserve .a as extension for shared libraries through AIX4.2
23319      # and later when we are not doing run time linking.
23320      library_names_spec='$libname$release.a $libname.a'
23321      soname_spec='$libname$release$shared_ext$major'
23322      ;;
23323    svr4,*) # full svr4 only
23324      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
23325      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
23326      # We do not specify a path in Import Files, so LIBPATH fires.
23327      shlibpath_overrides_runpath=yes
23328      ;;
23329    *,yes) # both, prefer svr4
23330      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
23331      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
23332      # unpreferred sharedlib libNAME.a needs extra handling
23333      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"'
23334      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"'
23335      # We do not specify a path in Import Files, so LIBPATH fires.
23336      shlibpath_overrides_runpath=yes
23337      ;;
23338    *,no) # both, prefer aix
23339      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
23340      library_names_spec='$libname$release.a $libname.a'
23341      soname_spec='$libname$release$shared_ext$major'
23342      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
23343      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)'
23344      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"'
23345      ;;
23346    esac
23347    shlibpath_var=LIBPATH
23348  fi
23349  ;;
23350
23351amigaos*)
23352  case $host_cpu in
23353  powerpc)
23354    # Since July 2007 AmigaOS4 officially supports .so libraries.
23355    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
23356    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23357    ;;
23358  m68k)
23359    library_names_spec='$libname.ixlibrary $libname.a'
23360    # Create ${libname}_ixlibrary.a entries in /sys/libs.
23361    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'
23362    ;;
23363  esac
23364  ;;
23365
23366beos*)
23367  library_names_spec='$libname$shared_ext'
23368  dynamic_linker="$host_os ld.so"
23369  shlibpath_var=LIBRARY_PATH
23370  ;;
23371
23372bsdi[45]*)
23373  version_type=linux # correct to gnu/linux during the next big refactor
23374  need_version=no
23375  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23376  soname_spec='$libname$release$shared_ext$major'
23377  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
23378  shlibpath_var=LD_LIBRARY_PATH
23379  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
23380  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
23381  # the default ld.so.conf also contains /usr/contrib/lib and
23382  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
23383  # libtool to hard-code these into programs
23384  ;;
23385
23386cygwin* | mingw* | pw32* | cegcc*)
23387  version_type=windows
23388  shrext_cmds=.dll
23389  need_version=no
23390  need_lib_prefix=no
23391
23392  case $GCC,$cc_basename in
23393  yes,*)
23394    # gcc
23395    library_names_spec='$libname.dll.a'
23396    # DLL is installed to $(libdir)/../bin by postinstall_cmds
23397    postinstall_cmds='base_file=`basename \$file`~
23398      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
23399      dldir=$destdir/`dirname \$dlpath`~
23400      test -d \$dldir || mkdir -p \$dldir~
23401      $install_prog $dir/$dlname \$dldir/$dlname~
23402      chmod a+x \$dldir/$dlname~
23403      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
23404        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
23405      fi'
23406    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
23407      dlpath=$dir/\$dldll~
23408       $RM \$dlpath'
23409    shlibpath_overrides_runpath=yes
23410
23411    case $host_os in
23412    cygwin*)
23413      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
23414      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
23415
23416      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
23417      ;;
23418    mingw* | cegcc*)
23419      # MinGW DLLs use traditional 'lib' prefix
23420      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
23421      ;;
23422    pw32*)
23423      # pw32 DLLs use 'pw' prefix rather than 'lib'
23424      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
23425      ;;
23426    esac
23427    dynamic_linker='Win32 ld.exe'
23428    ;;
23429
23430  *,cl*)
23431    # Native MSVC
23432    libname_spec='$name'
23433    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
23434    library_names_spec='$libname.dll.lib'
23435
23436    case $build_os in
23437    mingw*)
23438      sys_lib_search_path_spec=
23439      lt_save_ifs=$IFS
23440      IFS=';'
23441      for lt_path in $LIB
23442      do
23443        IFS=$lt_save_ifs
23444        # Let DOS variable expansion print the short 8.3 style file name.
23445        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
23446        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
23447      done
23448      IFS=$lt_save_ifs
23449      # Convert to MSYS style.
23450      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
23451      ;;
23452    cygwin*)
23453      # Convert to unix form, then to dos form, then back to unix form
23454      # but this time dos style (no spaces!) so that the unix form looks
23455      # like /cygdrive/c/PROGRA~1:/cygdr...
23456      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
23457      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
23458      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
23459      ;;
23460    *)
23461      sys_lib_search_path_spec=$LIB
23462      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
23463        # It is most probably a Windows format PATH.
23464        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
23465      else
23466        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
23467      fi
23468      # FIXME: find the short name or the path components, as spaces are
23469      # common. (e.g. "Program Files" -> "PROGRA~1")
23470      ;;
23471    esac
23472
23473    # DLL is installed to $(libdir)/../bin by postinstall_cmds
23474    postinstall_cmds='base_file=`basename \$file`~
23475      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
23476      dldir=$destdir/`dirname \$dlpath`~
23477      test -d \$dldir || mkdir -p \$dldir~
23478      $install_prog $dir/$dlname \$dldir/$dlname'
23479    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
23480      dlpath=$dir/\$dldll~
23481       $RM \$dlpath'
23482    shlibpath_overrides_runpath=yes
23483    dynamic_linker='Win32 link.exe'
23484    ;;
23485
23486  *)
23487    # Assume MSVC wrapper
23488    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
23489    dynamic_linker='Win32 ld.exe'
23490    ;;
23491  esac
23492  # FIXME: first we should search . and the directory the executable is in
23493  shlibpath_var=PATH
23494  ;;
23495
23496darwin* | rhapsody*)
23497  dynamic_linker="$host_os dyld"
23498  version_type=darwin
23499  need_lib_prefix=no
23500  need_version=no
23501  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
23502  soname_spec='$libname$release$major$shared_ext'
23503  shlibpath_overrides_runpath=yes
23504  shlibpath_var=DYLD_LIBRARY_PATH
23505  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
23506
23507  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
23508  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
23509  ;;
23510
23511dgux*)
23512  version_type=linux # correct to gnu/linux during the next big refactor
23513  need_lib_prefix=no
23514  need_version=no
23515  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23516  soname_spec='$libname$release$shared_ext$major'
23517  shlibpath_var=LD_LIBRARY_PATH
23518  ;;
23519
23520freebsd* | dragonfly*)
23521  # DragonFly does not have aout.  When/if they implement a new
23522  # versioning mechanism, adjust this.
23523  if test -x /usr/bin/objformat; then
23524    objformat=`/usr/bin/objformat`
23525  else
23526    case $host_os in
23527    freebsd[23].*) objformat=aout ;;
23528    *) objformat=elf ;;
23529    esac
23530  fi
23531  version_type=freebsd-$objformat
23532  case $version_type in
23533    freebsd-elf*)
23534      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23535      soname_spec='$libname$release$shared_ext$major'
23536      need_version=no
23537      need_lib_prefix=no
23538      ;;
23539    freebsd-*)
23540      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
23541      need_version=yes
23542      ;;
23543  esac
23544  shlibpath_var=LD_LIBRARY_PATH
23545  case $host_os in
23546  freebsd2.*)
23547    shlibpath_overrides_runpath=yes
23548    ;;
23549  freebsd3.[01]* | freebsdelf3.[01]*)
23550    shlibpath_overrides_runpath=yes
23551    hardcode_into_libs=yes
23552    ;;
23553  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
23554  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
23555    shlibpath_overrides_runpath=no
23556    hardcode_into_libs=yes
23557    ;;
23558  *) # from 4.6 on, and DragonFly
23559    shlibpath_overrides_runpath=yes
23560    hardcode_into_libs=yes
23561    ;;
23562  esac
23563  ;;
23564
23565haiku*)
23566  version_type=linux # correct to gnu/linux during the next big refactor
23567  need_lib_prefix=no
23568  need_version=no
23569  dynamic_linker="$host_os runtime_loader"
23570  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23571  soname_spec='$libname$release$shared_ext$major'
23572  shlibpath_var=LIBRARY_PATH
23573  shlibpath_overrides_runpath=no
23574  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
23575  hardcode_into_libs=yes
23576  ;;
23577
23578hpux9* | hpux10* | hpux11*)
23579  # Give a soname corresponding to the major version so that dld.sl refuses to
23580  # link against other versions.
23581  version_type=sunos
23582  need_lib_prefix=no
23583  need_version=no
23584  case $host_cpu in
23585  ia64*)
23586    shrext_cmds='.so'
23587    hardcode_into_libs=yes
23588    dynamic_linker="$host_os dld.so"
23589    shlibpath_var=LD_LIBRARY_PATH
23590    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
23591    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23592    soname_spec='$libname$release$shared_ext$major'
23593    if test 32 = "$HPUX_IA64_MODE"; then
23594      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
23595      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
23596    else
23597      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
23598      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
23599    fi
23600    ;;
23601  hppa*64*)
23602    shrext_cmds='.sl'
23603    hardcode_into_libs=yes
23604    dynamic_linker="$host_os dld.sl"
23605    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
23606    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
23607    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23608    soname_spec='$libname$release$shared_ext$major'
23609    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
23610    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
23611    ;;
23612  *)
23613    shrext_cmds='.sl'
23614    dynamic_linker="$host_os dld.sl"
23615    shlibpath_var=SHLIB_PATH
23616    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
23617    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23618    soname_spec='$libname$release$shared_ext$major'
23619    ;;
23620  esac
23621  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
23622  postinstall_cmds='chmod 555 $lib'
23623  # or fails outright, so override atomically:
23624  install_override_mode=555
23625  ;;
23626
23627interix[3-9]*)
23628  version_type=linux # correct to gnu/linux during the next big refactor
23629  need_lib_prefix=no
23630  need_version=no
23631  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23632  soname_spec='$libname$release$shared_ext$major'
23633  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
23634  shlibpath_var=LD_LIBRARY_PATH
23635  shlibpath_overrides_runpath=no
23636  hardcode_into_libs=yes
23637  ;;
23638
23639irix5* | irix6* | nonstopux*)
23640  case $host_os in
23641    nonstopux*) version_type=nonstopux ;;
23642    *)
23643	if test yes = "$lt_cv_prog_gnu_ld"; then
23644		version_type=linux # correct to gnu/linux during the next big refactor
23645	else
23646		version_type=irix
23647	fi ;;
23648  esac
23649  need_lib_prefix=no
23650  need_version=no
23651  soname_spec='$libname$release$shared_ext$major'
23652  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
23653  case $host_os in
23654  irix5* | nonstopux*)
23655    libsuff= shlibsuff=
23656    ;;
23657  *)
23658    case $LD in # libtool.m4 will add one of these switches to LD
23659    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
23660      libsuff= shlibsuff= libmagic=32-bit;;
23661    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
23662      libsuff=32 shlibsuff=N32 libmagic=N32;;
23663    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
23664      libsuff=64 shlibsuff=64 libmagic=64-bit;;
23665    *) libsuff= shlibsuff= libmagic=never-match;;
23666    esac
23667    ;;
23668  esac
23669  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
23670  shlibpath_overrides_runpath=no
23671  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
23672  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
23673  hardcode_into_libs=yes
23674  ;;
23675
23676# No shared lib support for Linux oldld, aout, or coff.
23677linux*oldld* | linux*aout* | linux*coff*)
23678  dynamic_linker=no
23679  ;;
23680
23681linux*android*)
23682  version_type=none # Android doesn't support versioned libraries.
23683  need_lib_prefix=no
23684  need_version=no
23685  library_names_spec='$libname$release$shared_ext'
23686  soname_spec='$libname$release$shared_ext'
23687  finish_cmds=
23688  shlibpath_var=LD_LIBRARY_PATH
23689  shlibpath_overrides_runpath=yes
23690
23691  # This implies no fast_install, which is unacceptable.
23692  # Some rework will be needed to allow for fast_install
23693  # before this can be enabled.
23694  hardcode_into_libs=yes
23695
23696  dynamic_linker='Android linker'
23697  # Don't embed -rpath directories since the linker doesn't support them.
23698  hardcode_libdir_flag_spec='-L$libdir'
23699  ;;
23700
23701# This must be glibc/ELF.
23702linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
23703  version_type=linux # correct to gnu/linux during the next big refactor
23704  need_lib_prefix=no
23705  need_version=no
23706  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23707  soname_spec='$libname$release$shared_ext$major'
23708  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
23709  shlibpath_var=LD_LIBRARY_PATH
23710  shlibpath_overrides_runpath=no
23711
23712  # Some binutils ld are patched to set DT_RUNPATH
23713  if test ${lt_cv_shlibpath_overrides_runpath+y}
23714then :
23715  printf %s "(cached) " >&6
23716else $as_nop
23717  lt_cv_shlibpath_overrides_runpath=no
23718    save_LDFLAGS=$LDFLAGS
23719    save_libdir=$libdir
23720    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
23721	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
23722    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23723/* end confdefs.h.  */
23724
23725int
23726main (void)
23727{
23728
23729  ;
23730  return 0;
23731}
23732_ACEOF
23733if ac_fn_c_try_link "$LINENO"
23734then :
23735  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
23736then :
23737  lt_cv_shlibpath_overrides_runpath=yes
23738fi
23739fi
23740rm -f core conftest.err conftest.$ac_objext conftest.beam \
23741    conftest$ac_exeext conftest.$ac_ext
23742    LDFLAGS=$save_LDFLAGS
23743    libdir=$save_libdir
23744
23745fi
23746
23747  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
23748
23749  # This implies no fast_install, which is unacceptable.
23750  # Some rework will be needed to allow for fast_install
23751  # before this can be enabled.
23752  hardcode_into_libs=yes
23753
23754  # Ideally, we could use ldconfig to report *all* directores which are
23755  # searched for libraries, however this is still not possible.  Aside from not
23756  # being certain /sbin/ldconfig is available, command
23757  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
23758  # even though it is searched at run-time.  Try to do the best guess by
23759  # appending ld.so.conf contents (and includes) to the search path.
23760  if test -f /etc/ld.so.conf; then
23761    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' ' '`
23762    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
23763  fi
23764
23765  # We used to test for /lib/ld.so.1 and disable shared libraries on
23766  # powerpc, because MkLinux only supported shared libraries with the
23767  # GNU dynamic linker.  Since this was broken with cross compilers,
23768  # most powerpc-linux boxes support dynamic linking these days and
23769  # people can always --disable-shared, the test was removed, and we
23770  # assume the GNU/Linux dynamic linker is in use.
23771  dynamic_linker='GNU/Linux ld.so'
23772  ;;
23773
23774netbsd*)
23775  version_type=sunos
23776  need_lib_prefix=no
23777  need_version=no
23778  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
23779    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
23780    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
23781    dynamic_linker='NetBSD (a.out) ld.so'
23782  else
23783    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23784    soname_spec='$libname$release$shared_ext$major'
23785    dynamic_linker='NetBSD ld.elf_so'
23786  fi
23787  shlibpath_var=LD_LIBRARY_PATH
23788  shlibpath_overrides_runpath=yes
23789  hardcode_into_libs=yes
23790  ;;
23791
23792newsos6)
23793  version_type=linux # correct to gnu/linux during the next big refactor
23794  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23795  shlibpath_var=LD_LIBRARY_PATH
23796  shlibpath_overrides_runpath=yes
23797  ;;
23798
23799*nto* | *qnx*)
23800  version_type=qnx
23801  need_lib_prefix=no
23802  need_version=no
23803  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23804  soname_spec='$libname$release$shared_ext$major'
23805  shlibpath_var=LD_LIBRARY_PATH
23806  shlibpath_overrides_runpath=no
23807  hardcode_into_libs=yes
23808  dynamic_linker='ldqnx.so'
23809  ;;
23810
23811openbsd* | bitrig*)
23812  version_type=sunos
23813  sys_lib_dlsearch_path_spec=/usr/lib
23814  need_lib_prefix=no
23815  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
23816    need_version=no
23817  else
23818    need_version=yes
23819  fi
23820  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
23821  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
23822  shlibpath_var=LD_LIBRARY_PATH
23823  shlibpath_overrides_runpath=yes
23824  ;;
23825
23826os2*)
23827  libname_spec='$name'
23828  version_type=windows
23829  shrext_cmds=.dll
23830  need_version=no
23831  need_lib_prefix=no
23832  # OS/2 can only load a DLL with a base name of 8 characters or less.
23833  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
23834    v=$($ECHO $release$versuffix | tr -d .-);
23835    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
23836    $ECHO $n$v`$shared_ext'
23837  library_names_spec='${libname}_dll.$libext'
23838  dynamic_linker='OS/2 ld.exe'
23839  shlibpath_var=BEGINLIBPATH
23840  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
23841  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
23842  postinstall_cmds='base_file=`basename \$file`~
23843    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
23844    dldir=$destdir/`dirname \$dlpath`~
23845    test -d \$dldir || mkdir -p \$dldir~
23846    $install_prog $dir/$dlname \$dldir/$dlname~
23847    chmod a+x \$dldir/$dlname~
23848    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
23849      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
23850    fi'
23851  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
23852    dlpath=$dir/\$dldll~
23853    $RM \$dlpath'
23854  ;;
23855
23856osf3* | osf4* | osf5*)
23857  version_type=osf
23858  need_lib_prefix=no
23859  need_version=no
23860  soname_spec='$libname$release$shared_ext$major'
23861  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23862  shlibpath_var=LD_LIBRARY_PATH
23863  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
23864  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
23865  ;;
23866
23867rdos*)
23868  dynamic_linker=no
23869  ;;
23870
23871solaris*)
23872  version_type=linux # correct to gnu/linux during the next big refactor
23873  need_lib_prefix=no
23874  need_version=no
23875  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23876  soname_spec='$libname$release$shared_ext$major'
23877  shlibpath_var=LD_LIBRARY_PATH
23878  shlibpath_overrides_runpath=yes
23879  hardcode_into_libs=yes
23880  # ldd complains unless libraries are executable
23881  postinstall_cmds='chmod +x $lib'
23882  ;;
23883
23884sunos4*)
23885  version_type=sunos
23886  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
23887  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
23888  shlibpath_var=LD_LIBRARY_PATH
23889  shlibpath_overrides_runpath=yes
23890  if test yes = "$with_gnu_ld"; then
23891    need_lib_prefix=no
23892  fi
23893  need_version=yes
23894  ;;
23895
23896sysv4 | sysv4.3*)
23897  version_type=linux # correct to gnu/linux during the next big refactor
23898  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23899  soname_spec='$libname$release$shared_ext$major'
23900  shlibpath_var=LD_LIBRARY_PATH
23901  case $host_vendor in
23902    sni)
23903      shlibpath_overrides_runpath=no
23904      need_lib_prefix=no
23905      runpath_var=LD_RUN_PATH
23906      ;;
23907    siemens)
23908      need_lib_prefix=no
23909      ;;
23910    motorola)
23911      need_lib_prefix=no
23912      need_version=no
23913      shlibpath_overrides_runpath=no
23914      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
23915      ;;
23916  esac
23917  ;;
23918
23919sysv4*MP*)
23920  if test -d /usr/nec; then
23921    version_type=linux # correct to gnu/linux during the next big refactor
23922    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
23923    soname_spec='$libname$shared_ext.$major'
23924    shlibpath_var=LD_LIBRARY_PATH
23925  fi
23926  ;;
23927
23928sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
23929  version_type=sco
23930  need_lib_prefix=no
23931  need_version=no
23932  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
23933  soname_spec='$libname$release$shared_ext$major'
23934  shlibpath_var=LD_LIBRARY_PATH
23935  shlibpath_overrides_runpath=yes
23936  hardcode_into_libs=yes
23937  if test yes = "$with_gnu_ld"; then
23938    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
23939  else
23940    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
23941    case $host_os in
23942      sco3.2v5*)
23943        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
23944	;;
23945    esac
23946  fi
23947  sys_lib_dlsearch_path_spec='/usr/lib'
23948  ;;
23949
23950tpf*)
23951  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
23952  version_type=linux # correct to gnu/linux during the next big refactor
23953  need_lib_prefix=no
23954  need_version=no
23955  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23956  shlibpath_var=LD_LIBRARY_PATH
23957  shlibpath_overrides_runpath=no
23958  hardcode_into_libs=yes
23959  ;;
23960
23961uts4*)
23962  version_type=linux # correct to gnu/linux during the next big refactor
23963  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23964  soname_spec='$libname$release$shared_ext$major'
23965  shlibpath_var=LD_LIBRARY_PATH
23966  ;;
23967
23968*)
23969  dynamic_linker=no
23970  ;;
23971esac
23972{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
23973printf "%s\n" "$dynamic_linker" >&6; }
23974test no = "$dynamic_linker" && can_build_shared=no
23975
23976variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
23977if test yes = "$GCC"; then
23978  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
23979fi
23980
23981if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
23982  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
23983fi
23984
23985if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
23986  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
23987fi
23988
23989# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
23990configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
23991
23992# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
23993func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
23994
23995# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
23996configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
23997
23998
23999
24000
24001
24002
24003
24004
24005
24006
24007
24008
24009
24010
24011
24012
24013
24014
24015
24016
24017
24018
24019
24020
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034
24035
24036
24037
24038
24039
24040
24041
24042
24043
24044
24045
24046
24047
24048
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089
24090
24091
24092
24093
24094  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
24095printf %s "checking how to hardcode library paths into programs... " >&6; }
24096hardcode_action=
24097if test -n "$hardcode_libdir_flag_spec" ||
24098   test -n "$runpath_var" ||
24099   test yes = "$hardcode_automatic"; then
24100
24101  # We can hardcode non-existent directories.
24102  if test no != "$hardcode_direct" &&
24103     # If the only mechanism to avoid hardcoding is shlibpath_var, we
24104     # have to relink, otherwise we might link with an installed library
24105     # when we should be linking with a yet-to-be-installed one
24106     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
24107     test no != "$hardcode_minus_L"; then
24108    # Linking always hardcodes the temporary library directory.
24109    hardcode_action=relink
24110  else
24111    # We can link without hardcoding, and we can hardcode nonexisting dirs.
24112    hardcode_action=immediate
24113  fi
24114else
24115  # We cannot hardcode anything, or else we can only hardcode existing
24116  # directories.
24117  hardcode_action=unsupported
24118fi
24119{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
24120printf "%s\n" "$hardcode_action" >&6; }
24121
24122if test relink = "$hardcode_action" ||
24123   test yes = "$inherit_rpath"; then
24124  # Fast installation is not supported
24125  enable_fast_install=no
24126elif test yes = "$shlibpath_overrides_runpath" ||
24127     test no = "$enable_shared"; then
24128  # Fast installation is not necessary
24129  enable_fast_install=needless
24130fi
24131
24132
24133
24134
24135
24136
24137  if test yes != "$enable_dlopen"; then
24138  enable_dlopen=unknown
24139  enable_dlopen_self=unknown
24140  enable_dlopen_self_static=unknown
24141else
24142  lt_cv_dlopen=no
24143  lt_cv_dlopen_libs=
24144
24145  case $host_os in
24146  beos*)
24147    lt_cv_dlopen=load_add_on
24148    lt_cv_dlopen_libs=
24149    lt_cv_dlopen_self=yes
24150    ;;
24151
24152  mingw* | pw32* | cegcc*)
24153    lt_cv_dlopen=LoadLibrary
24154    lt_cv_dlopen_libs=
24155    ;;
24156
24157  cygwin*)
24158    lt_cv_dlopen=dlopen
24159    lt_cv_dlopen_libs=
24160    ;;
24161
24162  darwin*)
24163    # if libdl is installed we need to link against it
24164    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
24165printf %s "checking for dlopen in -ldl... " >&6; }
24166if test ${ac_cv_lib_dl_dlopen+y}
24167then :
24168  printf %s "(cached) " >&6
24169else $as_nop
24170  ac_check_lib_save_LIBS=$LIBS
24171LIBS="-ldl  $LIBS"
24172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24173/* end confdefs.h.  */
24174
24175/* Override any GCC internal prototype to avoid an error.
24176   Use char because int might match the return type of a GCC
24177   builtin and then its argument prototype would still apply.  */
24178char dlopen ();
24179int
24180main (void)
24181{
24182return dlopen ();
24183  ;
24184  return 0;
24185}
24186_ACEOF
24187if ac_fn_c_try_link "$LINENO"
24188then :
24189  ac_cv_lib_dl_dlopen=yes
24190else $as_nop
24191  ac_cv_lib_dl_dlopen=no
24192fi
24193rm -f core conftest.err conftest.$ac_objext conftest.beam \
24194    conftest$ac_exeext conftest.$ac_ext
24195LIBS=$ac_check_lib_save_LIBS
24196fi
24197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
24198printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
24199if test "x$ac_cv_lib_dl_dlopen" = xyes
24200then :
24201  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
24202else $as_nop
24203
24204    lt_cv_dlopen=dyld
24205    lt_cv_dlopen_libs=
24206    lt_cv_dlopen_self=yes
24207
24208fi
24209
24210    ;;
24211
24212  tpf*)
24213    # Don't try to run any link tests for TPF.  We know it's impossible
24214    # because TPF is a cross-compiler, and we know how we open DSOs.
24215    lt_cv_dlopen=dlopen
24216    lt_cv_dlopen_libs=
24217    lt_cv_dlopen_self=no
24218    ;;
24219
24220  *)
24221    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
24222if test "x$ac_cv_func_shl_load" = xyes
24223then :
24224  lt_cv_dlopen=shl_load
24225else $as_nop
24226  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
24227printf %s "checking for shl_load in -ldld... " >&6; }
24228if test ${ac_cv_lib_dld_shl_load+y}
24229then :
24230  printf %s "(cached) " >&6
24231else $as_nop
24232  ac_check_lib_save_LIBS=$LIBS
24233LIBS="-ldld  $LIBS"
24234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24235/* end confdefs.h.  */
24236
24237/* Override any GCC internal prototype to avoid an error.
24238   Use char because int might match the return type of a GCC
24239   builtin and then its argument prototype would still apply.  */
24240char shl_load ();
24241int
24242main (void)
24243{
24244return shl_load ();
24245  ;
24246  return 0;
24247}
24248_ACEOF
24249if ac_fn_c_try_link "$LINENO"
24250then :
24251  ac_cv_lib_dld_shl_load=yes
24252else $as_nop
24253  ac_cv_lib_dld_shl_load=no
24254fi
24255rm -f core conftest.err conftest.$ac_objext conftest.beam \
24256    conftest$ac_exeext conftest.$ac_ext
24257LIBS=$ac_check_lib_save_LIBS
24258fi
24259{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
24260printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
24261if test "x$ac_cv_lib_dld_shl_load" = xyes
24262then :
24263  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
24264else $as_nop
24265  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
24266if test "x$ac_cv_func_dlopen" = xyes
24267then :
24268  lt_cv_dlopen=dlopen
24269else $as_nop
24270  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
24271printf %s "checking for dlopen in -ldl... " >&6; }
24272if test ${ac_cv_lib_dl_dlopen+y}
24273then :
24274  printf %s "(cached) " >&6
24275else $as_nop
24276  ac_check_lib_save_LIBS=$LIBS
24277LIBS="-ldl  $LIBS"
24278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24279/* end confdefs.h.  */
24280
24281/* Override any GCC internal prototype to avoid an error.
24282   Use char because int might match the return type of a GCC
24283   builtin and then its argument prototype would still apply.  */
24284char dlopen ();
24285int
24286main (void)
24287{
24288return dlopen ();
24289  ;
24290  return 0;
24291}
24292_ACEOF
24293if ac_fn_c_try_link "$LINENO"
24294then :
24295  ac_cv_lib_dl_dlopen=yes
24296else $as_nop
24297  ac_cv_lib_dl_dlopen=no
24298fi
24299rm -f core conftest.err conftest.$ac_objext conftest.beam \
24300    conftest$ac_exeext conftest.$ac_ext
24301LIBS=$ac_check_lib_save_LIBS
24302fi
24303{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
24304printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
24305if test "x$ac_cv_lib_dl_dlopen" = xyes
24306then :
24307  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
24308else $as_nop
24309  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
24310printf %s "checking for dlopen in -lsvld... " >&6; }
24311if test ${ac_cv_lib_svld_dlopen+y}
24312then :
24313  printf %s "(cached) " >&6
24314else $as_nop
24315  ac_check_lib_save_LIBS=$LIBS
24316LIBS="-lsvld  $LIBS"
24317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24318/* end confdefs.h.  */
24319
24320/* Override any GCC internal prototype to avoid an error.
24321   Use char because int might match the return type of a GCC
24322   builtin and then its argument prototype would still apply.  */
24323char dlopen ();
24324int
24325main (void)
24326{
24327return dlopen ();
24328  ;
24329  return 0;
24330}
24331_ACEOF
24332if ac_fn_c_try_link "$LINENO"
24333then :
24334  ac_cv_lib_svld_dlopen=yes
24335else $as_nop
24336  ac_cv_lib_svld_dlopen=no
24337fi
24338rm -f core conftest.err conftest.$ac_objext conftest.beam \
24339    conftest$ac_exeext conftest.$ac_ext
24340LIBS=$ac_check_lib_save_LIBS
24341fi
24342{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
24343printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
24344if test "x$ac_cv_lib_svld_dlopen" = xyes
24345then :
24346  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
24347else $as_nop
24348  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
24349printf %s "checking for dld_link in -ldld... " >&6; }
24350if test ${ac_cv_lib_dld_dld_link+y}
24351then :
24352  printf %s "(cached) " >&6
24353else $as_nop
24354  ac_check_lib_save_LIBS=$LIBS
24355LIBS="-ldld  $LIBS"
24356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24357/* end confdefs.h.  */
24358
24359/* Override any GCC internal prototype to avoid an error.
24360   Use char because int might match the return type of a GCC
24361   builtin and then its argument prototype would still apply.  */
24362char dld_link ();
24363int
24364main (void)
24365{
24366return dld_link ();
24367  ;
24368  return 0;
24369}
24370_ACEOF
24371if ac_fn_c_try_link "$LINENO"
24372then :
24373  ac_cv_lib_dld_dld_link=yes
24374else $as_nop
24375  ac_cv_lib_dld_dld_link=no
24376fi
24377rm -f core conftest.err conftest.$ac_objext conftest.beam \
24378    conftest$ac_exeext conftest.$ac_ext
24379LIBS=$ac_check_lib_save_LIBS
24380fi
24381{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
24382printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
24383if test "x$ac_cv_lib_dld_dld_link" = xyes
24384then :
24385  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
24386fi
24387
24388
24389fi
24390
24391
24392fi
24393
24394
24395fi
24396
24397
24398fi
24399
24400
24401fi
24402
24403    ;;
24404  esac
24405
24406  if test no = "$lt_cv_dlopen"; then
24407    enable_dlopen=no
24408  else
24409    enable_dlopen=yes
24410  fi
24411
24412  case $lt_cv_dlopen in
24413  dlopen)
24414    save_CPPFLAGS=$CPPFLAGS
24415    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
24416
24417    save_LDFLAGS=$LDFLAGS
24418    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
24419
24420    save_LIBS=$LIBS
24421    LIBS="$lt_cv_dlopen_libs $LIBS"
24422
24423    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
24424printf %s "checking whether a program can dlopen itself... " >&6; }
24425if test ${lt_cv_dlopen_self+y}
24426then :
24427  printf %s "(cached) " >&6
24428else $as_nop
24429  	  if test yes = "$cross_compiling"; then :
24430  lt_cv_dlopen_self=cross
24431else
24432  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
24433  lt_status=$lt_dlunknown
24434  cat > conftest.$ac_ext <<_LT_EOF
24435#line $LINENO "configure"
24436#include "confdefs.h"
24437
24438#if HAVE_DLFCN_H
24439#include <dlfcn.h>
24440#endif
24441
24442#include <stdio.h>
24443
24444#ifdef RTLD_GLOBAL
24445#  define LT_DLGLOBAL		RTLD_GLOBAL
24446#else
24447#  ifdef DL_GLOBAL
24448#    define LT_DLGLOBAL		DL_GLOBAL
24449#  else
24450#    define LT_DLGLOBAL		0
24451#  endif
24452#endif
24453
24454/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
24455   find out it does not work in some platform. */
24456#ifndef LT_DLLAZY_OR_NOW
24457#  ifdef RTLD_LAZY
24458#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
24459#  else
24460#    ifdef DL_LAZY
24461#      define LT_DLLAZY_OR_NOW		DL_LAZY
24462#    else
24463#      ifdef RTLD_NOW
24464#        define LT_DLLAZY_OR_NOW	RTLD_NOW
24465#      else
24466#        ifdef DL_NOW
24467#          define LT_DLLAZY_OR_NOW	DL_NOW
24468#        else
24469#          define LT_DLLAZY_OR_NOW	0
24470#        endif
24471#      endif
24472#    endif
24473#  endif
24474#endif
24475
24476/* When -fvisibility=hidden is used, assume the code has been annotated
24477   correspondingly for the symbols needed.  */
24478#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
24479int fnord () __attribute__((visibility("default")));
24480#endif
24481
24482int fnord () { return 42; }
24483int main ()
24484{
24485  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
24486  int status = $lt_dlunknown;
24487
24488  if (self)
24489    {
24490      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
24491      else
24492        {
24493	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
24494          else puts (dlerror ());
24495	}
24496      /* dlclose (self); */
24497    }
24498  else
24499    puts (dlerror ());
24500
24501  return status;
24502}
24503_LT_EOF
24504  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
24505  (eval $ac_link) 2>&5
24506  ac_status=$?
24507  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24508  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
24509    (./conftest; exit; ) >&5 2>/dev/null
24510    lt_status=$?
24511    case x$lt_status in
24512      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
24513      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
24514      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
24515    esac
24516  else :
24517    # compilation failed
24518    lt_cv_dlopen_self=no
24519  fi
24520fi
24521rm -fr conftest*
24522
24523
24524fi
24525{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
24526printf "%s\n" "$lt_cv_dlopen_self" >&6; }
24527
24528    if test yes = "$lt_cv_dlopen_self"; then
24529      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
24530      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
24531printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
24532if test ${lt_cv_dlopen_self_static+y}
24533then :
24534  printf %s "(cached) " >&6
24535else $as_nop
24536  	  if test yes = "$cross_compiling"; then :
24537  lt_cv_dlopen_self_static=cross
24538else
24539  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
24540  lt_status=$lt_dlunknown
24541  cat > conftest.$ac_ext <<_LT_EOF
24542#line $LINENO "configure"
24543#include "confdefs.h"
24544
24545#if HAVE_DLFCN_H
24546#include <dlfcn.h>
24547#endif
24548
24549#include <stdio.h>
24550
24551#ifdef RTLD_GLOBAL
24552#  define LT_DLGLOBAL		RTLD_GLOBAL
24553#else
24554#  ifdef DL_GLOBAL
24555#    define LT_DLGLOBAL		DL_GLOBAL
24556#  else
24557#    define LT_DLGLOBAL		0
24558#  endif
24559#endif
24560
24561/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
24562   find out it does not work in some platform. */
24563#ifndef LT_DLLAZY_OR_NOW
24564#  ifdef RTLD_LAZY
24565#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
24566#  else
24567#    ifdef DL_LAZY
24568#      define LT_DLLAZY_OR_NOW		DL_LAZY
24569#    else
24570#      ifdef RTLD_NOW
24571#        define LT_DLLAZY_OR_NOW	RTLD_NOW
24572#      else
24573#        ifdef DL_NOW
24574#          define LT_DLLAZY_OR_NOW	DL_NOW
24575#        else
24576#          define LT_DLLAZY_OR_NOW	0
24577#        endif
24578#      endif
24579#    endif
24580#  endif
24581#endif
24582
24583/* When -fvisibility=hidden is used, assume the code has been annotated
24584   correspondingly for the symbols needed.  */
24585#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
24586int fnord () __attribute__((visibility("default")));
24587#endif
24588
24589int fnord () { return 42; }
24590int main ()
24591{
24592  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
24593  int status = $lt_dlunknown;
24594
24595  if (self)
24596    {
24597      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
24598      else
24599        {
24600	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
24601          else puts (dlerror ());
24602	}
24603      /* dlclose (self); */
24604    }
24605  else
24606    puts (dlerror ());
24607
24608  return status;
24609}
24610_LT_EOF
24611  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
24612  (eval $ac_link) 2>&5
24613  ac_status=$?
24614  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24615  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
24616    (./conftest; exit; ) >&5 2>/dev/null
24617    lt_status=$?
24618    case x$lt_status in
24619      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
24620      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
24621      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
24622    esac
24623  else :
24624    # compilation failed
24625    lt_cv_dlopen_self_static=no
24626  fi
24627fi
24628rm -fr conftest*
24629
24630
24631fi
24632{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
24633printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
24634    fi
24635
24636    CPPFLAGS=$save_CPPFLAGS
24637    LDFLAGS=$save_LDFLAGS
24638    LIBS=$save_LIBS
24639    ;;
24640  esac
24641
24642  case $lt_cv_dlopen_self in
24643  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
24644  *) enable_dlopen_self=unknown ;;
24645  esac
24646
24647  case $lt_cv_dlopen_self_static in
24648  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
24649  *) enable_dlopen_self_static=unknown ;;
24650  esac
24651fi
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669striplib=
24670old_striplib=
24671{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
24672printf %s "checking whether stripping libraries is possible... " >&6; }
24673if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
24674  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
24675  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
24676  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24677printf "%s\n" "yes" >&6; }
24678else
24679# FIXME - insert some real tests, host_os isn't really good enough
24680  case $host_os in
24681  darwin*)
24682    if test -n "$STRIP"; then
24683      striplib="$STRIP -x"
24684      old_striplib="$STRIP -S"
24685      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24686printf "%s\n" "yes" >&6; }
24687    else
24688      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24689printf "%s\n" "no" >&6; }
24690    fi
24691    ;;
24692  *)
24693    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
24694printf "%s\n" "no" >&6; }
24695    ;;
24696  esac
24697fi
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710  # Report what library types will actually be built
24711  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
24712printf %s "checking if libtool supports shared libraries... " >&6; }
24713  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
24714printf "%s\n" "$can_build_shared" >&6; }
24715
24716  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
24717printf %s "checking whether to build shared libraries... " >&6; }
24718  test no = "$can_build_shared" && enable_shared=no
24719
24720  # On AIX, shared libraries and static libraries use the same namespace, and
24721  # are all built from PIC.
24722  case $host_os in
24723  aix3*)
24724    test yes = "$enable_shared" && enable_static=no
24725    if test -n "$RANLIB"; then
24726      archive_cmds="$archive_cmds~\$RANLIB \$lib"
24727      postinstall_cmds='$RANLIB $lib'
24728    fi
24729    ;;
24730
24731  aix[4-9]*)
24732    if test ia64 != "$host_cpu"; then
24733      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
24734      yes,aix,yes) ;;			# shared object as lib.so file only
24735      yes,svr4,*) ;;			# shared object as lib.so archive member only
24736      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
24737      esac
24738    fi
24739    ;;
24740  esac
24741  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
24742printf "%s\n" "$enable_shared" >&6; }
24743
24744  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
24745printf %s "checking whether to build static libraries... " >&6; }
24746  # Make sure either enable_shared or enable_static is yes.
24747  test yes = "$enable_shared" || enable_static=yes
24748  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
24749printf "%s\n" "$enable_static" >&6; }
24750
24751
24752
24753
24754fi
24755ac_ext=c
24756ac_cpp='$CPP $CPPFLAGS'
24757ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24758ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24759ac_compiler_gnu=$ac_cv_c_compiler_gnu
24760
24761CC=$lt_save_CC
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777        ac_config_commands="$ac_config_commands libtool"
24778
24779
24780
24781
24782# Only expand once:
24783
24784
24785
24786
24787
24788
24789{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
24790printf %s "checking if sntp will be built... " >&6; }
24791
24792# Check whether --with-sntp was given.
24793if test ${with_sntp+y}
24794then :
24795  withval=$with_sntp;
24796else $as_nop
24797  with_sntp="${withsntp=yes}"
24798
24799fi
24800
24801case "$with_sntp" in
24802 no)
24803    SNTP=
24804    ;;
24805 *)
24806    SNTP=sntp
24807    ;;
24808esac
24809
24810 if test -n "$SNTP"; then
24811  BUILD_SNTP_TRUE=
24812  BUILD_SNTP_FALSE='#'
24813else
24814  BUILD_SNTP_TRUE='#'
24815  BUILD_SNTP_FALSE=
24816fi
24817
24818{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
24819printf "%s\n" "$with_sntp" >&6; }
24820
24821
24822
24823case "$SNTP" in
24824 '')
24825    SNTP_DB=
24826    SNTP_DL=
24827    SNTP_DS=
24828    ;;
24829esac
24830
24831###
24832
24833# NTP has (so far) been relying on leading-edge autogen.
24834# Therefore, by default:
24835# - use the version we ship with
24836# - do not install it
24837# - build a static copy (disable-shared - done earlier)
24838case "${enable_local_libopts+set}" in
24839 set) ;;
24840 *) enable_local_libopts=yes ;;
24841esac
24842case "${enable_libopts_install+set}" in
24843 set) ;;
24844 *) enable_libopts_install=no ;;
24845esac
24846enable_nls=no
24847# Autoupdate added the next two lines to ensure that your configure
24848# script's behavior did not change.  They are probably safe to remove.
24849
24850{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
24851printf %s "checking for egrep... " >&6; }
24852if test ${ac_cv_path_EGREP+y}
24853then :
24854  printf %s "(cached) " >&6
24855else $as_nop
24856  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
24857   then ac_cv_path_EGREP="$GREP -E"
24858   else
24859     if test -z "$EGREP"; then
24860  ac_path_EGREP_found=false
24861  # Loop through the user's path and test for each of PROGNAME-LIST
24862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24863for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
24864do
24865  IFS=$as_save_IFS
24866  case $as_dir in #(((
24867    '') as_dir=./ ;;
24868    */) ;;
24869    *) as_dir=$as_dir/ ;;
24870  esac
24871    for ac_prog in egrep
24872   do
24873    for ac_exec_ext in '' $ac_executable_extensions; do
24874      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
24875      as_fn_executable_p "$ac_path_EGREP" || continue
24876# Check for GNU ac_path_EGREP and select it if it is found.
24877  # Check for GNU $ac_path_EGREP
24878case `"$ac_path_EGREP" --version 2>&1` in
24879*GNU*)
24880  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
24881*)
24882  ac_count=0
24883  printf %s 0123456789 >"conftest.in"
24884  while :
24885  do
24886    cat "conftest.in" "conftest.in" >"conftest.tmp"
24887    mv "conftest.tmp" "conftest.in"
24888    cp "conftest.in" "conftest.nl"
24889    printf "%s\n" 'EGREP' >> "conftest.nl"
24890    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
24891    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
24892    as_fn_arith $ac_count + 1 && ac_count=$as_val
24893    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
24894      # Best one so far, save it but keep looking for a better one
24895      ac_cv_path_EGREP="$ac_path_EGREP"
24896      ac_path_EGREP_max=$ac_count
24897    fi
24898    # 10*(2^10) chars as input seems more than enough
24899    test $ac_count -gt 10 && break
24900  done
24901  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
24902esac
24903
24904      $ac_path_EGREP_found && break 3
24905    done
24906  done
24907  done
24908IFS=$as_save_IFS
24909  if test -z "$ac_cv_path_EGREP"; then
24910    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
24911  fi
24912else
24913  ac_cv_path_EGREP=$EGREP
24914fi
24915
24916   fi
24917fi
24918{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
24919printf "%s\n" "$ac_cv_path_EGREP" >&6; }
24920 EGREP="$ac_cv_path_EGREP"
24921
24922
24923
24924
24925
24926
24927  ac_header_dirent=no
24928for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
24929  as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
24930{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
24931printf %s "checking for $ac_hdr that defines DIR... " >&6; }
24932if eval test \${$as_ac_Header+y}
24933then :
24934  printf %s "(cached) " >&6
24935else $as_nop
24936  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24937/* end confdefs.h.  */
24938#include <sys/types.h>
24939#include <$ac_hdr>
24940
24941int
24942main (void)
24943{
24944if ((DIR *) 0)
24945return 0;
24946  ;
24947  return 0;
24948}
24949_ACEOF
24950if ac_fn_c_try_compile "$LINENO"
24951then :
24952  eval "$as_ac_Header=yes"
24953else $as_nop
24954  eval "$as_ac_Header=no"
24955fi
24956rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24957fi
24958eval ac_res=\$$as_ac_Header
24959	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24960printf "%s\n" "$ac_res" >&6; }
24961if eval test \"x\$"$as_ac_Header"\" = x"yes"
24962then :
24963  cat >>confdefs.h <<_ACEOF
24964#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
24965_ACEOF
24966
24967ac_header_dirent=$ac_hdr; break
24968fi
24969
24970done
24971# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
24972if test $ac_header_dirent = dirent.h; then
24973  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
24974printf %s "checking for library containing opendir... " >&6; }
24975if test ${ac_cv_search_opendir+y}
24976then :
24977  printf %s "(cached) " >&6
24978else $as_nop
24979  ac_func_search_save_LIBS=$LIBS
24980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24981/* end confdefs.h.  */
24982
24983/* Override any GCC internal prototype to avoid an error.
24984   Use char because int might match the return type of a GCC
24985   builtin and then its argument prototype would still apply.  */
24986char opendir ();
24987int
24988main (void)
24989{
24990return opendir ();
24991  ;
24992  return 0;
24993}
24994_ACEOF
24995for ac_lib in '' dir
24996do
24997  if test -z "$ac_lib"; then
24998    ac_res="none required"
24999  else
25000    ac_res=-l$ac_lib
25001    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25002  fi
25003  if ac_fn_c_try_link "$LINENO"
25004then :
25005  ac_cv_search_opendir=$ac_res
25006fi
25007rm -f core conftest.err conftest.$ac_objext conftest.beam \
25008    conftest$ac_exeext
25009  if test ${ac_cv_search_opendir+y}
25010then :
25011  break
25012fi
25013done
25014if test ${ac_cv_search_opendir+y}
25015then :
25016
25017else $as_nop
25018  ac_cv_search_opendir=no
25019fi
25020rm conftest.$ac_ext
25021LIBS=$ac_func_search_save_LIBS
25022fi
25023{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
25024printf "%s\n" "$ac_cv_search_opendir" >&6; }
25025ac_res=$ac_cv_search_opendir
25026if test "$ac_res" != no
25027then :
25028  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25029
25030fi
25031
25032else
25033  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
25034printf %s "checking for library containing opendir... " >&6; }
25035if test ${ac_cv_search_opendir+y}
25036then :
25037  printf %s "(cached) " >&6
25038else $as_nop
25039  ac_func_search_save_LIBS=$LIBS
25040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25041/* end confdefs.h.  */
25042
25043/* Override any GCC internal prototype to avoid an error.
25044   Use char because int might match the return type of a GCC
25045   builtin and then its argument prototype would still apply.  */
25046char opendir ();
25047int
25048main (void)
25049{
25050return opendir ();
25051  ;
25052  return 0;
25053}
25054_ACEOF
25055for ac_lib in '' x
25056do
25057  if test -z "$ac_lib"; then
25058    ac_res="none required"
25059  else
25060    ac_res=-l$ac_lib
25061    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25062  fi
25063  if ac_fn_c_try_link "$LINENO"
25064then :
25065  ac_cv_search_opendir=$ac_res
25066fi
25067rm -f core conftest.err conftest.$ac_objext conftest.beam \
25068    conftest$ac_exeext
25069  if test ${ac_cv_search_opendir+y}
25070then :
25071  break
25072fi
25073done
25074if test ${ac_cv_search_opendir+y}
25075then :
25076
25077else $as_nop
25078  ac_cv_search_opendir=no
25079fi
25080rm conftest.$ac_ext
25081LIBS=$ac_func_search_save_LIBS
25082fi
25083{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
25084printf "%s\n" "$ac_cv_search_opendir" >&6; }
25085ac_res=$ac_cv_search_opendir
25086if test "$ac_res" != no
25087then :
25088  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25089
25090fi
25091
25092fi
25093
25094
25095  # =================
25096  # AC_CHECK_HEADERS
25097  # =================
25098  ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
25099if test "x$ac_cv_header_sys_mman_h" = xyes
25100then :
25101  printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
25102
25103fi
25104ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
25105if test "x$ac_cv_header_sys_param_h" = xyes
25106then :
25107  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
25108
25109fi
25110ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
25111if test "x$ac_cv_header_sys_poll_h" = xyes
25112then :
25113  printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
25114
25115fi
25116ac_fn_c_check_header_compile "$LINENO" "sys/procset.h" "ac_cv_header_sys_procset_h" "$ac_includes_default"
25117if test "x$ac_cv_header_sys_procset_h" = xyes
25118then :
25119  printf "%s\n" "#define HAVE_SYS_PROCSET_H 1" >>confdefs.h
25120
25121fi
25122ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
25123if test "x$ac_cv_header_sys_select_h" = xyes
25124then :
25125  printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
25126
25127fi
25128ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
25129if test "x$ac_cv_header_sys_socket_h" = xyes
25130then :
25131  printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
25132
25133fi
25134ac_fn_c_check_header_compile "$LINENO" "sys/stropts.h" "ac_cv_header_sys_stropts_h" "$ac_includes_default"
25135if test "x$ac_cv_header_sys_stropts_h" = xyes
25136then :
25137  printf "%s\n" "#define HAVE_SYS_STROPTS_H 1" >>confdefs.h
25138
25139fi
25140ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
25141if test "x$ac_cv_header_sys_time_h" = xyes
25142then :
25143  printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
25144
25145fi
25146ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
25147if test "x$ac_cv_header_sys_un_h" = xyes
25148then :
25149  printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
25150
25151fi
25152ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
25153if test "x$ac_cv_header_sys_wait_h" = xyes
25154then :
25155  printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
25156
25157fi
25158ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
25159if test "x$ac_cv_header_dlfcn_h" = xyes
25160then :
25161  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
25162
25163fi
25164ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
25165if test "x$ac_cv_header_errno_h" = xyes
25166then :
25167  printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
25168
25169fi
25170ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
25171if test "x$ac_cv_header_fcntl_h" = xyes
25172then :
25173  printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
25174
25175fi
25176ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
25177if test "x$ac_cv_header_libgen_h" = xyes
25178then :
25179  printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
25180
25181fi
25182ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
25183if test "x$ac_cv_header_libintl_h" = xyes
25184then :
25185  printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
25186
25187fi
25188ac_fn_c_check_header_compile "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default"
25189if test "x$ac_cv_header_memory_h" = xyes
25190then :
25191  printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h
25192
25193fi
25194ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
25195if test "x$ac_cv_header_netinet_in_h" = xyes
25196then :
25197  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
25198
25199fi
25200ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
25201if test "x$ac_cv_header_setjmp_h" = xyes
25202then :
25203  printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
25204
25205fi
25206ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
25207if test "x$ac_cv_header_stdbool_h" = xyes
25208then :
25209  printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
25210
25211fi
25212ac_fn_c_check_header_compile "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
25213if test "x$ac_cv_header_sysexits_h" = xyes
25214then :
25215  printf "%s\n" "#define HAVE_SYSEXITS_H 1" >>confdefs.h
25216
25217fi
25218ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
25219if test "x$ac_cv_header_unistd_h" = xyes
25220then :
25221  printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
25222
25223fi
25224ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
25225if test "x$ac_cv_header_utime_h" = xyes
25226then :
25227  printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
25228
25229fi
25230
25231
25232         for ac_header in stdarg.h varargs.h
25233do :
25234  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
25235ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25236if eval test \"x\$"$as_ac_Header"\" = x"yes"
25237then :
25238  cat >>confdefs.h <<_ACEOF
25239#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
25240_ACEOF
25241 lo_have_arg_hdr=true;break
25242else $as_nop
25243  lo_have_arg_hdr=false
25244fi
25245
25246done
25247
25248         for ac_header in string.h strings.h
25249do :
25250  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
25251ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25252if eval test \"x\$"$as_ac_Header"\" = x"yes"
25253then :
25254  cat >>confdefs.h <<_ACEOF
25255#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
25256_ACEOF
25257 lo_have_str_hdr=true;break
25258else $as_nop
25259  lo_have_str_hdr=false
25260fi
25261
25262done
25263
25264         for ac_header in limits.h sys/limits.h values.h
25265do :
25266  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
25267ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25268if eval test \"x\$"$as_ac_Header"\" = x"yes"
25269then :
25270  cat >>confdefs.h <<_ACEOF
25271#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
25272_ACEOF
25273 lo_have_lim_hdr=true;break
25274else $as_nop
25275  lo_have_lim_hdr=false
25276fi
25277
25278done
25279
25280         for ac_header in inttypes.h stdint.h
25281do :
25282  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
25283ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25284if eval test \"x\$"$as_ac_Header"\" = x"yes"
25285then :
25286  cat >>confdefs.h <<_ACEOF
25287#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
25288_ACEOF
25289 lo_have_typ_hdr=true;break
25290else $as_nop
25291  lo_have_typ_hdr=false
25292fi
25293
25294done
25295
25296
25297  case "$host_os" in
25298    cygwin*)
25299                        STDNORETURN_H='stdnoreturn.h'
25300      ;;
25301    *)
25302      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
25303printf %s "checking for working stdnoreturn.h... " >&6; }
25304if test ${gl_cv_header_working_stdnoreturn_h+y}
25305then :
25306  printf %s "(cached) " >&6
25307else $as_nop
25308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25309/* end confdefs.h.  */
25310#include <stdlib.h>
25311                #include <stdnoreturn.h>
25312                /* Do not check for 'noreturn' after the return type.
25313                   C11 allows it, but it's rarely done that way
25314                   and circa-2012 bleeding-edge GCC rejects it when given
25315                   -Werror=old-style-declaration.  */
25316                noreturn void foo1 (void) { exit (0); }
25317                _Noreturn void foo2 (void) { exit (0); }
25318                int testit (int argc, char **argv)
25319                {
25320                  if (argc & 1)
25321                    return 0;
25322                  (argv[0][0] ? foo1 : foo2) ();
25323                }
25324
25325int
25326main (void)
25327{
25328
25329  ;
25330  return 0;
25331}
25332_ACEOF
25333if ac_fn_c_try_compile "$LINENO"
25334then :
25335  gl_cv_header_working_stdnoreturn_h=yes
25336else $as_nop
25337  gl_cv_header_working_stdnoreturn_h=no
25338fi
25339rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25340fi
25341{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
25342printf "%s\n" "$gl_cv_header_working_stdnoreturn_h" >&6; }
25343      if test $gl_cv_header_working_stdnoreturn_h = yes; then
25344        STDNORETURN_H=''
25345      else
25346        STDNORETURN_H='stdnoreturn.h'
25347      fi
25348      ;;
25349  esac
25350
25351   if test -n "$STDNORETURN_H"; then
25352  GL_GENERATE_STDNORETURN_H_TRUE=
25353  GL_GENERATE_STDNORETURN_H_FALSE='#'
25354else
25355  GL_GENERATE_STDNORETURN_H_TRUE='#'
25356  GL_GENERATE_STDNORETURN_H_FALSE=
25357fi
25358
25359
25360
25361  # ----------------------------------------------------------------------
25362  # check for various programs used during the build.
25363  # On OS/X, "wchar.h" needs "runetype.h" to work properly.
25364  # ----------------------------------------------------------------------
25365  ac_fn_c_check_header_compile "$LINENO" "runetype.h" "ac_cv_header_runetype_h" "
25366  $ac_includes_default
25367  #if HAVE_RUNETYPE_H
25368  # include <runetype.h>
25369  #endif
25370
25371"
25372if test "x$ac_cv_header_runetype_h" = xyes
25373then :
25374  printf "%s\n" "#define HAVE_RUNETYPE_H 1" >>confdefs.h
25375
25376fi
25377ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "
25378  $ac_includes_default
25379  #if HAVE_RUNETYPE_H
25380  # include <runetype.h>
25381  #endif
25382
25383"
25384if test "x$ac_cv_header_wchar_h" = xyes
25385then :
25386  printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
25387
25388fi
25389
25390
25391  # Check whether --enable-nls was given.
25392if test ${enable_nls+y}
25393then :
25394  enableval=$enable_nls;
25395fi
25396
25397  if test "x$enable_nls" != "xno" && \
25398  test "X${ac_cv_header_libintl_h}" = Xyes
25399then :
25400
25401
25402printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
25403
25404fi
25405
25406  # --------------------------------------------
25407  # Verify certain entries from AC_CHECK_HEADERS
25408  # --------------------------------------------
25409  ${lo_have_arg_hdr} || \
25410    as_fn_error $? "you must have stdarg.h or varargs.h on your system" "$LINENO" 5
25411
25412  ${lo_have_str_hdr} || \
25413    as_fn_error $? "you must have string.h or strings.h on your system" "$LINENO" 5
25414
25415  ${lo_have_lim_hdr} || \
25416    as_fn_error $? "you must have one of limits.h, sys/limits.h or values.h" "$LINENO" 5
25417
25418  ${lo_have_typ_hdr} || \
25419    as_fn_error $? "you must have inttypes.h or stdint.h on your system" "$LINENO" 5
25420
25421  for f in sys_types sys_param sys_stat string errno stdlib memory setjmp
25422  do eval as_ac_var=\${ac_cv_header_${f}_h}
25423     test "X${as_ac_var}" = Xyes || {
25424       as_fn_error $? "you must have ${f}.h on your system" "$LINENO" 5
25425     }
25426  done
25427  test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
25428    echo '#include <stdint.h>' > inttypes.h
25429
25430  # ----------------------------------------------------------------------
25431  # Checks for typedefs
25432  # ----------------------------------------------------------------------
25433  ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
25434if test "x$ac_cv_type_wchar_t" = xyes
25435then :
25436
25437printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
25438
25439
25440fi
25441
25442  ac_fn_c_check_type "$LINENO" "wint_t" "ac_cv_type_wint_t" "
25443    $ac_includes_default
25444    #if HAVE_RUNETYPE_H
25445    # include <runetype.h>
25446    #endif
25447    #if HAVE_WCHAR_H
25448    # include <wchar.h>
25449    #endif
25450
25451"
25452if test "x$ac_cv_type_wint_t" = xyes
25453then :
25454
25455printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
25456
25457
25458fi
25459
25460  ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
25461if test "x$ac_cv_type_int8_t" = xyes
25462then :
25463
25464printf "%s\n" "#define HAVE_INT8_T 1" >>confdefs.h
25465
25466
25467fi
25468ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
25469if test "x$ac_cv_type_uint8_t" = xyes
25470then :
25471
25472printf "%s\n" "#define HAVE_UINT8_T 1" >>confdefs.h
25473
25474
25475fi
25476ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
25477if test "x$ac_cv_type_int16_t" = xyes
25478then :
25479
25480printf "%s\n" "#define HAVE_INT16_T 1" >>confdefs.h
25481
25482
25483fi
25484ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
25485if test "x$ac_cv_type_uint16_t" = xyes
25486then :
25487
25488printf "%s\n" "#define HAVE_UINT16_T 1" >>confdefs.h
25489
25490
25491fi
25492ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
25493if test "x$ac_cv_type_int32_t" = xyes
25494then :
25495
25496printf "%s\n" "#define HAVE_INT32_T 1" >>confdefs.h
25497
25498
25499fi
25500ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
25501if test "x$ac_cv_type_uint32_t" = xyes
25502then :
25503
25504printf "%s\n" "#define HAVE_UINT32_T 1" >>confdefs.h
25505
25506
25507fi
25508ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
25509if test "x$ac_cv_type_intptr_t" = xyes
25510then :
25511
25512printf "%s\n" "#define HAVE_INTPTR_T 1" >>confdefs.h
25513
25514
25515fi
25516ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
25517if test "x$ac_cv_type_uintptr_t" = xyes
25518then :
25519
25520printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
25521
25522
25523fi
25524ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
25525if test "x$ac_cv_type_uint_t" = xyes
25526then :
25527
25528printf "%s\n" "#define HAVE_UINT_T 1" >>confdefs.h
25529
25530
25531fi
25532ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
25533if test "x$ac_cv_type_pid_t" = xyes
25534then :
25535
25536printf "%s\n" "#define HAVE_PID_T 1" >>confdefs.h
25537
25538
25539fi
25540ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
25541if test "x$ac_cv_type_size_t" = xyes
25542then :
25543
25544printf "%s\n" "#define HAVE_SIZE_T 1" >>confdefs.h
25545
25546
25547fi
25548ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
25549if test "x$ac_cv_type_ptrdiff_t" = xyes
25550then :
25551
25552printf "%s\n" "#define HAVE_PTRDIFF_T 1" >>confdefs.h
25553
25554
25555fi
25556
25557  # The cast to long int works around a bug in the HP C Compiler
25558# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25559# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25560# This bug is HP SR number 8606223364.
25561{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
25562printf %s "checking size of char *... " >&6; }
25563if test ${ac_cv_sizeof_char_p+y}
25564then :
25565  printf %s "(cached) " >&6
25566else $as_nop
25567  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p"        "$ac_includes_default"
25568then :
25569
25570else $as_nop
25571  if test "$ac_cv_type_char_p" = yes; then
25572     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25573printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
25574as_fn_error 77 "cannot compute sizeof (char *)
25575See \`config.log' for more details" "$LINENO" 5; }
25576   else
25577     ac_cv_sizeof_char_p=0
25578   fi
25579fi
25580
25581fi
25582{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
25583printf "%s\n" "$ac_cv_sizeof_char_p" >&6; }
25584
25585
25586
25587printf "%s\n" "#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p" >>confdefs.h
25588
25589
25590  # The cast to long int works around a bug in the HP C Compiler
25591# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25592# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25593# This bug is HP SR number 8606223364.
25594{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
25595printf %s "checking size of int... " >&6; }
25596if test ${ac_cv_sizeof_int+y}
25597then :
25598  printf %s "(cached) " >&6
25599else $as_nop
25600  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"
25601then :
25602
25603else $as_nop
25604  if test "$ac_cv_type_int" = yes; then
25605     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25606printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
25607as_fn_error 77 "cannot compute sizeof (int)
25608See \`config.log' for more details" "$LINENO" 5; }
25609   else
25610     ac_cv_sizeof_int=0
25611   fi
25612fi
25613
25614fi
25615{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
25616printf "%s\n" "$ac_cv_sizeof_int" >&6; }
25617
25618
25619
25620printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
25621
25622
25623  # The cast to long int works around a bug in the HP C Compiler
25624# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25625# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25626# This bug is HP SR number 8606223364.
25627{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
25628printf %s "checking size of long... " >&6; }
25629if test ${ac_cv_sizeof_long+y}
25630then :
25631  printf %s "(cached) " >&6
25632else $as_nop
25633  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"
25634then :
25635
25636else $as_nop
25637  if test "$ac_cv_type_long" = yes; then
25638     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25639printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
25640as_fn_error 77 "cannot compute sizeof (long)
25641See \`config.log' for more details" "$LINENO" 5; }
25642   else
25643     ac_cv_sizeof_long=0
25644   fi
25645fi
25646
25647fi
25648{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
25649printf "%s\n" "$ac_cv_sizeof_long" >&6; }
25650
25651
25652
25653printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
25654
25655
25656  # The cast to long int works around a bug in the HP C Compiler
25657# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25658# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25659# This bug is HP SR number 8606223364.
25660{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
25661printf %s "checking size of short... " >&6; }
25662if test ${ac_cv_sizeof_short+y}
25663then :
25664  printf %s "(cached) " >&6
25665else $as_nop
25666  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"
25667then :
25668
25669else $as_nop
25670  if test "$ac_cv_type_short" = yes; then
25671     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25672printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
25673as_fn_error 77 "cannot compute sizeof (short)
25674See \`config.log' for more details" "$LINENO" 5; }
25675   else
25676     ac_cv_sizeof_short=0
25677   fi
25678fi
25679
25680fi
25681{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
25682printf "%s\n" "$ac_cv_sizeof_short" >&6; }
25683
25684
25685
25686printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
25687
25688
25689
25690  # ------------
25691  # AC_CHECK_LIB
25692  # ------------
25693  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
25694printf %s "checking for pathfind in -lgen... " >&6; }
25695if test ${ac_cv_lib_gen_pathfind+y}
25696then :
25697  printf %s "(cached) " >&6
25698else $as_nop
25699  ac_check_lib_save_LIBS=$LIBS
25700LIBS="-lgen  $LIBS"
25701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25702/* end confdefs.h.  */
25703
25704/* Override any GCC internal prototype to avoid an error.
25705   Use char because int might match the return type of a GCC
25706   builtin and then its argument prototype would still apply.  */
25707char pathfind ();
25708int
25709main (void)
25710{
25711return pathfind ();
25712  ;
25713  return 0;
25714}
25715_ACEOF
25716if ac_fn_c_try_link "$LINENO"
25717then :
25718  ac_cv_lib_gen_pathfind=yes
25719else $as_nop
25720  ac_cv_lib_gen_pathfind=no
25721fi
25722rm -f core conftest.err conftest.$ac_objext conftest.beam \
25723    conftest$ac_exeext conftest.$ac_ext
25724LIBS=$ac_check_lib_save_LIBS
25725fi
25726{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
25727printf "%s\n" "$ac_cv_lib_gen_pathfind" >&6; }
25728if test "x$ac_cv_lib_gen_pathfind" = xyes
25729then :
25730  printf "%s\n" "#define HAVE_LIBGEN 1" >>confdefs.h
25731
25732  LIBS="-lgen $LIBS"
25733
25734fi
25735
25736  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
25737printf %s "checking for gettext in -lintl... " >&6; }
25738if test ${ac_cv_lib_intl_gettext+y}
25739then :
25740  printf %s "(cached) " >&6
25741else $as_nop
25742  ac_check_lib_save_LIBS=$LIBS
25743LIBS="-lintl  $LIBS"
25744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25745/* end confdefs.h.  */
25746
25747/* Override any GCC internal prototype to avoid an error.
25748   Use char because int might match the return type of a GCC
25749   builtin and then its argument prototype would still apply.  */
25750char gettext ();
25751int
25752main (void)
25753{
25754return gettext ();
25755  ;
25756  return 0;
25757}
25758_ACEOF
25759if ac_fn_c_try_link "$LINENO"
25760then :
25761  ac_cv_lib_intl_gettext=yes
25762else $as_nop
25763  ac_cv_lib_intl_gettext=no
25764fi
25765rm -f core conftest.err conftest.$ac_objext conftest.beam \
25766    conftest$ac_exeext conftest.$ac_ext
25767LIBS=$ac_check_lib_save_LIBS
25768fi
25769{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
25770printf "%s\n" "$ac_cv_lib_intl_gettext" >&6; }
25771if test "x$ac_cv_lib_intl_gettext" = xyes
25772then :
25773  printf "%s\n" "#define HAVE_LIBINTL 1" >>confdefs.h
25774
25775  LIBS="-lintl $LIBS"
25776
25777fi
25778
25779
25780if test "x$ac_cv_func_vprintf" = xno
25781then :
25782  ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
25783if test "x$ac_cv_func__doprnt" = xyes
25784then :
25785
25786printf "%s\n" "#define HAVE_DOPRNT 1" >>confdefs.h
25787
25788fi
25789
25790fi
25791
25792
25793if test "x$ac_cv_func_fork" = xyes; then
25794  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
25795printf %s "checking for working fork... " >&6; }
25796if test ${ac_cv_func_fork_works+y}
25797then :
25798  printf %s "(cached) " >&6
25799else $as_nop
25800  if test "$cross_compiling" = yes
25801then :
25802  ac_cv_func_fork_works=cross
25803else $as_nop
25804  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25805/* end confdefs.h.  */
25806$ac_includes_default
25807int
25808main (void)
25809{
25810
25811	  /* By Ruediger Kuhlmann. */
25812	  return fork () < 0;
25813
25814  ;
25815  return 0;
25816}
25817_ACEOF
25818if ac_fn_c_try_run "$LINENO"
25819then :
25820  ac_cv_func_fork_works=yes
25821else $as_nop
25822  ac_cv_func_fork_works=no
25823fi
25824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25825  conftest.$ac_objext conftest.beam conftest.$ac_ext
25826fi
25827
25828fi
25829{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
25830printf "%s\n" "$ac_cv_func_fork_works" >&6; }
25831
25832else
25833  ac_cv_func_fork_works=$ac_cv_func_fork
25834fi
25835if test "x$ac_cv_func_fork_works" = xcross; then
25836  case $host in
25837    *-*-amigaos* | *-*-msdosdjgpp*)
25838      # Override, as these systems have only a dummy fork() stub
25839      ac_cv_func_fork_works=no
25840      ;;
25841    *)
25842      ac_cv_func_fork_works=yes
25843      ;;
25844  esac
25845  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
25846printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
25847fi
25848ac_cv_func_vfork_works=$ac_cv_func_vfork
25849if test "x$ac_cv_func_vfork" = xyes; then
25850  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
25851printf %s "checking for working vfork... " >&6; }
25852if test ${ac_cv_func_vfork_works+y}
25853then :
25854  printf %s "(cached) " >&6
25855else $as_nop
25856  if test "$cross_compiling" = yes
25857then :
25858  ac_cv_func_vfork_works=cross
25859else $as_nop
25860  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25861/* end confdefs.h.  */
25862/* Thanks to Paul Eggert for this test.  */
25863$ac_includes_default
25864#include <signal.h>
25865#include <sys/wait.h>
25866#ifdef HAVE_VFORK_H
25867# include <vfork.h>
25868#endif
25869
25870static void
25871do_nothing (int sig)
25872{
25873  (void) sig;
25874}
25875
25876/* On some sparc systems, changes by the child to local and incoming
25877   argument registers are propagated back to the parent.  The compiler
25878   is told about this with #include <vfork.h>, but some compilers
25879   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
25880   static variable whose address is put into a register that is
25881   clobbered by the vfork.  */
25882static void
25883sparc_address_test (int arg)
25884{
25885  static pid_t child;
25886  if (!child) {
25887    child = vfork ();
25888    if (child < 0) {
25889      perror ("vfork");
25890      _exit(2);
25891    }
25892    if (!child) {
25893      arg = getpid();
25894      write(-1, "", 0);
25895      _exit (arg);
25896    }
25897  }
25898}
25899
25900int
25901main (void)
25902{
25903  pid_t parent = getpid ();
25904  pid_t child;
25905
25906  sparc_address_test (0);
25907
25908  /* On Solaris 2.4, changes by the child to the signal handler
25909     also munge signal handlers in the parent.  To detect this,
25910     start by putting the parent's handler in a known state.  */
25911  signal (SIGTERM, SIG_DFL);
25912
25913  child = vfork ();
25914
25915  if (child == 0) {
25916    /* Here is another test for sparc vfork register problems.  This
25917       test uses lots of local variables, at least as many local
25918       variables as main has allocated so far including compiler
25919       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
25920       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
25921       reuse the register of parent for one of the local variables,
25922       since it will think that parent can't possibly be used any more
25923       in this routine.  Assigning to the local variable will thus
25924       munge parent in the parent process.  */
25925    pid_t
25926      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
25927      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
25928    /* Convince the compiler that p..p7 are live; otherwise, it might
25929       use the same hardware register for all 8 local variables.  */
25930    if (p != p1 || p != p2 || p != p3 || p != p4
25931	|| p != p5 || p != p6 || p != p7)
25932      _exit(1);
25933
25934    /* Alter the child's signal handler.  */
25935    if (signal (SIGTERM, do_nothing) != SIG_DFL)
25936      _exit(1);
25937
25938    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
25939       from child file descriptors.  If the child closes a descriptor
25940       before it execs or exits, this munges the parent's descriptor
25941       as well.  Test for this by closing stdout in the child.  */
25942    _exit(close(fileno(stdout)) != 0);
25943  } else {
25944    int status;
25945    struct stat st;
25946
25947    while (wait(&status) != child)
25948      ;
25949    return (
25950	 /* Was there some problem with vforking?  */
25951	 child < 0
25952
25953	 /* Did the child munge the parent's signal handler?  */
25954	 || signal (SIGTERM, SIG_DFL) != SIG_DFL
25955
25956	 /* Did the child fail?  (This shouldn't happen.)  */
25957	 || status
25958
25959	 /* Did the vfork/compiler bug occur?  */
25960	 || parent != getpid()
25961
25962	 /* Did the file descriptor bug occur?  */
25963	 || fstat(fileno(stdout), &st) != 0
25964	 );
25965  }
25966}
25967_ACEOF
25968if ac_fn_c_try_run "$LINENO"
25969then :
25970  ac_cv_func_vfork_works=yes
25971else $as_nop
25972  ac_cv_func_vfork_works=no
25973fi
25974rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25975  conftest.$ac_objext conftest.beam conftest.$ac_ext
25976fi
25977
25978fi
25979{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
25980printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
25981
25982fi;
25983if test "x$ac_cv_func_fork_works" = xcross; then
25984  ac_cv_func_vfork_works=$ac_cv_func_vfork
25985  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
25986printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
25987fi
25988
25989if test "x$ac_cv_func_vfork_works" = xyes; then
25990
25991printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
25992
25993else
25994
25995printf "%s\n" "#define vfork fork" >>confdefs.h
25996
25997fi
25998if test "x$ac_cv_func_fork_works" = xyes; then
25999
26000printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
26001
26002fi
26003
26004  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
26005if test "x$ac_cv_func_mmap" = xyes
26006then :
26007  printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h
26008
26009fi
26010ac_fn_c_check_func "$LINENO" "canonicalize_file_name" "ac_cv_func_canonicalize_file_name"
26011if test "x$ac_cv_func_canonicalize_file_name" = xyes
26012then :
26013  printf "%s\n" "#define HAVE_CANONICALIZE_FILE_NAME 1" >>confdefs.h
26014
26015fi
26016ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
26017if test "x$ac_cv_func_snprintf" = xyes
26018then :
26019  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
26020
26021fi
26022ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
26023if test "x$ac_cv_func_strdup" = xyes
26024then :
26025  printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
26026
26027fi
26028ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr"
26029if test "x$ac_cv_func_strchr" = xyes
26030then :
26031  printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h
26032
26033fi
26034ac_fn_c_check_func "$LINENO" "strrchr" "ac_cv_func_strrchr"
26035if test "x$ac_cv_func_strrchr" = xyes
26036then :
26037  printf "%s\n" "#define HAVE_STRRCHR 1" >>confdefs.h
26038
26039fi
26040ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
26041if test "x$ac_cv_func_strsignal" = xyes
26042then :
26043  printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
26044
26045fi
26046ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
26047if test "x$ac_cv_func_fchmod" = xyes
26048then :
26049  printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
26050
26051fi
26052ac_fn_c_check_func "$LINENO" "fstat" "ac_cv_func_fstat"
26053if test "x$ac_cv_func_fstat" = xyes
26054then :
26055  printf "%s\n" "#define HAVE_FSTAT 1" >>confdefs.h
26056
26057fi
26058ac_fn_c_check_func "$LINENO" "chmod" "ac_cv_func_chmod"
26059if test "x$ac_cv_func_chmod" = xyes
26060then :
26061  printf "%s\n" "#define HAVE_CHMOD 1" >>confdefs.h
26062
26063fi
26064
26065  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
26066printf %s "checking for a sed that does not truncate output... " >&6; }
26067if test ${ac_cv_path_SED+y}
26068then :
26069  printf %s "(cached) " >&6
26070else $as_nop
26071            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
26072     for ac_i in 1 2 3 4 5 6 7; do
26073       ac_script="$ac_script$as_nl$ac_script"
26074     done
26075     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
26076     { ac_script=; unset ac_script;}
26077     if test -z "$SED"; then
26078  ac_path_SED_found=false
26079  # Loop through the user's path and test for each of PROGNAME-LIST
26080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26081for as_dir in $PATH
26082do
26083  IFS=$as_save_IFS
26084  case $as_dir in #(((
26085    '') as_dir=./ ;;
26086    */) ;;
26087    *) as_dir=$as_dir/ ;;
26088  esac
26089    for ac_prog in sed gsed
26090   do
26091    for ac_exec_ext in '' $ac_executable_extensions; do
26092      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
26093      as_fn_executable_p "$ac_path_SED" || continue
26094# Check for GNU ac_path_SED and select it if it is found.
26095  # Check for GNU $ac_path_SED
26096case `"$ac_path_SED" --version 2>&1` in
26097*GNU*)
26098  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
26099*)
26100  ac_count=0
26101  printf %s 0123456789 >"conftest.in"
26102  while :
26103  do
26104    cat "conftest.in" "conftest.in" >"conftest.tmp"
26105    mv "conftest.tmp" "conftest.in"
26106    cp "conftest.in" "conftest.nl"
26107    printf "%s\n" '' >> "conftest.nl"
26108    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
26109    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
26110    as_fn_arith $ac_count + 1 && ac_count=$as_val
26111    if test $ac_count -gt ${ac_path_SED_max-0}; then
26112      # Best one so far, save it but keep looking for a better one
26113      ac_cv_path_SED="$ac_path_SED"
26114      ac_path_SED_max=$ac_count
26115    fi
26116    # 10*(2^10) chars as input seems more than enough
26117    test $ac_count -gt 10 && break
26118  done
26119  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
26120esac
26121
26122      $ac_path_SED_found && break 3
26123    done
26124  done
26125  done
26126IFS=$as_save_IFS
26127  if test -z "$ac_cv_path_SED"; then
26128    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
26129  fi
26130else
26131  ac_cv_path_SED=$SED
26132fi
26133
26134fi
26135{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
26136printf "%s\n" "$ac_cv_path_SED" >&6; }
26137 SED="$ac_cv_path_SED"
26138  rm -f conftest.sed
26139
26140  while :
26141  do
26142      test -x "$POSIX_SHELL" && break
26143      POSIX_SHELL=`which bash`
26144      test -x "$POSIX_SHELL" && break
26145      POSIX_SHELL=`which dash`
26146      test -x "$POSIX_SHELL" && break
26147      POSIX_SHELL=/usr/xpg4/bin/sh
26148      test -x "$POSIX_SHELL" && break
26149      POSIX_SHELL=`/bin/sh -c '
26150          exec 2>/dev/null
26151          if ! true ; then exit 1 ; fi
26152          echo /bin/sh'`
26153      test -x "$POSIX_SHELL" && break
26154      as_fn_error $? "cannot locate a working POSIX shell" "$LINENO" 5
26155  done
26156
26157printf "%s\n" "#define POSIX_SHELL \"${POSIX_SHELL}\"" >>confdefs.h
26158
26159
26160
26161
26162
26163  LIBOPTS_BUILD_BLOCKED=''
26164
26165
26166  NEED_LIBOPTS_DIR=''
26167
26168  # Check whether --enable-local-libopts was given.
26169if test ${enable_local_libopts+y}
26170then :
26171  enableval=$enable_local_libopts;
26172    if test x$enableval = xyes ; then
26173       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
26174printf "%s\n" "$as_me: Using supplied libopts tearoff" >&6;}
26175       LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
26176       NEED_LIBOPTS_DIR=true
26177       LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
26178    fi
26179fi
26180
26181
26182  # Check whether --enable-libopts-install was given.
26183if test ${enable_libopts_install+y}
26184then :
26185  enableval=$enable_libopts_install;
26186fi
26187
26188   if test "X${enable_libopts_install}" = Xyes; then
26189  INSTALL_LIBOPTS_TRUE=
26190  INSTALL_LIBOPTS_FALSE='#'
26191else
26192  INSTALL_LIBOPTS_TRUE='#'
26193  INSTALL_LIBOPTS_FALSE=
26194fi
26195
26196
26197  if test -z "${NEED_LIBOPTS_DIR}" ; then
26198     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
26199printf %s "checking whether autoopts-config can be found... " >&6; }
26200
26201# Check whether --with-autoopts-config was given.
26202if test ${with_autoopts_config+y}
26203then :
26204  withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
26205else $as_nop
26206  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
26207printf %s "checking whether autoopts-config is specified... " >&6; }
26208if test ${lo_cv_with_autoopts_config+y}
26209then :
26210  printf %s "(cached) " >&6
26211else $as_nop
26212  if autoopts-config --help 2>/dev/null 1>&2
26213        then lo_cv_with_autoopts_config=autoopts-config
26214        elif libopts-config --help 2>/dev/null 1>&2
26215        then lo_cv_with_autoopts_config=libopts-config
26216        else lo_cv_with_autoopts_config=no ; fi
26217fi
26218{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
26219printf "%s\n" "$lo_cv_with_autoopts_config" >&6; }
26220
26221fi
26222 # end of AC_ARG_WITH
26223
26224     if test ${lo_cv_test_autoopts+y}
26225then :
26226  printf %s "(cached) " >&6
26227else $as_nop
26228
26229        if test -z "${lo_cv_with_autoopts_config}" \
26230                -o X"${lo_cv_with_autoopts_config}" = Xno
26231        then
26232           if autoopts-config --help 2>/dev/null 1>&2
26233           then lo_cv_with_autoopts_config=autoopts-config
26234           elif libopts-config --help 2>/dev/null 1>&2
26235           then lo_cv_with_autoopts_config=libopts-config
26236           else lo_cv_with_autoopts_config=false ; fi
26237        fi
26238        lo_cv_test_autoopts=`
26239            ${lo_cv_with_autoopts_config} --libs` 2> /dev/null
26240        if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"
26241        then lo_cv_test_autoopts=no ; fi
26242
26243fi
26244 # end of CACHE_VAL
26245     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
26246printf "%s\n" "${lo_cv_test_autoopts}" >&6; }
26247
26248     if test "X${lo_cv_test_autoopts}" != Xno
26249     then
26250        LIBOPTS_LDADD="${lo_cv_test_autoopts}"
26251        LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
26252     else
26253        LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
26254        LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
26255        NEED_LIBOPTS_DIR=true
26256     fi
26257  fi # end of if test -z "${NEED_LIBOPTS_DIR}"
26258  if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
26259    NEED_LIBOPTS_DIR=''
26260  fi
26261   if test -n "${NEED_LIBOPTS_DIR}"; then
26262  NEED_LIBOPTS_TRUE=
26263  NEED_LIBOPTS_FALSE='#'
26264else
26265  NEED_LIBOPTS_TRUE='#'
26266  NEED_LIBOPTS_FALSE=
26267fi
26268
26269
26270
26271  LIBOPTS_DIR=libopts
26272
26273
26274# end of AC_DEFUN of LIBOPTS_CHECK_COMMON
26275
26276
26277    if test -z "$NEED_LIBOPTS_TRUE"; then :
26278
26279
26280
26281  # Check to see if a reg expr header is specified.
26282
26283
26284# Check whether --with-regex-header was given.
26285if test ${with_regex_header+y}
26286then :
26287  withval=$with_regex_header; libopts_cv_with_regex_header=${with_regex_header}
26288else $as_nop
26289  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a reg expr header is specified" >&5
26290printf %s "checking whether a reg expr header is specified... " >&6; }
26291if test ${libopts_cv_with_regex_header+y}
26292then :
26293  printf %s "(cached) " >&6
26294else $as_nop
26295  libopts_cv_with_regex_header=no
26296fi
26297{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_regex_header" >&5
26298printf "%s\n" "$libopts_cv_with_regex_header" >&6; }
26299
26300fi
26301 # end of AC_ARG_WITH
26302  if test "X${libopts_cv_with_regex_header}" != Xno
26303  then
26304    printf "%s\n" "#define REGEX_HEADER <${libopts_cv_with_regex_header}>" >>confdefs.h
26305
26306  else
26307
26308printf "%s\n" "#define REGEX_HEADER <regex.h>" >>confdefs.h
26309
26310  fi
26311
26312
26313
26314  # Check to see if a working libregex can be found.
26315
26316
26317# Check whether --with-libregex was given.
26318if test ${with_libregex+y}
26319then :
26320  withval=$with_libregex; libopts_cv_with_libregex_root=${with_libregex}
26321else $as_nop
26322  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether with-libregex was specified" >&5
26323printf %s "checking whether with-libregex was specified... " >&6; }
26324if test ${libopts_cv_with_libregex_root+y}
26325then :
26326  printf %s "(cached) " >&6
26327else $as_nop
26328  libopts_cv_with_libregex_root=no
26329fi
26330{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_root" >&5
26331printf "%s\n" "$libopts_cv_with_libregex_root" >&6; }
26332
26333fi
26334 # end of AC_ARG_WITH libregex
26335
26336  if test "${with_libregex+set}" = set && \
26337     test "X${withval}" = Xno
26338  then ## disabled by request
26339    libopts_cv_with_libregex_root=no
26340    libopts_cv_with_libregex_cflags=no
26341    libopts_cv_with_libregex_libs=no
26342  else
26343
26344
26345# Check whether --with-libregex-cflags was given.
26346if test ${with_libregex_cflags+y}
26347then :
26348  withval=$with_libregex_cflags; libopts_cv_with_libregex_cflags=${with_libregex_cflags}
26349else $as_nop
26350  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-cflags was specified" >&5
26351printf %s "checking whether with-libregex-cflags was specified... " >&6; }
26352if test ${libopts_cv_with_libregex_cflags+y}
26353then :
26354  printf %s "(cached) " >&6
26355else $as_nop
26356  libopts_cv_with_libregex_cflags=no
26357fi
26358{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_cflags" >&5
26359printf "%s\n" "$libopts_cv_with_libregex_cflags" >&6; }
26360
26361fi
26362 # end of AC_ARG_WITH libregex-cflags
26363
26364
26365# Check whether --with-libregex-libs was given.
26366if test ${with_libregex_libs+y}
26367then :
26368  withval=$with_libregex_libs; libopts_cv_with_libregex_libs=${with_libregex_libs}
26369else $as_nop
26370  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-libs was specified" >&5
26371printf %s "checking whether with-libregex-libs was specified... " >&6; }
26372if test ${libopts_cv_with_libregex_libs+y}
26373then :
26374  printf %s "(cached) " >&6
26375else $as_nop
26376  libopts_cv_with_libregex_libs=no
26377fi
26378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_libs" >&5
26379printf "%s\n" "$libopts_cv_with_libregex_libs" >&6; }
26380
26381fi
26382 # end of AC_ARG_WITH libregex-libs
26383
26384  case "X${libopts_cv_with_libregex_cflags}" in
26385  Xyes|Xno|X )
26386    case "X${libopts_cv_with_libregex_root}" in
26387    Xyes|Xno|X ) libopts_cv_with_libregex_cflags=no ;;
26388    * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;;
26389    esac
26390  esac
26391  case "X${libopts_cv_with_libregex_libs}" in
26392  Xyes|Xno|X )
26393    case "X${libopts_cv_with_libregex_root}" in
26394    Xyes|Xno|X ) libopts_cv_with_libregex_libs=no ;;
26395    * )        libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex" ;;
26396    esac
26397  esac
26398  libopts_save_CPPFLAGS="${CPPFLAGS}"
26399  libopts_save_LIBS="${LIBS}"
26400  case "X${libopts_cv_with_libregex_cflags}" in
26401  Xyes|Xno|X )
26402    libopts_cv_with_libregex_cflags="" ;;
26403  * ) CPPFLAGS="${CPPFLAGS} ${libopts_cv_with_libregex_cflags}" ;;
26404  esac
26405  case "X${libopts_cv_with_libregex_libs}" in
26406  Xyes|Xno|X )
26407    libopts_cv_with_libregex_libs="" ;;
26408  * )
26409    LIBS="${LIBS} ${libopts_cv_with_libregex_libs}" ;;
26410  esac
26411  LIBREGEX_CFLAGS=""
26412  LIBREGEX_LIBS=""
26413  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libregex functions properly" >&5
26414printf %s "checking whether libregex functions properly... " >&6; }
26415  if test ${libopts_cv_with_libregex+y}
26416then :
26417  printf %s "(cached) " >&6
26418else $as_nop
26419
26420  if test "$cross_compiling" = yes
26421then :
26422  libopts_cv_with_libregex=no
26423else $as_nop
26424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26425/* end confdefs.h.  */
26426#include <stdio.h>
26427#include <stdlib.h>
26428#include <sys/types.h>
26429#include REGEX_HEADER
26430static regex_t re;
26431void comp_re(char const * pzPat) {
26432  int res = regcomp( &re, pzPat, REG_EXTENDED|REG_ICASE|REG_NEWLINE );
26433  if (res == 0) return;
26434  exit( res ); }
26435int main() {
26436  regmatch_t m[2];
26437  comp_re( "^.*\$"   );
26438  comp_re( "()|no.*" );
26439  comp_re( "."       );
26440  if (regexec( &re, "X", 2, m, 0 ) != 0)  return 1;
26441  if ((m[0].rm_so != 0) || (m[0].rm_eo != 1)) {
26442    fputs( "error: regex -->.<-- did not match\n", stderr );
26443    return 1;
26444  }
26445  return 0; }
26446_ACEOF
26447if ac_fn_c_try_run "$LINENO"
26448then :
26449  libopts_cv_with_libregex=yes
26450else $as_nop
26451  libopts_cv_with_libregex=no
26452fi
26453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26454  conftest.$ac_objext conftest.beam conftest.$ac_ext
26455fi
26456 # end of AC_RUN_IFELSE
26457
26458fi
26459 # end of AC_CACHE_VAL for libopts_cv_with_libregex
26460  fi ## disabled by request
26461  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_with_libregex}" >&5
26462printf "%s\n" "${libopts_cv_with_libregex}" >&6; }
26463  if test "X${libopts_cv_with_libregex}" != Xno
26464  then
26465
26466printf "%s\n" "#define WITH_LIBREGEX 1" >>confdefs.h
26467
26468  else
26469    CPPFLAGS="${libopts_save_CPPFLAGS}"
26470    LIBS="${libopts_save_LIBS}"
26471    libopts_cv_with_libregex_root=no
26472libopts_cv_with_libregex_cflags=no
26473libopts_cv_with_libregex_libs=no
26474libopts_cv_with_libregex=no
26475  fi
26476
26477
26478
26479  # Check to see if pathfind(3) works.
26480
26481  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pathfind(3) works" >&5
26482printf %s "checking whether pathfind(3) works... " >&6; }
26483  if test ${libopts_cv_run_pathfind+y}
26484then :
26485  printf %s "(cached) " >&6
26486else $as_nop
26487
26488  if test "$cross_compiling" = yes
26489then :
26490  libopts_cv_run_pathfind=no
26491
26492else $as_nop
26493  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26494/* end confdefs.h.  */
26495#include <string.h>
26496#include <stdlib.h>
26497int main (int argc, char ** argv) {
26498   char * pz = pathfind( getenv( "PATH" ), "sh", "x" );
26499   return (pz == 0) ? 1 : 0;
26500}
26501_ACEOF
26502if ac_fn_c_try_run "$LINENO"
26503then :
26504  libopts_cv_run_pathfind=yes
26505else $as_nop
26506  libopts_cv_run_pathfind=no
26507fi
26508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26509  conftest.$ac_objext conftest.beam conftest.$ac_ext
26510fi
26511 # end of RUN_IFELSE
26512
26513fi
26514 # end of AC_CACHE_VAL for libopts_cv_run_pathfind
26515  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_pathfind}" >&5
26516printf "%s\n" "${libopts_cv_run_pathfind}" >&6; }
26517  if test "X${libopts_cv_run_pathfind}" != Xno
26518  then
26519
26520printf "%s\n" "#define HAVE_PATHFIND 1" >>confdefs.h
26521
26522  fi
26523
26524
26525
26526  # Check to see if /dev/zero is readable device.
26527
26528  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether /dev/zero is readable device" >&5
26529printf %s "checking whether /dev/zero is readable device... " >&6; }
26530  if test ${libopts_cv_test_dev_zero+y}
26531then :
26532  printf %s "(cached) " >&6
26533else $as_nop
26534
26535    libopts_cv_test_dev_zero=`exec 2> /dev/null
26536dzero=\`ls -lL /dev/zero | egrep ^c......r\`
26537test -z "${dzero}" && exit 1
26538echo ${dzero}`
26539    if test $? -ne 0 || test -z "$libopts_cv_test_dev_zero"
26540    then libopts_cv_test_dev_zero=no
26541    fi
26542
26543fi
26544 # end of CACHE_VAL of libopts_cv_test_dev_zero
26545  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_test_dev_zero}" >&5
26546printf "%s\n" "${libopts_cv_test_dev_zero}" >&6; }
26547  if test "X${libopts_cv_test_dev_zero}" != Xno
26548  then
26549
26550printf "%s\n" "#define HAVE_DEV_ZERO 1" >>confdefs.h
26551
26552  fi
26553
26554
26555
26556  # Check to see if we have a functional realpath(3C).
26557
26558  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have a functional realpath(3C)" >&5
26559printf %s "checking whether we have a functional realpath(3C)... " >&6; }
26560  if test ${libopts_cv_run_realpath+y}
26561then :
26562  printf %s "(cached) " >&6
26563else $as_nop
26564
26565  if test "$cross_compiling" = yes
26566then :
26567  libopts_cv_run_realpath=no
26568
26569else $as_nop
26570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26571/* end confdefs.h.  */
26572#include <limits.h>
26573#include <stdlib.h>
26574int main (int argc, char ** argv) {
26575#ifndef PATH_MAX
26576choke me!!
26577#else
26578   char zPath[PATH_MAX+1];
26579#endif
26580   char *pz = realpath(argv[0], zPath);
26581   return (pz == zPath) ? 0 : 1;
26582}
26583_ACEOF
26584if ac_fn_c_try_run "$LINENO"
26585then :
26586  libopts_cv_run_realpath=yes
26587else $as_nop
26588  libopts_cv_run_realpath=no
26589fi
26590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26591  conftest.$ac_objext conftest.beam conftest.$ac_ext
26592fi
26593 # end of RUN_IFELSE
26594
26595fi
26596 # end of AC_CACHE_VAL for libopts_cv_run_realpath
26597  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_realpath}" >&5
26598printf "%s\n" "${libopts_cv_run_realpath}" >&6; }
26599  if test "X${libopts_cv_run_realpath}" != Xno
26600  then
26601
26602printf "%s\n" "#define HAVE_REALPATH 1" >>confdefs.h
26603
26604  fi
26605
26606
26607
26608  # Check to see if strftime() works.
26609
26610  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strftime() works" >&5
26611printf %s "checking whether strftime() works... " >&6; }
26612  if test ${libopts_cv_run_strftime+y}
26613then :
26614  printf %s "(cached) " >&6
26615else $as_nop
26616
26617  if test "$cross_compiling" = yes
26618then :
26619  libopts_cv_run_strftime=no
26620
26621else $as_nop
26622  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26623/* end confdefs.h.  */
26624#include <time.h>
26625#include <string.h>
26626char t_buf[ 64 ];
26627int main() {
26628  static char const z[] = "Thursday Aug 28 240";
26629  struct tm tm;
26630  tm.tm_sec   = 36;  /* seconds after the minute [0, 61]  */
26631  tm.tm_min   = 44;  /* minutes after the hour [0, 59] */
26632  tm.tm_hour  = 12;  /* hour since midnight [0, 23] */
26633  tm.tm_mday  = 28;  /* day of the month [1, 31] */
26634  tm.tm_mon   =  7;  /* months since January [0, 11] */
26635  tm.tm_year  = 86;  /* years since 1900 */
26636  tm.tm_wday  =  4;  /* days since Sunday [0, 6] */
26637  tm.tm_yday  = 239; /* days since January 1 [0, 365] */
26638  tm.tm_isdst =  1;  /* flag for daylight savings time */
26639  strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
26640  return (strcmp( t_buf, z ) != 0); }
26641_ACEOF
26642if ac_fn_c_try_run "$LINENO"
26643then :
26644  libopts_cv_run_strftime=yes
26645else $as_nop
26646  libopts_cv_run_strftime=no
26647fi
26648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26649  conftest.$ac_objext conftest.beam conftest.$ac_ext
26650fi
26651 # end of RUN_IFELSE
26652
26653fi
26654 # end of AC_CACHE_VAL for libopts_cv_run_strftime
26655  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_strftime}" >&5
26656printf "%s\n" "${libopts_cv_run_strftime}" >&6; }
26657  if test "X${libopts_cv_run_strftime}" != Xno
26658  then
26659
26660printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
26661
26662  fi
26663
26664
26665
26666  # Check to see if fopen accepts "b" mode.
26667
26668  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"b\" mode" >&5
26669printf %s "checking whether fopen accepts \"b\" mode... " >&6; }
26670  if test ${libopts_cv_run_fopen_binary+y}
26671then :
26672  printf %s "(cached) " >&6
26673else $as_nop
26674
26675  if test "$cross_compiling" = yes
26676then :
26677  libopts_cv_run_fopen_binary=no
26678
26679else $as_nop
26680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26681/* end confdefs.h.  */
26682#include <stdio.h>
26683int main (int argc, char ** argv) {
26684FILE * fp = fopen("conftest.$ac_ext", "rb");
26685return (fp == NULL) ? 1 : fclose(fp); }
26686_ACEOF
26687if ac_fn_c_try_run "$LINENO"
26688then :
26689  libopts_cv_run_fopen_binary=yes
26690else $as_nop
26691  libopts_cv_run_fopen_binary=no
26692fi
26693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26694  conftest.$ac_objext conftest.beam conftest.$ac_ext
26695fi
26696 # end of RUN_IFELSE
26697
26698fi
26699 # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
26700  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_binary}" >&5
26701printf "%s\n" "${libopts_cv_run_fopen_binary}" >&6; }
26702  if test "X${libopts_cv_run_fopen_binary}" != Xno
26703  then
26704
26705printf "%s\n" "#define FOPEN_BINARY_FLAG \"b\"" >>confdefs.h
26706
26707  else
26708
26709printf "%s\n" "#define FOPEN_BINARY_FLAG \"\"" >>confdefs.h
26710
26711  fi
26712
26713
26714
26715  # Check to see if fopen accepts "t" mode.
26716
26717  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"t\" mode" >&5
26718printf %s "checking whether fopen accepts \"t\" mode... " >&6; }
26719  if test ${libopts_cv_run_fopen_text+y}
26720then :
26721  printf %s "(cached) " >&6
26722else $as_nop
26723
26724  if test "$cross_compiling" = yes
26725then :
26726  libopts_cv_run_fopen_text=no
26727
26728else $as_nop
26729  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26730/* end confdefs.h.  */
26731#include <stdio.h>
26732int main (int argc, char ** argv) {
26733FILE * fp = fopen("conftest.$ac_ext", "rt");
26734return (fp == NULL) ? 1 : fclose(fp); }
26735_ACEOF
26736if ac_fn_c_try_run "$LINENO"
26737then :
26738  libopts_cv_run_fopen_text=yes
26739else $as_nop
26740  libopts_cv_run_fopen_text=no
26741fi
26742rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26743  conftest.$ac_objext conftest.beam conftest.$ac_ext
26744fi
26745 # end of RUN_IFELSE
26746
26747fi
26748 # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
26749  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_text}" >&5
26750printf "%s\n" "${libopts_cv_run_fopen_text}" >&6; }
26751  if test "X${libopts_cv_run_fopen_text}" != Xno
26752  then
26753
26754printf "%s\n" "#define FOPEN_TEXT_FLAG \"t\"" >>confdefs.h
26755
26756  else
26757
26758printf "%s\n" "#define FOPEN_TEXT_FLAG \"\"" >>confdefs.h
26759
26760  fi
26761
26762
26763
26764  # Check to see if not wanting optional option args.
26765
26766  # Check whether --enable-optional-args was given.
26767if test ${enable_optional_args+y}
26768then :
26769  enableval=$enable_optional_args; libopts_cv_enable_optional_args=${enable_optional_args}
26770else $as_nop
26771  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether not wanting optional option args" >&5
26772printf %s "checking whether not wanting optional option args... " >&6; }
26773if test ${libopts_cv_enable_optional_args+y}
26774then :
26775  printf %s "(cached) " >&6
26776else $as_nop
26777  libopts_cv_enable_optional_args=yes
26778fi
26779{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_enable_optional_args" >&5
26780printf "%s\n" "$libopts_cv_enable_optional_args" >&6; }
26781
26782fi
26783 # end of AC_ARG_ENABLE
26784  if test "X${libopts_cv_enable_optional_args}" = Xno
26785  then
26786
26787printf "%s\n" "#define NO_OPTIONAL_OPT_ARGS 1" >>confdefs.h
26788
26789  fi
26790
26791
26792
26793
26794
26795          fi
26796  ac_config_files="$ac_config_files libopts/Makefile"
26797
26798  # end of AC_DEFUN of LIBOPTS_CHECK
26799
26800
26801# From when we only used libevent for sntp:
26802#AM_COND_IF(
26803#    [BUILD_SNTP],
26804#    [NTP_LIBEVENT_CHECK],
26805#    [NTP_LIBEVENT_CHECK_NOBUILD]
26806#)
26807
26808
26809
26810# Check whether --enable-local-libevent was given.
26811if test ${enable_local_libevent+y}
26812then :
26813  enableval=$enable_local_libevent; ntp_use_local_libevent=$enableval
26814else $as_nop
26815  ntp_use_local_libevent=${ntp_use_local_libevent-detect}
26816
26817fi
26818
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828ntp_libevent_min_version=2
26829ntp_libevent_tearoff=libevent
26830
26831
26832
26833
26834
26835case "$ntp_use_local_libevent" in
26836 yes)
26837    ;;
26838 *) # If we have (a good enough) pkg-config, see if it can find libevent
26839    case "$PKG_CONFIG" in
26840     /*)
26841	if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
26842	then
26843	    ntp_use_local_libevent=no
26844	    ntp_libevent_version="`$PKG_CONFIG --modversion libevent`"
26845	    case "$ntp_libevent_version" in
26846	     *.*) ;;
26847	     *) ntp_libevent_version='(unknown)' ;;
26848	    esac
26849	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
26850printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
26851	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_libevent_version" >&5
26852printf "%s\n" "yes, version $ntp_libevent_version" >&6; }
26853	    CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
26854	    CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
26855	    # HMS: I hope the following is accurate.
26856	    # We don't need -levent, we only need  -levent_core.
26857	    # While we could grab only the -L stuff, there *might* be
26858	    # other flags there we want.  Originally we just removed -levent
26859	    # but then somebody decided to install -levent-2.0
26860	    # LDADD_LIBEVENT=`$PKG_CONFIG --libs libevent | sed 's:-levent::'`
26861	    # So now we dance...
26862	    LDADD_LIBEVENT=
26863	    for i in `$PKG_CONFIG --libs libevent` `$PKG_CONFIG --cflags-only-other libevent_pthreads`
26864	    do
26865		case "$i" in
26866		 -D*) ;;
26867		 -levent*) ;;
26868		 *) case "$LDADD_LIBEVENT" in
26869		     '') LDADD_LIBEVENT="$i" ;;
26870		     *) LDADD_LIBEVENT="$LDADD_LIBEVENT $i" ;;
26871		    esac
26872		    ;;
26873		esac
26874	    done
26875	    case "$LIBISC_PTHREADS_NOTHREADS" in
26876	     pthreads)
26877		LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads"
26878	    esac
26879	    LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core"
26880	else
26881	    ntp_use_local_libevent=yes
26882	    # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
26883	    # is "pthreads"?
26884	    CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
26885	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
26886printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
26887	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
26888printf "%s\n" "no" >&6; }
26889	fi
26890	;;
26891     *)
26892	ntp_use_local_libevent=yes
26893	;;
26894    esac
26895    ;;
26896esac
26897
26898case "$ntp_use_local_libevent" in
26899 yes)
26900    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
26901printf "%s\n" "$as_me: Using libevent tearoff" >&6;}
26902    CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
26903    case "$LIBISC_PTHREADS_NOTHREADS" in
26904     pthreads)
26905	LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_pthreads.la \$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
26906	;;
26907     *)
26908	LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
26909    esac
26910esac
26911
26912
26913 if test "x$ntp_use_local_libevent" = "xyes"; then
26914  BUILD_LIBEVENT_TRUE=
26915  BUILD_LIBEVENT_FALSE='#'
26916else
26917  BUILD_LIBEVENT_TRUE='#'
26918  BUILD_LIBEVENT_FALSE=
26919fi
26920
26921
26922
26923
26924case "$ntp_libevent_tearoff" in
26925 libevent)
26926    ;;
26927 *)
26928    as_fn_error $? "ntp_libevent.m4 dir must be libevent, not $ntp_libevent_tearoff" "$LINENO" 5
26929    ;;
26930esac
26931
26932case "$ntp_use_local_libevent" in
26933 yes)
26934                        ac_configure_args=" --disable-openssl${ac_configure_args}"
26935    ac_configure_args=" --disable-samples${ac_configure_args}"
26936    ac_configure_args=" --disable-shared${ac_configure_args}"
26937    ac_configure_args=" --disable-libevent-regress${ac_configure_args}"
26938    ac_configure_args=" --disable-libevent-install${ac_configure_args}"
26939    ac_configure_args=" --enable-silent-rules${ac_configure_args}"
26940    ac_configure_args=" --enable-function-sections${ac_configure_args}"
26941    ac_configure_args=" LIBEVENT_CFLAGS='${NTP_HARD_CFLAGS}'${ac_configure_args}"
26942    ac_configure_args=" LIBEVENT_CPPFLAGS='${NTP_HARD_CPPFLAGS}'${ac_configure_args}"
26943    ac_configure_args=" LIBEVENT_LDFLAGS='${NTP_HARD_LDFLAGS}'${ac_configure_args}"
26944    subdirs="$subdirs libevent"
26945
26946    ;;
26947 *)
26948    NTP_FORCE_LIBEVENT_DIST=libevent
26949    ;;
26950esac
26951
26952
26953
26954# Checks for libraries.
26955
26956
26957LIB_SYSLOG=''
26958
26959{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
26960printf %s "checking for library containing openlog... " >&6; }
26961if test ${ac_cv_search_openlog+y}
26962then :
26963  printf %s "(cached) " >&6
26964else $as_nop
26965  ac_func_search_save_LIBS=$LIBS
26966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26967/* end confdefs.h.  */
26968
26969/* Override any GCC internal prototype to avoid an error.
26970   Use char because int might match the return type of a GCC
26971   builtin and then its argument prototype would still apply.  */
26972char openlog ();
26973int
26974main (void)
26975{
26976return openlog ();
26977  ;
26978  return 0;
26979}
26980_ACEOF
26981for ac_lib in '' gen syslog
26982do
26983  if test -z "$ac_lib"; then
26984    ac_res="none required"
26985  else
26986    ac_res=-l$ac_lib
26987    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26988  fi
26989  if ac_fn_c_try_link "$LINENO"
26990then :
26991  ac_cv_search_openlog=$ac_res
26992fi
26993rm -f core conftest.err conftest.$ac_objext conftest.beam \
26994    conftest$ac_exeext
26995  if test ${ac_cv_search_openlog+y}
26996then :
26997  break
26998fi
26999done
27000if test ${ac_cv_search_openlog+y}
27001then :
27002
27003else $as_nop
27004  ac_cv_search_openlog=no
27005fi
27006rm conftest.$ac_ext
27007LIBS=$ac_func_search_save_LIBS
27008fi
27009{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
27010printf "%s\n" "$ac_cv_search_openlog" >&6; }
27011ac_res=$ac_cv_search_openlog
27012if test "$ac_res" != no
27013then :
27014  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27015  case "$ac_cv_search_openlog" in
27016 'none required') ;;
27017 no) ;;
27018 *) LIB_SYSLOG="$ac_cv_search_openlog $LIB_SYSLOG" ;;
27019 esac
27020
27021fi
27022
27023
27024# Checks for header files.
27025ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
27026if test "x$ac_cv_header_netdb_h" = xyes
27027then :
27028  printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
27029
27030fi
27031ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
27032if test "x$ac_cv_header_string_h" = xyes
27033then :
27034  printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
27035
27036fi
27037ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
27038if test "x$ac_cv_header_strings_h" = xyes
27039then :
27040  printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
27041
27042fi
27043ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
27044if test "x$ac_cv_header_syslog_h" = xyes
27045then :
27046  printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h
27047
27048fi
27049
27050
27051
27052       for ac_header in sysexits.h
27053do :
27054  ac_fn_c_check_header_compile "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
27055if test "x$ac_cv_header_sysexits_h" = xyes
27056then :
27057  printf "%s\n" "#define HAVE_SYSEXITS_H 1" >>confdefs.h
27058
27059else $as_nop
27060
27061
27062printf "%s\n" "#define EX_OK 0" >>confdefs.h
27063
27064
27065printf "%s\n" "#define EX_SOFTWARE 70" >>confdefs.h
27066
27067
27068fi
27069
27070done
27071
27072
27073
27074{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
27075printf %s "checking for facilitynames in syslog.h... " >&6; }
27076if test ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+y}
27077then :
27078  printf %s "(cached) " >&6
27079else $as_nop
27080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27081/* end confdefs.h.  */
27082
27083		#define SYSLOG_NAMES
27084		#include <stdlib.h>
27085		#include <syslog.h>
27086
27087int
27088main (void)
27089{
27090
27091		void *fnames = facilitynames;
27092
27093
27094  ;
27095  return 0;
27096}
27097	ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
27098_ACEOF
27099if ac_fn_c_try_compile "$LINENO"
27100then :
27101  ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
27102
27103fi
27104rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27105
27106fi
27107{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
27108printf "%s\n" "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
27109case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
27110 yes)
27111
27112printf "%s\n" "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
27113
27114    ;;
27115 no)
27116    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
27117printf "%s\n" "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
27118esac
27119
27120
27121# Checks for typedefs, structures, and compiler characteristics.
27122ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
27123if test "x$ac_cv_type__Bool" = xyes
27124then :
27125
27126printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
27127
27128
27129fi
27130
27131   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
27132printf %s "checking for stdbool.h that conforms to C99... " >&6; }
27133if test ${ac_cv_header_stdbool_h+y}
27134then :
27135  printf %s "(cached) " >&6
27136else $as_nop
27137  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27138/* end confdefs.h.  */
27139#include <stdbool.h>
27140
27141             #ifndef __bool_true_false_are_defined
27142               #error "__bool_true_false_are_defined is not defined"
27143             #endif
27144             char a[__bool_true_false_are_defined == 1 ? 1 : -1];
27145
27146             /* Regardless of whether this is C++ or "_Bool" is a
27147                valid type name, "true" and "false" should be usable
27148                in #if expressions and integer constant expressions,
27149                and "bool" should be a valid type name.  */
27150
27151             #if !true
27152               #error "'true' is not true"
27153             #endif
27154             #if true != 1
27155               #error "'true' is not equal to 1"
27156             #endif
27157             char b[true == 1 ? 1 : -1];
27158             char c[true];
27159
27160             #if false
27161               #error "'false' is not false"
27162             #endif
27163             #if false != 0
27164               #error "'false' is not equal to 0"
27165             #endif
27166             char d[false == 0 ? 1 : -1];
27167
27168             enum { e = false, f = true, g = false * true, h = true * 256 };
27169
27170             char i[(bool) 0.5 == true ? 1 : -1];
27171             char j[(bool) 0.0 == false ? 1 : -1];
27172             char k[sizeof (bool) > 0 ? 1 : -1];
27173
27174             struct sb { bool s: 1; bool t; } s;
27175             char l[sizeof s.t > 0 ? 1 : -1];
27176
27177             /* The following fails for
27178                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
27179             bool m[h];
27180             char n[sizeof m == h * sizeof m[0] ? 1 : -1];
27181             char o[-1 - (bool) 0 < 0 ? 1 : -1];
27182             /* Catch a bug in an HP-UX C compiler.  See
27183         https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
27184         https://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
27185              */
27186             bool p = true;
27187             bool *pp = &p;
27188
27189             /* C 1999 specifies that bool, true, and false are to be
27190                macros, but C++ 2011 and later overrule this.  */
27191             #if __cplusplus < 201103
27192              #ifndef bool
27193               #error "bool is not defined"
27194              #endif
27195              #ifndef false
27196               #error "false is not defined"
27197              #endif
27198              #ifndef true
27199               #error "true is not defined"
27200              #endif
27201             #endif
27202
27203             /* If _Bool is available, repeat with it all the tests
27204                above that used bool.  */
27205             #ifdef HAVE__BOOL
27206               struct sB { _Bool s: 1; _Bool t; } t;
27207
27208               char q[(_Bool) 0.5 == true ? 1 : -1];
27209               char r[(_Bool) 0.0 == false ? 1 : -1];
27210               char u[sizeof (_Bool) > 0 ? 1 : -1];
27211               char v[sizeof t.t > 0 ? 1 : -1];
27212
27213               _Bool w[h];
27214               char x[sizeof m == h * sizeof m[0] ? 1 : -1];
27215               char y[-1 - (_Bool) 0 < 0 ? 1 : -1];
27216               _Bool z = true;
27217               _Bool *pz = &p;
27218             #endif
27219
27220int
27221main (void)
27222{
27223
27224             bool ps = &s;
27225             *pp |= p;
27226             *pp |= ! p;
27227
27228             #ifdef HAVE__BOOL
27229               _Bool pt = &t;
27230               *pz |= z;
27231               *pz |= ! z;
27232             #endif
27233
27234             /* Refer to every declared value, so they cannot be
27235                discarded as unused.  */
27236             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k
27237                     + !l + !m + !n + !o + !p + !pp + !ps
27238             #ifdef HAVE__BOOL
27239                     + !q + !r + !u + !v + !w + !x + !y + !z + !pt
27240             #endif
27241                    );
27242
27243  ;
27244  return 0;
27245}
27246_ACEOF
27247if ac_fn_c_try_compile "$LINENO"
27248then :
27249  ac_cv_header_stdbool_h=yes
27250else $as_nop
27251  ac_cv_header_stdbool_h=no
27252fi
27253rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27254fi
27255{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
27256printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
27257
27258if test $ac_cv_header_stdbool_h = yes; then
27259
27260printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
27261
27262fi
27263
27264
27265
27266
27267{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
27268printf %s "checking for struct sockaddr_storage... " >&6; }
27269if test ${ntp_cv_sockaddr_storage+y}
27270then :
27271  printf %s "(cached) " >&6
27272else $as_nop
27273  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27274/* end confdefs.h.  */
27275
27276		#ifdef HAVE_SYS_TYPES_H
27277		# include <sys/types.h>
27278		#endif
27279		#ifdef HAVE_SYS_SOCKET_H
27280		# include <sys/socket.h>
27281		#endif
27282		#ifdef HAVE_NETINET_IN_H
27283		# include <netinet/in.h>
27284		#endif
27285
27286int
27287main (void)
27288{
27289
27290		struct sockaddr_storage n;
27291
27292
27293  ;
27294  return 0;
27295}
27296_ACEOF
27297if ac_fn_c_try_compile "$LINENO"
27298then :
27299  ntp_cv_sockaddr_storage=yes
27300else $as_nop
27301  ntp_cv_sockaddr_storage=no
27302
27303fi
27304rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27305
27306fi
27307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
27308printf "%s\n" "$ntp_cv_sockaddr_storage" >&6; }
27309case "$ntp_cv_sockaddr_storage" in
27310 yes)
27311
27312printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
27313
27314    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
27315printf %s "checking for sockaddr_storage.__ss_family... " >&6; }
27316if test ${ntp_cv_have___ss_family+y}
27317then :
27318  printf %s "(cached) " >&6
27319else $as_nop
27320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27321/* end confdefs.h.  */
27322
27323		    #ifdef HAVE_SYS_TYPES_H
27324		    # include <sys/types.h>
27325		    #endif
27326		    #ifdef HAVE_SYS_SOCKET_H
27327		    # include <sys/socket.h>
27328		    #endif
27329		    #ifdef HAVE_NETINET_IN_H
27330		    # include <netinet/in.h>
27331		    #endif
27332
27333int
27334main (void)
27335{
27336
27337		    struct sockaddr_storage s;
27338		    s.__ss_family = 1;
27339
27340
27341  ;
27342  return 0;
27343}
27344_ACEOF
27345if ac_fn_c_try_compile "$LINENO"
27346then :
27347  ntp_cv_have___ss_family=yes
27348else $as_nop
27349  ntp_cv_have___ss_family=no
27350
27351fi
27352rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27353
27354fi
27355{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
27356printf "%s\n" "$ntp_cv_have___ss_family" >&6; }
27357    case "$ntp_cv_have___ss_family" in
27358     yes)
27359
27360printf "%s\n" "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
27361
27362    esac
27363
27364esac
27365
27366
27367#
27368# Look for in_port_t.
27369#
27370{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
27371printf %s "checking for in_port_t... " >&6; }
27372if test ${isc_cv_have_in_port_t+y}
27373then :
27374  printf %s "(cached) " >&6
27375else $as_nop
27376  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27377/* end confdefs.h.  */
27378
27379		#include <sys/types.h>
27380		#include <netinet/in.h>
27381
27382int
27383main (void)
27384{
27385
27386		in_port_t port = 25;
27387		return (0);
27388
27389
27390  ;
27391  return 0;
27392}
27393_ACEOF
27394if ac_fn_c_try_compile "$LINENO"
27395then :
27396  isc_cv_have_in_port_t=yes
27397else $as_nop
27398  isc_cv_have_in_port_t=no
27399
27400fi
27401rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27402
27403fi
27404{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
27405printf "%s\n" "$isc_cv_have_in_port_t" >&6; }
27406case "$isc_cv_have_in_port_t" in
27407 no)
27408
27409printf "%s\n" "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
27410
27411esac
27412
27413{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
27414printf %s "checking type of socklen arg for getsockname()... " >&6; }
27415if test ${ntp_cv_getsockname_socklen_type+y}
27416then :
27417  printf %s "(cached) " >&6
27418else $as_nop
27419
27420    getsockname_socklen_type_found=no
27421    for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
27422	for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
27423	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27424/* end confdefs.h.  */
27425
27426			#ifdef HAVE_SYS_TYPES_H
27427			# include <sys/types.h>
27428			#endif
27429			#ifdef HAVE_SYS_SOCKET_H
27430			# include <sys/socket.h>
27431			#endif
27432
27433int
27434main (void)
27435{
27436
27437			extern
27438			getsockname(int, $getsockname_arg2,
27439				$ntp_cv_getsockname_socklen_type *);
27440
27441
27442  ;
27443  return 0;
27444}
27445_ACEOF
27446if ac_fn_c_try_compile "$LINENO"
27447then :
27448  getsockname_socklen_type_found=yes ; break 2
27449fi
27450rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27451	done
27452    done
27453    case "$getsockname_socklen_type_found" in
27454     no)
27455	ntp_cv_getsockname_socklen_type='socklen_t'
27456    esac
27457    { getsockname_arg2=; unset getsockname_arg2;}
27458    { getsockname_socklen_type_found=; unset getsockname_socklen_type_found;}
27459
27460
27461fi
27462{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
27463printf "%s\n" "$ntp_cv_getsockname_socklen_type" >&6; }
27464
27465printf "%s\n" "#define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type" >>confdefs.h
27466
27467
27468{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
27469printf %s "checking struct sockaddr for sa_len... " >&6; }
27470if test ${isc_cv_platform_havesalen+y}
27471then :
27472  printf %s "(cached) " >&6
27473else $as_nop
27474  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27475/* end confdefs.h.  */
27476
27477		#include <sys/types.h>
27478		#include <sys/socket.h>
27479
27480int
27481main (void)
27482{
27483
27484		extern struct sockaddr *ps;
27485		return ps->sa_len;
27486
27487
27488  ;
27489  return 0;
27490}
27491_ACEOF
27492if ac_fn_c_try_compile "$LINENO"
27493then :
27494  isc_cv_platform_havesalen=yes
27495else $as_nop
27496  isc_cv_platform_havesalen=no
27497
27498fi
27499rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27500
27501fi
27502{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_platform_havesalen" >&5
27503printf "%s\n" "$isc_cv_platform_havesalen" >&6; }
27504case "$isc_cv_platform_havesalen" in
27505 yes)
27506
27507printf "%s\n" "#define ISC_PLATFORM_HAVESALEN 1" >>confdefs.h
27508
27509esac
27510
27511# Check whether --enable-ipv6 was given.
27512if test ${enable_ipv6+y}
27513then :
27514  enableval=$enable_ipv6;
27515fi
27516
27517
27518case "$enable_ipv6" in
27519 yes|''|autodetect)
27520    case "$host" in
27521     powerpc-ibm-aix4*)
27522	;;
27523     *)
27524
27525printf "%s\n" "#define WANT_IPV6 1" >>confdefs.h
27526
27527	;;
27528    esac
27529    ;;
27530 no)
27531    ;;
27532esac
27533
27534
27535case "$host" in
27536 *-*-darwin*)
27537
27538printf "%s\n" "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
27539
27540esac
27541
27542
27543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5
27544printf %s "checking for IPv6 structures... " >&6; }
27545if test ${isc_cv_found_ipv6+y}
27546then :
27547  printf %s "(cached) " >&6
27548else $as_nop
27549  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27550/* end confdefs.h.  */
27551
27552		#include <sys/types.h>
27553		#include <sys/socket.h>
27554		#include <netinet/in.h>
27555
27556int
27557main (void)
27558{
27559
27560		struct sockaddr_in6 sin6;
27561
27562
27563  ;
27564  return 0;
27565}
27566_ACEOF
27567if ac_fn_c_try_compile "$LINENO"
27568then :
27569  isc_cv_found_ipv6=yes
27570else $as_nop
27571  isc_cv_found_ipv6=no
27572
27573fi
27574rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27575
27576fi
27577{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_found_ipv6" >&5
27578printf "%s\n" "$isc_cv_found_ipv6" >&6; }
27579
27580#
27581# See whether IPv6 support is provided via a Kame add-on.
27582# This is done before other IPv6 linking tests so LIBS is properly set.
27583#
27584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Kame IPv6 support" >&5
27585printf %s "checking for Kame IPv6 support... " >&6; }
27586
27587# Check whether --with-kame was given.
27588if test ${with_kame+y}
27589then :
27590  withval=$with_kame; use_kame="$withval"
27591else $as_nop
27592  use_kame="no"
27593
27594fi
27595
27596case "$use_kame" in
27597 no)
27598    ;;
27599 yes)
27600    kame_path=/usr/local/v6
27601    ;;
27602 *)
27603    kame_path="$use_kame"
27604    ;;
27605esac
27606case "$use_kame" in
27607 no)
27608    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
27609printf "%s\n" "no" >&6; }
27610    ;;
27611 *)
27612    if test -f $kame_path/lib/libinet6.a; then
27613	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kame_path/lib/libinet6.a" >&5
27614printf "%s\n" "$kame_path/lib/libinet6.a" >&6; }
27615	LIBS="-L$kame_path/lib -linet6 $LIBS"
27616    else
27617	as_fn_error $? "$kame_path/lib/libinet6.a not found.
27618
27619Please choose the proper path with the following command:
27620
27621    configure --with-kame=PATH
27622" "$LINENO" 5
27623    fi
27624    ;;
27625esac
27626
27627#
27628# Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
27629# Including it on Kame-using platforms is very bad, though, because
27630# Kame uses #error against direct inclusion.   So include it on only
27631# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
27632# This is done before the in6_pktinfo check because that's what
27633# netinet6/in6.h is needed for.
27634#
27635case "$host" in
27636 *-bsdi4.[01]*)
27637
27638printf "%s\n" "#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >>confdefs.h
27639
27640    isc_netinet6in6_hack="#include <netinet6/in6.h>"
27641    ;;
27642 *)
27643    isc_netinet6in6_hack=""
27644    ;;
27645esac
27646
27647#
27648# This is similar to the netinet6/in6.h issue.
27649#
27650case "$host" in
27651 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
27652
27653printf "%s\n" "#define ISC_PLATFORM_FIXIN6ISADDR 1" >>confdefs.h
27654
27655    isc_netinetin6_hack="#include <netinet/in6.h>"
27656    ;;
27657 *)
27658    isc_netinetin6_hack=""
27659    ;;
27660esac
27661
27662
27663case "$isc_cv_found_ipv6" in
27664 yes)
27665
27666printf "%s\n" "#define ISC_PLATFORM_HAVEIPV6 1" >>confdefs.h
27667
27668    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
27669printf %s "checking for in6_pktinfo... " >&6; }
27670if test ${isc_cv_have_in6_pktinfo+y}
27671then :
27672  printf %s "(cached) " >&6
27673else $as_nop
27674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27675/* end confdefs.h.  */
27676
27677		    #include <sys/types.h>
27678		    #include <sys/socket.h>
27679		    #include <netinet/in.h>
27680		    $isc_netinetin6_hack
27681		    $isc_netinet6in6_hack
27682
27683int
27684main (void)
27685{
27686
27687		    struct in6_pktinfo xyzzy;
27688
27689
27690  ;
27691  return 0;
27692}
27693_ACEOF
27694if ac_fn_c_try_compile "$LINENO"
27695then :
27696  isc_cv_have_in6_pktinfo=yes
27697else $as_nop
27698  isc_cv_have_in6_pktinfo=no
27699
27700fi
27701rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27702
27703fi
27704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6_pktinfo" >&5
27705printf "%s\n" "$isc_cv_have_in6_pktinfo" >&6; }
27706    case "$isc_cv_have_in6_pktinfo" in
27707     yes)
27708
27709printf "%s\n" "#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >>confdefs.h
27710
27711    esac
27712
27713
27714    # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
27715    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_in6.sin6_scope_id" >&5
27716printf %s "checking for sockaddr_in6.sin6_scope_id... " >&6; }
27717if test ${isc_cv_have_sin6_scope_id+y}
27718then :
27719  printf %s "(cached) " >&6
27720else $as_nop
27721  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27722/* end confdefs.h.  */
27723
27724		    #include <sys/types.h>
27725		    #include <sys/socket.h>
27726		    #include <netinet/in.h>
27727		    $isc_netinetin6_hack
27728		    $isc_netinet6in6_hack
27729
27730int
27731main (void)
27732{
27733
27734		    struct sockaddr_in6 xyzzy;
27735		    xyzzy.sin6_scope_id = 0;
27736
27737
27738  ;
27739  return 0;
27740}
27741_ACEOF
27742if ac_fn_c_try_compile "$LINENO"
27743then :
27744  isc_cv_have_sin6_scope_id=yes
27745else $as_nop
27746  isc_cv_have_sin6_scope_id=no
27747
27748fi
27749rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27750
27751fi
27752{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_sin6_scope_id" >&5
27753printf "%s\n" "$isc_cv_have_sin6_scope_id" >&6; }
27754
27755    case "$isc_cv_have_sin6_scope_id" in
27756     yes)
27757
27758printf "%s\n" "#define ISC_PLATFORM_HAVESCOPEID 1" >>confdefs.h
27759
27760    esac
27761esac
27762
27763
27764# We need this check run even without isc_cv_found_ipv6=yes
27765
27766{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
27767printf %s "checking for in6addr_any... " >&6; }
27768if test ${isc_cv_in6addr_any_links+y}
27769then :
27770  printf %s "(cached) " >&6
27771else $as_nop
27772
27773	SAVED_LIBS="$LIBS"
27774	LIBS="$LDADD_LIBNTP $LIBS"
27775	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27776/* end confdefs.h.  */
27777$ac_includes_default
27778		    #include <sys/socket.h>
27779		    #include <netinet/in.h>
27780		    $isc_netinetin6_hack
27781		    $isc_netinet6in6_hack
27782
27783int
27784main (void)
27785{
27786
27787		    printf("%x", in6addr_any.s6_addr[15]);
27788
27789
27790  ;
27791  return 0;
27792}
27793_ACEOF
27794if ac_fn_c_try_link "$LINENO"
27795then :
27796  isc_cv_in6addr_any_links=yes
27797else $as_nop
27798  isc_cv_in6addr_any_links=no
27799
27800fi
27801rm -f core conftest.err conftest.$ac_objext conftest.beam \
27802    conftest$ac_exeext conftest.$ac_ext
27803	LIBS="$SAVED_LIBS"
27804	{ SAVED_LIBS=; unset SAVED_LIBS;}
27805
27806
27807fi
27808{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
27809printf "%s\n" "$isc_cv_in6addr_any_links" >&6; }
27810
27811case "$isc_cv_in6addr_any_links" in
27812 no)
27813
27814printf "%s\n" "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
27815
27816esac
27817
27818
27819{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5
27820printf %s "checking for struct if_laddrconf... " >&6; }
27821if test ${isc_cv_struct_if_laddrconf+y}
27822then :
27823  printf %s "(cached) " >&6
27824else $as_nop
27825  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27826/* end confdefs.h.  */
27827
27828		#include <sys/types.h>
27829		#include <net/if6.h>
27830
27831int
27832main (void)
27833{
27834
27835		struct if_laddrconf a;
27836
27837
27838  ;
27839  return 0;
27840}
27841_ACEOF
27842if ac_fn_c_try_compile "$LINENO"
27843then :
27844  isc_cv_struct_if_laddrconf=yes
27845else $as_nop
27846  isc_cv_struct_if_laddrconf=no
27847
27848fi
27849rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27850
27851fi
27852{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrconf" >&5
27853printf "%s\n" "$isc_cv_struct_if_laddrconf" >&6; }
27854
27855case "$isc_cv_struct_if_laddrconf" in
27856 yes)
27857
27858printf "%s\n" "#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" >>confdefs.h
27859
27860esac
27861
27862{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
27863printf %s "checking for struct if_laddrreq... " >&6; }
27864if test ${isc_cv_struct_if_laddrreq+y}
27865then :
27866  printf %s "(cached) " >&6
27867else $as_nop
27868  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27869/* end confdefs.h.  */
27870
27871		#include <sys/types.h>
27872		#include <net/if6.h>
27873
27874int
27875main (void)
27876{
27877
27878		struct if_laddrreq a;
27879
27880
27881  ;
27882  return 0;
27883}
27884_ACEOF
27885if ac_fn_c_try_compile "$LINENO"
27886then :
27887  isc_cv_struct_if_laddrreq=yes
27888else $as_nop
27889  isc_cv_struct_if_laddrreq=no
27890
27891fi
27892rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27893
27894fi
27895{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrreq" >&5
27896printf "%s\n" "$isc_cv_struct_if_laddrreq" >&6; }
27897
27898case "$isc_cv_struct_if_laddrreq" in
27899 yes)
27900
27901printf "%s\n" "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
27902
27903esac
27904
27905{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
27906printf %s "checking for multicast IP support... " >&6; }
27907if test ${ntp_cv_multicast+y}
27908then :
27909  printf %s "(cached) " >&6
27910else $as_nop
27911
27912	ntp_cv_multicast=no
27913	case "$host" in
27914	 i386-sequent-sysv4)
27915	    ;;
27916	 *)
27917	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27918/* end confdefs.h.  */
27919
27920			#ifdef HAVE_NETINET_IN_H
27921			# include <netinet/in.h>
27922			#endif
27923
27924int
27925main (void)
27926{
27927
27928			struct ip_mreq ipmr;
27929			ipmr.imr_interface.s_addr = 0;
27930
27931
27932  ;
27933  return 0;
27934}
27935_ACEOF
27936if ac_fn_c_try_compile "$LINENO"
27937then :
27938  ntp_cv_multicast=yes
27939fi
27940rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27941	    ;;
27942	esac
27943
27944
27945fi
27946{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
27947printf "%s\n" "$ntp_cv_multicast" >&6; }
27948case "$ntp_cv_multicast" in
27949 yes)
27950
27951printf "%s\n" "#define MCAST 1" >>confdefs.h
27952
27953    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
27954printf %s "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
27955if test ${ntp_cv_typeof_ip_multicast_loop+y}
27956then :
27957  printf %s "(cached) " >&6
27958else $as_nop
27959
27960	    case "$host" in
27961	     *-*-netbsd*|*-*-*linux*)
27962		ntp_cv_typeof_ip_multicast_loop=u_int
27963		;;
27964	     *)
27965		ntp_cv_typeof_ip_multicast_loop=u_char
27966		;;
27967	    esac
27968
27969
27970fi
27971{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
27972printf "%s\n" "$ntp_cv_typeof_ip_multicast_loop" >&6; }
27973
27974printf "%s\n" "#define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop" >>confdefs.h
27975
27976esac
27977
27978# Check whether --enable-getifaddrs was given.
27979if test ${enable_getifaddrs+y}
27980then :
27981  enableval=$enable_getifaddrs; want_getifaddrs="$enableval"
27982else $as_nop
27983  want_getifaddrs="yes"
27984
27985fi
27986
27987
27988case $want_getifaddrs in
27989 glibc)
27990    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
27991printf "%s\n" "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
27992esac
27993case $want_getifaddrs in
27994 no)
27995    ;;
27996 *)
27997    SAVED_LIBS="$LIBS"
27998    LIBS="$LDADD_LIBNTP $LIBS"
27999    ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
28000if test "x$ac_cv_func_getifaddrs" = xyes
28001then :
28002  printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
28003
28004fi
28005
28006    LIBS="$SAVED_LIBS"
28007    { SAVED_LIBS=; unset SAVED_LIBS;}
28008    ;;
28009esac
28010
28011#
28012# Check for if_nametoindex() for IPv6 scoped addresses support
28013#
28014case "$host" in
28015 *-hp-hpux*)
28016    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
28017printf %s "checking for library containing if_nametoindex... " >&6; }
28018if test ${ac_cv_search_if_nametoindex+y}
28019then :
28020  printf %s "(cached) " >&6
28021else $as_nop
28022  ac_func_search_save_LIBS=$LIBS
28023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28024/* end confdefs.h.  */
28025
28026/* Override any GCC internal prototype to avoid an error.
28027   Use char because int might match the return type of a GCC
28028   builtin and then its argument prototype would still apply.  */
28029char if_nametoindex ();
28030int
28031main (void)
28032{
28033return if_nametoindex ();
28034  ;
28035  return 0;
28036}
28037_ACEOF
28038for ac_lib in '' ipv6
28039do
28040  if test -z "$ac_lib"; then
28041    ac_res="none required"
28042  else
28043    ac_res=-l$ac_lib
28044    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28045  fi
28046  if ac_fn_c_try_link "$LINENO"
28047then :
28048  ac_cv_search_if_nametoindex=$ac_res
28049fi
28050rm -f core conftest.err conftest.$ac_objext conftest.beam \
28051    conftest$ac_exeext
28052  if test ${ac_cv_search_if_nametoindex+y}
28053then :
28054  break
28055fi
28056done
28057if test ${ac_cv_search_if_nametoindex+y}
28058then :
28059
28060else $as_nop
28061  ac_cv_search_if_nametoindex=no
28062fi
28063rm conftest.$ac_ext
28064LIBS=$ac_func_search_save_LIBS
28065fi
28066{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
28067printf "%s\n" "$ac_cv_search_if_nametoindex" >&6; }
28068ac_res=$ac_cv_search_if_nametoindex
28069if test "$ac_res" != no
28070then :
28071  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28072
28073fi
28074
28075esac
28076SAVED_LIBS="$LIBS"
28077LIBS="$LDADD_LIBNTP $LIBS"
28078ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
28079if test "x$ac_cv_func_if_nametoindex" = xyes
28080then :
28081  printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
28082
28083fi
28084
28085LIBS="$SAVED_LIBS"
28086{ SAVED_LIBS=; unset SAVED_LIBS;}
28087case "$ac_cv_func_if_nametoindex" in
28088 yes)
28089
28090printf "%s\n" "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
28091
28092esac
28093
28094
28095
28096###
28097
28098# Hacks
28099# these need work if we're to move libntp under sntp
28100
28101printf "%s\n" "#define HAVE_NO_NICE 1" >>confdefs.h
28102
28103
28104printf "%s\n" "#define HAVE_TERMIOS 1" >>confdefs.h
28105
28106
28107# Checks for library functions.
28108ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
28109if test "x$ac_cv_func_socket" = xyes
28110then :
28111  printf "%s\n" "#define HAVE_SOCKET 1" >>confdefs.h
28112
28113fi
28114
28115
28116
28117# We may not need have_unity
28118have_unity=false
28119# Extract the first word of "ruby", so it can be a program name with args.
28120set dummy ruby; ac_word=$2
28121{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28122printf %s "checking for $ac_word... " >&6; }
28123if test ${ac_cv_path_PATH_RUBY+y}
28124then :
28125  printf %s "(cached) " >&6
28126else $as_nop
28127  case $PATH_RUBY in
28128  [\\/]* | ?:[\\/]*)
28129  ac_cv_path_PATH_RUBY="$PATH_RUBY" # Let the user override the test with a path.
28130  ;;
28131  *)
28132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28133for as_dir in $PATH
28134do
28135  IFS=$as_save_IFS
28136  case $as_dir in #(((
28137    '') as_dir=./ ;;
28138    */) ;;
28139    *) as_dir=$as_dir/ ;;
28140  esac
28141    for ac_exec_ext in '' $ac_executable_extensions; do
28142  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
28143    ac_cv_path_PATH_RUBY="$as_dir$ac_word$ac_exec_ext"
28144    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
28145    break 2
28146  fi
28147done
28148  done
28149IFS=$as_save_IFS
28150
28151  ;;
28152esac
28153fi
28154PATH_RUBY=$ac_cv_path_PATH_RUBY
28155if test -n "$PATH_RUBY"; then
28156  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_RUBY" >&5
28157printf "%s\n" "$PATH_RUBY" >&6; }
28158else
28159  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
28160printf "%s\n" "no" >&6; }
28161fi
28162
28163
28164case "$PATH_RUBY" in
28165 /*)
28166    have_unity=true
28167    ;;
28168 *) PATH_RUBY="false"
28169    ;;
28170esac
28171# We may not need UNITYBUILD_AVAILABLE
28172 if $have_unity; then
28173  UNITYBUILD_AVAILABLE_TRUE=
28174  UNITYBUILD_AVAILABLE_FALSE='#'
28175else
28176  UNITYBUILD_AVAILABLE_TRUE='#'
28177  UNITYBUILD_AVAILABLE_FALSE=
28178fi
28179
28180
28181
28182
28183
28184case "$build" in
28185 $host)	cross=0 ;;
28186 *)	cross=1 ;;
28187esac
28188
28189{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to enable tests with undiagnosed problems" >&5
28190printf %s "checking if we want to enable tests with undiagnosed problems... " >&6; }
28191# Check whether --enable-problem-tests was given.
28192if test ${enable_problem_tests+y}
28193then :
28194  enableval=$enable_problem_tests; sntp_ept=$enableval
28195else $as_nop
28196  sntp_ept=yes
28197
28198fi
28199
28200{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sntp_ept" >&5
28201printf "%s\n" "$sntp_ept" >&6; }
28202
28203{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can run test-kodDatabase" >&5
28204printf %s "checking if we can run test-kodDatabase... " >&6; }
28205sntp_test_kodDatabase="no"
28206case "$sntp_ept:$cross:$host" in
28207 no:0:*-apple-darwin12.6.0) ;;
28208 *) sntp_test_kodDatabase="yes" ;;
28209esac
28210{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sntp_test_kodDatabase" >&5
28211printf "%s\n" "$sntp_test_kodDatabase" >&6; }
28212 if test x$sntp_test_kodDatabase = xyes; then
28213  BUILD_TEST_KODDATABASE_TRUE=
28214  BUILD_TEST_KODDATABASE_FALSE='#'
28215else
28216  BUILD_TEST_KODDATABASE_TRUE='#'
28217  BUILD_TEST_KODDATABASE_FALSE=
28218fi
28219
28220
28221{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can run test-kodFile" >&5
28222printf %s "checking if we can run test-kodFile... " >&6; }
28223sntp_test_kodFile="no"
28224case "$sntp_ept:$cross:$host" in
28225 no:0:*-apple-darwin12.6.0) ;;
28226 *) sntp_test_kodFile="yes" ;;
28227esac
28228{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sntp_test_kodFile" >&5
28229printf "%s\n" "$sntp_test_kodFile" >&6; }
28230 if test x$sntp_test_kodFile = xyes; then
28231  BUILD_TEST_KODFILE_TRUE=
28232  BUILD_TEST_KODFILE_FALSE='#'
28233else
28234  BUILD_TEST_KODFILE_TRUE='#'
28235  BUILD_TEST_KODFILE_FALSE=
28236fi
28237
28238
28239
28240
28241# All libraries should be in various LIB_* variables now.
28242#LIBS=
28243# Sadly not.  There is a gettext() check somewhere, and on Solaris this pulls
28244# in -lintl -lgen, outside our "scope".
28245
28246ac_config_files="$ac_config_files Makefile"
28247
28248ac_config_files="$ac_config_files include/Makefile"
28249
28250ac_config_files="$ac_config_files scripts/Makefile"
28251
28252ac_config_files="$ac_config_files tests/Makefile"
28253
28254ac_config_files="$ac_config_files tests/fileHandlingTest.h"
28255
28256ac_config_files="$ac_config_files unity/Makefile"
28257
28258
28259cat >confcache <<\_ACEOF
28260# This file is a shell script that caches the results of configure
28261# tests run on this system so they can be shared between configure
28262# scripts and configure runs, see configure's option --config-cache.
28263# It is not useful on other systems.  If it contains results you don't
28264# want to keep, you may remove or edit it.
28265#
28266# config.status only pays attention to the cache file if you give it
28267# the --recheck option to rerun configure.
28268#
28269# `ac_cv_env_foo' variables (set or unset) will be overridden when
28270# loading this file, other *unset* `ac_cv_foo' will be assigned the
28271# following values.
28272
28273_ACEOF
28274
28275# The following way of writing the cache mishandles newlines in values,
28276# but we know of no workaround that is simple, portable, and efficient.
28277# So, we kill variables containing newlines.
28278# Ultrix sh set writes to stderr and can't be redirected directly,
28279# and sets the high bit in the cache file unless we assign to the vars.
28280(
28281  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
28282    eval ac_val=\$$ac_var
28283    case $ac_val in #(
28284    *${as_nl}*)
28285      case $ac_var in #(
28286      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
28287printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
28288      esac
28289      case $ac_var in #(
28290      _ | IFS | as_nl) ;; #(
28291      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
28292      *) { eval $ac_var=; unset $ac_var;} ;;
28293      esac ;;
28294    esac
28295  done
28296
28297  (set) 2>&1 |
28298    case $as_nl`(ac_space=' '; set) 2>&1` in #(
28299    *${as_nl}ac_space=\ *)
28300      # `set' does not quote correctly, so add quotes: double-quote
28301      # substitution turns \\\\ into \\, and sed turns \\ into \.
28302      sed -n \
28303	"s/'/'\\\\''/g;
28304	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28305      ;; #(
28306    *)
28307      # `set' quotes correctly as required by POSIX, so do not add quotes.
28308      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
28309      ;;
28310    esac |
28311    sort
28312) |
28313  sed '
28314     /^ac_cv_env_/b end
28315     t clear
28316     :clear
28317     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
28318     t end
28319     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28320     :end' >>confcache
28321if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
28322  if test -w "$cache_file"; then
28323    if test "x$cache_file" != "x/dev/null"; then
28324      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
28325printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
28326      if test ! -f "$cache_file" || test -h "$cache_file"; then
28327	cat confcache >"$cache_file"
28328      else
28329        case $cache_file in #(
28330        */* | ?:*)
28331	  mv -f confcache "$cache_file"$$ &&
28332	  mv -f "$cache_file"$$ "$cache_file" ;; #(
28333        *)
28334	  mv -f confcache "$cache_file" ;;
28335	esac
28336      fi
28337    fi
28338  else
28339    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
28340printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
28341  fi
28342fi
28343rm -f confcache
28344
28345test "x$prefix" = xNONE && prefix=$ac_default_prefix
28346# Let make expand exec_prefix.
28347test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28348
28349DEFS=-DHAVE_CONFIG_H
28350
28351ac_libobjs=
28352ac_ltlibobjs=
28353U=
28354for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
28355  # 1. Remove the extension, and $U if already installed.
28356  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
28357  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
28358  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
28359  #    will be set to the directory where LIBOBJS objects are built.
28360  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
28361  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
28362done
28363LIBOBJS=$ac_libobjs
28364
28365LTLIBOBJS=$ac_ltlibobjs
28366
28367
28368{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
28369printf %s "checking that generated files are newer than configure... " >&6; }
28370   if test -n "$am_sleep_pid"; then
28371     # Hide warnings about reused PIDs.
28372     wait $am_sleep_pid 2>/dev/null
28373   fi
28374   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
28375printf "%s\n" "done" >&6; }
28376 if test -n "$EXEEXT"; then
28377  am__EXEEXT_TRUE=
28378  am__EXEEXT_FALSE='#'
28379else
28380  am__EXEEXT_TRUE='#'
28381  am__EXEEXT_FALSE=
28382fi
28383
28384if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
28385  as_fn_error $? "conditional \"AMDEP\" was never defined.
28386Usually this means the macro was only invoked conditionally." "$LINENO" 5
28387fi
28388if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
28389  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
28390Usually this means the macro was only invoked conditionally." "$LINENO" 5
28391fi
28392
28393if test -z "${WANT_CALC_TICKADJ_MS_TRUE}" && test -z "${WANT_CALC_TICKADJ_MS_FALSE}"; then
28394  as_fn_error $? "conditional \"WANT_CALC_TICKADJ_MS\" was never defined.
28395Usually this means the macro was only invoked conditionally." "$LINENO" 5
28396fi
28397if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; then
28398  as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
28399Usually this means the macro was only invoked conditionally." "$LINENO" 5
28400fi
28401if test -z "${INSTALL_UPDATE_LEAP_TRUE}" && test -z "${INSTALL_UPDATE_LEAP_FALSE}"; then
28402  as_fn_error $? "conditional \"INSTALL_UPDATE_LEAP\" was never defined.
28403Usually this means the macro was only invoked conditionally." "$LINENO" 5
28404fi
28405if test -z "${NTP_CROSSCOMPILE_TRUE}" && test -z "${NTP_CROSSCOMPILE_FALSE}"; then
28406  as_fn_error $? "conditional \"NTP_CROSSCOMPILE\" was never defined.
28407Usually this means the macro was only invoked conditionally." "$LINENO" 5
28408fi
28409if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
28410  as_fn_error $? "conditional \"PTHREADS\" was never defined.
28411Usually this means the macro was only invoked conditionally." "$LINENO" 5
28412fi
28413if test -z "${LIBNTP_SUBMAKES_TRUE}" && test -z "${LIBNTP_SUBMAKES_FALSE}"; then
28414  as_fn_error $? "conditional \"LIBNTP_SUBMAKES\" was never defined.
28415Usually this means the macro was only invoked conditionally." "$LINENO" 5
28416fi
28417if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then
28418  as_fn_error $? "conditional \"BUILD_SNTP\" was never defined.
28419Usually this means the macro was only invoked conditionally." "$LINENO" 5
28420fi
28421if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
28422  as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
28423Usually this means the macro was only invoked conditionally." "$LINENO" 5
28424fi
28425if test -z "${INSTALL_LIBOPTS_TRUE}" && test -z "${INSTALL_LIBOPTS_FALSE}"; then
28426  as_fn_error $? "conditional \"INSTALL_LIBOPTS\" was never defined.
28427Usually this means the macro was only invoked conditionally." "$LINENO" 5
28428fi
28429if test -z "${NEED_LIBOPTS_TRUE}" && test -z "${NEED_LIBOPTS_FALSE}"; then
28430  as_fn_error $? "conditional \"NEED_LIBOPTS\" was never defined.
28431Usually this means the macro was only invoked conditionally." "$LINENO" 5
28432fi
28433if test -z "${BUILD_LIBEVENT_TRUE}" && test -z "${BUILD_LIBEVENT_FALSE}"; then
28434  as_fn_error $? "conditional \"BUILD_LIBEVENT\" was never defined.
28435Usually this means the macro was only invoked conditionally." "$LINENO" 5
28436fi
28437if test -z "${UNITYBUILD_AVAILABLE_TRUE}" && test -z "${UNITYBUILD_AVAILABLE_FALSE}"; then
28438  as_fn_error $? "conditional \"UNITYBUILD_AVAILABLE\" was never defined.
28439Usually this means the macro was only invoked conditionally." "$LINENO" 5
28440fi
28441if test -z "${BUILD_TEST_KODDATABASE_TRUE}" && test -z "${BUILD_TEST_KODDATABASE_FALSE}"; then
28442  as_fn_error $? "conditional \"BUILD_TEST_KODDATABASE\" was never defined.
28443Usually this means the macro was only invoked conditionally." "$LINENO" 5
28444fi
28445if test -z "${BUILD_TEST_KODFILE_TRUE}" && test -z "${BUILD_TEST_KODFILE_FALSE}"; then
28446  as_fn_error $? "conditional \"BUILD_TEST_KODFILE\" was never defined.
28447Usually this means the macro was only invoked conditionally." "$LINENO" 5
28448fi
28449
28450: "${CONFIG_STATUS=./config.status}"
28451ac_write_fail=0
28452ac_clean_files_save=$ac_clean_files
28453ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28454{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
28455printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
28456as_write_fail=0
28457cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
28458#! $SHELL
28459# Generated by $as_me.
28460# Run this file to recreate the current configuration.
28461# Compiler output produced by configure, useful for debugging
28462# configure, is in config.log if it exists.
28463
28464debug=false
28465ac_cs_recheck=false
28466ac_cs_silent=false
28467
28468SHELL=\${CONFIG_SHELL-$SHELL}
28469export SHELL
28470_ASEOF
28471cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
28472## -------------------- ##
28473## M4sh Initialization. ##
28474## -------------------- ##
28475
28476# Be more Bourne compatible
28477DUALCASE=1; export DUALCASE # for MKS sh
28478as_nop=:
28479if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
28480then :
28481  emulate sh
28482  NULLCMD=:
28483  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
28484  # is contrary to our usage.  Disable this feature.
28485  alias -g '${1+"$@"}'='"$@"'
28486  setopt NO_GLOB_SUBST
28487else $as_nop
28488  case `(set -o) 2>/dev/null` in #(
28489  *posix*) :
28490    set -o posix ;; #(
28491  *) :
28492     ;;
28493esac
28494fi
28495
28496
28497
28498# Reset variables that may have inherited troublesome values from
28499# the environment.
28500
28501# IFS needs to be set, to space, tab, and newline, in precisely that order.
28502# (If _AS_PATH_WALK were called with IFS unset, it would have the
28503# side effect of setting IFS to empty, thus disabling word splitting.)
28504# Quoting is to prevent editors from complaining about space-tab.
28505as_nl='
28506'
28507export as_nl
28508IFS=" ""	$as_nl"
28509
28510PS1='$ '
28511PS2='> '
28512PS4='+ '
28513
28514# Ensure predictable behavior from utilities with locale-dependent output.
28515LC_ALL=C
28516export LC_ALL
28517LANGUAGE=C
28518export LANGUAGE
28519
28520# We cannot yet rely on "unset" to work, but we need these variables
28521# to be unset--not just set to an empty or harmless value--now, to
28522# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
28523# also avoids known problems related to "unset" and subshell syntax
28524# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
28525for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
28526do eval test \${$as_var+y} \
28527  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
28528done
28529
28530# Ensure that fds 0, 1, and 2 are open.
28531if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
28532if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
28533if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
28534
28535# The user is always right.
28536if ${PATH_SEPARATOR+false} :; then
28537  PATH_SEPARATOR=:
28538  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
28539    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
28540      PATH_SEPARATOR=';'
28541  }
28542fi
28543
28544
28545# Find who we are.  Look in the path if we contain no directory separator.
28546as_myself=
28547case $0 in #((
28548  *[\\/]* ) as_myself=$0 ;;
28549  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28550for as_dir in $PATH
28551do
28552  IFS=$as_save_IFS
28553  case $as_dir in #(((
28554    '') as_dir=./ ;;
28555    */) ;;
28556    *) as_dir=$as_dir/ ;;
28557  esac
28558    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
28559  done
28560IFS=$as_save_IFS
28561
28562     ;;
28563esac
28564# We did not find ourselves, most probably we were run as `sh COMMAND'
28565# in which case we are not to be found in the path.
28566if test "x$as_myself" = x; then
28567  as_myself=$0
28568fi
28569if test ! -f "$as_myself"; then
28570  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
28571  exit 1
28572fi
28573
28574
28575
28576# as_fn_error STATUS ERROR [LINENO LOG_FD]
28577# ----------------------------------------
28578# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
28579# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
28580# script with STATUS, using 1 if that was 0.
28581as_fn_error ()
28582{
28583  as_status=$1; test $as_status -eq 0 && as_status=1
28584  if test "$4"; then
28585    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
28586    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
28587  fi
28588  printf "%s\n" "$as_me: error: $2" >&2
28589  as_fn_exit $as_status
28590} # as_fn_error
28591
28592
28593
28594# as_fn_set_status STATUS
28595# -----------------------
28596# Set $? to STATUS, without forking.
28597as_fn_set_status ()
28598{
28599  return $1
28600} # as_fn_set_status
28601
28602# as_fn_exit STATUS
28603# -----------------
28604# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
28605as_fn_exit ()
28606{
28607  set +e
28608  as_fn_set_status $1
28609  exit $1
28610} # as_fn_exit
28611
28612# as_fn_unset VAR
28613# ---------------
28614# Portably unset VAR.
28615as_fn_unset ()
28616{
28617  { eval $1=; unset $1;}
28618}
28619as_unset=as_fn_unset
28620
28621# as_fn_append VAR VALUE
28622# ----------------------
28623# Append the text in VALUE to the end of the definition contained in VAR. Take
28624# advantage of any shell optimizations that allow amortized linear growth over
28625# repeated appends, instead of the typical quadratic growth present in naive
28626# implementations.
28627if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
28628then :
28629  eval 'as_fn_append ()
28630  {
28631    eval $1+=\$2
28632  }'
28633else $as_nop
28634  as_fn_append ()
28635  {
28636    eval $1=\$$1\$2
28637  }
28638fi # as_fn_append
28639
28640# as_fn_arith ARG...
28641# ------------------
28642# Perform arithmetic evaluation on the ARGs, and store the result in the
28643# global $as_val. Take advantage of shells that can avoid forks. The arguments
28644# must be portable across $(()) and expr.
28645if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
28646then :
28647  eval 'as_fn_arith ()
28648  {
28649    as_val=$(( $* ))
28650  }'
28651else $as_nop
28652  as_fn_arith ()
28653  {
28654    as_val=`expr "$@" || test $? -eq 1`
28655  }
28656fi # as_fn_arith
28657
28658
28659if expr a : '\(a\)' >/dev/null 2>&1 &&
28660   test "X`expr 00001 : '.*\(...\)'`" = X001; then
28661  as_expr=expr
28662else
28663  as_expr=false
28664fi
28665
28666if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
28667  as_basename=basename
28668else
28669  as_basename=false
28670fi
28671
28672if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28673  as_dirname=dirname
28674else
28675  as_dirname=false
28676fi
28677
28678as_me=`$as_basename -- "$0" ||
28679$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
28680	 X"$0" : 'X\(//\)$' \| \
28681	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
28682printf "%s\n" X/"$0" |
28683    sed '/^.*\/\([^/][^/]*\)\/*$/{
28684	    s//\1/
28685	    q
28686	  }
28687	  /^X\/\(\/\/\)$/{
28688	    s//\1/
28689	    q
28690	  }
28691	  /^X\/\(\/\).*/{
28692	    s//\1/
28693	    q
28694	  }
28695	  s/.*/./; q'`
28696
28697# Avoid depending upon Character Ranges.
28698as_cr_letters='abcdefghijklmnopqrstuvwxyz'
28699as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
28700as_cr_Letters=$as_cr_letters$as_cr_LETTERS
28701as_cr_digits='0123456789'
28702as_cr_alnum=$as_cr_Letters$as_cr_digits
28703
28704
28705# Determine whether it's possible to make 'echo' print without a newline.
28706# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
28707# for compatibility with existing Makefiles.
28708ECHO_C= ECHO_N= ECHO_T=
28709case `echo -n x` in #(((((
28710-n*)
28711  case `echo 'xy\c'` in
28712  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
28713  xy)  ECHO_C='\c';;
28714  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
28715       ECHO_T='	';;
28716  esac;;
28717*)
28718  ECHO_N='-n';;
28719esac
28720
28721# For backward compatibility with old third-party macros, we provide
28722# the shell variables $as_echo and $as_echo_n.  New code should use
28723# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
28724as_echo='printf %s\n'
28725as_echo_n='printf %s'
28726
28727rm -f conf$$ conf$$.exe conf$$.file
28728if test -d conf$$.dir; then
28729  rm -f conf$$.dir/conf$$.file
28730else
28731  rm -f conf$$.dir
28732  mkdir conf$$.dir 2>/dev/null
28733fi
28734if (echo >conf$$.file) 2>/dev/null; then
28735  if ln -s conf$$.file conf$$ 2>/dev/null; then
28736    as_ln_s='ln -s'
28737    # ... but there are two gotchas:
28738    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
28739    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28740    # In both cases, we have to default to `cp -pR'.
28741    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
28742      as_ln_s='cp -pR'
28743  elif ln conf$$.file conf$$ 2>/dev/null; then
28744    as_ln_s=ln
28745  else
28746    as_ln_s='cp -pR'
28747  fi
28748else
28749  as_ln_s='cp -pR'
28750fi
28751rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28752rmdir conf$$.dir 2>/dev/null
28753
28754
28755# as_fn_mkdir_p
28756# -------------
28757# Create "$as_dir" as a directory, including parents if necessary.
28758as_fn_mkdir_p ()
28759{
28760
28761  case $as_dir in #(
28762  -*) as_dir=./$as_dir;;
28763  esac
28764  test -d "$as_dir" || eval $as_mkdir_p || {
28765    as_dirs=
28766    while :; do
28767      case $as_dir in #(
28768      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
28769      *) as_qdir=$as_dir;;
28770      esac
28771      as_dirs="'$as_qdir' $as_dirs"
28772      as_dir=`$as_dirname -- "$as_dir" ||
28773$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28774	 X"$as_dir" : 'X\(//\)[^/]' \| \
28775	 X"$as_dir" : 'X\(//\)$' \| \
28776	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
28777printf "%s\n" X"$as_dir" |
28778    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28779	    s//\1/
28780	    q
28781	  }
28782	  /^X\(\/\/\)[^/].*/{
28783	    s//\1/
28784	    q
28785	  }
28786	  /^X\(\/\/\)$/{
28787	    s//\1/
28788	    q
28789	  }
28790	  /^X\(\/\).*/{
28791	    s//\1/
28792	    q
28793	  }
28794	  s/.*/./; q'`
28795      test -d "$as_dir" && break
28796    done
28797    test -z "$as_dirs" || eval "mkdir $as_dirs"
28798  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
28799
28800
28801} # as_fn_mkdir_p
28802if mkdir -p . 2>/dev/null; then
28803  as_mkdir_p='mkdir -p "$as_dir"'
28804else
28805  test -d ./-p && rmdir ./-p
28806  as_mkdir_p=false
28807fi
28808
28809
28810# as_fn_executable_p FILE
28811# -----------------------
28812# Test if FILE is an executable regular file.
28813as_fn_executable_p ()
28814{
28815  test -f "$1" && test -x "$1"
28816} # as_fn_executable_p
28817as_test_x='test -x'
28818as_executable_p=as_fn_executable_p
28819
28820# Sed expression to map a string onto a valid CPP name.
28821as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
28822
28823# Sed expression to map a string onto a valid variable name.
28824as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
28825
28826
28827exec 6>&1
28828## ----------------------------------- ##
28829## Main body of $CONFIG_STATUS script. ##
28830## ----------------------------------- ##
28831_ASEOF
28832test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
28833
28834cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28835# Save the log message, to keep $0 and so on meaningful, and to
28836# report actual input values of CONFIG_FILES etc. instead of their
28837# values after options handling.
28838ac_log="
28839This file was extended by sntp $as_me 4.2.8p18, which was
28840generated by GNU Autoconf 2.71.  Invocation command line was
28841
28842  CONFIG_FILES    = $CONFIG_FILES
28843  CONFIG_HEADERS  = $CONFIG_HEADERS
28844  CONFIG_LINKS    = $CONFIG_LINKS
28845  CONFIG_COMMANDS = $CONFIG_COMMANDS
28846  $ $0 $@
28847
28848on `(hostname || uname -n) 2>/dev/null | sed 1q`
28849"
28850
28851_ACEOF
28852
28853case $ac_config_files in *"
28854"*) set x $ac_config_files; shift; ac_config_files=$*;;
28855esac
28856
28857case $ac_config_headers in *"
28858"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
28859esac
28860
28861
28862cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28863# Files that config.status was made for.
28864config_files="$ac_config_files"
28865config_headers="$ac_config_headers"
28866config_commands="$ac_config_commands"
28867
28868_ACEOF
28869
28870cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28871ac_cs_usage="\
28872\`$as_me' instantiates files and other configuration actions
28873from templates according to the current configuration.  Unless the files
28874and actions are specified as TAGs, all are instantiated by default.
28875
28876Usage: $0 [OPTION]... [TAG]...
28877
28878  -h, --help       print this help, then exit
28879  -V, --version    print version number and configuration settings, then exit
28880      --config     print configuration, then exit
28881  -q, --quiet, --silent
28882                   do not print progress messages
28883  -d, --debug      don't remove temporary files
28884      --recheck    update $as_me by reconfiguring in the same conditions
28885      --file=FILE[:TEMPLATE]
28886                   instantiate the configuration file FILE
28887      --header=FILE[:TEMPLATE]
28888                   instantiate the configuration header FILE
28889
28890Configuration files:
28891$config_files
28892
28893Configuration headers:
28894$config_headers
28895
28896Configuration commands:
28897$config_commands
28898
28899Report bugs to <https://bugs.ntp.org/>.
28900sntp home page: <https://www.ntp.org/>."
28901
28902_ACEOF
28903ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
28904ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
28905cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28906ac_cs_config='$ac_cs_config_escaped'
28907ac_cs_version="\\
28908sntp config.status 4.2.8p18
28909configured by $0, generated by GNU Autoconf 2.71,
28910  with options \\"\$ac_cs_config\\"
28911
28912Copyright (C) 2021 Free Software Foundation, Inc.
28913This config.status script is free software; the Free Software Foundation
28914gives unlimited permission to copy, distribute and modify it."
28915
28916ac_pwd='$ac_pwd'
28917srcdir='$srcdir'
28918INSTALL='$INSTALL'
28919MKDIR_P='$MKDIR_P'
28920AWK='$AWK'
28921test -n "\$AWK" || AWK=awk
28922_ACEOF
28923
28924cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28925# The default lists apply if the user does not specify any file.
28926ac_need_defaults=:
28927while test $# != 0
28928do
28929  case $1 in
28930  --*=?*)
28931    ac_option=`expr "X$1" : 'X\([^=]*\)='`
28932    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
28933    ac_shift=:
28934    ;;
28935  --*=)
28936    ac_option=`expr "X$1" : 'X\([^=]*\)='`
28937    ac_optarg=
28938    ac_shift=:
28939    ;;
28940  *)
28941    ac_option=$1
28942    ac_optarg=$2
28943    ac_shift=shift
28944    ;;
28945  esac
28946
28947  case $ac_option in
28948  # Handling of the options.
28949  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28950    ac_cs_recheck=: ;;
28951  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
28952    printf "%s\n" "$ac_cs_version"; exit ;;
28953  --config | --confi | --conf | --con | --co | --c )
28954    printf "%s\n" "$ac_cs_config"; exit ;;
28955  --debug | --debu | --deb | --de | --d | -d )
28956    debug=: ;;
28957  --file | --fil | --fi | --f )
28958    $ac_shift
28959    case $ac_optarg in
28960    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
28961    '') as_fn_error $? "missing file argument" ;;
28962    esac
28963    as_fn_append CONFIG_FILES " '$ac_optarg'"
28964    ac_need_defaults=false;;
28965  --header | --heade | --head | --hea )
28966    $ac_shift
28967    case $ac_optarg in
28968    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
28969    esac
28970    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
28971    ac_need_defaults=false;;
28972  --he | --h)
28973    # Conflict between --help and --header
28974    as_fn_error $? "ambiguous option: \`$1'
28975Try \`$0 --help' for more information.";;
28976  --help | --hel | -h )
28977    printf "%s\n" "$ac_cs_usage"; exit ;;
28978  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28979  | -silent | --silent | --silen | --sile | --sil | --si | --s)
28980    ac_cs_silent=: ;;
28981
28982  # This is an error.
28983  -*) as_fn_error $? "unrecognized option: \`$1'
28984Try \`$0 --help' for more information." ;;
28985
28986  *) as_fn_append ac_config_targets " $1"
28987     ac_need_defaults=false ;;
28988
28989  esac
28990  shift
28991done
28992
28993ac_configure_extra_args=
28994
28995if $ac_cs_silent; then
28996  exec 6>/dev/null
28997  ac_configure_extra_args="$ac_configure_extra_args --silent"
28998fi
28999
29000_ACEOF
29001cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29002if \$ac_cs_recheck; then
29003  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
29004  shift
29005  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
29006  CONFIG_SHELL='$SHELL'
29007  export CONFIG_SHELL
29008  exec "\$@"
29009fi
29010
29011_ACEOF
29012cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29013exec 5>>config.log
29014{
29015  echo
29016  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29017## Running $as_me. ##
29018_ASBOX
29019  printf "%s\n" "$ac_log"
29020} >&5
29021
29022_ACEOF
29023cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29024#
29025# INIT-COMMANDS
29026#
29027AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
29028
29029
29030# The HP-UX ksh and POSIX shell print the target directory to stdout
29031# if CDPATH is set.
29032(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29033
29034sed_quote_subst='$sed_quote_subst'
29035double_quote_subst='$double_quote_subst'
29036delay_variable_subst='$delay_variable_subst'
29037SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
29038Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
29039GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
29040EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
29041FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
29042SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
29043ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
29044LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
29045macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
29046macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
29047enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
29048enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
29049pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
29050enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
29051shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
29052PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
29053host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
29054host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
29055host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
29056build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
29057build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
29058build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
29059NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
29060LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
29061max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
29062ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
29063exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
29064lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
29065lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
29066lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
29067lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
29068lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
29069reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
29070reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
29071OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
29072deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
29073file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
29074file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
29075want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
29076DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
29077sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
29078AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
29079AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
29080archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
29081STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
29082RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
29083old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
29084old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
29085old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
29086lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
29087CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
29088CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
29089compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
29090GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
29091lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
29092lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
29093lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
29094lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
29095lt_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"`'
29096lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
29097nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
29098lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
29099lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
29100objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
29101MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
29102lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
29103lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
29104lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
29105lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
29106lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
29107need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
29108MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
29109DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
29110NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
29111LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
29112OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
29113OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
29114libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
29115shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
29116extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
29117archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
29118enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
29119export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
29120whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
29121compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
29122old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
29123old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
29124archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
29125archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
29126module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
29127module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
29128with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
29129allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
29130no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
29131hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
29132hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
29133hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
29134hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
29135hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
29136hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
29137hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
29138inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
29139link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
29140always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
29141export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
29142exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
29143include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
29144prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
29145postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
29146file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
29147variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
29148need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
29149need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
29150version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
29151runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
29152shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
29153shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
29154libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
29155library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
29156soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
29157install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
29158postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
29159postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
29160finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
29161finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
29162hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
29163sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
29164configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
29165configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
29166hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
29167enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
29168enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
29169enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
29170old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
29171striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
29172
29173LTCC='$LTCC'
29174LTCFLAGS='$LTCFLAGS'
29175compiler='$compiler_DEFAULT'
29176
29177# A function that is used when there is no print builtin or printf.
29178func_fallback_echo ()
29179{
29180  eval 'cat <<_LTECHO_EOF
29181\$1
29182_LTECHO_EOF'
29183}
29184
29185# Quote evaled strings.
29186for var in SED \
29187GREP \
29188EGREP \
29189FGREP \
29190SHELL \
29191ECHO \
29192LD \
29193PATH_SEPARATOR \
29194NM \
29195LN_S \
29196lt_SP2NL \
29197lt_NL2SP \
29198reload_flag \
29199OBJDUMP \
29200deplibs_check_method \
29201file_magic_cmd \
29202file_magic_glob \
29203want_nocaseglob \
29204DLLTOOL \
29205sharedlib_from_linklib_cmd \
29206AR \
29207AR_FLAGS \
29208archiver_list_spec \
29209STRIP \
29210RANLIB \
29211CC \
29212CFLAGS \
29213compiler \
29214lt_cv_sys_global_symbol_pipe \
29215lt_cv_sys_global_symbol_to_cdecl \
29216lt_cv_sys_global_symbol_to_import \
29217lt_cv_sys_global_symbol_to_c_name_address \
29218lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
29219lt_cv_nm_interface \
29220nm_file_list_spec \
29221lt_cv_truncate_bin \
29222lt_prog_compiler_no_builtin_flag \
29223lt_prog_compiler_pic \
29224lt_prog_compiler_wl \
29225lt_prog_compiler_static \
29226lt_cv_prog_compiler_c_o \
29227need_locks \
29228MANIFEST_TOOL \
29229DSYMUTIL \
29230NMEDIT \
29231LIPO \
29232OTOOL \
29233OTOOL64 \
29234shrext_cmds \
29235export_dynamic_flag_spec \
29236whole_archive_flag_spec \
29237compiler_needs_object \
29238with_gnu_ld \
29239allow_undefined_flag \
29240no_undefined_flag \
29241hardcode_libdir_flag_spec \
29242hardcode_libdir_separator \
29243exclude_expsyms \
29244include_expsyms \
29245file_list_spec \
29246variables_saved_for_relink \
29247libname_spec \
29248library_names_spec \
29249soname_spec \
29250install_override_mode \
29251finish_eval \
29252old_striplib \
29253striplib; do
29254    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
29255    *[\\\\\\\`\\"\\\$]*)
29256      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
29257      ;;
29258    *)
29259      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
29260      ;;
29261    esac
29262done
29263
29264# Double-quote double-evaled strings.
29265for var in reload_cmds \
29266old_postinstall_cmds \
29267old_postuninstall_cmds \
29268old_archive_cmds \
29269extract_expsyms_cmds \
29270old_archive_from_new_cmds \
29271old_archive_from_expsyms_cmds \
29272archive_cmds \
29273archive_expsym_cmds \
29274module_cmds \
29275module_expsym_cmds \
29276export_symbols_cmds \
29277prelink_cmds \
29278postlink_cmds \
29279postinstall_cmds \
29280postuninstall_cmds \
29281finish_cmds \
29282sys_lib_search_path_spec \
29283configure_time_dlsearch_path \
29284configure_time_lt_sys_library_path; do
29285    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
29286    *[\\\\\\\`\\"\\\$]*)
29287      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
29288      ;;
29289    *)
29290      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
29291      ;;
29292    esac
29293done
29294
29295ac_aux_dir='$ac_aux_dir'
29296
29297# See if we are running on zsh, and set the options that allow our
29298# commands through without removal of \ escapes INIT.
29299if test -n "\${ZSH_VERSION+set}"; then
29300   setopt NO_GLOB_SUBST
29301fi
29302
29303
29304    PACKAGE='$PACKAGE'
29305    VERSION='$VERSION'
29306    RM='$RM'
29307    ofile='$ofile'
29308
29309
29310
29311
29312_ACEOF
29313
29314cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29315
29316# Handling of arguments.
29317for ac_config_target in $ac_config_targets
29318do
29319  case $ac_config_target in
29320    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
29321    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
29322    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
29323    "libopts/Makefile") CONFIG_FILES="$CONFIG_FILES libopts/Makefile" ;;
29324    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29325    "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
29326    "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
29327    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
29328    "tests/fileHandlingTest.h") CONFIG_FILES="$CONFIG_FILES tests/fileHandlingTest.h" ;;
29329    "unity/Makefile") CONFIG_FILES="$CONFIG_FILES unity/Makefile" ;;
29330
29331  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
29332  esac
29333done
29334
29335
29336# If the user did not use the arguments to specify the items to instantiate,
29337# then the envvar interface is used.  Set only those that are not.
29338# We use the long form for the default assignment because of an extremely
29339# bizarre bug on SunOS 4.1.3.
29340if $ac_need_defaults; then
29341  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
29342  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
29343  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
29344fi
29345
29346# Have a temporary directory for convenience.  Make it in the build tree
29347# simply because there is no reason against having it here, and in addition,
29348# creating and moving files from /tmp can sometimes cause problems.
29349# Hook for its removal unless debugging.
29350# Note that there is a small window in which the directory will not be cleaned:
29351# after its creation but before its name has been assigned to `$tmp'.
29352$debug ||
29353{
29354  tmp= ac_tmp=
29355  trap 'exit_status=$?
29356  : "${ac_tmp:=$tmp}"
29357  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
29358' 0
29359  trap 'as_fn_exit 1' 1 2 13 15
29360}
29361# Create a (secure) tmp directory for tmp files.
29362
29363{
29364  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
29365  test -d "$tmp"
29366}  ||
29367{
29368  tmp=./conf$$-$RANDOM
29369  (umask 077 && mkdir "$tmp")
29370} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
29371ac_tmp=$tmp
29372
29373# Set up the scripts for CONFIG_FILES section.
29374# No need to generate them if there are no CONFIG_FILES.
29375# This happens for instance with `./config.status config.h'.
29376if test -n "$CONFIG_FILES"; then
29377
29378
29379ac_cr=`echo X | tr X '\015'`
29380# On cygwin, bash can eat \r inside `` if the user requested igncr.
29381# But we know of no other shell where ac_cr would be empty at this
29382# point, so we can use a bashism as a fallback.
29383if test "x$ac_cr" = x; then
29384  eval ac_cr=\$\'\\r\'
29385fi
29386ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29387if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
29388  ac_cs_awk_cr='\\r'
29389else
29390  ac_cs_awk_cr=$ac_cr
29391fi
29392
29393echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
29394_ACEOF
29395
29396
29397{
29398  echo "cat >conf$$subs.awk <<_ACEOF" &&
29399  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29400  echo "_ACEOF"
29401} >conf$$subs.sh ||
29402  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29403ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
29404ac_delim='%!_!# '
29405for ac_last_try in false false false false false :; do
29406  . ./conf$$subs.sh ||
29407    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29408
29409  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29410  if test $ac_delim_n = $ac_delim_num; then
29411    break
29412  elif $ac_last_try; then
29413    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29414  else
29415    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29416  fi
29417done
29418rm -f conf$$subs.sh
29419
29420cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29421cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
29422_ACEOF
29423sed -n '
29424h
29425s/^/S["/; s/!.*/"]=/
29426p
29427g
29428s/^[^!]*!//
29429:repl
29430t repl
29431s/'"$ac_delim"'$//
29432t delim
29433:nl
29434h
29435s/\(.\{148\}\)..*/\1/
29436t more1
29437s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29438p
29439n
29440b repl
29441:more1
29442s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29443p
29444g
29445s/.\{148\}//
29446t nl
29447:delim
29448h
29449s/\(.\{148\}\)..*/\1/
29450t more2
29451s/["\\]/\\&/g; s/^/"/; s/$/"/
29452p
29453b
29454:more2
29455s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29456p
29457g
29458s/.\{148\}//
29459t delim
29460' <conf$$subs.awk | sed '
29461/^[^""]/{
29462  N
29463  s/\n//
29464}
29465' >>$CONFIG_STATUS || ac_write_fail=1
29466rm -f conf$$subs.awk
29467cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29468_ACAWK
29469cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
29470  for (key in S) S_is_set[key] = 1
29471  FS = ""
29472
29473}
29474{
29475  line = $ 0
29476  nfields = split(line, field, "@")
29477  substed = 0
29478  len = length(field[1])
29479  for (i = 2; i < nfields; i++) {
29480    key = field[i]
29481    keylen = length(key)
29482    if (S_is_set[key]) {
29483      value = S[key]
29484      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
29485      len += length(value) + length(field[++i])
29486      substed = 1
29487    } else
29488      len += 1 + keylen
29489  }
29490
29491  print line
29492}
29493
29494_ACAWK
29495_ACEOF
29496cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29497if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
29498  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
29499else
29500  cat
29501fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
29502  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
29503_ACEOF
29504
29505# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
29506# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
29507# trailing colons and then remove the whole line if VPATH becomes empty
29508# (actually we leave an empty line to preserve line numbers).
29509if test "x$srcdir" = x.; then
29510  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
29511h
29512s///
29513s/^/:/
29514s/[	 ]*$/:/
29515s/:\$(srcdir):/:/g
29516s/:\${srcdir}:/:/g
29517s/:@srcdir@:/:/g
29518s/^:*//
29519s/:*$//
29520x
29521s/\(=[	 ]*\).*/\1/
29522G
29523s/\n//
29524s/^[^=]*=[	 ]*$//
29525}'
29526fi
29527
29528cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29529fi # test -n "$CONFIG_FILES"
29530
29531# Set up the scripts for CONFIG_HEADERS section.
29532# No need to generate them if there are no CONFIG_HEADERS.
29533# This happens for instance with `./config.status Makefile'.
29534if test -n "$CONFIG_HEADERS"; then
29535cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
29536BEGIN {
29537_ACEOF
29538
29539# Transform confdefs.h into an awk script `defines.awk', embedded as
29540# here-document in config.status, that substitutes the proper values into
29541# config.h.in to produce config.h.
29542
29543# Create a delimiter string that does not exist in confdefs.h, to ease
29544# handling of long lines.
29545ac_delim='%!_!# '
29546for ac_last_try in false false :; do
29547  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
29548  if test -z "$ac_tt"; then
29549    break
29550  elif $ac_last_try; then
29551    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
29552  else
29553    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29554  fi
29555done
29556
29557# For the awk script, D is an array of macro values keyed by name,
29558# likewise P contains macro parameters if any.  Preserve backslash
29559# newline sequences.
29560
29561ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
29562sed -n '
29563s/.\{148\}/&'"$ac_delim"'/g
29564t rset
29565:rset
29566s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
29567t def
29568d
29569:def
29570s/\\$//
29571t bsnl
29572s/["\\]/\\&/g
29573s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
29574D["\1"]=" \3"/p
29575s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
29576d
29577:bsnl
29578s/["\\]/\\&/g
29579s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
29580D["\1"]=" \3\\\\\\n"\\/p
29581t cont
29582s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
29583t cont
29584d
29585:cont
29586n
29587s/.\{148\}/&'"$ac_delim"'/g
29588t clear
29589:clear
29590s/\\$//
29591t bsnlc
29592s/["\\]/\\&/g; s/^/"/; s/$/"/p
29593d
29594:bsnlc
29595s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
29596b cont
29597' <confdefs.h | sed '
29598s/'"$ac_delim"'/"\\\
29599"/g' >>$CONFIG_STATUS || ac_write_fail=1
29600
29601cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29602  for (key in D) D_is_set[key] = 1
29603  FS = ""
29604}
29605/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
29606  line = \$ 0
29607  split(line, arg, " ")
29608  if (arg[1] == "#") {
29609    defundef = arg[2]
29610    mac1 = arg[3]
29611  } else {
29612    defundef = substr(arg[1], 2)
29613    mac1 = arg[2]
29614  }
29615  split(mac1, mac2, "(") #)
29616  macro = mac2[1]
29617  prefix = substr(line, 1, index(line, defundef) - 1)
29618  if (D_is_set[macro]) {
29619    # Preserve the white space surrounding the "#".
29620    print prefix "define", macro P[macro] D[macro]
29621    next
29622  } else {
29623    # Replace #undef with comments.  This is necessary, for example,
29624    # in the case of _POSIX_SOURCE, which is predefined and required
29625    # on some systems where configure will not decide to define it.
29626    if (defundef == "undef") {
29627      print "/*", prefix defundef, macro, "*/"
29628      next
29629    }
29630  }
29631}
29632{ print }
29633_ACAWK
29634_ACEOF
29635cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29636  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
29637fi # test -n "$CONFIG_HEADERS"
29638
29639
29640eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
29641shift
29642for ac_tag
29643do
29644  case $ac_tag in
29645  :[FHLC]) ac_mode=$ac_tag; continue;;
29646  esac
29647  case $ac_mode$ac_tag in
29648  :[FHL]*:*);;
29649  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
29650  :[FH]-) ac_tag=-:-;;
29651  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
29652  esac
29653  ac_save_IFS=$IFS
29654  IFS=:
29655  set x $ac_tag
29656  IFS=$ac_save_IFS
29657  shift
29658  ac_file=$1
29659  shift
29660
29661  case $ac_mode in
29662  :L) ac_source=$1;;
29663  :[FH])
29664    ac_file_inputs=
29665    for ac_f
29666    do
29667      case $ac_f in
29668      -) ac_f="$ac_tmp/stdin";;
29669      *) # Look for the file first in the build tree, then in the source tree
29670	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
29671	 # because $ac_f cannot contain `:'.
29672	 test -f "$ac_f" ||
29673	   case $ac_f in
29674	   [\\/$]*) false;;
29675	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
29676	   esac ||
29677	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
29678      esac
29679      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
29680      as_fn_append ac_file_inputs " '$ac_f'"
29681    done
29682
29683    # Let's still pretend it is `configure' which instantiates (i.e., don't
29684    # use $as_me), people would be surprised to read:
29685    #    /* config.h.  Generated by config.status.  */
29686    configure_input='Generated from '`
29687	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
29688	`' by configure.'
29689    if test x"$ac_file" != x-; then
29690      configure_input="$ac_file.  $configure_input"
29691      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
29692printf "%s\n" "$as_me: creating $ac_file" >&6;}
29693    fi
29694    # Neutralize special characters interpreted by sed in replacement strings.
29695    case $configure_input in #(
29696    *\&* | *\|* | *\\* )
29697       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
29698       sed 's/[\\\\&|]/\\\\&/g'`;; #(
29699    *) ac_sed_conf_input=$configure_input;;
29700    esac
29701
29702    case $ac_tag in
29703    *:-:* | *:-) cat >"$ac_tmp/stdin" \
29704      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
29705    esac
29706    ;;
29707  esac
29708
29709  ac_dir=`$as_dirname -- "$ac_file" ||
29710$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29711	 X"$ac_file" : 'X\(//\)[^/]' \| \
29712	 X"$ac_file" : 'X\(//\)$' \| \
29713	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
29714printf "%s\n" X"$ac_file" |
29715    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29716	    s//\1/
29717	    q
29718	  }
29719	  /^X\(\/\/\)[^/].*/{
29720	    s//\1/
29721	    q
29722	  }
29723	  /^X\(\/\/\)$/{
29724	    s//\1/
29725	    q
29726	  }
29727	  /^X\(\/\).*/{
29728	    s//\1/
29729	    q
29730	  }
29731	  s/.*/./; q'`
29732  as_dir="$ac_dir"; as_fn_mkdir_p
29733  ac_builddir=.
29734
29735case "$ac_dir" in
29736.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
29737*)
29738  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
29739  # A ".." for each directory in $ac_dir_suffix.
29740  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
29741  case $ac_top_builddir_sub in
29742  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
29743  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
29744  esac ;;
29745esac
29746ac_abs_top_builddir=$ac_pwd
29747ac_abs_builddir=$ac_pwd$ac_dir_suffix
29748# for backward compatibility:
29749ac_top_builddir=$ac_top_build_prefix
29750
29751case $srcdir in
29752  .)  # We are building in place.
29753    ac_srcdir=.
29754    ac_top_srcdir=$ac_top_builddir_sub
29755    ac_abs_top_srcdir=$ac_pwd ;;
29756  [\\/]* | ?:[\\/]* )  # Absolute name.
29757    ac_srcdir=$srcdir$ac_dir_suffix;
29758    ac_top_srcdir=$srcdir
29759    ac_abs_top_srcdir=$srcdir ;;
29760  *) # Relative name.
29761    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
29762    ac_top_srcdir=$ac_top_build_prefix$srcdir
29763    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
29764esac
29765ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
29766
29767
29768  case $ac_mode in
29769  :F)
29770  #
29771  # CONFIG_FILE
29772  #
29773
29774  case $INSTALL in
29775  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29776  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
29777  esac
29778  ac_MKDIR_P=$MKDIR_P
29779  case $MKDIR_P in
29780  [\\/$]* | ?:[\\/]* ) ;;
29781  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
29782  esac
29783_ACEOF
29784
29785cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29786# If the template does not know about datarootdir, expand it.
29787# FIXME: This hack should be removed a few years after 2.60.
29788ac_datarootdir_hack=; ac_datarootdir_seen=
29789ac_sed_dataroot='
29790/datarootdir/ {
29791  p
29792  q
29793}
29794/@datadir@/p
29795/@docdir@/p
29796/@infodir@/p
29797/@localedir@/p
29798/@mandir@/p'
29799case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
29800*datarootdir*) ac_datarootdir_seen=yes;;
29801*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
29802  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
29803printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
29804_ACEOF
29805cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29806  ac_datarootdir_hack='
29807  s&@datadir@&$datadir&g
29808  s&@docdir@&$docdir&g
29809  s&@infodir@&$infodir&g
29810  s&@localedir@&$localedir&g
29811  s&@mandir@&$mandir&g
29812  s&\\\${datarootdir}&$datarootdir&g' ;;
29813esac
29814_ACEOF
29815
29816# Neutralize VPATH when `$srcdir' = `.'.
29817# Shell code in configure.ac might set extrasub.
29818# FIXME: do we really want to maintain this feature?
29819cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29820ac_sed_extra="$ac_vpsub
29821$extrasub
29822_ACEOF
29823cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29824:t
29825/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29826s|@configure_input@|$ac_sed_conf_input|;t t
29827s&@top_builddir@&$ac_top_builddir_sub&;t t
29828s&@top_build_prefix@&$ac_top_build_prefix&;t t
29829s&@srcdir@&$ac_srcdir&;t t
29830s&@abs_srcdir@&$ac_abs_srcdir&;t t
29831s&@top_srcdir@&$ac_top_srcdir&;t t
29832s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
29833s&@builddir@&$ac_builddir&;t t
29834s&@abs_builddir@&$ac_abs_builddir&;t t
29835s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
29836s&@INSTALL@&$ac_INSTALL&;t t
29837s&@MKDIR_P@&$ac_MKDIR_P&;t t
29838$ac_datarootdir_hack
29839"
29840eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
29841  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
29842
29843test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
29844  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
29845  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
29846      "$ac_tmp/out"`; test -z "$ac_out"; } &&
29847  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
29848which seems to be undefined.  Please make sure it is defined" >&5
29849printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
29850which seems to be undefined.  Please make sure it is defined" >&2;}
29851
29852  rm -f "$ac_tmp/stdin"
29853  case $ac_file in
29854  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
29855  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
29856  esac \
29857  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
29858 ;;
29859  :H)
29860  #
29861  # CONFIG_HEADER
29862  #
29863  if test x"$ac_file" != x-; then
29864    {
29865      printf "%s\n" "/* $configure_input  */" >&1 \
29866      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
29867    } >"$ac_tmp/config.h" \
29868      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
29869    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
29870      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
29871printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
29872    else
29873      rm -f "$ac_file"
29874      mv "$ac_tmp/config.h" "$ac_file" \
29875	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
29876    fi
29877  else
29878    printf "%s\n" "/* $configure_input  */" >&1 \
29879      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
29880      || as_fn_error $? "could not create -" "$LINENO" 5
29881  fi
29882# Compute "$ac_file"'s index in $config_headers.
29883_am_arg="$ac_file"
29884_am_stamp_count=1
29885for _am_header in $config_headers :; do
29886  case $_am_header in
29887    $_am_arg | $_am_arg:* )
29888      break ;;
29889    * )
29890      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
29891  esac
29892done
29893echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
29894$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29895	 X"$_am_arg" : 'X\(//\)[^/]' \| \
29896	 X"$_am_arg" : 'X\(//\)$' \| \
29897	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
29898printf "%s\n" X"$_am_arg" |
29899    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29900	    s//\1/
29901	    q
29902	  }
29903	  /^X\(\/\/\)[^/].*/{
29904	    s//\1/
29905	    q
29906	  }
29907	  /^X\(\/\/\)$/{
29908	    s//\1/
29909	    q
29910	  }
29911	  /^X\(\/\).*/{
29912	    s//\1/
29913	    q
29914	  }
29915	  s/.*/./; q'`/stamp-h$_am_stamp_count
29916 ;;
29917
29918  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
29919printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
29920 ;;
29921  esac
29922
29923
29924  case $ac_file$ac_mode in
29925    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
29926  # Older Autoconf quotes --file arguments for eval, but not when files
29927  # are listed without --file.  Let's play safe and only enable the eval
29928  # if we detect the quoting.
29929  # TODO: see whether this extra hack can be removed once we start
29930  # requiring Autoconf 2.70 or later.
29931  case $CONFIG_FILES in #(
29932  *\'*) :
29933    eval set x "$CONFIG_FILES" ;; #(
29934  *) :
29935    set x $CONFIG_FILES ;; #(
29936  *) :
29937     ;;
29938esac
29939  shift
29940  # Used to flag and report bootstrapping failures.
29941  am_rc=0
29942  for am_mf
29943  do
29944    # Strip MF so we end up with the name of the file.
29945    am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
29946    # Check whether this is an Automake generated Makefile which includes
29947    # dependency-tracking related rules and includes.
29948    # Grep'ing the whole file directly is not great: AIX grep has a line
29949    # limit of 2048, but all sed's we know have understand at least 4000.
29950    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
29951      || continue
29952    am_dirpart=`$as_dirname -- "$am_mf" ||
29953$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29954	 X"$am_mf" : 'X\(//\)[^/]' \| \
29955	 X"$am_mf" : 'X\(//\)$' \| \
29956	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
29957printf "%s\n" X"$am_mf" |
29958    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29959	    s//\1/
29960	    q
29961	  }
29962	  /^X\(\/\/\)[^/].*/{
29963	    s//\1/
29964	    q
29965	  }
29966	  /^X\(\/\/\)$/{
29967	    s//\1/
29968	    q
29969	  }
29970	  /^X\(\/\).*/{
29971	    s//\1/
29972	    q
29973	  }
29974	  s/.*/./; q'`
29975    am_filepart=`$as_basename -- "$am_mf" ||
29976$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
29977	 X"$am_mf" : 'X\(//\)$' \| \
29978	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
29979printf "%s\n" X/"$am_mf" |
29980    sed '/^.*\/\([^/][^/]*\)\/*$/{
29981	    s//\1/
29982	    q
29983	  }
29984	  /^X\/\(\/\/\)$/{
29985	    s//\1/
29986	    q
29987	  }
29988	  /^X\/\(\/\).*/{
29989	    s//\1/
29990	    q
29991	  }
29992	  s/.*/./; q'`
29993    { echo "$as_me:$LINENO: cd "$am_dirpart" \
29994      && sed -e '/# am--include-marker/d' "$am_filepart" \
29995        | $MAKE -f - am--depfiles" >&5
29996   (cd "$am_dirpart" \
29997      && sed -e '/# am--include-marker/d' "$am_filepart" \
29998        | $MAKE -f - am--depfiles) >&5 2>&5
29999   ac_status=$?
30000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30001   (exit $ac_status); } || am_rc=$?
30002  done
30003  if test $am_rc -ne 0; then
30004    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30005printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
30006as_fn_error $? "Something went wrong bootstrapping makefile fragments
30007    for automatic dependency tracking.  If GNU make was not used, consider
30008    re-running the configure script with MAKE=\"gmake\" (or whatever is
30009    necessary).  You can also try re-running configure with the
30010    '--disable-dependency-tracking' option to at least be able to build
30011    the package (albeit without support for automatic dependency tracking).
30012See \`config.log' for more details" "$LINENO" 5; }
30013  fi
30014  { am_dirpart=; unset am_dirpart;}
30015  { am_filepart=; unset am_filepart;}
30016  { am_mf=; unset am_mf;}
30017  { am_rc=; unset am_rc;}
30018  rm -f conftest-deps.mk
30019}
30020 ;;
30021    "libtool":C)
30022
30023    # See if we are running on zsh, and set the options that allow our
30024    # commands through without removal of \ escapes.
30025    if test -n "${ZSH_VERSION+set}"; then
30026      setopt NO_GLOB_SUBST
30027    fi
30028
30029    cfgfile=${ofile}T
30030    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
30031    $RM "$cfgfile"
30032
30033    cat <<_LT_EOF >> "$cfgfile"
30034#! $SHELL
30035# Generated automatically by $as_me ($PACKAGE) $VERSION
30036# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
30037# NOTE: Changes made to this file will be lost: look at ltmain.sh.
30038
30039# Provide generalized library-building support services.
30040# Written by Gordon Matzigkeit, 1996
30041
30042# Copyright (C) 2014 Free Software Foundation, Inc.
30043# This is free software; see the source for copying conditions.  There is NO
30044# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30045
30046# GNU Libtool is free software; you can redistribute it and/or modify
30047# it under the terms of the GNU General Public License as published by
30048# the Free Software Foundation; either version 2 of of the License, or
30049# (at your option) any later version.
30050#
30051# As a special exception to the GNU General Public License, if you
30052# distribute this file as part of a program or library that is built
30053# using GNU Libtool, you may include this file under the  same
30054# distribution terms that you use for the rest of that program.
30055#
30056# GNU Libtool is distributed in the hope that it will be useful, but
30057# WITHOUT ANY WARRANTY; without even the implied warranty of
30058# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30059# GNU General Public License for more details.
30060#
30061# You should have received a copy of the GNU General Public License
30062# along with this program.  If not, see <http://www.gnu.org/licenses/>.
30063
30064
30065# The names of the tagged configurations supported by this script.
30066available_tags=''
30067
30068# Configured defaults for sys_lib_dlsearch_path munging.
30069: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
30070
30071# ### BEGIN LIBTOOL CONFIG
30072
30073# A sed program that does not truncate output.
30074SED=$lt_SED
30075
30076# Sed that helps us avoid accidentally triggering echo(1) options like -n.
30077Xsed="\$SED -e 1s/^X//"
30078
30079# A grep program that handles long lines.
30080GREP=$lt_GREP
30081
30082# An ERE matcher.
30083EGREP=$lt_EGREP
30084
30085# A literal string matcher.
30086FGREP=$lt_FGREP
30087
30088# Shell to use when invoking shell scripts.
30089SHELL=$lt_SHELL
30090
30091# An echo program that protects backslashes.
30092ECHO=$lt_ECHO
30093
30094# Which release of libtool.m4 was used?
30095macro_version=$macro_version
30096macro_revision=$macro_revision
30097
30098# Whether or not to build shared libraries.
30099build_libtool_libs=$enable_shared
30100
30101# Whether or not to build static libraries.
30102build_old_libs=$enable_static
30103
30104# What type of objects to build.
30105pic_mode=$pic_mode
30106
30107# Whether or not to optimize for fast installation.
30108fast_install=$enable_fast_install
30109
30110# Shared archive member basename,for filename based shared library versioning on AIX.
30111shared_archive_member_spec=$shared_archive_member_spec
30112
30113# The PATH separator for the build system.
30114PATH_SEPARATOR=$lt_PATH_SEPARATOR
30115
30116# The host system.
30117host_alias=$host_alias
30118host=$host
30119host_os=$host_os
30120
30121# The build system.
30122build_alias=$build_alias
30123build=$build
30124build_os=$build_os
30125
30126# A BSD- or MS-compatible name lister.
30127NM=$lt_NM
30128
30129# Whether we need soft or hard links.
30130LN_S=$lt_LN_S
30131
30132# What is the maximum length of a command?
30133max_cmd_len=$max_cmd_len
30134
30135# Object file suffix (normally "o").
30136objext=$ac_objext
30137
30138# Executable file suffix (normally "").
30139exeext=$exeext
30140
30141# whether the shell understands "unset".
30142lt_unset=$lt_unset
30143
30144# turn spaces into newlines.
30145SP2NL=$lt_lt_SP2NL
30146
30147# turn newlines into spaces.
30148NL2SP=$lt_lt_NL2SP
30149
30150# convert \$build file names to \$host format.
30151to_host_file_cmd=$lt_cv_to_host_file_cmd
30152
30153# convert \$build files to toolchain format.
30154to_tool_file_cmd=$lt_cv_to_tool_file_cmd
30155
30156# An object symbol dumper.
30157OBJDUMP=$lt_OBJDUMP
30158
30159# Method to check whether dependent libraries are shared objects.
30160deplibs_check_method=$lt_deplibs_check_method
30161
30162# Command to use when deplibs_check_method = "file_magic".
30163file_magic_cmd=$lt_file_magic_cmd
30164
30165# How to find potential files when deplibs_check_method = "file_magic".
30166file_magic_glob=$lt_file_magic_glob
30167
30168# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
30169want_nocaseglob=$lt_want_nocaseglob
30170
30171# DLL creation program.
30172DLLTOOL=$lt_DLLTOOL
30173
30174# Command to associate shared and link libraries.
30175sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
30176
30177# The archiver.
30178AR=$lt_AR
30179
30180# Flags to create an archive.
30181AR_FLAGS=$lt_AR_FLAGS
30182
30183# How to feed a file listing to the archiver.
30184archiver_list_spec=$lt_archiver_list_spec
30185
30186# A symbol stripping program.
30187STRIP=$lt_STRIP
30188
30189# Commands used to install an old-style archive.
30190RANLIB=$lt_RANLIB
30191old_postinstall_cmds=$lt_old_postinstall_cmds
30192old_postuninstall_cmds=$lt_old_postuninstall_cmds
30193
30194# Whether to use a lock for old archive extraction.
30195lock_old_archive_extraction=$lock_old_archive_extraction
30196
30197# A C compiler.
30198LTCC=$lt_CC
30199
30200# LTCC compiler flags.
30201LTCFLAGS=$lt_CFLAGS
30202
30203# Take the output of nm and produce a listing of raw symbols and C names.
30204global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
30205
30206# Transform the output of nm in a proper C declaration.
30207global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
30208
30209# Transform the output of nm into a list of symbols to manually relocate.
30210global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
30211
30212# Transform the output of nm in a C name address pair.
30213global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
30214
30215# Transform the output of nm in a C name address pair when lib prefix is needed.
30216global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
30217
30218# The name lister interface.
30219nm_interface=$lt_lt_cv_nm_interface
30220
30221# Specify filename containing input files for \$NM.
30222nm_file_list_spec=$lt_nm_file_list_spec
30223
30224# The root where to search for dependent libraries,and where our libraries should be installed.
30225lt_sysroot=$lt_sysroot
30226
30227# Command to truncate a binary pipe.
30228lt_truncate_bin=$lt_lt_cv_truncate_bin
30229
30230# The name of the directory that contains temporary libtool files.
30231objdir=$objdir
30232
30233# Used to examine libraries when file_magic_cmd begins with "file".
30234MAGIC_CMD=$MAGIC_CMD
30235
30236# Must we lock files when doing compilation?
30237need_locks=$lt_need_locks
30238
30239# Manifest tool.
30240MANIFEST_TOOL=$lt_MANIFEST_TOOL
30241
30242# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
30243DSYMUTIL=$lt_DSYMUTIL
30244
30245# Tool to change global to local symbols on Mac OS X.
30246NMEDIT=$lt_NMEDIT
30247
30248# Tool to manipulate fat objects and archives on Mac OS X.
30249LIPO=$lt_LIPO
30250
30251# ldd/readelf like tool for Mach-O binaries on Mac OS X.
30252OTOOL=$lt_OTOOL
30253
30254# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
30255OTOOL64=$lt_OTOOL64
30256
30257# Old archive suffix (normally "a").
30258libext=$libext
30259
30260# Shared library suffix (normally ".so").
30261shrext_cmds=$lt_shrext_cmds
30262
30263# The commands to extract the exported symbol list from a shared archive.
30264extract_expsyms_cmds=$lt_extract_expsyms_cmds
30265
30266# Variables whose values should be saved in libtool wrapper scripts and
30267# restored at link time.
30268variables_saved_for_relink=$lt_variables_saved_for_relink
30269
30270# Do we need the "lib" prefix for modules?
30271need_lib_prefix=$need_lib_prefix
30272
30273# Do we need a version for libraries?
30274need_version=$need_version
30275
30276# Library versioning type.
30277version_type=$version_type
30278
30279# Shared library runtime path variable.
30280runpath_var=$runpath_var
30281
30282# Shared library path variable.
30283shlibpath_var=$shlibpath_var
30284
30285# Is shlibpath searched before the hard-coded library search path?
30286shlibpath_overrides_runpath=$shlibpath_overrides_runpath
30287
30288# Format of library name prefix.
30289libname_spec=$lt_libname_spec
30290
30291# List of archive names.  First name is the real one, the rest are links.
30292# The last name is the one that the linker finds with -lNAME
30293library_names_spec=$lt_library_names_spec
30294
30295# The coded name of the library, if different from the real name.
30296soname_spec=$lt_soname_spec
30297
30298# Permission mode override for installation of shared libraries.
30299install_override_mode=$lt_install_override_mode
30300
30301# Command to use after installation of a shared archive.
30302postinstall_cmds=$lt_postinstall_cmds
30303
30304# Command to use after uninstallation of a shared archive.
30305postuninstall_cmds=$lt_postuninstall_cmds
30306
30307# Commands used to finish a libtool library installation in a directory.
30308finish_cmds=$lt_finish_cmds
30309
30310# As "finish_cmds", except a single script fragment to be evaled but
30311# not shown.
30312finish_eval=$lt_finish_eval
30313
30314# Whether we should hardcode library paths into libraries.
30315hardcode_into_libs=$hardcode_into_libs
30316
30317# Compile-time system search path for libraries.
30318sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
30319
30320# Detected run-time system search path for libraries.
30321sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
30322
30323# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
30324configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
30325
30326# Whether dlopen is supported.
30327dlopen_support=$enable_dlopen
30328
30329# Whether dlopen of programs is supported.
30330dlopen_self=$enable_dlopen_self
30331
30332# Whether dlopen of statically linked programs is supported.
30333dlopen_self_static=$enable_dlopen_self_static
30334
30335# Commands to strip libraries.
30336old_striplib=$lt_old_striplib
30337striplib=$lt_striplib
30338
30339
30340# The linker used to build libraries.
30341LD=$lt_LD
30342
30343# How to create reloadable object files.
30344reload_flag=$lt_reload_flag
30345reload_cmds=$lt_reload_cmds
30346
30347# Commands used to build an old-style archive.
30348old_archive_cmds=$lt_old_archive_cmds
30349
30350# A language specific compiler.
30351CC=$lt_compiler
30352
30353# Is the compiler the GNU compiler?
30354with_gcc=$GCC
30355
30356# Compiler flag to turn off builtin functions.
30357no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
30358
30359# Additional compiler flags for building library objects.
30360pic_flag=$lt_lt_prog_compiler_pic
30361
30362# How to pass a linker flag through the compiler.
30363wl=$lt_lt_prog_compiler_wl
30364
30365# Compiler flag to prevent dynamic linking.
30366link_static_flag=$lt_lt_prog_compiler_static
30367
30368# Does compiler simultaneously support -c and -o options?
30369compiler_c_o=$lt_lt_cv_prog_compiler_c_o
30370
30371# Whether or not to add -lc for building shared libraries.
30372build_libtool_need_lc=$archive_cmds_need_lc
30373
30374# Whether or not to disallow shared libs when runtime libs are static.
30375allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
30376
30377# Compiler flag to allow reflexive dlopens.
30378export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
30379
30380# Compiler flag to generate shared objects directly from archives.
30381whole_archive_flag_spec=$lt_whole_archive_flag_spec
30382
30383# Whether the compiler copes with passing no objects directly.
30384compiler_needs_object=$lt_compiler_needs_object
30385
30386# Create an old-style archive from a shared archive.
30387old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
30388
30389# Create a temporary old-style archive to link instead of a shared archive.
30390old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
30391
30392# Commands used to build a shared archive.
30393archive_cmds=$lt_archive_cmds
30394archive_expsym_cmds=$lt_archive_expsym_cmds
30395
30396# Commands used to build a loadable module if different from building
30397# a shared archive.
30398module_cmds=$lt_module_cmds
30399module_expsym_cmds=$lt_module_expsym_cmds
30400
30401# Whether we are building with GNU ld or not.
30402with_gnu_ld=$lt_with_gnu_ld
30403
30404# Flag that allows shared libraries with undefined symbols to be built.
30405allow_undefined_flag=$lt_allow_undefined_flag
30406
30407# Flag that enforces no undefined symbols.
30408no_undefined_flag=$lt_no_undefined_flag
30409
30410# Flag to hardcode \$libdir into a binary during linking.
30411# This must work even if \$libdir does not exist
30412hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
30413
30414# Whether we need a single "-rpath" flag with a separated argument.
30415hardcode_libdir_separator=$lt_hardcode_libdir_separator
30416
30417# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
30418# DIR into the resulting binary.
30419hardcode_direct=$hardcode_direct
30420
30421# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
30422# DIR into the resulting binary and the resulting library dependency is
30423# "absolute",i.e impossible to change by setting \$shlibpath_var if the
30424# library is relocated.
30425hardcode_direct_absolute=$hardcode_direct_absolute
30426
30427# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
30428# into the resulting binary.
30429hardcode_minus_L=$hardcode_minus_L
30430
30431# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
30432# into the resulting binary.
30433hardcode_shlibpath_var=$hardcode_shlibpath_var
30434
30435# Set to "yes" if building a shared library automatically hardcodes DIR
30436# into the library and all subsequent libraries and executables linked
30437# against it.
30438hardcode_automatic=$hardcode_automatic
30439
30440# Set to yes if linker adds runtime paths of dependent libraries
30441# to runtime path list.
30442inherit_rpath=$inherit_rpath
30443
30444# Whether libtool must link a program against all its dependency libraries.
30445link_all_deplibs=$link_all_deplibs
30446
30447# Set to "yes" if exported symbols are required.
30448always_export_symbols=$always_export_symbols
30449
30450# The commands to list exported symbols.
30451export_symbols_cmds=$lt_export_symbols_cmds
30452
30453# Symbols that should not be listed in the preloaded symbols.
30454exclude_expsyms=$lt_exclude_expsyms
30455
30456# Symbols that must always be exported.
30457include_expsyms=$lt_include_expsyms
30458
30459# Commands necessary for linking programs (against libraries) with templates.
30460prelink_cmds=$lt_prelink_cmds
30461
30462# Commands necessary for finishing linking programs.
30463postlink_cmds=$lt_postlink_cmds
30464
30465# Specify filename containing input files.
30466file_list_spec=$lt_file_list_spec
30467
30468# How to hardcode a shared library path into an executable.
30469hardcode_action=$hardcode_action
30470
30471# ### END LIBTOOL CONFIG
30472
30473_LT_EOF
30474
30475    cat <<'_LT_EOF' >> "$cfgfile"
30476
30477# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
30478
30479# func_munge_path_list VARIABLE PATH
30480# -----------------------------------
30481# VARIABLE is name of variable containing _space_ separated list of
30482# directories to be munged by the contents of PATH, which is string
30483# having a format:
30484# "DIR[:DIR]:"
30485#       string "DIR[ DIR]" will be prepended to VARIABLE
30486# ":DIR[:DIR]"
30487#       string "DIR[ DIR]" will be appended to VARIABLE
30488# "DIRP[:DIRP]::[DIRA:]DIRA"
30489#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
30490#       "DIRA[ DIRA]" will be appended to VARIABLE
30491# "DIR[:DIR]"
30492#       VARIABLE will be replaced by "DIR[ DIR]"
30493func_munge_path_list ()
30494{
30495    case x$2 in
30496    x)
30497        ;;
30498    *:)
30499        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
30500        ;;
30501    x:*)
30502        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
30503        ;;
30504    *::*)
30505        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
30506        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
30507        ;;
30508    *)
30509        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
30510        ;;
30511    esac
30512}
30513
30514
30515# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
30516func_cc_basename ()
30517{
30518    for cc_temp in $*""; do
30519      case $cc_temp in
30520        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
30521        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
30522        \-*) ;;
30523        *) break;;
30524      esac
30525    done
30526    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
30527}
30528
30529
30530# ### END FUNCTIONS SHARED WITH CONFIGURE
30531
30532_LT_EOF
30533
30534  case $host_os in
30535  aix3*)
30536    cat <<\_LT_EOF >> "$cfgfile"
30537# AIX sometimes has problems with the GCC collect2 program.  For some
30538# reason, if we set the COLLECT_NAMES environment variable, the problems
30539# vanish in a puff of smoke.
30540if test set != "${COLLECT_NAMES+set}"; then
30541  COLLECT_NAMES=
30542  export COLLECT_NAMES
30543fi
30544_LT_EOF
30545    ;;
30546  esac
30547
30548
30549
30550ltmain=$ac_aux_dir/ltmain.sh
30551
30552
30553  # We use sed instead of cat because bash on DJGPP gets confused if
30554  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
30555  # text mode, it properly converts lines to CR/LF.  This bash problem
30556  # is reportedly fixed, but why not run on old versions too?
30557  sed '$q' "$ltmain" >> "$cfgfile" \
30558     || (rm -f "$cfgfile"; exit 1)
30559
30560   mv -f "$cfgfile" "$ofile" ||
30561    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
30562  chmod +x "$ofile"
30563
30564 ;;
30565
30566  esac
30567done # for ac_tag
30568
30569
30570as_fn_exit 0
30571_ACEOF
30572ac_clean_files=$ac_clean_files_save
30573
30574test $ac_write_fail = 0 ||
30575  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
30576
30577
30578# configure is writing to config.log, and then calls config.status.
30579# config.status does its own redirection, appending to config.log.
30580# Unfortunately, on DOS this fails, as config.log is still kept open
30581# by configure, so config.status won't be able to write to it; its
30582# output is simply discarded.  So we exec the FD to /dev/null,
30583# effectively closing config.log, so it can be properly (re)opened and
30584# appended to by config.status.  When coming back to configure, we
30585# need to make the FD available again.
30586if test "$no_create" != yes; then
30587  ac_cs_success=:
30588  ac_config_status_args=
30589  test "$silent" = yes &&
30590    ac_config_status_args="$ac_config_status_args --quiet"
30591  exec 5>/dev/null
30592  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30593  exec 5>>config.log
30594  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30595  # would make configure fail if this is the last instruction.
30596  $ac_cs_success || as_fn_exit 1
30597fi
30598
30599#
30600# CONFIG_SUBDIRS section.
30601#
30602if test "$no_recursion" != yes; then
30603
30604  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
30605  # so they do not pile up.
30606  ac_sub_configure_args=
30607  ac_prev=
30608  eval "set x $ac_configure_args"
30609  shift
30610  for ac_arg
30611  do
30612    if test -n "$ac_prev"; then
30613      ac_prev=
30614      continue
30615    fi
30616    case $ac_arg in
30617    -cache-file | --cache-file | --cache-fil | --cache-fi \
30618    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
30619      ac_prev=cache_file ;;
30620    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
30621    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
30622    | --c=*)
30623      ;;
30624    --config-cache | -C)
30625      ;;
30626    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
30627      ac_prev=srcdir ;;
30628    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
30629      ;;
30630    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
30631      ac_prev=prefix ;;
30632    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
30633      ;;
30634    --disable-option-checking)
30635      ;;
30636    *)
30637      case $ac_arg in
30638      *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
30639      esac
30640      as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
30641    esac
30642  done
30643
30644  # Always prepend --prefix to ensure using the same prefix
30645  # in subdir configurations.
30646  ac_arg="--prefix=$prefix"
30647  case $ac_arg in
30648  *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
30649  esac
30650  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
30651
30652  # Pass --silent
30653  if test "$silent" = yes; then
30654    ac_sub_configure_args="--silent $ac_sub_configure_args"
30655  fi
30656
30657  # Always prepend --disable-option-checking to silence warnings, since
30658  # different subdirs can have different --enable and --with options.
30659  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
30660
30661  ac_popdir=`pwd`
30662  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
30663
30664    # Do not complain, so a configure script can configure whichever
30665    # parts of a large source tree are present.
30666    test -d "$srcdir/$ac_dir" || continue
30667
30668    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
30669    printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
30670    printf "%s\n" "$ac_msg" >&6
30671    as_dir="$ac_dir"; as_fn_mkdir_p
30672    ac_builddir=.
30673
30674case "$ac_dir" in
30675.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30676*)
30677  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
30678  # A ".." for each directory in $ac_dir_suffix.
30679  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30680  case $ac_top_builddir_sub in
30681  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30682  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30683  esac ;;
30684esac
30685ac_abs_top_builddir=$ac_pwd
30686ac_abs_builddir=$ac_pwd$ac_dir_suffix
30687# for backward compatibility:
30688ac_top_builddir=$ac_top_build_prefix
30689
30690case $srcdir in
30691  .)  # We are building in place.
30692    ac_srcdir=.
30693    ac_top_srcdir=$ac_top_builddir_sub
30694    ac_abs_top_srcdir=$ac_pwd ;;
30695  [\\/]* | ?:[\\/]* )  # Absolute name.
30696    ac_srcdir=$srcdir$ac_dir_suffix;
30697    ac_top_srcdir=$srcdir
30698    ac_abs_top_srcdir=$srcdir ;;
30699  *) # Relative name.
30700    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30701    ac_top_srcdir=$ac_top_build_prefix$srcdir
30702    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30703esac
30704ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30705
30706
30707    cd "$ac_dir"
30708
30709    # Check for configure.gnu first; this name is used for a wrapper for
30710    # Metaconfig's "Configure" on case-insensitive file systems.
30711    if test -f "$ac_srcdir/configure.gnu"; then
30712      ac_sub_configure=$ac_srcdir/configure.gnu
30713    elif test -f "$ac_srcdir/configure"; then
30714      ac_sub_configure=$ac_srcdir/configure
30715    else
30716      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
30717printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
30718      ac_sub_configure=
30719    fi
30720
30721    # The recursion is here.
30722    if test -n "$ac_sub_configure"; then
30723      # Make the cache file name correct relative to the subdirectory.
30724      case $cache_file in
30725      [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
30726      *) # Relative name.
30727	ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
30728      esac
30729
30730      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
30731printf "%s\n" "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
30732      # The eval makes quoting arguments work.
30733      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
30734	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
30735	as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
30736    fi
30737
30738    cd "$ac_popdir"
30739  done
30740fi
30741if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30742  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30743printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
30744fi
30745
30746
30747