]> CyberLeo.Net >> Repos - FreeBSD/releng/10.3.git/blob - contrib/ntp/sntp/configure
Fix multiple vulnerabilities of ntp. [SA-17:03]
[FreeBSD/releng/10.3.git] / contrib / ntp / sntp / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for sntp 4.2.8p10.
4 #
5 # Report bugs to <http://bugs.ntp.org./>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20   emulate sh
21   NULLCMD=:
22   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23   # is contrary to our usage.  Disable this feature.
24   alias -g '${1+"$@"}'='"$@"'
25   setopt NO_GLOB_SUBST
26 else
27   case `(set -o) 2>/dev/null` in #(
28   *posix*) :
29     set -o posix ;; #(
30   *) :
31      ;;
32 esac
33 fi
34
35
36 as_nl='
37 '
38 export as_nl
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47   as_echo='print -r --'
48   as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50   as_echo='printf %s\n'
51   as_echo_n='printf %s'
52 else
53   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55     as_echo_n='/usr/ucb/echo -n'
56   else
57     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58     as_echo_n_body='eval
59       arg=$1;
60       case $arg in #(
61       *"$as_nl"*)
62         expr "X$arg" : "X\\(.*\\)$as_nl";
63         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64       esac;
65       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66     '
67     export as_echo_n_body
68     as_echo_n='sh -c $as_echo_n_body as_echo'
69   fi
70   export as_echo_body
71   as_echo='sh -c $as_echo_body as_echo'
72 fi
73
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
76   PATH_SEPARATOR=:
77   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79       PATH_SEPARATOR=';'
80   }
81 fi
82
83
84 # IFS
85 # We need space, tab and new line, in precisely that order.  Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
89 IFS=" ""        $as_nl"
90
91 # Find who we are.  Look in the path if we contain no directory separator.
92 as_myself=
93 case $0 in #((
94   *[\\/]* ) as_myself=$0 ;;
95   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96 for as_dir in $PATH
97 do
98   IFS=$as_save_IFS
99   test -z "$as_dir" && as_dir=.
100     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101   done
102 IFS=$as_save_IFS
103
104      ;;
105 esac
106 # We did not find ourselves, most probably we were run as `sh COMMAND'
107 # in which case we are not to be found in the path.
108 if test "x$as_myself" = x; then
109   as_myself=$0
110 fi
111 if test ! -f "$as_myself"; then
112   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113   exit 1
114 fi
115
116 # Unset variables that we do not need and which cause bugs (e.g. in
117 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118 # suppresses any "Segmentation fault" message there.  '((' could
119 # trigger a bug in pdksh 5.2.14.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123 done
124 PS1='$ '
125 PS2='> '
126 PS4='+ '
127
128 # NLS nuisances.
129 LC_ALL=C
130 export LC_ALL
131 LANGUAGE=C
132 export LANGUAGE
133
134 # CDPATH.
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137 # Use a proper internal environment variable to ensure we don't fall
138   # into an infinite loop, continuously re-executing ourselves.
139   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140     _as_can_reexec=no; export _as_can_reexec;
141     # We cannot yet assume a decent shell, so we have to provide a
142 # neutralization value for shells without unset; and this also
143 # works around shells that cannot unset nonexistent variables.
144 # Preserve -v and -x to the replacement shell.
145 BASH_ENV=/dev/null
146 ENV=/dev/null
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148 case $- in # ((((
149   *v*x* | *x*v* ) as_opts=-vx ;;
150   *v* ) as_opts=-v ;;
151   *x* ) as_opts=-x ;;
152   * ) as_opts= ;;
153 esac
154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155 # Admittedly, this is quite paranoid, since all the known shells bail
156 # out after a failed `exec'.
157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158 as_fn_exit 255
159   fi
160   # We don't want this to propagate to other subprocesses.
161           { _as_can_reexec=; unset _as_can_reexec;}
162 if test "x$CONFIG_SHELL" = x; then
163   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164   emulate sh
165   NULLCMD=:
166   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167   # is contrary to our usage.  Disable this feature.
168   alias -g '\${1+\"\$@\"}'='\"\$@\"'
169   setopt NO_GLOB_SUBST
170 else
171   case \`(set -o) 2>/dev/null\` in #(
172   *posix*) :
173     set -o posix ;; #(
174   *) :
175      ;;
176 esac
177 fi
178 "
179   as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
184
185 exitcode=0
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192 else
193   exitcode=1; echo positional parameters were not saved.
194 fi
195 test x\$exitcode = x0 || exit 1
196 test -x / || exit 1"
197   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201 test \$(( 1 + 1 )) = 2 || exit 1
202
203   test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
204     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
205     ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
206     ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
207     PATH=/empty FPATH=/empty; export PATH FPATH
208     test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
209       || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
210   if (eval "$as_required") 2>/dev/null; then :
211   as_have_required=yes
212 else
213   as_have_required=no
214 fi
215   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
216
217 else
218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
219 as_found=false
220 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
221 do
222   IFS=$as_save_IFS
223   test -z "$as_dir" && as_dir=.
224   as_found=:
225   case $as_dir in #(
226          /*)
227            for as_base in sh bash ksh sh5; do
228              # Try only shells that exist, to save several forks.
229              as_shell=$as_dir/$as_base
230              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
231                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
232   CONFIG_SHELL=$as_shell as_have_required=yes
233                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
234   break 2
235 fi
236 fi
237            done;;
238        esac
239   as_found=false
240 done
241 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
242               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
243   CONFIG_SHELL=$SHELL as_have_required=yes
244 fi; }
245 IFS=$as_save_IFS
246
247
248       if test "x$CONFIG_SHELL" != x; then :
249   export CONFIG_SHELL
250              # We cannot yet assume a decent shell, so we have to provide a
251 # neutralization value for shells without unset; and this also
252 # works around shells that cannot unset nonexistent variables.
253 # Preserve -v and -x to the replacement shell.
254 BASH_ENV=/dev/null
255 ENV=/dev/null
256 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
257 case $- in # ((((
258   *v*x* | *x*v* ) as_opts=-vx ;;
259   *v* ) as_opts=-v ;;
260   *x* ) as_opts=-x ;;
261   * ) as_opts= ;;
262 esac
263 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
264 # Admittedly, this is quite paranoid, since all the known shells bail
265 # out after a failed `exec'.
266 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
267 exit 255
268 fi
269
270     if test x$as_have_required = xno; then :
271   $as_echo "$0: This script requires a shell more modern than all"
272   $as_echo "$0: the shells that I found on your system."
273   if test x${ZSH_VERSION+set} = xset ; then
274     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
275     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
276   else
277     $as_echo "$0: Please tell bug-autoconf@gnu.org and
278 $0: http://bugs.ntp.org./ about your system, including any
279 $0: error possibly output before this message. Then install
280 $0: a modern shell, or manually run the script under such a
281 $0: shell if you do have one."
282   fi
283   exit 1
284 fi
285 fi
286 fi
287 SHELL=${CONFIG_SHELL-/bin/sh}
288 export SHELL
289 # Unset more variables known to interfere with behavior of common tools.
290 CLICOLOR_FORCE= GREP_OPTIONS=
291 unset CLICOLOR_FORCE GREP_OPTIONS
292
293 ## --------------------- ##
294 ## M4sh Shell Functions. ##
295 ## --------------------- ##
296 # as_fn_unset VAR
297 # ---------------
298 # Portably unset VAR.
299 as_fn_unset ()
300 {
301   { eval $1=; unset $1;}
302 }
303 as_unset=as_fn_unset
304
305 # as_fn_set_status STATUS
306 # -----------------------
307 # Set $? to STATUS, without forking.
308 as_fn_set_status ()
309 {
310   return $1
311 } # as_fn_set_status
312
313 # as_fn_exit STATUS
314 # -----------------
315 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
316 as_fn_exit ()
317 {
318   set +e
319   as_fn_set_status $1
320   exit $1
321 } # as_fn_exit
322
323 # as_fn_mkdir_p
324 # -------------
325 # Create "$as_dir" as a directory, including parents if necessary.
326 as_fn_mkdir_p ()
327 {
328
329   case $as_dir in #(
330   -*) as_dir=./$as_dir;;
331   esac
332   test -d "$as_dir" || eval $as_mkdir_p || {
333     as_dirs=
334     while :; do
335       case $as_dir in #(
336       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
337       *) as_qdir=$as_dir;;
338       esac
339       as_dirs="'$as_qdir' $as_dirs"
340       as_dir=`$as_dirname -- "$as_dir" ||
341 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
342          X"$as_dir" : 'X\(//\)[^/]' \| \
343          X"$as_dir" : 'X\(//\)$' \| \
344          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
345 $as_echo X"$as_dir" |
346     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
347             s//\1/
348             q
349           }
350           /^X\(\/\/\)[^/].*/{
351             s//\1/
352             q
353           }
354           /^X\(\/\/\)$/{
355             s//\1/
356             q
357           }
358           /^X\(\/\).*/{
359             s//\1/
360             q
361           }
362           s/.*/./; q'`
363       test -d "$as_dir" && break
364     done
365     test -z "$as_dirs" || eval "mkdir $as_dirs"
366   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
367
368
369 } # as_fn_mkdir_p
370
371 # as_fn_executable_p FILE
372 # -----------------------
373 # Test if FILE is an executable regular file.
374 as_fn_executable_p ()
375 {
376   test -f "$1" && test -x "$1"
377 } # as_fn_executable_p
378 # as_fn_append VAR VALUE
379 # ----------------------
380 # Append the text in VALUE to the end of the definition contained in VAR. Take
381 # advantage of any shell optimizations that allow amortized linear growth over
382 # repeated appends, instead of the typical quadratic growth present in naive
383 # implementations.
384 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
385   eval 'as_fn_append ()
386   {
387     eval $1+=\$2
388   }'
389 else
390   as_fn_append ()
391   {
392     eval $1=\$$1\$2
393   }
394 fi # as_fn_append
395
396 # as_fn_arith ARG...
397 # ------------------
398 # Perform arithmetic evaluation on the ARGs, and store the result in the
399 # global $as_val. Take advantage of shells that can avoid forks. The arguments
400 # must be portable across $(()) and expr.
401 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
402   eval 'as_fn_arith ()
403   {
404     as_val=$(( $* ))
405   }'
406 else
407   as_fn_arith ()
408   {
409     as_val=`expr "$@" || test $? -eq 1`
410   }
411 fi # as_fn_arith
412
413
414 # as_fn_error STATUS ERROR [LINENO LOG_FD]
415 # ----------------------------------------
416 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
417 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
418 # script with STATUS, using 1 if that was 0.
419 as_fn_error ()
420 {
421   as_status=$1; test $as_status -eq 0 && as_status=1
422   if test "$4"; then
423     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
424     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
425   fi
426   $as_echo "$as_me: error: $2" >&2
427   as_fn_exit $as_status
428 } # as_fn_error
429
430 if expr a : '\(a\)' >/dev/null 2>&1 &&
431    test "X`expr 00001 : '.*\(...\)'`" = X001; then
432   as_expr=expr
433 else
434   as_expr=false
435 fi
436
437 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
438   as_basename=basename
439 else
440   as_basename=false
441 fi
442
443 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
444   as_dirname=dirname
445 else
446   as_dirname=false
447 fi
448
449 as_me=`$as_basename -- "$0" ||
450 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
451          X"$0" : 'X\(//\)$' \| \
452          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
453 $as_echo X/"$0" |
454     sed '/^.*\/\([^/][^/]*\)\/*$/{
455             s//\1/
456             q
457           }
458           /^X\/\(\/\/\)$/{
459             s//\1/
460             q
461           }
462           /^X\/\(\/\).*/{
463             s//\1/
464             q
465           }
466           s/.*/./; q'`
467
468 # Avoid depending upon Character Ranges.
469 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
470 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
471 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
472 as_cr_digits='0123456789'
473 as_cr_alnum=$as_cr_Letters$as_cr_digits
474
475
476   as_lineno_1=$LINENO as_lineno_1a=$LINENO
477   as_lineno_2=$LINENO as_lineno_2a=$LINENO
478   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
479   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
480   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
481   sed -n '
482     p
483     /[$]LINENO/=
484   ' <$as_myself |
485     sed '
486       s/[$]LINENO.*/&-/
487       t lineno
488       b
489       :lineno
490       N
491       :loop
492       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
493       t loop
494       s/-\n.*//
495     ' >$as_me.lineno &&
496   chmod +x "$as_me.lineno" ||
497     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
498
499   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
500   # already done that, so ensure we don't try to do so again and fall
501   # in an infinite loop.  This has already happened in practice.
502   _as_can_reexec=no; export _as_can_reexec
503   # Don't try to exec as it changes $[0], causing all sort of problems
504   # (the dirname of $[0] is not the place where we might find the
505   # original and so on.  Autoconf is especially sensitive to this).
506   . "./$as_me.lineno"
507   # Exit status is that of the last command.
508   exit
509 }
510
511 ECHO_C= ECHO_N= ECHO_T=
512 case `echo -n x` in #(((((
513 -n*)
514   case `echo 'xy\c'` in
515   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
516   xy)  ECHO_C='\c';;
517   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
518        ECHO_T=' ';;
519   esac;;
520 *)
521   ECHO_N='-n';;
522 esac
523
524 rm -f conf$$ conf$$.exe conf$$.file
525 if test -d conf$$.dir; then
526   rm -f conf$$.dir/conf$$.file
527 else
528   rm -f conf$$.dir
529   mkdir conf$$.dir 2>/dev/null
530 fi
531 if (echo >conf$$.file) 2>/dev/null; then
532   if ln -s conf$$.file conf$$ 2>/dev/null; then
533     as_ln_s='ln -s'
534     # ... but there are two gotchas:
535     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
536     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
537     # In both cases, we have to default to `cp -pR'.
538     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
539       as_ln_s='cp -pR'
540   elif ln conf$$.file conf$$ 2>/dev/null; then
541     as_ln_s=ln
542   else
543     as_ln_s='cp -pR'
544   fi
545 else
546   as_ln_s='cp -pR'
547 fi
548 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
549 rmdir conf$$.dir 2>/dev/null
550
551 if mkdir -p . 2>/dev/null; then
552   as_mkdir_p='mkdir -p "$as_dir"'
553 else
554   test -d ./-p && rmdir ./-p
555   as_mkdir_p=false
556 fi
557
558 as_test_x='test -x'
559 as_executable_p=as_fn_executable_p
560
561 # Sed expression to map a string onto a valid CPP name.
562 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
563
564 # Sed expression to map a string onto a valid variable name.
565 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
566
567 SHELL=${CONFIG_SHELL-/bin/sh}
568
569
570 test -n "$DJDIR" || exec 7<&0 </dev/null
571 exec 6>&1
572
573 # Name of the host.
574 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
575 # so uname gets run too.
576 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
577
578 #
579 # Initializations.
580 #
581 ac_default_prefix=/usr/local
582 ac_clean_files=
583 ac_config_libobj_dir=.
584 LIBOBJS=
585 cross_compiling=no
586 subdirs=
587 MFLAGS=
588 MAKEFLAGS=
589
590 # Identity of this package.
591 PACKAGE_NAME='sntp'
592 PACKAGE_TARNAME='sntp'
593 PACKAGE_VERSION='4.2.8p10'
594 PACKAGE_STRING='sntp 4.2.8p10'
595 PACKAGE_BUGREPORT='http://bugs.ntp.org./'
596 PACKAGE_URL='http://www.ntp.org./'
597
598 # Factoring default headers for most tests.
599 ac_includes_default="\
600 #include <stdio.h>
601 #ifdef HAVE_SYS_TYPES_H
602 # include <sys/types.h>
603 #endif
604 #ifdef HAVE_SYS_STAT_H
605 # include <sys/stat.h>
606 #endif
607 #ifdef STDC_HEADERS
608 # include <stdlib.h>
609 # include <stddef.h>
610 #else
611 # ifdef HAVE_STDLIB_H
612 #  include <stdlib.h>
613 # endif
614 #endif
615 #ifdef HAVE_STRING_H
616 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
617 #  include <memory.h>
618 # endif
619 # include <string.h>
620 #endif
621 #ifdef HAVE_STRINGS_H
622 # include <strings.h>
623 #endif
624 #ifdef HAVE_INTTYPES_H
625 # include <inttypes.h>
626 #endif
627 #ifdef HAVE_STDINT_H
628 # include <stdint.h>
629 #endif
630 #ifdef HAVE_UNISTD_H
631 # include <unistd.h>
632 #endif"
633
634 ac_header_list=
635 enable_option_checking=no
636 ac_subst_vars='am__EXEEXT_FALSE
637 am__EXEEXT_TRUE
638 LTLIBOBJS
639 BUILD_TEST_KODFILE_FALSE
640 BUILD_TEST_KODFILE_TRUE
641 BUILD_TEST_KODDATABASE_FALSE
642 BUILD_TEST_KODDATABASE_TRUE
643 UNITYBUILD_AVAILABLE_FALSE
644 UNITYBUILD_AVAILABLE_TRUE
645 PATH_RUBY
646 VER_SUFFIX
647 LIB_SYSLOG
648 subdirs
649 BUILD_LIBEVENT_FALSE
650 BUILD_LIBEVENT_TRUE
651 LDADD_LIBEVENT
652 CPPFLAGS_LIBEVENT
653 CFLAGS_LIBEVENT
654 PKG_CONFIG
655 NTP_FORCE_LIBEVENT_DIST
656 LIBOPTS_DIR
657 LIBOPTS_CFLAGS
658 LIBOPTS_LDADD
659 NEED_LIBOPTS_FALSE
660 NEED_LIBOPTS_TRUE
661 INSTALL_LIBOPTS_FALSE
662 INSTALL_LIBOPTS_TRUE
663 POSIX_SHELL
664 GL_GENERATE_STDNORETURN_H_FALSE
665 GL_GENERATE_STDNORETURN_H_TRUE
666 STDNORETURN_H
667 BUILD_SNTP_FALSE
668 BUILD_SNTP_TRUE
669 SNTP
670 LIBTOOL_DEPS
671 LT_SYS_LIBRARY_PATH
672 OTOOL64
673 OTOOL
674 LIPO
675 NMEDIT
676 DSYMUTIL
677 MANIFEST_TOOL
678 RANLIB
679 DLLTOOL
680 OBJDUMP
681 LN_S
682 NM
683 ac_ct_DUMPBIN
684 DUMPBIN
685 LIBTOOL
686 LIBOBJS
687 PTHREADS_FALSE
688 PTHREADS_TRUE
689 LIBISC_PTHREADS_NOTHREADS
690 PTHREAD_LIBS
691 LTHREAD_LIBS
692 BUILD_THREAD
693 HAVE_INLINE
694 LDADD_LIBUTIL
695 ALLOCA
696 LIBM
697 EDITLINE_LIBS
698 LD
699 FGREP
700 SED
701 LDADD_LIBNTP
702 NTP_CROSSCOMPILE_FALSE
703 NTP_CROSSCOMPILE_TRUE
704 ac_ct_AR
705 AR
706 INSTALL_UPDATE_LEAP_FALSE
707 INSTALL_UPDATE_LEAP_TRUE
708 UPDATE_LEAP_NI
709 UPDATE_LEAP_MS
710 UPDATE_LEAP_DS
711 UPDATE_LEAP_DL
712 UPDATE_LEAP_DB
713 TIMETRIM_NI
714 TIMETRIM_MS
715 TIMETRIM_DS
716 TIMETRIM_DL
717 TIMETRIM_DB
718 TICKADJ_NI
719 TICKADJ_MS
720 TICKADJ_DS
721 TICKADJ_DL
722 TICKADJ_DB
723 SNTP_NI
724 SNTP_MS
725 SNTP_DS
726 SNTP_DL
727 SNTP_DB
728 NTP_WAIT_NI
729 NTP_WAIT_MS
730 NTP_WAIT_DS
731 NTP_WAIT_DL
732 NTP_WAIT_DB
733 NTP_KEYGEN_NI
734 NTP_KEYGEN_MS
735 NTP_KEYGEN_DS
736 NTP_KEYGEN_DL
737 NTP_KEYGEN_DB
738 NTPTRACE_NI
739 NTPTRACE_MS
740 NTPTRACE_DS
741 NTPTRACE_DL
742 NTPTRACE_DB
743 NTPTIME_NI
744 NTPTIME_MS
745 NTPTIME_DS
746 NTPTIME_DL
747 NTPTIME_DB
748 INSTALL_NTPSWEEP_FALSE
749 INSTALL_NTPSWEEP_TRUE
750 NTPSWEEP_NI
751 NTPSWEEP_MS
752 NTPSWEEP_DS
753 NTPSWEEP_DL
754 NTPSWEEP_DB
755 NTPSNMPD_NI
756 NTPSNMPD_MS
757 NTPSNMPD_DS
758 NTPSNMPD_DL
759 NTPSNMPD_DB
760 NTPQ_NI
761 NTPQ_MS
762 NTPQ_DS
763 NTPQ_DL
764 NTPQ_DB
765 NTPD_NI
766 NTPD_MS
767 NTPD_DS
768 NTPD_DL
769 NTPD_DB
770 NTPDSIM_NI
771 NTPDSIM_MS
772 NTPDSIM_DS
773 NTPDSIM_DL
774 NTPDSIM_DB
775 NTPDC_NI
776 NTPDC_MS
777 NTPDC_DS
778 NTPDC_DL
779 NTPDC_DB
780 NTPDATE_NI
781 NTPDATE_MS
782 NTPDATE_DS
783 NTPDATE_DL
784 NTPDATE_DB
785 MANTAGFMT
786 CALC_TICKADJ_NI
787 CALC_TICKADJ_MS
788 CALC_TICKADJ_DS
789 CALC_TICKADJ_DL
790 CALC_TICKADJ_DB
791 WANT_CALC_TICKADJ_MS_FALSE
792 WANT_CALC_TICKADJ_MS_TRUE
793 NTP_HARD_LDFLAGS
794 NTP_HARD_CPPFLAGS
795 NTP_HARD_CFLAGS
796 LDFLAGS_NTP
797 LDADD_NTP
798 CPPFLAGS_NTP
799 CFLAGS_NTP
800 EGREP
801 GREP
802 CPP
803 am__fastdepCC_FALSE
804 am__fastdepCC_TRUE
805 CCDEPMODE
806 am__nodep
807 AMDEPBACKSLASH
808 AMDEP_FALSE
809 AMDEP_TRUE
810 am__quote
811 am__include
812 DEPDIR
813 OBJEXT
814 EXEEXT
815 ac_ct_CC
816 CPPFLAGS
817 LDFLAGS
818 CFLAGS
819 CC
820 host_os
821 host_vendor
822 host_cpu
823 host
824 build_os
825 build_vendor
826 build_cpu
827 build
828 AM_BACKSLASH
829 AM_DEFAULT_VERBOSITY
830 AM_DEFAULT_V
831 AM_V
832 am__untar
833 am__tar
834 AMTAR
835 am__leading_dot
836 SET_MAKE
837 AWK
838 mkdir_p
839 MKDIR_P
840 INSTALL_STRIP_PROGRAM
841 STRIP
842 install_sh
843 MAKEINFO
844 AUTOHEADER
845 AUTOMAKE
846 AUTOCONF
847 ACLOCAL
848 VERSION
849 PACKAGE
850 CYGPATH_W
851 am__isrc
852 INSTALL_DATA
853 INSTALL_SCRIPT
854 INSTALL_PROGRAM
855 target_alias
856 host_alias
857 build_alias
858 LIBS
859 ECHO_T
860 ECHO_N
861 ECHO_C
862 DEFS
863 mandir
864 localedir
865 libdir
866 psdir
867 pdfdir
868 dvidir
869 htmldir
870 infodir
871 docdir
872 oldincludedir
873 includedir
874 localstatedir
875 sharedstatedir
876 sysconfdir
877 datadir
878 datarootdir
879 libexecdir
880 sbindir
881 bindir
882 program_transform_name
883 prefix
884 exec_prefix
885 PACKAGE_URL
886 PACKAGE_BUGREPORT
887 PACKAGE_STRING
888 PACKAGE_VERSION
889 PACKAGE_TARNAME
890 PACKAGE_NAME
891 PATH_SEPARATOR
892 SHELL'
893 ac_subst_files=''
894 ac_user_opts='
895 enable_option_checking
896 enable_silent_rules
897 enable_dependency_tracking
898 with_locfile
899 with_gnu_ld
900 with_lineeditlibs
901 enable_debugging
902 enable_thread_support
903 with_threads
904 with_yielding_select
905 enable_c99_snprintf
906 enable_clockctl
907 enable_linuxcaps
908 enable_solarisprivs
909 enable_shared
910 enable_static
911 with_pic
912 enable_fast_install
913 with_aix_soname
914 with_sysroot
915 enable_libtool_lock
916 with_sntp
917 enable_nls
918 enable_local_libopts
919 enable_libopts_install
920 with_autoopts_config
921 with_regex_header
922 with_libregex
923 with_libregex_cflags
924 with_libregex_libs
925 enable_optional_args
926 enable_local_libevent
927 with_crypto
928 with_openssl_libdir
929 with_openssl_incdir
930 with_rpath
931 enable_ipv6
932 with_kame
933 enable_getifaddrs
934 enable_problem_tests
935 '
936       ac_precious_vars='build_alias
937 host_alias
938 target_alias
939 CC
940 CFLAGS
941 LDFLAGS
942 LIBS
943 CPPFLAGS
944 CPP
945 LT_SYS_LIBRARY_PATH'
946 ac_subdirs_all='libevent'
947
948 # Initialize some variables set by options.
949 ac_init_help=
950 ac_init_version=false
951 ac_unrecognized_opts=
952 ac_unrecognized_sep=
953 # The variables have the same names as the options, with
954 # dashes changed to underlines.
955 cache_file=/dev/null
956 exec_prefix=NONE
957 no_create=
958 no_recursion=
959 prefix=NONE
960 program_prefix=NONE
961 program_suffix=NONE
962 program_transform_name=s,x,x,
963 silent=
964 site=
965 srcdir=
966 verbose=
967 x_includes=NONE
968 x_libraries=NONE
969
970 # Installation directory options.
971 # These are left unexpanded so users can "make install exec_prefix=/foo"
972 # and all the variables that are supposed to be based on exec_prefix
973 # by default will actually change.
974 # Use braces instead of parens because sh, perl, etc. also accept them.
975 # (The list follows the same order as the GNU Coding Standards.)
976 bindir='${exec_prefix}/bin'
977 sbindir='${exec_prefix}/sbin'
978 libexecdir='${exec_prefix}/libexec'
979 datarootdir='${prefix}/share'
980 datadir='${datarootdir}'
981 sysconfdir='${prefix}/etc'
982 sharedstatedir='${prefix}/com'
983 localstatedir='${prefix}/var'
984 includedir='${prefix}/include'
985 oldincludedir='/usr/include'
986 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
987 infodir='${datarootdir}/info'
988 htmldir='${docdir}'
989 dvidir='${docdir}'
990 pdfdir='${docdir}'
991 psdir='${docdir}'
992 libdir='${exec_prefix}/lib'
993 localedir='${datarootdir}/locale'
994 mandir='${datarootdir}/man'
995
996 ac_prev=
997 ac_dashdash=
998 for ac_option
999 do
1000   # If the previous option needs an argument, assign it.
1001   if test -n "$ac_prev"; then
1002     eval $ac_prev=\$ac_option
1003     ac_prev=
1004     continue
1005   fi
1006
1007   case $ac_option in
1008   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1009   *=)   ac_optarg= ;;
1010   *)    ac_optarg=yes ;;
1011   esac
1012
1013   # Accept the important Cygnus configure options, so we can diagnose typos.
1014
1015   case $ac_dashdash$ac_option in
1016   --)
1017     ac_dashdash=yes ;;
1018
1019   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1020     ac_prev=bindir ;;
1021   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1022     bindir=$ac_optarg ;;
1023
1024   -build | --build | --buil | --bui | --bu)
1025     ac_prev=build_alias ;;
1026   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1027     build_alias=$ac_optarg ;;
1028
1029   -cache-file | --cache-file | --cache-fil | --cache-fi \
1030   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1031     ac_prev=cache_file ;;
1032   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1033   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1034     cache_file=$ac_optarg ;;
1035
1036   --config-cache | -C)
1037     cache_file=config.cache ;;
1038
1039   -datadir | --datadir | --datadi | --datad)
1040     ac_prev=datadir ;;
1041   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1042     datadir=$ac_optarg ;;
1043
1044   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1045   | --dataroo | --dataro | --datar)
1046     ac_prev=datarootdir ;;
1047   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1048   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1049     datarootdir=$ac_optarg ;;
1050
1051   -disable-* | --disable-*)
1052     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1053     # Reject names that are not valid shell variable names.
1054     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1055       as_fn_error $? "invalid feature name: $ac_useropt"
1056     ac_useropt_orig=$ac_useropt
1057     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1058     case $ac_user_opts in
1059       *"
1060 "enable_$ac_useropt"
1061 "*) ;;
1062       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1063          ac_unrecognized_sep=', ';;
1064     esac
1065     eval enable_$ac_useropt=no ;;
1066
1067   -docdir | --docdir | --docdi | --doc | --do)
1068     ac_prev=docdir ;;
1069   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1070     docdir=$ac_optarg ;;
1071
1072   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1073     ac_prev=dvidir ;;
1074   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1075     dvidir=$ac_optarg ;;
1076
1077   -enable-* | --enable-*)
1078     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1079     # Reject names that are not valid shell variable names.
1080     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1081       as_fn_error $? "invalid feature name: $ac_useropt"
1082     ac_useropt_orig=$ac_useropt
1083     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1084     case $ac_user_opts in
1085       *"
1086 "enable_$ac_useropt"
1087 "*) ;;
1088       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1089          ac_unrecognized_sep=', ';;
1090     esac
1091     eval enable_$ac_useropt=\$ac_optarg ;;
1092
1093   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1094   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1095   | --exec | --exe | --ex)
1096     ac_prev=exec_prefix ;;
1097   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1098   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1099   | --exec=* | --exe=* | --ex=*)
1100     exec_prefix=$ac_optarg ;;
1101
1102   -gas | --gas | --ga | --g)
1103     # Obsolete; use --with-gas.
1104     with_gas=yes ;;
1105
1106   -help | --help | --hel | --he | -h)
1107     ac_init_help=long ;;
1108   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1109     ac_init_help=recursive ;;
1110   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1111     ac_init_help=short ;;
1112
1113   -host | --host | --hos | --ho)
1114     ac_prev=host_alias ;;
1115   -host=* | --host=* | --hos=* | --ho=*)
1116     host_alias=$ac_optarg ;;
1117
1118   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1119     ac_prev=htmldir ;;
1120   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1121   | --ht=*)
1122     htmldir=$ac_optarg ;;
1123
1124   -includedir | --includedir | --includedi | --included | --include \
1125   | --includ | --inclu | --incl | --inc)
1126     ac_prev=includedir ;;
1127   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1128   | --includ=* | --inclu=* | --incl=* | --inc=*)
1129     includedir=$ac_optarg ;;
1130
1131   -infodir | --infodir | --infodi | --infod | --info | --inf)
1132     ac_prev=infodir ;;
1133   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1134     infodir=$ac_optarg ;;
1135
1136   -libdir | --libdir | --libdi | --libd)
1137     ac_prev=libdir ;;
1138   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1139     libdir=$ac_optarg ;;
1140
1141   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1142   | --libexe | --libex | --libe)
1143     ac_prev=libexecdir ;;
1144   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1145   | --libexe=* | --libex=* | --libe=*)
1146     libexecdir=$ac_optarg ;;
1147
1148   -localedir | --localedir | --localedi | --localed | --locale)
1149     ac_prev=localedir ;;
1150   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1151     localedir=$ac_optarg ;;
1152
1153   -localstatedir | --localstatedir | --localstatedi | --localstated \
1154   | --localstate | --localstat | --localsta | --localst | --locals)
1155     ac_prev=localstatedir ;;
1156   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1157   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1158     localstatedir=$ac_optarg ;;
1159
1160   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1161     ac_prev=mandir ;;
1162   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1163     mandir=$ac_optarg ;;
1164
1165   -nfp | --nfp | --nf)
1166     # Obsolete; use --without-fp.
1167     with_fp=no ;;
1168
1169   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1170   | --no-cr | --no-c | -n)
1171     no_create=yes ;;
1172
1173   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1174   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1175     no_recursion=yes ;;
1176
1177   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1178   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1179   | --oldin | --oldi | --old | --ol | --o)
1180     ac_prev=oldincludedir ;;
1181   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1182   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1183   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1184     oldincludedir=$ac_optarg ;;
1185
1186   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1187     ac_prev=prefix ;;
1188   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1189     prefix=$ac_optarg ;;
1190
1191   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1192   | --program-pre | --program-pr | --program-p)
1193     ac_prev=program_prefix ;;
1194   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1195   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1196     program_prefix=$ac_optarg ;;
1197
1198   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1199   | --program-suf | --program-su | --program-s)
1200     ac_prev=program_suffix ;;
1201   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1202   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1203     program_suffix=$ac_optarg ;;
1204
1205   -program-transform-name | --program-transform-name \
1206   | --program-transform-nam | --program-transform-na \
1207   | --program-transform-n | --program-transform- \
1208   | --program-transform | --program-transfor \
1209   | --program-transfo | --program-transf \
1210   | --program-trans | --program-tran \
1211   | --progr-tra | --program-tr | --program-t)
1212     ac_prev=program_transform_name ;;
1213   -program-transform-name=* | --program-transform-name=* \
1214   | --program-transform-nam=* | --program-transform-na=* \
1215   | --program-transform-n=* | --program-transform-=* \
1216   | --program-transform=* | --program-transfor=* \
1217   | --program-transfo=* | --program-transf=* \
1218   | --program-trans=* | --program-tran=* \
1219   | --progr-tra=* | --program-tr=* | --program-t=*)
1220     program_transform_name=$ac_optarg ;;
1221
1222   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1223     ac_prev=pdfdir ;;
1224   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1225     pdfdir=$ac_optarg ;;
1226
1227   -psdir | --psdir | --psdi | --psd | --ps)
1228     ac_prev=psdir ;;
1229   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1230     psdir=$ac_optarg ;;
1231
1232   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1233   | -silent | --silent | --silen | --sile | --sil)
1234     silent=yes ;;
1235
1236   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1237     ac_prev=sbindir ;;
1238   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1239   | --sbi=* | --sb=*)
1240     sbindir=$ac_optarg ;;
1241
1242   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1243   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1244   | --sharedst | --shareds | --shared | --share | --shar \
1245   | --sha | --sh)
1246     ac_prev=sharedstatedir ;;
1247   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1248   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1249   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1250   | --sha=* | --sh=*)
1251     sharedstatedir=$ac_optarg ;;
1252
1253   -site | --site | --sit)
1254     ac_prev=site ;;
1255   -site=* | --site=* | --sit=*)
1256     site=$ac_optarg ;;
1257
1258   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1259     ac_prev=srcdir ;;
1260   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1261     srcdir=$ac_optarg ;;
1262
1263   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1264   | --syscon | --sysco | --sysc | --sys | --sy)
1265     ac_prev=sysconfdir ;;
1266   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1267   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1268     sysconfdir=$ac_optarg ;;
1269
1270   -target | --target | --targe | --targ | --tar | --ta | --t)
1271     ac_prev=target_alias ;;
1272   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1273     target_alias=$ac_optarg ;;
1274
1275   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1276     verbose=yes ;;
1277
1278   -version | --version | --versio | --versi | --vers | -V)
1279     ac_init_version=: ;;
1280
1281   -with-* | --with-*)
1282     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1283     # Reject names that are not valid shell variable names.
1284     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1285       as_fn_error $? "invalid package name: $ac_useropt"
1286     ac_useropt_orig=$ac_useropt
1287     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1288     case $ac_user_opts in
1289       *"
1290 "with_$ac_useropt"
1291 "*) ;;
1292       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1293          ac_unrecognized_sep=', ';;
1294     esac
1295     eval with_$ac_useropt=\$ac_optarg ;;
1296
1297   -without-* | --without-*)
1298     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1299     # Reject names that are not valid shell variable names.
1300     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1301       as_fn_error $? "invalid package name: $ac_useropt"
1302     ac_useropt_orig=$ac_useropt
1303     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1304     case $ac_user_opts in
1305       *"
1306 "with_$ac_useropt"
1307 "*) ;;
1308       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1309          ac_unrecognized_sep=', ';;
1310     esac
1311     eval with_$ac_useropt=no ;;
1312
1313   --x)
1314     # Obsolete; use --with-x.
1315     with_x=yes ;;
1316
1317   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1318   | --x-incl | --x-inc | --x-in | --x-i)
1319     ac_prev=x_includes ;;
1320   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1321   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1322     x_includes=$ac_optarg ;;
1323
1324   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1325   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1326     ac_prev=x_libraries ;;
1327   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1328   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1329     x_libraries=$ac_optarg ;;
1330
1331   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1332 Try \`$0 --help' for more information"
1333     ;;
1334
1335   *=*)
1336     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1337     # Reject names that are not valid shell variable names.
1338     case $ac_envvar in #(
1339       '' | [0-9]* | *[!_$as_cr_alnum]* )
1340       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1341     esac
1342     eval $ac_envvar=\$ac_optarg
1343     export $ac_envvar ;;
1344
1345   *)
1346     # FIXME: should be removed in autoconf 3.0.
1347     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1348     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1349       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1350     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1351     ;;
1352
1353   esac
1354 done
1355
1356 if test -n "$ac_prev"; then
1357   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1358   as_fn_error $? "missing argument to $ac_option"
1359 fi
1360
1361 if test -n "$ac_unrecognized_opts"; then
1362   case $enable_option_checking in
1363     no) ;;
1364     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1365     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1366   esac
1367 fi
1368
1369 # Check all directory arguments for consistency.
1370 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1371                 datadir sysconfdir sharedstatedir localstatedir includedir \
1372                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1373                 libdir localedir mandir
1374 do
1375   eval ac_val=\$$ac_var
1376   # Remove trailing slashes.
1377   case $ac_val in
1378     */ )
1379       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1380       eval $ac_var=\$ac_val;;
1381   esac
1382   # Be sure to have absolute directory names.
1383   case $ac_val in
1384     [\\/$]* | ?:[\\/]* )  continue;;
1385     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1386   esac
1387   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1388 done
1389
1390 # There might be people who depend on the old broken behavior: `$host'
1391 # used to hold the argument of --host etc.
1392 # FIXME: To remove some day.
1393 build=$build_alias
1394 host=$host_alias
1395 target=$target_alias
1396
1397 # FIXME: To remove some day.
1398 if test "x$host_alias" != x; then
1399   if test "x$build_alias" = x; then
1400     cross_compiling=maybe
1401   elif test "x$build_alias" != "x$host_alias"; then
1402     cross_compiling=yes
1403   fi
1404 fi
1405
1406 ac_tool_prefix=
1407 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1408
1409 test "$silent" = yes && exec 6>/dev/null
1410
1411
1412 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1413 ac_ls_di=`ls -di .` &&
1414 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1415   as_fn_error $? "working directory cannot be determined"
1416 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1417   as_fn_error $? "pwd does not report name of working directory"
1418
1419
1420 # Find the source files, if location was not specified.
1421 if test -z "$srcdir"; then
1422   ac_srcdir_defaulted=yes
1423   # Try the directory containing this script, then the parent directory.
1424   ac_confdir=`$as_dirname -- "$as_myself" ||
1425 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1426          X"$as_myself" : 'X\(//\)[^/]' \| \
1427          X"$as_myself" : 'X\(//\)$' \| \
1428          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1429 $as_echo X"$as_myself" |
1430     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1431             s//\1/
1432             q
1433           }
1434           /^X\(\/\/\)[^/].*/{
1435             s//\1/
1436             q
1437           }
1438           /^X\(\/\/\)$/{
1439             s//\1/
1440             q
1441           }
1442           /^X\(\/\).*/{
1443             s//\1/
1444             q
1445           }
1446           s/.*/./; q'`
1447   srcdir=$ac_confdir
1448   if test ! -r "$srcdir/$ac_unique_file"; then
1449     srcdir=..
1450   fi
1451 else
1452   ac_srcdir_defaulted=no
1453 fi
1454 if test ! -r "$srcdir/$ac_unique_file"; then
1455   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1456   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1457 fi
1458 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1459 ac_abs_confdir=`(
1460         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1461         pwd)`
1462 # When building in place, set srcdir=.
1463 if test "$ac_abs_confdir" = "$ac_pwd"; then
1464   srcdir=.
1465 fi
1466 # Remove unnecessary trailing slashes from srcdir.
1467 # Double slashes in file names in object file debugging info
1468 # mess up M-x gdb in Emacs.
1469 case $srcdir in
1470 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1471 esac
1472 for ac_var in $ac_precious_vars; do
1473   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1474   eval ac_env_${ac_var}_value=\$${ac_var}
1475   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1476   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1477 done
1478
1479 #
1480 # Report the --help message.
1481 #
1482 if test "$ac_init_help" = "long"; then
1483   # Omit some internal or obsolete options to make the list less imposing.
1484   # This message is too long to be a string in the A/UX 3.1 sh.
1485   cat <<_ACEOF
1486 \`configure' configures sntp 4.2.8p10 to adapt to many kinds of systems.
1487
1488 Usage: $0 [OPTION]... [VAR=VALUE]...
1489
1490 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1491 VAR=VALUE.  See below for descriptions of some of the useful variables.
1492
1493 Defaults for the options are specified in brackets.
1494
1495 Configuration:
1496   -h, --help              display this help and exit
1497       --help=short        display options specific to this package
1498       --help=recursive    display the short help of all the included packages
1499   -V, --version           display version information and exit
1500   -q, --quiet, --silent   do not print \`checking ...' messages
1501       --cache-file=FILE   cache test results in FILE [disabled]
1502   -C, --config-cache      alias for \`--cache-file=config.cache'
1503   -n, --no-create         do not create output files
1504       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1505
1506 Installation directories:
1507   --prefix=PREFIX         install architecture-independent files in PREFIX
1508                           [$ac_default_prefix]
1509   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1510                           [PREFIX]
1511
1512 By default, \`make install' will install all the files in
1513 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1514 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1515 for instance \`--prefix=\$HOME'.
1516
1517 For better control, use the options below.
1518
1519 Fine tuning of the installation directories:
1520   --bindir=DIR            user executables [EPREFIX/bin]
1521   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1522   --libexecdir=DIR        program executables [EPREFIX/libexec]
1523   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1524   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1525   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1526   --libdir=DIR            object code libraries [EPREFIX/lib]
1527   --includedir=DIR        C header files [PREFIX/include]
1528   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1529   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1530   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1531   --infodir=DIR           info documentation [DATAROOTDIR/info]
1532   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1533   --mandir=DIR            man documentation [DATAROOTDIR/man]
1534   --docdir=DIR            documentation root [DATAROOTDIR/doc/sntp]
1535   --htmldir=DIR           html documentation [DOCDIR]
1536   --dvidir=DIR            dvi documentation [DOCDIR]
1537   --pdfdir=DIR            pdf documentation [DOCDIR]
1538   --psdir=DIR             ps documentation [DOCDIR]
1539 _ACEOF
1540
1541   cat <<\_ACEOF
1542
1543 Program names:
1544   --program-prefix=PREFIX            prepend PREFIX to installed program names
1545   --program-suffix=SUFFIX            append SUFFIX to installed program names
1546   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1547
1548 System types:
1549   --build=BUILD     configure for building on BUILD [guessed]
1550   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1551 _ACEOF
1552 fi
1553
1554 if test -n "$ac_init_help"; then
1555   case $ac_init_help in
1556      short | recursive ) echo "Configuration of sntp 4.2.8p10:";;
1557    esac
1558   cat <<\_ACEOF
1559
1560 Optional Features:
1561   --disable-option-checking  ignore unrecognized --enable/--with options
1562   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1563   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1564   --enable-silent-rules   less verbose build output (undo: "make V=1")
1565   --disable-silent-rules  verbose build output (undo: "make V=0")
1566   --enable-dependency-tracking
1567                           do not reject slow dependency extractors
1568   --disable-dependency-tracking
1569                           speeds up one-time build
1570   defaults:               + yes, - no, s system-specific
1571   --enable-debugging      + include ntpd debugging code
1572   --enable-thread-support s use threads (+ if available)
1573   --enable-c99-snprintf   s force replacement
1574   --enable-clockctl       s Use /dev/clockctl for non-root clock control
1575   --enable-linuxcaps      + Use Linux capabilities for non-root clock control
1576   --enable-solarisprivs   + Use Solaris privileges for non-root clock control
1577   --enable-shared[=PKGS]  build shared libraries [default=no]
1578   --enable-static[=PKGS]  build static libraries [default=yes]
1579   --enable-fast-install[=PKGS]
1580                           optimize for fast installation [default=yes]
1581   --disable-libtool-lock  avoid locking (might break parallel builds)
1582   --disable-nls           disable nls support in libopts
1583   --enable-local-libopts  Use the supplied libopts tearoff code
1584   --enable-libopts-install
1585                           Install libopts with client installation
1586   --disable-optional-args not wanting optional option args
1587   --enable-local-libevent Force using the supplied libevent tearoff code
1588   --enable-ipv6           s use IPv6?
1589
1590   --enable-getifaddrs     + Enable the use of getifaddrs() [[yes|no]].
1591   --enable-problem-tests  + enable tests with undiagnosed problems
1592
1593 Optional Packages:
1594   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1595   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1596   --with-locfile=XXX      os-specific or "legacy"
1597   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1598   --with-lineeditlibs     edit,editline (readline may be specified if desired)
1599   --with-threads          with threads [auto]
1600   --with-yielding-select  with yielding select [auto]
1601   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1602                           both]
1603   --with-aix-soname=aix|svr4|both
1604                           shared library versioning (aka "SONAME") variant to
1605                           provide on AIX, [default=aix].
1606   --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1607                           compiler's sysroot if not specified).
1608   --without-sntp          - disable building sntp and sntp/tests
1609   --with-autoopts-config  specify the config-info script
1610   --with-regex-header     a reg expr header is specified
1611   --with-libregex         libregex installation prefix
1612   --with-libregex-cflags  libregex compile flags
1613   --with-libregex-libs    libregex link command arguments
1614   --with-crypto           + =openssl,libcrypto
1615
1616   --with-openssl-libdir   + =/something/reasonable
1617
1618   --with-openssl-incdir   + =/something/reasonable
1619
1620   --without-rpath         s Disable auto-added -R linker paths
1621
1622   --with-kame             - =/usr/local/v6
1623
1624 Some influential environment variables:
1625   CC          C compiler command
1626   CFLAGS      C compiler flags
1627   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1628               nonstandard directory <lib dir>
1629   LIBS        libraries to pass to the linker, e.g. -l<library>
1630   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1631               you have headers in a nonstandard directory <include dir>
1632   CPP         C preprocessor
1633   LT_SYS_LIBRARY_PATH
1634               User-defined run-time library search path.
1635
1636 Use these variables to override the choices made by `configure' or to help
1637 it to find libraries and programs with nonstandard names/locations.
1638
1639 Report bugs to <http://bugs.ntp.org./>.
1640 sntp home page: <http://www.ntp.org./>.
1641 _ACEOF
1642 ac_status=$?
1643 fi
1644
1645 if test "$ac_init_help" = "recursive"; then
1646   # If there are subdirs, report their specific --help.
1647   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1648     test -d "$ac_dir" ||
1649       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1650       continue
1651     ac_builddir=.
1652
1653 case "$ac_dir" in
1654 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1655 *)
1656   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1657   # A ".." for each directory in $ac_dir_suffix.
1658   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1659   case $ac_top_builddir_sub in
1660   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1661   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1662   esac ;;
1663 esac
1664 ac_abs_top_builddir=$ac_pwd
1665 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1666 # for backward compatibility:
1667 ac_top_builddir=$ac_top_build_prefix
1668
1669 case $srcdir in
1670   .)  # We are building in place.
1671     ac_srcdir=.
1672     ac_top_srcdir=$ac_top_builddir_sub
1673     ac_abs_top_srcdir=$ac_pwd ;;
1674   [\\/]* | ?:[\\/]* )  # Absolute name.
1675     ac_srcdir=$srcdir$ac_dir_suffix;
1676     ac_top_srcdir=$srcdir
1677     ac_abs_top_srcdir=$srcdir ;;
1678   *) # Relative name.
1679     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1680     ac_top_srcdir=$ac_top_build_prefix$srcdir
1681     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1682 esac
1683 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1684
1685     cd "$ac_dir" || { ac_status=$?; continue; }
1686     # Check for guested configure.
1687     if test -f "$ac_srcdir/configure.gnu"; then
1688       echo &&
1689       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1690     elif test -f "$ac_srcdir/configure"; then
1691       echo &&
1692       $SHELL "$ac_srcdir/configure" --help=recursive
1693     else
1694       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1695     fi || ac_status=$?
1696     cd "$ac_pwd" || { ac_status=$?; break; }
1697   done
1698 fi
1699
1700 test -n "$ac_init_help" && exit $ac_status
1701 if $ac_init_version; then
1702   cat <<\_ACEOF
1703 sntp configure 4.2.8p10
1704 generated by GNU Autoconf 2.69
1705
1706 Copyright (C) 2012 Free Software Foundation, Inc.
1707 This configure script is free software; the Free Software Foundation
1708 gives unlimited permission to copy, distribute and modify it.
1709 _ACEOF
1710   exit
1711 fi
1712
1713 ## ------------------------ ##
1714 ## Autoconf initialization. ##
1715 ## ------------------------ ##
1716
1717 # ac_fn_c_try_compile LINENO
1718 # --------------------------
1719 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1720 ac_fn_c_try_compile ()
1721 {
1722   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1723   rm -f conftest.$ac_objext
1724   if { { ac_try="$ac_compile"
1725 case "(($ac_try" in
1726   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1727   *) ac_try_echo=$ac_try;;
1728 esac
1729 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1730 $as_echo "$ac_try_echo"; } >&5
1731   (eval "$ac_compile") 2>conftest.err
1732   ac_status=$?
1733   if test -s conftest.err; then
1734     grep -v '^ *+' conftest.err >conftest.er1
1735     cat conftest.er1 >&5
1736     mv -f conftest.er1 conftest.err
1737   fi
1738   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1739   test $ac_status = 0; } && {
1740          test -z "$ac_c_werror_flag" ||
1741          test ! -s conftest.err
1742        } && test -s conftest.$ac_objext; then :
1743   ac_retval=0
1744 else
1745   $as_echo "$as_me: failed program was:" >&5
1746 sed 's/^/| /' conftest.$ac_ext >&5
1747
1748         ac_retval=1
1749 fi
1750   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1751   as_fn_set_status $ac_retval
1752
1753 } # ac_fn_c_try_compile
1754
1755 # ac_fn_c_try_cpp LINENO
1756 # ----------------------
1757 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1758 ac_fn_c_try_cpp ()
1759 {
1760   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1761   if { { ac_try="$ac_cpp conftest.$ac_ext"
1762 case "(($ac_try" in
1763   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1764   *) ac_try_echo=$ac_try;;
1765 esac
1766 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1767 $as_echo "$ac_try_echo"; } >&5
1768   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1769   ac_status=$?
1770   if test -s conftest.err; then
1771     grep -v '^ *+' conftest.err >conftest.er1
1772     cat conftest.er1 >&5
1773     mv -f conftest.er1 conftest.err
1774   fi
1775   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1776   test $ac_status = 0; } > conftest.i && {
1777          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1778          test ! -s conftest.err
1779        }; then :
1780   ac_retval=0
1781 else
1782   $as_echo "$as_me: failed program was:" >&5
1783 sed 's/^/| /' conftest.$ac_ext >&5
1784
1785     ac_retval=1
1786 fi
1787   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1788   as_fn_set_status $ac_retval
1789
1790 } # ac_fn_c_try_cpp
1791
1792 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1793 # -------------------------------------------------------
1794 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1795 # the include files in INCLUDES and setting the cache variable VAR
1796 # accordingly.
1797 ac_fn_c_check_header_mongrel ()
1798 {
1799   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1800   if eval \${$3+:} false; then :
1801   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1802 $as_echo_n "checking for $2... " >&6; }
1803 if eval \${$3+:} false; then :
1804   $as_echo_n "(cached) " >&6
1805 fi
1806 eval ac_res=\$$3
1807                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1808 $as_echo "$ac_res" >&6; }
1809 else
1810   # Is the header compilable?
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1812 $as_echo_n "checking $2 usability... " >&6; }
1813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1814 /* end confdefs.h.  */
1815 $4
1816 #include <$2>
1817 _ACEOF
1818 if ac_fn_c_try_compile "$LINENO"; then :
1819   ac_header_compiler=yes
1820 else
1821   ac_header_compiler=no
1822 fi
1823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1825 $as_echo "$ac_header_compiler" >&6; }
1826
1827 # Is the header present?
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1829 $as_echo_n "checking $2 presence... " >&6; }
1830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1831 /* end confdefs.h.  */
1832 #include <$2>
1833 _ACEOF
1834 if ac_fn_c_try_cpp "$LINENO"; then :
1835   ac_header_preproc=yes
1836 else
1837   ac_header_preproc=no
1838 fi
1839 rm -f conftest.err conftest.i conftest.$ac_ext
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1841 $as_echo "$ac_header_preproc" >&6; }
1842
1843 # So?  What about this header?
1844 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1845   yes:no: )
1846     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1847 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1848     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1849 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1850     ;;
1851   no:yes:* )
1852     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1853 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1854     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1855 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1856     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1857 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1858     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1859 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1860     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1861 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1862 ( $as_echo "## ------------------------------------ ##
1863 ## Report this to http://bugs.ntp.org./ ##
1864 ## ------------------------------------ ##"
1865      ) | sed "s/^/$as_me: WARNING:     /" >&2
1866     ;;
1867 esac
1868   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1869 $as_echo_n "checking for $2... " >&6; }
1870 if eval \${$3+:} false; then :
1871   $as_echo_n "(cached) " >&6
1872 else
1873   eval "$3=\$ac_header_compiler"
1874 fi
1875 eval ac_res=\$$3
1876                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1877 $as_echo "$ac_res" >&6; }
1878 fi
1879   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1880
1881 } # ac_fn_c_check_header_mongrel
1882
1883 # ac_fn_c_try_run LINENO
1884 # ----------------------
1885 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1886 # that executables *can* be run.
1887 ac_fn_c_try_run ()
1888 {
1889   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1890   if { { ac_try="$ac_link"
1891 case "(($ac_try" in
1892   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1893   *) ac_try_echo=$ac_try;;
1894 esac
1895 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1896 $as_echo "$ac_try_echo"; } >&5
1897   (eval "$ac_link") 2>&5
1898   ac_status=$?
1899   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1900   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1901   { { case "(($ac_try" in
1902   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1903   *) ac_try_echo=$ac_try;;
1904 esac
1905 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1906 $as_echo "$ac_try_echo"; } >&5
1907   (eval "$ac_try") 2>&5
1908   ac_status=$?
1909   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1910   test $ac_status = 0; }; }; then :
1911   ac_retval=0
1912 else
1913   $as_echo "$as_me: program exited with status $ac_status" >&5
1914        $as_echo "$as_me: failed program was:" >&5
1915 sed 's/^/| /' conftest.$ac_ext >&5
1916
1917        ac_retval=$ac_status
1918 fi
1919   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1920   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1921   as_fn_set_status $ac_retval
1922
1923 } # ac_fn_c_try_run
1924
1925 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1926 # -------------------------------------------------------
1927 # Tests whether HEADER exists and can be compiled using the include files in
1928 # INCLUDES, setting the cache variable VAR accordingly.
1929 ac_fn_c_check_header_compile ()
1930 {
1931   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1932   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1933 $as_echo_n "checking for $2... " >&6; }
1934 if eval \${$3+:} false; then :
1935   $as_echo_n "(cached) " >&6
1936 else
1937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1938 /* end confdefs.h.  */
1939 $4
1940 #include <$2>
1941 _ACEOF
1942 if ac_fn_c_try_compile "$LINENO"; then :
1943   eval "$3=yes"
1944 else
1945   eval "$3=no"
1946 fi
1947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1948 fi
1949 eval ac_res=\$$3
1950                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1951 $as_echo "$ac_res" >&6; }
1952   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1953
1954 } # ac_fn_c_check_header_compile
1955
1956 # ac_fn_c_try_link LINENO
1957 # -----------------------
1958 # Try to link conftest.$ac_ext, and return whether this succeeded.
1959 ac_fn_c_try_link ()
1960 {
1961   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1962   rm -f conftest.$ac_objext conftest$ac_exeext
1963   if { { ac_try="$ac_link"
1964 case "(($ac_try" in
1965   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1966   *) ac_try_echo=$ac_try;;
1967 esac
1968 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1969 $as_echo "$ac_try_echo"; } >&5
1970   (eval "$ac_link") 2>conftest.err
1971   ac_status=$?
1972   if test -s conftest.err; then
1973     grep -v '^ *+' conftest.err >conftest.er1
1974     cat conftest.er1 >&5
1975     mv -f conftest.er1 conftest.err
1976   fi
1977   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1978   test $ac_status = 0; } && {
1979          test -z "$ac_c_werror_flag" ||
1980          test ! -s conftest.err
1981        } && test -s conftest$ac_exeext && {
1982          test "$cross_compiling" = yes ||
1983          test -x conftest$ac_exeext
1984        }; then :
1985   ac_retval=0
1986 else
1987   $as_echo "$as_me: failed program was:" >&5
1988 sed 's/^/| /' conftest.$ac_ext >&5
1989
1990         ac_retval=1
1991 fi
1992   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1993   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1994   # interfere with the next link command; also delete a directory that is
1995   # left behind by Apple's compiler.  We do this before executing the actions.
1996   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1997   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1998   as_fn_set_status $ac_retval
1999
2000 } # ac_fn_c_try_link
2001
2002 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2003 # -------------------------------------------
2004 # Tests whether TYPE exists after having included INCLUDES, setting cache
2005 # variable VAR accordingly.
2006 ac_fn_c_check_type ()
2007 {
2008   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2009   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2010 $as_echo_n "checking for $2... " >&6; }
2011 if eval \${$3+:} false; then :
2012   $as_echo_n "(cached) " >&6
2013 else
2014   eval "$3=no"
2015   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016 /* end confdefs.h.  */
2017 $4
2018 int
2019 main ()
2020 {
2021 if (sizeof ($2))
2022          return 0;
2023   ;
2024   return 0;
2025 }
2026 _ACEOF
2027 if ac_fn_c_try_compile "$LINENO"; then :
2028   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029 /* end confdefs.h.  */
2030 $4
2031 int
2032 main ()
2033 {
2034 if (sizeof (($2)))
2035             return 0;
2036   ;
2037   return 0;
2038 }
2039 _ACEOF
2040 if ac_fn_c_try_compile "$LINENO"; then :
2041
2042 else
2043   eval "$3=yes"
2044 fi
2045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2046 fi
2047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2048 fi
2049 eval ac_res=\$$3
2050                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2051 $as_echo "$ac_res" >&6; }
2052   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2053
2054 } # ac_fn_c_check_type
2055
2056 # ac_fn_c_check_func LINENO FUNC VAR
2057 # ----------------------------------
2058 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2059 ac_fn_c_check_func ()
2060 {
2061   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2062   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2063 $as_echo_n "checking for $2... " >&6; }
2064 if eval \${$3+:} false; then :
2065   $as_echo_n "(cached) " >&6
2066 else
2067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2068 /* end confdefs.h.  */
2069 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2070    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2071 #define $2 innocuous_$2
2072
2073 /* System header to define __stub macros and hopefully few prototypes,
2074     which can conflict with char $2 (); below.
2075     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2076     <limits.h> exists even on freestanding compilers.  */
2077
2078 #ifdef __STDC__
2079 # include <limits.h>
2080 #else
2081 # include <assert.h>
2082 #endif
2083
2084 #undef $2
2085
2086 /* Override any GCC internal prototype to avoid an error.
2087    Use char because int might match the return type of a GCC
2088    builtin and then its argument prototype would still apply.  */
2089 #ifdef __cplusplus
2090 extern "C"
2091 #endif
2092 char $2 ();
2093 /* The GNU C library defines this for functions which it implements
2094     to always fail with ENOSYS.  Some functions are actually named
2095     something starting with __ and the normal name is an alias.  */
2096 #if defined __stub_$2 || defined __stub___$2
2097 choke me
2098 #endif
2099
2100 int
2101 main ()
2102 {
2103 return $2 ();
2104   ;
2105   return 0;
2106 }
2107 _ACEOF
2108 if ac_fn_c_try_link "$LINENO"; then :
2109   eval "$3=yes"
2110 else
2111   eval "$3=no"
2112 fi
2113 rm -f core conftest.err conftest.$ac_objext \
2114     conftest$ac_exeext conftest.$ac_ext
2115 fi
2116 eval ac_res=\$$3
2117                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2118 $as_echo "$ac_res" >&6; }
2119   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2120
2121 } # ac_fn_c_check_func
2122
2123 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2124 # ---------------------------------------------
2125 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2126 # accordingly.
2127 ac_fn_c_check_decl ()
2128 {
2129   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2130   as_decl_name=`echo $2|sed 's/ *(.*//'`
2131   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2132   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2133 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2134 if eval \${$3+:} false; then :
2135   $as_echo_n "(cached) " >&6
2136 else
2137   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138 /* end confdefs.h.  */
2139 $4
2140 int
2141 main ()
2142 {
2143 #ifndef $as_decl_name
2144 #ifdef __cplusplus
2145   (void) $as_decl_use;
2146 #else
2147   (void) $as_decl_name;
2148 #endif
2149 #endif
2150
2151   ;
2152   return 0;
2153 }
2154 _ACEOF
2155 if ac_fn_c_try_compile "$LINENO"; then :
2156   eval "$3=yes"
2157 else
2158   eval "$3=no"
2159 fi
2160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2161 fi
2162 eval ac_res=\$$3
2163                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2164 $as_echo "$ac_res" >&6; }
2165   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2166
2167 } # ac_fn_c_check_decl
2168
2169 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2170 # --------------------------------------------
2171 # Tries to find the compile-time value of EXPR in a program that includes
2172 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2173 # computed
2174 ac_fn_c_compute_int ()
2175 {
2176   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177   if test "$cross_compiling" = yes; then
2178     # Depending upon the size, compute the lo and hi bounds.
2179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2180 /* end confdefs.h.  */
2181 $4
2182 int
2183 main ()
2184 {
2185 static int test_array [1 - 2 * !(($2) >= 0)];
2186 test_array [0] = 0;
2187 return test_array [0];
2188
2189   ;
2190   return 0;
2191 }
2192 _ACEOF
2193 if ac_fn_c_try_compile "$LINENO"; then :
2194   ac_lo=0 ac_mid=0
2195   while :; do
2196     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2197 /* end confdefs.h.  */
2198 $4
2199 int
2200 main ()
2201 {
2202 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2203 test_array [0] = 0;
2204 return test_array [0];
2205
2206   ;
2207   return 0;
2208 }
2209 _ACEOF
2210 if ac_fn_c_try_compile "$LINENO"; then :
2211   ac_hi=$ac_mid; break
2212 else
2213   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2214                         if test $ac_lo -le $ac_mid; then
2215                           ac_lo= ac_hi=
2216                           break
2217                         fi
2218                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2219 fi
2220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2221   done
2222 else
2223   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2224 /* end confdefs.h.  */
2225 $4
2226 int
2227 main ()
2228 {
2229 static int test_array [1 - 2 * !(($2) < 0)];
2230 test_array [0] = 0;
2231 return test_array [0];
2232
2233   ;
2234   return 0;
2235 }
2236 _ACEOF
2237 if ac_fn_c_try_compile "$LINENO"; then :
2238   ac_hi=-1 ac_mid=-1
2239   while :; do
2240     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241 /* end confdefs.h.  */
2242 $4
2243 int
2244 main ()
2245 {
2246 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2247 test_array [0] = 0;
2248 return test_array [0];
2249
2250   ;
2251   return 0;
2252 }
2253 _ACEOF
2254 if ac_fn_c_try_compile "$LINENO"; then :
2255   ac_lo=$ac_mid; break
2256 else
2257   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2258                         if test $ac_mid -le $ac_hi; then
2259                           ac_lo= ac_hi=
2260                           break
2261                         fi
2262                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2263 fi
2264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2265   done
2266 else
2267   ac_lo= ac_hi=
2268 fi
2269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2270 fi
2271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2272 # Binary search between lo and hi bounds.
2273 while test "x$ac_lo" != "x$ac_hi"; do
2274   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2275   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276 /* end confdefs.h.  */
2277 $4
2278 int
2279 main ()
2280 {
2281 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2282 test_array [0] = 0;
2283 return test_array [0];
2284
2285   ;
2286   return 0;
2287 }
2288 _ACEOF
2289 if ac_fn_c_try_compile "$LINENO"; then :
2290   ac_hi=$ac_mid
2291 else
2292   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2293 fi
2294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295 done
2296 case $ac_lo in #((
2297 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2298 '') ac_retval=1 ;;
2299 esac
2300   else
2301     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302 /* end confdefs.h.  */
2303 $4
2304 static long int longval () { return $2; }
2305 static unsigned long int ulongval () { return $2; }
2306 #include <stdio.h>
2307 #include <stdlib.h>
2308 int
2309 main ()
2310 {
2311
2312   FILE *f = fopen ("conftest.val", "w");
2313   if (! f)
2314     return 1;
2315   if (($2) < 0)
2316     {
2317       long int i = longval ();
2318       if (i != ($2))
2319         return 1;
2320       fprintf (f, "%ld", i);
2321     }
2322   else
2323     {
2324       unsigned long int i = ulongval ();
2325       if (i != ($2))
2326         return 1;
2327       fprintf (f, "%lu", i);
2328     }
2329   /* Do not output a trailing newline, as this causes \r\n confusion
2330      on some platforms.  */
2331   return ferror (f) || fclose (f) != 0;
2332
2333   ;
2334   return 0;
2335 }
2336 _ACEOF
2337 if ac_fn_c_try_run "$LINENO"; then :
2338   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2339 else
2340   ac_retval=1
2341 fi
2342 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2343   conftest.$ac_objext conftest.beam conftest.$ac_ext
2344 rm -f conftest.val
2345
2346   fi
2347   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2348   as_fn_set_status $ac_retval
2349
2350 } # ac_fn_c_compute_int
2351
2352 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2353 # ----------------------------------------------------
2354 # Tries to find if the field MEMBER exists in type AGGR, after including
2355 # INCLUDES, setting cache variable VAR accordingly.
2356 ac_fn_c_check_member ()
2357 {
2358   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2359   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2360 $as_echo_n "checking for $2.$3... " >&6; }
2361 if eval \${$4+:} false; then :
2362   $as_echo_n "(cached) " >&6
2363 else
2364   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2365 /* end confdefs.h.  */
2366 $5
2367 int
2368 main ()
2369 {
2370 static $2 ac_aggr;
2371 if (ac_aggr.$3)
2372 return 0;
2373   ;
2374   return 0;
2375 }
2376 _ACEOF
2377 if ac_fn_c_try_compile "$LINENO"; then :
2378   eval "$4=yes"
2379 else
2380   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2381 /* end confdefs.h.  */
2382 $5
2383 int
2384 main ()
2385 {
2386 static $2 ac_aggr;
2387 if (sizeof ac_aggr.$3)
2388 return 0;
2389   ;
2390   return 0;
2391 }
2392 _ACEOF
2393 if ac_fn_c_try_compile "$LINENO"; then :
2394   eval "$4=yes"
2395 else
2396   eval "$4=no"
2397 fi
2398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2399 fi
2400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2401 fi
2402 eval ac_res=\$$4
2403                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2404 $as_echo "$ac_res" >&6; }
2405   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2406
2407 } # ac_fn_c_check_member
2408 cat >config.log <<_ACEOF
2409 This file contains any messages produced by compilers while
2410 running configure, to aid debugging if configure makes a mistake.
2411
2412 It was created by sntp $as_me 4.2.8p10, which was
2413 generated by GNU Autoconf 2.69.  Invocation command line was
2414
2415   $ $0 $@
2416
2417 _ACEOF
2418 exec 5>>config.log
2419 {
2420 cat <<_ASUNAME
2421 ## --------- ##
2422 ## Platform. ##
2423 ## --------- ##
2424
2425 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2426 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2427 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2428 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2429 uname -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
2444 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2445 for as_dir in $PATH
2446 do
2447   IFS=$as_save_IFS
2448   test -z "$as_dir" && as_dir=.
2449     $as_echo "PATH: $as_dir"
2450   done
2451 IFS=$as_save_IFS
2452
2453 } >&5
2454
2455 cat >&5 <<_ACEOF
2456
2457
2458 ## ----------- ##
2459 ## Core tests. ##
2460 ## ----------- ##
2461
2462 _ACEOF
2463
2464
2465 # Keep a trace of the command line.
2466 # Strip out --no-create and --no-recursion so they do not pile up.
2467 # Strip out --silent because we don't want to record it for future runs.
2468 # Also quote any args containing shell meta-characters.
2469 # Make two passes to allow for proper duplicate-argument suppression.
2470 ac_configure_args=
2471 ac_configure_args0=
2472 ac_configure_args1=
2473 ac_must_keep_next=false
2474 for ac_pass in 1 2
2475 do
2476   for ac_arg
2477   do
2478     case $ac_arg in
2479     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2480     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2481     | -silent | --silent | --silen | --sile | --sil)
2482       continue ;;
2483     *\'*)
2484       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2485     esac
2486     case $ac_pass in
2487     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2488     2)
2489       as_fn_append ac_configure_args1 " '$ac_arg'"
2490       if test $ac_must_keep_next = true; then
2491         ac_must_keep_next=false # Got value, back to normal.
2492       else
2493         case $ac_arg in
2494           *=* | --config-cache | -C | -disable-* | --disable-* \
2495           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2496           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2497           | -with-* | --with-* | -without-* | --without-* | --x)
2498             case "$ac_configure_args0 " in
2499               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2500             esac
2501             ;;
2502           -* ) ac_must_keep_next=true ;;
2503         esac
2504       fi
2505       as_fn_append ac_configure_args " '$ac_arg'"
2506       ;;
2507     esac
2508   done
2509 done
2510 { ac_configure_args0=; unset ac_configure_args0;}
2511 { ac_configure_args1=; unset ac_configure_args1;}
2512
2513 # When interrupted or exit'd, cleanup temporary files, and complete
2514 # config.log.  We remove comments because anyway the quotes in there
2515 # would cause problems or look ugly.
2516 # WARNING: Use '\'' to represent an apostrophe within the trap.
2517 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2518 trap 'exit_status=$?
2519   # Save into config.log some information that might help in debugging.
2520   {
2521     echo
2522
2523     $as_echo "## ---------------- ##
2524 ## Cache variables. ##
2525 ## ---------------- ##"
2526     echo
2527     # The following way of writing the cache mishandles newlines in values,
2528 (
2529   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2530     eval ac_val=\$$ac_var
2531     case $ac_val in #(
2532     *${as_nl}*)
2533       case $ac_var in #(
2534       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2535 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2536       esac
2537       case $ac_var in #(
2538       _ | IFS | as_nl) ;; #(
2539       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2540       *) { eval $ac_var=; unset $ac_var;} ;;
2541       esac ;;
2542     esac
2543   done
2544   (set) 2>&1 |
2545     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2546     *${as_nl}ac_space=\ *)
2547       sed -n \
2548         "s/'\''/'\''\\\\'\'''\''/g;
2549           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2550       ;; #(
2551     *)
2552       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2553       ;;
2554     esac |
2555     sort
2556 )
2557     echo
2558
2559     $as_echo "## ----------------- ##
2560 ## Output variables. ##
2561 ## ----------------- ##"
2562     echo
2563     for ac_var in $ac_subst_vars
2564     do
2565       eval ac_val=\$$ac_var
2566       case $ac_val in
2567       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2568       esac
2569       $as_echo "$ac_var='\''$ac_val'\''"
2570     done | sort
2571     echo
2572
2573     if test -n "$ac_subst_files"; then
2574       $as_echo "## ------------------- ##
2575 ## File substitutions. ##
2576 ## ------------------- ##"
2577       echo
2578       for ac_var in $ac_subst_files
2579       do
2580         eval ac_val=\$$ac_var
2581         case $ac_val in
2582         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2583         esac
2584         $as_echo "$ac_var='\''$ac_val'\''"
2585       done | sort
2586       echo
2587     fi
2588
2589     if test -s confdefs.h; then
2590       $as_echo "## ----------- ##
2591 ## confdefs.h. ##
2592 ## ----------- ##"
2593       echo
2594       cat confdefs.h
2595       echo
2596     fi
2597     test "$ac_signal" != 0 &&
2598       $as_echo "$as_me: caught signal $ac_signal"
2599     $as_echo "$as_me: exit $exit_status"
2600   } >&5
2601   rm -f core *.core core.conftest.* &&
2602     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2603     exit $exit_status
2604 ' 0
2605 for ac_signal in 1 2 13 15; do
2606   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2607 done
2608 ac_signal=0
2609
2610 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2611 rm -f -r conftest* confdefs.h
2612
2613 $as_echo "/* confdefs.h */" > confdefs.h
2614
2615 # Predefined preprocessor variables.
2616
2617 cat >>confdefs.h <<_ACEOF
2618 #define PACKAGE_NAME "$PACKAGE_NAME"
2619 _ACEOF
2620
2621 cat >>confdefs.h <<_ACEOF
2622 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2623 _ACEOF
2624
2625 cat >>confdefs.h <<_ACEOF
2626 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2627 _ACEOF
2628
2629 cat >>confdefs.h <<_ACEOF
2630 #define PACKAGE_STRING "$PACKAGE_STRING"
2631 _ACEOF
2632
2633 cat >>confdefs.h <<_ACEOF
2634 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2635 _ACEOF
2636
2637 cat >>confdefs.h <<_ACEOF
2638 #define PACKAGE_URL "$PACKAGE_URL"
2639 _ACEOF
2640
2641
2642 # Let the site file select an alternate cache file if it wants to.
2643 # Prefer an explicitly selected file to automatically selected ones.
2644 ac_site_file1=NONE
2645 ac_site_file2=NONE
2646 if test -n "$CONFIG_SITE"; then
2647   # We do not want a PATH search for config.site.
2648   case $CONFIG_SITE in #((
2649     -*)  ac_site_file1=./$CONFIG_SITE;;
2650     */*) ac_site_file1=$CONFIG_SITE;;
2651     *)   ac_site_file1=./$CONFIG_SITE;;
2652   esac
2653 elif test "x$prefix" != xNONE; then
2654   ac_site_file1=$prefix/share/config.site
2655   ac_site_file2=$prefix/etc/config.site
2656 else
2657   ac_site_file1=$ac_default_prefix/share/config.site
2658   ac_site_file2=$ac_default_prefix/etc/config.site
2659 fi
2660 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2661 do
2662   test "x$ac_site_file" = xNONE && continue
2663   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2664     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2665 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2666     sed 's/^/| /' "$ac_site_file" >&5
2667     . "$ac_site_file" \
2668       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2669 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2670 as_fn_error $? "failed to load site script $ac_site_file
2671 See \`config.log' for more details" "$LINENO" 5; }
2672   fi
2673 done
2674
2675 if test -r "$cache_file"; then
2676   # Some versions of bash will fail to source /dev/null (special files
2677   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2678   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2679     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2680 $as_echo "$as_me: loading cache $cache_file" >&6;}
2681     case $cache_file in
2682       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2683       *)                      . "./$cache_file";;
2684     esac
2685   fi
2686 else
2687   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2688 $as_echo "$as_me: creating cache $cache_file" >&6;}
2689   >$cache_file
2690 fi
2691
2692 as_fn_append ac_header_list " stdarg.h"
2693 # Check that the precious variables saved in the cache have kept the same
2694 # value.
2695 ac_cache_corrupted=false
2696 for ac_var in $ac_precious_vars; do
2697   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2698   eval ac_new_set=\$ac_env_${ac_var}_set
2699   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2700   eval ac_new_val=\$ac_env_${ac_var}_value
2701   case $ac_old_set,$ac_new_set in
2702     set,)
2703       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2704 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2705       ac_cache_corrupted=: ;;
2706     ,set)
2707       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2708 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2709       ac_cache_corrupted=: ;;
2710     ,);;
2711     *)
2712       if test "x$ac_old_val" != "x$ac_new_val"; then
2713         # differences in whitespace do not lead to failure.
2714         ac_old_val_w=`echo x $ac_old_val`
2715         ac_new_val_w=`echo x $ac_new_val`
2716         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2717           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2718 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2719           ac_cache_corrupted=:
2720         else
2721           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2722 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2723           eval $ac_var=\$ac_old_val
2724         fi
2725         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2726 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2727         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2728 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2729       fi;;
2730   esac
2731   # Pass precious variables to config.status.
2732   if test "$ac_new_set" = set; then
2733     case $ac_new_val in
2734     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2735     *) ac_arg=$ac_var=$ac_new_val ;;
2736     esac
2737     case " $ac_configure_args " in
2738       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2739       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2740     esac
2741   fi
2742 done
2743 if $ac_cache_corrupted; then
2744   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2745 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2746   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2747 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2748   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2749 fi
2750 ## -------------------- ##
2751 ## Main body of script. ##
2752 ## -------------------- ##
2753
2754 ac_ext=c
2755 ac_cpp='$CPP $CPPFLAGS'
2756 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2757 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2758 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2759
2760
2761
2762 ac_aux_dir=
2763 for ac_dir in libevent/build-aux "$srcdir"/libevent/build-aux; do
2764   if test -f "$ac_dir/install-sh"; then
2765     ac_aux_dir=$ac_dir
2766     ac_install_sh="$ac_aux_dir/install-sh -c"
2767     break
2768   elif test -f "$ac_dir/install.sh"; then
2769     ac_aux_dir=$ac_dir
2770     ac_install_sh="$ac_aux_dir/install.sh -c"
2771     break
2772   elif test -f "$ac_dir/shtool"; then
2773     ac_aux_dir=$ac_dir
2774     ac_install_sh="$ac_aux_dir/shtool install -c"
2775     break
2776   fi
2777 done
2778 if test -z "$ac_aux_dir"; then
2779   as_fn_error $? "cannot find install-sh, install.sh, or shtool in libevent/build-aux \"$srcdir\"/libevent/build-aux" "$LINENO" 5
2780 fi
2781
2782 # These three variables are undocumented and unsupported,
2783 # and are intended to be withdrawn in a future Autoconf release.
2784 # They can cause serious problems if a builder's source tree is in a directory
2785 # whose full name contains unusual characters.
2786 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2787 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2788 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2789
2790
2791 ac_ext=c
2792 ac_cpp='$CPP $CPPFLAGS'
2793 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2794 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2795 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2796
2797
2798 # Bump sntp_configure_cache_version for each change to configure.ac or
2799 # .m4 files which invalidates cached values from previous configure
2800 # runs.
2801 #
2802 # If the change affects cache variables used only by the main NTP
2803 # configure.ac, then only its version number should be bumped, while
2804 # the subdir configure.ac version numbers should be unchanged.  The
2805 # same is true for a test/variable that is used only by one subdir
2806 # being changed incompatibly; only that subdir's cache version needs
2807 # bumping.
2808 #
2809 # If a change affects variables shared by all NTP configure scripts,
2810 # please bump the version numbers of each.  If you are not sure, the
2811 # safe choice is to bump all on any cache-invalidating change.
2812 #
2813 # In order to avoid the risk of version stamp collision between -stable
2814 # and -dev branches, do not simply increment the version, instead use
2815 # the date YYYYMMDD optionally with -HHMM if there is more than one
2816 # bump in a day.
2817
2818 sntp_configure_cache_version=20120806
2819
2820 # When the version of config.cache and configure do not
2821 # match, NTP_CACHEVERSION will flush the cache.
2822
2823
2824
2825     ntp_cache_flush=1
2826
2827     case "$ntp_cv_sntp_cache_version" in
2828      $sntp_configure_cache_version)
2829         # same version, good
2830         ntp_cache_flush=0
2831         ;;
2832      '')
2833         # No cache, predates ntp_cv_sntp_cache_version, or is empty.
2834         case "$cache_file" in
2835          /dev/null)
2836             ntp_cache_flush=0
2837             ;;
2838          *)
2839             case "$NTP_CACHEVERSION_PARENT" in
2840              '')
2841                 # Do not clear the cache immediately after it is created
2842                 # empty as it is noisy.  Differentiate a newly-created
2843                 # config.cache from one predating the cache version
2844                 # mechanism by looking for the first cached variable set
2845                 # by Autoconf
2846                 case "$ac_cv_path_install" in
2847                  '')
2848                     # empty config.cache file
2849                     ntp_cache_flush=0
2850                 esac
2851                 ;;
2852              *)
2853                 # Parent configure just created cache from empty,
2854                 # flushing would be counterproductive.
2855                 ntp_cache_flush=0;
2856                 ;;
2857             esac
2858         esac
2859         ;;
2860      *)
2861         # configure cache version mismatches config.cache version
2862         ;;
2863     esac
2864
2865     case "$ntp_cache_flush" in
2866      1)
2867         c_version="${ntp_cv_sntp_cache_version:-(no version found)}"
2868
2869         # Do we flush all variables or exclude others' version stamps?
2870
2871         case "$NTP_CACHEVERSION_PARENT" in
2872          '')
2873             # Clear all *_cv_* variables including our child subdirs'
2874             # ntp_cv_*_cache_version variables.  This prevents subdir
2875             # configure scripts from noticing a version mismatch just
2876             # after the top configure in the invocation cleared and
2877             # recreated the cache.
2878
2879             c_varname_list=`set |
2880                             sed -n -e 's/=.*$//' \
2881                                    -e '/_cv_/p'
2882                            `
2883             ;;
2884          *)
2885             # This is not the top configure this particular invocation.
2886             # Clear all *_cv_* variables sparing the version stamps
2887             # of other configure scripts, so we don't trigger
2888             # useless repeated clearings.
2889
2890             c_varname_list=`set |
2891                             sed -n -e 's/=.*$//' \
2892                                    -e '/ntp_cv_.*_cache_version/d' \
2893                                    -e '/_cv_/p'
2894                            `
2895         esac
2896
2897         for c_varname in $c_varname_list
2898         do
2899                                                     { eval $c_varname=; unset $c_varname; }
2900         done
2901
2902         { $as_echo "$as_me:${as_lineno-$LINENO}: $cache_file saved by another version, ignored." >&5
2903 $as_echo "$as_me: $cache_file saved by another version, ignored." >&6;}
2904         { $as_echo "$as_me:${as_lineno-$LINENO}: configure script cache version: $sntp_configure_cache_version" >&5
2905 $as_echo "$as_me: configure script cache version: $sntp_configure_cache_version" >&6;}
2906         { $as_echo "$as_me:${as_lineno-$LINENO}: $cache_file version: $c_version" >&5
2907 $as_echo "$as_me: $cache_file version: $c_version" >&6;}
2908         { c_varname=; unset c_varname;}
2909         { c_varname_list=; unset c_varname_list;}
2910         { c_version=; unset c_version;}
2911     esac
2912
2913     { ntp_cache_flush=; unset ntp_cache_flush;}
2914
2915     # save configure version in config.cache for next time
2916     ntp_cv_sntp_cache_version="$sntp_configure_cache_version"
2917
2918     # let any subdir configure.ac NTP_CACHEVERSION invocations
2919     # know they are not the top level.
2920     NTP_CACHEVERSION_PARENT='sntp' ; export NTP_CACHEVERSION_PARENT
2921
2922
2923 am__api_version='1.15'
2924
2925 # Find a good install program.  We prefer a C program (faster),
2926 # so one script is as good as another.  But avoid the broken or
2927 # incompatible versions:
2928 # SysV /etc/install, /usr/sbin/install
2929 # SunOS /usr/etc/install
2930 # IRIX /sbin/install
2931 # AIX /bin/install
2932 # AmigaOS /C/install, which installs bootblocks on floppy discs
2933 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2934 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2935 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2936 # OS/2's system install, which has a completely different semantic
2937 # ./install, which can be erroneously created by make from ./install.sh.
2938 # Reject install programs that cannot install multiple files.
2939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2940 $as_echo_n "checking for a BSD-compatible install... " >&6; }
2941 if test -z "$INSTALL"; then
2942 if ${ac_cv_path_install+:} false; then :
2943   $as_echo_n "(cached) " >&6
2944 else
2945   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2946 for as_dir in $PATH
2947 do
2948   IFS=$as_save_IFS
2949   test -z "$as_dir" && as_dir=.
2950     # Account for people who put trailing slashes in PATH elements.
2951 case $as_dir/ in #((
2952   ./ | .// | /[cC]/* | \
2953   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2954   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2955   /usr/ucb/* ) ;;
2956   *)
2957     # OSF1 and SCO ODT 3.0 have their own names for install.
2958     # Don't use installbsd from OSF since it installs stuff as root
2959     # by default.
2960     for ac_prog in ginstall scoinst install; do
2961       for ac_exec_ext in '' $ac_executable_extensions; do
2962         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2963           if test $ac_prog = install &&
2964             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2965             # AIX install.  It has an incompatible calling convention.
2966             :
2967           elif test $ac_prog = install &&
2968             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2969             # program-specific install script used by HP pwplus--don't use.
2970             :
2971           else
2972             rm -rf conftest.one conftest.two conftest.dir
2973             echo one > conftest.one
2974             echo two > conftest.two
2975             mkdir conftest.dir
2976             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2977               test -s conftest.one && test -s conftest.two &&
2978               test -s conftest.dir/conftest.one &&
2979               test -s conftest.dir/conftest.two
2980             then
2981               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2982               break 3
2983             fi
2984           fi
2985         fi
2986       done
2987     done
2988     ;;
2989 esac
2990
2991   done
2992 IFS=$as_save_IFS
2993
2994 rm -rf conftest.one conftest.two conftest.dir
2995
2996 fi
2997   if test "${ac_cv_path_install+set}" = set; then
2998     INSTALL=$ac_cv_path_install
2999   else
3000     # As a last resort, use the slow shell script.  Don't cache a
3001     # value for INSTALL within a source directory, because that will
3002     # break other packages using the cache if that directory is
3003     # removed, or if the value is a relative name.
3004     INSTALL=$ac_install_sh
3005   fi
3006 fi
3007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3008 $as_echo "$INSTALL" >&6; }
3009
3010 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3011 # It thinks the first close brace ends the variable substitution.
3012 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3013
3014 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3015
3016 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3017
3018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3019 $as_echo_n "checking whether build environment is sane... " >&6; }
3020 # Reject unsafe characters in $srcdir or the absolute working directory
3021 # name.  Accept space and tab only in the latter.
3022 am_lf='
3023 '
3024 case `pwd` in
3025   *[\\\"\#\$\&\'\`$am_lf]*)
3026     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3027 esac
3028 case $srcdir in
3029   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3030     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3031 esac
3032
3033 # Do 'set' in a subshell so we don't clobber the current shell's
3034 # arguments.  Must try -L first in case configure is actually a
3035 # symlink; some systems play weird games with the mod time of symlinks
3036 # (eg FreeBSD returns the mod time of the symlink's containing
3037 # directory).
3038 if (
3039    am_has_slept=no
3040    for am_try in 1 2; do
3041      echo "timestamp, slept: $am_has_slept" > conftest.file
3042      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3043      if test "$*" = "X"; then
3044         # -L didn't work.
3045         set X `ls -t "$srcdir/configure" conftest.file`
3046      fi
3047      if test "$*" != "X $srcdir/configure conftest.file" \
3048         && test "$*" != "X conftest.file $srcdir/configure"; then
3049
3050         # If neither matched, then we have a broken ls.  This can happen
3051         # if, for instance, CONFIG_SHELL is bash and it inherits a
3052         # broken ls alias from the environment.  This has actually
3053         # happened.  Such a system could not be considered "sane".
3054         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3055   alias in your environment" "$LINENO" 5
3056      fi
3057      if test "$2" = conftest.file || test $am_try -eq 2; then
3058        break
3059      fi
3060      # Just in case.
3061      sleep 1
3062      am_has_slept=yes
3063    done
3064    test "$2" = conftest.file
3065    )
3066 then
3067    # Ok.
3068    :
3069 else
3070    as_fn_error $? "newly created file is older than distributed files!
3071 Check your system clock" "$LINENO" 5
3072 fi
3073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3074 $as_echo "yes" >&6; }
3075 # If we didn't sleep, we still need to ensure time stamps of config.status and
3076 # generated files are strictly newer.
3077 am_sleep_pid=
3078 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3079   ( sleep 1 ) &
3080   am_sleep_pid=$!
3081 fi
3082
3083 rm -f conftest.file
3084
3085 test "$program_prefix" != NONE &&
3086   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3087 # Use a double $ so make ignores it.
3088 test "$program_suffix" != NONE &&
3089   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3090 # Double any \ or $.
3091 # By default was `s,x,x', remove it if useless.
3092 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3093 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3094
3095 # Expand $ac_aux_dir to an absolute path.
3096 am_aux_dir=`cd "$ac_aux_dir" && pwd`
3097
3098 if test x"${MISSING+set}" != xset; then
3099   case $am_aux_dir in
3100   *\ * | *\     *)
3101     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3102   *)
3103     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3104   esac
3105 fi
3106 # Use eval to expand $SHELL
3107 if eval "$MISSING --is-lightweight"; then
3108   am_missing_run="$MISSING "
3109 else
3110   am_missing_run=
3111   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3112 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3113 fi
3114
3115 if test x"${install_sh+set}" != xset; then
3116   case $am_aux_dir in
3117   *\ * | *\     *)
3118     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3119   *)
3120     install_sh="\${SHELL} $am_aux_dir/install-sh"
3121   esac
3122 fi
3123
3124 # Installed binaries are usually stripped using 'strip' when the user
3125 # run "make install-strip".  However 'strip' might not be the right
3126 # tool to use in cross-compilation environments, therefore Automake
3127 # will honor the 'STRIP' environment variable to overrule this program.
3128 if test "$cross_compiling" != no; then
3129   if test -n "$ac_tool_prefix"; then
3130   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3131 set dummy ${ac_tool_prefix}strip; ac_word=$2
3132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3133 $as_echo_n "checking for $ac_word... " >&6; }
3134 if ${ac_cv_prog_STRIP+:} false; then :
3135   $as_echo_n "(cached) " >&6
3136 else
3137   if test -n "$STRIP"; then
3138   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3139 else
3140 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3141 for as_dir in $PATH
3142 do
3143   IFS=$as_save_IFS
3144   test -z "$as_dir" && as_dir=.
3145     for ac_exec_ext in '' $ac_executable_extensions; do
3146   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3147     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3148     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3149     break 2
3150   fi
3151 done
3152   done
3153 IFS=$as_save_IFS
3154
3155 fi
3156 fi
3157 STRIP=$ac_cv_prog_STRIP
3158 if test -n "$STRIP"; then
3159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3160 $as_echo "$STRIP" >&6; }
3161 else
3162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3163 $as_echo "no" >&6; }
3164 fi
3165
3166
3167 fi
3168 if test -z "$ac_cv_prog_STRIP"; then
3169   ac_ct_STRIP=$STRIP
3170   # Extract the first word of "strip", so it can be a program name with args.
3171 set dummy strip; ac_word=$2
3172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3173 $as_echo_n "checking for $ac_word... " >&6; }
3174 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3175   $as_echo_n "(cached) " >&6
3176 else
3177   if test -n "$ac_ct_STRIP"; then
3178   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3179 else
3180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3181 for as_dir in $PATH
3182 do
3183   IFS=$as_save_IFS
3184   test -z "$as_dir" && as_dir=.
3185     for ac_exec_ext in '' $ac_executable_extensions; do
3186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3187     ac_cv_prog_ac_ct_STRIP="strip"
3188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3189     break 2
3190   fi
3191 done
3192   done
3193 IFS=$as_save_IFS
3194
3195 fi
3196 fi
3197 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3198 if test -n "$ac_ct_STRIP"; then
3199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3200 $as_echo "$ac_ct_STRIP" >&6; }
3201 else
3202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3203 $as_echo "no" >&6; }
3204 fi
3205
3206   if test "x$ac_ct_STRIP" = x; then
3207     STRIP=":"
3208   else
3209     case $cross_compiling:$ac_tool_warned in
3210 yes:)
3211 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3212 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3213 ac_tool_warned=yes ;;
3214 esac
3215     STRIP=$ac_ct_STRIP
3216   fi
3217 else
3218   STRIP="$ac_cv_prog_STRIP"
3219 fi
3220
3221 fi
3222 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3223
3224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3225 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3226 if test -z "$MKDIR_P"; then
3227   if ${ac_cv_path_mkdir+:} false; then :
3228   $as_echo_n "(cached) " >&6
3229 else
3230   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3231 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3232 do
3233   IFS=$as_save_IFS
3234   test -z "$as_dir" && as_dir=.
3235     for ac_prog in mkdir gmkdir; do
3236          for ac_exec_ext in '' $ac_executable_extensions; do
3237            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3238            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3239              'mkdir (GNU coreutils) '* | \
3240              'mkdir (coreutils) '* | \
3241              'mkdir (fileutils) '4.1*)
3242                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3243                break 3;;
3244            esac
3245          done
3246        done
3247   done
3248 IFS=$as_save_IFS
3249
3250 fi
3251
3252   test -d ./--version && rmdir ./--version
3253   if test "${ac_cv_path_mkdir+set}" = set; then
3254     MKDIR_P="$ac_cv_path_mkdir -p"
3255   else
3256     # As a last resort, use the slow shell script.  Don't cache a
3257     # value for MKDIR_P within a source directory, because that will
3258     # break other packages using the cache if that directory is
3259     # removed, or if the value is a relative name.
3260     MKDIR_P="$ac_install_sh -d"
3261   fi
3262 fi
3263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3264 $as_echo "$MKDIR_P" >&6; }
3265
3266 for ac_prog in gawk mawk nawk awk
3267 do
3268   # Extract the first word of "$ac_prog", so it can be a program name with args.
3269 set dummy $ac_prog; ac_word=$2
3270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3271 $as_echo_n "checking for $ac_word... " >&6; }
3272 if ${ac_cv_prog_AWK+:} false; then :
3273   $as_echo_n "(cached) " >&6
3274 else
3275   if test -n "$AWK"; then
3276   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3277 else
3278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3279 for as_dir in $PATH
3280 do
3281   IFS=$as_save_IFS
3282   test -z "$as_dir" && as_dir=.
3283     for ac_exec_ext in '' $ac_executable_extensions; do
3284   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3285     ac_cv_prog_AWK="$ac_prog"
3286     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3287     break 2
3288   fi
3289 done
3290   done
3291 IFS=$as_save_IFS
3292
3293 fi
3294 fi
3295 AWK=$ac_cv_prog_AWK
3296 if test -n "$AWK"; then
3297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3298 $as_echo "$AWK" >&6; }
3299 else
3300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3301 $as_echo "no" >&6; }
3302 fi
3303
3304
3305   test -n "$AWK" && break
3306 done
3307
3308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3309 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3310 set x ${MAKE-make}
3311 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3312 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3313   $as_echo_n "(cached) " >&6
3314 else
3315   cat >conftest.make <<\_ACEOF
3316 SHELL = /bin/sh
3317 all:
3318         @echo '@@@%%%=$(MAKE)=@@@%%%'
3319 _ACEOF
3320 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3321 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3322   *@@@%%%=?*=@@@%%%*)
3323     eval ac_cv_prog_make_${ac_make}_set=yes;;
3324   *)
3325     eval ac_cv_prog_make_${ac_make}_set=no;;
3326 esac
3327 rm -f conftest.make
3328 fi
3329 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3331 $as_echo "yes" >&6; }
3332   SET_MAKE=
3333 else
3334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3335 $as_echo "no" >&6; }
3336   SET_MAKE="MAKE=${MAKE-make}"
3337 fi
3338
3339 rm -rf .tst 2>/dev/null
3340 mkdir .tst 2>/dev/null
3341 if test -d .tst; then
3342   am__leading_dot=.
3343 else
3344   am__leading_dot=_
3345 fi
3346 rmdir .tst 2>/dev/null
3347
3348 # Check whether --enable-silent-rules was given.
3349 if test "${enable_silent_rules+set}" = set; then :
3350   enableval=$enable_silent_rules;
3351 fi
3352
3353 case $enable_silent_rules in # (((
3354   yes) AM_DEFAULT_VERBOSITY=0;;
3355    no) AM_DEFAULT_VERBOSITY=1;;
3356     *) AM_DEFAULT_VERBOSITY=1;;
3357 esac
3358 am_make=${MAKE-make}
3359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3360 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3361 if ${am_cv_make_support_nested_variables+:} false; then :
3362   $as_echo_n "(cached) " >&6
3363 else
3364   if $as_echo 'TRUE=$(BAR$(V))
3365 BAR0=false
3366 BAR1=true
3367 V=1
3368 am__doit:
3369         @$(TRUE)
3370 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3371   am_cv_make_support_nested_variables=yes
3372 else
3373   am_cv_make_support_nested_variables=no
3374 fi
3375 fi
3376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3377 $as_echo "$am_cv_make_support_nested_variables" >&6; }
3378 if test $am_cv_make_support_nested_variables = yes; then
3379     AM_V='$(V)'
3380   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3381 else
3382   AM_V=$AM_DEFAULT_VERBOSITY
3383   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3384 fi
3385 AM_BACKSLASH='\'
3386
3387 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3388   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3389   # is not polluted with repeated "-I."
3390   am__isrc=' -I$(srcdir)'
3391   # test to see if srcdir already configured
3392   if test -f $srcdir/config.status; then
3393     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3394   fi
3395 fi
3396
3397 # test whether we have cygpath
3398 if test -z "$CYGPATH_W"; then
3399   if (cygpath --version) >/dev/null 2>/dev/null; then
3400     CYGPATH_W='cygpath -w'
3401   else
3402     CYGPATH_W=echo
3403   fi
3404 fi
3405
3406
3407 # Define the identity of the package.
3408  PACKAGE='sntp'
3409  VERSION='4.2.8p10'
3410
3411
3412 cat >>confdefs.h <<_ACEOF
3413 #define PACKAGE "$PACKAGE"
3414 _ACEOF
3415
3416
3417 cat >>confdefs.h <<_ACEOF
3418 #define VERSION "$VERSION"
3419 _ACEOF
3420
3421 # Some tools Automake needs.
3422
3423 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3424
3425
3426 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3427
3428
3429 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3430
3431
3432 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3433
3434
3435 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3436
3437 # For better backward compatibility.  To be removed once Automake 1.9.x
3438 # dies out for good.  For more background, see:
3439 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3440 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3441 mkdir_p='$(MKDIR_P)'
3442
3443 # We need awk for the "check" target (and possibly the TAP driver).  The
3444 # system "awk" is bad on some platforms.
3445 # Always define AMTAR for backward compatibility.  Yes, it's still used
3446 # in the wild :-(  We should find a proper way to deprecate it ...
3447 AMTAR='$${TAR-tar}'
3448
3449
3450 # We'll loop over all known methods to create a tar archive until one works.
3451 _am_tools='gnutar  pax cpio none'
3452
3453 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3454
3455
3456
3457
3458
3459
3460 # POSIX will say in a future version that running "rm -f" with no argument
3461 # is OK; and we want to be able to make that assumption in our Makefile
3462 # recipes.  So use an aggressive probe to check that the usage we want is
3463 # actually supported "in the wild" to an acceptable degree.
3464 # See automake bug#10828.
3465 # To make any issue more visible, cause the running configure to be aborted
3466 # by default if the 'rm' program in use doesn't match our expectations; the
3467 # user can still override this though.
3468 if rm -f && rm -fr && rm -rf; then : OK; else
3469   cat >&2 <<'END'
3470 Oops!
3471
3472 Your 'rm' program seems unable to run without file operands specified
3473 on the command line, even when the '-f' option is present.  This is contrary
3474 to the behaviour of most rm programs out there, and not conforming with
3475 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3476
3477 Please tell bug-automake@gnu.org about your system, including the value
3478 of your $PATH and any error possibly output before this message.  This
3479 can help us improve future automake versions.
3480
3481 END
3482   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3483     echo 'Configuration will proceed anyway, since you have set the' >&2
3484     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3485     echo >&2
3486   else
3487     cat >&2 <<'END'
3488 Aborting the configuration process, to ensure you take notice of the issue.
3489
3490 You can download and install GNU coreutils to get an 'rm' implementation
3491 that behaves properly: <http://www.gnu.org/software/coreutils/>.
3492
3493 If you want to complete the configuration process using your problematic
3494 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3495 to "yes", and re-run configure.
3496
3497 END
3498     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3499   fi
3500 fi
3501
3502 # Check whether --enable-silent-rules was given.
3503 if test "${enable_silent_rules+set}" = set; then :
3504   enableval=$enable_silent_rules;
3505 fi
3506
3507 case $enable_silent_rules in # (((
3508   yes) AM_DEFAULT_VERBOSITY=0;;
3509    no) AM_DEFAULT_VERBOSITY=1;;
3510     *) AM_DEFAULT_VERBOSITY=0;;
3511 esac
3512 am_make=${MAKE-make}
3513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3514 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3515 if ${am_cv_make_support_nested_variables+:} false; then :
3516   $as_echo_n "(cached) " >&6
3517 else
3518   if $as_echo 'TRUE=$(BAR$(V))
3519 BAR0=false
3520 BAR1=true
3521 V=1
3522 am__doit:
3523         @$(TRUE)
3524 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3525   am_cv_make_support_nested_variables=yes
3526 else
3527   am_cv_make_support_nested_variables=no
3528 fi
3529 fi
3530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3531 $as_echo "$am_cv_make_support_nested_variables" >&6; }
3532 if test $am_cv_make_support_nested_variables = yes; then
3533     AM_V='$(V)'
3534   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3535 else
3536   AM_V=$AM_DEFAULT_VERBOSITY
3537   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3538 fi
3539 AM_BACKSLASH='\'
3540
3541
3542 # Make sure we can run config.sub.
3543 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3544   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3545
3546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3547 $as_echo_n "checking build system type... " >&6; }
3548 if ${ac_cv_build+:} false; then :
3549   $as_echo_n "(cached) " >&6
3550 else
3551   ac_build_alias=$build_alias
3552 test "x$ac_build_alias" = x &&
3553   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3554 test "x$ac_build_alias" = x &&
3555   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3556 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3557   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3558
3559 fi
3560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3561 $as_echo "$ac_cv_build" >&6; }
3562 case $ac_cv_build in
3563 *-*-*) ;;
3564 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3565 esac
3566 build=$ac_cv_build
3567 ac_save_IFS=$IFS; IFS='-'
3568 set x $ac_cv_build
3569 shift
3570 build_cpu=$1
3571 build_vendor=$2
3572 shift; shift
3573 # Remember, the first character of IFS is used to create $*,
3574 # except with old shells:
3575 build_os=$*
3576 IFS=$ac_save_IFS
3577 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3578
3579
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3581 $as_echo_n "checking host system type... " >&6; }
3582 if ${ac_cv_host+:} false; then :
3583   $as_echo_n "(cached) " >&6
3584 else
3585   if test "x$host_alias" = x; then
3586   ac_cv_host=$ac_cv_build
3587 else
3588   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3589     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3590 fi
3591
3592 fi
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3594 $as_echo "$ac_cv_host" >&6; }
3595 case $ac_cv_host in
3596 *-*-*) ;;
3597 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3598 esac
3599 host=$ac_cv_host
3600 ac_save_IFS=$IFS; IFS='-'
3601 set x $ac_cv_host
3602 shift
3603 host_cpu=$1
3604 host_vendor=$2
3605 shift; shift
3606 # Remember, the first character of IFS is used to create $*,
3607 # except with old shells:
3608 host_os=$*
3609 IFS=$ac_save_IFS
3610 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3611
3612
3613
3614 cat >>confdefs.h <<_ACEOF
3615 #define STR_SYSTEM "$host"
3616 _ACEOF
3617
3618 ac_config_headers="$ac_config_headers config.h"
3619
3620
3621 DEPDIR="${am__leading_dot}deps"
3622
3623 ac_config_commands="$ac_config_commands depfiles"
3624
3625
3626 am_make=${MAKE-make}
3627 cat > confinc << 'END'
3628 am__doit:
3629         @echo this is the am__doit target
3630 .PHONY: am__doit
3631 END
3632 # If we don't find an include directive, just comment out the code.
3633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3634 $as_echo_n "checking for style of include used by $am_make... " >&6; }
3635 am__include="#"
3636 am__quote=
3637 _am_result=none
3638 # First try GNU make style include.
3639 echo "include confinc" > confmf
3640 # Ignore all kinds of additional output from 'make'.
3641 case `$am_make -s -f confmf 2> /dev/null` in #(
3642 *the\ am__doit\ target*)
3643   am__include=include
3644   am__quote=
3645   _am_result=GNU
3646   ;;
3647 esac
3648 # Now try BSD make style include.
3649 if test "$am__include" = "#"; then
3650    echo '.include "confinc"' > confmf
3651    case `$am_make -s -f confmf 2> /dev/null` in #(
3652    *the\ am__doit\ target*)
3653      am__include=.include
3654      am__quote="\""
3655      _am_result=BSD
3656      ;;
3657    esac
3658 fi
3659
3660
3661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3662 $as_echo "$_am_result" >&6; }
3663 rm -f confinc confmf
3664
3665 # Check whether --enable-dependency-tracking was given.
3666 if test "${enable_dependency_tracking+set}" = set; then :
3667   enableval=$enable_dependency_tracking;
3668 fi
3669
3670 if test "x$enable_dependency_tracking" != xno; then
3671   am_depcomp="$ac_aux_dir/depcomp"
3672   AMDEPBACKSLASH='\'
3673   am__nodep='_no'
3674 fi
3675  if test "x$enable_dependency_tracking" != xno; then
3676   AMDEP_TRUE=
3677   AMDEP_FALSE='#'
3678 else
3679   AMDEP_TRUE='#'
3680   AMDEP_FALSE=
3681 fi
3682
3683
3684
3685 case "$build" in
3686  *-*-freebsd1?.*)
3687     cclist=cc
3688     ;;
3689  *)
3690     cclist="cc gcc"
3691     ;;
3692 esac
3693
3694
3695 #AC_USE_SYSTEM_EXTENSIONS
3696
3697 ac_ext=c
3698 ac_cpp='$CPP $CPPFLAGS'
3699 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3700 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3701 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3702 if test -n "$ac_tool_prefix"; then
3703   for ac_prog in $cclist
3704   do
3705     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3706 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3708 $as_echo_n "checking for $ac_word... " >&6; }
3709 if ${ac_cv_prog_CC+:} false; then :
3710   $as_echo_n "(cached) " >&6
3711 else
3712   if test -n "$CC"; then
3713   ac_cv_prog_CC="$CC" # Let the user override the test.
3714 else
3715 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3716 for as_dir in $PATH
3717 do
3718   IFS=$as_save_IFS
3719   test -z "$as_dir" && as_dir=.
3720     for ac_exec_ext in '' $ac_executable_extensions; do
3721   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3722     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3723     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3724     break 2
3725   fi
3726 done
3727   done
3728 IFS=$as_save_IFS
3729
3730 fi
3731 fi
3732 CC=$ac_cv_prog_CC
3733 if test -n "$CC"; then
3734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3735 $as_echo "$CC" >&6; }
3736 else
3737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3738 $as_echo "no" >&6; }
3739 fi
3740
3741
3742     test -n "$CC" && break
3743   done
3744 fi
3745 if test -z "$CC"; then
3746   ac_ct_CC=$CC
3747   for ac_prog in $cclist
3748 do
3749   # Extract the first word of "$ac_prog", so it can be a program name with args.
3750 set dummy $ac_prog; ac_word=$2
3751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3752 $as_echo_n "checking for $ac_word... " >&6; }
3753 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3754   $as_echo_n "(cached) " >&6
3755 else
3756   if test -n "$ac_ct_CC"; then
3757   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3758 else
3759 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3760 for as_dir in $PATH
3761 do
3762   IFS=$as_save_IFS
3763   test -z "$as_dir" && as_dir=.
3764     for ac_exec_ext in '' $ac_executable_extensions; do
3765   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3766     ac_cv_prog_ac_ct_CC="$ac_prog"
3767     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3768     break 2
3769   fi
3770 done
3771   done
3772 IFS=$as_save_IFS
3773
3774 fi
3775 fi
3776 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3777 if test -n "$ac_ct_CC"; then
3778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3779 $as_echo "$ac_ct_CC" >&6; }
3780 else
3781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3782 $as_echo "no" >&6; }
3783 fi
3784
3785
3786   test -n "$ac_ct_CC" && break
3787 done
3788
3789   if test "x$ac_ct_CC" = x; then
3790     CC=""
3791   else
3792     case $cross_compiling:$ac_tool_warned in
3793 yes:)
3794 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3795 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3796 ac_tool_warned=yes ;;
3797 esac
3798     CC=$ac_ct_CC
3799   fi
3800 fi
3801
3802
3803 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3804 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3805 as_fn_error $? "no acceptable C compiler found in \$PATH
3806 See \`config.log' for more details" "$LINENO" 5; }
3807
3808 # Provide some information about the compiler.
3809 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3810 set X $ac_compile
3811 ac_compiler=$2
3812 for ac_option in --version -v -V -qversion; do
3813   { { ac_try="$ac_compiler $ac_option >&5"
3814 case "(($ac_try" in
3815   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3816   *) ac_try_echo=$ac_try;;
3817 esac
3818 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3819 $as_echo "$ac_try_echo"; } >&5
3820   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3821   ac_status=$?
3822   if test -s conftest.err; then
3823     sed '10a\
3824 ... rest of stderr output deleted ...
3825          10q' conftest.err >conftest.er1
3826     cat conftest.er1 >&5
3827   fi
3828   rm -f conftest.er1 conftest.err
3829   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3830   test $ac_status = 0; }
3831 done
3832
3833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3834 /* end confdefs.h.  */
3835
3836 int
3837 main ()
3838 {
3839
3840   ;
3841   return 0;
3842 }
3843 _ACEOF
3844 ac_clean_files_save=$ac_clean_files
3845 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3846 # Try to create an executable without -o first, disregard a.out.
3847 # It will help us diagnose broken compilers, and finding out an intuition
3848 # of exeext.
3849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3850 $as_echo_n "checking whether the C compiler works... " >&6; }
3851 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3852
3853 # The possible output files:
3854 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3855
3856 ac_rmfiles=
3857 for ac_file in $ac_files
3858 do
3859   case $ac_file in
3860     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3861     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3862   esac
3863 done
3864 rm -f $ac_rmfiles
3865
3866 if { { ac_try="$ac_link_default"
3867 case "(($ac_try" in
3868   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3869   *) ac_try_echo=$ac_try;;
3870 esac
3871 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3872 $as_echo "$ac_try_echo"; } >&5
3873   (eval "$ac_link_default") 2>&5
3874   ac_status=$?
3875   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3876   test $ac_status = 0; }; then :
3877   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3878 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3879 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3880 # so that the user can short-circuit this test for compilers unknown to
3881 # Autoconf.
3882 for ac_file in $ac_files ''
3883 do
3884   test -f "$ac_file" || continue
3885   case $ac_file in
3886     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3887         ;;
3888     [ab].out )
3889         # We found the default executable, but exeext='' is most
3890         # certainly right.
3891         break;;
3892     *.* )
3893         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3894         then :; else
3895            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3896         fi
3897         # We set ac_cv_exeext here because the later test for it is not
3898         # safe: cross compilers may not add the suffix if given an `-o'
3899         # argument, so we may need to know it at that point already.
3900         # Even if this section looks crufty: it has the advantage of
3901         # actually working.
3902         break;;
3903     * )
3904         break;;
3905   esac
3906 done
3907 test "$ac_cv_exeext" = no && ac_cv_exeext=
3908
3909 else
3910   ac_file=''
3911 fi
3912 if test -z "$ac_file"; then :
3913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3914 $as_echo "no" >&6; }
3915 $as_echo "$as_me: failed program was:" >&5
3916 sed 's/^/| /' conftest.$ac_ext >&5
3917
3918 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3919 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3920 as_fn_error 77 "C compiler cannot create executables
3921 See \`config.log' for more details" "$LINENO" 5; }
3922 else
3923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3924 $as_echo "yes" >&6; }
3925 fi
3926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3927 $as_echo_n "checking for C compiler default output file name... " >&6; }
3928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3929 $as_echo "$ac_file" >&6; }
3930 ac_exeext=$ac_cv_exeext
3931
3932 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3933 ac_clean_files=$ac_clean_files_save
3934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3935 $as_echo_n "checking for suffix of executables... " >&6; }
3936 if { { ac_try="$ac_link"
3937 case "(($ac_try" in
3938   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3939   *) ac_try_echo=$ac_try;;
3940 esac
3941 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3942 $as_echo "$ac_try_echo"; } >&5
3943   (eval "$ac_link") 2>&5
3944   ac_status=$?
3945   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3946   test $ac_status = 0; }; then :
3947   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3948 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3949 # work properly (i.e., refer to `conftest.exe'), while it won't with
3950 # `rm'.
3951 for ac_file in conftest.exe conftest conftest.*; do
3952   test -f "$ac_file" || continue
3953   case $ac_file in
3954     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3955     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3956           break;;
3957     * ) break;;
3958   esac
3959 done
3960 else
3961   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3962 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3963 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3964 See \`config.log' for more details" "$LINENO" 5; }
3965 fi
3966 rm -f conftest conftest$ac_cv_exeext
3967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3968 $as_echo "$ac_cv_exeext" >&6; }
3969
3970 rm -f conftest.$ac_ext
3971 EXEEXT=$ac_cv_exeext
3972 ac_exeext=$EXEEXT
3973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3974 /* end confdefs.h.  */
3975 #include <stdio.h>
3976 int
3977 main ()
3978 {
3979 FILE *f = fopen ("conftest.out", "w");
3980  return ferror (f) || fclose (f) != 0;
3981
3982   ;
3983   return 0;
3984 }
3985 _ACEOF
3986 ac_clean_files="$ac_clean_files conftest.out"
3987 # Check that the compiler produces executables we can run.  If not, either
3988 # the compiler is broken, or we cross compile.
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3990 $as_echo_n "checking whether we are cross compiling... " >&6; }
3991 if test "$cross_compiling" != yes; then
3992   { { ac_try="$ac_link"
3993 case "(($ac_try" in
3994   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3995   *) ac_try_echo=$ac_try;;
3996 esac
3997 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3998 $as_echo "$ac_try_echo"; } >&5
3999   (eval "$ac_link") 2>&5
4000   ac_status=$?
4001   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4002   test $ac_status = 0; }
4003   if { ac_try='./conftest$ac_cv_exeext'
4004   { { case "(($ac_try" in
4005   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4006   *) ac_try_echo=$ac_try;;
4007 esac
4008 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4009 $as_echo "$ac_try_echo"; } >&5
4010   (eval "$ac_try") 2>&5
4011   ac_status=$?
4012   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4013   test $ac_status = 0; }; }; then
4014     cross_compiling=no
4015   else
4016     if test "$cross_compiling" = maybe; then
4017         cross_compiling=yes
4018     else
4019         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4020 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4021 as_fn_error $? "cannot run C compiled programs.
4022 If you meant to cross compile, use \`--host'.
4023 See \`config.log' for more details" "$LINENO" 5; }
4024     fi
4025   fi
4026 fi
4027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4028 $as_echo "$cross_compiling" >&6; }
4029
4030 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4031 ac_clean_files=$ac_clean_files_save
4032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4033 $as_echo_n "checking for suffix of object files... " >&6; }
4034 if ${ac_cv_objext+:} false; then :
4035   $as_echo_n "(cached) " >&6
4036 else
4037   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4038 /* end confdefs.h.  */
4039
4040 int
4041 main ()
4042 {
4043
4044   ;
4045   return 0;
4046 }
4047 _ACEOF
4048 rm -f conftest.o conftest.obj
4049 if { { ac_try="$ac_compile"
4050 case "(($ac_try" in
4051   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4052   *) ac_try_echo=$ac_try;;
4053 esac
4054 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4055 $as_echo "$ac_try_echo"; } >&5
4056   (eval "$ac_compile") 2>&5
4057   ac_status=$?
4058   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4059   test $ac_status = 0; }; then :
4060   for ac_file in conftest.o conftest.obj conftest.*; do
4061   test -f "$ac_file" || continue;
4062   case $ac_file in
4063     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4064     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4065        break;;
4066   esac
4067 done
4068 else
4069   $as_echo "$as_me: failed program was:" >&5
4070 sed 's/^/| /' conftest.$ac_ext >&5
4071
4072 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4073 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4074 as_fn_error $? "cannot compute suffix of object files: cannot compile
4075 See \`config.log' for more details" "$LINENO" 5; }
4076 fi
4077 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4078 fi
4079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4080 $as_echo "$ac_cv_objext" >&6; }
4081 OBJEXT=$ac_cv_objext
4082 ac_objext=$OBJEXT
4083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4084 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4085 if ${ac_cv_c_compiler_gnu+:} false; then :
4086   $as_echo_n "(cached) " >&6
4087 else
4088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4089 /* end confdefs.h.  */
4090
4091 int
4092 main ()
4093 {
4094 #ifndef __GNUC__
4095        choke me
4096 #endif
4097
4098   ;
4099   return 0;
4100 }
4101 _ACEOF
4102 if ac_fn_c_try_compile "$LINENO"; then :
4103   ac_compiler_gnu=yes
4104 else
4105   ac_compiler_gnu=no
4106 fi
4107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4108 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4109
4110 fi
4111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4112 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4113 if test $ac_compiler_gnu = yes; then
4114   GCC=yes
4115 else
4116   GCC=
4117 fi
4118 ac_test_CFLAGS=${CFLAGS+set}
4119 ac_save_CFLAGS=$CFLAGS
4120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4121 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4122 if ${ac_cv_prog_cc_g+:} false; then :
4123   $as_echo_n "(cached) " >&6
4124 else
4125   ac_save_c_werror_flag=$ac_c_werror_flag
4126    ac_c_werror_flag=yes
4127    ac_cv_prog_cc_g=no
4128    CFLAGS="-g"
4129    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4130 /* end confdefs.h.  */
4131
4132 int
4133 main ()
4134 {
4135
4136   ;
4137   return 0;
4138 }
4139 _ACEOF
4140 if ac_fn_c_try_compile "$LINENO"; then :
4141   ac_cv_prog_cc_g=yes
4142 else
4143   CFLAGS=""
4144       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4145 /* end confdefs.h.  */
4146
4147 int
4148 main ()
4149 {
4150
4151   ;
4152   return 0;
4153 }
4154 _ACEOF
4155 if ac_fn_c_try_compile "$LINENO"; then :
4156
4157 else
4158   ac_c_werror_flag=$ac_save_c_werror_flag
4159          CFLAGS="-g"
4160          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4161 /* end confdefs.h.  */
4162
4163 int
4164 main ()
4165 {
4166
4167   ;
4168   return 0;
4169 }
4170 _ACEOF
4171 if ac_fn_c_try_compile "$LINENO"; then :
4172   ac_cv_prog_cc_g=yes
4173 fi
4174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4175 fi
4176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4177 fi
4178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4179    ac_c_werror_flag=$ac_save_c_werror_flag
4180 fi
4181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4182 $as_echo "$ac_cv_prog_cc_g" >&6; }
4183 if test "$ac_test_CFLAGS" = set; then
4184   CFLAGS=$ac_save_CFLAGS
4185 elif test $ac_cv_prog_cc_g = yes; then
4186   if test "$GCC" = yes; then
4187     CFLAGS="-g -O2"
4188   else
4189     CFLAGS="-g"
4190   fi
4191 else
4192   if test "$GCC" = yes; then
4193     CFLAGS="-O2"
4194   else
4195     CFLAGS=
4196   fi
4197 fi
4198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4199 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4200 if ${ac_cv_prog_cc_c89+:} false; then :
4201   $as_echo_n "(cached) " >&6
4202 else
4203   ac_cv_prog_cc_c89=no
4204 ac_save_CC=$CC
4205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4206 /* end confdefs.h.  */
4207 #include <stdarg.h>
4208 #include <stdio.h>
4209 struct stat;
4210 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4211 struct buf { int x; };
4212 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4213 static char *e (p, i)
4214      char **p;
4215      int i;
4216 {
4217   return p[i];
4218 }
4219 static char *f (char * (*g) (char **, int), char **p, ...)
4220 {
4221   char *s;
4222   va_list v;
4223   va_start (v,p);
4224   s = g (p, va_arg (v,int));
4225   va_end (v);
4226   return s;
4227 }
4228
4229 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4230    function prototypes and stuff, but not '\xHH' hex character constants.
4231    These don't provoke an error unfortunately, instead are silently treated
4232    as 'x'.  The following induces an error, until -std is added to get
4233    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4234    array size at least.  It's necessary to write '\x00'==0 to get something
4235    that's true only with -std.  */
4236 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4237
4238 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4239    inside strings and character constants.  */
4240 #define FOO(x) 'x'
4241 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4242
4243 int test (int i, double x);
4244 struct s1 {int (*f) (int a);};
4245 struct s2 {int (*f) (double a);};
4246 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4247 int argc;
4248 char **argv;
4249 int
4250 main ()
4251 {
4252 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4253   ;
4254   return 0;
4255 }
4256 _ACEOF
4257 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4258         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4259 do
4260   CC="$ac_save_CC $ac_arg"
4261   if ac_fn_c_try_compile "$LINENO"; then :
4262   ac_cv_prog_cc_c89=$ac_arg
4263 fi
4264 rm -f core conftest.err conftest.$ac_objext
4265   test "x$ac_cv_prog_cc_c89" != "xno" && break
4266 done
4267 rm -f conftest.$ac_ext
4268 CC=$ac_save_CC
4269
4270 fi
4271 # AC_CACHE_VAL
4272 case "x$ac_cv_prog_cc_c89" in
4273   x)
4274     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4275 $as_echo "none needed" >&6; } ;;
4276   xno)
4277     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4278 $as_echo "unsupported" >&6; } ;;
4279   *)
4280     CC="$CC $ac_cv_prog_cc_c89"
4281     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4282 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4283 esac
4284 if test "x$ac_cv_prog_cc_c89" != xno; then :
4285
4286 fi
4287
4288 ac_ext=c
4289 ac_cpp='$CPP $CPPFLAGS'
4290 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4291 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4292 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4293
4294 ac_ext=c
4295 ac_cpp='$CPP $CPPFLAGS'
4296 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4297 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4298 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4300 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4301 if ${am_cv_prog_cc_c_o+:} false; then :
4302   $as_echo_n "(cached) " >&6
4303 else
4304   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4305 /* end confdefs.h.  */
4306
4307 int
4308 main ()
4309 {
4310
4311   ;
4312   return 0;
4313 }
4314 _ACEOF
4315   # Make sure it works both with $CC and with simple cc.
4316   # Following AC_PROG_CC_C_O, we do the test twice because some
4317   # compilers refuse to overwrite an existing .o file with -o,
4318   # though they will create one.
4319   am_cv_prog_cc_c_o=yes
4320   for am_i in 1 2; do
4321     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4322    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4323    ac_status=$?
4324    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4325    (exit $ac_status); } \
4326          && test -f conftest2.$ac_objext; then
4327       : OK
4328     else
4329       am_cv_prog_cc_c_o=no
4330       break
4331     fi
4332   done
4333   rm -f core conftest*
4334   unset am_i
4335 fi
4336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4337 $as_echo "$am_cv_prog_cc_c_o" >&6; }
4338 if test "$am_cv_prog_cc_c_o" != yes; then
4339    # Losing compiler, so override with the script.
4340    # FIXME: It is wrong to rewrite CC.
4341    # But if we don't then we get into trouble of one sort or another.
4342    # A longer-term fix would be to have automake use am__CC in this case,
4343    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4344    CC="$am_aux_dir/compile $CC"
4345 fi
4346 ac_ext=c
4347 ac_cpp='$CPP $CPPFLAGS'
4348 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4349 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4350 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4351
4352
4353 depcc="$CC"   am_compiler_list=
4354
4355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4356 $as_echo_n "checking dependency style of $depcc... " >&6; }
4357 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4358   $as_echo_n "(cached) " >&6
4359 else
4360   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4361   # We make a subdir and do the tests there.  Otherwise we can end up
4362   # making bogus files that we don't know about and never remove.  For
4363   # instance it was reported that on HP-UX the gcc test will end up
4364   # making a dummy file named 'D' -- because '-MD' means "put the output
4365   # in D".
4366   rm -rf conftest.dir
4367   mkdir conftest.dir
4368   # Copy depcomp to subdir because otherwise we won't find it if we're
4369   # using a relative directory.
4370   cp "$am_depcomp" conftest.dir
4371   cd conftest.dir
4372   # We will build objects and dependencies in a subdirectory because
4373   # it helps to detect inapplicable dependency modes.  For instance
4374   # both Tru64's cc and ICC support -MD to output dependencies as a
4375   # side effect of compilation, but ICC will put the dependencies in
4376   # the current directory while Tru64 will put them in the object
4377   # directory.
4378   mkdir sub
4379
4380   am_cv_CC_dependencies_compiler_type=none
4381   if test "$am_compiler_list" = ""; then
4382      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4383   fi
4384   am__universal=false
4385   case " $depcc " in #(
4386      *\ -arch\ *\ -arch\ *) am__universal=true ;;
4387      esac
4388
4389   for depmode in $am_compiler_list; do
4390     # Setup a source with many dependencies, because some compilers
4391     # like to wrap large dependency lists on column 80 (with \), and
4392     # we should not choose a depcomp mode which is confused by this.
4393     #
4394     # We need to recreate these files for each test, as the compiler may
4395     # overwrite some of them when testing with obscure command lines.
4396     # This happens at least with the AIX C compiler.
4397     : > sub/conftest.c
4398     for i in 1 2 3 4 5 6; do
4399       echo '#include "conftst'$i'.h"' >> sub/conftest.c
4400       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4401       # Solaris 10 /bin/sh.
4402       echo '/* dummy */' > sub/conftst$i.h
4403     done
4404     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4405
4406     # We check with '-c' and '-o' for the sake of the "dashmstdout"
4407     # mode.  It turns out that the SunPro C++ compiler does not properly
4408     # handle '-M -o', and we need to detect this.  Also, some Intel
4409     # versions had trouble with output in subdirs.
4410     am__obj=sub/conftest.${OBJEXT-o}
4411     am__minus_obj="-o $am__obj"
4412     case $depmode in
4413     gcc)
4414       # This depmode causes a compiler race in universal mode.
4415       test "$am__universal" = false || continue
4416       ;;
4417     nosideeffect)
4418       # After this tag, mechanisms are not by side-effect, so they'll
4419       # only be used when explicitly requested.
4420       if test "x$enable_dependency_tracking" = xyes; then
4421         continue
4422       else
4423         break
4424       fi
4425       ;;
4426     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4427       # This compiler won't grok '-c -o', but also, the minuso test has
4428       # not run yet.  These depmodes are late enough in the game, and
4429       # so weak that their functioning should not be impacted.
4430       am__obj=conftest.${OBJEXT-o}
4431       am__minus_obj=
4432       ;;
4433     none) break ;;
4434     esac
4435     if depmode=$depmode \
4436        source=sub/conftest.c object=$am__obj \
4437        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4438        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4439          >/dev/null 2>conftest.err &&
4440        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4441        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4442        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4443        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4444       # icc doesn't choke on unknown options, it will just issue warnings
4445       # or remarks (even with -Werror).  So we grep stderr for any message
4446       # that says an option was ignored or not supported.
4447       # When given -MP, icc 7.0 and 7.1 complain thusly:
4448       #   icc: Command line warning: ignoring option '-M'; no argument required
4449       # The diagnosis changed in icc 8.0:
4450       #   icc: Command line remark: option '-MP' not supported
4451       if (grep 'ignoring option' conftest.err ||
4452           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4453         am_cv_CC_dependencies_compiler_type=$depmode
4454         break
4455       fi
4456     fi
4457   done
4458
4459   cd ..
4460   rm -rf conftest.dir
4461 else
4462   am_cv_CC_dependencies_compiler_type=none
4463 fi
4464
4465 fi
4466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4467 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4468 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4469
4470  if
4471   test "x$enable_dependency_tracking" != xno \
4472   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4473   am__fastdepCC_TRUE=
4474   am__fastdepCC_FALSE='#'
4475 else
4476   am__fastdepCC_TRUE='#'
4477   am__fastdepCC_FALSE=
4478 fi
4479
4480
4481
4482
4483
4484 ac_ext=c
4485 ac_cpp='$CPP $CPPFLAGS'
4486 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4487 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4488 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4490 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4491 # On Suns, sometimes $CPP names a directory.
4492 if test -n "$CPP" && test -d "$CPP"; then
4493   CPP=
4494 fi
4495 if test -z "$CPP"; then
4496   if ${ac_cv_prog_CPP+:} false; then :
4497   $as_echo_n "(cached) " >&6
4498 else
4499       # Double quotes because CPP needs to be expanded
4500     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4501     do
4502       ac_preproc_ok=false
4503 for ac_c_preproc_warn_flag in '' yes
4504 do
4505   # Use a header file that comes with gcc, so configuring glibc
4506   # with a fresh cross-compiler works.
4507   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4508   # <limits.h> exists even on freestanding compilers.
4509   # On the NeXT, cc -E runs the code through the compiler's parser,
4510   # not just through cpp. "Syntax error" is here to catch this case.
4511   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4512 /* end confdefs.h.  */
4513 #ifdef __STDC__
4514 # include <limits.h>
4515 #else
4516 # include <assert.h>
4517 #endif
4518                      Syntax error
4519 _ACEOF
4520 if ac_fn_c_try_cpp "$LINENO"; then :
4521
4522 else
4523   # Broken: fails on valid input.
4524 continue
4525 fi
4526 rm -f conftest.err conftest.i conftest.$ac_ext
4527
4528   # OK, works on sane cases.  Now check whether nonexistent headers
4529   # can be detected and how.
4530   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4531 /* end confdefs.h.  */
4532 #include <ac_nonexistent.h>
4533 _ACEOF
4534 if ac_fn_c_try_cpp "$LINENO"; then :
4535   # Broken: success on invalid input.
4536 continue
4537 else
4538   # Passes both tests.
4539 ac_preproc_ok=:
4540 break
4541 fi
4542 rm -f conftest.err conftest.i conftest.$ac_ext
4543
4544 done
4545 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4546 rm -f conftest.i conftest.err conftest.$ac_ext
4547 if $ac_preproc_ok; then :
4548   break
4549 fi
4550
4551     done
4552     ac_cv_prog_CPP=$CPP
4553
4554 fi
4555   CPP=$ac_cv_prog_CPP
4556 else
4557   ac_cv_prog_CPP=$CPP
4558 fi
4559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4560 $as_echo "$CPP" >&6; }
4561 ac_preproc_ok=false
4562 for ac_c_preproc_warn_flag in '' yes
4563 do
4564   # Use a header file that comes with gcc, so configuring glibc
4565   # with a fresh cross-compiler works.
4566   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4567   # <limits.h> exists even on freestanding compilers.
4568   # On the NeXT, cc -E runs the code through the compiler's parser,
4569   # not just through cpp. "Syntax error" is here to catch this case.
4570   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4571 /* end confdefs.h.  */
4572 #ifdef __STDC__
4573 # include <limits.h>
4574 #else
4575 # include <assert.h>
4576 #endif
4577                      Syntax error
4578 _ACEOF
4579 if ac_fn_c_try_cpp "$LINENO"; then :
4580
4581 else
4582   # Broken: fails on valid input.
4583 continue
4584 fi
4585 rm -f conftest.err conftest.i conftest.$ac_ext
4586
4587   # OK, works on sane cases.  Now check whether nonexistent headers
4588   # can be detected and how.
4589   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4590 /* end confdefs.h.  */
4591 #include <ac_nonexistent.h>
4592 _ACEOF
4593 if ac_fn_c_try_cpp "$LINENO"; then :
4594   # Broken: success on invalid input.
4595 continue
4596 else
4597   # Passes both tests.
4598 ac_preproc_ok=:
4599 break
4600 fi
4601 rm -f conftest.err conftest.i conftest.$ac_ext
4602
4603 done
4604 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4605 rm -f conftest.i conftest.err conftest.$ac_ext
4606 if $ac_preproc_ok; then :
4607
4608 else
4609   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4610 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4611 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4612 See \`config.log' for more details" "$LINENO" 5; }
4613 fi
4614
4615 ac_ext=c
4616 ac_cpp='$CPP $CPPFLAGS'
4617 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4618 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4619 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4620
4621
4622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4623 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4624 if ${ac_cv_path_GREP+:} false; then :
4625   $as_echo_n "(cached) " >&6
4626 else
4627   if test -z "$GREP"; then
4628   ac_path_GREP_found=false
4629   # Loop through the user's path and test for each of PROGNAME-LIST
4630   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4631 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4632 do
4633   IFS=$as_save_IFS
4634   test -z "$as_dir" && as_dir=.
4635     for ac_prog in grep ggrep; do
4636     for ac_exec_ext in '' $ac_executable_extensions; do
4637       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4638       as_fn_executable_p "$ac_path_GREP" || continue
4639 # Check for GNU ac_path_GREP and select it if it is found.
4640   # Check for GNU $ac_path_GREP
4641 case `"$ac_path_GREP" --version 2>&1` in
4642 *GNU*)
4643   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4644 *)
4645   ac_count=0
4646   $as_echo_n 0123456789 >"conftest.in"
4647   while :
4648   do
4649     cat "conftest.in" "conftest.in" >"conftest.tmp"
4650     mv "conftest.tmp" "conftest.in"
4651     cp "conftest.in" "conftest.nl"
4652     $as_echo 'GREP' >> "conftest.nl"
4653     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4654     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4655     as_fn_arith $ac_count + 1 && ac_count=$as_val
4656     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4657       # Best one so far, save it but keep looking for a better one
4658       ac_cv_path_GREP="$ac_path_GREP"
4659       ac_path_GREP_max=$ac_count
4660     fi
4661     # 10*(2^10) chars as input seems more than enough
4662     test $ac_count -gt 10 && break
4663   done
4664   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4665 esac
4666
4667       $ac_path_GREP_found && break 3
4668     done
4669   done
4670   done
4671 IFS=$as_save_IFS
4672   if test -z "$ac_cv_path_GREP"; then
4673     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4674   fi
4675 else
4676   ac_cv_path_GREP=$GREP
4677 fi
4678
4679 fi
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4681 $as_echo "$ac_cv_path_GREP" >&6; }
4682  GREP="$ac_cv_path_GREP"
4683
4684
4685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4686 $as_echo_n "checking for egrep... " >&6; }
4687 if ${ac_cv_path_EGREP+:} false; then :
4688   $as_echo_n "(cached) " >&6
4689 else
4690   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4691    then ac_cv_path_EGREP="$GREP -E"
4692    else
4693      if test -z "$EGREP"; then
4694   ac_path_EGREP_found=false
4695   # Loop through the user's path and test for each of PROGNAME-LIST
4696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4697 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4698 do
4699   IFS=$as_save_IFS
4700   test -z "$as_dir" && as_dir=.
4701     for ac_prog in egrep; do
4702     for ac_exec_ext in '' $ac_executable_extensions; do
4703       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4704       as_fn_executable_p "$ac_path_EGREP" || continue
4705 # Check for GNU ac_path_EGREP and select it if it is found.
4706   # Check for GNU $ac_path_EGREP
4707 case `"$ac_path_EGREP" --version 2>&1` in
4708 *GNU*)
4709   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4710 *)
4711   ac_count=0
4712   $as_echo_n 0123456789 >"conftest.in"
4713   while :
4714   do
4715     cat "conftest.in" "conftest.in" >"conftest.tmp"
4716     mv "conftest.tmp" "conftest.in"
4717     cp "conftest.in" "conftest.nl"
4718     $as_echo 'EGREP' >> "conftest.nl"
4719     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4720     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4721     as_fn_arith $ac_count + 1 && ac_count=$as_val
4722     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4723       # Best one so far, save it but keep looking for a better one
4724       ac_cv_path_EGREP="$ac_path_EGREP"
4725       ac_path_EGREP_max=$ac_count
4726     fi
4727     # 10*(2^10) chars as input seems more than enough
4728     test $ac_count -gt 10 && break
4729   done
4730   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4731 esac
4732
4733       $ac_path_EGREP_found && break 3
4734     done
4735   done
4736   done
4737 IFS=$as_save_IFS
4738   if test -z "$ac_cv_path_EGREP"; then
4739     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4740   fi
4741 else
4742   ac_cv_path_EGREP=$EGREP
4743 fi
4744
4745    fi
4746 fi
4747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4748 $as_echo "$ac_cv_path_EGREP" >&6; }
4749  EGREP="$ac_cv_path_EGREP"
4750
4751
4752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4753 $as_echo_n "checking for ANSI C header files... " >&6; }
4754 if ${ac_cv_header_stdc+:} false; then :
4755   $as_echo_n "(cached) " >&6
4756 else
4757   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4758 /* end confdefs.h.  */
4759 #include <stdlib.h>
4760 #include <stdarg.h>
4761 #include <string.h>
4762 #include <float.h>
4763
4764 int
4765 main ()
4766 {
4767
4768   ;
4769   return 0;
4770 }
4771 _ACEOF
4772 if ac_fn_c_try_compile "$LINENO"; then :
4773   ac_cv_header_stdc=yes
4774 else
4775   ac_cv_header_stdc=no
4776 fi
4777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4778
4779 if test $ac_cv_header_stdc = yes; then
4780   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4781   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4782 /* end confdefs.h.  */
4783 #include <string.h>
4784
4785 _ACEOF
4786 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4787   $EGREP "memchr" >/dev/null 2>&1; then :
4788
4789 else
4790   ac_cv_header_stdc=no
4791 fi
4792 rm -f conftest*
4793
4794 fi
4795
4796 if test $ac_cv_header_stdc = yes; then
4797   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4798   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4799 /* end confdefs.h.  */
4800 #include <stdlib.h>
4801
4802 _ACEOF
4803 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4804   $EGREP "free" >/dev/null 2>&1; then :
4805
4806 else
4807   ac_cv_header_stdc=no
4808 fi
4809 rm -f conftest*
4810
4811 fi
4812
4813 if test $ac_cv_header_stdc = yes; then
4814   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4815   if test "$cross_compiling" = yes; then :
4816   :
4817 else
4818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4819 /* end confdefs.h.  */
4820 #include <ctype.h>
4821 #include <stdlib.h>
4822 #if ((' ' & 0x0FF) == 0x020)
4823 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4824 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4825 #else
4826 # define ISLOWER(c) \
4827                    (('a' <= (c) && (c) <= 'i') \
4828                      || ('j' <= (c) && (c) <= 'r') \
4829                      || ('s' <= (c) && (c) <= 'z'))
4830 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4831 #endif
4832
4833 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4834 int
4835 main ()
4836 {
4837   int i;
4838   for (i = 0; i < 256; i++)
4839     if (XOR (islower (i), ISLOWER (i))
4840         || toupper (i) != TOUPPER (i))
4841       return 2;
4842   return 0;
4843 }
4844 _ACEOF
4845 if ac_fn_c_try_run "$LINENO"; then :
4846
4847 else
4848   ac_cv_header_stdc=no
4849 fi
4850 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4851   conftest.$ac_objext conftest.beam conftest.$ac_ext
4852 fi
4853
4854 fi
4855 fi
4856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4857 $as_echo "$ac_cv_header_stdc" >&6; }
4858 if test $ac_cv_header_stdc = yes; then
4859
4860 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4861
4862 fi
4863
4864 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4865 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4866                   inttypes.h stdint.h unistd.h
4867 do :
4868   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4869 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4870 "
4871 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4872   cat >>confdefs.h <<_ACEOF
4873 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4874 _ACEOF
4875
4876 fi
4877
4878 done
4879
4880
4881
4882
4883
4884   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4885 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4886   MINIX=yes
4887 else
4888   MINIX=
4889 fi
4890
4891
4892   if test "$MINIX" = yes; then
4893
4894 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4895
4896
4897 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4898
4899
4900 $as_echo "#define _MINIX 1" >>confdefs.h
4901
4902   fi
4903
4904         case "$host_os" in
4905     hpux*)
4906
4907 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4908
4909       ;;
4910   esac
4911
4912
4913   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4914 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4915 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4916   $as_echo_n "(cached) " >&6
4917 else
4918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4919 /* end confdefs.h.  */
4920
4921 #         define __EXTENSIONS__ 1
4922           $ac_includes_default
4923 int
4924 main ()
4925 {
4926
4927   ;
4928   return 0;
4929 }
4930 _ACEOF
4931 if ac_fn_c_try_compile "$LINENO"; then :
4932   ac_cv_safe_to_define___extensions__=yes
4933 else
4934   ac_cv_safe_to_define___extensions__=no
4935 fi
4936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4937 fi
4938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4939 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4940   test $ac_cv_safe_to_define___extensions__ = yes &&
4941     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4942
4943   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4944
4945   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4946
4947   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4948
4949   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4950
4951
4952
4953    case $ac_cv_prog_cc_stdc in #(
4954   no) :
4955     ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
4956   *) :
4957     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4958 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4959 if ${ac_cv_prog_cc_c99+:} false; then :
4960   $as_echo_n "(cached) " >&6
4961 else
4962   ac_cv_prog_cc_c99=no
4963 ac_save_CC=$CC
4964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4965 /* end confdefs.h.  */
4966 #include <stdarg.h>
4967 #include <stdbool.h>
4968 #include <stdlib.h>
4969 #include <wchar.h>
4970 #include <stdio.h>
4971
4972 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
4973 #define debug(...) fprintf (stderr, __VA_ARGS__)
4974 #define showlist(...) puts (#__VA_ARGS__)
4975 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4976 static void
4977 test_varargs_macros (void)
4978 {
4979   int x = 1234;
4980   int y = 5678;
4981   debug ("Flag");
4982   debug ("X = %d\n", x);
4983   showlist (The first, second, and third items.);
4984   report (x>y, "x is %d but y is %d", x, y);
4985 }
4986
4987 // Check long long types.
4988 #define BIG64 18446744073709551615ull
4989 #define BIG32 4294967295ul
4990 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4991 #if !BIG_OK
4992   your preprocessor is broken;
4993 #endif
4994 #if BIG_OK
4995 #else
4996   your preprocessor is broken;
4997 #endif
4998 static long long int bignum = -9223372036854775807LL;
4999 static unsigned long long int ubignum = BIG64;
5000
5001 struct incomplete_array
5002 {
5003   int datasize;
5004   double data[];
5005 };
5006
5007 struct named_init {
5008   int number;
5009   const wchar_t *name;
5010   double average;
5011 };
5012
5013 typedef const char *ccp;
5014
5015 static inline int
5016 test_restrict (ccp restrict text)
5017 {
5018   // See if C++-style comments work.
5019   // Iterate through items via the restricted pointer.
5020   // Also check for declarations in for loops.
5021   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5022     continue;
5023   return 0;
5024 }
5025
5026 // Check varargs and va_copy.
5027 static void
5028 test_varargs (const char *format, ...)
5029 {
5030   va_list args;
5031   va_start (args, format);
5032   va_list args_copy;
5033   va_copy (args_copy, args);
5034
5035   const char *str;
5036   int number;
5037   float fnumber;
5038
5039   while (*format)
5040     {
5041       switch (*format++)
5042         {
5043         case 's': // string
5044           str = va_arg (args_copy, const char *);
5045           break;
5046         case 'd': // int
5047           number = va_arg (args_copy, int);
5048           break;
5049         case 'f': // float
5050           fnumber = va_arg (args_copy, double);
5051           break;
5052         default:
5053           break;
5054         }
5055     }
5056   va_end (args_copy);
5057   va_end (args);
5058 }
5059
5060 int
5061 main ()
5062 {
5063
5064   // Check bool.
5065   _Bool success = false;
5066
5067   // Check restrict.
5068   if (test_restrict ("String literal") == 0)
5069     success = true;
5070   char *restrict newvar = "Another string";
5071
5072   // Check varargs.
5073   test_varargs ("s, d' f .", "string", 65, 34.234);
5074   test_varargs_macros ();
5075
5076   // Check flexible array members.
5077   struct incomplete_array *ia =
5078     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5079   ia->datasize = 10;
5080   for (int i = 0; i < ia->datasize; ++i)
5081     ia->data[i] = i * 1.234;
5082
5083   // Check named initializers.
5084   struct named_init ni = {
5085     .number = 34,
5086     .name = L"Test wide string",
5087     .average = 543.34343,
5088   };
5089
5090   ni.number = 58;
5091
5092   int dynamic_array[ni.number];
5093   dynamic_array[ni.number - 1] = 543;
5094
5095   // work around unused variable warnings
5096   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5097           || dynamic_array[ni.number - 1] != 543);
5098
5099   ;
5100   return 0;
5101 }
5102 _ACEOF
5103 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
5104 do
5105   CC="$ac_save_CC $ac_arg"
5106   if ac_fn_c_try_compile "$LINENO"; then :
5107   ac_cv_prog_cc_c99=$ac_arg
5108 fi
5109 rm -f core conftest.err conftest.$ac_objext
5110   test "x$ac_cv_prog_cc_c99" != "xno" && break
5111 done
5112 rm -f conftest.$ac_ext
5113 CC=$ac_save_CC
5114
5115 fi
5116 # AC_CACHE_VAL
5117 case "x$ac_cv_prog_cc_c99" in
5118   x)
5119     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5120 $as_echo "none needed" >&6; } ;;
5121   xno)
5122     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5123 $as_echo "unsupported" >&6; } ;;
5124   *)
5125     CC="$CC $ac_cv_prog_cc_c99"
5126     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5127 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5128 esac
5129 if test "x$ac_cv_prog_cc_c99" != xno; then :
5130   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5131 else
5132   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5133 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5134 if ${ac_cv_prog_cc_c89+:} false; then :
5135   $as_echo_n "(cached) " >&6
5136 else
5137   ac_cv_prog_cc_c89=no
5138 ac_save_CC=$CC
5139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5140 /* end confdefs.h.  */
5141 #include <stdarg.h>
5142 #include <stdio.h>
5143 struct stat;
5144 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5145 struct buf { int x; };
5146 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5147 static char *e (p, i)
5148      char **p;
5149      int i;
5150 {
5151   return p[i];
5152 }
5153 static char *f (char * (*g) (char **, int), char **p, ...)
5154 {
5155   char *s;
5156   va_list v;
5157   va_start (v,p);
5158   s = g (p, va_arg (v,int));
5159   va_end (v);
5160   return s;
5161 }
5162
5163 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5164    function prototypes and stuff, but not '\xHH' hex character constants.
5165    These don't provoke an error unfortunately, instead are silently treated
5166    as 'x'.  The following induces an error, until -std is added to get
5167    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5168    array size at least.  It's necessary to write '\x00'==0 to get something
5169    that's true only with -std.  */
5170 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5171
5172 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5173    inside strings and character constants.  */
5174 #define FOO(x) 'x'
5175 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5176
5177 int test (int i, double x);
5178 struct s1 {int (*f) (int a);};
5179 struct s2 {int (*f) (double a);};
5180 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5181 int argc;
5182 char **argv;
5183 int
5184 main ()
5185 {
5186 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5187   ;
5188   return 0;
5189 }
5190 _ACEOF
5191 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5192         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5193 do
5194   CC="$ac_save_CC $ac_arg"
5195   if ac_fn_c_try_compile "$LINENO"; then :
5196   ac_cv_prog_cc_c89=$ac_arg
5197 fi
5198 rm -f core conftest.err conftest.$ac_objext
5199   test "x$ac_cv_prog_cc_c89" != "xno" && break
5200 done
5201 rm -f conftest.$ac_ext
5202 CC=$ac_save_CC
5203
5204 fi
5205 # AC_CACHE_VAL
5206 case "x$ac_cv_prog_cc_c89" in
5207   x)
5208     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5209 $as_echo "none needed" >&6; } ;;
5210   xno)
5211     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5212 $as_echo "unsupported" >&6; } ;;
5213   *)
5214     CC="$CC $ac_cv_prog_cc_c89"
5215     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5216 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5217 esac
5218 if test "x$ac_cv_prog_cc_c89" != xno; then :
5219   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5220 else
5221   ac_cv_prog_cc_stdc=no
5222 fi
5223
5224 fi
5225  ;;
5226 esac
5227   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
5228 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
5229   if ${ac_cv_prog_cc_stdc+:} false; then :
5230   $as_echo_n "(cached) " >&6
5231 fi
5232
5233   case $ac_cv_prog_cc_stdc in #(
5234   no) :
5235     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5236 $as_echo "unsupported" >&6; } ;; #(
5237   '') :
5238     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5239 $as_echo "none needed" >&6; } ;; #(
5240   *) :
5241     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
5242 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
5243 esac
5244
5245
5246
5247
5248
5249 # Ralf Wildenhues: With per-target flags we need CC_C_O
5250 # AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
5251
5252 if test $ac_cv_c_compiler_gnu = yes; then
5253     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
5254 $as_echo_n "checking whether $CC needs -traditional... " >&6; }
5255 if ${ac_cv_prog_gcc_traditional+:} false; then :
5256   $as_echo_n "(cached) " >&6
5257 else
5258     ac_pattern="Autoconf.*'x'"
5259   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5260 /* end confdefs.h.  */
5261 #include <sgtty.h>
5262 Autoconf TIOCGETP
5263 _ACEOF
5264 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5265   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
5266   ac_cv_prog_gcc_traditional=yes
5267 else
5268   ac_cv_prog_gcc_traditional=no
5269 fi
5270 rm -f conftest*
5271
5272
5273   if test $ac_cv_prog_gcc_traditional = no; then
5274     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5275 /* end confdefs.h.  */
5276 #include <termio.h>
5277 Autoconf TCGETA
5278 _ACEOF
5279 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5280   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
5281   ac_cv_prog_gcc_traditional=yes
5282 fi
5283 rm -f conftest*
5284
5285   fi
5286 fi
5287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
5288 $as_echo "$ac_cv_prog_gcc_traditional" >&6; }
5289   if test $ac_cv_prog_gcc_traditional = yes; then
5290     CC="$CC -traditional"
5291   fi
5292 fi
5293
5294
5295
5296 CFLAGS_NTP=
5297 CPPFLAGS_NTP=
5298 LDADD_NTP=
5299 LDFLAGS_NTP=
5300
5301
5302
5303
5304
5305 case "$ac_cv_prog_cc_c89" in
5306  no)
5307     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
5308                  version 4.2.5 and higher." >&5
5309 $as_echo "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
5310                  version 4.2.5 and higher." >&2;}
5311     ;;
5312 esac
5313
5314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
5315 $as_echo_n "checking if $CC can handle #warning... " >&6; }
5316 if ${ntp_cv_cpp_warning+:} false; then :
5317   $as_echo_n "(cached) " >&6
5318 else
5319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5320 /* end confdefs.h.  */
5321
5322 int
5323 main ()
5324 {
5325 #warning foo
5326   ;
5327   return 0;
5328 }
5329 _ACEOF
5330 if ac_fn_c_try_compile "$LINENO"; then :
5331   ntp_cv_cpp_warning=yes
5332 else
5333   ntp_cv_cpp_warning=no
5334
5335 fi
5336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5337
5338 fi
5339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cpp_warning" >&5
5340 $as_echo "$ntp_cv_cpp_warning" >&6; }
5341 case "$ntp_cv_cpp_warning" in
5342  no)
5343
5344 $as_echo "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
5345
5346 esac
5347
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__((...))" >&5
5349 $as_echo_n "checking if $CC supports __attribute__((...))... " >&6; }
5350 if ${ntp_cv_cc_attribute+:} false; then :
5351   $as_echo_n "(cached) " >&6
5352 else
5353   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5354 /* end confdefs.h.  */
5355
5356 int
5357 main ()
5358 {
5359 void foo(void) __attribute__((__noreturn__));
5360
5361   ;
5362   return 0;
5363 }
5364 _ACEOF
5365 if ac_fn_c_try_compile "$LINENO"; then :
5366   ntp_cv_cc_attribute=yes
5367 else
5368   ntp_cv_cc_attribute=no
5369
5370 fi
5371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5372
5373 fi
5374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cc_attribute" >&5
5375 $as_echo "$ntp_cv_cc_attribute" >&6; }
5376 case "$ntp_cv_cc_attribute" in
5377  yes)
5378
5379 $as_echo "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h
5380
5381 esac
5382
5383
5384 case "$GCC" in
5385  yes)
5386     SAVED_CFLAGS="$CFLAGS"
5387     CFLAGS="$CFLAGS -Wstrict-overflow"
5388     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
5389 $as_echo_n "checking if $CC can handle -Wstrict-overflow... " >&6; }
5390 if ${ntp_cv_gcc_Wstrict_overflow+:} false; then :
5391   $as_echo_n "(cached) " >&6
5392 else
5393   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5394 /* end confdefs.h.  */
5395
5396 int
5397 main ()
5398 {
5399
5400   ;
5401   return 0;
5402 }
5403 _ACEOF
5404 if ac_fn_c_try_compile "$LINENO"; then :
5405   ntp_cv_gcc_Wstrict_overflow=yes
5406 else
5407   ntp_cv_gcc_Wstrict_overflow=no
5408
5409 fi
5410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5411
5412 fi
5413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wstrict_overflow" >&5
5414 $as_echo "$ntp_cv_gcc_Wstrict_overflow" >&6; }
5415     #
5416     # $ntp_cv_gcc_Wstrict_overflow is tested later to add the
5417     # flag to CFLAGS.
5418     #
5419     CFLAGS="$SAVED_CFLAGS -Winit-self"
5420     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
5421 $as_echo_n "checking if $CC can handle -Winit-self... " >&6; }
5422 if ${ntp_cv_gcc_Winit_self+:} false; then :
5423   $as_echo_n "(cached) " >&6
5424 else
5425
5426             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5427 /* end confdefs.h.  */
5428
5429 int
5430 main ()
5431 {
5432
5433   ;
5434   return 0;
5435 }
5436 _ACEOF
5437 if ac_fn_c_try_compile "$LINENO"; then :
5438   ntp_cv_gcc_Winit_self=yes
5439 else
5440   ntp_cv_gcc_Winit_self=no
5441
5442 fi
5443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5444
5445
5446 fi
5447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
5448 $as_echo "$ntp_cv_gcc_Winit_self" >&6; }
5449     CFLAGS="$SAVED_CFLAGS"
5450     { SAVED_CFLAGS=; unset SAVED_CFLAGS;}
5451     #
5452     # $ntp_cv_gcc_Winit_self is tested later to add the
5453     # flag to CFLAGS_NTP.
5454     #
5455     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
5456 $as_echo_n "checking if linker supports omitting unused code and data... " >&6; }
5457 if ${ntp_cv_gc_sections_runs+:} false; then :
5458   $as_echo_n "(cached) " >&6
5459 else
5460
5461                                                                                             origCFLAGS="$CFLAGS"
5462             CFLAGS="$CFLAGS -Wl,--gc-sections"
5463             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5464 /* end confdefs.h.  */
5465
5466                         #include <stdlib.h>
5467                         #include <stdio.h>
5468
5469 int
5470 main ()
5471 {
5472
5473                         FILE *  fpC;
5474                         char    buf[32];
5475                         size_t  cch;
5476                         int     read_success_once;
5477
5478                         fpC = fopen("conftest.c", "r");
5479                         if (NULL == fpC)
5480                                 exit(1);
5481                         do {
5482                                 cch = fread(buf, sizeof(buf), 1, fpC);
5483                                 read_success_once |= (0 != cch);
5484                         } while (0 != cch);
5485                         if (!read_success_once)
5486                                 exit(2);
5487                         if (!feof(fpC))
5488                                 exit(3);
5489                         if (0 != fclose(fpC))
5490                                 exit(4);
5491
5492                         exit(EXIT_SUCCESS);
5493
5494
5495   ;
5496   return 0;
5497 }
5498 _ACEOF
5499 if ac_fn_c_try_link "$LINENO"; then :
5500
5501                     if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
5502                         ntp_cv_gc_sections_runs=no
5503                     else
5504                         ntp_cv_gc_sections_runs=no
5505                         ./conftest >/dev/null 2>&1 && ntp_cv_gc_sections_runs=yes
5506                     fi
5507
5508 else
5509   ntp_cv_gc_sections_runs=no
5510
5511 fi
5512 rm -f core conftest.err conftest.$ac_objext \
5513     conftest$ac_exeext conftest.$ac_ext
5514             CFLAGS="$origCFLAGS"
5515             { origCFLAGS=; unset origCFLAGS;}
5516
5517
5518 fi
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gc_sections_runs" >&5
5520 $as_echo "$ntp_cv_gc_sections_runs" >&6; }
5521     case "$ntp_cv_gc_sections_runs" in
5522      yes)
5523         LDADD_LIBNTP="-Wl,--gc-sections"
5524         CFLAGS_NTP="$CFLAGS_NTP -ffunction-sections -fdata-sections"
5525         ;;
5526      no)
5527         LDADD_LIBNTP=
5528         ;;
5529     esac
5530     CFLAGS_NTP="$CFLAGS_NTP -Wall"
5531     CFLAGS_NTP="$CFLAGS_NTP -Wcast-align"
5532     CFLAGS_NTP="$CFLAGS_NTP -Wcast-qual"
5533     # CFLAGS_NTP="$CFLAGS_NTP -Wconversion"
5534     # CFLAGS_NTP="$CFLAGS_NTP -Werror"
5535     # CFLAGS_NTP="$CFLAGS_NTP -Wextra"
5536     # CFLAGS_NTP="$CFLAGS_NTP -Wfloat-equal"
5537     CFLAGS_NTP="$CFLAGS_NTP -Wmissing-prototypes"
5538     CFLAGS_NTP="$CFLAGS_NTP -Wpointer-arith"
5539     CFLAGS_NTP="$CFLAGS_NTP -Wshadow"
5540     # CFLAGS_NTP="$CFLAGS_NTP -Wtraditional"
5541     # CFLAGS_NTP="$CFLAGS_NTP -Wwrite-strings"
5542     case "$ntp_cv_gcc_Winit_self" in
5543      yes)
5544         CFLAGS_NTP="$CFLAGS_NTP -Winit-self"
5545     esac
5546     case "$ntp_cv_gcc_Wstrict_overflow" in
5547      yes)
5548         CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
5549     esac
5550     # -W[no-]strict-prototypes might be added by NTP_OPENSSL
5551 esac
5552
5553
5554     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
5555 $as_echo_n "checking additional compiler flags... " >&6; }
5556     # allow ntp_os_cflags to be preset to skip this stuff
5557     case "${ntp_os_cflags+set}" in
5558      set)
5559         ;;
5560      *)
5561         ntp_os_cflags=
5562         case "$host_os" in
5563          aix[1-3]*)
5564             ;;
5565          aix4.[0-2]*)
5566             # turn on additional headers
5567             ntp_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
5568             ;;
5569          aix5.3*)
5570             # avoid circular dependencies in yp headers, and more
5571             ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
5572             ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS -D_MSGQSUPPORT"
5573             ;;
5574          aix*)
5575             # XXX Only verified thru AIX6.
5576             # aix7 seems to need a different XOPEN_SOURCE_EXTENDED thing.
5577             # avoid circular dependencies in yp headers
5578             # _XOPEN_SOURCE=500 = X/Open 5: POSIX 1995
5579             # _XOPEN_SOURCE=600 = X/Open 6: POSIX 2004
5580             # _XOPEN_SOURCE=700 = X/Open 7: POSIX 2008
5581             ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_SOURCE=600"
5582             ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS"
5583             ;;
5584          amigaos)
5585             ntp_os_cflags="-DSYS_AMIGA"
5586             ;;
5587          darwin*|macosx*|rhapsody*)
5588             ntp_os_cflags="-D_P1003_1B_VISIBLE"
5589             ;;
5590          hpux10.*)              # at least for hppa2.0-hp-hpux10.20
5591             case "$GCC" in
5592              yes)
5593                 ;;
5594              *)
5595                 # use Ansi compiler on HPUX, and some -Wp magic
5596                 ntp_os_cflags="-Ae -Wp,-H18816"
5597                 ;;
5598             esac
5599             ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
5600             ;;
5601          hpux*)
5602             case "$GCC" in
5603              yes)
5604                 ;;
5605              *)
5606                 # use Ansi compiler on HPUX
5607                 ntp_os_cflags="-Ae"
5608             esac
5609             ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
5610             ;;
5611          irix6*)
5612             case "$CC" in
5613              cc)
5614                 # do not use 64-bit compiler
5615                 ntp_os_cflags="-n32 -mips3 -Wl,-woff,84"
5616             esac
5617             ;;
5618          nextstep3)
5619             ntp_os_cflags="-posix"
5620             ;;
5621          solaris1*|solaris2.[0-5]|solaris2.5.*)
5622             ;;
5623          sunos[34]*|sunos5.[0-5]|sunos5.5.*)
5624             ;;
5625          solaris2*|sunos5*)
5626             # turn on 64-bit file offset interface
5627             ntp_os_cflags="-D_LARGEFILE64_SOURCE"
5628             ;;
5629          vxworks*)
5630             case "$build" in
5631              $host)
5632                 ;;
5633              *)
5634                 # Quick and dirty sanity check
5635                 case "$VX_KERNEL" in
5636                  '')
5637                     as_fn_error $? "See html/build/hints/vxworks.html" "$LINENO" 5
5638                 esac
5639                 ntp_os_cflags="-DSYS_VXWORKS"
5640             esac
5641             ;;
5642         esac
5643     esac
5644     case "$ntp_os_cflags" in
5645      '')
5646         ntp_os_cflags_msg="none needed"
5647         ;;
5648      *)
5649         ntp_os_cflags_msg="$ntp_os_cflags"
5650     esac
5651     CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
5652     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
5653 $as_echo "$ntp_os_cflags_msg" >&6; }
5654     { ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
5655     ###
5656     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5
5657 $as_echo_n "checking additional linker flags... " >&6; }
5658     # HMS: The following might still need tweaking
5659     # allow ntp_os_ldflags to be preset to skip this stuff
5660     case "${ntp_os_ldflags+set}" in
5661      set)
5662         ;;
5663      *)
5664         ntp_os_ldflags=
5665         case "$host_os" in
5666          hpux*)
5667             case "$GCC" in
5668              yes)
5669                 ntp_os_ldflags="-Wl,+allowdups"
5670                 ;;
5671             esac
5672             ;;
5673         esac
5674         ;;
5675     esac
5676     case "$ntp_os_ldflags" in
5677      '')
5678         ntp_os_ldflags_msg="none needed"
5679         ;;
5680      *)
5681         ntp_os_ldflags_msg="$ntp_os_ldflags"
5682     esac
5683     LDFLAGS_NTP="$LDFLAGS_NTP $ntp_os_ldflags"
5684     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_ldflags_msg" >&5
5685 $as_echo "$ntp_os_ldflags_msg" >&6; }
5686     { ntp_os_ldflags_msg=; unset ntp_os_ldflags_msg;}
5687
5688
5689  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
5690 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
5691 if ${ac_cv_c_bigendian+:} false; then :
5692   $as_echo_n "(cached) " >&6
5693 else
5694   ac_cv_c_bigendian=unknown
5695     # See if we're dealing with a universal compiler.
5696     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5697 /* end confdefs.h.  */
5698 #ifndef __APPLE_CC__
5699                not a universal capable compiler
5700              #endif
5701              typedef int dummy;
5702
5703 _ACEOF
5704 if ac_fn_c_try_compile "$LINENO"; then :
5705
5706         # Check for potential -arch flags.  It is not universal unless
5707         # there are at least two -arch flags with different values.
5708         ac_arch=
5709         ac_prev=
5710         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
5711          if test -n "$ac_prev"; then
5712            case $ac_word in
5713              i?86 | x86_64 | ppc | ppc64)
5714                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
5715                  ac_arch=$ac_word
5716                else
5717                  ac_cv_c_bigendian=universal
5718                  break
5719                fi
5720                ;;
5721            esac
5722            ac_prev=
5723          elif test "x$ac_word" = "x-arch"; then
5724            ac_prev=arch
5725          fi
5726        done
5727 fi
5728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5729     if test $ac_cv_c_bigendian = unknown; then
5730       # See if sys/param.h defines the BYTE_ORDER macro.
5731       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5732 /* end confdefs.h.  */
5733 #include <sys/types.h>
5734              #include <sys/param.h>
5735
5736 int
5737 main ()
5738 {
5739 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
5740                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
5741                      && LITTLE_ENDIAN)
5742               bogus endian macros
5743              #endif
5744
5745   ;
5746   return 0;
5747 }
5748 _ACEOF
5749 if ac_fn_c_try_compile "$LINENO"; then :
5750   # It does; now see whether it defined to BIG_ENDIAN or not.
5751          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5752 /* end confdefs.h.  */
5753 #include <sys/types.h>
5754                 #include <sys/param.h>
5755
5756 int
5757 main ()
5758 {
5759 #if BYTE_ORDER != BIG_ENDIAN
5760                  not big endian
5761                 #endif
5762
5763   ;
5764   return 0;
5765 }
5766 _ACEOF
5767 if ac_fn_c_try_compile "$LINENO"; then :
5768   ac_cv_c_bigendian=yes
5769 else
5770   ac_cv_c_bigendian=no
5771 fi
5772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5773 fi
5774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5775     fi
5776     if test $ac_cv_c_bigendian = unknown; then
5777       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
5778       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5779 /* end confdefs.h.  */
5780 #include <limits.h>
5781
5782 int
5783 main ()
5784 {
5785 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
5786               bogus endian macros
5787              #endif
5788
5789   ;
5790   return 0;
5791 }
5792 _ACEOF
5793 if ac_fn_c_try_compile "$LINENO"; then :
5794   # It does; now see whether it defined to _BIG_ENDIAN or not.
5795          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5796 /* end confdefs.h.  */
5797 #include <limits.h>
5798
5799 int
5800 main ()
5801 {
5802 #ifndef _BIG_ENDIAN
5803                  not big endian
5804                 #endif
5805
5806   ;
5807   return 0;
5808 }
5809 _ACEOF
5810 if ac_fn_c_try_compile "$LINENO"; then :
5811   ac_cv_c_bigendian=yes
5812 else
5813   ac_cv_c_bigendian=no
5814 fi
5815 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5816 fi
5817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5818     fi
5819     if test $ac_cv_c_bigendian = unknown; then
5820       # Compile a test program.
5821       if test "$cross_compiling" = yes; then :
5822   # Try to guess by grepping values from an object file.
5823          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5824 /* end confdefs.h.  */
5825 short int ascii_mm[] =
5826                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
5827                 short int ascii_ii[] =
5828                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
5829                 int use_ascii (int i) {
5830                   return ascii_mm[i] + ascii_ii[i];
5831                 }
5832                 short int ebcdic_ii[] =
5833                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
5834                 short int ebcdic_mm[] =
5835                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
5836                 int use_ebcdic (int i) {
5837                   return ebcdic_mm[i] + ebcdic_ii[i];
5838                 }
5839                 extern int foo;
5840
5841 int
5842 main ()
5843 {
5844 return use_ascii (foo) == use_ebcdic (foo);
5845   ;
5846   return 0;
5847 }
5848 _ACEOF
5849 if ac_fn_c_try_compile "$LINENO"; then :
5850   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
5851               ac_cv_c_bigendian=yes
5852             fi
5853             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
5854               if test "$ac_cv_c_bigendian" = unknown; then
5855                 ac_cv_c_bigendian=no
5856               else
5857                 # finding both strings is unlikely to happen, but who knows?
5858                 ac_cv_c_bigendian=unknown
5859               fi
5860             fi
5861 fi
5862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5863 else
5864   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5865 /* end confdefs.h.  */
5866 $ac_includes_default
5867 int
5868 main ()
5869 {
5870
5871              /* Are we little or big endian?  From Harbison&Steele.  */
5872              union
5873              {
5874                long int l;
5875                char c[sizeof (long int)];
5876              } u;
5877              u.l = 1;
5878              return u.c[sizeof (long int) - 1] == 1;
5879
5880   ;
5881   return 0;
5882 }
5883 _ACEOF
5884 if ac_fn_c_try_run "$LINENO"; then :
5885   ac_cv_c_bigendian=no
5886 else
5887   ac_cv_c_bigendian=yes
5888 fi
5889 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5890   conftest.$ac_objext conftest.beam conftest.$ac_ext
5891 fi
5892
5893     fi
5894 fi
5895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
5896 $as_echo "$ac_cv_c_bigendian" >&6; }
5897  case $ac_cv_c_bigendian in #(
5898    yes)
5899      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
5900 ;; #(
5901    no)
5902       ;; #(
5903    universal)
5904
5905 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5906
5907      ;; #(
5908    *)
5909      as_fn_error $? "unknown endianness
5910  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
5911  esac
5912
5913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
5914 $as_echo_n "checking for working volatile... " >&6; }
5915 if ${ac_cv_c_volatile+:} false; then :
5916   $as_echo_n "(cached) " >&6
5917 else
5918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5919 /* end confdefs.h.  */
5920
5921 int
5922 main ()
5923 {
5924
5925 volatile int x;
5926 int * volatile y = (int *) 0;
5927 return !x && !y;
5928   ;
5929   return 0;
5930 }
5931 _ACEOF
5932 if ac_fn_c_try_compile "$LINENO"; then :
5933   ac_cv_c_volatile=yes
5934 else
5935   ac_cv_c_volatile=no
5936 fi
5937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5938 fi
5939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
5940 $as_echo "$ac_cv_c_volatile" >&6; }
5941 if test $ac_cv_c_volatile = no; then
5942
5943 $as_echo "#define volatile /**/" >>confdefs.h
5944
5945 fi
5946
5947 ac_ext=c
5948 ac_cpp='$CPP $CPPFLAGS'
5949 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5950 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5951 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5953 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5954 # On Suns, sometimes $CPP names a directory.
5955 if test -n "$CPP" && test -d "$CPP"; then
5956   CPP=
5957 fi
5958 if test -z "$CPP"; then
5959   if ${ac_cv_prog_CPP+:} false; then :
5960   $as_echo_n "(cached) " >&6
5961 else
5962       # Double quotes because CPP needs to be expanded
5963     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5964     do
5965       ac_preproc_ok=false
5966 for ac_c_preproc_warn_flag in '' yes
5967 do
5968   # Use a header file that comes with gcc, so configuring glibc
5969   # with a fresh cross-compiler works.
5970   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5971   # <limits.h> exists even on freestanding compilers.
5972   # On the NeXT, cc -E runs the code through the compiler's parser,
5973   # not just through cpp. "Syntax error" is here to catch this case.
5974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5975 /* end confdefs.h.  */
5976 #ifdef __STDC__
5977 # include <limits.h>
5978 #else
5979 # include <assert.h>
5980 #endif
5981                      Syntax error
5982 _ACEOF
5983 if ac_fn_c_try_cpp "$LINENO"; then :
5984
5985 else
5986   # Broken: fails on valid input.
5987 continue
5988 fi
5989 rm -f conftest.err conftest.i conftest.$ac_ext
5990
5991   # OK, works on sane cases.  Now check whether nonexistent headers
5992   # can be detected and how.
5993   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5994 /* end confdefs.h.  */
5995 #include <ac_nonexistent.h>
5996 _ACEOF
5997 if ac_fn_c_try_cpp "$LINENO"; then :
5998   # Broken: success on invalid input.
5999 continue
6000 else
6001   # Passes both tests.
6002 ac_preproc_ok=:
6003 break
6004 fi
6005 rm -f conftest.err conftest.i conftest.$ac_ext
6006
6007 done
6008 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6009 rm -f conftest.i conftest.err conftest.$ac_ext
6010 if $ac_preproc_ok; then :
6011   break
6012 fi
6013
6014     done
6015     ac_cv_prog_CPP=$CPP
6016
6017 fi
6018   CPP=$ac_cv_prog_CPP
6019 else
6020   ac_cv_prog_CPP=$CPP
6021 fi
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6023 $as_echo "$CPP" >&6; }
6024 ac_preproc_ok=false
6025 for ac_c_preproc_warn_flag in '' yes
6026 do
6027   # Use a header file that comes with gcc, so configuring glibc
6028   # with a fresh cross-compiler works.
6029   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6030   # <limits.h> exists even on freestanding compilers.
6031   # On the NeXT, cc -E runs the code through the compiler's parser,
6032   # not just through cpp. "Syntax error" is here to catch this case.
6033   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6034 /* end confdefs.h.  */
6035 #ifdef __STDC__
6036 # include <limits.h>
6037 #else
6038 # include <assert.h>
6039 #endif
6040                      Syntax error
6041 _ACEOF
6042 if ac_fn_c_try_cpp "$LINENO"; then :
6043
6044 else
6045   # Broken: fails on valid input.
6046 continue
6047 fi
6048 rm -f conftest.err conftest.i conftest.$ac_ext
6049
6050   # OK, works on sane cases.  Now check whether nonexistent headers
6051   # can be detected and how.
6052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6053 /* end confdefs.h.  */
6054 #include <ac_nonexistent.h>
6055 _ACEOF
6056 if ac_fn_c_try_cpp "$LINENO"; then :
6057   # Broken: success on invalid input.
6058 continue
6059 else
6060   # Passes both tests.
6061 ac_preproc_ok=:
6062 break
6063 fi
6064 rm -f conftest.err conftest.i conftest.$ac_ext
6065
6066 done
6067 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6068 rm -f conftest.i conftest.err conftest.$ac_ext
6069 if $ac_preproc_ok; then :
6070
6071 else
6072   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6073 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6074 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6075 See \`config.log' for more details" "$LINENO" 5; }
6076 fi
6077
6078 ac_ext=c
6079 ac_cpp='$CPP $CPPFLAGS'
6080 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6081 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6082 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6083
6084
6085
6086
6087
6088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compile/link hardening flags" >&5
6089 $as_echo_n "checking for compile/link hardening flags... " >&6; }
6090
6091
6092 # Check whether --with-locfile was given.
6093 if test "${with_locfile+set}" = set; then :
6094   withval=$with_locfile;
6095 else
6096   with_locfile=no
6097
6098 fi
6099
6100
6101 (                                                                       \
6102     SENTINEL_DIR="$PWD" &&                                              \
6103     cd $srcdir/ &&                                                      \
6104     case "$with_locfile" in                                             \
6105      yes|no|'')                                                         \
6106         scripts/genHardFlags -d "$SENTINEL_DIR"                         \
6107         ;;                                                              \
6108      *)                                                                 \
6109         scripts/genHardFlags -d "$SENTINEL_DIR" -f "$with_locfile"      \
6110         ;;                                                              \
6111     esac                                                                \
6112 ) > genHardFlags.i 2> genHardFlags.err
6113 . ./genHardFlags.i
6114
6115 case "$GENHARDFLAG" in
6116  OK)
6117     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENHARDFLAGFILE" >&5
6118 $as_echo "in file $GENHARDFLAGFILE" >&6; }
6119     rm genHardFlags.err genHardFlags.i
6120     ;;
6121  *)
6122     { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
6123 $as_echo "failed." >&6; }
6124     as_fn_error $? "Problem with genHardFlags!" "$LINENO" 5
6125     ;;
6126 esac
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for install dir and man conventions" >&5
6137 $as_echo_n "checking for install dir and man conventions... " >&6; }
6138
6139
6140 # Check whether --with-locfile was given.
6141 if test "${with_locfile+set}" = set; then :
6142   withval=$with_locfile;
6143 else
6144   with_locfile=no
6145
6146 fi
6147
6148
6149 (                                                                       \
6150     SENTINEL_DIR="$PWD" &&                                              \
6151     cd $srcdir/ &&                                                      \
6152     case "$with_locfile" in                                             \
6153      yes|no|'')                                                         \
6154         scripts/genLocInfo -d "$SENTINEL_DIR"                           \
6155         ;;                                                              \
6156      *)                                                                 \
6157         scripts/genLocInfo -d "$SENTINEL_DIR" -f "$with_locfile"        \
6158         ;;                                                              \
6159     esac                                                                \
6160 ) > genLocInfo.i 2> genLocInfo.err
6161 . ./genLocInfo.i
6162
6163 case "$GENLOCINFO" in
6164  OK)
6165     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENLOCINFOFILE" >&5
6166 $as_echo "in file $GENLOCINFOFILE" >&6; }
6167     rm genLocInfo.err genLocInfo.i
6168     ;;
6169  *)
6170     { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
6171 $as_echo "failed." >&6; }
6172     as_fn_error $? "Problem with genLocInfo!" "$LINENO" 5
6173     ;;
6174 esac
6175
6176  if test "$CALC_TICKADJ_MS" ; then
6177   WANT_CALC_TICKADJ_MS_TRUE=
6178   WANT_CALC_TICKADJ_MS_FALSE='#'
6179 else
6180   WANT_CALC_TICKADJ_MS_TRUE='#'
6181   WANT_CALC_TICKADJ_MS_FALSE=
6182 fi
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226  if test -z "$NTPSWEEP_NI" ; then
6227   INSTALL_NTPSWEEP_TRUE=
6228   INSTALL_NTPSWEEP_FALSE='#'
6229 else
6230   INSTALL_NTPSWEEP_TRUE='#'
6231   INSTALL_NTPSWEEP_FALSE=
6232 fi
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274  if test -z "$UPDATE_LEAP_NI" ; then
6275   INSTALL_UPDATE_LEAP_TRUE=
6276   INSTALL_UPDATE_LEAP_FALSE='#'
6277 else
6278   INSTALL_UPDATE_LEAP_TRUE='#'
6279   INSTALL_UPDATE_LEAP_FALSE=
6280 fi
6281
6282
6283
6284
6285 if test -n "$ac_tool_prefix"; then
6286   for ac_prog in ar lib "link -lib"
6287   do
6288     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6289 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6291 $as_echo_n "checking for $ac_word... " >&6; }
6292 if ${ac_cv_prog_AR+:} false; then :
6293   $as_echo_n "(cached) " >&6
6294 else
6295   if test -n "$AR"; then
6296   ac_cv_prog_AR="$AR" # Let the user override the test.
6297 else
6298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6299 for as_dir in $PATH
6300 do
6301   IFS=$as_save_IFS
6302   test -z "$as_dir" && as_dir=.
6303     for ac_exec_ext in '' $ac_executable_extensions; do
6304   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6305     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
6306     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6307     break 2
6308   fi
6309 done
6310   done
6311 IFS=$as_save_IFS
6312
6313 fi
6314 fi
6315 AR=$ac_cv_prog_AR
6316 if test -n "$AR"; then
6317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6318 $as_echo "$AR" >&6; }
6319 else
6320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6321 $as_echo "no" >&6; }
6322 fi
6323
6324
6325     test -n "$AR" && break
6326   done
6327 fi
6328 if test -z "$AR"; then
6329   ac_ct_AR=$AR
6330   for ac_prog in ar lib "link -lib"
6331 do
6332   # Extract the first word of "$ac_prog", so it can be a program name with args.
6333 set dummy $ac_prog; ac_word=$2
6334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6335 $as_echo_n "checking for $ac_word... " >&6; }
6336 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6337   $as_echo_n "(cached) " >&6
6338 else
6339   if test -n "$ac_ct_AR"; then
6340   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6341 else
6342 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6343 for as_dir in $PATH
6344 do
6345   IFS=$as_save_IFS
6346   test -z "$as_dir" && as_dir=.
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     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6351     break 2
6352   fi
6353 done
6354   done
6355 IFS=$as_save_IFS
6356
6357 fi
6358 fi
6359 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6360 if test -n "$ac_ct_AR"; then
6361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6362 $as_echo "$ac_ct_AR" >&6; }
6363 else
6364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6365 $as_echo "no" >&6; }
6366 fi
6367
6368
6369   test -n "$ac_ct_AR" && break
6370 done
6371
6372   if test "x$ac_ct_AR" = x; then
6373     AR="false"
6374   else
6375     case $cross_compiling:$ac_tool_warned in
6376 yes:)
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6378 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6379 ac_tool_warned=yes ;;
6380 esac
6381     AR=$ac_ct_AR
6382   fi
6383 fi
6384
6385 : ${AR=ar}
6386
6387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
6388 $as_echo_n "checking the archiver ($AR) interface... " >&6; }
6389 if ${am_cv_ar_interface+:} false; then :
6390   $as_echo_n "(cached) " >&6
6391 else
6392   ac_ext=c
6393 ac_cpp='$CPP $CPPFLAGS'
6394 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6395 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6396 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6397
6398    am_cv_ar_interface=ar
6399    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6400 /* end confdefs.h.  */
6401 int some_variable = 0;
6402 _ACEOF
6403 if ac_fn_c_try_compile "$LINENO"; then :
6404   am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
6405       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6406   (eval $am_ar_try) 2>&5
6407   ac_status=$?
6408   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6409   test $ac_status = 0; }
6410       if test "$ac_status" -eq 0; then
6411         am_cv_ar_interface=ar
6412       else
6413         am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
6414         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6415   (eval $am_ar_try) 2>&5
6416   ac_status=$?
6417   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6418   test $ac_status = 0; }
6419         if test "$ac_status" -eq 0; then
6420           am_cv_ar_interface=lib
6421         else
6422           am_cv_ar_interface=unknown
6423         fi
6424       fi
6425       rm -f conftest.lib libconftest.a
6426
6427 fi
6428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6429    ac_ext=c
6430 ac_cpp='$CPP $CPPFLAGS'
6431 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6432 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6433 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6434
6435 fi
6436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
6437 $as_echo "$am_cv_ar_interface" >&6; }
6438
6439 case $am_cv_ar_interface in
6440 ar)
6441   ;;
6442 lib)
6443   # Microsoft lib, so override with the ar-lib wrapper script.
6444   # FIXME: It is wrong to rewrite AR.
6445   # But if we don't then we get into trouble of one sort or another.
6446   # A longer-term fix would be to have automake use am__AR in this case,
6447   # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
6448   # similar.
6449   AR="$am_aux_dir/ar-lib $AR"
6450   ;;
6451 unknown)
6452   as_fn_error $? "could not determine $AR interface" "$LINENO" 5
6453   ;;
6454 esac
6455
6456
6457
6458
6459
6460 # Expose a cross-compilation indicator to makefiles
6461  if test $build != $host; then
6462   NTP_CROSSCOMPILE_TRUE=
6463   NTP_CROSSCOMPILE_FALSE='#'
6464 else
6465   NTP_CROSSCOMPILE_TRUE='#'
6466   NTP_CROSSCOMPILE_FALSE=
6467 fi
6468
6469
6470
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6472 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6473 if ${ac_cv_path_SED+:} false; then :
6474   $as_echo_n "(cached) " >&6
6475 else
6476             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6477      for ac_i in 1 2 3 4 5 6 7; do
6478        ac_script="$ac_script$as_nl$ac_script"
6479      done
6480      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6481      { ac_script=; unset ac_script;}
6482      if test -z "$SED"; then
6483   ac_path_SED_found=false
6484   # Loop through the user's path and test for each of PROGNAME-LIST
6485   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6486 for as_dir in $PATH
6487 do
6488   IFS=$as_save_IFS
6489   test -z "$as_dir" && as_dir=.
6490     for ac_prog in sed gsed; do
6491     for ac_exec_ext in '' $ac_executable_extensions; do
6492       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6493       as_fn_executable_p "$ac_path_SED" || continue
6494 # Check for GNU ac_path_SED and select it if it is found.
6495   # Check for GNU $ac_path_SED
6496 case `"$ac_path_SED" --version 2>&1` in
6497 *GNU*)
6498   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6499 *)
6500   ac_count=0
6501   $as_echo_n 0123456789 >"conftest.in"
6502   while :
6503   do
6504     cat "conftest.in" "conftest.in" >"conftest.tmp"
6505     mv "conftest.tmp" "conftest.in"
6506     cp "conftest.in" "conftest.nl"
6507     $as_echo '' >> "conftest.nl"
6508     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6509     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6510     as_fn_arith $ac_count + 1 && ac_count=$as_val
6511     if test $ac_count -gt ${ac_path_SED_max-0}; then
6512       # Best one so far, save it but keep looking for a better one
6513       ac_cv_path_SED="$ac_path_SED"
6514       ac_path_SED_max=$ac_count
6515     fi
6516     # 10*(2^10) chars as input seems more than enough
6517     test $ac_count -gt 10 && break
6518   done
6519   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6520 esac
6521
6522       $ac_path_SED_found && break 3
6523     done
6524   done
6525   done
6526 IFS=$as_save_IFS
6527   if test -z "$ac_cv_path_SED"; then
6528     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6529   fi
6530 else
6531   ac_cv_path_SED=$SED
6532 fi
6533
6534 fi
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6536 $as_echo "$ac_cv_path_SED" >&6; }
6537  SED="$ac_cv_path_SED"
6538   rm -f conftest.sed
6539
6540 test -z "$SED" && SED=sed
6541 Xsed="$SED -e 1s/^X//"
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6554 $as_echo_n "checking for fgrep... " >&6; }
6555 if ${ac_cv_path_FGREP+:} false; then :
6556   $as_echo_n "(cached) " >&6
6557 else
6558   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6559    then ac_cv_path_FGREP="$GREP -F"
6560    else
6561      if test -z "$FGREP"; then
6562   ac_path_FGREP_found=false
6563   # Loop through the user's path and test for each of PROGNAME-LIST
6564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6565 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6566 do
6567   IFS=$as_save_IFS
6568   test -z "$as_dir" && as_dir=.
6569     for ac_prog in fgrep; do
6570     for ac_exec_ext in '' $ac_executable_extensions; do
6571       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6572       as_fn_executable_p "$ac_path_FGREP" || continue
6573 # Check for GNU ac_path_FGREP and select it if it is found.
6574   # Check for GNU $ac_path_FGREP
6575 case `"$ac_path_FGREP" --version 2>&1` in
6576 *GNU*)
6577   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6578 *)
6579   ac_count=0
6580   $as_echo_n 0123456789 >"conftest.in"
6581   while :
6582   do
6583     cat "conftest.in" "conftest.in" >"conftest.tmp"
6584     mv "conftest.tmp" "conftest.in"
6585     cp "conftest.in" "conftest.nl"
6586     $as_echo 'FGREP' >> "conftest.nl"
6587     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6588     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6589     as_fn_arith $ac_count + 1 && ac_count=$as_val
6590     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6591       # Best one so far, save it but keep looking for a better one
6592       ac_cv_path_FGREP="$ac_path_FGREP"
6593       ac_path_FGREP_max=$ac_count
6594     fi
6595     # 10*(2^10) chars as input seems more than enough
6596     test $ac_count -gt 10 && break
6597   done
6598   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6599 esac
6600
6601       $ac_path_FGREP_found && break 3
6602     done
6603   done
6604   done
6605 IFS=$as_save_IFS
6606   if test -z "$ac_cv_path_FGREP"; then
6607     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6608   fi
6609 else
6610   ac_cv_path_FGREP=$FGREP
6611 fi
6612
6613    fi
6614 fi
6615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6616 $as_echo "$ac_cv_path_FGREP" >&6; }
6617  FGREP="$ac_cv_path_FGREP"
6618
6619
6620 test -z "$GREP" && GREP=grep
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6639 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6640 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6641
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6643 $as_echo_n "checking how to print strings... " >&6; }
6644 # Test print first, because it will be a builtin if present.
6645 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6646    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6647   ECHO='print -r --'
6648 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6649   ECHO='printf %s\n'
6650 else
6651   # Use this function as a fallback that always works.
6652   func_fallback_echo ()
6653   {
6654     eval 'cat <<_LTECHO_EOF
6655 $1
6656 _LTECHO_EOF'
6657   }
6658   ECHO='func_fallback_echo'
6659 fi
6660
6661 # func_echo_all arg...
6662 # Invoke $ECHO with all args, space-separated.
6663 func_echo_all ()
6664 {
6665     $ECHO ""
6666 }
6667
6668 case $ECHO in
6669   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6670 $as_echo "printf" >&6; } ;;
6671   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6672 $as_echo "print -r" >&6; } ;;
6673   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6674 $as_echo "cat" >&6; } ;;
6675 esac
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6691 if test "x$ac_cv_type_pid_t" = xyes; then :
6692
6693 else
6694
6695 cat >>confdefs.h <<_ACEOF
6696 #define pid_t int
6697 _ACEOF
6698
6699 fi
6700
6701 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6702 if test "x$ac_cv_type_size_t" = xyes; then :
6703
6704 else
6705
6706 cat >>confdefs.h <<_ACEOF
6707 #define size_t unsigned int
6708 _ACEOF
6709
6710 fi
6711
6712
6713             # Check whether --enable-c99-snprintf was given.
6714 if test "${enable_c99_snprintf+set}" = set; then :
6715   enableval=$enable_c99_snprintf; force_c99_snprintf=$enableval
6716 else
6717   force_c99_snprintf=no
6718
6719 fi
6720
6721     case "$force_c99_snprintf" in
6722      yes)
6723         hw_force_rpl_snprintf=yes
6724         hw_force_rpl_vsnprintf=yes
6725     esac
6726
6727
6728
6729
6730
6731
6732   for ac_header in $ac_header_list
6733 do :
6734   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6735 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6736 "
6737 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6738   cat >>confdefs.h <<_ACEOF
6739 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6740 _ACEOF
6741
6742 fi
6743
6744 done
6745
6746
6747
6748
6749
6750
6751
6752   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
6753 $as_echo_n "checking for unsigned long long int... " >&6; }
6754 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
6755   $as_echo_n "(cached) " >&6
6756 else
6757   ac_cv_type_unsigned_long_long_int=yes
6758      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
6759        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6760 /* end confdefs.h.  */
6761
6762   /* For now, do not test the preprocessor; as of 2007 there are too many
6763          implementations with broken preprocessors.  Perhaps this can
6764          be revisited in 2012.  In the meantime, code should not expect
6765          #if to work with literals wider than 32 bits.  */
6766       /* Test literals.  */
6767       long long int ll = 9223372036854775807ll;
6768       long long int nll = -9223372036854775807LL;
6769       unsigned long long int ull = 18446744073709551615ULL;
6770       /* Test constant expressions.   */
6771       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
6772                      ? 1 : -1)];
6773       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
6774                      ? 1 : -1)];
6775       int i = 63;
6776 int
6777 main ()
6778 {
6779 /* Test availability of runtime routines for shift and division.  */
6780       long long int llmax = 9223372036854775807ll;
6781       unsigned long long int ullmax = 18446744073709551615ull;
6782       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
6783               | (llmax / ll) | (llmax % ll)
6784               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
6785               | (ullmax / ull) | (ullmax % ull));
6786   ;
6787   return 0;
6788 }
6789
6790 _ACEOF
6791 if ac_fn_c_try_link "$LINENO"; then :
6792
6793 else
6794   ac_cv_type_unsigned_long_long_int=no
6795 fi
6796 rm -f core conftest.err conftest.$ac_objext \
6797     conftest$ac_exeext conftest.$ac_ext
6798      fi
6799 fi
6800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
6801 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
6802   if test $ac_cv_type_unsigned_long_long_int = yes; then
6803
6804 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
6805
6806   fi
6807
6808
6809       ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
6810 if test "x$ac_cv_func_vsnprintf" = xyes; then :
6811   hw_cv_func_vsnprintf=yes
6812 else
6813   hw_cv_func_vsnprintf=no
6814 fi
6815
6816   if test "$hw_cv_func_vsnprintf" = yes; then :
6817   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
6818 $as_echo_n "checking whether vsnprintf is C99 compliant... " >&6; }
6819 if ${hw_cv_func_vsnprintf_c99+:} false; then :
6820   $as_echo_n "(cached) " >&6
6821 else
6822   if test "$cross_compiling" = yes; then :
6823   hw_cv_func_vsnprintf_c99=no
6824 else
6825   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6826 /* end confdefs.h.  */
6827 #if HAVE_STDARG_H
6828           #include <stdarg.h>
6829           #endif
6830           #include <stdio.h>
6831           static int testprintf(char *buf, size_t size, const char *format, ...)
6832           {
6833             int result;
6834             va_list ap;
6835             va_start(ap, format);
6836             result = vsnprintf(buf, size, format, ap);
6837             va_end(ap);
6838             return result;
6839           }
6840 int
6841 main ()
6842 {
6843 char buf[43];
6844           if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
6845               testprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
6846               buf[0] != 'T' || buf[3] != '\0')
6847             return 1;
6848   ;
6849   return 0;
6850 }
6851 _ACEOF
6852 if ac_fn_c_try_run "$LINENO"; then :
6853   hw_cv_func_vsnprintf_c99=yes
6854 else
6855   hw_cv_func_vsnprintf_c99=no
6856 fi
6857 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6858   conftest.$ac_objext conftest.beam conftest.$ac_ext
6859 fi
6860
6861 fi
6862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
6863 $as_echo "$hw_cv_func_vsnprintf_c99" >&6; }
6864 else
6865   hw_cv_func_vsnprintf_c99=no
6866 fi
6867
6868 $as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
6869
6870   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement vsnprintf will be used" >&5
6871 $as_echo_n "checking if C99-snprintf replacement vsnprintf will be used... " >&6; }
6872   if test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no; then :
6873   hw_use_rpl_vsnprintf=yes
6874 else
6875   hw_use_rpl_vsnprintf=no
6876 fi
6877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_vsnprintf" >&5
6878 $as_echo "$hw_use_rpl_vsnprintf" >&6; }
6879   if test "$hw_use_rpl_vsnprintf" = yes; then :
6880
6881 $as_echo "#define HW_WANT_RPL_VSNPRINTF 1" >>confdefs.h
6882
6883     if test ${hw_nodef_vsnprintf=no} = no; then :
6884
6885 $as_echo "#define vsnprintf rpl_vsnprintf" >>confdefs.h
6886
6887 fi
6888     for ac_header in inttypes.h locale.h stddef.h stdint.h
6889 do :
6890   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6891 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6892 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6893   cat >>confdefs.h <<_ACEOF
6894 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6895 _ACEOF
6896
6897 fi
6898
6899 done
6900
6901     ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
6902 "
6903 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
6904
6905 cat >>confdefs.h <<_ACEOF
6906 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
6907 _ACEOF
6908
6909
6910 fi
6911 ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include <locale.h>
6912 "
6913 if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes; then :
6914
6915 cat >>confdefs.h <<_ACEOF
6916 #define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1
6917 _ACEOF
6918
6919
6920 fi
6921
6922
6923   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
6924 $as_echo_n "checking for long double... " >&6; }
6925 if ${ac_cv_type_long_double+:} false; then :
6926   $as_echo_n "(cached) " >&6
6927 else
6928   if test "$GCC" = yes; then
6929        ac_cv_type_long_double=yes
6930      else
6931        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6932 /* end confdefs.h.  */
6933 /* The Stardent Vistra knows sizeof (long double), but does
6934                  not support it.  */
6935               long double foo = 0.0L;
6936 int
6937 main ()
6938 {
6939 static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
6940               sizeof (double) <= sizeof (long double))];
6941 test_array [0] = 0;
6942 return test_array [0];
6943
6944   ;
6945   return 0;
6946 }
6947 _ACEOF
6948 if ac_fn_c_try_compile "$LINENO"; then :
6949   ac_cv_type_long_double=yes
6950 else
6951   ac_cv_type_long_double=no
6952 fi
6953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6954      fi
6955 fi
6956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
6957 $as_echo "$ac_cv_type_long_double" >&6; }
6958   if test $ac_cv_type_long_double = yes; then
6959
6960 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
6961
6962   fi
6963
6964
6965
6966   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
6967 $as_echo_n "checking for long long int... " >&6; }
6968 if ${ac_cv_type_long_long_int+:} false; then :
6969   $as_echo_n "(cached) " >&6
6970 else
6971   ac_cv_type_long_long_int=yes
6972       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
6973         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
6974         if test $ac_cv_type_long_long_int = yes; then
6975                                   if test "$cross_compiling" = yes; then :
6976   :
6977 else
6978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6979 /* end confdefs.h.  */
6980 #include <limits.h>
6981                  #ifndef LLONG_MAX
6982                  # define HALF \
6983                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
6984                  # define LLONG_MAX (HALF - 1 + HALF)
6985                  #endif
6986 int
6987 main ()
6988 {
6989 long long int n = 1;
6990                  int i;
6991                  for (i = 0; ; i++)
6992                    {
6993                      long long int m = n << i;
6994                      if (m >> i != n)
6995                        return 1;
6996                      if (LLONG_MAX / 2 < m)
6997                        break;
6998                    }
6999                  return 0;
7000   ;
7001   return 0;
7002 }
7003 _ACEOF
7004 if ac_fn_c_try_run "$LINENO"; then :
7005
7006 else
7007   ac_cv_type_long_long_int=no
7008 fi
7009 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7010   conftest.$ac_objext conftest.beam conftest.$ac_ext
7011 fi
7012
7013         fi
7014       fi
7015 fi
7016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
7017 $as_echo "$ac_cv_type_long_long_int" >&6; }
7018   if test $ac_cv_type_long_long_int = yes; then
7019
7020 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
7021
7022   fi
7023
7024
7025   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7026 $as_echo_n "checking for unsigned long long int... " >&6; }
7027 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
7028   $as_echo_n "(cached) " >&6
7029 else
7030   ac_cv_type_unsigned_long_long_int=yes
7031      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7032        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7033 /* end confdefs.h.  */
7034
7035   /* For now, do not test the preprocessor; as of 2007 there are too many
7036          implementations with broken preprocessors.  Perhaps this can
7037          be revisited in 2012.  In the meantime, code should not expect
7038          #if to work with literals wider than 32 bits.  */
7039       /* Test literals.  */
7040       long long int ll = 9223372036854775807ll;
7041       long long int nll = -9223372036854775807LL;
7042       unsigned long long int ull = 18446744073709551615ULL;
7043       /* Test constant expressions.   */
7044       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
7045                      ? 1 : -1)];
7046       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
7047                      ? 1 : -1)];
7048       int i = 63;
7049 int
7050 main ()
7051 {
7052 /* Test availability of runtime routines for shift and division.  */
7053       long long int llmax = 9223372036854775807ll;
7054       unsigned long long int ullmax = 18446744073709551615ull;
7055       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
7056               | (llmax / ll) | (llmax % ll)
7057               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
7058               | (ullmax / ull) | (ullmax % ull));
7059   ;
7060   return 0;
7061 }
7062
7063 _ACEOF
7064 if ac_fn_c_try_link "$LINENO"; then :
7065
7066 else
7067   ac_cv_type_unsigned_long_long_int=no
7068 fi
7069 rm -f core conftest.err conftest.$ac_objext \
7070     conftest$ac_exeext conftest.$ac_ext
7071      fi
7072 fi
7073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
7074 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
7075   if test $ac_cv_type_unsigned_long_long_int = yes; then
7076
7077 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
7078
7079   fi
7080
7081     ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7082 if test "x$ac_cv_type_size_t" = xyes; then :
7083
7084 else
7085
7086 cat >>confdefs.h <<_ACEOF
7087 #define size_t unsigned int
7088 _ACEOF
7089
7090 fi
7091
7092
7093
7094   ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
7095 if test "x$ac_cv_type_intmax_t" = xyes; then :
7096
7097 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
7098
7099 else
7100   test $ac_cv_type_long_long_int = yes \
7101        && ac_type='long long int' \
7102        || ac_type='long int'
7103
7104 cat >>confdefs.h <<_ACEOF
7105 #define intmax_t $ac_type
7106 _ACEOF
7107
7108 fi
7109
7110
7111
7112
7113   ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
7114 if test "x$ac_cv_type_uintmax_t" = xyes; then :
7115
7116 $as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
7117
7118 else
7119   test $ac_cv_type_unsigned_long_long_int = yes \
7120        && ac_type='unsigned long long int' \
7121        || ac_type='unsigned long int'
7122
7123 cat >>confdefs.h <<_ACEOF
7124 #define uintmax_t $ac_type
7125 _ACEOF
7126
7127 fi
7128
7129
7130
7131   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
7132 if test "x$ac_cv_type_uintptr_t" = xyes; then :
7133
7134 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
7135
7136 else
7137   for ac_type in 'unsigned int' 'unsigned long int' \
7138         'unsigned long long int'; do
7139        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7140 /* end confdefs.h.  */
7141 $ac_includes_default
7142 int
7143 main ()
7144 {
7145 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
7146 test_array [0] = 0;
7147 return test_array [0];
7148
7149   ;
7150   return 0;
7151 }
7152 _ACEOF
7153 if ac_fn_c_try_compile "$LINENO"; then :
7154
7155 cat >>confdefs.h <<_ACEOF
7156 #define uintptr_t $ac_type
7157 _ACEOF
7158
7159           ac_type=
7160 fi
7161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7162        test -z "$ac_type" && break
7163      done
7164 fi
7165
7166
7167     ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
7168 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
7169
7170 cat >>confdefs.h <<_ACEOF
7171 #define HAVE_PTRDIFF_T 1
7172 _ACEOF
7173
7174
7175 fi
7176
7177     for ac_func in localeconv
7178 do :
7179   ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
7180 if test "x$ac_cv_func_localeconv" = xyes; then :
7181   cat >>confdefs.h <<_ACEOF
7182 #define HAVE_LOCALECONV 1
7183 _ACEOF
7184
7185 fi
7186 done
7187
7188
7189   if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
7190   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
7191 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
7192 if ${ac_cv_c_const+:} false; then :
7193   $as_echo_n "(cached) " >&6
7194 else
7195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7196 /* end confdefs.h.  */
7197
7198 int
7199 main ()
7200 {
7201
7202 #ifndef __cplusplus
7203   /* Ultrix mips cc rejects this sort of thing.  */
7204   typedef int charset[2];
7205   const charset cs = { 0, 0 };
7206   /* SunOS 4.1.1 cc rejects this.  */
7207   char const *const *pcpcc;
7208   char **ppc;
7209   /* NEC SVR4.0.2 mips cc rejects this.  */
7210   struct point {int x, y;};
7211   static struct point const zero = {0,0};
7212   /* AIX XL C 1.02.0.0 rejects this.
7213      It does not let you subtract one const X* pointer from another in
7214      an arm of an if-expression whose if-part is not a constant
7215      expression */
7216   const char *g = "string";
7217   pcpcc = &g + (g ? g-g : 0);
7218   /* HPUX 7.0 cc rejects these. */
7219   ++pcpcc;
7220   ppc = (char**) pcpcc;
7221   pcpcc = (char const *const *) ppc;
7222   { /* SCO 3.2v4 cc rejects this sort of thing.  */
7223     char tx;
7224     char *t = &tx;
7225     char const *s = 0 ? (char *) 0 : (char const *) 0;
7226
7227     *t++ = 0;
7228     if (s) return 0;
7229   }
7230   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7231     int x[] = {25, 17};
7232     const int *foo = &x[0];
7233     ++foo;
7234   }
7235   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7236     typedef const int *iptr;
7237     iptr p = 0;
7238     ++p;
7239   }
7240   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
7241        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7242     struct s { int j; const int *ap[3]; } bx;
7243     struct s *b = &bx; b->j = 5;
7244   }
7245   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7246     const int foo = 10;
7247     if (!foo) return 0;
7248   }
7249   return !cs[0] && !zero.x;
7250 #endif
7251
7252   ;
7253   return 0;
7254 }
7255 _ACEOF
7256 if ac_fn_c_try_compile "$LINENO"; then :
7257   ac_cv_c_const=yes
7258 else
7259   ac_cv_c_const=no
7260 fi
7261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7262 fi
7263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
7264 $as_echo "$ac_cv_c_const" >&6; }
7265 if test $ac_cv_c_const = no; then
7266
7267 $as_echo "#define const /**/" >>confdefs.h
7268
7269 fi
7270
7271
7272
7273
7274     case " $LIBOBJS " in
7275   *" snprintf.$ac_objext "* ) ;;
7276   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
7277  ;;
7278 esac
7279
7280     _hw_cv_func_xprintf_replace_done=yes
7281 fi
7282
7283 fi
7284
7285
7286     ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
7287 if test "x$ac_cv_func_snprintf" = xyes; then :
7288   hw_cv_func_snprintf=yes
7289 else
7290   hw_cv_func_snprintf=no
7291 fi
7292
7293   if test "$hw_cv_func_snprintf" = yes; then :
7294   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
7295 $as_echo_n "checking whether snprintf is C99 compliant... " >&6; }
7296 if ${hw_cv_func_snprintf_c99+:} false; then :
7297   $as_echo_n "(cached) " >&6
7298 else
7299   if test "$cross_compiling" = yes; then :
7300   hw_cv_func_snprintf_c99=no
7301 else
7302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7303 /* end confdefs.h.  */
7304 #include <stdio.h>
7305 int
7306 main ()
7307 {
7308 char buf[43];
7309           if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
7310               snprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
7311               buf[0] != 'T' || buf[3] != '\0')
7312             return 1;
7313   ;
7314   return 0;
7315 }
7316 _ACEOF
7317 if ac_fn_c_try_run "$LINENO"; then :
7318   hw_cv_func_snprintf_c99=yes
7319 else
7320   hw_cv_func_snprintf_c99=no
7321 fi
7322 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7323   conftest.$ac_objext conftest.beam conftest.$ac_ext
7324 fi
7325
7326 fi
7327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
7328 $as_echo "$hw_cv_func_snprintf_c99" >&6; }
7329 else
7330   hw_cv_func_snprintf_c99=no
7331 fi
7332
7333 $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
7334
7335   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement snprintf will be used" >&5
7336 $as_echo_n "checking if C99-snprintf replacement snprintf will be used... " >&6; }
7337   if test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no; then :
7338   hw_use_rpl_snprintf=yes
7339 else
7340   hw_use_rpl_snprintf=no
7341 fi
7342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_snprintf" >&5
7343 $as_echo "$hw_use_rpl_snprintf" >&6; }
7344   if test "$hw_use_rpl_snprintf" = yes; then :
7345
7346 $as_echo "#define HW_WANT_RPL_SNPRINTF 1" >>confdefs.h
7347
7348     if test ${hw_nodef_snprintf=no} = no; then :
7349
7350 $as_echo "#define snprintf rpl_snprintf" >>confdefs.h
7351
7352 fi
7353
7354   if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
7355   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
7356 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
7357 if ${ac_cv_c_const+:} false; then :
7358   $as_echo_n "(cached) " >&6
7359 else
7360   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7361 /* end confdefs.h.  */
7362
7363 int
7364 main ()
7365 {
7366
7367 #ifndef __cplusplus
7368   /* Ultrix mips cc rejects this sort of thing.  */
7369   typedef int charset[2];
7370   const charset cs = { 0, 0 };
7371   /* SunOS 4.1.1 cc rejects this.  */
7372   char const *const *pcpcc;
7373   char **ppc;
7374   /* NEC SVR4.0.2 mips cc rejects this.  */
7375   struct point {int x, y;};
7376   static struct point const zero = {0,0};
7377   /* AIX XL C 1.02.0.0 rejects this.
7378      It does not let you subtract one const X* pointer from another in
7379      an arm of an if-expression whose if-part is not a constant
7380      expression */
7381   const char *g = "string";
7382   pcpcc = &g + (g ? g-g : 0);
7383   /* HPUX 7.0 cc rejects these. */
7384   ++pcpcc;
7385   ppc = (char**) pcpcc;
7386   pcpcc = (char const *const *) ppc;
7387   { /* SCO 3.2v4 cc rejects this sort of thing.  */
7388     char tx;
7389     char *t = &tx;
7390     char const *s = 0 ? (char *) 0 : (char const *) 0;
7391
7392     *t++ = 0;
7393     if (s) return 0;
7394   }
7395   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7396     int x[] = {25, 17};
7397     const int *foo = &x[0];
7398     ++foo;
7399   }
7400   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7401     typedef const int *iptr;
7402     iptr p = 0;
7403     ++p;
7404   }
7405   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
7406        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7407     struct s { int j; const int *ap[3]; } bx;
7408     struct s *b = &bx; b->j = 5;
7409   }
7410   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7411     const int foo = 10;
7412     if (!foo) return 0;
7413   }
7414   return !cs[0] && !zero.x;
7415 #endif
7416
7417   ;
7418   return 0;
7419 }
7420 _ACEOF
7421 if ac_fn_c_try_compile "$LINENO"; then :
7422   ac_cv_c_const=yes
7423 else
7424   ac_cv_c_const=no
7425 fi
7426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7427 fi
7428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
7429 $as_echo "$ac_cv_c_const" >&6; }
7430 if test $ac_cv_c_const = no; then
7431
7432 $as_echo "#define const /**/" >>confdefs.h
7433
7434 fi
7435
7436
7437
7438
7439     case " $LIBOBJS " in
7440   *" snprintf.$ac_objext "* ) ;;
7441   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
7442  ;;
7443 esac
7444
7445     _hw_cv_func_xprintf_replace_done=yes
7446 fi
7447
7448 fi
7449
7450
7451
7452
7453
7454 # HMS: Save $LIBS and empty it.
7455 # any LIBS we add here should go in to LDADD_LIBNTP
7456
7457 __LIBS=$LIBS
7458 LIBS=
7459
7460
7461
7462 # [Bug 2332] because we need to know if we are using GNU ld...
7463
7464
7465 # Check whether --with-gnu-ld was given.
7466 if test "${with_gnu_ld+set}" = set; then :
7467   withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7468 else
7469   with_gnu_ld=no
7470 fi
7471
7472 ac_prog=ld
7473 if test yes = "$GCC"; then
7474   # Check if gcc -print-prog-name=ld gives a path.
7475   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7476 $as_echo_n "checking for ld used by $CC... " >&6; }
7477   case $host in
7478   *-*-mingw*)
7479     # gcc leaves a trailing carriage return, which upsets mingw
7480     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7481   *)
7482     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7483   esac
7484   case $ac_prog in
7485     # Accept absolute paths.
7486     [\\/]* | ?:[\\/]*)
7487       re_direlt='/[^/][^/]*/\.\./'
7488       # Canonicalize the pathname of ld
7489       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7490       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7491         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7492       done
7493       test -z "$LD" && LD=$ac_prog
7494       ;;
7495   "")
7496     # If it fails, then pretend we aren't using GCC.
7497     ac_prog=ld
7498     ;;
7499   *)
7500     # If it is relative, then search for the first ld in PATH.
7501     with_gnu_ld=unknown
7502     ;;
7503   esac
7504 elif test yes = "$with_gnu_ld"; then
7505   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7506 $as_echo_n "checking for GNU ld... " >&6; }
7507 else
7508   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7509 $as_echo_n "checking for non-GNU ld... " >&6; }
7510 fi
7511 if ${lt_cv_path_LD+:} false; then :
7512   $as_echo_n "(cached) " >&6
7513 else
7514   if test -z "$LD"; then
7515   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7516   for ac_dir in $PATH; do
7517     IFS=$lt_save_ifs
7518     test -z "$ac_dir" && ac_dir=.
7519     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7520       lt_cv_path_LD=$ac_dir/$ac_prog
7521       # Check to see if the program is GNU ld.  I'd rather use --version,
7522       # but apparently some variants of GNU ld only accept -v.
7523       # Break only if it was the GNU/non-GNU ld that we prefer.
7524       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7525       *GNU* | *'with BFD'*)
7526         test no != "$with_gnu_ld" && break
7527         ;;
7528       *)
7529         test yes != "$with_gnu_ld" && break
7530         ;;
7531       esac
7532     fi
7533   done
7534   IFS=$lt_save_ifs
7535 else
7536   lt_cv_path_LD=$LD # Let the user override the test with a path.
7537 fi
7538 fi
7539
7540 LD=$lt_cv_path_LD
7541 if test -n "$LD"; then
7542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7543 $as_echo "$LD" >&6; }
7544 else
7545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7546 $as_echo "no" >&6; }
7547 fi
7548 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7550 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7551 if ${lt_cv_prog_gnu_ld+:} false; then :
7552   $as_echo_n "(cached) " >&6
7553 else
7554   # I'd rather use --version here, but apparently some GNU lds only accept -v.
7555 case `$LD -v 2>&1 </dev/null` in
7556 *GNU* | *'with BFD'*)
7557   lt_cv_prog_gnu_ld=yes
7558   ;;
7559 *)
7560   lt_cv_prog_gnu_ld=no
7561   ;;
7562 esac
7563 fi
7564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7565 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
7566 with_gnu_ld=$lt_cv_prog_gnu_ld
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
7579 $as_echo_n "checking for directory path separator... " >&6; }
7580 if ${ntp_cv_dir_sep+:} false; then :
7581   $as_echo_n "(cached) " >&6
7582 else
7583
7584         case "$ntp_cv_dir_sep" in
7585          '')
7586             case "$host_os" in
7587              *djgpp | *mingw32* | *emx*)
7588                 ntp_cv_dir_sep="'\\'"
7589                 ;;
7590              *)
7591                 ntp_cv_dir_sep="'/'"
7592                 ;;
7593             esac
7594         esac
7595
7596
7597 fi
7598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
7599 $as_echo "$ntp_cv_dir_sep" >&6; }
7600
7601 cat >>confdefs.h <<_ACEOF
7602 #define DIR_SEP $ntp_cv_dir_sep
7603 _ACEOF
7604
7605
7606
7607     NTP_ORIG_LIBS="$LIBS"
7608
7609 # Check whether --with-lineeditlibs was given.
7610 if test "${with_lineeditlibs+set}" = set; then :
7611   withval=$with_lineeditlibs; use_lineeditlibs="$withval"
7612 else
7613   use_lineeditlibs="edit,editline"
7614
7615 fi
7616
7617     { $as_echo "$as_me:${as_lineno-$LINENO}: checking line editing libraries" >&5
7618 $as_echo_n "checking line editing libraries... " >&6; }
7619     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_lineeditlibs" >&5
7620 $as_echo "$use_lineeditlibs" >&6; }
7621     case "$use_lineeditlibs" in
7622      no)
7623         ntp_lib_lineedit=no
7624         ;;
7625      *)
7626         for lineedit_lib in `echo $use_lineeditlibs | sed -e 's/,/ /'`; do
7627             for term_lib in "" termcap curses ncurses; do
7628                 case "$term_lib" in
7629                  '')
7630                     TRY_LIB="-l$lineedit_lib"
7631                     ;;
7632                  *)
7633                     TRY_LIB="-l$lineedit_lib -l$term_lib"
7634                     ;;
7635                 esac
7636                 LIBS="$NTP_ORIG_LIBS $TRY_LIB"
7637                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline() with $TRY_LIB" >&5
7638 $as_echo_n "checking for readline() with $TRY_LIB... " >&6; }
7639                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7640 /* end confdefs.h.  */
7641
7642 /* Override any GCC internal prototype to avoid an error.
7643    Use char because int might match the return type of a GCC
7644    builtin and then its argument prototype would still apply.  */
7645 #ifdef __cplusplus
7646 extern "C"
7647 #endif
7648 char readline ();
7649 int
7650 main ()
7651 {
7652 return readline ();
7653   ;
7654   return 0;
7655 }
7656 _ACEOF
7657 if ac_fn_c_try_link "$LINENO"; then :
7658   ntp_lib_lineedit="$TRY_LIB"
7659 fi
7660 rm -f core conftest.err conftest.$ac_objext \
7661     conftest$ac_exeext conftest.$ac_ext
7662                 case "$ntp_lib_lineedit" in
7663                  '')
7664                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7665 $as_echo "no" >&6; }
7666                     ;;
7667                  *)
7668                     # Use readline()
7669                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7670 $as_echo "yes" >&6; }
7671                     break
7672                 esac
7673                 case "$term_lib" in
7674                  '')
7675                     # do not try el_gets without a terminal library
7676                     ;;
7677                  *)
7678                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_gets() with $TRY_LIB" >&5
7679 $as_echo_n "checking for el_gets() with $TRY_LIB... " >&6; }
7680                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7681 /* end confdefs.h.  */
7682
7683 /* Override any GCC internal prototype to avoid an error.
7684    Use char because int might match the return type of a GCC
7685    builtin and then its argument prototype would still apply.  */
7686 #ifdef __cplusplus
7687 extern "C"
7688 #endif
7689 char el_gets ();
7690 int
7691 main ()
7692 {
7693 return el_gets ();
7694   ;
7695   return 0;
7696 }
7697 _ACEOF
7698 if ac_fn_c_try_link "$LINENO"; then :
7699   ntp_lib_lineedit="$TRY_LIB"
7700 fi
7701 rm -f core conftest.err conftest.$ac_objext \
7702     conftest$ac_exeext conftest.$ac_ext
7703                     case "$ntp_lib_lineedit" in
7704                      '')
7705                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7706 $as_echo "no" >&6; }
7707                         ;;
7708                      *) # Use el_gets()
7709                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7710 $as_echo "yes" >&6; }
7711                         break
7712                         ;;
7713                     esac        # $ntp_lib_lineedit
7714                 esac            # $term_lib
7715             done
7716             case "$ntp_lib_lineedit" in
7717              '')
7718                 ;;
7719              *)
7720                 break
7721                 ;;
7722             esac
7723         done
7724         LIBS="$NTP_ORIG_LIBS"
7725         ;;
7726     esac        # $use_lineeditlibs
7727
7728     case "$ntp_lib_lineedit" in
7729      '')
7730         ntp_lib_lineedit="no"
7731         ;;
7732      no)
7733         ;;
7734      *)
7735         EDITLINE_LIBS="$ntp_lib_lineedit"
7736
7737         ;;
7738     esac        # $ntp_lib_lineedit
7739
7740     case "$ntp_lib_lineedit" in
7741      no)
7742         ;;
7743      *)
7744         for ac_header in readline.h readline/readline.h histedit.h
7745 do :
7746   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7747 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7748 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7749   cat >>confdefs.h <<_ACEOF
7750 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7751 _ACEOF
7752
7753 fi
7754
7755 done
7756
7757         for ac_header in history.h readline/history.h
7758 do :
7759   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7760 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7761 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7762   cat >>confdefs.h <<_ACEOF
7763 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7764 _ACEOF
7765
7766 fi
7767
7768 done
7769
7770
7771         case "$ac_cv_header_histedit_h" in
7772          yes)
7773             { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to el_init()" >&5
7774 $as_echo_n "checking number of arguments to el_init()... " >&6; }
7775 if ${ntp_cv_el_init_args+:} false; then :
7776   $as_echo_n "(cached) " >&6
7777 else
7778   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7779 /* end confdefs.h.  */
7780
7781                             #include <stdio.h>
7782                             #include <histedit.h>
7783
7784 int
7785 main ()
7786 {
7787
7788                             el_init("conftest", stdin, stdout, stderr);
7789
7790
7791   ;
7792   return 0;
7793 }
7794 _ACEOF
7795 if ac_fn_c_try_compile "$LINENO"; then :
7796   ntp_cv_el_init_args=4
7797 else
7798   ntp_cv_el_init_args=3
7799
7800 fi
7801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7802
7803 fi
7804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_el_init_args" >&5
7805 $as_echo "$ntp_cv_el_init_args" >&6; }
7806
7807 cat >>confdefs.h <<_ACEOF
7808 #define EL_INIT_ARGS $ntp_cv_el_init_args
7809 _ACEOF
7810
7811         esac
7812
7813         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
7814 $as_echo_n "checking whether readline supports history... " >&6; }
7815
7816         ntp_lib_lineedit_history="no"
7817         ORIG_LIBS="$LIBS"
7818         LIBS="$ORIG_LIBS $ntp_lib_lineedit"
7819         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7820 /* end confdefs.h.  */
7821
7822 /* Override any GCC internal prototype to avoid an error.
7823    Use char because int might match the return type of a GCC
7824    builtin and then its argument prototype would still apply.  */
7825 #ifdef __cplusplus
7826 extern "C"
7827 #endif
7828 char add_history ();
7829 int
7830 main ()
7831 {
7832 return add_history ();
7833   ;
7834   return 0;
7835 }
7836 _ACEOF
7837 if ac_fn_c_try_link "$LINENO"; then :
7838   ntp_lib_lineedit_history="yes"
7839 fi
7840 rm -f core conftest.err conftest.$ac_objext \
7841     conftest$ac_exeext conftest.$ac_ext
7842         LIBS="$ORIG_LIBS"
7843
7844         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_lib_lineedit_history" >&5
7845 $as_echo "$ntp_lib_lineedit_history" >&6; }
7846
7847         case "$ntp_lib_lineedit_history" in
7848          yes)
7849
7850 $as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
7851
7852         esac
7853     esac        # $ntp_lib_lineedit
7854     { NTP_ORIG_LIBS=; unset NTP_ORIG_LIBS;}
7855     { ORIG_LIBS=; unset ORIG_LIBS;}
7856     { TRY_LIB=; unset TRY_LIB;}
7857     { use_lineeditlibs=; unset use_lineeditlibs;}
7858
7859
7860 LIBM=
7861 case "$host" in
7862  *-*-darwin*)
7863     ;;
7864  *)
7865     _libs=$LIBS
7866     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
7867 $as_echo_n "checking for library containing cos... " >&6; }
7868 if ${ac_cv_search_cos+:} false; then :
7869   $as_echo_n "(cached) " >&6
7870 else
7871   ac_func_search_save_LIBS=$LIBS
7872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7873 /* end confdefs.h.  */
7874
7875 /* Override any GCC internal prototype to avoid an error.
7876    Use char because int might match the return type of a GCC
7877    builtin and then its argument prototype would still apply.  */
7878 #ifdef __cplusplus
7879 extern "C"
7880 #endif
7881 char cos ();
7882 int
7883 main ()
7884 {
7885 return cos ();
7886   ;
7887   return 0;
7888 }
7889 _ACEOF
7890 for ac_lib in '' m; do
7891   if test -z "$ac_lib"; then
7892     ac_res="none required"
7893   else
7894     ac_res=-l$ac_lib
7895     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7896   fi
7897   if ac_fn_c_try_link "$LINENO"; then :
7898   ac_cv_search_cos=$ac_res
7899 fi
7900 rm -f core conftest.err conftest.$ac_objext \
7901     conftest$ac_exeext
7902   if ${ac_cv_search_cos+:} false; then :
7903   break
7904 fi
7905 done
7906 if ${ac_cv_search_cos+:} false; then :
7907
7908 else
7909   ac_cv_search_cos=no
7910 fi
7911 rm conftest.$ac_ext
7912 LIBS=$ac_func_search_save_LIBS
7913 fi
7914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
7915 $as_echo "$ac_cv_search_cos" >&6; }
7916 ac_res=$ac_cv_search_cos
7917 if test "$ac_res" != no; then :
7918   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7919   LIBM="-lm"
7920 fi
7921
7922     LIBS=$_libs
7923     ;;
7924 esac
7925
7926 { _libs=; unset _libs;}
7927
7928
7929 for ac_header in vfork.h
7930 do :
7931   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
7932 if test "x$ac_cv_header_vfork_h" = xyes; then :
7933   cat >>confdefs.h <<_ACEOF
7934 #define HAVE_VFORK_H 1
7935 _ACEOF
7936
7937 fi
7938
7939 done
7940
7941 for ac_func in fork vfork
7942 do :
7943   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7944 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7945 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7946   cat >>confdefs.h <<_ACEOF
7947 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7948 _ACEOF
7949
7950 fi
7951 done
7952
7953 if test "x$ac_cv_func_fork" = xyes; then
7954   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
7955 $as_echo_n "checking for working fork... " >&6; }
7956 if ${ac_cv_func_fork_works+:} false; then :
7957   $as_echo_n "(cached) " >&6
7958 else
7959   if test "$cross_compiling" = yes; then :
7960   ac_cv_func_fork_works=cross
7961 else
7962   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7963 /* end confdefs.h.  */
7964 $ac_includes_default
7965 int
7966 main ()
7967 {
7968
7969           /* By Ruediger Kuhlmann. */
7970           return fork () < 0;
7971
7972   ;
7973   return 0;
7974 }
7975 _ACEOF
7976 if ac_fn_c_try_run "$LINENO"; then :
7977   ac_cv_func_fork_works=yes
7978 else
7979   ac_cv_func_fork_works=no
7980 fi
7981 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7982   conftest.$ac_objext conftest.beam conftest.$ac_ext
7983 fi
7984
7985 fi
7986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
7987 $as_echo "$ac_cv_func_fork_works" >&6; }
7988
7989 else
7990   ac_cv_func_fork_works=$ac_cv_func_fork
7991 fi
7992 if test "x$ac_cv_func_fork_works" = xcross; then
7993   case $host in
7994     *-*-amigaos* | *-*-msdosdjgpp*)
7995       # Override, as these systems have only a dummy fork() stub
7996       ac_cv_func_fork_works=no
7997       ;;
7998     *)
7999       ac_cv_func_fork_works=yes
8000       ;;
8001   esac
8002   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
8003 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
8004 fi
8005 ac_cv_func_vfork_works=$ac_cv_func_vfork
8006 if test "x$ac_cv_func_vfork" = xyes; then
8007   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
8008 $as_echo_n "checking for working vfork... " >&6; }
8009 if ${ac_cv_func_vfork_works+:} false; then :
8010   $as_echo_n "(cached) " >&6
8011 else
8012   if test "$cross_compiling" = yes; then :
8013   ac_cv_func_vfork_works=cross
8014 else
8015   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8016 /* end confdefs.h.  */
8017 /* Thanks to Paul Eggert for this test.  */
8018 $ac_includes_default
8019 #include <sys/wait.h>
8020 #ifdef HAVE_VFORK_H
8021 # include <vfork.h>
8022 #endif
8023 /* On some sparc systems, changes by the child to local and incoming
8024    argument registers are propagated back to the parent.  The compiler
8025    is told about this with #include <vfork.h>, but some compilers
8026    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
8027    static variable whose address is put into a register that is
8028    clobbered by the vfork.  */
8029 static void
8030 #ifdef __cplusplus
8031 sparc_address_test (int arg)
8032 # else
8033 sparc_address_test (arg) int arg;
8034 #endif
8035 {
8036   static pid_t child;
8037   if (!child) {
8038     child = vfork ();
8039     if (child < 0) {
8040       perror ("vfork");
8041       _exit(2);
8042     }
8043     if (!child) {
8044       arg = getpid();
8045       write(-1, "", 0);
8046       _exit (arg);
8047     }
8048   }
8049 }
8050
8051 int
8052 main ()
8053 {
8054   pid_t parent = getpid ();
8055   pid_t child;
8056
8057   sparc_address_test (0);
8058
8059   child = vfork ();
8060
8061   if (child == 0) {
8062     /* Here is another test for sparc vfork register problems.  This
8063        test uses lots of local variables, at least as many local
8064        variables as main has allocated so far including compiler
8065        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
8066        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
8067        reuse the register of parent for one of the local variables,
8068        since it will think that parent can't possibly be used any more
8069        in this routine.  Assigning to the local variable will thus
8070        munge parent in the parent process.  */
8071     pid_t
8072       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8073       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8074     /* Convince the compiler that p..p7 are live; otherwise, it might
8075        use the same hardware register for all 8 local variables.  */
8076     if (p != p1 || p != p2 || p != p3 || p != p4
8077         || p != p5 || p != p6 || p != p7)
8078       _exit(1);
8079
8080     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
8081        from child file descriptors.  If the child closes a descriptor
8082        before it execs or exits, this munges the parent's descriptor
8083        as well.  Test for this by closing stdout in the child.  */
8084     _exit(close(fileno(stdout)) != 0);
8085   } else {
8086     int status;
8087     struct stat st;
8088
8089     while (wait(&status) != child)
8090       ;
8091     return (
8092          /* Was there some problem with vforking?  */
8093          child < 0
8094
8095          /* Did the child fail?  (This shouldn't happen.)  */
8096          || status
8097
8098          /* Did the vfork/compiler bug occur?  */
8099          || parent != getpid()
8100
8101          /* Did the file descriptor bug occur?  */
8102          || fstat(fileno(stdout), &st) != 0
8103          );
8104   }
8105 }
8106 _ACEOF
8107 if ac_fn_c_try_run "$LINENO"; then :
8108   ac_cv_func_vfork_works=yes
8109 else
8110   ac_cv_func_vfork_works=no
8111 fi
8112 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8113   conftest.$ac_objext conftest.beam conftest.$ac_ext
8114 fi
8115
8116 fi
8117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
8118 $as_echo "$ac_cv_func_vfork_works" >&6; }
8119
8120 fi;
8121 if test "x$ac_cv_func_fork_works" = xcross; then
8122   ac_cv_func_vfork_works=$ac_cv_func_vfork
8123   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
8124 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
8125 fi
8126
8127 if test "x$ac_cv_func_vfork_works" = xyes; then
8128
8129 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
8130
8131 else
8132
8133 $as_echo "#define vfork fork" >>confdefs.h
8134
8135 fi
8136 if test "x$ac_cv_func_fork_works" = xyes; then
8137
8138 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
8139
8140 fi
8141
8142 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8143 # for constant arguments.  Useless!
8144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8145 $as_echo_n "checking for working alloca.h... " >&6; }
8146 if ${ac_cv_working_alloca_h+:} false; then :
8147   $as_echo_n "(cached) " >&6
8148 else
8149   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8150 /* end confdefs.h.  */
8151 #include <alloca.h>
8152 int
8153 main ()
8154 {
8155 char *p = (char *) alloca (2 * sizeof (int));
8156                           if (p) return 0;
8157   ;
8158   return 0;
8159 }
8160 _ACEOF
8161 if ac_fn_c_try_link "$LINENO"; then :
8162   ac_cv_working_alloca_h=yes
8163 else
8164   ac_cv_working_alloca_h=no
8165 fi
8166 rm -f core conftest.err conftest.$ac_objext \
8167     conftest$ac_exeext conftest.$ac_ext
8168 fi
8169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8170 $as_echo "$ac_cv_working_alloca_h" >&6; }
8171 if test $ac_cv_working_alloca_h = yes; then
8172
8173 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
8174
8175 fi
8176
8177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8178 $as_echo_n "checking for alloca... " >&6; }
8179 if ${ac_cv_func_alloca_works+:} false; then :
8180   $as_echo_n "(cached) " >&6
8181 else
8182   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8183 /* end confdefs.h.  */
8184 #ifdef __GNUC__
8185 # define alloca __builtin_alloca
8186 #else
8187 # ifdef _MSC_VER
8188 #  include <malloc.h>
8189 #  define alloca _alloca
8190 # else
8191 #  ifdef HAVE_ALLOCA_H
8192 #   include <alloca.h>
8193 #  else
8194 #   ifdef _AIX
8195  #pragma alloca
8196 #   else
8197 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8198 void *alloca (size_t);
8199 #    endif
8200 #   endif
8201 #  endif
8202 # endif
8203 #endif
8204
8205 int
8206 main ()
8207 {
8208 char *p = (char *) alloca (1);
8209                                     if (p) return 0;
8210   ;
8211   return 0;
8212 }
8213 _ACEOF
8214 if ac_fn_c_try_link "$LINENO"; then :
8215   ac_cv_func_alloca_works=yes
8216 else
8217   ac_cv_func_alloca_works=no
8218 fi
8219 rm -f core conftest.err conftest.$ac_objext \
8220     conftest$ac_exeext conftest.$ac_ext
8221 fi
8222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8223 $as_echo "$ac_cv_func_alloca_works" >&6; }
8224
8225 if test $ac_cv_func_alloca_works = yes; then
8226
8227 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
8228
8229 else
8230   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8231 # that cause trouble.  Some versions do not even contain alloca or
8232 # contain a buggy version.  If you still want to use their alloca,
8233 # use ar to extract alloca.o from them instead of compiling alloca.c.
8234
8235 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8236
8237 $as_echo "#define C_ALLOCA 1" >>confdefs.h
8238
8239
8240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
8241 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
8242 if ${ac_cv_os_cray+:} false; then :
8243   $as_echo_n "(cached) " >&6
8244 else
8245   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8246 /* end confdefs.h.  */
8247 #if defined CRAY && ! defined CRAY2
8248 webecray
8249 #else
8250 wenotbecray
8251 #endif
8252
8253 _ACEOF
8254 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8255   $EGREP "webecray" >/dev/null 2>&1; then :
8256   ac_cv_os_cray=yes
8257 else
8258   ac_cv_os_cray=no
8259 fi
8260 rm -f conftest*
8261
8262 fi
8263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
8264 $as_echo "$ac_cv_os_cray" >&6; }
8265 if test $ac_cv_os_cray = yes; then
8266   for ac_func in _getb67 GETB67 getb67; do
8267     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8268 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8269 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8270
8271 cat >>confdefs.h <<_ACEOF
8272 #define CRAY_STACKSEG_END $ac_func
8273 _ACEOF
8274
8275     break
8276 fi
8277
8278   done
8279 fi
8280
8281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8282 $as_echo_n "checking stack direction for C alloca... " >&6; }
8283 if ${ac_cv_c_stack_direction+:} false; then :
8284   $as_echo_n "(cached) " >&6
8285 else
8286   if test "$cross_compiling" = yes; then :
8287   ac_cv_c_stack_direction=0
8288 else
8289   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8290 /* end confdefs.h.  */
8291 $ac_includes_default
8292 int
8293 find_stack_direction (int *addr, int depth)
8294 {
8295   int dir, dummy = 0;
8296   if (! addr)
8297     addr = &dummy;
8298   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8299   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8300   return dir + dummy;
8301 }
8302
8303 int
8304 main (int argc, char **argv)
8305 {
8306   return find_stack_direction (0, argc + !argv + 20) < 0;
8307 }
8308 _ACEOF
8309 if ac_fn_c_try_run "$LINENO"; then :
8310   ac_cv_c_stack_direction=1
8311 else
8312   ac_cv_c_stack_direction=-1
8313 fi
8314 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8315   conftest.$ac_objext conftest.beam conftest.$ac_ext
8316 fi
8317
8318 fi
8319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8320 $as_echo "$ac_cv_c_stack_direction" >&6; }
8321 cat >>confdefs.h <<_ACEOF
8322 #define STACK_DIRECTION $ac_cv_c_stack_direction
8323 _ACEOF
8324
8325
8326 fi
8327
8328 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8329 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
8330   ac_have_decl=1
8331 else
8332   ac_have_decl=0
8333 fi
8334
8335 cat >>confdefs.h <<_ACEOF
8336 #define HAVE_DECL_STRERROR_R $ac_have_decl
8337 _ACEOF
8338
8339 for ac_func in strerror_r
8340 do :
8341   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8342 if test "x$ac_cv_func_strerror_r" = xyes; then :
8343   cat >>confdefs.h <<_ACEOF
8344 #define HAVE_STRERROR_R 1
8345 _ACEOF
8346
8347 fi
8348 done
8349
8350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8351 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
8352 if ${ac_cv_func_strerror_r_char_p+:} false; then :
8353   $as_echo_n "(cached) " >&6
8354 else
8355
8356     ac_cv_func_strerror_r_char_p=no
8357     if test $ac_cv_have_decl_strerror_r = yes; then
8358       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8359 /* end confdefs.h.  */
8360 $ac_includes_default
8361 int
8362 main ()
8363 {
8364
8365           char buf[100];
8366           char x = *strerror_r (0, buf, sizeof buf);
8367           char *p = strerror_r (0, buf, sizeof buf);
8368           return !p || x;
8369
8370   ;
8371   return 0;
8372 }
8373 _ACEOF
8374 if ac_fn_c_try_compile "$LINENO"; then :
8375   ac_cv_func_strerror_r_char_p=yes
8376 fi
8377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8378     else
8379       # strerror_r is not declared.  Choose between
8380       # systems that have relatively inaccessible declarations for the
8381       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
8382       # former has a strerror_r that returns char*, while the latter
8383       # has a strerror_r that returns `int'.
8384       # This test should segfault on the DEC system.
8385       if test "$cross_compiling" = yes; then :
8386   :
8387 else
8388   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8389 /* end confdefs.h.  */
8390 $ac_includes_default
8391         extern char *strerror_r ();
8392 int
8393 main ()
8394 {
8395 char buf[100];
8396           char x = *strerror_r (0, buf, sizeof buf);
8397           return ! isalpha (x);
8398   ;
8399   return 0;
8400 }
8401 _ACEOF
8402 if ac_fn_c_try_run "$LINENO"; then :
8403   ac_cv_func_strerror_r_char_p=yes
8404 fi
8405 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8406   conftest.$ac_objext conftest.beam conftest.$ac_ext
8407 fi
8408
8409     fi
8410
8411 fi
8412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8413 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
8414 if test $ac_cv_func_strerror_r_char_p = yes; then
8415
8416 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8417
8418 fi
8419
8420
8421 ac_busted_vpath_in_make=no
8422 case "$build" in
8423  *-*-irix6.1*)  # 64 bit only
8424     # busted vpath?
8425     ;;
8426  *-*-irix6*)    # 6.2 (and later?)
8427     ac_busted_vpath_in_make=yes
8428     ;;
8429  *-*-solaris2.5.1)
8430     ac_busted_vpath_in_make=yes
8431     ;;
8432  *-*-unicosmp*)
8433     ac_busted_vpath_in_make=yes
8434     ;;
8435 esac
8436
8437 case "$ac_busted_vpath_in_make$srcdir" in
8438  yes.|no*)
8439     ;;
8440  *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
8441      '')
8442         as_fn_error $? "building outside of the main directory requires GNU make" "$LINENO" 5
8443     esac
8444     ;;
8445 esac
8446
8447 case "$host" in
8448  *-*-aix4*)
8449         # Bug 2516:
8450         # Was *-*-aix[[4-9]]*
8451         # XXX only verified thru AIX6.  But...
8452         # Ken Link says this is fine for AIX 5.3 and 7.1, and sees no reason
8453         # that this support would be in 5.3, removed in 6, and added back.
8454         #
8455         # (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
8456         # (returning ENOSYS).  I didn't check 4.2.  If, in the future,
8457         # IBM pulls its thumbs out long enough to implement clock_settime,
8458         # this conditional will need to change.  Maybe use AC_TRY_RUN
8459         # instead to try to set the time to itself and check errno.
8460     ;;
8461  *)
8462     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
8463 $as_echo_n "checking for library containing clock_gettime... " >&6; }
8464 if ${ac_cv_search_clock_gettime+:} false; then :
8465   $as_echo_n "(cached) " >&6
8466 else
8467   ac_func_search_save_LIBS=$LIBS
8468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8469 /* end confdefs.h.  */
8470
8471 /* Override any GCC internal prototype to avoid an error.
8472    Use char because int might match the return type of a GCC
8473    builtin and then its argument prototype would still apply.  */
8474 #ifdef __cplusplus
8475 extern "C"
8476 #endif
8477 char clock_gettime ();
8478 int
8479 main ()
8480 {
8481 return clock_gettime ();
8482   ;
8483   return 0;
8484 }
8485 _ACEOF
8486 for ac_lib in '' rt; do
8487   if test -z "$ac_lib"; then
8488     ac_res="none required"
8489   else
8490     ac_res=-l$ac_lib
8491     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8492   fi
8493   if ac_fn_c_try_link "$LINENO"; then :
8494   ac_cv_search_clock_gettime=$ac_res
8495 fi
8496 rm -f core conftest.err conftest.$ac_objext \
8497     conftest$ac_exeext
8498   if ${ac_cv_search_clock_gettime+:} false; then :
8499   break
8500 fi
8501 done
8502 if ${ac_cv_search_clock_gettime+:} false; then :
8503
8504 else
8505   ac_cv_search_clock_gettime=no
8506 fi
8507 rm conftest.$ac_ext
8508 LIBS=$ac_func_search_save_LIBS
8509 fi
8510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
8511 $as_echo "$ac_cv_search_clock_gettime" >&6; }
8512 ac_res=$ac_cv_search_clock_gettime
8513 if test "$ac_res" != no; then :
8514   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8515   case "$ac_cv_search_clock_gettime" in
8516  'none required') ;;
8517  no) ;;
8518  *) LDADD_LIBNTP="$ac_cv_search_clock_gettime $LDADD_LIBNTP" ;;
8519  esac
8520
8521 fi
8522
8523     for ac_func in clock_getres clock_gettime clock_settime
8524 do :
8525   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8526 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8527 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8528   cat >>confdefs.h <<_ACEOF
8529 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8530 _ACEOF
8531
8532 fi
8533 done
8534
8535     ;;
8536 esac
8537
8538 for ac_func in getclock stime timegm strlcpy strlcat
8539 do :
8540   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8541 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8542 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8543   cat >>confdefs.h <<_ACEOF
8544 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8545 _ACEOF
8546
8547 fi
8548 done
8549
8550
8551 # Bug 2713
8552 LDADD_LIBUTIL=
8553
8554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing snprintb" >&5
8555 $as_echo_n "checking for library containing snprintb... " >&6; }
8556 if ${ac_cv_search_snprintb+:} false; then :
8557   $as_echo_n "(cached) " >&6
8558 else
8559   ac_func_search_save_LIBS=$LIBS
8560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8561 /* end confdefs.h.  */
8562
8563 /* Override any GCC internal prototype to avoid an error.
8564    Use char because int might match the return type of a GCC
8565    builtin and then its argument prototype would still apply.  */
8566 #ifdef __cplusplus
8567 extern "C"
8568 #endif
8569 char snprintb ();
8570 int
8571 main ()
8572 {
8573 return snprintb ();
8574   ;
8575   return 0;
8576 }
8577 _ACEOF
8578 for ac_lib in '' util; do
8579   if test -z "$ac_lib"; then
8580     ac_res="none required"
8581   else
8582     ac_res=-l$ac_lib
8583     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8584   fi
8585   if ac_fn_c_try_link "$LINENO"; then :
8586   ac_cv_search_snprintb=$ac_res
8587 fi
8588 rm -f core conftest.err conftest.$ac_objext \
8589     conftest$ac_exeext
8590   if ${ac_cv_search_snprintb+:} false; then :
8591   break
8592 fi
8593 done
8594 if ${ac_cv_search_snprintb+:} false; then :
8595
8596 else
8597   ac_cv_search_snprintb=no
8598 fi
8599 rm conftest.$ac_ext
8600 LIBS=$ac_func_search_save_LIBS
8601 fi
8602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_snprintb" >&5
8603 $as_echo "$ac_cv_search_snprintb" >&6; }
8604 ac_res=$ac_cv_search_snprintb
8605 if test "$ac_res" != no; then :
8606   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8607   case "$ac_cv_search_snprintb" in
8608  'none required') ;;
8609  no) ;;
8610  *) LDADD_LIBUTIL="$ac_cv_search_snprintb $LDADD_LIBUTIL" ;;
8611  esac
8612
8613 $as_echo "#define USE_SNPRINTB 1" >>confdefs.h
8614
8615 fi
8616
8617
8618 #
8619 for ac_header in errno.h sys/socket.h sys/types.h time.h
8620 do :
8621   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8622 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8623 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8624   cat >>confdefs.h <<_ACEOF
8625 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8626 _ACEOF
8627
8628 fi
8629
8630 done
8631
8632 for ac_header in net/if.h
8633 do :
8634   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
8635     #ifdef HAVE_SYS_SOCKET_H
8636     # include <sys/socket.h>
8637     #endif
8638
8639 "
8640 if test "x$ac_cv_header_net_if_h" = xyes; then :
8641   cat >>confdefs.h <<_ACEOF
8642 #define HAVE_NET_IF_H 1
8643 _ACEOF
8644
8645 fi
8646
8647 done
8648
8649 case "$host" in
8650  *-hp-hpux*)
8651     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/if.h requires mpinfou predeclaration" >&5
8652 $as_echo_n "checking if net/if.h requires mpinfou predeclaration... " >&6; }
8653 if ${ntp_cv_predecl_mpinfou+:} false; then :
8654   $as_echo_n "(cached) " >&6
8655 else
8656
8657             np_cv_predecl_mpinfou=no
8658             case "$ac_cv_header_net_if_h" in
8659              no)
8660                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8661 /* end confdefs.h.  */
8662
8663                             typedef union mpinfou {
8664                                     struct pdk_mpinfo *pdkptr;
8665                                     struct mpinfo *pikptr;
8666                             } mpinfou_t;
8667                             #ifdef HAVE_SYS_SOCKET_H
8668                             # include <sys/socket.h>
8669                             #endif
8670                             #include <net/if.h>
8671
8672 int
8673 main ()
8674 {
8675
8676
8677
8678   ;
8679   return 0;
8680 }
8681 _ACEOF
8682 if ac_fn_c_try_compile "$LINENO"; then :
8683
8684                         ntp_cv_predecl_mpinfou=yes
8685                         ac_cv_header_net_if_h=yes
8686
8687
8688 fi
8689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690             esac
8691
8692
8693 fi
8694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_predecl_mpinfou" >&5
8695 $as_echo "$ntp_cv_predecl_mpinfou" >&6; }
8696     case "$ntp_cv_predecl_mpinfou" in
8697      yes)
8698         cat >>confdefs.h <<_ACEOF
8699 #ifndef MPINFOU_PREDECLARED
8700 # define MPINFOU_PREDECLARED
8701 typedef union mpinfou {
8702         struct pdk_mpinfo *pdkptr;
8703         struct mpinfo *pikptr;
8704 } mpinfou_t;
8705 #endif
8706 _ACEOF
8707
8708     esac
8709 esac
8710
8711 case "$host" in
8712  *-linux*)
8713     for ac_header in linux/if_addr.h
8714 do :
8715   ac_fn_c_check_header_compile "$LINENO" "linux/if_addr.h" "ac_cv_header_linux_if_addr_h" "
8716         #ifdef HAVE_SYS_SOCKET_H
8717         # include <sys/socket.h>
8718         #endif
8719
8720 "
8721 if test "x$ac_cv_header_linux_if_addr_h" = xyes; then :
8722   cat >>confdefs.h <<_ACEOF
8723 #define HAVE_LINUX_IF_ADDR_H 1
8724 _ACEOF
8725
8726 fi
8727
8728 done
8729
8730
8731 $as_echo "#define NEED_EARLY_FORK 1" >>confdefs.h
8732
8733 esac
8734
8735 for ac_header in arpa/nameser.h sys/param.h sys/time.h sys/timers.h
8736 do :
8737   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8738 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8739 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8740   cat >>confdefs.h <<_ACEOF
8741 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8742 _ACEOF
8743
8744 fi
8745
8746 done
8747
8748 # sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
8749 for ac_header in sys/sysctl.h
8750 do :
8751   ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
8752     #if defined HAVE_SYS_PARAM_H
8753     # include <sys/param.h>
8754     #endif
8755
8756 "
8757 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
8758   cat >>confdefs.h <<_ACEOF
8759 #define HAVE_SYS_SYSCTL_H 1
8760 _ACEOF
8761
8762 fi
8763
8764 done
8765
8766 for ac_header in netinet/in_system.h netinet/in_systm.h netinet/in.h
8767 do :
8768   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8769 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8770 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8771   cat >>confdefs.h <<_ACEOF
8772 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8773 _ACEOF
8774
8775 fi
8776
8777 done
8778
8779
8780 for ac_header in resolv.h
8781 do :
8782   ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
8783     #ifdef HAVE_SYS_TYPES_H
8784     # include <sys/types.h>
8785     #endif
8786     #ifdef HAVE_NETINET_IN_H
8787     # include <netinet/in.h>
8788     #endif
8789     #ifdef HAVE_ARPA_NAMESER_H
8790     # include <arpa/nameser.h>
8791     #endif
8792
8793 "
8794 if test "x$ac_cv_header_resolv_h" = xyes; then :
8795   cat >>confdefs.h <<_ACEOF
8796 #define HAVE_RESOLV_H 1
8797 _ACEOF
8798
8799 fi
8800
8801 done
8802
8803
8804 for ac_header in net/if_var.h
8805 do :
8806   ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
8807     #if HAVE_SYS_TYPES_H
8808     # include <sys/types.h>
8809     #endif
8810     #ifdef HAVE_SYS_SOCKET_H
8811     # include <sys/socket.h>
8812     #endif
8813     #ifdef HAVE_NETINET_IN_H
8814     # include <netinet/in.h>
8815     #endif
8816     #ifdef HAVE_NET_IF_H
8817     # include <net/if.h>
8818     #endif
8819
8820 "
8821 if test "x$ac_cv_header_net_if_var_h" = xyes; then :
8822   cat >>confdefs.h <<_ACEOF
8823 #define HAVE_NET_IF_VAR_H 1
8824 _ACEOF
8825
8826 fi
8827
8828 done
8829
8830
8831 for ac_header in netinet/ip.h netinet/in_var.h
8832 do :
8833   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8834 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8835     #ifdef HAVE_SYS_TYPES_H
8836     # include <sys/types.h>
8837     #endif
8838     #ifdef HAVE_SYS_SOCKET_H
8839     # include <sys/socket.h>
8840     #endif
8841     #ifdef HAVE_NET_IF_H
8842     # include <net/if.h>
8843     #endif
8844     #ifdef HAVE_NETINET_IN_H
8845     # include <netinet/in.h>
8846     #endif
8847     #ifdef HAVE_NET_IF_VAR_H
8848     # include <net/if_var.h>
8849     #endif
8850     #ifdef HAVE_NETINET_IN_SYSTM_H
8851     # include <netinet/in_systm.h>
8852     #endif
8853
8854 "
8855 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8856   cat >>confdefs.h <<_ACEOF
8857 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8858 _ACEOF
8859
8860 fi
8861
8862 done
8863
8864
8865 # HMS: Do we need to check for -lsocket before or after these tests?
8866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
8867 $as_echo_n "checking for library containing inet_pton... " >&6; }
8868 if ${ac_cv_search_inet_pton+:} false; then :
8869   $as_echo_n "(cached) " >&6
8870 else
8871   ac_func_search_save_LIBS=$LIBS
8872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8873 /* end confdefs.h.  */
8874
8875 /* Override any GCC internal prototype to avoid an error.
8876    Use char because int might match the return type of a GCC
8877    builtin and then its argument prototype would still apply.  */
8878 #ifdef __cplusplus
8879 extern "C"
8880 #endif
8881 char inet_pton ();
8882 int
8883 main ()
8884 {
8885 return inet_pton ();
8886   ;
8887   return 0;
8888 }
8889 _ACEOF
8890 for ac_lib in '' nsl; do
8891   if test -z "$ac_lib"; then
8892     ac_res="none required"
8893   else
8894     ac_res=-l$ac_lib
8895     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8896   fi
8897   if ac_fn_c_try_link "$LINENO"; then :
8898   ac_cv_search_inet_pton=$ac_res
8899 fi
8900 rm -f core conftest.err conftest.$ac_objext \
8901     conftest$ac_exeext
8902   if ${ac_cv_search_inet_pton+:} false; then :
8903   break
8904 fi
8905 done
8906 if ${ac_cv_search_inet_pton+:} false; then :
8907
8908 else
8909   ac_cv_search_inet_pton=no
8910 fi
8911 rm conftest.$ac_ext
8912 LIBS=$ac_func_search_save_LIBS
8913 fi
8914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
8915 $as_echo "$ac_cv_search_inet_pton" >&6; }
8916 ac_res=$ac_cv_search_inet_pton
8917 if test "$ac_res" != no; then :
8918   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8919   case "$ac_cv_search_inet_pton" in
8920  'none required') ;;
8921  no) ;;
8922  *) LDADD_LIBNTP="$ac_cv_search_inet_pton $LDADD_LIBNTP" ;;
8923  esac
8924
8925 fi
8926
8927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
8928 $as_echo_n "checking for library containing inet_ntop... " >&6; }
8929 if ${ac_cv_search_inet_ntop+:} false; then :
8930   $as_echo_n "(cached) " >&6
8931 else
8932   ac_func_search_save_LIBS=$LIBS
8933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8934 /* end confdefs.h.  */
8935
8936 /* Override any GCC internal prototype to avoid an error.
8937    Use char because int might match the return type of a GCC
8938    builtin and then its argument prototype would still apply.  */
8939 #ifdef __cplusplus
8940 extern "C"
8941 #endif
8942 char inet_ntop ();
8943 int
8944 main ()
8945 {
8946 return inet_ntop ();
8947   ;
8948   return 0;
8949 }
8950 _ACEOF
8951 for ac_lib in '' resolv; do
8952   if test -z "$ac_lib"; then
8953     ac_res="none required"
8954   else
8955     ac_res=-l$ac_lib
8956     LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
8957   fi
8958   if ac_fn_c_try_link "$LINENO"; then :
8959   ac_cv_search_inet_ntop=$ac_res
8960 fi
8961 rm -f core conftest.err conftest.$ac_objext \
8962     conftest$ac_exeext
8963   if ${ac_cv_search_inet_ntop+:} false; then :
8964   break
8965 fi
8966 done
8967 if ${ac_cv_search_inet_ntop+:} false; then :
8968
8969 else
8970   ac_cv_search_inet_ntop=no
8971 fi
8972 rm conftest.$ac_ext
8973 LIBS=$ac_func_search_save_LIBS
8974 fi
8975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
8976 $as_echo "$ac_cv_search_inet_ntop" >&6; }
8977 ac_res=$ac_cv_search_inet_ntop
8978 if test "$ac_res" != no; then :
8979   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8980   case "$ac_cv_search_inet_ntop" in
8981  'none required') ;;
8982  no) ;;
8983  *) LDADD_LIBNTP="$ac_cv_search_inet_ntop $LDADD_LIBNTP" ;;
8984  esac
8985
8986 fi
8987
8988
8989 # [Bug 1628] On Solaris, we need -lxnet -lsocket.  Generalize this to
8990 # avoid keying on the OS name:  If we find socket functions in
8991 # libsocket, next try for them in libxnet without libsocket, if found,
8992 # list both.  If we simply tested libxnet first, we would find the
8993 # functions there and never add libsocket.  See also [Bug 660]
8994 # http://bugs.ntp.org/show_bug.cgi?id=660#c9
8995 saved_LIBS=$LIBS
8996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
8997 $as_echo_n "checking for library containing setsockopt... " >&6; }
8998 if ${ac_cv_search_setsockopt+:} false; then :
8999   $as_echo_n "(cached) " >&6
9000 else
9001   ac_func_search_save_LIBS=$LIBS
9002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9003 /* end confdefs.h.  */
9004
9005 /* Override any GCC internal prototype to avoid an error.
9006    Use char because int might match the return type of a GCC
9007    builtin and then its argument prototype would still apply.  */
9008 #ifdef __cplusplus
9009 extern "C"
9010 #endif
9011 char setsockopt ();
9012 int
9013 main ()
9014 {
9015 return setsockopt ();
9016   ;
9017   return 0;
9018 }
9019 _ACEOF
9020 for ac_lib in '' socket; do
9021   if test -z "$ac_lib"; then
9022     ac_res="none required"
9023   else
9024     ac_res=-l$ac_lib
9025     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9026   fi
9027   if ac_fn_c_try_link "$LINENO"; then :
9028   ac_cv_search_setsockopt=$ac_res
9029 fi
9030 rm -f core conftest.err conftest.$ac_objext \
9031     conftest$ac_exeext
9032   if ${ac_cv_search_setsockopt+:} false; then :
9033   break
9034 fi
9035 done
9036 if ${ac_cv_search_setsockopt+:} false; then :
9037
9038 else
9039   ac_cv_search_setsockopt=no
9040 fi
9041 rm conftest.$ac_ext
9042 LIBS=$ac_func_search_save_LIBS
9043 fi
9044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
9045 $as_echo "$ac_cv_search_setsockopt" >&6; }
9046 ac_res=$ac_cv_search_setsockopt
9047 if test "$ac_res" != no; then :
9048   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9049   case "$ac_cv_search_setsockopt" in
9050  'none required') ;;
9051  no) ;;
9052  *) LDADD_LIBNTP="$ac_cv_search_setsockopt $LDADD_LIBNTP" ;;
9053  esac
9054
9055 fi
9056
9057 case "$ac_cv_search_setsockopt" in
9058  -lsocket)
9059     LIBS="$saved_LIBS"
9060     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
9061 $as_echo_n "checking for library containing getsockopt... " >&6; }
9062 if ${ac_cv_search_getsockopt+:} false; then :
9063   $as_echo_n "(cached) " >&6
9064 else
9065   ac_func_search_save_LIBS=$LIBS
9066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9067 /* end confdefs.h.  */
9068
9069 /* Override any GCC internal prototype to avoid an error.
9070    Use char because int might match the return type of a GCC
9071    builtin and then its argument prototype would still apply.  */
9072 #ifdef __cplusplus
9073 extern "C"
9074 #endif
9075 char getsockopt ();
9076 int
9077 main ()
9078 {
9079 return getsockopt ();
9080   ;
9081   return 0;
9082 }
9083 _ACEOF
9084 for ac_lib in '' xnet; do
9085   if test -z "$ac_lib"; then
9086     ac_res="none required"
9087   else
9088     ac_res=-l$ac_lib
9089     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9090   fi
9091   if ac_fn_c_try_link "$LINENO"; then :
9092   ac_cv_search_getsockopt=$ac_res
9093 fi
9094 rm -f core conftest.err conftest.$ac_objext \
9095     conftest$ac_exeext
9096   if ${ac_cv_search_getsockopt+:} false; then :
9097   break
9098 fi
9099 done
9100 if ${ac_cv_search_getsockopt+:} false; then :
9101
9102 else
9103   ac_cv_search_getsockopt=no
9104 fi
9105 rm conftest.$ac_ext
9106 LIBS=$ac_func_search_save_LIBS
9107 fi
9108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
9109 $as_echo "$ac_cv_search_getsockopt" >&6; }
9110 ac_res=$ac_cv_search_getsockopt
9111 if test "$ac_res" != no; then :
9112   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9113   case "$ac_cv_search_getsockopt" in
9114  'none required') ;;
9115  no) ;;
9116  *) LDADD_LIBNTP="$ac_cv_search_getsockopt $LDADD_LIBNTP" ;;
9117  esac
9118
9119 fi
9120
9121     # XXX Possible trouble here - reading the comments above and looking at the
9122     # code below I wonder if we'll add -lxnet when we don't need it.
9123     # Also, do we need to add -lxnet to LDADD_LIBNTP, or perhaps see if it's
9124     # there when it is not needed?
9125     case "$ac_cv_search_getsockopt" in
9126      -lxnet)
9127         LIBS="-lxnet -lsocket $saved_LIBS"
9128         ;;
9129      *) LIBS="-lsocket $saved_LIBS"
9130         ;;
9131     esac
9132     ;;
9133 esac
9134 { saved_LIBS=; unset saved_LIBS;}
9135
9136 # Bug 2427 - look for recvmsg here.
9137 for ac_func in recvmsg
9138 do :
9139   ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
9140 if test "x$ac_cv_func_recvmsg" = xyes; then :
9141   cat >>confdefs.h <<_ACEOF
9142 #define HAVE_RECVMSG 1
9143 _ACEOF
9144
9145 fi
9146 done
9147
9148
9149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9150 $as_echo_n "checking for inline... " >&6; }
9151 if ${ac_cv_c_inline+:} false; then :
9152   $as_echo_n "(cached) " >&6
9153 else
9154   ac_cv_c_inline=no
9155 for ac_kw in inline __inline__ __inline; do
9156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9157 /* end confdefs.h.  */
9158 #ifndef __cplusplus
9159 typedef int foo_t;
9160 static $ac_kw foo_t static_foo () {return 0; }
9161 $ac_kw foo_t foo () {return 0; }
9162 #endif
9163
9164 _ACEOF
9165 if ac_fn_c_try_compile "$LINENO"; then :
9166   ac_cv_c_inline=$ac_kw
9167 fi
9168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9169   test "$ac_cv_c_inline" != no && break
9170 done
9171
9172 fi
9173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9174 $as_echo "$ac_cv_c_inline" >&6; }
9175
9176 case $ac_cv_c_inline in
9177   inline | yes) ;;
9178   *)
9179     case $ac_cv_c_inline in
9180       no) ac_val=;;
9181       *) ac_val=$ac_cv_c_inline;;
9182     esac
9183     cat >>confdefs.h <<_ACEOF
9184 #ifndef __cplusplus
9185 #define inline $ac_val
9186 #endif
9187 _ACEOF
9188     ;;
9189 esac
9190
9191
9192 case "$ac_cv_c_inline" in
9193  '')
9194     ;;
9195  *)
9196
9197 $as_echo "#define HAVE_INLINE 1" >>confdefs.h
9198
9199
9200 esac
9201
9202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9203 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9204 if ${ac_cv_header_time+:} false; then :
9205   $as_echo_n "(cached) " >&6
9206 else
9207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9208 /* end confdefs.h.  */
9209 #include <sys/types.h>
9210 #include <sys/time.h>
9211 #include <time.h>
9212
9213 int
9214 main ()
9215 {
9216 if ((struct tm *) 0)
9217 return 0;
9218   ;
9219   return 0;
9220 }
9221 _ACEOF
9222 if ac_fn_c_try_compile "$LINENO"; then :
9223   ac_cv_header_time=yes
9224 else
9225   ac_cv_header_time=no
9226 fi
9227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9228 fi
9229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9230 $as_echo "$ac_cv_header_time" >&6; }
9231 if test $ac_cv_header_time = yes; then
9232
9233 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
9234
9235 fi
9236
9237 # The cast to long int works around a bug in the HP C Compiler
9238 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9239 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9240 # This bug is HP SR number 8606223364.
9241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9242 $as_echo_n "checking size of time_t... " >&6; }
9243 if ${ac_cv_sizeof_time_t+:} false; then :
9244   $as_echo_n "(cached) " >&6
9245 else
9246   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
9247
9248 else
9249   if test "$ac_cv_type_time_t" = yes; then
9250      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9251 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9252 as_fn_error 77 "cannot compute sizeof (time_t)
9253 See \`config.log' for more details" "$LINENO" 5; }
9254    else
9255      ac_cv_sizeof_time_t=0
9256    fi
9257 fi
9258
9259 fi
9260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9261 $as_echo "$ac_cv_sizeof_time_t" >&6; }
9262
9263
9264
9265 cat >>confdefs.h <<_ACEOF
9266 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
9267 _ACEOF
9268
9269
9270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
9271 $as_echo_n "checking whether char is unsigned... " >&6; }
9272 if ${ac_cv_c_char_unsigned+:} false; then :
9273   $as_echo_n "(cached) " >&6
9274 else
9275   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9276 /* end confdefs.h.  */
9277 $ac_includes_default
9278 int
9279 main ()
9280 {
9281 static int test_array [1 - 2 * !(((char) -1) < 0)];
9282 test_array [0] = 0;
9283 return test_array [0];
9284
9285   ;
9286   return 0;
9287 }
9288 _ACEOF
9289 if ac_fn_c_try_compile "$LINENO"; then :
9290   ac_cv_c_char_unsigned=no
9291 else
9292   ac_cv_c_char_unsigned=yes
9293 fi
9294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9295 fi
9296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
9297 $as_echo "$ac_cv_c_char_unsigned" >&6; }
9298 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
9299   $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
9300
9301 fi
9302                 # The cast to long int works around a bug in the HP C Compiler
9303 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9304 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9305 # This bug is HP SR number 8606223364.
9306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
9307 $as_echo_n "checking size of signed char... " >&6; }
9308 if ${ac_cv_sizeof_signed_char+:} false; then :
9309   $as_echo_n "(cached) " >&6
9310 else
9311   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char"        "$ac_includes_default"; then :
9312
9313 else
9314   if test "$ac_cv_type_signed_char" = yes; then
9315      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9316 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9317 as_fn_error 77 "cannot compute sizeof (signed char)
9318 See \`config.log' for more details" "$LINENO" 5; }
9319    else
9320      ac_cv_sizeof_signed_char=0
9321    fi
9322 fi
9323
9324 fi
9325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
9326 $as_echo "$ac_cv_sizeof_signed_char" >&6; }
9327
9328
9329
9330 cat >>confdefs.h <<_ACEOF
9331 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9332 _ACEOF
9333
9334
9335 ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
9336 if test "x$ac_cv_type_s_char" = xyes; then :
9337
9338 cat >>confdefs.h <<_ACEOF
9339 #define HAVE_S_CHAR 1
9340 _ACEOF
9341
9342
9343 fi
9344 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
9345 if test "x$ac_cv_type_long_long" = xyes; then :
9346
9347 cat >>confdefs.h <<_ACEOF
9348 #define HAVE_LONG_LONG 1
9349 _ACEOF
9350
9351
9352 fi
9353
9354 # The cast to long int works around a bug in the HP C Compiler
9355 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9356 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9357 # This bug is HP SR number 8606223364.
9358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
9359 $as_echo_n "checking size of short... " >&6; }
9360 if ${ac_cv_sizeof_short+:} false; then :
9361   $as_echo_n "(cached) " >&6
9362 else
9363   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
9364
9365 else
9366   if test "$ac_cv_type_short" = yes; then
9367      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9368 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9369 as_fn_error 77 "cannot compute sizeof (short)
9370 See \`config.log' for more details" "$LINENO" 5; }
9371    else
9372      ac_cv_sizeof_short=0
9373    fi
9374 fi
9375
9376 fi
9377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
9378 $as_echo "$ac_cv_sizeof_short" >&6; }
9379
9380
9381
9382 cat >>confdefs.h <<_ACEOF
9383 #define SIZEOF_SHORT $ac_cv_sizeof_short
9384 _ACEOF
9385
9386
9387 # The cast to long int works around a bug in the HP C Compiler
9388 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9389 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9390 # This bug is HP SR number 8606223364.
9391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
9392 $as_echo_n "checking size of int... " >&6; }
9393 if ${ac_cv_sizeof_int+:} false; then :
9394   $as_echo_n "(cached) " >&6
9395 else
9396   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
9397
9398 else
9399   if test "$ac_cv_type_int" = yes; then
9400      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9401 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9402 as_fn_error 77 "cannot compute sizeof (int)
9403 See \`config.log' for more details" "$LINENO" 5; }
9404    else
9405      ac_cv_sizeof_int=0
9406    fi
9407 fi
9408
9409 fi
9410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
9411 $as_echo "$ac_cv_sizeof_int" >&6; }
9412
9413
9414
9415 cat >>confdefs.h <<_ACEOF
9416 #define SIZEOF_INT $ac_cv_sizeof_int
9417 _ACEOF
9418
9419
9420 # The cast to long int works around a bug in the HP C Compiler
9421 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9422 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9423 # This bug is HP SR number 8606223364.
9424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
9425 $as_echo_n "checking size of long... " >&6; }
9426 if ${ac_cv_sizeof_long+:} false; then :
9427   $as_echo_n "(cached) " >&6
9428 else
9429   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
9430
9431 else
9432   if test "$ac_cv_type_long" = yes; then
9433      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9434 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9435 as_fn_error 77 "cannot compute sizeof (long)
9436 See \`config.log' for more details" "$LINENO" 5; }
9437    else
9438      ac_cv_sizeof_long=0
9439    fi
9440 fi
9441
9442 fi
9443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
9444 $as_echo "$ac_cv_sizeof_long" >&6; }
9445
9446
9447
9448 cat >>confdefs.h <<_ACEOF
9449 #define SIZEOF_LONG $ac_cv_sizeof_long
9450 _ACEOF
9451
9452
9453
9454 case "$ac_cv_type_long_long" in
9455  no)
9456     ;;
9457  *)
9458     # The cast to long int works around a bug in the HP C Compiler
9459 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9460 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9461 # This bug is HP SR number 8606223364.
9462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
9463 $as_echo_n "checking size of long long... " >&6; }
9464 if ${ac_cv_sizeof_long_long+:} false; then :
9465   $as_echo_n "(cached) " >&6
9466 else
9467   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
9468
9469 else
9470   if test "$ac_cv_type_long_long" = yes; then
9471      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9472 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9473 as_fn_error 77 "cannot compute sizeof (long long)
9474 See \`config.log' for more details" "$LINENO" 5; }
9475    else
9476      ac_cv_sizeof_long_long=0
9477    fi
9478 fi
9479
9480 fi
9481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
9482 $as_echo "$ac_cv_sizeof_long_long" >&6; }
9483
9484
9485
9486 cat >>confdefs.h <<_ACEOF
9487 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
9488 _ACEOF
9489
9490
9491     ;;
9492 esac
9493
9494 case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
9495  *yes)
9496     # We have a typedef for s_char.  Might as well believe it...
9497     ;;
9498  no0no)
9499     # We have signed chars, can't say 'signed char', no s_char typedef.
9500
9501 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
9502
9503     ;;
9504  no1no)
9505     # We have signed chars, can say 'signed char', no s_char typedef.
9506
9507 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
9508
9509     ;;
9510  yes0no)
9511     # We have unsigned chars, can't say 'signed char', no s_char typedef.
9512     as_fn_error $? "No way to specify a signed character!" "$LINENO" 5
9513     ;;
9514  yes1no)
9515     # We have unsigned chars, can say 'signed char', no s_char typedef.
9516
9517 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
9518
9519     ;;
9520 esac
9521
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9523 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
9524 if ${ac_cv_type_uid_t+:} false; then :
9525   $as_echo_n "(cached) " >&6
9526 else
9527   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9528 /* end confdefs.h.  */
9529 #include <sys/types.h>
9530
9531 _ACEOF
9532 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9533   $EGREP "uid_t" >/dev/null 2>&1; then :
9534   ac_cv_type_uid_t=yes
9535 else
9536   ac_cv_type_uid_t=no
9537 fi
9538 rm -f conftest*
9539
9540 fi
9541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9542 $as_echo "$ac_cv_type_uid_t" >&6; }
9543 if test $ac_cv_type_uid_t = no; then
9544
9545 $as_echo "#define uid_t int" >>confdefs.h
9546
9547
9548 $as_echo "#define gid_t int" >>confdefs.h
9549
9550 fi
9551
9552
9553
9554
9555
9556
9557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
9558 $as_echo_n "checking if we're including debugging code... " >&6; }
9559 # Check whether --enable-debugging was given.
9560 if test "${enable_debugging+set}" = set; then :
9561   enableval=$enable_debugging; ntp_ok=$enableval
9562 else
9563   ntp_ok=yes
9564
9565 fi
9566
9567 case "$ntp_ok" in
9568  yes)
9569
9570 $as_echo "#define DEBUG 1" >>confdefs.h
9571
9572 esac
9573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
9574 $as_echo "$ntp_ok" >&6; }
9575
9576
9577
9578 # check if we can compile with pthreads
9579 for ac_header in semaphore.h
9580 do :
9581   ac_fn_c_check_header_mongrel "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
9582 if test "x$ac_cv_header_semaphore_h" = xyes; then :
9583   cat >>confdefs.h <<_ACEOF
9584 #define HAVE_SEMAPHORE_H 1
9585 _ACEOF
9586
9587 fi
9588
9589 done
9590
9591 for ac_func in socketpair
9592 do :
9593   ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
9594 if test "x$ac_cv_func_socketpair" = xyes; then :
9595   cat >>confdefs.h <<_ACEOF
9596 #define HAVE_SOCKETPAIR 1
9597 _ACEOF
9598
9599 fi
9600 done
9601
9602 # Check whether --enable-thread-support was given.
9603 if test "${enable_thread_support+set}" = set; then :
9604   enableval=$enable_thread_support;
9605 else
9606   enable_thread_support=yes
9607
9608 fi
9609
9610 have_pthreads=no
9611 case "$enable_thread_support" in
9612  no) ;;
9613  *)
9614     ol_found_pthreads=no
9615
9616
9617
9618 ac_ext=c
9619 ac_cpp='$CPP $CPPFLAGS'
9620 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9621 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9622 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9623
9624 # OpenLDAP --with-threads
9625
9626 # Check whether --with-threads was given.
9627 if test "${with_threads+set}" = set; then :
9628   withval=$with_threads;
9629         ol_arg=invalid
9630         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
9631                 if test "$withval" = "$ol_val" ; then
9632                         ol_arg="$ol_val"
9633                 fi
9634         done
9635         if test "$ol_arg" = "invalid" ; then
9636                 as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
9637         fi
9638         ol_with_threads="$ol_arg"
9639
9640 else
9641         ol_with_threads="auto"
9642 fi
9643 # end --with-threads
9644
9645
9646 case "$ol_with_threads$host" in
9647  auto*-*-solaris2.[0-6])
9648         ol_with_threads=no
9649     ;;
9650 esac
9651
9652
9653 ol_aix_threads=no
9654 case "$host" in
9655 *-*-aix*)       if test -z "$CC" ; then
9656                 case "$ol_with_threads" in
9657                 auto | yes |  posix) ol_aix_threads=yes ;;
9658                 esac
9659         fi
9660 ;;
9661 esac
9662
9663 if test $ol_aix_threads = yes ; then
9664         if test -z "${CC}" ; then
9665                 for ac_prog in cc_r xlc_r cc
9666 do
9667   # Extract the first word of "$ac_prog", so it can be a program name with args.
9668 set dummy $ac_prog; ac_word=$2
9669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9670 $as_echo_n "checking for $ac_word... " >&6; }
9671 if ${ac_cv_prog_CC+:} false; then :
9672   $as_echo_n "(cached) " >&6
9673 else
9674   if test -n "$CC"; then
9675   ac_cv_prog_CC="$CC" # Let the user override the test.
9676 else
9677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9678 for as_dir in $PATH
9679 do
9680   IFS=$as_save_IFS
9681   test -z "$as_dir" && as_dir=.
9682     for ac_exec_ext in '' $ac_executable_extensions; do
9683   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9684     ac_cv_prog_CC="$ac_prog"
9685     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9686     break 2
9687   fi
9688 done
9689   done
9690 IFS=$as_save_IFS
9691
9692 fi
9693 fi
9694 CC=$ac_cv_prog_CC
9695 if test -n "$CC"; then
9696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
9697 $as_echo "$CC" >&6; }
9698 else
9699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9700 $as_echo "no" >&6; }
9701 fi
9702
9703
9704   test -n "$CC" && break
9705 done
9706
9707
9708                 if test "$CC" = cc ; then
9709                                                 if test $ol_with_threads != auto ; then
9710                                 as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
9711                         else
9712                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
9713 $as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
9714                         fi
9715                         ol_with_threads=no
9716                 fi
9717         fi
9718
9719         case ${CC} in cc_r | xlc_r)
9720                 ol_with_threads=posix
9721                 ol_cv_pthread_create=yes
9722                 ;;
9723         esac
9724 fi
9725
9726 ol_link_threads=no
9727 # OpenLDAP --with-yielding_select
9728
9729 # Check whether --with-yielding_select was given.
9730 if test "${with_yielding_select+set}" = set; then :
9731   withval=$with_yielding_select;
9732         ol_arg=invalid
9733         for ol_val in auto yes no manual  ; do
9734                 if test "$withval" = "$ol_val" ; then
9735                         ol_arg="$ol_val"
9736                 fi
9737         done
9738         if test "$ol_arg" = "invalid" ; then
9739                 as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
9740         fi
9741         ol_with_yielding_select="$ol_arg"
9742
9743 else
9744         ol_with_yielding_select="auto"
9745 fi
9746 # end --with-yielding_select
9747
9748
9749 case $ol_with_threads in auto | yes | nt)
9750
9751
9752         ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
9753 if test "x$ac_cv_func__beginthread" = xyes; then :
9754
9755 fi
9756
9757
9758         if test $ac_cv_func__beginthread = yes ; then
9759
9760 $as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
9761
9762                 ol_cv_nt_threads=yes
9763         fi
9764
9765
9766         if test "$ol_cv_nt_threads" = yes ; then
9767                 ol_link_threads=nt
9768                 ol_with_threads=found
9769                 ol_with_yielding_select=yes
9770
9771
9772 $as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
9773
9774
9775 $as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
9776
9777         fi
9778
9779         if test $ol_with_threads = nt ; then
9780                 as_fn_error $? "could not locate NT Threads" "$LINENO" 5
9781         fi
9782         ;;
9783 esac
9784
9785 case $ol_with_threads in auto | yes | posix)
9786
9787         for ac_header in pthread.h
9788 do :
9789   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
9790 if test "x$ac_cv_header_pthread_h" = xyes; then :
9791   cat >>confdefs.h <<_ACEOF
9792 #define HAVE_PTHREAD_H 1
9793 _ACEOF
9794
9795 fi
9796
9797 done
9798
9799
9800         if test $ac_cv_header_pthread_h = yes ; then
9801                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
9802 $as_echo_n "checking POSIX thread version... " >&6; }
9803 if ${ol_cv_pthread_version+:} false; then :
9804   $as_echo_n "(cached) " >&6
9805 else
9806
9807         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9808 /* end confdefs.h.  */
9809
9810 #               include <pthread.h>
9811
9812 int
9813 main ()
9814 {
9815
9816                 int i = PTHREAD_CREATE_JOINABLE;
9817
9818   ;
9819   return 0;
9820 }
9821 _ACEOF
9822 if ac_fn_c_try_compile "$LINENO"; then :
9823
9824         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9825 /* end confdefs.h.  */
9826 #include <pthread.h>
9827
9828 _ACEOF
9829 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9830   $EGREP "pthread_detach" >/dev/null 2>&1; then :
9831   ol_cv_pthread_version=10
9832 else
9833   ol_cv_pthread_version=8
9834 fi
9835 rm -f conftest*
9836
9837 else
9838
9839         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9840 /* end confdefs.h.  */
9841
9842 #               include <pthread.h>
9843 #               ifdef PTHREAD_CREATE_UNDETACHED
9844                 draft7
9845 #               endif
9846
9847 _ACEOF
9848 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9849   $EGREP "draft7" >/dev/null 2>&1; then :
9850   ol_cv_pthread_version=7
9851 else
9852
9853         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9854 /* end confdefs.h.  */
9855 #include <pthread.h>
9856
9857 _ACEOF
9858 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9859   $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
9860   ol_cv_pthread_version=6
9861 else
9862
9863         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9864 /* end confdefs.h.  */
9865
9866 #               include <pthread.h>
9867 #ifdef          PTHREAD_MUTEX_INITIALIZER
9868                 draft5
9869 #endif
9870
9871 _ACEOF
9872 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9873   $EGREP "draft5" >/dev/null 2>&1; then :
9874   ol_cv_pthread_version=5
9875 else
9876   ol_cv_pthread_version=4
9877 fi
9878 rm -f conftest*
9879
9880 fi
9881 rm -f conftest*
9882
9883 fi
9884 rm -f conftest*
9885
9886 fi
9887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9888
9889 fi
9890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
9891 $as_echo "$ol_cv_pthread_version" >&6; }
9892
9893
9894                 if test $ol_cv_pthread_version != 0 ; then
9895
9896 cat >>confdefs.h <<_ACEOF
9897 #define HAVE_PTHREADS $ol_cv_pthread_version
9898 _ACEOF
9899
9900                 else
9901                         as_fn_error $? "unknown pthread version" "$LINENO" 5
9902                 fi
9903
9904                 # consider threads found
9905                 ol_with_threads=found
9906
9907
9908         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
9909 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
9910 if ${ol_cv_header_linux_threads+:} false; then :
9911   $as_echo_n "(cached) " >&6
9912 else
9913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9914 /* end confdefs.h.  */
9915 #include <pthread.h>
9916 _ACEOF
9917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9918   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
9919   ol_cv_header_linux_threads=yes
9920 else
9921   ol_cv_header_linux_threads=no
9922 fi
9923 rm -f conftest*
9924
9925
9926 fi
9927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
9928 $as_echo "$ol_cv_header_linux_threads" >&6; }
9929         if test $ol_cv_header_linux_threads = yes; then
9930
9931 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
9932
9933         fi
9934
9935
9936         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
9937 $as_echo_n "checking for GNU Pth pthread.h... " >&6; }
9938 if ${ol_cv_header_gnu_pth_pthread_h+:} false; then :
9939   $as_echo_n "(cached) " >&6
9940 else
9941   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9942 /* end confdefs.h.  */
9943 #include <pthread.h>
9944 #ifdef _POSIX_THREAD_IS_GNU_PTH
9945         __gnu_pth__;
9946 #endif
9947
9948 _ACEOF
9949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9950   $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
9951   ol_cv_header_gnu_pth_pthread_h=yes
9952 else
9953   ol_cv_header_gnu_pth_pthread_h=no
9954 fi
9955 rm -f conftest*
9956
9957
9958 fi
9959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
9960 $as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
9961
9962
9963                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
9964                         for ac_header in sched.h
9965 do :
9966   ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
9967 if test "x$ac_cv_header_sched_h" = xyes; then :
9968   cat >>confdefs.h <<_ACEOF
9969 #define HAVE_SCHED_H 1
9970 _ACEOF
9971
9972 fi
9973
9974 done
9975
9976                 fi
9977
9978
9979                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
9980 $as_echo_n "checking for pthread_create in default libraries... " >&6; }
9981 if ${ol_cv_pthread_create+:} false; then :
9982   $as_echo_n "(cached) " >&6
9983 else
9984
9985                         if test "$cross_compiling" = yes; then :
9986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9987 /* end confdefs.h.  */
9988
9989 /* pthread test headers */
9990 #include <pthread.h>
9991 #if HAVE_PTHREADS < 7
9992 #include <errno.h>
9993 #endif
9994 #ifndef NULL
9995 #define NULL (void*)0
9996 #endif
9997
9998 static void *task(p)
9999         void *p;
10000 {
10001         return (void *) (p == NULL);
10002 }
10003
10004 int
10005 main ()
10006 {
10007
10008         /* pthread test function */
10009 #ifndef PTHREAD_CREATE_DETACHED
10010 #define PTHREAD_CREATE_DETACHED 1
10011 #endif
10012         pthread_t t;
10013         int status;
10014         int detach = PTHREAD_CREATE_DETACHED;
10015
10016 #if HAVE_PTHREADS > 4
10017         /* Final pthreads */
10018         pthread_attr_t attr;
10019
10020         status = pthread_attr_init(&attr);
10021         if( status ) return status;
10022
10023 #if HAVE_PTHREADS < 7
10024         status = pthread_attr_setdetachstate(&attr, &detach);
10025         if( status < 0 ) status = errno;
10026 #else
10027         status = pthread_attr_setdetachstate(&attr, detach);
10028 #endif
10029         if( status ) return status;
10030         status = pthread_create( &t, &attr, task, NULL );
10031 #if HAVE_PTHREADS < 7
10032         if( status < 0 ) status = errno;
10033 #endif
10034         if( status ) return status;
10035 #else
10036         /* Draft 4 pthreads */
10037         status = pthread_create( &t, pthread_attr_default, task, NULL );
10038         if( status ) return errno;
10039
10040         /* give thread a chance to complete */
10041         /* it should remain joinable and hence detachable */
10042         sleep( 1 );
10043
10044         status = pthread_detach( &t );
10045         if( status ) return errno;
10046 #endif
10047
10048 #ifdef HAVE_LINUX_THREADS
10049         pthread_kill_other_threads_np();
10050 #endif
10051
10052         return 0;
10053
10054   ;
10055   return 0;
10056 }
10057 _ACEOF
10058 if ac_fn_c_try_link "$LINENO"; then :
10059   ol_cv_pthread_create=yes
10060 else
10061   ol_cv_pthread_create=no
10062 fi
10063 rm -f core conftest.err conftest.$ac_objext \
10064     conftest$ac_exeext conftest.$ac_ext
10065 else
10066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10067 /* end confdefs.h.  */
10068
10069
10070 /* pthread test headers */
10071 #include <pthread.h>
10072 #if HAVE_PTHREADS < 7
10073 #include <errno.h>
10074 #endif
10075 #ifndef NULL
10076 #define NULL (void*)0
10077 #endif
10078
10079 static void *task(p)
10080         void *p;
10081 {
10082         return (void *) (p == NULL);
10083 }
10084
10085
10086 int main(argc, argv)
10087         int argc;
10088         char **argv;
10089 {
10090
10091         /* pthread test function */
10092 #ifndef PTHREAD_CREATE_DETACHED
10093 #define PTHREAD_CREATE_DETACHED 1
10094 #endif
10095         pthread_t t;
10096         int status;
10097         int detach = PTHREAD_CREATE_DETACHED;
10098
10099 #if HAVE_PTHREADS > 4
10100         /* Final pthreads */
10101         pthread_attr_t attr;
10102
10103         status = pthread_attr_init(&attr);
10104         if( status ) return status;
10105
10106 #if HAVE_PTHREADS < 7
10107         status = pthread_attr_setdetachstate(&attr, &detach);
10108         if( status < 0 ) status = errno;
10109 #else
10110         status = pthread_attr_setdetachstate(&attr, detach);
10111 #endif
10112         if( status ) return status;
10113         status = pthread_create( &t, &attr, task, NULL );
10114 #if HAVE_PTHREADS < 7
10115         if( status < 0 ) status = errno;
10116 #endif
10117         if( status ) return status;
10118 #else
10119         /* Draft 4 pthreads */
10120         status = pthread_create( &t, pthread_attr_default, task, NULL );
10121         if( status ) return errno;
10122
10123         /* give thread a chance to complete */
10124         /* it should remain joinable and hence detachable */
10125         sleep( 1 );
10126
10127         status = pthread_detach( &t );
10128         if( status ) return errno;
10129 #endif
10130
10131 #ifdef HAVE_LINUX_THREADS
10132         pthread_kill_other_threads_np();
10133 #endif
10134
10135         return 0;
10136
10137 }
10138
10139 _ACEOF
10140 if ac_fn_c_try_run "$LINENO"; then :
10141   ol_cv_pthread_create=yes
10142 else
10143   ol_cv_pthread_create=no
10144 fi
10145 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10146   conftest.$ac_objext conftest.beam conftest.$ac_ext
10147 fi
10148
10149 fi
10150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
10151 $as_echo "$ol_cv_pthread_create" >&6; }
10152
10153                 if test $ol_cv_pthread_create != no ; then
10154                         ol_link_threads=posix
10155                         ol_link_pthreads=""
10156                 fi
10157
10158                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
10159 if test "$ol_link_threads" = no ; then
10160         # try -kthread
10161         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
10162 $as_echo_n "checking for pthread link with -kthread... " >&6; }
10163 if ${ol_cv_pthread_kthread+:} false; then :
10164   $as_echo_n "(cached) " >&6
10165 else
10166
10167                 # save the flags
10168                 ol_LIBS="$LIBS"
10169                 LIBS="-kthread $LIBS"
10170
10171                 if test "$cross_compiling" = yes; then :
10172   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10173 /* end confdefs.h.  */
10174
10175 /* pthread test headers */
10176 #include <pthread.h>
10177 #if HAVE_PTHREADS < 7
10178 #include <errno.h>
10179 #endif
10180 #ifndef NULL
10181 #define NULL (void*)0
10182 #endif
10183
10184 static void *task(p)
10185         void *p;
10186 {
10187         return (void *) (p == NULL);
10188 }
10189
10190 int
10191 main ()
10192 {
10193
10194         /* pthread test function */
10195 #ifndef PTHREAD_CREATE_DETACHED
10196 #define PTHREAD_CREATE_DETACHED 1
10197 #endif
10198         pthread_t t;
10199         int status;
10200         int detach = PTHREAD_CREATE_DETACHED;
10201
10202 #if HAVE_PTHREADS > 4
10203         /* Final pthreads */
10204         pthread_attr_t attr;
10205
10206         status = pthread_attr_init(&attr);
10207         if( status ) return status;
10208
10209 #if HAVE_PTHREADS < 7
10210         status = pthread_attr_setdetachstate(&attr, &detach);
10211         if( status < 0 ) status = errno;
10212 #else
10213         status = pthread_attr_setdetachstate(&attr, detach);
10214 #endif
10215         if( status ) return status;
10216         status = pthread_create( &t, &attr, task, NULL );
10217 #if HAVE_PTHREADS < 7
10218         if( status < 0 ) status = errno;
10219 #endif
10220         if( status ) return status;
10221 #else
10222         /* Draft 4 pthreads */
10223         status = pthread_create( &t, pthread_attr_default, task, NULL );
10224         if( status ) return errno;
10225
10226         /* give thread a chance to complete */
10227         /* it should remain joinable and hence detachable */
10228         sleep( 1 );
10229
10230         status = pthread_detach( &t );
10231         if( status ) return errno;
10232 #endif
10233
10234 #ifdef HAVE_LINUX_THREADS
10235         pthread_kill_other_threads_np();
10236 #endif
10237
10238         return 0;
10239
10240   ;
10241   return 0;
10242 }
10243 _ACEOF
10244 if ac_fn_c_try_link "$LINENO"; then :
10245   ol_cv_pthread_kthread=yes
10246 else
10247   ol_cv_pthread_kthread=no
10248 fi
10249 rm -f core conftest.err conftest.$ac_objext \
10250     conftest$ac_exeext conftest.$ac_ext
10251 else
10252   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10253 /* end confdefs.h.  */
10254
10255
10256 /* pthread test headers */
10257 #include <pthread.h>
10258 #if HAVE_PTHREADS < 7
10259 #include <errno.h>
10260 #endif
10261 #ifndef NULL
10262 #define NULL (void*)0
10263 #endif
10264
10265 static void *task(p)
10266         void *p;
10267 {
10268         return (void *) (p == NULL);
10269 }
10270
10271
10272 int main(argc, argv)
10273         int argc;
10274         char **argv;
10275 {
10276
10277         /* pthread test function */
10278 #ifndef PTHREAD_CREATE_DETACHED
10279 #define PTHREAD_CREATE_DETACHED 1
10280 #endif
10281         pthread_t t;
10282         int status;
10283         int detach = PTHREAD_CREATE_DETACHED;
10284
10285 #if HAVE_PTHREADS > 4
10286         /* Final pthreads */
10287         pthread_attr_t attr;
10288
10289         status = pthread_attr_init(&attr);
10290         if( status ) return status;
10291
10292 #if HAVE_PTHREADS < 7
10293         status = pthread_attr_setdetachstate(&attr, &detach);
10294         if( status < 0 ) status = errno;
10295 #else
10296         status = pthread_attr_setdetachstate(&attr, detach);
10297 #endif
10298         if( status ) return status;
10299         status = pthread_create( &t, &attr, task, NULL );
10300 #if HAVE_PTHREADS < 7
10301         if( status < 0 ) status = errno;
10302 #endif
10303         if( status ) return status;
10304 #else
10305         /* Draft 4 pthreads */
10306         status = pthread_create( &t, pthread_attr_default, task, NULL );
10307         if( status ) return errno;
10308
10309         /* give thread a chance to complete */
10310         /* it should remain joinable and hence detachable */
10311         sleep( 1 );
10312
10313         status = pthread_detach( &t );
10314         if( status ) return errno;
10315 #endif
10316
10317 #ifdef HAVE_LINUX_THREADS
10318         pthread_kill_other_threads_np();
10319 #endif
10320
10321         return 0;
10322
10323 }
10324
10325 _ACEOF
10326 if ac_fn_c_try_run "$LINENO"; then :
10327   ol_cv_pthread_kthread=yes
10328 else
10329   ol_cv_pthread_kthread=no
10330 fi
10331 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10332   conftest.$ac_objext conftest.beam conftest.$ac_ext
10333 fi
10334
10335
10336                 # restore the LIBS
10337                 LIBS="$ol_LIBS"
10338
10339 fi
10340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
10341 $as_echo "$ol_cv_pthread_kthread" >&6; }
10342
10343         if test $ol_cv_pthread_kthread = yes ; then
10344                 ol_link_pthreads="-kthread"
10345                 ol_link_threads=posix
10346         fi
10347 fi
10348
10349                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
10350 if test "$ol_link_threads" = no ; then
10351         # try -pthread
10352         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
10353 $as_echo_n "checking for pthread link with -pthread... " >&6; }
10354 if ${ol_cv_pthread_pthread+:} false; then :
10355   $as_echo_n "(cached) " >&6
10356 else
10357
10358                 # save the flags
10359                 ol_LIBS="$LIBS"
10360                 LIBS="-pthread $LIBS"
10361
10362                 if test "$cross_compiling" = yes; then :
10363   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10364 /* end confdefs.h.  */
10365
10366 /* pthread test headers */
10367 #include <pthread.h>
10368 #if HAVE_PTHREADS < 7
10369 #include <errno.h>
10370 #endif
10371 #ifndef NULL
10372 #define NULL (void*)0
10373 #endif
10374
10375 static void *task(p)
10376         void *p;
10377 {
10378         return (void *) (p == NULL);
10379 }
10380
10381 int
10382 main ()
10383 {
10384
10385         /* pthread test function */
10386 #ifndef PTHREAD_CREATE_DETACHED
10387 #define PTHREAD_CREATE_DETACHED 1
10388 #endif
10389         pthread_t t;
10390         int status;
10391         int detach = PTHREAD_CREATE_DETACHED;
10392
10393 #if HAVE_PTHREADS > 4
10394         /* Final pthreads */
10395         pthread_attr_t attr;
10396
10397         status = pthread_attr_init(&attr);
10398         if( status ) return status;
10399
10400 #if HAVE_PTHREADS < 7
10401         status = pthread_attr_setdetachstate(&attr, &detach);
10402         if( status < 0 ) status = errno;
10403 #else
10404         status = pthread_attr_setdetachstate(&attr, detach);
10405 #endif
10406         if( status ) return status;
10407         status = pthread_create( &t, &attr, task, NULL );
10408 #if HAVE_PTHREADS < 7
10409         if( status < 0 ) status = errno;
10410 #endif
10411         if( status ) return status;
10412 #else
10413         /* Draft 4 pthreads */
10414         status = pthread_create( &t, pthread_attr_default, task, NULL );
10415         if( status ) return errno;
10416
10417         /* give thread a chance to complete */
10418         /* it should remain joinable and hence detachable */
10419         sleep( 1 );
10420
10421         status = pthread_detach( &t );
10422         if( status ) return errno;
10423 #endif
10424
10425 #ifdef HAVE_LINUX_THREADS
10426         pthread_kill_other_threads_np();
10427 #endif
10428
10429         return 0;
10430
10431   ;
10432   return 0;
10433 }
10434 _ACEOF
10435 if ac_fn_c_try_link "$LINENO"; then :
10436   ol_cv_pthread_pthread=yes
10437 else
10438   ol_cv_pthread_pthread=no
10439 fi
10440 rm -f core conftest.err conftest.$ac_objext \
10441     conftest$ac_exeext conftest.$ac_ext
10442 else
10443   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10444 /* end confdefs.h.  */
10445
10446
10447 /* pthread test headers */
10448 #include <pthread.h>
10449 #if HAVE_PTHREADS < 7
10450 #include <errno.h>
10451 #endif
10452 #ifndef NULL
10453 #define NULL (void*)0
10454 #endif
10455
10456 static void *task(p)
10457         void *p;
10458 {
10459         return (void *) (p == NULL);
10460 }
10461
10462
10463 int main(argc, argv)
10464         int argc;
10465         char **argv;
10466 {
10467
10468         /* pthread test function */
10469 #ifndef PTHREAD_CREATE_DETACHED
10470 #define PTHREAD_CREATE_DETACHED 1
10471 #endif
10472         pthread_t t;
10473         int status;
10474         int detach = PTHREAD_CREATE_DETACHED;
10475
10476 #if HAVE_PTHREADS > 4
10477         /* Final pthreads */
10478         pthread_attr_t attr;
10479
10480         status = pthread_attr_init(&attr);
10481         if( status ) return status;
10482
10483 #if HAVE_PTHREADS < 7
10484         status = pthread_attr_setdetachstate(&attr, &detach);
10485         if( status < 0 ) status = errno;
10486 #else
10487         status = pthread_attr_setdetachstate(&attr, detach);
10488 #endif
10489         if( status ) return status;
10490         status = pthread_create( &t, &attr, task, NULL );
10491 #if HAVE_PTHREADS < 7
10492         if( status < 0 ) status = errno;
10493 #endif
10494         if( status ) return status;
10495 #else
10496         /* Draft 4 pthreads */
10497         status = pthread_create( &t, pthread_attr_default, task, NULL );
10498         if( status ) return errno;
10499
10500         /* give thread a chance to complete */
10501         /* it should remain joinable and hence detachable */
10502         sleep( 1 );
10503
10504         status = pthread_detach( &t );
10505         if( status ) return errno;
10506 #endif
10507
10508 #ifdef HAVE_LINUX_THREADS
10509         pthread_kill_other_threads_np();
10510 #endif
10511
10512         return 0;
10513
10514 }
10515
10516 _ACEOF
10517 if ac_fn_c_try_run "$LINENO"; then :
10518   ol_cv_pthread_pthread=yes
10519 else
10520   ol_cv_pthread_pthread=no
10521 fi
10522 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10523   conftest.$ac_objext conftest.beam conftest.$ac_ext
10524 fi
10525
10526
10527                 # restore the LIBS
10528                 LIBS="$ol_LIBS"
10529
10530 fi
10531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
10532 $as_echo "$ol_cv_pthread_pthread" >&6; }
10533
10534         if test $ol_cv_pthread_pthread = yes ; then
10535                 ol_link_pthreads="-pthread"
10536                 ol_link_threads=posix
10537         fi
10538 fi
10539
10540                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
10541 if test "$ol_link_threads" = no ; then
10542         # try -pthreads
10543         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
10544 $as_echo_n "checking for pthread link with -pthreads... " >&6; }
10545 if ${ol_cv_pthread_pthreads+:} false; then :
10546   $as_echo_n "(cached) " >&6
10547 else
10548
10549                 # save the flags
10550                 ol_LIBS="$LIBS"
10551                 LIBS="-pthreads $LIBS"
10552
10553                 if test "$cross_compiling" = yes; then :
10554   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10555 /* end confdefs.h.  */
10556
10557 /* pthread test headers */
10558 #include <pthread.h>
10559 #if HAVE_PTHREADS < 7
10560 #include <errno.h>
10561 #endif
10562 #ifndef NULL
10563 #define NULL (void*)0
10564 #endif
10565
10566 static void *task(p)
10567         void *p;
10568 {
10569         return (void *) (p == NULL);
10570 }
10571
10572 int
10573 main ()
10574 {
10575
10576         /* pthread test function */
10577 #ifndef PTHREAD_CREATE_DETACHED
10578 #define PTHREAD_CREATE_DETACHED 1
10579 #endif
10580         pthread_t t;
10581         int status;
10582         int detach = PTHREAD_CREATE_DETACHED;
10583
10584 #if HAVE_PTHREADS > 4
10585         /* Final pthreads */
10586         pthread_attr_t attr;
10587
10588         status = pthread_attr_init(&attr);
10589         if( status ) return status;
10590
10591 #if HAVE_PTHREADS < 7
10592         status = pthread_attr_setdetachstate(&attr, &detach);
10593         if( status < 0 ) status = errno;
10594 #else
10595         status = pthread_attr_setdetachstate(&attr, detach);
10596 #endif
10597         if( status ) return status;
10598         status = pthread_create( &t, &attr, task, NULL );
10599 #if HAVE_PTHREADS < 7
10600         if( status < 0 ) status = errno;
10601 #endif
10602         if( status ) return status;
10603 #else
10604         /* Draft 4 pthreads */
10605         status = pthread_create( &t, pthread_attr_default, task, NULL );
10606         if( status ) return errno;
10607
10608         /* give thread a chance to complete */
10609         /* it should remain joinable and hence detachable */
10610         sleep( 1 );
10611
10612         status = pthread_detach( &t );
10613         if( status ) return errno;
10614 #endif
10615
10616 #ifdef HAVE_LINUX_THREADS
10617         pthread_kill_other_threads_np();
10618 #endif
10619
10620         return 0;
10621
10622   ;
10623   return 0;
10624 }
10625 _ACEOF
10626 if ac_fn_c_try_link "$LINENO"; then :
10627   ol_cv_pthread_pthreads=yes
10628 else
10629   ol_cv_pthread_pthreads=no
10630 fi
10631 rm -f core conftest.err conftest.$ac_objext \
10632     conftest$ac_exeext conftest.$ac_ext
10633 else
10634   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10635 /* end confdefs.h.  */
10636
10637
10638 /* pthread test headers */
10639 #include <pthread.h>
10640 #if HAVE_PTHREADS < 7
10641 #include <errno.h>
10642 #endif
10643 #ifndef NULL
10644 #define NULL (void*)0
10645 #endif
10646
10647 static void *task(p)
10648         void *p;
10649 {
10650         return (void *) (p == NULL);
10651 }
10652
10653
10654 int main(argc, argv)
10655         int argc;
10656         char **argv;
10657 {
10658
10659         /* pthread test function */
10660 #ifndef PTHREAD_CREATE_DETACHED
10661 #define PTHREAD_CREATE_DETACHED 1
10662 #endif
10663         pthread_t t;
10664         int status;
10665         int detach = PTHREAD_CREATE_DETACHED;
10666
10667 #if HAVE_PTHREADS > 4
10668         /* Final pthreads */
10669         pthread_attr_t attr;
10670
10671         status = pthread_attr_init(&attr);
10672         if( status ) return status;
10673
10674 #if HAVE_PTHREADS < 7
10675         status = pthread_attr_setdetachstate(&attr, &detach);
10676         if( status < 0 ) status = errno;
10677 #else
10678         status = pthread_attr_setdetachstate(&attr, detach);
10679 #endif
10680         if( status ) return status;
10681         status = pthread_create( &t, &attr, task, NULL );
10682 #if HAVE_PTHREADS < 7
10683         if( status < 0 ) status = errno;
10684 #endif
10685         if( status ) return status;
10686 #else
10687         /* Draft 4 pthreads */
10688         status = pthread_create( &t, pthread_attr_default, task, NULL );
10689         if( status ) return errno;
10690
10691         /* give thread a chance to complete */
10692         /* it should remain joinable and hence detachable */
10693         sleep( 1 );
10694
10695         status = pthread_detach( &t );
10696         if( status ) return errno;
10697 #endif
10698
10699 #ifdef HAVE_LINUX_THREADS
10700         pthread_kill_other_threads_np();
10701 #endif
10702
10703         return 0;
10704
10705 }
10706
10707 _ACEOF
10708 if ac_fn_c_try_run "$LINENO"; then :
10709   ol_cv_pthread_pthreads=yes
10710 else
10711   ol_cv_pthread_pthreads=no
10712 fi
10713 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10714   conftest.$ac_objext conftest.beam conftest.$ac_ext
10715 fi
10716
10717
10718                 # restore the LIBS
10719                 LIBS="$ol_LIBS"
10720
10721 fi
10722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
10723 $as_echo "$ol_cv_pthread_pthreads" >&6; }
10724
10725         if test $ol_cv_pthread_pthreads = yes ; then
10726                 ol_link_pthreads="-pthreads"
10727                 ol_link_threads=posix
10728         fi
10729 fi
10730
10731                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
10732 if test "$ol_link_threads" = no ; then
10733         # try -mthreads
10734         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
10735 $as_echo_n "checking for pthread link with -mthreads... " >&6; }
10736 if ${ol_cv_pthread_mthreads+:} false; then :
10737   $as_echo_n "(cached) " >&6
10738 else
10739
10740                 # save the flags
10741                 ol_LIBS="$LIBS"
10742                 LIBS="-mthreads $LIBS"
10743
10744                 if test "$cross_compiling" = yes; then :
10745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10746 /* end confdefs.h.  */
10747
10748 /* pthread test headers */
10749 #include <pthread.h>
10750 #if HAVE_PTHREADS < 7
10751 #include <errno.h>
10752 #endif
10753 #ifndef NULL
10754 #define NULL (void*)0
10755 #endif
10756
10757 static void *task(p)
10758         void *p;
10759 {
10760         return (void *) (p == NULL);
10761 }
10762
10763 int
10764 main ()
10765 {
10766
10767         /* pthread test function */
10768 #ifndef PTHREAD_CREATE_DETACHED
10769 #define PTHREAD_CREATE_DETACHED 1
10770 #endif
10771         pthread_t t;
10772         int status;
10773         int detach = PTHREAD_CREATE_DETACHED;
10774
10775 #if HAVE_PTHREADS > 4
10776         /* Final pthreads */
10777         pthread_attr_t attr;
10778
10779         status = pthread_attr_init(&attr);
10780         if( status ) return status;
10781
10782 #if HAVE_PTHREADS < 7
10783         status = pthread_attr_setdetachstate(&attr, &detach);
10784         if( status < 0 ) status = errno;
10785 #else
10786         status = pthread_attr_setdetachstate(&attr, detach);
10787 #endif
10788         if( status ) return status;
10789         status = pthread_create( &t, &attr, task, NULL );
10790 #if HAVE_PTHREADS < 7
10791         if( status < 0 ) status = errno;
10792 #endif
10793         if( status ) return status;
10794 #else
10795         /* Draft 4 pthreads */
10796         status = pthread_create( &t, pthread_attr_default, task, NULL );
10797         if( status ) return errno;
10798
10799         /* give thread a chance to complete */
10800         /* it should remain joinable and hence detachable */
10801         sleep( 1 );
10802
10803         status = pthread_detach( &t );
10804         if( status ) return errno;
10805 #endif
10806
10807 #ifdef HAVE_LINUX_THREADS
10808         pthread_kill_other_threads_np();
10809 #endif
10810
10811         return 0;
10812
10813   ;
10814   return 0;
10815 }
10816 _ACEOF
10817 if ac_fn_c_try_link "$LINENO"; then :
10818   ol_cv_pthread_mthreads=yes
10819 else
10820   ol_cv_pthread_mthreads=no
10821 fi
10822 rm -f core conftest.err conftest.$ac_objext \
10823     conftest$ac_exeext conftest.$ac_ext
10824 else
10825   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10826 /* end confdefs.h.  */
10827
10828
10829 /* pthread test headers */
10830 #include <pthread.h>
10831 #if HAVE_PTHREADS < 7
10832 #include <errno.h>
10833 #endif
10834 #ifndef NULL
10835 #define NULL (void*)0
10836 #endif
10837
10838 static void *task(p)
10839         void *p;
10840 {
10841         return (void *) (p == NULL);
10842 }
10843
10844
10845 int main(argc, argv)
10846         int argc;
10847         char **argv;
10848 {
10849
10850         /* pthread test function */
10851 #ifndef PTHREAD_CREATE_DETACHED
10852 #define PTHREAD_CREATE_DETACHED 1
10853 #endif
10854         pthread_t t;
10855         int status;
10856         int detach = PTHREAD_CREATE_DETACHED;
10857
10858 #if HAVE_PTHREADS > 4
10859         /* Final pthreads */
10860         pthread_attr_t attr;
10861
10862         status = pthread_attr_init(&attr);
10863         if( status ) return status;
10864
10865 #if HAVE_PTHREADS < 7
10866         status = pthread_attr_setdetachstate(&attr, &detach);
10867         if( status < 0 ) status = errno;
10868 #else
10869         status = pthread_attr_setdetachstate(&attr, detach);
10870 #endif
10871         if( status ) return status;
10872         status = pthread_create( &t, &attr, task, NULL );
10873 #if HAVE_PTHREADS < 7
10874         if( status < 0 ) status = errno;
10875 #endif
10876         if( status ) return status;
10877 #else
10878         /* Draft 4 pthreads */
10879         status = pthread_create( &t, pthread_attr_default, task, NULL );
10880         if( status ) return errno;
10881
10882         /* give thread a chance to complete */
10883         /* it should remain joinable and hence detachable */
10884         sleep( 1 );
10885
10886         status = pthread_detach( &t );
10887         if( status ) return errno;
10888 #endif
10889
10890 #ifdef HAVE_LINUX_THREADS
10891         pthread_kill_other_threads_np();
10892 #endif
10893
10894         return 0;
10895
10896 }
10897
10898 _ACEOF
10899 if ac_fn_c_try_run "$LINENO"; then :
10900   ol_cv_pthread_mthreads=yes
10901 else
10902   ol_cv_pthread_mthreads=no
10903 fi
10904 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10905   conftest.$ac_objext conftest.beam conftest.$ac_ext
10906 fi
10907
10908
10909                 # restore the LIBS
10910                 LIBS="$ol_LIBS"
10911
10912 fi
10913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
10914 $as_echo "$ol_cv_pthread_mthreads" >&6; }
10915
10916         if test $ol_cv_pthread_mthreads = yes ; then
10917                 ol_link_pthreads="-mthreads"
10918                 ol_link_threads=posix
10919         fi
10920 fi
10921
10922                 # Pthread try link: -thread (ol_cv_pthread_thread)
10923 if test "$ol_link_threads" = no ; then
10924         # try -thread
10925         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
10926 $as_echo_n "checking for pthread link with -thread... " >&6; }
10927 if ${ol_cv_pthread_thread+:} false; then :
10928   $as_echo_n "(cached) " >&6
10929 else
10930
10931                 # save the flags
10932                 ol_LIBS="$LIBS"
10933                 LIBS="-thread $LIBS"
10934
10935                 if test "$cross_compiling" = yes; then :
10936   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10937 /* end confdefs.h.  */
10938
10939 /* pthread test headers */
10940 #include <pthread.h>
10941 #if HAVE_PTHREADS < 7
10942 #include <errno.h>
10943 #endif
10944 #ifndef NULL
10945 #define NULL (void*)0
10946 #endif
10947
10948 static void *task(p)
10949         void *p;
10950 {
10951         return (void *) (p == NULL);
10952 }
10953
10954 int
10955 main ()
10956 {
10957
10958         /* pthread test function */
10959 #ifndef PTHREAD_CREATE_DETACHED
10960 #define PTHREAD_CREATE_DETACHED 1
10961 #endif
10962         pthread_t t;
10963         int status;
10964         int detach = PTHREAD_CREATE_DETACHED;
10965
10966 #if HAVE_PTHREADS > 4
10967         /* Final pthreads */
10968         pthread_attr_t attr;
10969
10970         status = pthread_attr_init(&attr);
10971         if( status ) return status;
10972
10973 #if HAVE_PTHREADS < 7
10974         status = pthread_attr_setdetachstate(&attr, &detach);
10975         if( status < 0 ) status = errno;
10976 #else
10977         status = pthread_attr_setdetachstate(&attr, detach);
10978 #endif
10979         if( status ) return status;
10980         status = pthread_create( &t, &attr, task, NULL );
10981 #if HAVE_PTHREADS < 7
10982         if( status < 0 ) status = errno;
10983 #endif
10984         if( status ) return status;
10985 #else
10986         /* Draft 4 pthreads */
10987         status = pthread_create( &t, pthread_attr_default, task, NULL );
10988         if( status ) return errno;
10989
10990         /* give thread a chance to complete */
10991         /* it should remain joinable and hence detachable */
10992         sleep( 1 );
10993
10994         status = pthread_detach( &t );
10995         if( status ) return errno;
10996 #endif
10997
10998 #ifdef HAVE_LINUX_THREADS
10999         pthread_kill_other_threads_np();
11000 #endif
11001
11002         return 0;
11003
11004   ;
11005   return 0;
11006 }
11007 _ACEOF
11008 if ac_fn_c_try_link "$LINENO"; then :
11009   ol_cv_pthread_thread=yes
11010 else
11011   ol_cv_pthread_thread=no
11012 fi
11013 rm -f core conftest.err conftest.$ac_objext \
11014     conftest$ac_exeext conftest.$ac_ext
11015 else
11016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11017 /* end confdefs.h.  */
11018
11019
11020 /* pthread test headers */
11021 #include <pthread.h>
11022 #if HAVE_PTHREADS < 7
11023 #include <errno.h>
11024 #endif
11025 #ifndef NULL
11026 #define NULL (void*)0
11027 #endif
11028
11029 static void *task(p)
11030         void *p;
11031 {
11032         return (void *) (p == NULL);
11033 }
11034
11035
11036 int main(argc, argv)
11037         int argc;
11038         char **argv;
11039 {
11040
11041         /* pthread test function */
11042 #ifndef PTHREAD_CREATE_DETACHED
11043 #define PTHREAD_CREATE_DETACHED 1
11044 #endif
11045         pthread_t t;
11046         int status;
11047         int detach = PTHREAD_CREATE_DETACHED;
11048
11049 #if HAVE_PTHREADS > 4
11050         /* Final pthreads */
11051         pthread_attr_t attr;
11052
11053         status = pthread_attr_init(&attr);
11054         if( status ) return status;
11055
11056 #if HAVE_PTHREADS < 7
11057         status = pthread_attr_setdetachstate(&attr, &detach);
11058         if( status < 0 ) status = errno;
11059 #else
11060         status = pthread_attr_setdetachstate(&attr, detach);
11061 #endif
11062         if( status ) return status;
11063         status = pthread_create( &t, &attr, task, NULL );
11064 #if HAVE_PTHREADS < 7
11065         if( status < 0 ) status = errno;
11066 #endif
11067         if( status ) return status;
11068 #else
11069         /* Draft 4 pthreads */
11070         status = pthread_create( &t, pthread_attr_default, task, NULL );
11071         if( status ) return errno;
11072
11073         /* give thread a chance to complete */
11074         /* it should remain joinable and hence detachable */
11075         sleep( 1 );
11076
11077         status = pthread_detach( &t );
11078         if( status ) return errno;
11079 #endif
11080
11081 #ifdef HAVE_LINUX_THREADS
11082         pthread_kill_other_threads_np();
11083 #endif
11084
11085         return 0;
11086
11087 }
11088
11089 _ACEOF
11090 if ac_fn_c_try_run "$LINENO"; then :
11091   ol_cv_pthread_thread=yes
11092 else
11093   ol_cv_pthread_thread=no
11094 fi
11095 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11096   conftest.$ac_objext conftest.beam conftest.$ac_ext
11097 fi
11098
11099
11100                 # restore the LIBS
11101                 LIBS="$ol_LIBS"
11102
11103 fi
11104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
11105 $as_echo "$ol_cv_pthread_thread" >&6; }
11106
11107         if test $ol_cv_pthread_thread = yes ; then
11108                 ol_link_pthreads="-thread"
11109                 ol_link_threads=posix
11110         fi
11111 fi
11112
11113
11114                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
11115 if test "$ol_link_threads" = no ; then
11116         # try -lpthread -lmach -lexc -lc_r
11117         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
11118 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
11119 if ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+:} false; then :
11120   $as_echo_n "(cached) " >&6
11121 else
11122
11123                 # save the flags
11124                 ol_LIBS="$LIBS"
11125                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
11126
11127                 if test "$cross_compiling" = yes; then :
11128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11129 /* end confdefs.h.  */
11130
11131 /* pthread test headers */
11132 #include <pthread.h>
11133 #if HAVE_PTHREADS < 7
11134 #include <errno.h>
11135 #endif
11136 #ifndef NULL
11137 #define NULL (void*)0
11138 #endif
11139
11140 static void *task(p)
11141         void *p;
11142 {
11143         return (void *) (p == NULL);
11144 }
11145
11146 int
11147 main ()
11148 {
11149
11150         /* pthread test function */
11151 #ifndef PTHREAD_CREATE_DETACHED
11152 #define PTHREAD_CREATE_DETACHED 1
11153 #endif
11154         pthread_t t;
11155         int status;
11156         int detach = PTHREAD_CREATE_DETACHED;
11157
11158 #if HAVE_PTHREADS > 4
11159         /* Final pthreads */
11160         pthread_attr_t attr;
11161
11162         status = pthread_attr_init(&attr);
11163         if( status ) return status;
11164
11165 #if HAVE_PTHREADS < 7
11166         status = pthread_attr_setdetachstate(&attr, &detach);
11167         if( status < 0 ) status = errno;
11168 #else
11169         status = pthread_attr_setdetachstate(&attr, detach);
11170 #endif
11171         if( status ) return status;
11172         status = pthread_create( &t, &attr, task, NULL );
11173 #if HAVE_PTHREADS < 7
11174         if( status < 0 ) status = errno;
11175 #endif
11176         if( status ) return status;
11177 #else
11178         /* Draft 4 pthreads */
11179         status = pthread_create( &t, pthread_attr_default, task, NULL );
11180         if( status ) return errno;
11181
11182         /* give thread a chance to complete */
11183         /* it should remain joinable and hence detachable */
11184         sleep( 1 );
11185
11186         status = pthread_detach( &t );
11187         if( status ) return errno;
11188 #endif
11189
11190 #ifdef HAVE_LINUX_THREADS
11191         pthread_kill_other_threads_np();
11192 #endif
11193
11194         return 0;
11195
11196   ;
11197   return 0;
11198 }
11199 _ACEOF
11200 if ac_fn_c_try_link "$LINENO"; then :
11201   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
11202 else
11203   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
11204 fi
11205 rm -f core conftest.err conftest.$ac_objext \
11206     conftest$ac_exeext conftest.$ac_ext
11207 else
11208   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11209 /* end confdefs.h.  */
11210
11211
11212 /* pthread test headers */
11213 #include <pthread.h>
11214 #if HAVE_PTHREADS < 7
11215 #include <errno.h>
11216 #endif
11217 #ifndef NULL
11218 #define NULL (void*)0
11219 #endif
11220
11221 static void *task(p)
11222         void *p;
11223 {
11224         return (void *) (p == NULL);
11225 }
11226
11227
11228 int main(argc, argv)
11229         int argc;
11230         char **argv;
11231 {
11232
11233         /* pthread test function */
11234 #ifndef PTHREAD_CREATE_DETACHED
11235 #define PTHREAD_CREATE_DETACHED 1
11236 #endif
11237         pthread_t t;
11238         int status;
11239         int detach = PTHREAD_CREATE_DETACHED;
11240
11241 #if HAVE_PTHREADS > 4
11242         /* Final pthreads */
11243         pthread_attr_t attr;
11244
11245         status = pthread_attr_init(&attr);
11246         if( status ) return status;
11247
11248 #if HAVE_PTHREADS < 7
11249         status = pthread_attr_setdetachstate(&attr, &detach);
11250         if( status < 0 ) status = errno;
11251 #else
11252         status = pthread_attr_setdetachstate(&attr, detach);
11253 #endif
11254         if( status ) return status;
11255         status = pthread_create( &t, &attr, task, NULL );
11256 #if HAVE_PTHREADS < 7
11257         if( status < 0 ) status = errno;
11258 #endif
11259         if( status ) return status;
11260 #else
11261         /* Draft 4 pthreads */
11262         status = pthread_create( &t, pthread_attr_default, task, NULL );
11263         if( status ) return errno;
11264
11265         /* give thread a chance to complete */
11266         /* it should remain joinable and hence detachable */
11267         sleep( 1 );
11268
11269         status = pthread_detach( &t );
11270         if( status ) return errno;
11271 #endif
11272
11273 #ifdef HAVE_LINUX_THREADS
11274         pthread_kill_other_threads_np();
11275 #endif
11276
11277         return 0;
11278
11279 }
11280
11281 _ACEOF
11282 if ac_fn_c_try_run "$LINENO"; then :
11283   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
11284 else
11285   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
11286 fi
11287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11288   conftest.$ac_objext conftest.beam conftest.$ac_ext
11289 fi
11290
11291
11292                 # restore the LIBS
11293                 LIBS="$ol_LIBS"
11294
11295 fi
11296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
11297 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
11298
11299         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
11300                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
11301                 ol_link_threads=posix
11302         fi
11303 fi
11304
11305                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
11306 if test "$ol_link_threads" = no ; then
11307         # try -lpthread -lmach -lexc
11308         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
11309 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
11310 if ${ol_cv_pthread_lpthread_lmach_lexc+:} false; then :
11311   $as_echo_n "(cached) " >&6
11312 else
11313
11314                 # save the flags
11315                 ol_LIBS="$LIBS"
11316                 LIBS="-lpthread -lmach -lexc $LIBS"
11317
11318                 if test "$cross_compiling" = yes; then :
11319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11320 /* end confdefs.h.  */
11321
11322 /* pthread test headers */
11323 #include <pthread.h>
11324 #if HAVE_PTHREADS < 7
11325 #include <errno.h>
11326 #endif
11327 #ifndef NULL
11328 #define NULL (void*)0
11329 #endif
11330
11331 static void *task(p)
11332         void *p;
11333 {
11334         return (void *) (p == NULL);
11335 }
11336
11337 int
11338 main ()
11339 {
11340
11341         /* pthread test function */
11342 #ifndef PTHREAD_CREATE_DETACHED
11343 #define PTHREAD_CREATE_DETACHED 1
11344 #endif
11345         pthread_t t;
11346         int status;
11347         int detach = PTHREAD_CREATE_DETACHED;
11348
11349 #if HAVE_PTHREADS > 4
11350         /* Final pthreads */
11351         pthread_attr_t attr;
11352
11353         status = pthread_attr_init(&attr);
11354         if( status ) return status;
11355
11356 #if HAVE_PTHREADS < 7
11357         status = pthread_attr_setdetachstate(&attr, &detach);
11358         if( status < 0 ) status = errno;
11359 #else
11360         status = pthread_attr_setdetachstate(&attr, detach);
11361 #endif
11362         if( status ) return status;
11363         status = pthread_create( &t, &attr, task, NULL );
11364 #if HAVE_PTHREADS < 7
11365         if( status < 0 ) status = errno;
11366 #endif
11367         if( status ) return status;
11368 #else
11369         /* Draft 4 pthreads */
11370         status = pthread_create( &t, pthread_attr_default, task, NULL );
11371         if( status ) return errno;
11372
11373         /* give thread a chance to complete */
11374         /* it should remain joinable and hence detachable */
11375         sleep( 1 );
11376
11377         status = pthread_detach( &t );
11378         if( status ) return errno;
11379 #endif
11380
11381 #ifdef HAVE_LINUX_THREADS
11382         pthread_kill_other_threads_np();
11383 #endif
11384
11385         return 0;
11386
11387   ;
11388   return 0;
11389 }
11390 _ACEOF
11391 if ac_fn_c_try_link "$LINENO"; then :
11392   ol_cv_pthread_lpthread_lmach_lexc=yes
11393 else
11394   ol_cv_pthread_lpthread_lmach_lexc=no
11395 fi
11396 rm -f core conftest.err conftest.$ac_objext \
11397     conftest$ac_exeext conftest.$ac_ext
11398 else
11399   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11400 /* end confdefs.h.  */
11401
11402
11403 /* pthread test headers */
11404 #include <pthread.h>
11405 #if HAVE_PTHREADS < 7
11406 #include <errno.h>
11407 #endif
11408 #ifndef NULL
11409 #define NULL (void*)0
11410 #endif
11411
11412 static void *task(p)
11413         void *p;
11414 {
11415         return (void *) (p == NULL);
11416 }
11417
11418
11419 int main(argc, argv)
11420         int argc;
11421         char **argv;
11422 {
11423
11424         /* pthread test function */
11425 #ifndef PTHREAD_CREATE_DETACHED
11426 #define PTHREAD_CREATE_DETACHED 1
11427 #endif
11428         pthread_t t;
11429         int status;
11430         int detach = PTHREAD_CREATE_DETACHED;
11431
11432 #if HAVE_PTHREADS > 4
11433         /* Final pthreads */
11434         pthread_attr_t attr;
11435
11436         status = pthread_attr_init(&attr);
11437         if( status ) return status;
11438
11439 #if HAVE_PTHREADS < 7
11440         status = pthread_attr_setdetachstate(&attr, &detach);
11441         if( status < 0 ) status = errno;
11442 #else
11443         status = pthread_attr_setdetachstate(&attr, detach);
11444 #endif
11445         if( status ) return status;
11446         status = pthread_create( &t, &attr, task, NULL );
11447 #if HAVE_PTHREADS < 7
11448         if( status < 0 ) status = errno;
11449 #endif
11450         if( status ) return status;
11451 #else
11452         /* Draft 4 pthreads */
11453         status = pthread_create( &t, pthread_attr_default, task, NULL );
11454         if( status ) return errno;
11455
11456         /* give thread a chance to complete */
11457         /* it should remain joinable and hence detachable */
11458         sleep( 1 );
11459
11460         status = pthread_detach( &t );
11461         if( status ) return errno;
11462 #endif
11463
11464 #ifdef HAVE_LINUX_THREADS
11465         pthread_kill_other_threads_np();
11466 #endif
11467
11468         return 0;
11469
11470 }
11471
11472 _ACEOF
11473 if ac_fn_c_try_run "$LINENO"; then :
11474   ol_cv_pthread_lpthread_lmach_lexc=yes
11475 else
11476   ol_cv_pthread_lpthread_lmach_lexc=no
11477 fi
11478 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11479   conftest.$ac_objext conftest.beam conftest.$ac_ext
11480 fi
11481
11482
11483                 # restore the LIBS
11484                 LIBS="$ol_LIBS"
11485
11486 fi
11487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
11488 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
11489
11490         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
11491                 ol_link_pthreads="-lpthread -lmach -lexc"
11492                 ol_link_threads=posix
11493         fi
11494 fi
11495
11496
11497                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
11498 if test "$ol_link_threads" = no ; then
11499         # try -lpthread -Wl,-woff,85
11500         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
11501 $as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
11502 if ${ol_cv_pthread_lib_lpthread_woff+:} false; then :
11503   $as_echo_n "(cached) " >&6
11504 else
11505
11506                 # save the flags
11507                 ol_LIBS="$LIBS"
11508                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
11509
11510                 if test "$cross_compiling" = yes; then :
11511   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11512 /* end confdefs.h.  */
11513
11514 /* pthread test headers */
11515 #include <pthread.h>
11516 #if HAVE_PTHREADS < 7
11517 #include <errno.h>
11518 #endif
11519 #ifndef NULL
11520 #define NULL (void*)0
11521 #endif
11522
11523 static void *task(p)
11524         void *p;
11525 {
11526         return (void *) (p == NULL);
11527 }
11528
11529 int
11530 main ()
11531 {
11532
11533         /* pthread test function */
11534 #ifndef PTHREAD_CREATE_DETACHED
11535 #define PTHREAD_CREATE_DETACHED 1
11536 #endif
11537         pthread_t t;
11538         int status;
11539         int detach = PTHREAD_CREATE_DETACHED;
11540
11541 #if HAVE_PTHREADS > 4
11542         /* Final pthreads */
11543         pthread_attr_t attr;
11544
11545         status = pthread_attr_init(&attr);
11546         if( status ) return status;
11547
11548 #if HAVE_PTHREADS < 7
11549         status = pthread_attr_setdetachstate(&attr, &detach);
11550         if( status < 0 ) status = errno;
11551 #else
11552         status = pthread_attr_setdetachstate(&attr, detach);
11553 #endif
11554         if( status ) return status;
11555         status = pthread_create( &t, &attr, task, NULL );
11556 #if HAVE_PTHREADS < 7
11557         if( status < 0 ) status = errno;
11558 #endif
11559         if( status ) return status;
11560 #else
11561         /* Draft 4 pthreads */
11562         status = pthread_create( &t, pthread_attr_default, task, NULL );
11563         if( status ) return errno;
11564
11565         /* give thread a chance to complete */
11566         /* it should remain joinable and hence detachable */
11567         sleep( 1 );
11568
11569         status = pthread_detach( &t );
11570         if( status ) return errno;
11571 #endif
11572
11573 #ifdef HAVE_LINUX_THREADS
11574         pthread_kill_other_threads_np();
11575 #endif
11576
11577         return 0;
11578
11579   ;
11580   return 0;
11581 }
11582 _ACEOF
11583 if ac_fn_c_try_link "$LINENO"; then :
11584   ol_cv_pthread_lib_lpthread_woff=yes
11585 else
11586   ol_cv_pthread_lib_lpthread_woff=no
11587 fi
11588 rm -f core conftest.err conftest.$ac_objext \
11589     conftest$ac_exeext conftest.$ac_ext
11590 else
11591   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11592 /* end confdefs.h.  */
11593
11594
11595 /* pthread test headers */
11596 #include <pthread.h>
11597 #if HAVE_PTHREADS < 7
11598 #include <errno.h>
11599 #endif
11600 #ifndef NULL
11601 #define NULL (void*)0
11602 #endif
11603
11604 static void *task(p)
11605         void *p;
11606 {
11607         return (void *) (p == NULL);
11608 }
11609
11610
11611 int main(argc, argv)
11612         int argc;
11613         char **argv;
11614 {
11615
11616         /* pthread test function */
11617 #ifndef PTHREAD_CREATE_DETACHED
11618 #define PTHREAD_CREATE_DETACHED 1
11619 #endif
11620         pthread_t t;
11621         int status;
11622         int detach = PTHREAD_CREATE_DETACHED;
11623
11624 #if HAVE_PTHREADS > 4
11625         /* Final pthreads */
11626         pthread_attr_t attr;
11627
11628         status = pthread_attr_init(&attr);
11629         if( status ) return status;
11630
11631 #if HAVE_PTHREADS < 7
11632         status = pthread_attr_setdetachstate(&attr, &detach);
11633         if( status < 0 ) status = errno;
11634 #else
11635         status = pthread_attr_setdetachstate(&attr, detach);
11636 #endif
11637         if( status ) return status;
11638         status = pthread_create( &t, &attr, task, NULL );
11639 #if HAVE_PTHREADS < 7
11640         if( status < 0 ) status = errno;
11641 #endif
11642         if( status ) return status;
11643 #else
11644         /* Draft 4 pthreads */
11645         status = pthread_create( &t, pthread_attr_default, task, NULL );
11646         if( status ) return errno;
11647
11648         /* give thread a chance to complete */
11649         /* it should remain joinable and hence detachable */
11650         sleep( 1 );
11651
11652         status = pthread_detach( &t );
11653         if( status ) return errno;
11654 #endif
11655
11656 #ifdef HAVE_LINUX_THREADS
11657         pthread_kill_other_threads_np();
11658 #endif
11659
11660         return 0;
11661
11662 }
11663
11664 _ACEOF
11665 if ac_fn_c_try_run "$LINENO"; then :
11666   ol_cv_pthread_lib_lpthread_woff=yes
11667 else
11668   ol_cv_pthread_lib_lpthread_woff=no
11669 fi
11670 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11671   conftest.$ac_objext conftest.beam conftest.$ac_ext
11672 fi
11673
11674
11675                 # restore the LIBS
11676                 LIBS="$ol_LIBS"
11677
11678 fi
11679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
11680 $as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
11681
11682         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
11683                 ol_link_pthreads="-lpthread -Wl,-woff,85"
11684                 ol_link_threads=posix
11685         fi
11686 fi
11687
11688
11689                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
11690 if test "$ol_link_threads" = no ; then
11691         # try -lpthread
11692         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
11693 $as_echo_n "checking for pthread link with -lpthread... " >&6; }
11694 if ${ol_cv_pthread_lpthread+:} false; then :
11695   $as_echo_n "(cached) " >&6
11696 else
11697
11698                 # save the flags
11699                 ol_LIBS="$LIBS"
11700                 LIBS="-lpthread $LIBS"
11701
11702                 if test "$cross_compiling" = yes; then :
11703   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11704 /* end confdefs.h.  */
11705
11706 /* pthread test headers */
11707 #include <pthread.h>
11708 #if HAVE_PTHREADS < 7
11709 #include <errno.h>
11710 #endif
11711 #ifndef NULL
11712 #define NULL (void*)0
11713 #endif
11714
11715 static void *task(p)
11716         void *p;
11717 {
11718         return (void *) (p == NULL);
11719 }
11720
11721 int
11722 main ()
11723 {
11724
11725         /* pthread test function */
11726 #ifndef PTHREAD_CREATE_DETACHED
11727 #define PTHREAD_CREATE_DETACHED 1
11728 #endif
11729         pthread_t t;
11730         int status;
11731         int detach = PTHREAD_CREATE_DETACHED;
11732
11733 #if HAVE_PTHREADS > 4
11734         /* Final pthreads */
11735         pthread_attr_t attr;
11736
11737         status = pthread_attr_init(&attr);
11738         if( status ) return status;
11739
11740 #if HAVE_PTHREADS < 7
11741         status = pthread_attr_setdetachstate(&attr, &detach);
11742         if( status < 0 ) status = errno;
11743 #else
11744         status = pthread_attr_setdetachstate(&attr, detach);
11745 #endif
11746         if( status ) return status;
11747         status = pthread_create( &t, &attr, task, NULL );
11748 #if HAVE_PTHREADS < 7
11749         if( status < 0 ) status = errno;
11750 #endif
11751         if( status ) return status;
11752 #else
11753         /* Draft 4 pthreads */
11754         status = pthread_create( &t, pthread_attr_default, task, NULL );
11755         if( status ) return errno;
11756
11757         /* give thread a chance to complete */
11758         /* it should remain joinable and hence detachable */
11759         sleep( 1 );
11760
11761         status = pthread_detach( &t );
11762         if( status ) return errno;
11763 #endif
11764
11765 #ifdef HAVE_LINUX_THREADS
11766         pthread_kill_other_threads_np();
11767 #endif
11768
11769         return 0;
11770
11771   ;
11772   return 0;
11773 }
11774 _ACEOF
11775 if ac_fn_c_try_link "$LINENO"; then :
11776   ol_cv_pthread_lpthread=yes
11777 else
11778   ol_cv_pthread_lpthread=no
11779 fi
11780 rm -f core conftest.err conftest.$ac_objext \
11781     conftest$ac_exeext conftest.$ac_ext
11782 else
11783   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11784 /* end confdefs.h.  */
11785
11786
11787 /* pthread test headers */
11788 #include <pthread.h>
11789 #if HAVE_PTHREADS < 7
11790 #include <errno.h>
11791 #endif
11792 #ifndef NULL
11793 #define NULL (void*)0
11794 #endif
11795
11796 static void *task(p)
11797         void *p;
11798 {
11799         return (void *) (p == NULL);
11800 }
11801
11802
11803 int main(argc, argv)
11804         int argc;
11805         char **argv;
11806 {
11807
11808         /* pthread test function */
11809 #ifndef PTHREAD_CREATE_DETACHED
11810 #define PTHREAD_CREATE_DETACHED 1
11811 #endif
11812         pthread_t t;
11813         int status;
11814         int detach = PTHREAD_CREATE_DETACHED;
11815
11816 #if HAVE_PTHREADS > 4
11817         /* Final pthreads */
11818         pthread_attr_t attr;
11819
11820         status = pthread_attr_init(&attr);
11821         if( status ) return status;
11822
11823 #if HAVE_PTHREADS < 7
11824         status = pthread_attr_setdetachstate(&attr, &detach);
11825         if( status < 0 ) status = errno;
11826 #else
11827         status = pthread_attr_setdetachstate(&attr, detach);
11828 #endif
11829         if( status ) return status;
11830         status = pthread_create( &t, &attr, task, NULL );
11831 #if HAVE_PTHREADS < 7
11832         if( status < 0 ) status = errno;
11833 #endif
11834         if( status ) return status;
11835 #else
11836         /* Draft 4 pthreads */
11837         status = pthread_create( &t, pthread_attr_default, task, NULL );
11838         if( status ) return errno;
11839
11840         /* give thread a chance to complete */
11841         /* it should remain joinable and hence detachable */
11842         sleep( 1 );
11843
11844         status = pthread_detach( &t );
11845         if( status ) return errno;
11846 #endif
11847
11848 #ifdef HAVE_LINUX_THREADS
11849         pthread_kill_other_threads_np();
11850 #endif
11851
11852         return 0;
11853
11854 }
11855
11856 _ACEOF
11857 if ac_fn_c_try_run "$LINENO"; then :
11858   ol_cv_pthread_lpthread=yes
11859 else
11860   ol_cv_pthread_lpthread=no
11861 fi
11862 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11863   conftest.$ac_objext conftest.beam conftest.$ac_ext
11864 fi
11865
11866
11867                 # restore the LIBS
11868                 LIBS="$ol_LIBS"
11869
11870 fi
11871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
11872 $as_echo "$ol_cv_pthread_lpthread" >&6; }
11873
11874         if test $ol_cv_pthread_lpthread = yes ; then
11875                 ol_link_pthreads="-lpthread"
11876                 ol_link_threads=posix
11877         fi
11878 fi
11879
11880                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
11881 if test "$ol_link_threads" = no ; then
11882         # try -lc_r
11883         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
11884 $as_echo_n "checking for pthread link with -lc_r... " >&6; }
11885 if ${ol_cv_pthread_lc_r+:} false; then :
11886   $as_echo_n "(cached) " >&6
11887 else
11888
11889                 # save the flags
11890                 ol_LIBS="$LIBS"
11891                 LIBS="-lc_r $LIBS"
11892
11893                 if test "$cross_compiling" = yes; then :
11894   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11895 /* end confdefs.h.  */
11896
11897 /* pthread test headers */
11898 #include <pthread.h>
11899 #if HAVE_PTHREADS < 7
11900 #include <errno.h>
11901 #endif
11902 #ifndef NULL
11903 #define NULL (void*)0
11904 #endif
11905
11906 static void *task(p)
11907         void *p;
11908 {
11909         return (void *) (p == NULL);
11910 }
11911
11912 int
11913 main ()
11914 {
11915
11916         /* pthread test function */
11917 #ifndef PTHREAD_CREATE_DETACHED
11918 #define PTHREAD_CREATE_DETACHED 1
11919 #endif
11920         pthread_t t;
11921         int status;
11922         int detach = PTHREAD_CREATE_DETACHED;
11923
11924 #if HAVE_PTHREADS > 4
11925         /* Final pthreads */
11926         pthread_attr_t attr;
11927
11928         status = pthread_attr_init(&attr);
11929         if( status ) return status;
11930
11931 #if HAVE_PTHREADS < 7
11932         status = pthread_attr_setdetachstate(&attr, &detach);
11933         if( status < 0 ) status = errno;
11934 #else
11935         status = pthread_attr_setdetachstate(&attr, detach);
11936 #endif
11937         if( status ) return status;
11938         status = pthread_create( &t, &attr, task, NULL );
11939 #if HAVE_PTHREADS < 7
11940         if( status < 0 ) status = errno;
11941 #endif
11942         if( status ) return status;
11943 #else
11944         /* Draft 4 pthreads */
11945         status = pthread_create( &t, pthread_attr_default, task, NULL );
11946         if( status ) return errno;
11947
11948         /* give thread a chance to complete */
11949         /* it should remain joinable and hence detachable */
11950         sleep( 1 );
11951
11952         status = pthread_detach( &t );
11953         if( status ) return errno;
11954 #endif
11955
11956 #ifdef HAVE_LINUX_THREADS
11957         pthread_kill_other_threads_np();
11958 #endif
11959
11960         return 0;
11961
11962   ;
11963   return 0;
11964 }
11965 _ACEOF
11966 if ac_fn_c_try_link "$LINENO"; then :
11967   ol_cv_pthread_lc_r=yes
11968 else
11969   ol_cv_pthread_lc_r=no
11970 fi
11971 rm -f core conftest.err conftest.$ac_objext \
11972     conftest$ac_exeext conftest.$ac_ext
11973 else
11974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11975 /* end confdefs.h.  */
11976
11977
11978 /* pthread test headers */
11979 #include <pthread.h>
11980 #if HAVE_PTHREADS < 7
11981 #include <errno.h>
11982 #endif
11983 #ifndef NULL
11984 #define NULL (void*)0
11985 #endif
11986
11987 static void *task(p)
11988         void *p;
11989 {
11990         return (void *) (p == NULL);
11991 }
11992
11993
11994 int main(argc, argv)
11995         int argc;
11996         char **argv;
11997 {
11998
11999         /* pthread test function */
12000 #ifndef PTHREAD_CREATE_DETACHED
12001 #define PTHREAD_CREATE_DETACHED 1
12002 #endif
12003         pthread_t t;
12004         int status;
12005         int detach = PTHREAD_CREATE_DETACHED;
12006
12007 #if HAVE_PTHREADS > 4
12008         /* Final pthreads */
12009         pthread_attr_t attr;
12010
12011         status = pthread_attr_init(&attr);
12012         if( status ) return status;
12013
12014 #if HAVE_PTHREADS < 7
12015         status = pthread_attr_setdetachstate(&attr, &detach);
12016         if( status < 0 ) status = errno;
12017 #else
12018         status = pthread_attr_setdetachstate(&attr, detach);
12019 #endif
12020         if( status ) return status;
12021         status = pthread_create( &t, &attr, task, NULL );
12022 #if HAVE_PTHREADS < 7
12023         if( status < 0 ) status = errno;
12024 #endif
12025         if( status ) return status;
12026 #else
12027         /* Draft 4 pthreads */
12028         status = pthread_create( &t, pthread_attr_default, task, NULL );
12029         if( status ) return errno;
12030
12031         /* give thread a chance to complete */
12032         /* it should remain joinable and hence detachable */
12033         sleep( 1 );
12034
12035         status = pthread_detach( &t );
12036         if( status ) return errno;
12037 #endif
12038
12039 #ifdef HAVE_LINUX_THREADS
12040         pthread_kill_other_threads_np();
12041 #endif
12042
12043         return 0;
12044
12045 }
12046
12047 _ACEOF
12048 if ac_fn_c_try_run "$LINENO"; then :
12049   ol_cv_pthread_lc_r=yes
12050 else
12051   ol_cv_pthread_lc_r=no
12052 fi
12053 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12054   conftest.$ac_objext conftest.beam conftest.$ac_ext
12055 fi
12056
12057
12058                 # restore the LIBS
12059                 LIBS="$ol_LIBS"
12060
12061 fi
12062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
12063 $as_echo "$ol_cv_pthread_lc_r" >&6; }
12064
12065         if test $ol_cv_pthread_lc_r = yes ; then
12066                 ol_link_pthreads="-lc_r"
12067                 ol_link_threads=posix
12068         fi
12069 fi
12070
12071
12072                 # Pthread try link: -threads (ol_cv_pthread_threads)
12073 if test "$ol_link_threads" = no ; then
12074         # try -threads
12075         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
12076 $as_echo_n "checking for pthread link with -threads... " >&6; }
12077 if ${ol_cv_pthread_threads+:} false; then :
12078   $as_echo_n "(cached) " >&6
12079 else
12080
12081                 # save the flags
12082                 ol_LIBS="$LIBS"
12083                 LIBS="-threads $LIBS"
12084
12085                 if test "$cross_compiling" = yes; then :
12086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12087 /* end confdefs.h.  */
12088
12089 /* pthread test headers */
12090 #include <pthread.h>
12091 #if HAVE_PTHREADS < 7
12092 #include <errno.h>
12093 #endif
12094 #ifndef NULL
12095 #define NULL (void*)0
12096 #endif
12097
12098 static void *task(p)
12099         void *p;
12100 {
12101         return (void *) (p == NULL);
12102 }
12103
12104 int
12105 main ()
12106 {
12107
12108         /* pthread test function */
12109 #ifndef PTHREAD_CREATE_DETACHED
12110 #define PTHREAD_CREATE_DETACHED 1
12111 #endif
12112         pthread_t t;
12113         int status;
12114         int detach = PTHREAD_CREATE_DETACHED;
12115
12116 #if HAVE_PTHREADS > 4
12117         /* Final pthreads */
12118         pthread_attr_t attr;
12119
12120         status = pthread_attr_init(&attr);
12121         if( status ) return status;
12122
12123 #if HAVE_PTHREADS < 7
12124         status = pthread_attr_setdetachstate(&attr, &detach);
12125         if( status < 0 ) status = errno;
12126 #else
12127         status = pthread_attr_setdetachstate(&attr, detach);
12128 #endif
12129         if( status ) return status;
12130         status = pthread_create( &t, &attr, task, NULL );
12131 #if HAVE_PTHREADS < 7
12132         if( status < 0 ) status = errno;
12133 #endif
12134         if( status ) return status;
12135 #else
12136         /* Draft 4 pthreads */
12137         status = pthread_create( &t, pthread_attr_default, task, NULL );
12138         if( status ) return errno;
12139
12140         /* give thread a chance to complete */
12141         /* it should remain joinable and hence detachable */
12142         sleep( 1 );
12143
12144         status = pthread_detach( &t );
12145         if( status ) return errno;
12146 #endif
12147
12148 #ifdef HAVE_LINUX_THREADS
12149         pthread_kill_other_threads_np();
12150 #endif
12151
12152         return 0;
12153
12154   ;
12155   return 0;
12156 }
12157 _ACEOF
12158 if ac_fn_c_try_link "$LINENO"; then :
12159   ol_cv_pthread_threads=yes
12160 else
12161   ol_cv_pthread_threads=no
12162 fi
12163 rm -f core conftest.err conftest.$ac_objext \
12164     conftest$ac_exeext conftest.$ac_ext
12165 else
12166   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12167 /* end confdefs.h.  */
12168
12169
12170 /* pthread test headers */
12171 #include <pthread.h>
12172 #if HAVE_PTHREADS < 7
12173 #include <errno.h>
12174 #endif
12175 #ifndef NULL
12176 #define NULL (void*)0
12177 #endif
12178
12179 static void *task(p)
12180         void *p;
12181 {
12182         return (void *) (p == NULL);
12183 }
12184
12185
12186 int main(argc, argv)
12187         int argc;
12188         char **argv;
12189 {
12190
12191         /* pthread test function */
12192 #ifndef PTHREAD_CREATE_DETACHED
12193 #define PTHREAD_CREATE_DETACHED 1
12194 #endif
12195         pthread_t t;
12196         int status;
12197         int detach = PTHREAD_CREATE_DETACHED;
12198
12199 #if HAVE_PTHREADS > 4
12200         /* Final pthreads */
12201         pthread_attr_t attr;
12202
12203         status = pthread_attr_init(&attr);
12204         if( status ) return status;
12205
12206 #if HAVE_PTHREADS < 7
12207         status = pthread_attr_setdetachstate(&attr, &detach);
12208         if( status < 0 ) status = errno;
12209 #else
12210         status = pthread_attr_setdetachstate(&attr, detach);
12211 #endif
12212         if( status ) return status;
12213         status = pthread_create( &t, &attr, task, NULL );
12214 #if HAVE_PTHREADS < 7
12215         if( status < 0 ) status = errno;
12216 #endif
12217         if( status ) return status;
12218 #else
12219         /* Draft 4 pthreads */
12220         status = pthread_create( &t, pthread_attr_default, task, NULL );
12221         if( status ) return errno;
12222
12223         /* give thread a chance to complete */
12224         /* it should remain joinable and hence detachable */
12225         sleep( 1 );
12226
12227         status = pthread_detach( &t );
12228         if( status ) return errno;
12229 #endif
12230
12231 #ifdef HAVE_LINUX_THREADS
12232         pthread_kill_other_threads_np();
12233 #endif
12234
12235         return 0;
12236
12237 }
12238
12239 _ACEOF
12240 if ac_fn_c_try_run "$LINENO"; then :
12241   ol_cv_pthread_threads=yes
12242 else
12243   ol_cv_pthread_threads=no
12244 fi
12245 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12246   conftest.$ac_objext conftest.beam conftest.$ac_ext
12247 fi
12248
12249
12250                 # restore the LIBS
12251                 LIBS="$ol_LIBS"
12252
12253 fi
12254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
12255 $as_echo "$ol_cv_pthread_threads" >&6; }
12256
12257         if test $ol_cv_pthread_threads = yes ; then
12258                 ol_link_pthreads="-threads"
12259                 ol_link_threads=posix
12260         fi
12261 fi
12262
12263
12264                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
12265 if test "$ol_link_threads" = no ; then
12266         # try -lpthreads -lmach -lexc -lc_r
12267         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
12268 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
12269 if ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+:} false; then :
12270   $as_echo_n "(cached) " >&6
12271 else
12272
12273                 # save the flags
12274                 ol_LIBS="$LIBS"
12275                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
12276
12277                 if test "$cross_compiling" = yes; then :
12278   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12279 /* end confdefs.h.  */
12280
12281 /* pthread test headers */
12282 #include <pthread.h>
12283 #if HAVE_PTHREADS < 7
12284 #include <errno.h>
12285 #endif
12286 #ifndef NULL
12287 #define NULL (void*)0
12288 #endif
12289
12290 static void *task(p)
12291         void *p;
12292 {
12293         return (void *) (p == NULL);
12294 }
12295
12296 int
12297 main ()
12298 {
12299
12300         /* pthread test function */
12301 #ifndef PTHREAD_CREATE_DETACHED
12302 #define PTHREAD_CREATE_DETACHED 1
12303 #endif
12304         pthread_t t;
12305         int status;
12306         int detach = PTHREAD_CREATE_DETACHED;
12307
12308 #if HAVE_PTHREADS > 4
12309         /* Final pthreads */
12310         pthread_attr_t attr;
12311
12312         status = pthread_attr_init(&attr);
12313         if( status ) return status;
12314
12315 #if HAVE_PTHREADS < 7
12316         status = pthread_attr_setdetachstate(&attr, &detach);
12317         if( status < 0 ) status = errno;
12318 #else
12319         status = pthread_attr_setdetachstate(&attr, detach);
12320 #endif
12321         if( status ) return status;
12322         status = pthread_create( &t, &attr, task, NULL );
12323 #if HAVE_PTHREADS < 7
12324         if( status < 0 ) status = errno;
12325 #endif
12326         if( status ) return status;
12327 #else
12328         /* Draft 4 pthreads */
12329         status = pthread_create( &t, pthread_attr_default, task, NULL );
12330         if( status ) return errno;
12331
12332         /* give thread a chance to complete */
12333         /* it should remain joinable and hence detachable */
12334         sleep( 1 );
12335
12336         status = pthread_detach( &t );
12337         if( status ) return errno;
12338 #endif
12339
12340 #ifdef HAVE_LINUX_THREADS
12341         pthread_kill_other_threads_np();
12342 #endif
12343
12344         return 0;
12345
12346   ;
12347   return 0;
12348 }
12349 _ACEOF
12350 if ac_fn_c_try_link "$LINENO"; then :
12351   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
12352 else
12353   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
12354 fi
12355 rm -f core conftest.err conftest.$ac_objext \
12356     conftest$ac_exeext conftest.$ac_ext
12357 else
12358   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12359 /* end confdefs.h.  */
12360
12361
12362 /* pthread test headers */
12363 #include <pthread.h>
12364 #if HAVE_PTHREADS < 7
12365 #include <errno.h>
12366 #endif
12367 #ifndef NULL
12368 #define NULL (void*)0
12369 #endif
12370
12371 static void *task(p)
12372         void *p;
12373 {
12374         return (void *) (p == NULL);
12375 }
12376
12377
12378 int main(argc, argv)
12379         int argc;
12380         char **argv;
12381 {
12382
12383         /* pthread test function */
12384 #ifndef PTHREAD_CREATE_DETACHED
12385 #define PTHREAD_CREATE_DETACHED 1
12386 #endif
12387         pthread_t t;
12388         int status;
12389         int detach = PTHREAD_CREATE_DETACHED;
12390
12391 #if HAVE_PTHREADS > 4
12392         /* Final pthreads */
12393         pthread_attr_t attr;
12394
12395         status = pthread_attr_init(&attr);
12396         if( status ) return status;
12397
12398 #if HAVE_PTHREADS < 7
12399         status = pthread_attr_setdetachstate(&attr, &detach);
12400         if( status < 0 ) status = errno;
12401 #else
12402         status = pthread_attr_setdetachstate(&attr, detach);
12403 #endif
12404         if( status ) return status;
12405         status = pthread_create( &t, &attr, task, NULL );
12406 #if HAVE_PTHREADS < 7
12407         if( status < 0 ) status = errno;
12408 #endif
12409         if( status ) return status;
12410 #else
12411         /* Draft 4 pthreads */
12412         status = pthread_create( &t, pthread_attr_default, task, NULL );
12413         if( status ) return errno;
12414
12415         /* give thread a chance to complete */
12416         /* it should remain joinable and hence detachable */
12417         sleep( 1 );
12418
12419         status = pthread_detach( &t );
12420         if( status ) return errno;
12421 #endif
12422
12423 #ifdef HAVE_LINUX_THREADS
12424         pthread_kill_other_threads_np();
12425 #endif
12426
12427         return 0;
12428
12429 }
12430
12431 _ACEOF
12432 if ac_fn_c_try_run "$LINENO"; then :
12433   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
12434 else
12435   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
12436 fi
12437 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12438   conftest.$ac_objext conftest.beam conftest.$ac_ext
12439 fi
12440
12441
12442                 # restore the LIBS
12443                 LIBS="$ol_LIBS"
12444
12445 fi
12446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
12447 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
12448
12449         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
12450                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
12451                 ol_link_threads=posix
12452         fi
12453 fi
12454
12455                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
12456 if test "$ol_link_threads" = no ; then
12457         # try -lpthreads -lmach -lexc
12458         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
12459 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
12460 if ${ol_cv_pthread_lpthreads_lmach_lexc+:} false; then :
12461   $as_echo_n "(cached) " >&6
12462 else
12463
12464                 # save the flags
12465                 ol_LIBS="$LIBS"
12466                 LIBS="-lpthreads -lmach -lexc $LIBS"
12467
12468                 if test "$cross_compiling" = yes; then :
12469   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12470 /* end confdefs.h.  */
12471
12472 /* pthread test headers */
12473 #include <pthread.h>
12474 #if HAVE_PTHREADS < 7
12475 #include <errno.h>
12476 #endif
12477 #ifndef NULL
12478 #define NULL (void*)0
12479 #endif
12480
12481 static void *task(p)
12482         void *p;
12483 {
12484         return (void *) (p == NULL);
12485 }
12486
12487 int
12488 main ()
12489 {
12490
12491         /* pthread test function */
12492 #ifndef PTHREAD_CREATE_DETACHED
12493 #define PTHREAD_CREATE_DETACHED 1
12494 #endif
12495         pthread_t t;
12496         int status;
12497         int detach = PTHREAD_CREATE_DETACHED;
12498
12499 #if HAVE_PTHREADS > 4
12500         /* Final pthreads */
12501         pthread_attr_t attr;
12502
12503         status = pthread_attr_init(&attr);
12504         if( status ) return status;
12505
12506 #if HAVE_PTHREADS < 7
12507         status = pthread_attr_setdetachstate(&attr, &detach);
12508         if( status < 0 ) status = errno;
12509 #else
12510         status = pthread_attr_setdetachstate(&attr, detach);
12511 #endif
12512         if( status ) return status;
12513         status = pthread_create( &t, &attr, task, NULL );
12514 #if HAVE_PTHREADS < 7
12515         if( status < 0 ) status = errno;
12516 #endif
12517         if( status ) return status;
12518 #else
12519         /* Draft 4 pthreads */
12520         status = pthread_create( &t, pthread_attr_default, task, NULL );
12521         if( status ) return errno;
12522
12523         /* give thread a chance to complete */
12524         /* it should remain joinable and hence detachable */
12525         sleep( 1 );
12526
12527         status = pthread_detach( &t );
12528         if( status ) return errno;
12529 #endif
12530
12531 #ifdef HAVE_LINUX_THREADS
12532         pthread_kill_other_threads_np();
12533 #endif
12534
12535         return 0;
12536
12537   ;
12538   return 0;
12539 }
12540 _ACEOF
12541 if ac_fn_c_try_link "$LINENO"; then :
12542   ol_cv_pthread_lpthreads_lmach_lexc=yes
12543 else
12544   ol_cv_pthread_lpthreads_lmach_lexc=no
12545 fi
12546 rm -f core conftest.err conftest.$ac_objext \
12547     conftest$ac_exeext conftest.$ac_ext
12548 else
12549   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12550 /* end confdefs.h.  */
12551
12552
12553 /* pthread test headers */
12554 #include <pthread.h>
12555 #if HAVE_PTHREADS < 7
12556 #include <errno.h>
12557 #endif
12558 #ifndef NULL
12559 #define NULL (void*)0
12560 #endif
12561
12562 static void *task(p)
12563         void *p;
12564 {
12565         return (void *) (p == NULL);
12566 }
12567
12568
12569 int main(argc, argv)
12570         int argc;
12571         char **argv;
12572 {
12573
12574         /* pthread test function */
12575 #ifndef PTHREAD_CREATE_DETACHED
12576 #define PTHREAD_CREATE_DETACHED 1
12577 #endif
12578         pthread_t t;
12579         int status;
12580         int detach = PTHREAD_CREATE_DETACHED;
12581
12582 #if HAVE_PTHREADS > 4
12583         /* Final pthreads */
12584         pthread_attr_t attr;
12585
12586         status = pthread_attr_init(&attr);
12587         if( status ) return status;
12588
12589 #if HAVE_PTHREADS < 7
12590         status = pthread_attr_setdetachstate(&attr, &detach);
12591         if( status < 0 ) status = errno;
12592 #else
12593         status = pthread_attr_setdetachstate(&attr, detach);
12594 #endif
12595         if( status ) return status;
12596         status = pthread_create( &t, &attr, task, NULL );
12597 #if HAVE_PTHREADS < 7
12598         if( status < 0 ) status = errno;
12599 #endif
12600         if( status ) return status;
12601 #else
12602         /* Draft 4 pthreads */
12603         status = pthread_create( &t, pthread_attr_default, task, NULL );
12604         if( status ) return errno;
12605
12606         /* give thread a chance to complete */
12607         /* it should remain joinable and hence detachable */
12608         sleep( 1 );
12609
12610         status = pthread_detach( &t );
12611         if( status ) return errno;
12612 #endif
12613
12614 #ifdef HAVE_LINUX_THREADS
12615         pthread_kill_other_threads_np();
12616 #endif
12617
12618         return 0;
12619
12620 }
12621
12622 _ACEOF
12623 if ac_fn_c_try_run "$LINENO"; then :
12624   ol_cv_pthread_lpthreads_lmach_lexc=yes
12625 else
12626   ol_cv_pthread_lpthreads_lmach_lexc=no
12627 fi
12628 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12629   conftest.$ac_objext conftest.beam conftest.$ac_ext
12630 fi
12631
12632
12633                 # restore the LIBS
12634                 LIBS="$ol_LIBS"
12635
12636 fi
12637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
12638 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
12639
12640         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
12641                 ol_link_pthreads="-lpthreads -lmach -lexc"
12642                 ol_link_threads=posix
12643         fi
12644 fi
12645
12646                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
12647 if test "$ol_link_threads" = no ; then
12648         # try -lpthreads -lexc
12649         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
12650 $as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
12651 if ${ol_cv_pthread_lpthreads_lexc+:} false; then :
12652   $as_echo_n "(cached) " >&6
12653 else
12654
12655                 # save the flags
12656                 ol_LIBS="$LIBS"
12657                 LIBS="-lpthreads -lexc $LIBS"
12658
12659                 if test "$cross_compiling" = yes; then :
12660   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12661 /* end confdefs.h.  */
12662
12663 /* pthread test headers */
12664 #include <pthread.h>
12665 #if HAVE_PTHREADS < 7
12666 #include <errno.h>
12667 #endif
12668 #ifndef NULL
12669 #define NULL (void*)0
12670 #endif
12671
12672 static void *task(p)
12673         void *p;
12674 {
12675         return (void *) (p == NULL);
12676 }
12677
12678 int
12679 main ()
12680 {
12681
12682         /* pthread test function */
12683 #ifndef PTHREAD_CREATE_DETACHED
12684 #define PTHREAD_CREATE_DETACHED 1
12685 #endif
12686         pthread_t t;
12687         int status;
12688         int detach = PTHREAD_CREATE_DETACHED;
12689
12690 #if HAVE_PTHREADS > 4
12691         /* Final pthreads */
12692         pthread_attr_t attr;
12693
12694         status = pthread_attr_init(&attr);
12695         if( status ) return status;
12696
12697 #if HAVE_PTHREADS < 7
12698         status = pthread_attr_setdetachstate(&attr, &detach);
12699         if( status < 0 ) status = errno;
12700 #else
12701         status = pthread_attr_setdetachstate(&attr, detach);
12702 #endif
12703         if( status ) return status;
12704         status = pthread_create( &t, &attr, task, NULL );
12705 #if HAVE_PTHREADS < 7
12706         if( status < 0 ) status = errno;
12707 #endif
12708         if( status ) return status;
12709 #else
12710         /* Draft 4 pthreads */
12711         status = pthread_create( &t, pthread_attr_default, task, NULL );
12712         if( status ) return errno;
12713
12714         /* give thread a chance to complete */
12715         /* it should remain joinable and hence detachable */
12716         sleep( 1 );
12717
12718         status = pthread_detach( &t );
12719         if( status ) return errno;
12720 #endif
12721
12722 #ifdef HAVE_LINUX_THREADS
12723         pthread_kill_other_threads_np();
12724 #endif
12725
12726         return 0;
12727
12728   ;
12729   return 0;
12730 }
12731 _ACEOF
12732 if ac_fn_c_try_link "$LINENO"; then :
12733   ol_cv_pthread_lpthreads_lexc=yes
12734 else
12735   ol_cv_pthread_lpthreads_lexc=no
12736 fi
12737 rm -f core conftest.err conftest.$ac_objext \
12738     conftest$ac_exeext conftest.$ac_ext
12739 else
12740   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12741 /* end confdefs.h.  */
12742
12743
12744 /* pthread test headers */
12745 #include <pthread.h>
12746 #if HAVE_PTHREADS < 7
12747 #include <errno.h>
12748 #endif
12749 #ifndef NULL
12750 #define NULL (void*)0
12751 #endif
12752
12753 static void *task(p)
12754         void *p;
12755 {
12756         return (void *) (p == NULL);
12757 }
12758
12759
12760 int main(argc, argv)
12761         int argc;
12762         char **argv;
12763 {
12764
12765         /* pthread test function */
12766 #ifndef PTHREAD_CREATE_DETACHED
12767 #define PTHREAD_CREATE_DETACHED 1
12768 #endif
12769         pthread_t t;
12770         int status;
12771         int detach = PTHREAD_CREATE_DETACHED;
12772
12773 #if HAVE_PTHREADS > 4
12774         /* Final pthreads */
12775         pthread_attr_t attr;
12776
12777         status = pthread_attr_init(&attr);
12778         if( status ) return status;
12779
12780 #if HAVE_PTHREADS < 7
12781         status = pthread_attr_setdetachstate(&attr, &detach);
12782         if( status < 0 ) status = errno;
12783 #else
12784         status = pthread_attr_setdetachstate(&attr, detach);
12785 #endif
12786         if( status ) return status;
12787         status = pthread_create( &t, &attr, task, NULL );
12788 #if HAVE_PTHREADS < 7
12789         if( status < 0 ) status = errno;
12790 #endif
12791         if( status ) return status;
12792 #else
12793         /* Draft 4 pthreads */
12794         status = pthread_create( &t, pthread_attr_default, task, NULL );
12795         if( status ) return errno;
12796
12797         /* give thread a chance to complete */
12798         /* it should remain joinable and hence detachable */
12799         sleep( 1 );
12800
12801         status = pthread_detach( &t );
12802         if( status ) return errno;
12803 #endif
12804
12805 #ifdef HAVE_LINUX_THREADS
12806         pthread_kill_other_threads_np();
12807 #endif
12808
12809         return 0;
12810
12811 }
12812
12813 _ACEOF
12814 if ac_fn_c_try_run "$LINENO"; then :
12815   ol_cv_pthread_lpthreads_lexc=yes
12816 else
12817   ol_cv_pthread_lpthreads_lexc=no
12818 fi
12819 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12820   conftest.$ac_objext conftest.beam conftest.$ac_ext
12821 fi
12822
12823
12824                 # restore the LIBS
12825                 LIBS="$ol_LIBS"
12826
12827 fi
12828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
12829 $as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
12830
12831         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
12832                 ol_link_pthreads="-lpthreads -lexc"
12833                 ol_link_threads=posix
12834         fi
12835 fi
12836
12837
12838                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
12839 if test "$ol_link_threads" = no ; then
12840         # try -lpthreads
12841         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
12842 $as_echo_n "checking for pthread link with -lpthreads... " >&6; }
12843 if ${ol_cv_pthread_lib_lpthreads+:} false; then :
12844   $as_echo_n "(cached) " >&6
12845 else
12846
12847                 # save the flags
12848                 ol_LIBS="$LIBS"
12849                 LIBS="-lpthreads $LIBS"
12850
12851                 if test "$cross_compiling" = yes; then :
12852   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12853 /* end confdefs.h.  */
12854
12855 /* pthread test headers */
12856 #include <pthread.h>
12857 #if HAVE_PTHREADS < 7
12858 #include <errno.h>
12859 #endif
12860 #ifndef NULL
12861 #define NULL (void*)0
12862 #endif
12863
12864 static void *task(p)
12865         void *p;
12866 {
12867         return (void *) (p == NULL);
12868 }
12869
12870 int
12871 main ()
12872 {
12873
12874         /* pthread test function */
12875 #ifndef PTHREAD_CREATE_DETACHED
12876 #define PTHREAD_CREATE_DETACHED 1
12877 #endif
12878         pthread_t t;
12879         int status;
12880         int detach = PTHREAD_CREATE_DETACHED;
12881
12882 #if HAVE_PTHREADS > 4
12883         /* Final pthreads */
12884         pthread_attr_t attr;
12885
12886         status = pthread_attr_init(&attr);
12887         if( status ) return status;
12888
12889 #if HAVE_PTHREADS < 7
12890         status = pthread_attr_setdetachstate(&attr, &detach);
12891         if( status < 0 ) status = errno;
12892 #else
12893         status = pthread_attr_setdetachstate(&attr, detach);
12894 #endif
12895         if( status ) return status;
12896         status = pthread_create( &t, &attr, task, NULL );
12897 #if HAVE_PTHREADS < 7
12898         if( status < 0 ) status = errno;
12899 #endif
12900         if( status ) return status;
12901 #else
12902         /* Draft 4 pthreads */
12903         status = pthread_create( &t, pthread_attr_default, task, NULL );
12904         if( status ) return errno;
12905
12906         /* give thread a chance to complete */
12907         /* it should remain joinable and hence detachable */
12908         sleep( 1 );
12909
12910         status = pthread_detach( &t );
12911         if( status ) return errno;
12912 #endif
12913
12914 #ifdef HAVE_LINUX_THREADS
12915         pthread_kill_other_threads_np();
12916 #endif
12917
12918         return 0;
12919
12920   ;
12921   return 0;
12922 }
12923 _ACEOF
12924 if ac_fn_c_try_link "$LINENO"; then :
12925   ol_cv_pthread_lib_lpthreads=yes
12926 else
12927   ol_cv_pthread_lib_lpthreads=no
12928 fi
12929 rm -f core conftest.err conftest.$ac_objext \
12930     conftest$ac_exeext conftest.$ac_ext
12931 else
12932   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12933 /* end confdefs.h.  */
12934
12935
12936 /* pthread test headers */
12937 #include <pthread.h>
12938 #if HAVE_PTHREADS < 7
12939 #include <errno.h>
12940 #endif
12941 #ifndef NULL
12942 #define NULL (void*)0
12943 #endif
12944
12945 static void *task(p)
12946         void *p;
12947 {
12948         return (void *) (p == NULL);
12949 }
12950
12951
12952 int main(argc, argv)
12953         int argc;
12954         char **argv;
12955 {
12956
12957         /* pthread test function */
12958 #ifndef PTHREAD_CREATE_DETACHED
12959 #define PTHREAD_CREATE_DETACHED 1
12960 #endif
12961         pthread_t t;
12962         int status;
12963         int detach = PTHREAD_CREATE_DETACHED;
12964
12965 #if HAVE_PTHREADS > 4
12966         /* Final pthreads */
12967         pthread_attr_t attr;
12968
12969         status = pthread_attr_init(&attr);
12970         if( status ) return status;
12971
12972 #if HAVE_PTHREADS < 7
12973         status = pthread_attr_setdetachstate(&attr, &detach);
12974         if( status < 0 ) status = errno;
12975 #else
12976         status = pthread_attr_setdetachstate(&attr, detach);
12977 #endif
12978         if( status ) return status;
12979         status = pthread_create( &t, &attr, task, NULL );
12980 #if HAVE_PTHREADS < 7
12981         if( status < 0 ) status = errno;
12982 #endif
12983         if( status ) return status;
12984 #else
12985         /* Draft 4 pthreads */
12986         status = pthread_create( &t, pthread_attr_default, task, NULL );
12987         if( status ) return errno;
12988
12989         /* give thread a chance to complete */
12990         /* it should remain joinable and hence detachable */
12991         sleep( 1 );
12992
12993         status = pthread_detach( &t );
12994         if( status ) return errno;
12995 #endif
12996
12997 #ifdef HAVE_LINUX_THREADS
12998         pthread_kill_other_threads_np();
12999 #endif
13000
13001         return 0;
13002
13003 }
13004
13005 _ACEOF
13006 if ac_fn_c_try_run "$LINENO"; then :
13007   ol_cv_pthread_lib_lpthreads=yes
13008 else
13009   ol_cv_pthread_lib_lpthreads=no
13010 fi
13011 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13012   conftest.$ac_objext conftest.beam conftest.$ac_ext
13013 fi
13014
13015
13016                 # restore the LIBS
13017                 LIBS="$ol_LIBS"
13018
13019 fi
13020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
13021 $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
13022
13023         if test $ol_cv_pthread_lib_lpthreads = yes ; then
13024                 ol_link_pthreads="-lpthreads"
13025                 ol_link_threads=posix
13026         fi
13027 fi
13028
13029
13030 { $as_echo "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
13031 $as_echo "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
13032
13033                 if test $ol_link_threads != no ; then
13034                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
13035
13036                                                 save_CPPFLAGS="$CPPFLAGS"
13037                         save_LIBS="$LIBS"
13038                         LIBS="$LTHREAD_LIBS $LIBS"
13039
13040                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
13041 do :
13042   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13043 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13044 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13045   cat >>confdefs.h <<_ACEOF
13046 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13047 _ACEOF
13048
13049 fi
13050 done
13051
13052
13053                         if test $ac_cv_func_sched_yield = no &&
13054                            test $ac_cv_func_pthread_yield = no &&
13055                            test $ac_cv_func_thr_yield = no ; then
13056                                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
13057 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
13058 if ${ac_cv_lib_rt_sched_yield+:} false; then :
13059   $as_echo_n "(cached) " >&6
13060 else
13061   ac_check_lib_save_LIBS=$LIBS
13062 LIBS="-lrt  $LIBS"
13063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13064 /* end confdefs.h.  */
13065
13066 /* Override any GCC internal prototype to avoid an error.
13067    Use char because int might match the return type of a GCC
13068    builtin and then its argument prototype would still apply.  */
13069 #ifdef __cplusplus
13070 extern "C"
13071 #endif
13072 char sched_yield ();
13073 int
13074 main ()
13075 {
13076 return sched_yield ();
13077   ;
13078   return 0;
13079 }
13080 _ACEOF
13081 if ac_fn_c_try_link "$LINENO"; then :
13082   ac_cv_lib_rt_sched_yield=yes
13083 else
13084   ac_cv_lib_rt_sched_yield=no
13085 fi
13086 rm -f core conftest.err conftest.$ac_objext \
13087     conftest$ac_exeext conftest.$ac_ext
13088 LIBS=$ac_check_lib_save_LIBS
13089 fi
13090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
13091 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
13092 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
13093   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
13094
13095 $as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
13096
13097                                         ac_cv_func_sched_yield=yes
13098 else
13099   ac_cv_func_sched_yield=no
13100 fi
13101
13102                         fi
13103                         if test $ac_cv_func_sched_yield = no &&
13104                            test $ac_cv_func_pthread_yield = no &&
13105                            test "$ac_cv_func_thr_yield" = no ; then
13106                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
13107 $as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
13108                         fi
13109
13110                                                 for ac_func in pthread_kill
13111 do :
13112   ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
13113 if test "x$ac_cv_func_pthread_kill" = xyes; then :
13114   cat >>confdefs.h <<_ACEOF
13115 #define HAVE_PTHREAD_KILL 1
13116 _ACEOF
13117
13118 fi
13119 done
13120
13121
13122                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
13123 $as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
13124 if ${ol_cv_func_pthread_rwlock_destroy+:} false; then :
13125   $as_echo_n "(cached) " >&6
13126 else
13127
13128                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13129 /* end confdefs.h.  */
13130
13131 #include <pthread.h>
13132 pthread_rwlock_t rwlock;
13133
13134 int
13135 main ()
13136 {
13137 pthread_rwlock_destroy(&rwlock);
13138   ;
13139   return 0;
13140 }
13141 _ACEOF
13142 if ac_fn_c_try_link "$LINENO"; then :
13143   ol_cv_func_pthread_rwlock_destroy=yes
13144 else
13145   ol_cv_func_pthread_rwlock_destroy=no
13146 fi
13147 rm -f core conftest.err conftest.$ac_objext \
13148     conftest$ac_exeext conftest.$ac_ext
13149
13150 fi
13151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
13152 $as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
13153                         if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
13154
13155 $as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
13156
13157                         fi
13158
13159                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
13160 $as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
13161 if ${ol_cv_func_pthread_detach+:} false; then :
13162   $as_echo_n "(cached) " >&6
13163 else
13164
13165                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13166 /* end confdefs.h.  */
13167
13168 #include <pthread.h>
13169 #ifndef NULL
13170 #define NULL (void*)0
13171 #endif
13172
13173 int
13174 main ()
13175 {
13176 pthread_detach(NULL);
13177   ;
13178   return 0;
13179 }
13180 _ACEOF
13181 if ac_fn_c_try_link "$LINENO"; then :
13182   ol_cv_func_pthread_detach=yes
13183 else
13184   ol_cv_func_pthread_detach=no
13185 fi
13186 rm -f core conftest.err conftest.$ac_objext \
13187     conftest$ac_exeext conftest.$ac_ext
13188
13189 fi
13190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
13191 $as_echo "$ol_cv_func_pthread_detach" >&6; }
13192
13193                         if test $ol_cv_func_pthread_detach = no ; then
13194                                 as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
13195                         fi
13196
13197
13198 $as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
13199
13200
13201                                                 for ac_func in \
13202                                 pthread_setconcurrency \
13203                                 pthread_getconcurrency \
13204                                 thr_setconcurrency \
13205                                 thr_getconcurrency \
13206
13207 do :
13208   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13209 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13210 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13211   cat >>confdefs.h <<_ACEOF
13212 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13213 _ACEOF
13214
13215 fi
13216 done
13217
13218
13219
13220         for ac_func in pthread_kill_other_threads_np
13221 do :
13222   ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
13223 if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes; then :
13224   cat >>confdefs.h <<_ACEOF
13225 #define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
13226 _ACEOF
13227
13228 fi
13229 done
13230
13231         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
13232 $as_echo_n "checking for LinuxThreads implementation... " >&6; }
13233 if ${ol_cv_sys_linux_threads+:} false; then :
13234   $as_echo_n "(cached) " >&6
13235 else
13236   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
13237 fi
13238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
13239 $as_echo "$ol_cv_sys_linux_threads" >&6; }
13240
13241
13242
13243
13244         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
13245 $as_echo_n "checking for LinuxThreads consistency... " >&6; }
13246 if ${ol_cv_linux_threads+:} false; then :
13247   $as_echo_n "(cached) " >&6
13248 else
13249
13250                 if test $ol_cv_header_linux_threads = yes &&
13251                    test $ol_cv_sys_linux_threads = yes; then
13252                         ol_cv_linux_threads=yes
13253                 elif test $ol_cv_header_linux_threads = no &&
13254                      test $ol_cv_sys_linux_threads = no; then
13255                         ol_cv_linux_threads=no
13256                 else
13257                         ol_cv_linux_threads=error
13258                 fi
13259
13260 fi
13261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
13262 $as_echo "$ol_cv_linux_threads" >&6; }
13263
13264
13265                         if test $ol_cv_linux_threads = error; then
13266                                 as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
13267                         fi
13268
13269                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
13270 $as_echo_n "checking if pthread_create() works... " >&6; }
13271 if ${ol_cv_pthread_create_works+:} false; then :
13272   $as_echo_n "(cached) " >&6
13273 else
13274
13275                         if test "$cross_compiling" = yes; then :
13276                                 ol_cv_pthread_create_works=yes
13277 else
13278   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13279 /* end confdefs.h.  */
13280
13281
13282 /* pthread test headers */
13283 #include <pthread.h>
13284 #if HAVE_PTHREADS < 7
13285 #include <errno.h>
13286 #endif
13287 #ifndef NULL
13288 #define NULL (void*)0
13289 #endif
13290
13291 static void *task(p)
13292         void *p;
13293 {
13294         return (void *) (p == NULL);
13295 }
13296
13297
13298 int main(argc, argv)
13299         int argc;
13300         char **argv;
13301 {
13302
13303         /* pthread test function */
13304 #ifndef PTHREAD_CREATE_DETACHED
13305 #define PTHREAD_CREATE_DETACHED 1
13306 #endif
13307         pthread_t t;
13308         int status;
13309         int detach = PTHREAD_CREATE_DETACHED;
13310
13311 #if HAVE_PTHREADS > 4
13312         /* Final pthreads */
13313         pthread_attr_t attr;
13314
13315         status = pthread_attr_init(&attr);
13316         if( status ) return status;
13317
13318 #if HAVE_PTHREADS < 7
13319         status = pthread_attr_setdetachstate(&attr, &detach);
13320         if( status < 0 ) status = errno;
13321 #else
13322         status = pthread_attr_setdetachstate(&attr, detach);
13323 #endif
13324         if( status ) return status;
13325         status = pthread_create( &t, &attr, task, NULL );
13326 #if HAVE_PTHREADS < 7
13327         if( status < 0 ) status = errno;
13328 #endif
13329         if( status ) return status;
13330 #else
13331         /* Draft 4 pthreads */
13332         status = pthread_create( &t, pthread_attr_default, task, NULL );
13333         if( status ) return errno;
13334
13335         /* give thread a chance to complete */
13336         /* it should remain joinable and hence detachable */
13337         sleep( 1 );
13338
13339         status = pthread_detach( &t );
13340         if( status ) return errno;
13341 #endif
13342
13343 #ifdef HAVE_LINUX_THREADS
13344         pthread_kill_other_threads_np();
13345 #endif
13346
13347         return 0;
13348
13349 }
13350
13351 _ACEOF
13352 if ac_fn_c_try_run "$LINENO"; then :
13353   ol_cv_pthread_create_works=yes
13354 else
13355   ol_cv_pthread_create_works=no
13356 fi
13357 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13358   conftest.$ac_objext conftest.beam conftest.$ac_ext
13359 fi
13360
13361 fi
13362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
13363 $as_echo "$ol_cv_pthread_create_works" >&6; }
13364
13365                         if test $ol_cv_pthread_create_works = no ; then
13366                                 as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
13367                         fi
13368
13369                         ol_replace_broken_yield=no
13370
13371                         if test $ol_replace_broken_yield = yes ; then
13372
13373 $as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
13374
13375                         fi
13376
13377                                                 if test x$ol_with_yielding_select = xauto ; then
13378                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
13379 $as_echo_n "checking if select yields when using pthreads... " >&6; }
13380 if ${ol_cv_pthread_select_yields+:} false; then :
13381   $as_echo_n "(cached) " >&6
13382 else
13383
13384                                 if test "$cross_compiling" = yes; then :
13385   ol_cv_pthread_select_yields=cross
13386 else
13387   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13388 /* end confdefs.h.  */
13389
13390 #include <sys/types.h>
13391 #include <sys/time.h>
13392 #include <unistd.h>
13393 #include <pthread.h>
13394 #ifndef NULL
13395 #define NULL (void*) 0
13396 #endif
13397
13398 static int fildes[2];
13399
13400 static void *task(p)
13401         void *p;
13402 {
13403         int i;
13404         struct timeval tv;
13405
13406         fd_set rfds;
13407
13408         tv.tv_sec=10;
13409         tv.tv_usec=0;
13410
13411         FD_ZERO(&rfds);
13412         FD_SET(fildes[0], &rfds);
13413
13414         /* we're not interested in any fds */
13415         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
13416
13417         if(i < 0) {
13418                 perror("select");
13419                 exit(10);
13420         }
13421
13422         exit(0); /* if we exit here, the select blocked the whole process */
13423 }
13424
13425 int main(argc, argv)
13426         int argc;
13427         char **argv;
13428 {
13429         pthread_t t;
13430
13431         /* create a pipe to select */
13432         if(pipe(&fildes[0])) {
13433                 perror("select");
13434                 exit(1);
13435         }
13436
13437 #ifdef HAVE_PTHREAD_SETCONCURRENCY
13438         (void) pthread_setconcurrency(2);
13439 #else
13440 #ifdef HAVE_THR_SETCONCURRENCY
13441         /* Set Solaris LWP concurrency to 2 */
13442         thr_setconcurrency(2);
13443 #endif
13444 #endif
13445
13446 #if HAVE_PTHREADS < 6
13447         pthread_create(&t, pthread_attr_default, task, NULL);
13448 #else
13449         pthread_create(&t, NULL, task, NULL);
13450 #endif
13451
13452         /* make sure task runs first */
13453 #ifdef HAVE_THR_YIELD
13454         thr_yield();
13455 #elif defined( HAVE_SCHED_YIELD )
13456         sched_yield();
13457 #elif defined( HAVE_PTHREAD_YIELD )
13458         pthread_yield();
13459 #endif
13460
13461         exit(2);
13462 }
13463 _ACEOF
13464 if ac_fn_c_try_run "$LINENO"; then :
13465   ol_cv_pthread_select_yields=no
13466 else
13467   ol_cv_pthread_select_yields=yes
13468 fi
13469 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13470   conftest.$ac_objext conftest.beam conftest.$ac_ext
13471 fi
13472
13473 fi
13474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
13475 $as_echo "$ol_cv_pthread_select_yields" >&6; }
13476
13477                                 if test $ol_cv_pthread_select_yields = cross ; then
13478                                         as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
13479                                 fi
13480
13481                                 if test $ol_cv_pthread_select_yields = yes ; then
13482                                         ol_with_yielding_select=yes
13483                                 fi
13484                         fi
13485
13486                                                 CPPFLAGS="$save_CPPFLAGS"
13487                         LIBS="$save_LIBS"
13488                 else
13489                         as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
13490                 fi
13491         fi
13492
13493         if test $ol_with_threads = posix ; then
13494                 as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
13495         fi
13496         ;;
13497 esac
13498
13499 case $ol_with_threads in auto | yes | mach)
13500
13501                 for ac_header in mach/cthreads.h cthreads.h
13502 do :
13503   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13504 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13505 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13506   cat >>confdefs.h <<_ACEOF
13507 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13508 _ACEOF
13509
13510 fi
13511
13512 done
13513
13514         if test $ac_cv_header_mach_cthreads_h = yes ; then
13515                 ol_with_threads=found
13516
13517                                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
13518 if test "x$ac_cv_func_cthread_fork" = xyes; then :
13519   ol_link_threads=yes
13520 fi
13521
13522
13523                 if test $ol_link_threads = no ; then
13524                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
13525 $as_echo_n "checking for cthread_fork with -all_load... " >&6; }
13526 if ${ol_cv_cthread_all_load+:} false; then :
13527   $as_echo_n "(cached) " >&6
13528 else
13529
13530                                                                 save_LIBS="$LIBS"
13531                                 LIBS="-all_load $LIBS"
13532                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13533 /* end confdefs.h.  */
13534 #include <mach/cthreads.h>
13535 int
13536 main ()
13537 {
13538
13539                                         cthread_fork((void *)0, (void *)0);
13540
13541   ;
13542   return 0;
13543 }
13544 _ACEOF
13545 if ac_fn_c_try_link "$LINENO"; then :
13546   ol_cv_cthread_all_load=yes
13547 else
13548   ol_cv_cthread_all_load=no
13549 fi
13550 rm -f core conftest.err conftest.$ac_objext \
13551     conftest$ac_exeext conftest.$ac_ext
13552                                                                 LIBS="$save_LIBS"
13553
13554 fi
13555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
13556 $as_echo "$ol_cv_cthread_all_load" >&6; }
13557
13558                         if test $ol_cv_cthread_all_load = yes ; then
13559                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
13560                                 ol_link_threads=mach
13561                                 ol_with_threads=found
13562                         fi
13563                 fi
13564
13565         elif test $ac_cv_header_cthreads_h = yes ; then
13566
13567                 ol_with_threads=found
13568
13569                                 save_LIBS="$LIBS"
13570                 LIBS="$LIBS -lthreads"
13571                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
13572 if test "x$ac_cv_func_cthread_fork" = xyes; then :
13573   ol_link_threads=yes
13574 fi
13575
13576                 LIBS="$save_LIBS"
13577
13578                 if test $ol_link_threads = yes ; then
13579                         LTHREAD_LIBS="-lthreads"
13580                         ol_link_threads=mach
13581                         ol_with_threads=found
13582                 else
13583                         as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
13584                 fi
13585
13586         elif test $ol_with_threads = mach ; then
13587                 as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
13588         fi
13589
13590         if test $ol_link_threads = mach ; then
13591
13592 $as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
13593
13594         elif test $ol_with_threads = found ; then
13595                 as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
13596         fi
13597         ;;
13598 esac
13599
13600 case $ol_with_threads in auto | yes | pth)
13601
13602         for ac_header in pth.h
13603 do :
13604   ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
13605 if test "x$ac_cv_header_pth_h" = xyes; then :
13606   cat >>confdefs.h <<_ACEOF
13607 #define HAVE_PTH_H 1
13608 _ACEOF
13609
13610 fi
13611
13612 done
13613
13614
13615         if test $ac_cv_header_pth_h = yes ; then
13616                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
13617 $as_echo_n "checking for pth_version in -lpth... " >&6; }
13618 if ${ac_cv_lib_pth_pth_version+:} false; then :
13619   $as_echo_n "(cached) " >&6
13620 else
13621   ac_check_lib_save_LIBS=$LIBS
13622 LIBS="-lpth  $LIBS"
13623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13624 /* end confdefs.h.  */
13625
13626 /* Override any GCC internal prototype to avoid an error.
13627    Use char because int might match the return type of a GCC
13628    builtin and then its argument prototype would still apply.  */
13629 #ifdef __cplusplus
13630 extern "C"
13631 #endif
13632 char pth_version ();
13633 int
13634 main ()
13635 {
13636 return pth_version ();
13637   ;
13638   return 0;
13639 }
13640 _ACEOF
13641 if ac_fn_c_try_link "$LINENO"; then :
13642   ac_cv_lib_pth_pth_version=yes
13643 else
13644   ac_cv_lib_pth_pth_version=no
13645 fi
13646 rm -f core conftest.err conftest.$ac_objext \
13647     conftest$ac_exeext conftest.$ac_ext
13648 LIBS=$ac_check_lib_save_LIBS
13649 fi
13650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
13651 $as_echo "$ac_cv_lib_pth_pth_version" >&6; }
13652 if test "x$ac_cv_lib_pth_pth_version" = xyes; then :
13653   have_pth=yes
13654 else
13655   have_pth=no
13656 fi
13657
13658
13659                 if test $have_pth = yes ; then
13660
13661 $as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
13662
13663                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
13664                         ol_link_threads=pth
13665                         ol_with_threads=found
13666
13667                         if test x$ol_with_yielding_select = xauto ; then
13668                                 ol_with_yielding_select=yes
13669                         fi
13670                 fi
13671         fi
13672         ;;
13673 esac
13674
13675 case $ol_with_threads in auto | yes | lwp)
13676
13677                 for ac_header in thread.h synch.h
13678 do :
13679   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13680 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13681 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13682   cat >>confdefs.h <<_ACEOF
13683 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13684 _ACEOF
13685
13686 fi
13687
13688 done
13689
13690         if test $ac_cv_header_thread_h = yes &&
13691            test $ac_cv_header_synch_h = yes ; then
13692                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
13693 $as_echo_n "checking for thr_create in -lthread... " >&6; }
13694 if ${ac_cv_lib_thread_thr_create+:} false; then :
13695   $as_echo_n "(cached) " >&6
13696 else
13697   ac_check_lib_save_LIBS=$LIBS
13698 LIBS="-lthread  $LIBS"
13699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13700 /* end confdefs.h.  */
13701
13702 /* Override any GCC internal prototype to avoid an error.
13703    Use char because int might match the return type of a GCC
13704    builtin and then its argument prototype would still apply.  */
13705 #ifdef __cplusplus
13706 extern "C"
13707 #endif
13708 char thr_create ();
13709 int
13710 main ()
13711 {
13712 return thr_create ();
13713   ;
13714   return 0;
13715 }
13716 _ACEOF
13717 if ac_fn_c_try_link "$LINENO"; then :
13718   ac_cv_lib_thread_thr_create=yes
13719 else
13720   ac_cv_lib_thread_thr_create=no
13721 fi
13722 rm -f core conftest.err conftest.$ac_objext \
13723     conftest$ac_exeext conftest.$ac_ext
13724 LIBS=$ac_check_lib_save_LIBS
13725 fi
13726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
13727 $as_echo "$ac_cv_lib_thread_thr_create" >&6; }
13728 if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
13729   have_thr=yes
13730 else
13731   have_thr=no
13732 fi
13733
13734
13735                 if test $have_thr = yes ; then
13736
13737 $as_echo "#define HAVE_THR 1" >>confdefs.h
13738
13739                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
13740                         ol_link_threads=thr
13741
13742                         if test x$ol_with_yielding_select = xauto ; then
13743                                 ol_with_yielding_select=yes
13744                         fi
13745
13746                                                 for ac_func in \
13747                                 thr_setconcurrency \
13748                                 thr_getconcurrency \
13749
13750 do :
13751   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13752 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13753 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13754   cat >>confdefs.h <<_ACEOF
13755 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13756 _ACEOF
13757
13758 fi
13759 done
13760
13761                 fi
13762         fi
13763
13764                 for ac_header in lwp/lwp.h
13765 do :
13766   ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
13767 if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
13768   cat >>confdefs.h <<_ACEOF
13769 #define HAVE_LWP_LWP_H 1
13770 _ACEOF
13771
13772 fi
13773
13774 done
13775
13776         if test $ac_cv_header_lwp_lwp_h = yes ; then
13777                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
13778 $as_echo_n "checking for lwp_create in -llwp... " >&6; }
13779 if ${ac_cv_lib_lwp_lwp_create+:} false; then :
13780   $as_echo_n "(cached) " >&6
13781 else
13782   ac_check_lib_save_LIBS=$LIBS
13783 LIBS="-llwp  $LIBS"
13784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13785 /* end confdefs.h.  */
13786
13787 /* Override any GCC internal prototype to avoid an error.
13788    Use char because int might match the return type of a GCC
13789    builtin and then its argument prototype would still apply.  */
13790 #ifdef __cplusplus
13791 extern "C"
13792 #endif
13793 char lwp_create ();
13794 int
13795 main ()
13796 {
13797 return lwp_create ();
13798   ;
13799   return 0;
13800 }
13801 _ACEOF
13802 if ac_fn_c_try_link "$LINENO"; then :
13803   ac_cv_lib_lwp_lwp_create=yes
13804 else
13805   ac_cv_lib_lwp_lwp_create=no
13806 fi
13807 rm -f core conftest.err conftest.$ac_objext \
13808     conftest$ac_exeext conftest.$ac_ext
13809 LIBS=$ac_check_lib_save_LIBS
13810 fi
13811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
13812 $as_echo "$ac_cv_lib_lwp_lwp_create" >&6; }
13813 if test "x$ac_cv_lib_lwp_lwp_create" = xyes; then :
13814   have_lwp=yes
13815 else
13816   have_lwp=no
13817 fi
13818
13819
13820                 if test $have_lwp = yes ; then
13821
13822 $as_echo "#define HAVE_LWP 1" >>confdefs.h
13823
13824                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
13825                         ol_link_threads=lwp
13826
13827                         if test x$ol_with_yielding_select = xauto ; then
13828                                 ol_with_yielding_select=no
13829                         fi
13830                 fi
13831         fi
13832         ;;
13833 esac
13834
13835 if test $ol_with_yielding_select = yes ; then
13836
13837 $as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
13838
13839 fi
13840
13841 if test $ol_with_threads = manual ; then
13842                 ol_link_threads=yes
13843
13844         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
13845 $as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
13846
13847         for ac_header in pthread.h sched.h
13848 do :
13849   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13850 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13851 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13852   cat >>confdefs.h <<_ACEOF
13853 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13854 _ACEOF
13855
13856 fi
13857
13858 done
13859
13860         for ac_func in sched_yield pthread_yield
13861 do :
13862   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13863 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13864 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13865   cat >>confdefs.h <<_ACEOF
13866 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13867 _ACEOF
13868
13869 fi
13870 done
13871
13872
13873         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
13874 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
13875 if ${ol_cv_header_linux_threads+:} false; then :
13876   $as_echo_n "(cached) " >&6
13877 else
13878   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13879 /* end confdefs.h.  */
13880 #include <pthread.h>
13881 _ACEOF
13882 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13883   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
13884   ol_cv_header_linux_threads=yes
13885 else
13886   ol_cv_header_linux_threads=no
13887 fi
13888 rm -f conftest*
13889
13890
13891 fi
13892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
13893 $as_echo "$ol_cv_header_linux_threads" >&6; }
13894         if test $ol_cv_header_linux_threads = yes; then
13895
13896 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
13897
13898         fi
13899
13900
13901         for ac_header in mach/cthreads.h
13902 do :
13903   ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
13904 if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
13905   cat >>confdefs.h <<_ACEOF
13906 #define HAVE_MACH_CTHREADS_H 1
13907 _ACEOF
13908
13909 fi
13910
13911 done
13912
13913         for ac_header in lwp/lwp.h
13914 do :
13915   ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
13916 if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
13917   cat >>confdefs.h <<_ACEOF
13918 #define HAVE_LWP_LWP_H 1
13919 _ACEOF
13920
13921 fi
13922
13923 done
13924
13925         for ac_header in thread.h synch.h
13926 do :
13927   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13928 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13929 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13930   cat >>confdefs.h <<_ACEOF
13931 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13932 _ACEOF
13933
13934 fi
13935
13936 done
13937
13938 fi
13939
13940 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
13941
13942 $as_echo "#define REENTRANT 1" >>confdefs.h
13943
13944
13945 $as_echo "#define _REENTRANT 1" >>confdefs.h
13946
13947
13948 $as_echo "#define THREAD_SAFE 1" >>confdefs.h
13949
13950
13951 $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
13952
13953
13954 $as_echo "#define THREADSAFE 1" >>confdefs.h
13955
13956
13957 $as_echo "#define _THREADSAFE 1" >>confdefs.h
13958
13959
13960 $as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
13961
13962
13963                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
13964 $as_echo_n "checking for thread specific errno... " >&6; }
13965 if ${ol_cv_errno_thread_specific+:} false; then :
13966   $as_echo_n "(cached) " >&6
13967 else
13968
13969                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13970 /* end confdefs.h.  */
13971 #include <errno.h>
13972 int
13973 main ()
13974 {
13975 errno = 0;
13976   ;
13977   return 0;
13978 }
13979 _ACEOF
13980 if ac_fn_c_try_link "$LINENO"; then :
13981   ol_cv_errno_thread_specific=yes
13982 else
13983   ol_cv_errno_thread_specific=no
13984 fi
13985 rm -f core conftest.err conftest.$ac_objext \
13986     conftest$ac_exeext conftest.$ac_ext
13987
13988 fi
13989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
13990 $as_echo "$ol_cv_errno_thread_specific" >&6; }
13991
13992                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
13993 $as_echo_n "checking for thread specific h_errno... " >&6; }
13994 if ${ol_cv_h_errno_thread_specific+:} false; then :
13995   $as_echo_n "(cached) " >&6
13996 else
13997
13998                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13999 /* end confdefs.h.  */
14000 #include <netdb.h>
14001 int
14002 main ()
14003 {
14004 h_errno = 0;
14005   ;
14006   return 0;
14007 }
14008 _ACEOF
14009 if ac_fn_c_try_link "$LINENO"; then :
14010   ol_cv_h_errno_thread_specific=yes
14011 else
14012   ol_cv_h_errno_thread_specific=no
14013 fi
14014 rm -f core conftest.err conftest.$ac_objext \
14015     conftest$ac_exeext conftest.$ac_ext
14016
14017 fi
14018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
14019 $as_echo "$ol_cv_h_errno_thread_specific" >&6; }
14020
14021         if test $ol_cv_errno_thread_specific != yes ||
14022            test $ol_cv_h_errno_thread_specific != yes ; then
14023                 LIBS="$LTHREAD_LIBS $LIBS"
14024                 LTHREAD_LIBS=""
14025         fi
14026
14027 fi
14028
14029 if test $ol_link_threads = no ; then
14030         if test $ol_with_threads = yes ; then
14031                 as_fn_error $? "no suitable thread support" "$LINENO" 5
14032         fi
14033
14034         if test $ol_with_threads = auto ; then
14035                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
14036 $as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
14037                 ol_with_threads=no
14038         fi
14039
14040
14041 $as_echo "#define NO_THREADS 1" >>confdefs.h
14042
14043         LTHREAD_LIBS=""
14044         BUILD_THREAD=no
14045 else
14046         BUILD_THREAD=yes
14047 fi
14048
14049 if test $ol_link_threads != no ; then
14050
14051 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
14052
14053 fi
14054
14055 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14056 case "$ol_with_threads" in
14057  no)
14058     ol_pthread_ok=no
14059
14060     ;;
14061  *)
14062     ol_found_pthreads=yes
14063     ;;
14064 esac
14065
14066 ac_ext=c
14067 ac_cpp='$CPP $CPPFLAGS'
14068 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14069 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14070 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14071
14072
14073
14074
14075
14076
14077     case "$ol_found_pthreads" in
14078      yes)
14079         saved_LIBS="$LIBS"
14080         LIBS="$LTHREAD_LIBS $LIBS"
14081         saved_CFLAGS="$CFLAGS"
14082         CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
14083         for ac_func in sem_timedwait
14084 do :
14085   ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
14086 if test "x$ac_cv_func_sem_timedwait" = xyes; then :
14087   cat >>confdefs.h <<_ACEOF
14088 #define HAVE_SEM_TIMEDWAIT 1
14089 _ACEOF
14090
14091 fi
14092 done
14093
14094         LIBS="$saved_LIBS"
14095         { saved_LIBS=; unset saved_LIBS;}
14096         CFLAGS="$saved_CFLAGS"
14097         { saved_CFLAGS=; unset saved_CFLAGS;}
14098         case "$ac_cv_func_sem_timedwait" in
14099          yes)
14100             PTHREAD_LIBS="$LTHREAD_LIBS"
14101             have_pthreads=yes
14102         esac
14103     esac
14104 esac
14105
14106 case "$have_pthreads" in
14107  yes)
14108     CFLAGS_NTP="$CFLAGS_NTP $PTHREAD_CFLAGS"
14109     saved_LIBS="$LIBS"
14110     LIBS="$LTHREAD_LIBS $LIBS"
14111     saved_CFLAGS="$CFLAGS"
14112     CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
14113     # The cast to long int works around a bug in the HP C Compiler
14114 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14115 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14116 # This bug is HP SR number 8606223364.
14117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
14118 $as_echo_n "checking size of pthread_t... " >&6; }
14119 if ${ac_cv_sizeof_pthread_t+:} false; then :
14120   $as_echo_n "(cached) " >&6
14121 else
14122   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "
14123             $ac_includes_default
14124             #include <pthread.h>
14125
14126
14127 "; then :
14128
14129 else
14130   if test "$ac_cv_type_pthread_t" = yes; then
14131      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14132 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14133 as_fn_error 77 "cannot compute sizeof (pthread_t)
14134 See \`config.log' for more details" "$LINENO" 5; }
14135    else
14136      ac_cv_sizeof_pthread_t=0
14137    fi
14138 fi
14139
14140 fi
14141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
14142 $as_echo "$ac_cv_sizeof_pthread_t" >&6; }
14143
14144
14145
14146 cat >>confdefs.h <<_ACEOF
14147 #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
14148 _ACEOF
14149
14150
14151     LIBISC_PTHREADS_NOTHREADS=pthreads
14152
14153 $as_echo "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
14154
14155     #
14156     # We'd like to use sigwait() too
14157     #
14158     ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
14159 if test "x$ac_cv_func_sigwait" = xyes; then :
14160   have_sigwait=yes
14161 else
14162   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
14163 $as_echo_n "checking for sigwait in -lc... " >&6; }
14164 if ${ac_cv_lib_c_sigwait+:} false; then :
14165   $as_echo_n "(cached) " >&6
14166 else
14167   ac_check_lib_save_LIBS=$LIBS
14168 LIBS="-lc  $LIBS"
14169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14170 /* end confdefs.h.  */
14171
14172 /* Override any GCC internal prototype to avoid an error.
14173    Use char because int might match the return type of a GCC
14174    builtin and then its argument prototype would still apply.  */
14175 #ifdef __cplusplus
14176 extern "C"
14177 #endif
14178 char sigwait ();
14179 int
14180 main ()
14181 {
14182 return sigwait ();
14183   ;
14184   return 0;
14185 }
14186 _ACEOF
14187 if ac_fn_c_try_link "$LINENO"; then :
14188   ac_cv_lib_c_sigwait=yes
14189 else
14190   ac_cv_lib_c_sigwait=no
14191 fi
14192 rm -f core conftest.err conftest.$ac_objext \
14193     conftest$ac_exeext conftest.$ac_ext
14194 LIBS=$ac_check_lib_save_LIBS
14195 fi
14196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
14197 $as_echo "$ac_cv_lib_c_sigwait" >&6; }
14198 if test "x$ac_cv_lib_c_sigwait" = xyes; then :
14199   have_sigwait=yes
14200 else
14201   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
14202 $as_echo_n "checking for sigwait in -lpthread... " >&6; }
14203 if ${ac_cv_lib_pthread_sigwait+:} false; then :
14204   $as_echo_n "(cached) " >&6
14205 else
14206   ac_check_lib_save_LIBS=$LIBS
14207 LIBS="-lpthread  $LIBS"
14208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14209 /* end confdefs.h.  */
14210
14211 /* Override any GCC internal prototype to avoid an error.
14212    Use char because int might match the return type of a GCC
14213    builtin and then its argument prototype would still apply.  */
14214 #ifdef __cplusplus
14215 extern "C"
14216 #endif
14217 char sigwait ();
14218 int
14219 main ()
14220 {
14221 return sigwait ();
14222   ;
14223   return 0;
14224 }
14225 _ACEOF
14226 if ac_fn_c_try_link "$LINENO"; then :
14227   ac_cv_lib_pthread_sigwait=yes
14228 else
14229   ac_cv_lib_pthread_sigwait=no
14230 fi
14231 rm -f core conftest.err conftest.$ac_objext \
14232     conftest$ac_exeext conftest.$ac_ext
14233 LIBS=$ac_check_lib_save_LIBS
14234 fi
14235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
14236 $as_echo "$ac_cv_lib_pthread_sigwait" >&6; }
14237 if test "x$ac_cv_lib_pthread_sigwait" = xyes; then :
14238   have_sigwait=yes
14239 else
14240   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
14241 $as_echo_n "checking for _Psigwait in -lpthread... " >&6; }
14242 if ${ac_cv_lib_pthread__Psigwait+:} false; then :
14243   $as_echo_n "(cached) " >&6
14244 else
14245   ac_check_lib_save_LIBS=$LIBS
14246 LIBS="-lpthread  $LIBS"
14247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14248 /* end confdefs.h.  */
14249
14250 /* Override any GCC internal prototype to avoid an error.
14251    Use char because int might match the return type of a GCC
14252    builtin and then its argument prototype would still apply.  */
14253 #ifdef __cplusplus
14254 extern "C"
14255 #endif
14256 char _Psigwait ();
14257 int
14258 main ()
14259 {
14260 return _Psigwait ();
14261   ;
14262   return 0;
14263 }
14264 _ACEOF
14265 if ac_fn_c_try_link "$LINENO"; then :
14266   ac_cv_lib_pthread__Psigwait=yes
14267 else
14268   ac_cv_lib_pthread__Psigwait=no
14269 fi
14270 rm -f core conftest.err conftest.$ac_objext \
14271     conftest$ac_exeext conftest.$ac_ext
14272 LIBS=$ac_check_lib_save_LIBS
14273 fi
14274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
14275 $as_echo "$ac_cv_lib_pthread__Psigwait" >&6; }
14276 if test "x$ac_cv_lib_pthread__Psigwait" = xyes; then :
14277   have_sigwait=yes
14278 else
14279   have_sigwait=no
14280
14281 fi
14282
14283
14284 fi
14285
14286
14287 fi
14288
14289
14290 fi
14291
14292     case "$host:$have_sigwait" in
14293      *-freebsd*:no)
14294         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
14295 $as_echo_n "checking for sigwait in -lc_r... " >&6; }
14296 if ${ac_cv_lib_c_r_sigwait+:} false; then :
14297   $as_echo_n "(cached) " >&6
14298 else
14299   ac_check_lib_save_LIBS=$LIBS
14300 LIBS="-lc_r  $LIBS"
14301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14302 /* end confdefs.h.  */
14303
14304 /* Override any GCC internal prototype to avoid an error.
14305    Use char because int might match the return type of a GCC
14306    builtin and then its argument prototype would still apply.  */
14307 #ifdef __cplusplus
14308 extern "C"
14309 #endif
14310 char sigwait ();
14311 int
14312 main ()
14313 {
14314 return sigwait ();
14315   ;
14316   return 0;
14317 }
14318 _ACEOF
14319 if ac_fn_c_try_link "$LINENO"; then :
14320   ac_cv_lib_c_r_sigwait=yes
14321 else
14322   ac_cv_lib_c_r_sigwait=no
14323 fi
14324 rm -f core conftest.err conftest.$ac_objext \
14325     conftest$ac_exeext conftest.$ac_ext
14326 LIBS=$ac_check_lib_save_LIBS
14327 fi
14328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
14329 $as_echo "$ac_cv_lib_c_r_sigwait" >&6; }
14330 if test "x$ac_cv_lib_c_r_sigwait" = xyes; then :
14331   have_sigwait=yes
14332
14333 fi
14334
14335     esac
14336     case "$have_sigwait" in
14337      yes)
14338         ac_cv_func_sigwait=yes
14339
14340 $as_echo "#define HAVE_SIGWAIT 1" >>confdefs.h
14341
14342     esac
14343
14344     for ac_func in pthread_attr_getstacksize
14345 do :
14346   ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
14347 if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes; then :
14348   cat >>confdefs.h <<_ACEOF
14349 #define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
14350 _ACEOF
14351
14352 fi
14353 done
14354
14355     for ac_func in pthread_attr_setstacksize sysconf
14356 do :
14357   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14358 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14359 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14360   cat >>confdefs.h <<_ACEOF
14361 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14362 _ACEOF
14363
14364 fi
14365 done
14366
14367
14368     case "$host" in
14369      *-freebsd5.[012]|*-freebsd5.[012].*)
14370         ;;
14371      *-freebsd5.[3456789]|*-freebsd5.[3456789].*|*-freebsd6.*)
14372
14373 $as_echo "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
14374
14375         ;;
14376      *-bsdi3.*|*-bsdi4.0*)
14377
14378 $as_echo "#define NEED_PTHREAD_INIT 1" >>confdefs.h
14379
14380         ;;
14381      *-linux*)
14382
14383 $as_echo "#define HAVE_LINUXTHREADS 1" >>confdefs.h
14384
14385         ;;
14386      *-solaris*)
14387         $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
14388
14389         for ac_func in pthread_setconcurrency
14390 do :
14391   ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
14392 if test "x$ac_cv_func_pthread_setconcurrency" = xyes; then :
14393   cat >>confdefs.h <<_ACEOF
14394 #define HAVE_PTHREAD_SETCONCURRENCY 1
14395 _ACEOF
14396
14397 fi
14398 done
14399
14400         case "$ac_cv_func_pthread_setconcurrency" in
14401          yes)
14402
14403 $as_echo "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
14404
14405         esac
14406         ;;
14407      *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
14408
14409 $as_echo "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
14410
14411         ;;
14412     esac
14413     hack_shutup_pthreadonceinit=no
14414     case "$host" in
14415      *-aix5.[123].*)
14416         hack_shutup_pthreadonceinit=yes
14417         ;;
14418      *-solaris2.[89])
14419         hack_shutup_pthreadonceinit=yes
14420         ;;
14421      *-solaris2.1[0-9])
14422         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
14423 $as_echo_n "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
14424 if ${ntp_cv_braces_around_pthread_once_init+:} false; then :
14425   $as_echo_n "(cached) " >&6
14426 else
14427   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14428 /* end confdefs.h.  */
14429
14430                         #include <pthread.h>
14431
14432 int
14433 main ()
14434 {
14435
14436                         static pthread_once_t once_test =
14437                                                 PTHREAD_ONCE_INIT;
14438
14439
14440   ;
14441   return 0;
14442 }
14443 _ACEOF
14444 if ac_fn_c_try_compile "$LINENO"; then :
14445   ntp_cv_braces_around_pthread_once_init=no
14446 else
14447   ntp_cv_braces_around_pthread_once_init=yes
14448
14449 fi
14450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14451
14452 fi
14453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
14454 $as_echo "$ntp_cv_braces_around_pthread_once_init" >&6; }
14455         case "$ntp_cv_braces_around_pthread_once_init" in
14456          yes)
14457             hack_shutup_pthreadonceinit=yes
14458         esac
14459         ;;
14460     esac
14461     case "$hack_shutup_pthreadonceinit" in
14462      yes)
14463
14464 $as_echo "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
14465
14466     esac
14467     LIBS="$saved_LIBS"
14468     { saved_LIBS=; unset saved_LIBS;}
14469     CFLAGS="$saved_CFLAGS"
14470     { saved_CFLAGS=; unset saved_CFLAGS;}
14471     ;;
14472  *)
14473     LIBISC_PTHREADS_NOTHREADS=nothreads
14474     ;;
14475 esac
14476
14477  if test "$have_pthreads" != "no"; then
14478   PTHREADS_TRUE=
14479   PTHREADS_FALSE='#'
14480 else
14481   PTHREADS_TRUE='#'
14482   PTHREADS_FALSE=
14483 fi
14484
14485
14486
14487
14488
14489
14490
14491 case "$hw_use_rpl_vsnprintf:$hw_cv_func_vsnprintf" in
14492  no:yes)
14493     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
14494 $as_echo_n "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
14495 if ${ntp_cv_vsnprintf_percent_m+:} false; then :
14496   $as_echo_n "(cached) " >&6
14497 else
14498   if test "$cross_compiling" = yes; then :
14499   ntp_cv_vsnprintf_percent_m=no
14500
14501 else
14502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14503 /* end confdefs.h.  */
14504
14505                     #include <stdarg.h>
14506                     #include <errno.h>
14507                     #include <stdio.h>
14508                     #include <string.h>
14509
14510                     int call_vsnprintf(
14511                             char *      dst,
14512                             size_t      sz,
14513                             const char *fmt,
14514                             ...
14515                             );
14516
14517                     int call_vsnprintf(
14518                             char *      dst,
14519                             size_t      sz,
14520                             const char *fmt,
14521                             ...
14522                             )
14523                     {
14524                             va_list     ap;
14525                             int         rc;
14526
14527                             va_start(ap, fmt);
14528                             rc = vsnprintf(dst, sz, fmt, ap);
14529                             va_end(ap);
14530
14531                             return rc;
14532                     }
14533
14534 int
14535 main ()
14536 {
14537
14538                     char        sbuf[512];
14539                     char        pbuf[512];
14540                     int         slen;
14541
14542                     strcpy(sbuf, strerror(ENOENT));
14543                     errno = ENOENT;
14544                     slen = call_vsnprintf(pbuf, sizeof(pbuf), "%m",
14545                                           "wrong");
14546                     return strcmp(sbuf, pbuf);
14547
14548
14549   ;
14550   return 0;
14551 }
14552 _ACEOF
14553 if ac_fn_c_try_run "$LINENO"; then :
14554   ntp_cv_vsnprintf_percent_m=yes
14555 else
14556   ntp_cv_vsnprintf_percent_m=no
14557 fi
14558 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14559   conftest.$ac_objext conftest.beam conftest.$ac_ext
14560 fi
14561
14562
14563 fi
14564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
14565 $as_echo "$ntp_cv_vsnprintf_percent_m" >&6; }
14566     case "$ntp_cv_vsnprintf_percent_m" in
14567      yes)
14568
14569 $as_echo "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
14570
14571     esac
14572 esac
14573
14574 for ac_header in sys/clockctl.h
14575 do :
14576   ac_fn_c_check_header_mongrel "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
14577 if test "x$ac_cv_header_sys_clockctl_h" = xyes; then :
14578   cat >>confdefs.h <<_ACEOF
14579 #define HAVE_SYS_CLOCKCTL_H 1
14580 _ACEOF
14581
14582 fi
14583
14584 done
14585
14586
14587 # Check whether --enable-clockctl was given.
14588 if test "${enable_clockctl+set}" = set; then :
14589   enableval=$enable_clockctl; ntp_use_dev_clockctl=$enableval
14590 else
14591   ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h
14592
14593 fi
14594
14595
14596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
14597 $as_echo_n "checking if we should use /dev/clockctl... " >&6; }
14598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
14599 $as_echo "$ntp_use_dev_clockctl" >&6; }
14600
14601
14602 for ac_header in sys/capability.h sys/prctl.h
14603 do :
14604   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14605 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14606 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14607   cat >>confdefs.h <<_ACEOF
14608 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14609 _ACEOF
14610
14611 fi
14612
14613 done
14614
14615
14616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
14617 $as_echo_n "checking if we have linux capabilities (libcap)... " >&6; }
14618
14619 case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
14620  yesyes)
14621     case "$host" in
14622      mips-sgi-irix*)
14623         ntp_have_linuxcaps=no
14624         ;;
14625      *) ntp_have_linuxcaps=yes
14626         ;;
14627     esac
14628     ;;
14629  *)
14630     ntp_have_linuxcaps=no
14631     ;;
14632 esac
14633
14634 # Check whether --enable-linuxcaps was given.
14635 if test "${enable_linuxcaps+set}" = set; then :
14636   enableval=$enable_linuxcaps; ntp_have_linuxcaps=$enableval
14637
14638 fi
14639
14640
14641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
14642 $as_echo "$ntp_have_linuxcaps" >&6; }
14643
14644 case "$ntp_have_linuxcaps" in
14645  yes)
14646
14647 $as_echo "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
14648
14649     LIBS="$LIBS -lcap"
14650     ;;
14651 esac
14652
14653
14654 for ac_header in priv.h
14655 do :
14656   ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
14657 if test "x$ac_cv_header_priv_h" = xyes; then :
14658   cat >>confdefs.h <<_ACEOF
14659 #define HAVE_PRIV_H 1
14660 _ACEOF
14661
14662 fi
14663
14664 done
14665
14666 case "$ac_cv_header_priv_h" in
14667  yes)
14668     case "$host" in
14669      *-solaris*)
14670         ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
14671 if test "x$ac_cv_func_setppriv" = xyes; then :
14672   ntp_have_solarisprivs=yes
14673 else
14674   ntp_have_solarisprivs=no
14675
14676 fi
14677
14678         ;;
14679     esac
14680 esac
14681
14682 # Check whether --enable-solarisprivs was given.
14683 if test "${enable_solarisprivs+set}" = set; then :
14684   enableval=$enable_solarisprivs; ntp_have_solarisprivs=$enableval
14685
14686 fi
14687
14688
14689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
14690 $as_echo_n "checking if we have solaris privileges... " >&6; }
14691
14692 case "$ntp_have_solarisprivs" in
14693  yes)
14694
14695 $as_echo "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
14696
14697 esac
14698
14699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
14700 $as_echo "$ntp_have_solarisprivs" >&6; }
14701
14702 case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs" in
14703  *yes*)
14704
14705 $as_echo "#define HAVE_DROPROOT 1" >>confdefs.h
14706
14707 esac
14708
14709 case "$host" in
14710  *-*-darwin*)
14711     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
14712 $as_echo_n "checking for library containing res_9_init... " >&6; }
14713 if ${ac_cv_search_res_9_init+:} false; then :
14714   $as_echo_n "(cached) " >&6
14715 else
14716   ac_func_search_save_LIBS=$LIBS
14717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14718 /* end confdefs.h.  */
14719
14720 /* Override any GCC internal prototype to avoid an error.
14721    Use char because int might match the return type of a GCC
14722    builtin and then its argument prototype would still apply.  */
14723 #ifdef __cplusplus
14724 extern "C"
14725 #endif
14726 char res_9_init ();
14727 int
14728 main ()
14729 {
14730 return res_9_init ();
14731   ;
14732   return 0;
14733 }
14734 _ACEOF
14735 for ac_lib in '' resolv; do
14736   if test -z "$ac_lib"; then
14737     ac_res="none required"
14738   else
14739     ac_res=-l$ac_lib
14740     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14741   fi
14742   if ac_fn_c_try_link "$LINENO"; then :
14743   ac_cv_search_res_9_init=$ac_res
14744 fi
14745 rm -f core conftest.err conftest.$ac_objext \
14746     conftest$ac_exeext
14747   if ${ac_cv_search_res_9_init+:} false; then :
14748   break
14749 fi
14750 done
14751 if ${ac_cv_search_res_9_init+:} false; then :
14752
14753 else
14754   ac_cv_search_res_9_init=no
14755 fi
14756 rm conftest.$ac_ext
14757 LIBS=$ac_func_search_save_LIBS
14758 fi
14759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
14760 $as_echo "$ac_cv_search_res_9_init" >&6; }
14761 ac_res=$ac_cv_search_res_9_init
14762 if test "$ac_res" != no; then :
14763   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14764
14765 fi
14766
14767     ;;
14768  *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
14769 $as_echo_n "checking for library containing res_init... " >&6; }
14770 if ${ac_cv_search_res_init+:} false; then :
14771   $as_echo_n "(cached) " >&6
14772 else
14773   ac_func_search_save_LIBS=$LIBS
14774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14775 /* end confdefs.h.  */
14776
14777 /* Override any GCC internal prototype to avoid an error.
14778    Use char because int might match the return type of a GCC
14779    builtin and then its argument prototype would still apply.  */
14780 #ifdef __cplusplus
14781 extern "C"
14782 #endif
14783 char res_init ();
14784 int
14785 main ()
14786 {
14787 return res_init ();
14788   ;
14789   return 0;
14790 }
14791 _ACEOF
14792 for ac_lib in '' resolv; do
14793   if test -z "$ac_lib"; then
14794     ac_res="none required"
14795   else
14796     ac_res=-l$ac_lib
14797     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14798   fi
14799   if ac_fn_c_try_link "$LINENO"; then :
14800   ac_cv_search_res_init=$ac_res
14801 fi
14802 rm -f core conftest.err conftest.$ac_objext \
14803     conftest$ac_exeext
14804   if ${ac_cv_search_res_init+:} false; then :
14805   break
14806 fi
14807 done
14808 if ${ac_cv_search_res_init+:} false; then :
14809
14810 else
14811   ac_cv_search_res_init=no
14812 fi
14813 rm conftest.$ac_ext
14814 LIBS=$ac_func_search_save_LIBS
14815 fi
14816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
14817 $as_echo "$ac_cv_search_res_init" >&6; }
14818 ac_res=$ac_cv_search_res_init
14819 if test "$ac_res" != no; then :
14820   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14821
14822 fi
14823
14824     ;;
14825 esac
14826 for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
14827 do :
14828   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14829 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
14830 #  include <sys/types.h>
14831 #endif
14832 #ifdef HAVE_NETINET_IN_H
14833 #  include <netinet/in.h>   /* inet_ functions / structs */
14834 #endif
14835 #ifdef HAVE_ARPA_NAMESER_H
14836 #  include <arpa/nameser.h> /* DNS HEADER struct */
14837 #endif
14838 #ifdef HAVE_NETDB_H
14839 #  include <netdb.h>
14840 #endif
14841 "
14842 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14843   cat >>confdefs.h <<_ACEOF
14844 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14845 _ACEOF
14846
14847 fi
14848
14849 done
14850
14851
14852 #HMS: Why do we do this check so "early"?
14853 for ac_func in res_init
14854 do :
14855   ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
14856 if test "x$ac_cv_func_res_init" = xyes; then :
14857   cat >>confdefs.h <<_ACEOF
14858 #define HAVE_RES_INIT 1
14859 _ACEOF
14860
14861 else
14862   for ac_func in __res_init
14863 do :
14864   ac_fn_c_check_func "$LINENO" "__res_init" "ac_cv_func___res_init"
14865 if test "x$ac_cv_func___res_init" = xyes; then :
14866   cat >>confdefs.h <<_ACEOF
14867 #define HAVE___RES_INIT 1
14868 _ACEOF
14869
14870 fi
14871 done
14872
14873 fi
14874 done
14875
14876
14877 # We also need -lsocket, but we have tested for that already.
14878 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
14879 if test "x$ac_cv_func_inet_ntop" = xyes; then :
14880
14881 else
14882
14883 $as_echo "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
14884
14885 fi
14886
14887 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
14888 if test "x$ac_cv_func_inet_pton" = xyes; then :
14889
14890 else
14891
14892 $as_echo "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
14893
14894 fi
14895
14896
14897 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14898 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14899
14900 cat >>confdefs.h <<_ACEOF
14901 #define HAVE_UINTPTR_T 1
14902 _ACEOF
14903
14904
14905 fi
14906 ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" "$ac_includes_default"
14907 if test "x$ac_cv_type_int32" = xyes; then :
14908
14909 cat >>confdefs.h <<_ACEOF
14910 #define HAVE_INT32 1
14911 _ACEOF
14912
14913
14914 fi
14915 ac_fn_c_check_type "$LINENO" "u_int32" "ac_cv_type_u_int32" "$ac_includes_default"
14916 if test "x$ac_cv_type_u_int32" = xyes; then :
14917
14918 cat >>confdefs.h <<_ACEOF
14919 #define HAVE_U_INT32 1
14920 _ACEOF
14921
14922
14923 fi
14924
14925
14926
14927
14928 case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
14929  no::yes)
14930     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
14931 $as_echo_n "checking for int32 with DNS headers included... " >&6; }
14932 if ${ntp_cv_type_int32_with_dns+:} false; then :
14933   $as_echo_n "(cached) " >&6
14934 else
14935   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14936 /* end confdefs.h.  */
14937
14938                     #ifdef HAVE_ARPA_NAMESER_H
14939                     # include <arpa/nameser.h>
14940                     #endif
14941                     #include <resolv.h>
14942
14943 int
14944 main ()
14945 {
14946
14947                     size_t cb = sizeof(int32);
14948
14949
14950   ;
14951   return 0;
14952 }
14953 _ACEOF
14954 if ac_fn_c_try_compile "$LINENO"; then :
14955   ntp_cv_type_int32_with_dns=yes
14956 else
14957   ntp_cv_type_int32_with_dns=no
14958
14959 fi
14960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14961
14962 fi
14963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
14964 $as_echo "$ntp_cv_type_int32_with_dns" >&6; }
14965     case "$ntp_cv_type_int32_with_dns" in
14966      yes)
14967
14968 $as_echo "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
14969
14970     esac
14971 esac
14972
14973 case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
14974  no::yes)
14975     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
14976 $as_echo_n "checking for u_int32 with DNS headers included... " >&6; }
14977 if ${ntp_cv_type_u_int32_with_dns+:} false; then :
14978   $as_echo_n "(cached) " >&6
14979 else
14980   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14981 /* end confdefs.h.  */
14982
14983                     #ifdef HAVE_ARPA_NAMESER_H
14984                     # include <arpa/nameser.h>
14985                     #endif
14986                     #include <resolv.h>
14987
14988 int
14989 main ()
14990 {
14991
14992                     size_t cb = sizeof(u_int32);
14993
14994
14995   ;
14996   return 0;
14997 }
14998 _ACEOF
14999 if ac_fn_c_try_compile "$LINENO"; then :
15000   ntp_cv_type_u_int32_with_dns=yes
15001 else
15002   ntp_cv_type_u_int32_with_dns=no
15003
15004 fi
15005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15006
15007 fi
15008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
15009 $as_echo "$ntp_cv_type_u_int32_with_dns" >&6; }
15010     case "$ntp_cv_type_u_int32_with_dns" in
15011      yes)
15012
15013 $as_echo "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
15014
15015     esac
15016 esac
15017
15018 for ac_header in sys/timepps.h
15019 do :
15020   ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
15021         #ifdef HAVE_SYS_TIME_H
15022         # include <sys/time.h>
15023         #endif
15024         #ifdef HAVE_ERRNO_H
15025         # include <errno.h>
15026         #endif
15027
15028
15029 "
15030 if test "x$ac_cv_header_sys_timepps_h" = xyes; then :
15031   cat >>confdefs.h <<_ACEOF
15032 #define HAVE_SYS_TIMEPPS_H 1
15033 _ACEOF
15034
15035 fi
15036
15037 done
15038
15039
15040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
15041 $as_echo_n "checking for struct timespec... " >&6; }
15042 if ${ntp_cv_struct_timespec+:} false; then :
15043   $as_echo_n "(cached) " >&6
15044 else
15045   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15046 /* end confdefs.h.  */
15047
15048                 #include <sys/time.h>
15049                 /* Under SunOS, timespec is in sys/timepps.h,
15050                    which needs errno.h and FRAC */
15051                 #ifdef HAVE_ERRNO_H
15052                 # include <errno.h>
15053                 #endif
15054                 #ifdef HAVE_SYS_TIMEPPS_H
15055                 # define FRAC 4294967296
15056                 # include <sys/timepps.h>
15057                 #endif
15058
15059 int
15060 main ()
15061 {
15062
15063                 struct timespec n;
15064
15065
15066   ;
15067   return 0;
15068 }
15069 _ACEOF
15070 if ac_fn_c_try_compile "$LINENO"; then :
15071   ntp_cv_struct_timespec=yes
15072 else
15073   ntp_cv_struct_timespec=no
15074
15075 fi
15076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15077
15078 fi
15079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_timespec" >&5
15080 $as_echo "$ntp_cv_struct_timespec" >&6; }
15081 case "$ntp_cv_struct_timespec" in
15082  yes)
15083
15084 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
15085
15086 esac
15087
15088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ntptimeval" >&5
15089 $as_echo_n "checking for struct ntptimeval... " >&6; }
15090 if ${ntp_cv_struct_ntptimeval+:} false; then :
15091   $as_echo_n "(cached) " >&6
15092 else
15093   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15094 /* end confdefs.h.  */
15095
15096                 #include <sys/time.h>
15097                 #include <sys/timex.h>
15098
15099 int
15100 main ()
15101 {
15102
15103                 struct ntptimeval n;
15104
15105
15106   ;
15107   return 0;
15108 }
15109 _ACEOF
15110 if ac_fn_c_try_compile "$LINENO"; then :
15111   ntp_cv_struct_ntptimeval=yes
15112 else
15113   ntp_cv_struct_ntptimeval=no
15114
15115 fi
15116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15117
15118 fi
15119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ntptimeval" >&5
15120 $as_echo "$ntp_cv_struct_ntptimeval" >&6; }
15121 case "$ntp_cv_struct_ntptimeval" in
15122  yes)
15123
15124 $as_echo "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
15125
15126 esac
15127
15128 for ac_header in md5.h
15129 do :
15130   ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
15131         #ifdef HAVE_SYS_TYPES_H
15132         # include <sys/types.h>
15133         #endif
15134
15135
15136 "
15137 if test "x$ac_cv_header_md5_h" = xyes; then :
15138   cat >>confdefs.h <<_ACEOF
15139 #define HAVE_MD5_H 1
15140 _ACEOF
15141
15142 fi
15143
15144 done
15145
15146
15147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
15148 $as_echo_n "checking for library containing MD5Init... " >&6; }
15149 if ${ac_cv_search_MD5Init+:} false; then :
15150   $as_echo_n "(cached) " >&6
15151 else
15152   ac_func_search_save_LIBS=$LIBS
15153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15154 /* end confdefs.h.  */
15155
15156 /* Override any GCC internal prototype to avoid an error.
15157    Use char because int might match the return type of a GCC
15158    builtin and then its argument prototype would still apply.  */
15159 #ifdef __cplusplus
15160 extern "C"
15161 #endif
15162 char MD5Init ();
15163 int
15164 main ()
15165 {
15166 return MD5Init ();
15167   ;
15168   return 0;
15169 }
15170 _ACEOF
15171 for ac_lib in '' md5 md; do
15172   if test -z "$ac_lib"; then
15173     ac_res="none required"
15174   else
15175     ac_res=-l$ac_lib
15176     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15177   fi
15178   if ac_fn_c_try_link "$LINENO"; then :
15179   ac_cv_search_MD5Init=$ac_res
15180 fi
15181 rm -f core conftest.err conftest.$ac_objext \
15182     conftest$ac_exeext
15183   if ${ac_cv_search_MD5Init+:} false; then :
15184   break
15185 fi
15186 done
15187 if ${ac_cv_search_MD5Init+:} false; then :
15188
15189 else
15190   ac_cv_search_MD5Init=no
15191 fi
15192 rm conftest.$ac_ext
15193 LIBS=$ac_func_search_save_LIBS
15194 fi
15195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
15196 $as_echo "$ac_cv_search_MD5Init" >&6; }
15197 ac_res=$ac_cv_search_MD5Init
15198 if test "$ac_res" != no; then :
15199   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15200
15201 fi
15202
15203 for ac_func in MD5Init sysconf getdtablesize sigaction sigset sigvec
15204 do :
15205   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15206 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15207 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15208   cat >>confdefs.h <<_ACEOF
15209 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15210 _ACEOF
15211
15212 fi
15213 done
15214
15215
15216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
15217 $as_echo_n "checking for SIGIO... " >&6; }
15218 if ${ntp_cv_hdr_def_sigio+:} false; then :
15219   $as_echo_n "(cached) " >&6
15220 else
15221   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15222 /* end confdefs.h.  */
15223
15224             #include <signal.h>
15225
15226             #ifndef SIGIO
15227             # error
15228             #endif
15229
15230 _ACEOF
15231 if ac_fn_c_try_cpp "$LINENO"; then :
15232   ntp_cv_hdr_def_sigio=yes
15233 else
15234   ntp_cv_hdr_def_sigio=no
15235
15236 fi
15237 rm -f conftest.err conftest.i conftest.$ac_ext
15238
15239 fi
15240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
15241 $as_echo "$ntp_cv_hdr_def_sigio" >&6; }
15242
15243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
15244 $as_echo_n "checking if we want to use SIGIO... " >&6; }
15245 ans=no
15246 case "$ntp_cv_hdr_def_sigio" in
15247  yes)
15248     ans=yes
15249     case "$host" in
15250      alpha*-dec-osf4*|alpha*-dec-osf5*)
15251         ans=no
15252         ;;
15253      *-convex-*)
15254         ans=no
15255         ;;
15256      *-dec-*)
15257         ans=no
15258         ;;
15259      *-pc-cygwin*)
15260         ans=no
15261         ;;
15262      *-sni-sysv*)
15263         ans=no
15264         ;;
15265      *-stratus-vos)
15266         ans=no
15267         ;;
15268      *-univel-sysv*)
15269         ans=no
15270         ;;
15271      *-*-irix6*)
15272         ans=no
15273         ;;
15274      *-*-freebsd*)
15275         ans=no
15276         ;;
15277      *-*-*linux*)
15278         ans=no
15279         ;;
15280      *-*-unicosmp*)
15281         ans=no
15282         ;;
15283      *-*-kfreebsd*)
15284         ans=no
15285         ;;
15286      m68k-*-mint*)
15287         ans=no
15288         ;;
15289     esac
15290     ;;
15291 esac
15292 case "$ans" in
15293  yes)
15294
15295 $as_echo "#define HAVE_SIGNALED_IO 1" >>confdefs.h
15296
15297 esac
15298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
15299 $as_echo "$ans" >&6; }
15300
15301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
15302 $as_echo_n "checking for SIGPOLL... " >&6; }
15303 if ${ntp_cv_hdr_def_sigpoll+:} false; then :
15304   $as_echo_n "(cached) " >&6
15305 else
15306   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15307 /* end confdefs.h.  */
15308
15309             #include <signal.h>
15310
15311             #ifndef SIGPOLL
15312             # error
15313             #endif
15314
15315 _ACEOF
15316 if ac_fn_c_try_cpp "$LINENO"; then :
15317   ntp_cv_hdr_def_sigpoll=yes
15318 else
15319   ntp_cv_hdr_def_sigpoll=no
15320
15321 fi
15322 rm -f conftest.err conftest.i conftest.$ac_ext
15323
15324 fi
15325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
15326 $as_echo "$ntp_cv_hdr_def_sigpoll" >&6; }
15327
15328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
15329 $as_echo_n "checking if we can use SIGPOLL for UDP I/O... " >&6; }
15330 ans=no
15331 case "$ntp_cv_hdr_def_sigpoll" in
15332  yes)
15333     case "$host" in
15334      mips-sgi-irix*)
15335         ans=no
15336         ;;
15337      vax-dec-bsd)
15338         ans=no
15339         ;;
15340      *-pc-cygwin*)
15341         ans=no
15342         ;;
15343      *-sni-sysv*)
15344         ans=no
15345         ;;
15346      *-stratus-vos)
15347         ans=no
15348         ;;
15349      *-*-aix[4-9]*)
15350         # XXX Only verified thru AIX6
15351         ans=no
15352         ;;
15353      *-*-hpux*)
15354         ans=no
15355         ;;
15356      *-*-*linux*)
15357         ans=no
15358         ;;
15359      *-*-osf*)
15360         ans=no
15361         ;;
15362      *-*-qnx*)
15363         ans=no
15364         ;;
15365      *-*-sunos*)
15366         ans=no
15367         ;;
15368      *-*-solaris*)
15369         ans=no
15370         ;;
15371      *-*-ultrix*)
15372         ans=no
15373         ;;
15374      *-*-unicosmp*)
15375         ans=no
15376         ;;
15377      *-*-kfreebsd*)
15378         ans=no
15379         ;;
15380      *) ans=yes
15381         ;;
15382     esac
15383     ;;
15384 esac
15385 case "$ans" in
15386  yes)
15387
15388 $as_echo "#define USE_UDP_SIGPOLL 1" >>confdefs.h
15389
15390 esac
15391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
15392 $as_echo "$ans" >&6; }
15393
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
15395 $as_echo_n "checking if we can use SIGPOLL for TTY I/O... " >&6; }
15396 ans=no
15397 case "$ntp_cv_hdr_def_sigpoll" in
15398  yes)
15399     case "$host" in
15400      mips-sgi-irix*)
15401         ans=no
15402         ;;
15403      vax-dec-bsd)
15404         ans=no
15405         ;;
15406      *-pc-cygwin*)
15407         ans=no
15408         ;;
15409      *-sni-sysv*)
15410         ans=no
15411         ;;
15412      *-stratus-vos)
15413         ans=no
15414         ;;
15415      *-*-aix[4-9]*)
15416         # XXX Only verified thru AIX6
15417         ans=no
15418         ;;
15419      *-*-hpux*)
15420         ans=no
15421         ;;
15422      *-*-*linux*)
15423         ans=no
15424         ;;
15425      *-*-osf*)
15426         ans=no
15427         ;;
15428      *-*-sunos*)
15429         ans=no
15430         ;;
15431      *-*-ultrix*)
15432         ans=no
15433         ;;
15434      *-*-qnx*)
15435         ans=no
15436         ;;
15437      *-*-unicosmp*)
15438         ans=no
15439         ;;
15440      *-*-kfreebsd*)
15441         ans=no
15442         ;;
15443      *) ans=yes
15444         ;;
15445     esac
15446     ;;
15447 esac
15448 case "$ans" in
15449  yes)
15450
15451 $as_echo "#define USE_TTY_SIGPOLL 1" >>confdefs.h
15452
15453 esac
15454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
15455 $as_echo "$ans" >&6; }
15456
15457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
15458 $as_echo_n "checking number of arguments to gettimeofday()... " >&6; }
15459 if ${ntp_cv_func_Xettimeofday_nargs+:} false; then :
15460   $as_echo_n "(cached) " >&6
15461 else
15462   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15463 /* end confdefs.h.  */
15464
15465                 #include <sys/time.h>
15466
15467 int
15468 main ()
15469 {
15470
15471                 gettimeofday(0, 0);
15472                 settimeofday(0, 0);
15473
15474
15475   ;
15476   return 0;
15477 }
15478 _ACEOF
15479 if ac_fn_c_try_compile "$LINENO"; then :
15480   ntp_cv_func_Xettimeofday_nargs=2
15481 else
15482   ntp_cv_func_Xettimeofday_nargs=1
15483
15484 fi
15485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15486
15487 fi
15488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
15489 $as_echo "$ntp_cv_func_Xettimeofday_nargs" >&6; }
15490 case "$ntp_cv_func_Xettimeofday_nargs" in
15491  1)
15492
15493 $as_echo "#define SYSV_TIMEOFDAY 1" >>confdefs.h
15494
15495 esac
15496
15497 for ac_func in settimeofday
15498 do :
15499   ac_fn_c_check_func "$LINENO" "settimeofday" "ac_cv_func_settimeofday"
15500 if test "x$ac_cv_func_settimeofday" = xyes; then :
15501   cat >>confdefs.h <<_ACEOF
15502 #define HAVE_SETTIMEOFDAY 1
15503 _ACEOF
15504
15505 else
15506
15507     case "$host" in
15508      *-*-mpeix*) ac_cv_func_settimeofday=yes
15509     esac
15510
15511 fi
15512 done
15513
15514
15515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
15516 $as_echo_n "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
15517 ntp_warning='GRONK'
15518 ans=none
15519 case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
15520  yes*)
15521     ntp_warning=''
15522     ans='clock_settime()'
15523     ;;
15524  noyes*)
15525     ntp_warning='But clock_settime() would be better (if we had it)'
15526     ans='settimeofday()'
15527     ;;
15528  nonoyes)
15529     ntp_warning='Which is the worst of the three'
15530     ans='stime()'
15531     ;;
15532  *)
15533     case "$build" in
15534      $host)
15535         ntp_warning='Which leaves us with nothing to use!'
15536     esac
15537 esac
15538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
15539 $as_echo "$ans" >&6; }
15540 case "$ntp_warning" in
15541  '')
15542     ;;
15543  *)
15544     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
15545 $as_echo "$as_me: WARNING: *** $ntp_warning ***" >&2;}
15546     ;;
15547 esac
15548
15549
15550 LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
15551 LIBS=$__LIBS
15552 { __LIBS=; unset __LIBS;}
15553
15554
15555
15556 # Check whether --enable-shared was given.
15557 if test "${enable_shared+set}" = set; then :
15558   enableval=$enable_shared; p=${PACKAGE-default}
15559     case $enableval in
15560     yes) enable_shared=yes ;;
15561     no) enable_shared=no ;;
15562     *)
15563       enable_shared=no
15564       # Look at the argument we got.  We use all the common list separators.
15565       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
15566       for pkg in $enableval; do
15567         IFS=$lt_save_ifs
15568         if test "X$pkg" = "X$p"; then
15569           enable_shared=yes
15570         fi
15571       done
15572       IFS=$lt_save_ifs
15573       ;;
15574     esac
15575 else
15576   enable_shared=no
15577 fi
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587 case `pwd` in
15588   *\ * | *\     *)
15589     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
15590 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
15591 esac
15592
15593
15594
15595 macro_version='2.4.6'
15596 macro_revision='2.4.6'
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610 ltmain=$ac_aux_dir/ltmain.sh
15611
15612 # Backslashify metacharacters that are still active within
15613 # double-quoted strings.
15614 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
15615
15616 # Same as above, but do not quote variable references.
15617 double_quote_subst='s/\(["`\\]\)/\\\1/g'
15618
15619 # Sed substitution to delay expansion of an escaped shell variable in a
15620 # double_quote_subst'ed string.
15621 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
15622
15623 # Sed substitution to delay expansion of an escaped single quote.
15624 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
15625
15626 # Sed substitution to avoid accidental globbing in evaled expressions
15627 no_glob_subst='s/\*/\\\*/g'
15628
15629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
15630 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
15631 if ${lt_cv_path_NM+:} false; then :
15632   $as_echo_n "(cached) " >&6
15633 else
15634   if test -n "$NM"; then
15635   # Let the user override the test.
15636   lt_cv_path_NM=$NM
15637 else
15638   lt_nm_to_check=${ac_tool_prefix}nm
15639   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
15640     lt_nm_to_check="$lt_nm_to_check nm"
15641   fi
15642   for lt_tmp_nm in $lt_nm_to_check; do
15643     lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
15644     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
15645       IFS=$lt_save_ifs
15646       test -z "$ac_dir" && ac_dir=.
15647       tmp_nm=$ac_dir/$lt_tmp_nm
15648       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
15649         # Check to see if the nm accepts a BSD-compat flag.
15650         # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
15651         #   nm: unknown option "B" ignored
15652         # Tru64's nm complains that /dev/null is an invalid object file
15653         # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
15654         case $build_os in
15655         mingw*) lt_bad_file=conftest.nm/nofile ;;
15656         *) lt_bad_file=/dev/null ;;
15657         esac
15658         case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
15659         *$lt_bad_file* | *'Invalid file or object type'*)
15660           lt_cv_path_NM="$tmp_nm -B"
15661           break 2
15662           ;;
15663         *)
15664           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
15665           */dev/null*)
15666             lt_cv_path_NM="$tmp_nm -p"
15667             break 2
15668             ;;
15669           *)
15670             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
15671             continue # so that we can try to find one that supports BSD flags
15672             ;;
15673           esac
15674           ;;
15675         esac
15676       fi
15677     done
15678     IFS=$lt_save_ifs
15679   done
15680   : ${lt_cv_path_NM=no}
15681 fi
15682 fi
15683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
15684 $as_echo "$lt_cv_path_NM" >&6; }
15685 if test no != "$lt_cv_path_NM"; then
15686   NM=$lt_cv_path_NM
15687 else
15688   # Didn't find any BSD compatible name lister, look for dumpbin.
15689   if test -n "$DUMPBIN"; then :
15690     # Let the user override the test.
15691   else
15692     if test -n "$ac_tool_prefix"; then
15693   for ac_prog in dumpbin "link -dump"
15694   do
15695     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
15696 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
15697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15698 $as_echo_n "checking for $ac_word... " >&6; }
15699 if ${ac_cv_prog_DUMPBIN+:} false; then :
15700   $as_echo_n "(cached) " >&6
15701 else
15702   if test -n "$DUMPBIN"; then
15703   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
15704 else
15705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15706 for as_dir in $PATH
15707 do
15708   IFS=$as_save_IFS
15709   test -z "$as_dir" && as_dir=.
15710     for ac_exec_ext in '' $ac_executable_extensions; do
15711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15712     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
15713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15714     break 2
15715   fi
15716 done
15717   done
15718 IFS=$as_save_IFS
15719
15720 fi
15721 fi
15722 DUMPBIN=$ac_cv_prog_DUMPBIN
15723 if test -n "$DUMPBIN"; then
15724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
15725 $as_echo "$DUMPBIN" >&6; }
15726 else
15727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15728 $as_echo "no" >&6; }
15729 fi
15730
15731
15732     test -n "$DUMPBIN" && break
15733   done
15734 fi
15735 if test -z "$DUMPBIN"; then
15736   ac_ct_DUMPBIN=$DUMPBIN
15737   for ac_prog in dumpbin "link -dump"
15738 do
15739   # Extract the first word of "$ac_prog", so it can be a program name with args.
15740 set dummy $ac_prog; ac_word=$2
15741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15742 $as_echo_n "checking for $ac_word... " >&6; }
15743 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
15744   $as_echo_n "(cached) " >&6
15745 else
15746   if test -n "$ac_ct_DUMPBIN"; then
15747   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
15748 else
15749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15750 for as_dir in $PATH
15751 do
15752   IFS=$as_save_IFS
15753   test -z "$as_dir" && as_dir=.
15754     for ac_exec_ext in '' $ac_executable_extensions; do
15755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15756     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
15757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15758     break 2
15759   fi
15760 done
15761   done
15762 IFS=$as_save_IFS
15763
15764 fi
15765 fi
15766 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
15767 if test -n "$ac_ct_DUMPBIN"; then
15768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
15769 $as_echo "$ac_ct_DUMPBIN" >&6; }
15770 else
15771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15772 $as_echo "no" >&6; }
15773 fi
15774
15775
15776   test -n "$ac_ct_DUMPBIN" && break
15777 done
15778
15779   if test "x$ac_ct_DUMPBIN" = x; then
15780     DUMPBIN=":"
15781   else
15782     case $cross_compiling:$ac_tool_warned in
15783 yes:)
15784 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
15785 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
15786 ac_tool_warned=yes ;;
15787 esac
15788     DUMPBIN=$ac_ct_DUMPBIN
15789   fi
15790 fi
15791
15792     case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
15793     *COFF*)
15794       DUMPBIN="$DUMPBIN -symbols -headers"
15795       ;;
15796     *)
15797       DUMPBIN=:
15798       ;;
15799     esac
15800   fi
15801
15802   if test : != "$DUMPBIN"; then
15803     NM=$DUMPBIN
15804   fi
15805 fi
15806 test -z "$NM" && NM=nm
15807
15808
15809
15810
15811
15812
15813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
15814 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
15815 if ${lt_cv_nm_interface+:} false; then :
15816   $as_echo_n "(cached) " >&6
15817 else
15818   lt_cv_nm_interface="BSD nm"
15819   echo "int some_variable = 0;" > conftest.$ac_ext
15820   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
15821   (eval "$ac_compile" 2>conftest.err)
15822   cat conftest.err >&5
15823   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
15824   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
15825   cat conftest.err >&5
15826   (eval echo "\"\$as_me:$LINENO: output\"" >&5)
15827   cat conftest.out >&5
15828   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
15829     lt_cv_nm_interface="MS dumpbin"
15830   fi
15831   rm -f conftest*
15832 fi
15833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
15834 $as_echo "$lt_cv_nm_interface" >&6; }
15835
15836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
15837 $as_echo_n "checking whether ln -s works... " >&6; }
15838 LN_S=$as_ln_s
15839 if test "$LN_S" = "ln -s"; then
15840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15841 $as_echo "yes" >&6; }
15842 else
15843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
15844 $as_echo "no, using $LN_S" >&6; }
15845 fi
15846
15847 # find the maximum length of command line arguments
15848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
15849 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
15850 if ${lt_cv_sys_max_cmd_len+:} false; then :
15851   $as_echo_n "(cached) " >&6
15852 else
15853     i=0
15854   teststring=ABCD
15855
15856   case $build_os in
15857   msdosdjgpp*)
15858     # On DJGPP, this test can blow up pretty badly due to problems in libc
15859     # (any single argument exceeding 2000 bytes causes a buffer overrun
15860     # during glob expansion).  Even if it were fixed, the result of this
15861     # check would be larger than it should be.
15862     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
15863     ;;
15864
15865   gnu*)
15866     # Under GNU Hurd, this test is not required because there is
15867     # no limit to the length of command line arguments.
15868     # Libtool will interpret -1 as no limit whatsoever
15869     lt_cv_sys_max_cmd_len=-1;
15870     ;;
15871
15872   cygwin* | mingw* | cegcc*)
15873     # On Win9x/ME, this test blows up -- it succeeds, but takes
15874     # about 5 minutes as the teststring grows exponentially.
15875     # Worse, since 9x/ME are not pre-emptively multitasking,
15876     # you end up with a "frozen" computer, even though with patience
15877     # the test eventually succeeds (with a max line length of 256k).
15878     # Instead, let's just punt: use the minimum linelength reported by
15879     # all of the supported platforms: 8192 (on NT/2K/XP).
15880     lt_cv_sys_max_cmd_len=8192;
15881     ;;
15882
15883   mint*)
15884     # On MiNT this can take a long time and run out of memory.
15885     lt_cv_sys_max_cmd_len=8192;
15886     ;;
15887
15888   amigaos*)
15889     # On AmigaOS with pdksh, this test takes hours, literally.
15890     # So we just punt and use a minimum line length of 8192.
15891     lt_cv_sys_max_cmd_len=8192;
15892     ;;
15893
15894   bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
15895     # This has been around since 386BSD, at least.  Likely further.
15896     if test -x /sbin/sysctl; then
15897       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
15898     elif test -x /usr/sbin/sysctl; then
15899       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
15900     else
15901       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
15902     fi
15903     # And add a safety zone
15904     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
15905     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
15906     ;;
15907
15908   interix*)
15909     # We know the value 262144 and hardcode it with a safety zone (like BSD)
15910     lt_cv_sys_max_cmd_len=196608
15911     ;;
15912
15913   os2*)
15914     # The test takes a long time on OS/2.
15915     lt_cv_sys_max_cmd_len=8192
15916     ;;
15917
15918   osf*)
15919     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
15920     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
15921     # nice to cause kernel panics so lets avoid the loop below.
15922     # First set a reasonable default.
15923     lt_cv_sys_max_cmd_len=16384
15924     #
15925     if test -x /sbin/sysconfig; then
15926       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
15927         *1*) lt_cv_sys_max_cmd_len=-1 ;;
15928       esac
15929     fi
15930     ;;
15931   sco3.2v5*)
15932     lt_cv_sys_max_cmd_len=102400
15933     ;;
15934   sysv5* | sco5v6* | sysv4.2uw2*)
15935     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
15936     if test -n "$kargmax"; then
15937       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
15938     else
15939       lt_cv_sys_max_cmd_len=32768
15940     fi
15941     ;;
15942   *)
15943     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
15944     if test -n "$lt_cv_sys_max_cmd_len" && \
15945        test undefined != "$lt_cv_sys_max_cmd_len"; then
15946       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
15947       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
15948     else
15949       # Make teststring a little bigger before we do anything with it.
15950       # a 1K string should be a reasonable start.
15951       for i in 1 2 3 4 5 6 7 8; do
15952         teststring=$teststring$teststring
15953       done
15954       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
15955       # If test is not a shell built-in, we'll probably end up computing a
15956       # maximum length that is only half of the actual maximum length, but
15957       # we can't tell.
15958       while { test X`env echo "$teststring$teststring" 2>/dev/null` \
15959                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
15960               test 17 != "$i" # 1/2 MB should be enough
15961       do
15962         i=`expr $i + 1`
15963         teststring=$teststring$teststring
15964       done
15965       # Only check the string length outside the loop.
15966       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
15967       teststring=
15968       # Add a significant safety factor because C++ compilers can tack on
15969       # massive amounts of additional arguments before passing them to the
15970       # linker.  It appears as though 1/2 is a usable value.
15971       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
15972     fi
15973     ;;
15974   esac
15975
15976 fi
15977
15978 if test -n "$lt_cv_sys_max_cmd_len"; then
15979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
15980 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
15981 else
15982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15983 $as_echo "none" >&6; }
15984 fi
15985 max_cmd_len=$lt_cv_sys_max_cmd_len
15986
15987
15988
15989
15990
15991
15992 : ${CP="cp -f"}
15993 : ${MV="mv -f"}
15994 : ${RM="rm -f"}
15995
15996 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
15997   lt_unset=unset
15998 else
15999   lt_unset=false
16000 fi
16001
16002
16003
16004
16005
16006 # test EBCDIC or ASCII
16007 case `echo X|tr X '\101'` in
16008  A) # ASCII based system
16009     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
16010   lt_SP2NL='tr \040 \012'
16011   lt_NL2SP='tr \015\012 \040\040'
16012   ;;
16013  *) # EBCDIC based system
16014   lt_SP2NL='tr \100 \n'
16015   lt_NL2SP='tr \r\n \100\100'
16016   ;;
16017 esac
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
16028 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
16029 if ${lt_cv_to_host_file_cmd+:} false; then :
16030   $as_echo_n "(cached) " >&6
16031 else
16032   case $host in
16033   *-*-mingw* )
16034     case $build in
16035       *-*-mingw* ) # actually msys
16036         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
16037         ;;
16038       *-*-cygwin* )
16039         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
16040         ;;
16041       * ) # otherwise, assume *nix
16042         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
16043         ;;
16044     esac
16045     ;;
16046   *-*-cygwin* )
16047     case $build in
16048       *-*-mingw* ) # actually msys
16049         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
16050         ;;
16051       *-*-cygwin* )
16052         lt_cv_to_host_file_cmd=func_convert_file_noop
16053         ;;
16054       * ) # otherwise, assume *nix
16055         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
16056         ;;
16057     esac
16058     ;;
16059   * ) # unhandled hosts (and "normal" native builds)
16060     lt_cv_to_host_file_cmd=func_convert_file_noop
16061     ;;
16062 esac
16063
16064 fi
16065
16066 to_host_file_cmd=$lt_cv_to_host_file_cmd
16067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
16068 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
16069
16070
16071
16072
16073
16074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
16075 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
16076 if ${lt_cv_to_tool_file_cmd+:} false; then :
16077   $as_echo_n "(cached) " >&6
16078 else
16079   #assume ordinary cross tools, or native build.
16080 lt_cv_to_tool_file_cmd=func_convert_file_noop
16081 case $host in
16082   *-*-mingw* )
16083     case $build in
16084       *-*-mingw* ) # actually msys
16085         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
16086         ;;
16087     esac
16088     ;;
16089 esac
16090
16091 fi
16092
16093 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
16094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
16095 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
16096
16097
16098
16099
16100
16101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
16102 $as_echo_n "checking for $LD option to reload object files... " >&6; }
16103 if ${lt_cv_ld_reload_flag+:} false; then :
16104   $as_echo_n "(cached) " >&6
16105 else
16106   lt_cv_ld_reload_flag='-r'
16107 fi
16108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
16109 $as_echo "$lt_cv_ld_reload_flag" >&6; }
16110 reload_flag=$lt_cv_ld_reload_flag
16111 case $reload_flag in
16112 "" | " "*) ;;
16113 *) reload_flag=" $reload_flag" ;;
16114 esac
16115 reload_cmds='$LD$reload_flag -o $output$reload_objs'
16116 case $host_os in
16117   cygwin* | mingw* | pw32* | cegcc*)
16118     if test yes != "$GCC"; then
16119       reload_cmds=false
16120     fi
16121     ;;
16122   darwin*)
16123     if test yes = "$GCC"; then
16124       reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
16125     else
16126       reload_cmds='$LD$reload_flag -o $output$reload_objs'
16127     fi
16128     ;;
16129 esac
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139 if test -n "$ac_tool_prefix"; then
16140   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
16141 set dummy ${ac_tool_prefix}objdump; ac_word=$2
16142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16143 $as_echo_n "checking for $ac_word... " >&6; }
16144 if ${ac_cv_prog_OBJDUMP+:} false; then :
16145   $as_echo_n "(cached) " >&6
16146 else
16147   if test -n "$OBJDUMP"; then
16148   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
16149 else
16150 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16151 for as_dir in $PATH
16152 do
16153   IFS=$as_save_IFS
16154   test -z "$as_dir" && as_dir=.
16155     for ac_exec_ext in '' $ac_executable_extensions; do
16156   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16157     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
16158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16159     break 2
16160   fi
16161 done
16162   done
16163 IFS=$as_save_IFS
16164
16165 fi
16166 fi
16167 OBJDUMP=$ac_cv_prog_OBJDUMP
16168 if test -n "$OBJDUMP"; then
16169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
16170 $as_echo "$OBJDUMP" >&6; }
16171 else
16172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16173 $as_echo "no" >&6; }
16174 fi
16175
16176
16177 fi
16178 if test -z "$ac_cv_prog_OBJDUMP"; then
16179   ac_ct_OBJDUMP=$OBJDUMP
16180   # Extract the first word of "objdump", so it can be a program name with args.
16181 set dummy objdump; ac_word=$2
16182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16183 $as_echo_n "checking for $ac_word... " >&6; }
16184 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
16185   $as_echo_n "(cached) " >&6
16186 else
16187   if test -n "$ac_ct_OBJDUMP"; then
16188   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
16189 else
16190 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16191 for as_dir in $PATH
16192 do
16193   IFS=$as_save_IFS
16194   test -z "$as_dir" && as_dir=.
16195     for ac_exec_ext in '' $ac_executable_extensions; do
16196   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16197     ac_cv_prog_ac_ct_OBJDUMP="objdump"
16198     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16199     break 2
16200   fi
16201 done
16202   done
16203 IFS=$as_save_IFS
16204
16205 fi
16206 fi
16207 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
16208 if test -n "$ac_ct_OBJDUMP"; then
16209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
16210 $as_echo "$ac_ct_OBJDUMP" >&6; }
16211 else
16212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16213 $as_echo "no" >&6; }
16214 fi
16215
16216   if test "x$ac_ct_OBJDUMP" = x; then
16217     OBJDUMP="false"
16218   else
16219     case $cross_compiling:$ac_tool_warned in
16220 yes:)
16221 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16222 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16223 ac_tool_warned=yes ;;
16224 esac
16225     OBJDUMP=$ac_ct_OBJDUMP
16226   fi
16227 else
16228   OBJDUMP="$ac_cv_prog_OBJDUMP"
16229 fi
16230
16231 test -z "$OBJDUMP" && OBJDUMP=objdump
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
16242 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
16243 if ${lt_cv_deplibs_check_method+:} false; then :
16244   $as_echo_n "(cached) " >&6
16245 else
16246   lt_cv_file_magic_cmd='$MAGIC_CMD'
16247 lt_cv_file_magic_test_file=
16248 lt_cv_deplibs_check_method='unknown'
16249 # Need to set the preceding variable on all platforms that support
16250 # interlibrary dependencies.
16251 # 'none' -- dependencies not supported.
16252 # 'unknown' -- same as none, but documents that we really don't know.
16253 # 'pass_all' -- all dependencies passed with no checks.
16254 # 'test_compile' -- check by making test program.
16255 # 'file_magic [[regex]]' -- check by looking for files in library path
16256 # that responds to the $file_magic_cmd with a given extended regex.
16257 # If you have 'file' or equivalent on your system and you're not sure
16258 # whether 'pass_all' will *always* work, you probably want this one.
16259
16260 case $host_os in
16261 aix[4-9]*)
16262   lt_cv_deplibs_check_method=pass_all
16263   ;;
16264
16265 beos*)
16266   lt_cv_deplibs_check_method=pass_all
16267   ;;
16268
16269 bsdi[45]*)
16270   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
16271   lt_cv_file_magic_cmd='/usr/bin/file -L'
16272   lt_cv_file_magic_test_file=/shlib/libc.so
16273   ;;
16274
16275 cygwin*)
16276   # func_win32_libid is a shell function defined in ltmain.sh
16277   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
16278   lt_cv_file_magic_cmd='func_win32_libid'
16279   ;;
16280
16281 mingw* | pw32*)
16282   # Base MSYS/MinGW do not provide the 'file' command needed by
16283   # func_win32_libid shell function, so use a weaker test based on 'objdump',
16284   # unless we find 'file', for example because we are cross-compiling.
16285   if ( file / ) >/dev/null 2>&1; then
16286     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
16287     lt_cv_file_magic_cmd='func_win32_libid'
16288   else
16289     # Keep this pattern in sync with the one in func_win32_libid.
16290     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
16291     lt_cv_file_magic_cmd='$OBJDUMP -f'
16292   fi
16293   ;;
16294
16295 cegcc*)
16296   # use the weaker test based on 'objdump'. See mingw*.
16297   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
16298   lt_cv_file_magic_cmd='$OBJDUMP -f'
16299   ;;
16300
16301 darwin* | rhapsody*)
16302   lt_cv_deplibs_check_method=pass_all
16303   ;;
16304
16305 freebsd* | dragonfly*)
16306   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
16307     case $host_cpu in
16308     i*86 )
16309       # Not sure whether the presence of OpenBSD here was a mistake.
16310       # Let's accept both of them until this is cleared up.
16311       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
16312       lt_cv_file_magic_cmd=/usr/bin/file
16313       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
16314       ;;
16315     esac
16316   else
16317     lt_cv_deplibs_check_method=pass_all
16318   fi
16319   ;;
16320
16321 haiku*)
16322   lt_cv_deplibs_check_method=pass_all
16323   ;;
16324
16325 hpux10.20* | hpux11*)
16326   lt_cv_file_magic_cmd=/usr/bin/file
16327   case $host_cpu in
16328   ia64*)
16329     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
16330     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
16331     ;;
16332   hppa*64*)
16333     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]'
16334     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
16335     ;;
16336   *)
16337     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
16338     lt_cv_file_magic_test_file=/usr/lib/libc.sl
16339     ;;
16340   esac
16341   ;;
16342
16343 interix[3-9]*)
16344   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
16345   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
16346   ;;
16347
16348 irix5* | irix6* | nonstopux*)
16349   case $LD in
16350   *-32|*"-32 ") libmagic=32-bit;;
16351   *-n32|*"-n32 ") libmagic=N32;;
16352   *-64|*"-64 ") libmagic=64-bit;;
16353   *) libmagic=never-match;;
16354   esac
16355   lt_cv_deplibs_check_method=pass_all
16356   ;;
16357
16358 # This must be glibc/ELF.
16359 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
16360   lt_cv_deplibs_check_method=pass_all
16361   ;;
16362
16363 netbsd*)
16364   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
16365     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
16366   else
16367     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
16368   fi
16369   ;;
16370
16371 newos6*)
16372   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
16373   lt_cv_file_magic_cmd=/usr/bin/file
16374   lt_cv_file_magic_test_file=/usr/lib/libnls.so
16375   ;;
16376
16377 *nto* | *qnx*)
16378   lt_cv_deplibs_check_method=pass_all
16379   ;;
16380
16381 openbsd* | bitrig*)
16382   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
16383     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
16384   else
16385     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
16386   fi
16387   ;;
16388
16389 osf3* | osf4* | osf5*)
16390   lt_cv_deplibs_check_method=pass_all
16391   ;;
16392
16393 rdos*)
16394   lt_cv_deplibs_check_method=pass_all
16395   ;;
16396
16397 solaris*)
16398   lt_cv_deplibs_check_method=pass_all
16399   ;;
16400
16401 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
16402   lt_cv_deplibs_check_method=pass_all
16403   ;;
16404
16405 sysv4 | sysv4.3*)
16406   case $host_vendor in
16407   motorola)
16408     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]'
16409     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
16410     ;;
16411   ncr)
16412     lt_cv_deplibs_check_method=pass_all
16413     ;;
16414   sequent)
16415     lt_cv_file_magic_cmd='/bin/file'
16416     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
16417     ;;
16418   sni)
16419     lt_cv_file_magic_cmd='/bin/file'
16420     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
16421     lt_cv_file_magic_test_file=/lib/libc.so
16422     ;;
16423   siemens)
16424     lt_cv_deplibs_check_method=pass_all
16425     ;;
16426   pc)
16427     lt_cv_deplibs_check_method=pass_all
16428     ;;
16429   esac
16430   ;;
16431
16432 tpf*)
16433   lt_cv_deplibs_check_method=pass_all
16434   ;;
16435 os2*)
16436   lt_cv_deplibs_check_method=pass_all
16437   ;;
16438 esac
16439
16440 fi
16441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
16442 $as_echo "$lt_cv_deplibs_check_method" >&6; }
16443
16444 file_magic_glob=
16445 want_nocaseglob=no
16446 if test "$build" = "$host"; then
16447   case $host_os in
16448   mingw* | pw32*)
16449     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
16450       want_nocaseglob=yes
16451     else
16452       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
16453     fi
16454     ;;
16455   esac
16456 fi
16457
16458 file_magic_cmd=$lt_cv_file_magic_cmd
16459 deplibs_check_method=$lt_cv_deplibs_check_method
16460 test -z "$deplibs_check_method" && deplibs_check_method=unknown
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483 if test -n "$ac_tool_prefix"; then
16484   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
16485 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
16486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16487 $as_echo_n "checking for $ac_word... " >&6; }
16488 if ${ac_cv_prog_DLLTOOL+:} false; then :
16489   $as_echo_n "(cached) " >&6
16490 else
16491   if test -n "$DLLTOOL"; then
16492   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
16493 else
16494 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16495 for as_dir in $PATH
16496 do
16497   IFS=$as_save_IFS
16498   test -z "$as_dir" && as_dir=.
16499     for ac_exec_ext in '' $ac_executable_extensions; do
16500   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16501     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
16502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16503     break 2
16504   fi
16505 done
16506   done
16507 IFS=$as_save_IFS
16508
16509 fi
16510 fi
16511 DLLTOOL=$ac_cv_prog_DLLTOOL
16512 if test -n "$DLLTOOL"; then
16513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
16514 $as_echo "$DLLTOOL" >&6; }
16515 else
16516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16517 $as_echo "no" >&6; }
16518 fi
16519
16520
16521 fi
16522 if test -z "$ac_cv_prog_DLLTOOL"; then
16523   ac_ct_DLLTOOL=$DLLTOOL
16524   # Extract the first word of "dlltool", so it can be a program name with args.
16525 set dummy dlltool; ac_word=$2
16526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16527 $as_echo_n "checking for $ac_word... " >&6; }
16528 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
16529   $as_echo_n "(cached) " >&6
16530 else
16531   if test -n "$ac_ct_DLLTOOL"; then
16532   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
16533 else
16534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16535 for as_dir in $PATH
16536 do
16537   IFS=$as_save_IFS
16538   test -z "$as_dir" && as_dir=.
16539     for ac_exec_ext in '' $ac_executable_extensions; do
16540   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16541     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
16542     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16543     break 2
16544   fi
16545 done
16546   done
16547 IFS=$as_save_IFS
16548
16549 fi
16550 fi
16551 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
16552 if test -n "$ac_ct_DLLTOOL"; then
16553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
16554 $as_echo "$ac_ct_DLLTOOL" >&6; }
16555 else
16556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16557 $as_echo "no" >&6; }
16558 fi
16559
16560   if test "x$ac_ct_DLLTOOL" = x; then
16561     DLLTOOL="false"
16562   else
16563     case $cross_compiling:$ac_tool_warned in
16564 yes:)
16565 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16566 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16567 ac_tool_warned=yes ;;
16568 esac
16569     DLLTOOL=$ac_ct_DLLTOOL
16570   fi
16571 else
16572   DLLTOOL="$ac_cv_prog_DLLTOOL"
16573 fi
16574
16575 test -z "$DLLTOOL" && DLLTOOL=dlltool
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
16587 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
16588 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
16589   $as_echo_n "(cached) " >&6
16590 else
16591   lt_cv_sharedlib_from_linklib_cmd='unknown'
16592
16593 case $host_os in
16594 cygwin* | mingw* | pw32* | cegcc*)
16595   # two different shell functions defined in ltmain.sh;
16596   # decide which one to use based on capabilities of $DLLTOOL
16597   case `$DLLTOOL --help 2>&1` in
16598   *--identify-strict*)
16599     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
16600     ;;
16601   *)
16602     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
16603     ;;
16604   esac
16605   ;;
16606 *)
16607   # fallback: assume linklib IS sharedlib
16608   lt_cv_sharedlib_from_linklib_cmd=$ECHO
16609   ;;
16610 esac
16611
16612 fi
16613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
16614 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
16615 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
16616 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
16617
16618
16619
16620
16621
16622
16623
16624 if test -n "$ac_tool_prefix"; then
16625   for ac_prog in ar
16626   do
16627     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16628 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16630 $as_echo_n "checking for $ac_word... " >&6; }
16631 if ${ac_cv_prog_AR+:} false; then :
16632   $as_echo_n "(cached) " >&6
16633 else
16634   if test -n "$AR"; then
16635   ac_cv_prog_AR="$AR" # Let the user override the test.
16636 else
16637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16638 for as_dir in $PATH
16639 do
16640   IFS=$as_save_IFS
16641   test -z "$as_dir" && as_dir=.
16642     for ac_exec_ext in '' $ac_executable_extensions; do
16643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16644     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
16645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16646     break 2
16647   fi
16648 done
16649   done
16650 IFS=$as_save_IFS
16651
16652 fi
16653 fi
16654 AR=$ac_cv_prog_AR
16655 if test -n "$AR"; then
16656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
16657 $as_echo "$AR" >&6; }
16658 else
16659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16660 $as_echo "no" >&6; }
16661 fi
16662
16663
16664     test -n "$AR" && break
16665   done
16666 fi
16667 if test -z "$AR"; then
16668   ac_ct_AR=$AR
16669   for ac_prog in ar
16670 do
16671   # Extract the first word of "$ac_prog", so it can be a program name with args.
16672 set dummy $ac_prog; ac_word=$2
16673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16674 $as_echo_n "checking for $ac_word... " >&6; }
16675 if ${ac_cv_prog_ac_ct_AR+:} false; then :
16676   $as_echo_n "(cached) " >&6
16677 else
16678   if test -n "$ac_ct_AR"; then
16679   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
16680 else
16681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16682 for as_dir in $PATH
16683 do
16684   IFS=$as_save_IFS
16685   test -z "$as_dir" && as_dir=.
16686     for ac_exec_ext in '' $ac_executable_extensions; do
16687   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16688     ac_cv_prog_ac_ct_AR="$ac_prog"
16689     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16690     break 2
16691   fi
16692 done
16693   done
16694 IFS=$as_save_IFS
16695
16696 fi
16697 fi
16698 ac_ct_AR=$ac_cv_prog_ac_ct_AR
16699 if test -n "$ac_ct_AR"; then
16700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
16701 $as_echo "$ac_ct_AR" >&6; }
16702 else
16703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16704 $as_echo "no" >&6; }
16705 fi
16706
16707
16708   test -n "$ac_ct_AR" && break
16709 done
16710
16711   if test "x$ac_ct_AR" = x; then
16712     AR="false"
16713   else
16714     case $cross_compiling:$ac_tool_warned in
16715 yes:)
16716 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16717 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16718 ac_tool_warned=yes ;;
16719 esac
16720     AR=$ac_ct_AR
16721   fi
16722 fi
16723
16724 : ${AR=ar}
16725 : ${AR_FLAGS=cru}
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
16738 $as_echo_n "checking for archiver @FILE support... " >&6; }
16739 if ${lt_cv_ar_at_file+:} false; then :
16740   $as_echo_n "(cached) " >&6
16741 else
16742   lt_cv_ar_at_file=no
16743    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16744 /* end confdefs.h.  */
16745
16746 int
16747 main ()
16748 {
16749
16750   ;
16751   return 0;
16752 }
16753 _ACEOF
16754 if ac_fn_c_try_compile "$LINENO"; then :
16755   echo conftest.$ac_objext > conftest.lst
16756       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
16757       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
16758   (eval $lt_ar_try) 2>&5
16759   ac_status=$?
16760   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16761   test $ac_status = 0; }
16762       if test 0 -eq "$ac_status"; then
16763         # Ensure the archiver fails upon bogus file names.
16764         rm -f conftest.$ac_objext libconftest.a
16765         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
16766   (eval $lt_ar_try) 2>&5
16767   ac_status=$?
16768   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16769   test $ac_status = 0; }
16770         if test 0 -ne "$ac_status"; then
16771           lt_cv_ar_at_file=@
16772         fi
16773       fi
16774       rm -f conftest.* libconftest.a
16775
16776 fi
16777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16778
16779 fi
16780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
16781 $as_echo "$lt_cv_ar_at_file" >&6; }
16782
16783 if test no = "$lt_cv_ar_at_file"; then
16784   archiver_list_spec=
16785 else
16786   archiver_list_spec=$lt_cv_ar_at_file
16787 fi
16788
16789
16790
16791
16792
16793
16794
16795 if test -n "$ac_tool_prefix"; then
16796   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
16797 set dummy ${ac_tool_prefix}strip; ac_word=$2
16798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16799 $as_echo_n "checking for $ac_word... " >&6; }
16800 if ${ac_cv_prog_STRIP+:} false; then :
16801   $as_echo_n "(cached) " >&6
16802 else
16803   if test -n "$STRIP"; then
16804   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
16805 else
16806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16807 for as_dir in $PATH
16808 do
16809   IFS=$as_save_IFS
16810   test -z "$as_dir" && as_dir=.
16811     for ac_exec_ext in '' $ac_executable_extensions; do
16812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16813     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
16814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16815     break 2
16816   fi
16817 done
16818   done
16819 IFS=$as_save_IFS
16820
16821 fi
16822 fi
16823 STRIP=$ac_cv_prog_STRIP
16824 if test -n "$STRIP"; then
16825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
16826 $as_echo "$STRIP" >&6; }
16827 else
16828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16829 $as_echo "no" >&6; }
16830 fi
16831
16832
16833 fi
16834 if test -z "$ac_cv_prog_STRIP"; then
16835   ac_ct_STRIP=$STRIP
16836   # Extract the first word of "strip", so it can be a program name with args.
16837 set dummy strip; ac_word=$2
16838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16839 $as_echo_n "checking for $ac_word... " >&6; }
16840 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
16841   $as_echo_n "(cached) " >&6
16842 else
16843   if test -n "$ac_ct_STRIP"; then
16844   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
16845 else
16846 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16847 for as_dir in $PATH
16848 do
16849   IFS=$as_save_IFS
16850   test -z "$as_dir" && as_dir=.
16851     for ac_exec_ext in '' $ac_executable_extensions; do
16852   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16853     ac_cv_prog_ac_ct_STRIP="strip"
16854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16855     break 2
16856   fi
16857 done
16858   done
16859 IFS=$as_save_IFS
16860
16861 fi
16862 fi
16863 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
16864 if test -n "$ac_ct_STRIP"; then
16865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
16866 $as_echo "$ac_ct_STRIP" >&6; }
16867 else
16868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16869 $as_echo "no" >&6; }
16870 fi
16871
16872   if test "x$ac_ct_STRIP" = x; then
16873     STRIP=":"
16874   else
16875     case $cross_compiling:$ac_tool_warned in
16876 yes:)
16877 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16878 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16879 ac_tool_warned=yes ;;
16880 esac
16881     STRIP=$ac_ct_STRIP
16882   fi
16883 else
16884   STRIP="$ac_cv_prog_STRIP"
16885 fi
16886
16887 test -z "$STRIP" && STRIP=:
16888
16889
16890
16891
16892
16893
16894 if test -n "$ac_tool_prefix"; then
16895   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
16896 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
16897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16898 $as_echo_n "checking for $ac_word... " >&6; }
16899 if ${ac_cv_prog_RANLIB+:} false; then :
16900   $as_echo_n "(cached) " >&6
16901 else
16902   if test -n "$RANLIB"; then
16903   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
16904 else
16905 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16906 for as_dir in $PATH
16907 do
16908   IFS=$as_save_IFS
16909   test -z "$as_dir" && as_dir=.
16910     for ac_exec_ext in '' $ac_executable_extensions; do
16911   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16912     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
16913     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16914     break 2
16915   fi
16916 done
16917   done
16918 IFS=$as_save_IFS
16919
16920 fi
16921 fi
16922 RANLIB=$ac_cv_prog_RANLIB
16923 if test -n "$RANLIB"; then
16924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
16925 $as_echo "$RANLIB" >&6; }
16926 else
16927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16928 $as_echo "no" >&6; }
16929 fi
16930
16931
16932 fi
16933 if test -z "$ac_cv_prog_RANLIB"; then
16934   ac_ct_RANLIB=$RANLIB
16935   # Extract the first word of "ranlib", so it can be a program name with args.
16936 set dummy ranlib; ac_word=$2
16937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16938 $as_echo_n "checking for $ac_word... " >&6; }
16939 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
16940   $as_echo_n "(cached) " >&6
16941 else
16942   if test -n "$ac_ct_RANLIB"; then
16943   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
16944 else
16945 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16946 for as_dir in $PATH
16947 do
16948   IFS=$as_save_IFS
16949   test -z "$as_dir" && as_dir=.
16950     for ac_exec_ext in '' $ac_executable_extensions; do
16951   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16952     ac_cv_prog_ac_ct_RANLIB="ranlib"
16953     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16954     break 2
16955   fi
16956 done
16957   done
16958 IFS=$as_save_IFS
16959
16960 fi
16961 fi
16962 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
16963 if test -n "$ac_ct_RANLIB"; then
16964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
16965 $as_echo "$ac_ct_RANLIB" >&6; }
16966 else
16967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16968 $as_echo "no" >&6; }
16969 fi
16970
16971   if test "x$ac_ct_RANLIB" = x; then
16972     RANLIB=":"
16973   else
16974     case $cross_compiling:$ac_tool_warned in
16975 yes:)
16976 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16977 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16978 ac_tool_warned=yes ;;
16979 esac
16980     RANLIB=$ac_ct_RANLIB
16981   fi
16982 else
16983   RANLIB="$ac_cv_prog_RANLIB"
16984 fi
16985
16986 test -z "$RANLIB" && RANLIB=:
16987
16988
16989
16990
16991
16992
16993 # Determine commands to create old-style static archives.
16994 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
16995 old_postinstall_cmds='chmod 644 $oldlib'
16996 old_postuninstall_cmds=
16997
16998 if test -n "$RANLIB"; then
16999   case $host_os in
17000   bitrig* | openbsd*)
17001     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
17002     ;;
17003   *)
17004     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
17005     ;;
17006   esac
17007   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
17008 fi
17009
17010 case $host_os in
17011   darwin*)
17012     lock_old_archive_extraction=yes ;;
17013   *)
17014     lock_old_archive_extraction=no ;;
17015 esac
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055 # If no C compiler was specified, use CC.
17056 LTCC=${LTCC-"$CC"}
17057
17058 # If no C compiler flags were specified, use CFLAGS.
17059 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
17060
17061 # Allow CC to be a program name with arguments.
17062 compiler=$CC
17063
17064
17065 # Check for command to grab the raw symbol name followed by C symbol from nm.
17066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
17067 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
17068 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
17069   $as_echo_n "(cached) " >&6
17070 else
17071
17072 # These are sane defaults that work on at least a few old systems.
17073 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
17074
17075 # Character class describing NM global symbol codes.
17076 symcode='[BCDEGRST]'
17077
17078 # Regexp to match symbols that can be accessed directly from C.
17079 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
17080
17081 # Define system-specific variables.
17082 case $host_os in
17083 aix*)
17084   symcode='[BCDT]'
17085   ;;
17086 cygwin* | mingw* | pw32* | cegcc*)
17087   symcode='[ABCDGISTW]'
17088   ;;
17089 hpux*)
17090   if test ia64 = "$host_cpu"; then
17091     symcode='[ABCDEGRST]'
17092   fi
17093   ;;
17094 irix* | nonstopux*)
17095   symcode='[BCDEGRST]'
17096   ;;
17097 osf*)
17098   symcode='[BCDEGQRST]'
17099   ;;
17100 solaris*)
17101   symcode='[BDRT]'
17102   ;;
17103 sco3.2v5*)
17104   symcode='[DT]'
17105   ;;
17106 sysv4.2uw2*)
17107   symcode='[DT]'
17108   ;;
17109 sysv5* | sco5v6* | unixware* | OpenUNIX*)
17110   symcode='[ABDT]'
17111   ;;
17112 sysv4)
17113   symcode='[DFNSTU]'
17114   ;;
17115 esac
17116
17117 # If we're using GNU nm, then use its standard symbol codes.
17118 case `$NM -V 2>&1` in
17119 *GNU* | *'with BFD'*)
17120   symcode='[ABCDGIRSTW]' ;;
17121 esac
17122
17123 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
17124   # Gets list of data symbols to import.
17125   lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
17126   # Adjust the below global symbol transforms to fixup imported variables.
17127   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
17128   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
17129   lt_c_name_lib_hook="\
17130   -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
17131   -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
17132 else
17133   # Disable hooks by default.
17134   lt_cv_sys_global_symbol_to_import=
17135   lt_cdecl_hook=
17136   lt_c_name_hook=
17137   lt_c_name_lib_hook=
17138 fi
17139
17140 # Transform an extracted symbol line into a proper C declaration.
17141 # Some systems (esp. on ia64) link data and code symbols differently,
17142 # so use this general approach.
17143 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
17144 $lt_cdecl_hook\
17145 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
17146 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
17147
17148 # Transform an extracted symbol line into symbol name and symbol address
17149 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
17150 $lt_c_name_hook\
17151 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
17152 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
17153
17154 # Transform an extracted symbol line into symbol name with lib prefix and
17155 # symbol address.
17156 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
17157 $lt_c_name_lib_hook\
17158 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
17159 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
17160 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
17161
17162 # Handle CRLF in mingw tool chain
17163 opt_cr=
17164 case $build_os in
17165 mingw*)
17166   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
17167   ;;
17168 esac
17169
17170 # Try without a prefix underscore, then with it.
17171 for ac_symprfx in "" "_"; do
17172
17173   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
17174   symxfrm="\\1 $ac_symprfx\\2 \\2"
17175
17176   # Write the raw and C identifiers.
17177   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
17178     # Fake it for dumpbin and say T for any non-static function,
17179     # D for any global variable and I for any imported variable.
17180     # Also find C++ and __fastcall symbols from MSVC++,
17181     # which start with @ or ?.
17182     lt_cv_sys_global_symbol_pipe="$AWK '"\
17183 "     {last_section=section; section=\$ 3};"\
17184 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
17185 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
17186 "     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
17187 "     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
17188 "     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
17189 "     \$ 0!~/External *\|/{next};"\
17190 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
17191 "     {if(hide[section]) next};"\
17192 "     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
17193 "     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
17194 "     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
17195 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
17196 "     ' prfx=^$ac_symprfx"
17197   else
17198     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
17199   fi
17200   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
17201
17202   # Check to see that the pipe works correctly.
17203   pipe_works=no
17204
17205   rm -f conftest*
17206   cat > conftest.$ac_ext <<_LT_EOF
17207 #ifdef __cplusplus
17208 extern "C" {
17209 #endif
17210 char nm_test_var;
17211 void nm_test_func(void);
17212 void nm_test_func(void){}
17213 #ifdef __cplusplus
17214 }
17215 #endif
17216 int main(){nm_test_var='a';nm_test_func();return(0);}
17217 _LT_EOF
17218
17219   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17220   (eval $ac_compile) 2>&5
17221   ac_status=$?
17222   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17223   test $ac_status = 0; }; then
17224     # Now try to grab the symbols.
17225     nlist=conftest.nm
17226     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
17227   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
17228   ac_status=$?
17229   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17230   test $ac_status = 0; } && test -s "$nlist"; then
17231       # Try sorting and uniquifying the output.
17232       if sort "$nlist" | uniq > "$nlist"T; then
17233         mv -f "$nlist"T "$nlist"
17234       else
17235         rm -f "$nlist"T
17236       fi
17237
17238       # Make sure that we snagged all the symbols we need.
17239       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
17240         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
17241           cat <<_LT_EOF > conftest.$ac_ext
17242 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
17243 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
17244 /* DATA imports from DLLs on WIN32 can't be const, because runtime
17245    relocations are performed -- see ld's documentation on pseudo-relocs.  */
17246 # define LT_DLSYM_CONST
17247 #elif defined __osf__
17248 /* This system does not cope well with relocations in const data.  */
17249 # define LT_DLSYM_CONST
17250 #else
17251 # define LT_DLSYM_CONST const
17252 #endif
17253
17254 #ifdef __cplusplus
17255 extern "C" {
17256 #endif
17257
17258 _LT_EOF
17259           # Now generate the symbol file.
17260           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
17261
17262           cat <<_LT_EOF >> conftest.$ac_ext
17263
17264 /* The mapping between symbol names and symbols.  */
17265 LT_DLSYM_CONST struct {
17266   const char *name;
17267   void       *address;
17268 }
17269 lt__PROGRAM__LTX_preloaded_symbols[] =
17270 {
17271   { "@PROGRAM@", (void *) 0 },
17272 _LT_EOF
17273           $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
17274           cat <<\_LT_EOF >> conftest.$ac_ext
17275   {0, (void *) 0}
17276 };
17277
17278 /* This works around a problem in FreeBSD linker */
17279 #ifdef FREEBSD_WORKAROUND
17280 static const void *lt_preloaded_setup() {
17281   return lt__PROGRAM__LTX_preloaded_symbols;
17282 }
17283 #endif
17284
17285 #ifdef __cplusplus
17286 }
17287 #endif
17288 _LT_EOF
17289           # Now try linking the two files.
17290           mv conftest.$ac_objext conftstm.$ac_objext
17291           lt_globsym_save_LIBS=$LIBS
17292           lt_globsym_save_CFLAGS=$CFLAGS
17293           LIBS=conftstm.$ac_objext
17294           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
17295           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17296   (eval $ac_link) 2>&5
17297   ac_status=$?
17298   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17299   test $ac_status = 0; } && test -s conftest$ac_exeext; then
17300             pipe_works=yes
17301           fi
17302           LIBS=$lt_globsym_save_LIBS
17303           CFLAGS=$lt_globsym_save_CFLAGS
17304         else
17305           echo "cannot find nm_test_func in $nlist" >&5
17306         fi
17307       else
17308         echo "cannot find nm_test_var in $nlist" >&5
17309       fi
17310     else
17311       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
17312     fi
17313   else
17314     echo "$progname: failed program was:" >&5
17315     cat conftest.$ac_ext >&5
17316   fi
17317   rm -rf conftest* conftst*
17318
17319   # Do not use the global_symbol_pipe unless it works.
17320   if test yes = "$pipe_works"; then
17321     break
17322   else
17323     lt_cv_sys_global_symbol_pipe=
17324   fi
17325 done
17326
17327 fi
17328
17329 if test -z "$lt_cv_sys_global_symbol_pipe"; then
17330   lt_cv_sys_global_symbol_to_cdecl=
17331 fi
17332 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
17333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
17334 $as_echo "failed" >&6; }
17335 else
17336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17337 $as_echo "ok" >&6; }
17338 fi
17339
17340 # Response file support.
17341 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
17342   nm_file_list_spec='@'
17343 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
17344   nm_file_list_spec='@'
17345 fi
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17384 $as_echo_n "checking for sysroot... " >&6; }
17385
17386 # Check whether --with-sysroot was given.
17387 if test "${with_sysroot+set}" = set; then :
17388   withval=$with_sysroot;
17389 else
17390   with_sysroot=no
17391 fi
17392
17393
17394 lt_sysroot=
17395 case $with_sysroot in #(
17396  yes)
17397    if test yes = "$GCC"; then
17398      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
17399    fi
17400    ;; #(
17401  /*)
17402    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
17403    ;; #(
17404  no|'')
17405    ;; #(
17406  *)
17407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
17408 $as_echo "$with_sysroot" >&6; }
17409    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
17410    ;;
17411 esac
17412
17413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
17414 $as_echo "${lt_sysroot:-no}" >&6; }
17415
17416
17417
17418
17419
17420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
17421 $as_echo_n "checking for a working dd... " >&6; }
17422 if ${ac_cv_path_lt_DD+:} false; then :
17423   $as_echo_n "(cached) " >&6
17424 else
17425   printf 0123456789abcdef0123456789abcdef >conftest.i
17426 cat conftest.i conftest.i >conftest2.i
17427 : ${lt_DD:=$DD}
17428 if test -z "$lt_DD"; then
17429   ac_path_lt_DD_found=false
17430   # Loop through the user's path and test for each of PROGNAME-LIST
17431   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17432 for as_dir in $PATH
17433 do
17434   IFS=$as_save_IFS
17435   test -z "$as_dir" && as_dir=.
17436     for ac_prog in dd; do
17437     for ac_exec_ext in '' $ac_executable_extensions; do
17438       ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
17439       as_fn_executable_p "$ac_path_lt_DD" || continue
17440 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
17441   cmp -s conftest.i conftest.out \
17442   && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
17443 fi
17444       $ac_path_lt_DD_found && break 3
17445     done
17446   done
17447   done
17448 IFS=$as_save_IFS
17449   if test -z "$ac_cv_path_lt_DD"; then
17450     :
17451   fi
17452 else
17453   ac_cv_path_lt_DD=$lt_DD
17454 fi
17455
17456 rm -f conftest.i conftest2.i conftest.out
17457 fi
17458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
17459 $as_echo "$ac_cv_path_lt_DD" >&6; }
17460
17461
17462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
17463 $as_echo_n "checking how to truncate binary pipes... " >&6; }
17464 if ${lt_cv_truncate_bin+:} false; then :
17465   $as_echo_n "(cached) " >&6
17466 else
17467   printf 0123456789abcdef0123456789abcdef >conftest.i
17468 cat conftest.i conftest.i >conftest2.i
17469 lt_cv_truncate_bin=
17470 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
17471   cmp -s conftest.i conftest.out \
17472   && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
17473 fi
17474 rm -f conftest.i conftest2.i conftest.out
17475 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
17476 fi
17477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
17478 $as_echo "$lt_cv_truncate_bin" >&6; }
17479
17480
17481
17482
17483
17484
17485
17486 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
17487 func_cc_basename ()
17488 {
17489     for cc_temp in $*""; do
17490       case $cc_temp in
17491         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
17492         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
17493         \-*) ;;
17494         *) break;;
17495       esac
17496     done
17497     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
17498 }
17499
17500 # Check whether --enable-libtool-lock was given.
17501 if test "${enable_libtool_lock+set}" = set; then :
17502   enableval=$enable_libtool_lock;
17503 fi
17504
17505 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
17506
17507 # Some flags need to be propagated to the compiler or linker for good
17508 # libtool support.
17509 case $host in
17510 ia64-*-hpux*)
17511   # Find out what ABI is being produced by ac_compile, and set mode
17512   # options accordingly.
17513   echo 'int i;' > conftest.$ac_ext
17514   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17515   (eval $ac_compile) 2>&5
17516   ac_status=$?
17517   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17518   test $ac_status = 0; }; then
17519     case `/usr/bin/file conftest.$ac_objext` in
17520       *ELF-32*)
17521         HPUX_IA64_MODE=32
17522         ;;
17523       *ELF-64*)
17524         HPUX_IA64_MODE=64
17525         ;;
17526     esac
17527   fi
17528   rm -rf conftest*
17529   ;;
17530 *-*-irix6*)
17531   # Find out what ABI is being produced by ac_compile, and set linker
17532   # options accordingly.
17533   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
17534   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17535   (eval $ac_compile) 2>&5
17536   ac_status=$?
17537   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17538   test $ac_status = 0; }; then
17539     if test yes = "$lt_cv_prog_gnu_ld"; then
17540       case `/usr/bin/file conftest.$ac_objext` in
17541         *32-bit*)
17542           LD="${LD-ld} -melf32bsmip"
17543           ;;
17544         *N32*)
17545           LD="${LD-ld} -melf32bmipn32"
17546           ;;
17547         *64-bit*)
17548           LD="${LD-ld} -melf64bmip"
17549         ;;
17550       esac
17551     else
17552       case `/usr/bin/file conftest.$ac_objext` in
17553         *32-bit*)
17554           LD="${LD-ld} -32"
17555           ;;
17556         *N32*)
17557           LD="${LD-ld} -n32"
17558           ;;
17559         *64-bit*)
17560           LD="${LD-ld} -64"
17561           ;;
17562       esac
17563     fi
17564   fi
17565   rm -rf conftest*
17566   ;;
17567
17568 mips64*-*linux*)
17569   # Find out what ABI is being produced by ac_compile, and set linker
17570   # options accordingly.
17571   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
17572   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17573   (eval $ac_compile) 2>&5
17574   ac_status=$?
17575   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17576   test $ac_status = 0; }; then
17577     emul=elf
17578     case `/usr/bin/file conftest.$ac_objext` in
17579       *32-bit*)
17580         emul="${emul}32"
17581         ;;
17582       *64-bit*)
17583         emul="${emul}64"
17584         ;;
17585     esac
17586     case `/usr/bin/file conftest.$ac_objext` in
17587       *MSB*)
17588         emul="${emul}btsmip"
17589         ;;
17590       *LSB*)
17591         emul="${emul}ltsmip"
17592         ;;
17593     esac
17594     case `/usr/bin/file conftest.$ac_objext` in
17595       *N32*)
17596         emul="${emul}n32"
17597         ;;
17598     esac
17599     LD="${LD-ld} -m $emul"
17600   fi
17601   rm -rf conftest*
17602   ;;
17603
17604 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
17605 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
17606   # Find out what ABI is being produced by ac_compile, and set linker
17607   # options accordingly.  Note that the listed cases only cover the
17608   # situations where additional linker options are needed (such as when
17609   # doing 32-bit compilation for a host where ld defaults to 64-bit, or
17610   # vice versa); the common cases where no linker options are needed do
17611   # not appear in the list.
17612   echo 'int i;' > conftest.$ac_ext
17613   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17614   (eval $ac_compile) 2>&5
17615   ac_status=$?
17616   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17617   test $ac_status = 0; }; then
17618     case `/usr/bin/file conftest.o` in
17619       *32-bit*)
17620         case $host in
17621           x86_64-*kfreebsd*-gnu)
17622             LD="${LD-ld} -m elf_i386_fbsd"
17623             ;;
17624           x86_64-*linux*)
17625             case `/usr/bin/file conftest.o` in
17626               *x86-64*)
17627                 LD="${LD-ld} -m elf32_x86_64"
17628                 ;;
17629               *)
17630                 LD="${LD-ld} -m elf_i386"
17631                 ;;
17632             esac
17633             ;;
17634           powerpc64le-*linux*)
17635             LD="${LD-ld} -m elf32lppclinux"
17636             ;;
17637           powerpc64-*linux*)
17638             LD="${LD-ld} -m elf32ppclinux"
17639             ;;
17640           s390x-*linux*)
17641             LD="${LD-ld} -m elf_s390"
17642             ;;
17643           sparc64-*linux*)
17644             LD="${LD-ld} -m elf32_sparc"
17645             ;;
17646         esac
17647         ;;
17648       *64-bit*)
17649         case $host in
17650           x86_64-*kfreebsd*-gnu)
17651             LD="${LD-ld} -m elf_x86_64_fbsd"
17652             ;;
17653           x86_64-*linux*)
17654             LD="${LD-ld} -m elf_x86_64"
17655             ;;
17656           powerpcle-*linux*)
17657             LD="${LD-ld} -m elf64lppc"
17658             ;;
17659           powerpc-*linux*)
17660             LD="${LD-ld} -m elf64ppc"
17661             ;;
17662           s390*-*linux*|s390*-*tpf*)
17663             LD="${LD-ld} -m elf64_s390"
17664             ;;
17665           sparc*-*linux*)
17666             LD="${LD-ld} -m elf64_sparc"
17667             ;;
17668         esac
17669         ;;
17670     esac
17671   fi
17672   rm -rf conftest*
17673   ;;
17674
17675 *-*-sco3.2v5*)
17676   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
17677   SAVE_CFLAGS=$CFLAGS
17678   CFLAGS="$CFLAGS -belf"
17679   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
17680 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
17681 if ${lt_cv_cc_needs_belf+:} false; then :
17682   $as_echo_n "(cached) " >&6
17683 else
17684   ac_ext=c
17685 ac_cpp='$CPP $CPPFLAGS'
17686 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17687 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17688 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17689
17690      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17691 /* end confdefs.h.  */
17692
17693 int
17694 main ()
17695 {
17696
17697   ;
17698   return 0;
17699 }
17700 _ACEOF
17701 if ac_fn_c_try_link "$LINENO"; then :
17702   lt_cv_cc_needs_belf=yes
17703 else
17704   lt_cv_cc_needs_belf=no
17705 fi
17706 rm -f core conftest.err conftest.$ac_objext \
17707     conftest$ac_exeext conftest.$ac_ext
17708      ac_ext=c
17709 ac_cpp='$CPP $CPPFLAGS'
17710 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17711 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17712 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17713
17714 fi
17715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
17716 $as_echo "$lt_cv_cc_needs_belf" >&6; }
17717   if test yes != "$lt_cv_cc_needs_belf"; then
17718     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
17719     CFLAGS=$SAVE_CFLAGS
17720   fi
17721   ;;
17722 *-*solaris*)
17723   # Find out what ABI is being produced by ac_compile, and set linker
17724   # options accordingly.
17725   echo 'int i;' > conftest.$ac_ext
17726   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17727   (eval $ac_compile) 2>&5
17728   ac_status=$?
17729   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17730   test $ac_status = 0; }; then
17731     case `/usr/bin/file conftest.o` in
17732     *64-bit*)
17733       case $lt_cv_prog_gnu_ld in
17734       yes*)
17735         case $host in
17736         i?86-*-solaris*|x86_64-*-solaris*)
17737           LD="${LD-ld} -m elf_x86_64"
17738           ;;
17739         sparc*-*-solaris*)
17740           LD="${LD-ld} -m elf64_sparc"
17741           ;;
17742         esac
17743         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
17744         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
17745           LD=${LD-ld}_sol2
17746         fi
17747         ;;
17748       *)
17749         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
17750           LD="${LD-ld} -64"
17751         fi
17752         ;;
17753       esac
17754       ;;
17755     esac
17756   fi
17757   rm -rf conftest*
17758   ;;
17759 esac
17760
17761 need_locks=$enable_libtool_lock
17762
17763 if test -n "$ac_tool_prefix"; then
17764   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
17765 set dummy ${ac_tool_prefix}mt; ac_word=$2
17766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17767 $as_echo_n "checking for $ac_word... " >&6; }
17768 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
17769   $as_echo_n "(cached) " >&6
17770 else
17771   if test -n "$MANIFEST_TOOL"; then
17772   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
17773 else
17774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17775 for as_dir in $PATH
17776 do
17777   IFS=$as_save_IFS
17778   test -z "$as_dir" && as_dir=.
17779     for ac_exec_ext in '' $ac_executable_extensions; do
17780   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17781     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
17782     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17783     break 2
17784   fi
17785 done
17786   done
17787 IFS=$as_save_IFS
17788
17789 fi
17790 fi
17791 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
17792 if test -n "$MANIFEST_TOOL"; then
17793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
17794 $as_echo "$MANIFEST_TOOL" >&6; }
17795 else
17796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17797 $as_echo "no" >&6; }
17798 fi
17799
17800
17801 fi
17802 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
17803   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
17804   # Extract the first word of "mt", so it can be a program name with args.
17805 set dummy mt; ac_word=$2
17806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17807 $as_echo_n "checking for $ac_word... " >&6; }
17808 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
17809   $as_echo_n "(cached) " >&6
17810 else
17811   if test -n "$ac_ct_MANIFEST_TOOL"; then
17812   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
17813 else
17814 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17815 for as_dir in $PATH
17816 do
17817   IFS=$as_save_IFS
17818   test -z "$as_dir" && as_dir=.
17819     for ac_exec_ext in '' $ac_executable_extensions; do
17820   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17821     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
17822     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17823     break 2
17824   fi
17825 done
17826   done
17827 IFS=$as_save_IFS
17828
17829 fi
17830 fi
17831 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
17832 if test -n "$ac_ct_MANIFEST_TOOL"; then
17833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
17834 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
17835 else
17836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17837 $as_echo "no" >&6; }
17838 fi
17839
17840   if test "x$ac_ct_MANIFEST_TOOL" = x; then
17841     MANIFEST_TOOL=":"
17842   else
17843     case $cross_compiling:$ac_tool_warned in
17844 yes:)
17845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17846 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17847 ac_tool_warned=yes ;;
17848 esac
17849     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
17850   fi
17851 else
17852   MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
17853 fi
17854
17855 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
17856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
17857 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
17858 if ${lt_cv_path_mainfest_tool+:} false; then :
17859   $as_echo_n "(cached) " >&6
17860 else
17861   lt_cv_path_mainfest_tool=no
17862   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
17863   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
17864   cat conftest.err >&5
17865   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
17866     lt_cv_path_mainfest_tool=yes
17867   fi
17868   rm -f conftest*
17869 fi
17870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
17871 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
17872 if test yes != "$lt_cv_path_mainfest_tool"; then
17873   MANIFEST_TOOL=:
17874 fi
17875
17876
17877
17878
17879
17880
17881   case $host_os in
17882     rhapsody* | darwin*)
17883     if test -n "$ac_tool_prefix"; then
17884   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
17885 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
17886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17887 $as_echo_n "checking for $ac_word... " >&6; }
17888 if ${ac_cv_prog_DSYMUTIL+:} false; then :
17889   $as_echo_n "(cached) " >&6
17890 else
17891   if test -n "$DSYMUTIL"; then
17892   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
17893 else
17894 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17895 for as_dir in $PATH
17896 do
17897   IFS=$as_save_IFS
17898   test -z "$as_dir" && as_dir=.
17899     for ac_exec_ext in '' $ac_executable_extensions; do
17900   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17901     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
17902     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17903     break 2
17904   fi
17905 done
17906   done
17907 IFS=$as_save_IFS
17908
17909 fi
17910 fi
17911 DSYMUTIL=$ac_cv_prog_DSYMUTIL
17912 if test -n "$DSYMUTIL"; then
17913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
17914 $as_echo "$DSYMUTIL" >&6; }
17915 else
17916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17917 $as_echo "no" >&6; }
17918 fi
17919
17920
17921 fi
17922 if test -z "$ac_cv_prog_DSYMUTIL"; then
17923   ac_ct_DSYMUTIL=$DSYMUTIL
17924   # Extract the first word of "dsymutil", so it can be a program name with args.
17925 set dummy dsymutil; ac_word=$2
17926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17927 $as_echo_n "checking for $ac_word... " >&6; }
17928 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
17929   $as_echo_n "(cached) " >&6
17930 else
17931   if test -n "$ac_ct_DSYMUTIL"; then
17932   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
17933 else
17934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17935 for as_dir in $PATH
17936 do
17937   IFS=$as_save_IFS
17938   test -z "$as_dir" && as_dir=.
17939     for ac_exec_ext in '' $ac_executable_extensions; do
17940   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17941     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
17942     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17943     break 2
17944   fi
17945 done
17946   done
17947 IFS=$as_save_IFS
17948
17949 fi
17950 fi
17951 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
17952 if test -n "$ac_ct_DSYMUTIL"; then
17953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
17954 $as_echo "$ac_ct_DSYMUTIL" >&6; }
17955 else
17956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17957 $as_echo "no" >&6; }
17958 fi
17959
17960   if test "x$ac_ct_DSYMUTIL" = x; then
17961     DSYMUTIL=":"
17962   else
17963     case $cross_compiling:$ac_tool_warned in
17964 yes:)
17965 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17966 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17967 ac_tool_warned=yes ;;
17968 esac
17969     DSYMUTIL=$ac_ct_DSYMUTIL
17970   fi
17971 else
17972   DSYMUTIL="$ac_cv_prog_DSYMUTIL"
17973 fi
17974
17975     if test -n "$ac_tool_prefix"; then
17976   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
17977 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
17978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17979 $as_echo_n "checking for $ac_word... " >&6; }
17980 if ${ac_cv_prog_NMEDIT+:} false; then :
17981   $as_echo_n "(cached) " >&6
17982 else
17983   if test -n "$NMEDIT"; then
17984   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
17985 else
17986 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17987 for as_dir in $PATH
17988 do
17989   IFS=$as_save_IFS
17990   test -z "$as_dir" && as_dir=.
17991     for ac_exec_ext in '' $ac_executable_extensions; do
17992   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17993     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
17994     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17995     break 2
17996   fi
17997 done
17998   done
17999 IFS=$as_save_IFS
18000
18001 fi
18002 fi
18003 NMEDIT=$ac_cv_prog_NMEDIT
18004 if test -n "$NMEDIT"; then
18005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
18006 $as_echo "$NMEDIT" >&6; }
18007 else
18008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18009 $as_echo "no" >&6; }
18010 fi
18011
18012
18013 fi
18014 if test -z "$ac_cv_prog_NMEDIT"; then
18015   ac_ct_NMEDIT=$NMEDIT
18016   # Extract the first word of "nmedit", so it can be a program name with args.
18017 set dummy nmedit; ac_word=$2
18018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18019 $as_echo_n "checking for $ac_word... " >&6; }
18020 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
18021   $as_echo_n "(cached) " >&6
18022 else
18023   if test -n "$ac_ct_NMEDIT"; then
18024   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
18025 else
18026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18027 for as_dir in $PATH
18028 do
18029   IFS=$as_save_IFS
18030   test -z "$as_dir" && as_dir=.
18031     for ac_exec_ext in '' $ac_executable_extensions; do
18032   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18033     ac_cv_prog_ac_ct_NMEDIT="nmedit"
18034     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18035     break 2
18036   fi
18037 done
18038   done
18039 IFS=$as_save_IFS
18040
18041 fi
18042 fi
18043 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
18044 if test -n "$ac_ct_NMEDIT"; then
18045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
18046 $as_echo "$ac_ct_NMEDIT" >&6; }
18047 else
18048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18049 $as_echo "no" >&6; }
18050 fi
18051
18052   if test "x$ac_ct_NMEDIT" = x; then
18053     NMEDIT=":"
18054   else
18055     case $cross_compiling:$ac_tool_warned in
18056 yes:)
18057 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18058 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18059 ac_tool_warned=yes ;;
18060 esac
18061     NMEDIT=$ac_ct_NMEDIT
18062   fi
18063 else
18064   NMEDIT="$ac_cv_prog_NMEDIT"
18065 fi
18066
18067     if test -n "$ac_tool_prefix"; then
18068   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
18069 set dummy ${ac_tool_prefix}lipo; ac_word=$2
18070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18071 $as_echo_n "checking for $ac_word... " >&6; }
18072 if ${ac_cv_prog_LIPO+:} false; then :
18073   $as_echo_n "(cached) " >&6
18074 else
18075   if test -n "$LIPO"; then
18076   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
18077 else
18078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18079 for as_dir in $PATH
18080 do
18081   IFS=$as_save_IFS
18082   test -z "$as_dir" && as_dir=.
18083     for ac_exec_ext in '' $ac_executable_extensions; do
18084   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18085     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
18086     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18087     break 2
18088   fi
18089 done
18090   done
18091 IFS=$as_save_IFS
18092
18093 fi
18094 fi
18095 LIPO=$ac_cv_prog_LIPO
18096 if test -n "$LIPO"; then
18097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
18098 $as_echo "$LIPO" >&6; }
18099 else
18100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18101 $as_echo "no" >&6; }
18102 fi
18103
18104
18105 fi
18106 if test -z "$ac_cv_prog_LIPO"; then
18107   ac_ct_LIPO=$LIPO
18108   # Extract the first word of "lipo", so it can be a program name with args.
18109 set dummy lipo; ac_word=$2
18110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18111 $as_echo_n "checking for $ac_word... " >&6; }
18112 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
18113   $as_echo_n "(cached) " >&6
18114 else
18115   if test -n "$ac_ct_LIPO"; then
18116   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
18117 else
18118 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18119 for as_dir in $PATH
18120 do
18121   IFS=$as_save_IFS
18122   test -z "$as_dir" && as_dir=.
18123     for ac_exec_ext in '' $ac_executable_extensions; do
18124   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18125     ac_cv_prog_ac_ct_LIPO="lipo"
18126     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18127     break 2
18128   fi
18129 done
18130   done
18131 IFS=$as_save_IFS
18132
18133 fi
18134 fi
18135 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
18136 if test -n "$ac_ct_LIPO"; then
18137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
18138 $as_echo "$ac_ct_LIPO" >&6; }
18139 else
18140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18141 $as_echo "no" >&6; }
18142 fi
18143
18144   if test "x$ac_ct_LIPO" = x; then
18145     LIPO=":"
18146   else
18147     case $cross_compiling:$ac_tool_warned in
18148 yes:)
18149 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18150 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18151 ac_tool_warned=yes ;;
18152 esac
18153     LIPO=$ac_ct_LIPO
18154   fi
18155 else
18156   LIPO="$ac_cv_prog_LIPO"
18157 fi
18158
18159     if test -n "$ac_tool_prefix"; then
18160   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
18161 set dummy ${ac_tool_prefix}otool; ac_word=$2
18162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18163 $as_echo_n "checking for $ac_word... " >&6; }
18164 if ${ac_cv_prog_OTOOL+:} false; then :
18165   $as_echo_n "(cached) " >&6
18166 else
18167   if test -n "$OTOOL"; then
18168   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
18169 else
18170 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18171 for as_dir in $PATH
18172 do
18173   IFS=$as_save_IFS
18174   test -z "$as_dir" && as_dir=.
18175     for ac_exec_ext in '' $ac_executable_extensions; do
18176   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18177     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
18178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18179     break 2
18180   fi
18181 done
18182   done
18183 IFS=$as_save_IFS
18184
18185 fi
18186 fi
18187 OTOOL=$ac_cv_prog_OTOOL
18188 if test -n "$OTOOL"; then
18189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18190 $as_echo "$OTOOL" >&6; }
18191 else
18192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18193 $as_echo "no" >&6; }
18194 fi
18195
18196
18197 fi
18198 if test -z "$ac_cv_prog_OTOOL"; then
18199   ac_ct_OTOOL=$OTOOL
18200   # Extract the first word of "otool", so it can be a program name with args.
18201 set dummy otool; ac_word=$2
18202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18203 $as_echo_n "checking for $ac_word... " >&6; }
18204 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
18205   $as_echo_n "(cached) " >&6
18206 else
18207   if test -n "$ac_ct_OTOOL"; then
18208   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
18209 else
18210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18211 for as_dir in $PATH
18212 do
18213   IFS=$as_save_IFS
18214   test -z "$as_dir" && as_dir=.
18215     for ac_exec_ext in '' $ac_executable_extensions; do
18216   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18217     ac_cv_prog_ac_ct_OTOOL="otool"
18218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18219     break 2
18220   fi
18221 done
18222   done
18223 IFS=$as_save_IFS
18224
18225 fi
18226 fi
18227 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
18228 if test -n "$ac_ct_OTOOL"; then
18229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
18230 $as_echo "$ac_ct_OTOOL" >&6; }
18231 else
18232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18233 $as_echo "no" >&6; }
18234 fi
18235
18236   if test "x$ac_ct_OTOOL" = x; then
18237     OTOOL=":"
18238   else
18239     case $cross_compiling:$ac_tool_warned in
18240 yes:)
18241 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18242 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18243 ac_tool_warned=yes ;;
18244 esac
18245     OTOOL=$ac_ct_OTOOL
18246   fi
18247 else
18248   OTOOL="$ac_cv_prog_OTOOL"
18249 fi
18250
18251     if test -n "$ac_tool_prefix"; then
18252   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
18253 set dummy ${ac_tool_prefix}otool64; ac_word=$2
18254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18255 $as_echo_n "checking for $ac_word... " >&6; }
18256 if ${ac_cv_prog_OTOOL64+:} false; then :
18257   $as_echo_n "(cached) " >&6
18258 else
18259   if test -n "$OTOOL64"; then
18260   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
18261 else
18262 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18263 for as_dir in $PATH
18264 do
18265   IFS=$as_save_IFS
18266   test -z "$as_dir" && as_dir=.
18267     for ac_exec_ext in '' $ac_executable_extensions; do
18268   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18269     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
18270     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18271     break 2
18272   fi
18273 done
18274   done
18275 IFS=$as_save_IFS
18276
18277 fi
18278 fi
18279 OTOOL64=$ac_cv_prog_OTOOL64
18280 if test -n "$OTOOL64"; then
18281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
18282 $as_echo "$OTOOL64" >&6; }
18283 else
18284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18285 $as_echo "no" >&6; }
18286 fi
18287
18288
18289 fi
18290 if test -z "$ac_cv_prog_OTOOL64"; then
18291   ac_ct_OTOOL64=$OTOOL64
18292   # Extract the first word of "otool64", so it can be a program name with args.
18293 set dummy otool64; ac_word=$2
18294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18295 $as_echo_n "checking for $ac_word... " >&6; }
18296 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
18297   $as_echo_n "(cached) " >&6
18298 else
18299   if test -n "$ac_ct_OTOOL64"; then
18300   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
18301 else
18302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18303 for as_dir in $PATH
18304 do
18305   IFS=$as_save_IFS
18306   test -z "$as_dir" && as_dir=.
18307     for ac_exec_ext in '' $ac_executable_extensions; do
18308   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18309     ac_cv_prog_ac_ct_OTOOL64="otool64"
18310     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18311     break 2
18312   fi
18313 done
18314   done
18315 IFS=$as_save_IFS
18316
18317 fi
18318 fi
18319 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
18320 if test -n "$ac_ct_OTOOL64"; then
18321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
18322 $as_echo "$ac_ct_OTOOL64" >&6; }
18323 else
18324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18325 $as_echo "no" >&6; }
18326 fi
18327
18328   if test "x$ac_ct_OTOOL64" = x; then
18329     OTOOL64=":"
18330   else
18331     case $cross_compiling:$ac_tool_warned in
18332 yes:)
18333 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18334 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18335 ac_tool_warned=yes ;;
18336 esac
18337     OTOOL64=$ac_ct_OTOOL64
18338   fi
18339 else
18340   OTOOL64="$ac_cv_prog_OTOOL64"
18341 fi
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
18370 $as_echo_n "checking for -single_module linker flag... " >&6; }
18371 if ${lt_cv_apple_cc_single_mod+:} false; then :
18372   $as_echo_n "(cached) " >&6
18373 else
18374   lt_cv_apple_cc_single_mod=no
18375       if test -z "$LT_MULTI_MODULE"; then
18376         # By default we will add the -single_module flag. You can override
18377         # by either setting the environment variable LT_MULTI_MODULE
18378         # non-empty at configure time, or by adding -multi_module to the
18379         # link flags.
18380         rm -rf libconftest.dylib*
18381         echo "int foo(void){return 1;}" > conftest.c
18382         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
18383 -dynamiclib -Wl,-single_module conftest.c" >&5
18384         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
18385           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
18386         _lt_result=$?
18387         # If there is a non-empty error log, and "single_module"
18388         # appears in it, assume the flag caused a linker warning
18389         if test -s conftest.err && $GREP single_module conftest.err; then
18390           cat conftest.err >&5
18391         # Otherwise, if the output was created with a 0 exit code from
18392         # the compiler, it worked.
18393         elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
18394           lt_cv_apple_cc_single_mod=yes
18395         else
18396           cat conftest.err >&5
18397         fi
18398         rm -rf libconftest.dylib*
18399         rm -f conftest.*
18400       fi
18401 fi
18402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
18403 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
18404
18405     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
18406 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
18407 if ${lt_cv_ld_exported_symbols_list+:} false; then :
18408   $as_echo_n "(cached) " >&6
18409 else
18410   lt_cv_ld_exported_symbols_list=no
18411       save_LDFLAGS=$LDFLAGS
18412       echo "_main" > conftest.sym
18413       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
18414       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18415 /* end confdefs.h.  */
18416
18417 int
18418 main ()
18419 {
18420
18421   ;
18422   return 0;
18423 }
18424 _ACEOF
18425 if ac_fn_c_try_link "$LINENO"; then :
18426   lt_cv_ld_exported_symbols_list=yes
18427 else
18428   lt_cv_ld_exported_symbols_list=no
18429 fi
18430 rm -f core conftest.err conftest.$ac_objext \
18431     conftest$ac_exeext conftest.$ac_ext
18432         LDFLAGS=$save_LDFLAGS
18433
18434 fi
18435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
18436 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
18437
18438     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
18439 $as_echo_n "checking for -force_load linker flag... " >&6; }
18440 if ${lt_cv_ld_force_load+:} false; then :
18441   $as_echo_n "(cached) " >&6
18442 else
18443   lt_cv_ld_force_load=no
18444       cat > conftest.c << _LT_EOF
18445 int forced_loaded() { return 2;}
18446 _LT_EOF
18447       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
18448       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
18449       echo "$AR cru libconftest.a conftest.o" >&5
18450       $AR cru libconftest.a conftest.o 2>&5
18451       echo "$RANLIB libconftest.a" >&5
18452       $RANLIB libconftest.a 2>&5
18453       cat > conftest.c << _LT_EOF
18454 int main() { return 0;}
18455 _LT_EOF
18456       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
18457       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
18458       _lt_result=$?
18459       if test -s conftest.err && $GREP force_load conftest.err; then
18460         cat conftest.err >&5
18461       elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
18462         lt_cv_ld_force_load=yes
18463       else
18464         cat conftest.err >&5
18465       fi
18466         rm -f conftest.err libconftest.a conftest conftest.c
18467         rm -rf conftest.dSYM
18468
18469 fi
18470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
18471 $as_echo "$lt_cv_ld_force_load" >&6; }
18472     case $host_os in
18473     rhapsody* | darwin1.[012])
18474       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
18475     darwin1.*)
18476       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
18477     darwin*) # darwin 5.x on
18478       # if running on 10.5 or later, the deployment target defaults
18479       # to the OS version, if on x86, and 10.4, the deployment
18480       # target defaults to 10.4. Don't you love it?
18481       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
18482         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
18483           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
18484         10.[012][,.]*)
18485           _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
18486         10.*)
18487           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
18488       esac
18489     ;;
18490   esac
18491     if test yes = "$lt_cv_apple_cc_single_mod"; then
18492       _lt_dar_single_mod='$single_module'
18493     fi
18494     if test yes = "$lt_cv_ld_exported_symbols_list"; then
18495       _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
18496     else
18497       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
18498     fi
18499     if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
18500       _lt_dsymutil='~$DSYMUTIL $lib || :'
18501     else
18502       _lt_dsymutil=
18503     fi
18504     ;;
18505   esac
18506
18507 # func_munge_path_list VARIABLE PATH
18508 # -----------------------------------
18509 # VARIABLE is name of variable containing _space_ separated list of
18510 # directories to be munged by the contents of PATH, which is string
18511 # having a format:
18512 # "DIR[:DIR]:"
18513 #       string "DIR[ DIR]" will be prepended to VARIABLE
18514 # ":DIR[:DIR]"
18515 #       string "DIR[ DIR]" will be appended to VARIABLE
18516 # "DIRP[:DIRP]::[DIRA:]DIRA"
18517 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
18518 #       "DIRA[ DIRA]" will be appended to VARIABLE
18519 # "DIR[:DIR]"
18520 #       VARIABLE will be replaced by "DIR[ DIR]"
18521 func_munge_path_list ()
18522 {
18523     case x$2 in
18524     x)
18525         ;;
18526     *:)
18527         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
18528         ;;
18529     x:*)
18530         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
18531         ;;
18532     *::*)
18533         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
18534         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
18535         ;;
18536     *)
18537         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
18538         ;;
18539     esac
18540 }
18541
18542 for ac_header in dlfcn.h
18543 do :
18544   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
18545 "
18546 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
18547   cat >>confdefs.h <<_ACEOF
18548 #define HAVE_DLFCN_H 1
18549 _ACEOF
18550
18551 fi
18552
18553 done
18554
18555
18556
18557
18558
18559 # Set options
18560
18561
18562
18563         enable_dlopen=no
18564
18565
18566   enable_win32_dll=no
18567
18568
18569
18570   # Check whether --enable-static was given.
18571 if test "${enable_static+set}" = set; then :
18572   enableval=$enable_static; p=${PACKAGE-default}
18573     case $enableval in
18574     yes) enable_static=yes ;;
18575     no) enable_static=no ;;
18576     *)
18577      enable_static=no
18578       # Look at the argument we got.  We use all the common list separators.
18579       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
18580       for pkg in $enableval; do
18581         IFS=$lt_save_ifs
18582         if test "X$pkg" = "X$p"; then
18583           enable_static=yes
18584         fi
18585       done
18586       IFS=$lt_save_ifs
18587       ;;
18588     esac
18589 else
18590   enable_static=yes
18591 fi
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602 # Check whether --with-pic was given.
18603 if test "${with_pic+set}" = set; then :
18604   withval=$with_pic; lt_p=${PACKAGE-default}
18605     case $withval in
18606     yes|no) pic_mode=$withval ;;
18607     *)
18608       pic_mode=default
18609       # Look at the argument we got.  We use all the common list separators.
18610       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
18611       for lt_pkg in $withval; do
18612         IFS=$lt_save_ifs
18613         if test "X$lt_pkg" = "X$lt_p"; then
18614           pic_mode=yes
18615         fi
18616       done
18617       IFS=$lt_save_ifs
18618       ;;
18619     esac
18620 else
18621   pic_mode=default
18622 fi
18623
18624
18625
18626
18627
18628
18629
18630
18631   # Check whether --enable-fast-install was given.
18632 if test "${enable_fast_install+set}" = set; then :
18633   enableval=$enable_fast_install; p=${PACKAGE-default}
18634     case $enableval in
18635     yes) enable_fast_install=yes ;;
18636     no) enable_fast_install=no ;;
18637     *)
18638       enable_fast_install=no
18639       # Look at the argument we got.  We use all the common list separators.
18640       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
18641       for pkg in $enableval; do
18642         IFS=$lt_save_ifs
18643         if test "X$pkg" = "X$p"; then
18644           enable_fast_install=yes
18645         fi
18646       done
18647       IFS=$lt_save_ifs
18648       ;;
18649     esac
18650 else
18651   enable_fast_install=yes
18652 fi
18653
18654
18655
18656
18657
18658
18659
18660
18661   shared_archive_member_spec=
18662 case $host,$enable_shared in
18663 power*-*-aix[5-9]*,yes)
18664   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
18665 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
18666
18667 # Check whether --with-aix-soname was given.
18668 if test "${with_aix_soname+set}" = set; then :
18669   withval=$with_aix_soname; case $withval in
18670     aix|svr4|both)
18671       ;;
18672     *)
18673       as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
18674       ;;
18675     esac
18676     lt_cv_with_aix_soname=$with_aix_soname
18677 else
18678   if ${lt_cv_with_aix_soname+:} false; then :
18679   $as_echo_n "(cached) " >&6
18680 else
18681   lt_cv_with_aix_soname=aix
18682 fi
18683
18684     with_aix_soname=$lt_cv_with_aix_soname
18685 fi
18686
18687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
18688 $as_echo "$with_aix_soname" >&6; }
18689   if test aix != "$with_aix_soname"; then
18690     # For the AIX way of multilib, we name the shared archive member
18691     # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
18692     # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
18693     # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
18694     # the AIX toolchain works better with OBJECT_MODE set (default 32).
18695     if test 64 = "${OBJECT_MODE-32}"; then
18696       shared_archive_member_spec=shr_64
18697     else
18698       shared_archive_member_spec=shr
18699     fi
18700   fi
18701   ;;
18702 *)
18703   with_aix_soname=aix
18704   ;;
18705 esac
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716 # This can be used to rebuild libtool when needed
18717 LIBTOOL_DEPS=$ltmain
18718
18719 # Always use our own libtool.
18720 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751 test -z "$LN_S" && LN_S="ln -s"
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766 if test -n "${ZSH_VERSION+set}"; then
18767    setopt NO_GLOB_SUBST
18768 fi
18769
18770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
18771 $as_echo_n "checking for objdir... " >&6; }
18772 if ${lt_cv_objdir+:} false; then :
18773   $as_echo_n "(cached) " >&6
18774 else
18775   rm -f .libs 2>/dev/null
18776 mkdir .libs 2>/dev/null
18777 if test -d .libs; then
18778   lt_cv_objdir=.libs
18779 else
18780   # MS-DOS does not allow filenames that begin with a dot.
18781   lt_cv_objdir=_libs
18782 fi
18783 rmdir .libs 2>/dev/null
18784 fi
18785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
18786 $as_echo "$lt_cv_objdir" >&6; }
18787 objdir=$lt_cv_objdir
18788
18789
18790
18791
18792
18793 cat >>confdefs.h <<_ACEOF
18794 #define LT_OBJDIR "$lt_cv_objdir/"
18795 _ACEOF
18796
18797
18798
18799
18800 case $host_os in
18801 aix3*)
18802   # AIX sometimes has problems with the GCC collect2 program.  For some
18803   # reason, if we set the COLLECT_NAMES environment variable, the problems
18804   # vanish in a puff of smoke.
18805   if test set != "${COLLECT_NAMES+set}"; then
18806     COLLECT_NAMES=
18807     export COLLECT_NAMES
18808   fi
18809   ;;
18810 esac
18811
18812 # Global variables:
18813 ofile=libtool
18814 can_build_shared=yes
18815
18816 # All known linkers require a '.a' archive for static linking (except MSVC,
18817 # which needs '.lib').
18818 libext=a
18819
18820 with_gnu_ld=$lt_cv_prog_gnu_ld
18821
18822 old_CC=$CC
18823 old_CFLAGS=$CFLAGS
18824
18825 # Set sane defaults for various variables
18826 test -z "$CC" && CC=cc
18827 test -z "$LTCC" && LTCC=$CC
18828 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
18829 test -z "$LD" && LD=ld
18830 test -z "$ac_objext" && ac_objext=o
18831
18832 func_cc_basename $compiler
18833 cc_basename=$func_cc_basename_result
18834
18835
18836 # Only perform the check for file, if the check method requires it
18837 test -z "$MAGIC_CMD" && MAGIC_CMD=file
18838 case $deplibs_check_method in
18839 file_magic*)
18840   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
18841     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
18842 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
18843 if ${lt_cv_path_MAGIC_CMD+:} false; then :
18844   $as_echo_n "(cached) " >&6
18845 else
18846   case $MAGIC_CMD in
18847 [\\/*] |  ?:[\\/]*)
18848   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
18849   ;;
18850 *)
18851   lt_save_MAGIC_CMD=$MAGIC_CMD
18852   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
18853   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
18854   for ac_dir in $ac_dummy; do
18855     IFS=$lt_save_ifs
18856     test -z "$ac_dir" && ac_dir=.
18857     if test -f "$ac_dir/${ac_tool_prefix}file"; then
18858       lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
18859       if test -n "$file_magic_test_file"; then
18860         case $deplibs_check_method in
18861         "file_magic "*)
18862           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
18863           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
18864           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
18865             $EGREP "$file_magic_regex" > /dev/null; then
18866             :
18867           else
18868             cat <<_LT_EOF 1>&2
18869
18870 *** Warning: the command libtool uses to detect shared libraries,
18871 *** $file_magic_cmd, produces output that libtool cannot recognize.
18872 *** The result is that libtool may fail to recognize shared libraries
18873 *** as such.  This will affect the creation of libtool libraries that
18874 *** depend on shared libraries, but programs linked with such libtool
18875 *** libraries will work regardless of this problem.  Nevertheless, you
18876 *** may want to report the problem to your system manager and/or to
18877 *** bug-libtool@gnu.org
18878
18879 _LT_EOF
18880           fi ;;
18881         esac
18882       fi
18883       break
18884     fi
18885   done
18886   IFS=$lt_save_ifs
18887   MAGIC_CMD=$lt_save_MAGIC_CMD
18888   ;;
18889 esac
18890 fi
18891
18892 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
18893 if test -n "$MAGIC_CMD"; then
18894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
18895 $as_echo "$MAGIC_CMD" >&6; }
18896 else
18897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18898 $as_echo "no" >&6; }
18899 fi
18900
18901
18902
18903
18904
18905 if test -z "$lt_cv_path_MAGIC_CMD"; then
18906   if test -n "$ac_tool_prefix"; then
18907     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
18908 $as_echo_n "checking for file... " >&6; }
18909 if ${lt_cv_path_MAGIC_CMD+:} false; then :
18910   $as_echo_n "(cached) " >&6
18911 else
18912   case $MAGIC_CMD in
18913 [\\/*] |  ?:[\\/]*)
18914   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
18915   ;;
18916 *)
18917   lt_save_MAGIC_CMD=$MAGIC_CMD
18918   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
18919   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
18920   for ac_dir in $ac_dummy; do
18921     IFS=$lt_save_ifs
18922     test -z "$ac_dir" && ac_dir=.
18923     if test -f "$ac_dir/file"; then
18924       lt_cv_path_MAGIC_CMD=$ac_dir/"file"
18925       if test -n "$file_magic_test_file"; then
18926         case $deplibs_check_method in
18927         "file_magic "*)
18928           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
18929           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
18930           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
18931             $EGREP "$file_magic_regex" > /dev/null; then
18932             :
18933           else
18934             cat <<_LT_EOF 1>&2
18935
18936 *** Warning: the command libtool uses to detect shared libraries,
18937 *** $file_magic_cmd, produces output that libtool cannot recognize.
18938 *** The result is that libtool may fail to recognize shared libraries
18939 *** as such.  This will affect the creation of libtool libraries that
18940 *** depend on shared libraries, but programs linked with such libtool
18941 *** libraries will work regardless of this problem.  Nevertheless, you
18942 *** may want to report the problem to your system manager and/or to
18943 *** bug-libtool@gnu.org
18944
18945 _LT_EOF
18946           fi ;;
18947         esac
18948       fi
18949       break
18950     fi
18951   done
18952   IFS=$lt_save_ifs
18953   MAGIC_CMD=$lt_save_MAGIC_CMD
18954   ;;
18955 esac
18956 fi
18957
18958 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
18959 if test -n "$MAGIC_CMD"; then
18960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
18961 $as_echo "$MAGIC_CMD" >&6; }
18962 else
18963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18964 $as_echo "no" >&6; }
18965 fi
18966
18967
18968   else
18969     MAGIC_CMD=:
18970   fi
18971 fi
18972
18973   fi
18974   ;;
18975 esac
18976
18977 # Use C for the default configuration in the libtool script
18978
18979 lt_save_CC=$CC
18980 ac_ext=c
18981 ac_cpp='$CPP $CPPFLAGS'
18982 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18983 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18984 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18985
18986
18987 # Source file extension for C test sources.
18988 ac_ext=c
18989
18990 # Object file extension for compiled C test sources.
18991 objext=o
18992 objext=$objext
18993
18994 # Code to be used in simple compile tests
18995 lt_simple_compile_test_code="int some_variable = 0;"
18996
18997 # Code to be used in simple link tests
18998 lt_simple_link_test_code='int main(){return(0);}'
18999
19000
19001
19002
19003
19004
19005
19006 # If no C compiler was specified, use CC.
19007 LTCC=${LTCC-"$CC"}
19008
19009 # If no C compiler flags were specified, use CFLAGS.
19010 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
19011
19012 # Allow CC to be a program name with arguments.
19013 compiler=$CC
19014
19015 # Save the default compiler, since it gets overwritten when the other
19016 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
19017 compiler_DEFAULT=$CC
19018
19019 # save warnings/boilerplate of simple test code
19020 ac_outfile=conftest.$ac_objext
19021 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
19022 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19023 _lt_compiler_boilerplate=`cat conftest.err`
19024 $RM conftest*
19025
19026 ac_outfile=conftest.$ac_objext
19027 echo "$lt_simple_link_test_code" >conftest.$ac_ext
19028 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19029 _lt_linker_boilerplate=`cat conftest.err`
19030 $RM -r conftest*
19031
19032
19033 ## CAVEAT EMPTOR:
19034 ## There is no encapsulation within the following macros, do not change
19035 ## the running order or otherwise move them around unless you know exactly
19036 ## what you are doing...
19037 if test -n "$compiler"; then
19038
19039 lt_prog_compiler_no_builtin_flag=
19040
19041 if test yes = "$GCC"; then
19042   case $cc_basename in
19043   nvcc*)
19044     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
19045   *)
19046     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
19047   esac
19048
19049   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
19050 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
19051 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
19052   $as_echo_n "(cached) " >&6
19053 else
19054   lt_cv_prog_compiler_rtti_exceptions=no
19055    ac_outfile=conftest.$ac_objext
19056    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19057    lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
19058    # Insert the option either (1) after the last *FLAGS variable, or
19059    # (2) before a word containing "conftest.", or (3) at the end.
19060    # Note that $ac_compile itself does not contain backslashes and begins
19061    # with a dollar sign (not a hyphen), so the echo should work correctly.
19062    # The option is referenced via a variable to avoid confusing sed.
19063    lt_compile=`echo "$ac_compile" | $SED \
19064    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19065    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19066    -e 's:$: $lt_compiler_flag:'`
19067    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19068    (eval "$lt_compile" 2>conftest.err)
19069    ac_status=$?
19070    cat conftest.err >&5
19071    echo "$as_me:$LINENO: \$? = $ac_status" >&5
19072    if (exit $ac_status) && test -s "$ac_outfile"; then
19073      # The compiler can only warn and ignore the option if not recognized
19074      # So say no if there are warnings other than the usual output.
19075      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
19076      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19077      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
19078        lt_cv_prog_compiler_rtti_exceptions=yes
19079      fi
19080    fi
19081    $RM conftest*
19082
19083 fi
19084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
19085 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
19086
19087 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
19088     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
19089 else
19090     :
19091 fi
19092
19093 fi
19094
19095
19096
19097
19098
19099
19100   lt_prog_compiler_wl=
19101 lt_prog_compiler_pic=
19102 lt_prog_compiler_static=
19103
19104
19105   if test yes = "$GCC"; then
19106     lt_prog_compiler_wl='-Wl,'
19107     lt_prog_compiler_static='-static'
19108
19109     case $host_os in
19110       aix*)
19111       # All AIX code is PIC.
19112       if test ia64 = "$host_cpu"; then
19113         # AIX 5 now supports IA64 processor
19114         lt_prog_compiler_static='-Bstatic'
19115       fi
19116       lt_prog_compiler_pic='-fPIC'
19117       ;;
19118
19119     amigaos*)
19120       case $host_cpu in
19121       powerpc)
19122             # see comment about AmigaOS4 .so support
19123             lt_prog_compiler_pic='-fPIC'
19124         ;;
19125       m68k)
19126             # FIXME: we need at least 68020 code to build shared libraries, but
19127             # adding the '-m68020' flag to GCC prevents building anything better,
19128             # like '-m68040'.
19129             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
19130         ;;
19131       esac
19132       ;;
19133
19134     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
19135       # PIC is the default for these OSes.
19136       ;;
19137
19138     mingw* | cygwin* | pw32* | os2* | cegcc*)
19139       # This hack is so that the source file can tell whether it is being
19140       # built for inclusion in a dll (and should export symbols for example).
19141       # Although the cygwin gcc ignores -fPIC, still need this for old-style
19142       # (--disable-auto-import) libraries
19143       lt_prog_compiler_pic='-DDLL_EXPORT'
19144       case $host_os in
19145       os2*)
19146         lt_prog_compiler_static='$wl-static'
19147         ;;
19148       esac
19149       ;;
19150
19151     darwin* | rhapsody*)
19152       # PIC is the default on this platform
19153       # Common symbols not allowed in MH_DYLIB files
19154       lt_prog_compiler_pic='-fno-common'
19155       ;;
19156
19157     haiku*)
19158       # PIC is the default for Haiku.
19159       # The "-static" flag exists, but is broken.
19160       lt_prog_compiler_static=
19161       ;;
19162
19163     hpux*)
19164       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
19165       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
19166       # sets the default TLS model and affects inlining.
19167       case $host_cpu in
19168       hppa*64*)
19169         # +Z the default
19170         ;;
19171       *)
19172         lt_prog_compiler_pic='-fPIC'
19173         ;;
19174       esac
19175       ;;
19176
19177     interix[3-9]*)
19178       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
19179       # Instead, we relocate shared libraries at runtime.
19180       ;;
19181
19182     msdosdjgpp*)
19183       # Just because we use GCC doesn't mean we suddenly get shared libraries
19184       # on systems that don't support them.
19185       lt_prog_compiler_can_build_shared=no
19186       enable_shared=no
19187       ;;
19188
19189     *nto* | *qnx*)
19190       # QNX uses GNU C++, but need to define -shared option too, otherwise
19191       # it will coredump.
19192       lt_prog_compiler_pic='-fPIC -shared'
19193       ;;
19194
19195     sysv4*MP*)
19196       if test -d /usr/nec; then
19197         lt_prog_compiler_pic=-Kconform_pic
19198       fi
19199       ;;
19200
19201     *)
19202       lt_prog_compiler_pic='-fPIC'
19203       ;;
19204     esac
19205
19206     case $cc_basename in
19207     nvcc*) # Cuda Compiler Driver 2.2
19208       lt_prog_compiler_wl='-Xlinker '
19209       if test -n "$lt_prog_compiler_pic"; then
19210         lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
19211       fi
19212       ;;
19213     esac
19214   else
19215     # PORTME Check for flag to pass linker flags through the system compiler.
19216     case $host_os in
19217     aix*)
19218       lt_prog_compiler_wl='-Wl,'
19219       if test ia64 = "$host_cpu"; then
19220         # AIX 5 now supports IA64 processor
19221         lt_prog_compiler_static='-Bstatic'
19222       else
19223         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
19224       fi
19225       ;;
19226
19227     darwin* | rhapsody*)
19228       # PIC is the default on this platform
19229       # Common symbols not allowed in MH_DYLIB files
19230       lt_prog_compiler_pic='-fno-common'
19231       case $cc_basename in
19232       nagfor*)
19233         # NAG Fortran compiler
19234         lt_prog_compiler_wl='-Wl,-Wl,,'
19235         lt_prog_compiler_pic='-PIC'
19236         lt_prog_compiler_static='-Bstatic'
19237         ;;
19238       esac
19239       ;;
19240
19241     mingw* | cygwin* | pw32* | os2* | cegcc*)
19242       # This hack is so that the source file can tell whether it is being
19243       # built for inclusion in a dll (and should export symbols for example).
19244       lt_prog_compiler_pic='-DDLL_EXPORT'
19245       case $host_os in
19246       os2*)
19247         lt_prog_compiler_static='$wl-static'
19248         ;;
19249       esac
19250       ;;
19251
19252     hpux9* | hpux10* | hpux11*)
19253       lt_prog_compiler_wl='-Wl,'
19254       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
19255       # not for PA HP-UX.
19256       case $host_cpu in
19257       hppa*64*|ia64*)
19258         # +Z the default
19259         ;;
19260       *)
19261         lt_prog_compiler_pic='+Z'
19262         ;;
19263       esac
19264       # Is there a better lt_prog_compiler_static that works with the bundled CC?
19265       lt_prog_compiler_static='$wl-a ${wl}archive'
19266       ;;
19267
19268     irix5* | irix6* | nonstopux*)
19269       lt_prog_compiler_wl='-Wl,'
19270       # PIC (with -KPIC) is the default.
19271       lt_prog_compiler_static='-non_shared'
19272       ;;
19273
19274     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
19275       case $cc_basename in
19276       # old Intel for x86_64, which still supported -KPIC.
19277       ecc*)
19278         lt_prog_compiler_wl='-Wl,'
19279         lt_prog_compiler_pic='-KPIC'
19280         lt_prog_compiler_static='-static'
19281         ;;
19282       # icc used to be incompatible with GCC.
19283       # ICC 10 doesn't accept -KPIC any more.
19284       icc* | ifort*)
19285         lt_prog_compiler_wl='-Wl,'
19286         lt_prog_compiler_pic='-fPIC'
19287         lt_prog_compiler_static='-static'
19288         ;;
19289       # Lahey Fortran 8.1.
19290       lf95*)
19291         lt_prog_compiler_wl='-Wl,'
19292         lt_prog_compiler_pic='--shared'
19293         lt_prog_compiler_static='--static'
19294         ;;
19295       nagfor*)
19296         # NAG Fortran compiler
19297         lt_prog_compiler_wl='-Wl,-Wl,,'
19298         lt_prog_compiler_pic='-PIC'
19299         lt_prog_compiler_static='-Bstatic'
19300         ;;
19301       tcc*)
19302         # Fabrice Bellard et al's Tiny C Compiler
19303         lt_prog_compiler_wl='-Wl,'
19304         lt_prog_compiler_pic='-fPIC'
19305         lt_prog_compiler_static='-static'
19306         ;;
19307       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
19308         # Portland Group compilers (*not* the Pentium gcc compiler,
19309         # which looks to be a dead project)
19310         lt_prog_compiler_wl='-Wl,'
19311         lt_prog_compiler_pic='-fpic'
19312         lt_prog_compiler_static='-Bstatic'
19313         ;;
19314       ccc*)
19315         lt_prog_compiler_wl='-Wl,'
19316         # All Alpha code is PIC.
19317         lt_prog_compiler_static='-non_shared'
19318         ;;
19319       xl* | bgxl* | bgf* | mpixl*)
19320         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
19321         lt_prog_compiler_wl='-Wl,'
19322         lt_prog_compiler_pic='-qpic'
19323         lt_prog_compiler_static='-qstaticlink'
19324         ;;
19325       *)
19326         case `$CC -V 2>&1 | sed 5q` in
19327         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
19328           # Sun Fortran 8.3 passes all unrecognized flags to the linker
19329           lt_prog_compiler_pic='-KPIC'
19330           lt_prog_compiler_static='-Bstatic'
19331           lt_prog_compiler_wl=''
19332           ;;
19333         *Sun\ F* | *Sun*Fortran*)
19334           lt_prog_compiler_pic='-KPIC'
19335           lt_prog_compiler_static='-Bstatic'
19336           lt_prog_compiler_wl='-Qoption ld '
19337           ;;
19338         *Sun\ C*)
19339           # Sun C 5.9
19340           lt_prog_compiler_pic='-KPIC'
19341           lt_prog_compiler_static='-Bstatic'
19342           lt_prog_compiler_wl='-Wl,'
19343           ;;
19344         *Intel*\ [CF]*Compiler*)
19345           lt_prog_compiler_wl='-Wl,'
19346           lt_prog_compiler_pic='-fPIC'
19347           lt_prog_compiler_static='-static'
19348           ;;
19349         *Portland\ Group*)
19350           lt_prog_compiler_wl='-Wl,'
19351           lt_prog_compiler_pic='-fpic'
19352           lt_prog_compiler_static='-Bstatic'
19353           ;;
19354         esac
19355         ;;
19356       esac
19357       ;;
19358
19359     newsos6)
19360       lt_prog_compiler_pic='-KPIC'
19361       lt_prog_compiler_static='-Bstatic'
19362       ;;
19363
19364     *nto* | *qnx*)
19365       # QNX uses GNU C++, but need to define -shared option too, otherwise
19366       # it will coredump.
19367       lt_prog_compiler_pic='-fPIC -shared'
19368       ;;
19369
19370     osf3* | osf4* | osf5*)
19371       lt_prog_compiler_wl='-Wl,'
19372       # All OSF/1 code is PIC.
19373       lt_prog_compiler_static='-non_shared'
19374       ;;
19375
19376     rdos*)
19377       lt_prog_compiler_static='-non_shared'
19378       ;;
19379
19380     solaris*)
19381       lt_prog_compiler_pic='-KPIC'
19382       lt_prog_compiler_static='-Bstatic'
19383       case $cc_basename in
19384       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
19385         lt_prog_compiler_wl='-Qoption ld ';;
19386       *)
19387         lt_prog_compiler_wl='-Wl,';;
19388       esac
19389       ;;
19390
19391     sunos4*)
19392       lt_prog_compiler_wl='-Qoption ld '
19393       lt_prog_compiler_pic='-PIC'
19394       lt_prog_compiler_static='-Bstatic'
19395       ;;
19396
19397     sysv4 | sysv4.2uw2* | sysv4.3*)
19398       lt_prog_compiler_wl='-Wl,'
19399       lt_prog_compiler_pic='-KPIC'
19400       lt_prog_compiler_static='-Bstatic'
19401       ;;
19402
19403     sysv4*MP*)
19404       if test -d /usr/nec; then
19405         lt_prog_compiler_pic='-Kconform_pic'
19406         lt_prog_compiler_static='-Bstatic'
19407       fi
19408       ;;
19409
19410     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
19411       lt_prog_compiler_wl='-Wl,'
19412       lt_prog_compiler_pic='-KPIC'
19413       lt_prog_compiler_static='-Bstatic'
19414       ;;
19415
19416     unicos*)
19417       lt_prog_compiler_wl='-Wl,'
19418       lt_prog_compiler_can_build_shared=no
19419       ;;
19420
19421     uts4*)
19422       lt_prog_compiler_pic='-pic'
19423       lt_prog_compiler_static='-Bstatic'
19424       ;;
19425
19426     *)
19427       lt_prog_compiler_can_build_shared=no
19428       ;;
19429     esac
19430   fi
19431
19432 case $host_os in
19433   # For platforms that do not support PIC, -DPIC is meaningless:
19434   *djgpp*)
19435     lt_prog_compiler_pic=
19436     ;;
19437   *)
19438     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
19439     ;;
19440 esac
19441
19442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
19443 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
19444 if ${lt_cv_prog_compiler_pic+:} false; then :
19445   $as_echo_n "(cached) " >&6
19446 else
19447   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
19448 fi
19449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
19450 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
19451 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
19452
19453 #
19454 # Check to make sure the PIC flag actually works.
19455 #
19456 if test -n "$lt_prog_compiler_pic"; then
19457   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
19458 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
19459 if ${lt_cv_prog_compiler_pic_works+:} false; then :
19460   $as_echo_n "(cached) " >&6
19461 else
19462   lt_cv_prog_compiler_pic_works=no
19463    ac_outfile=conftest.$ac_objext
19464    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19465    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
19466    # Insert the option either (1) after the last *FLAGS variable, or
19467    # (2) before a word containing "conftest.", or (3) at the end.
19468    # Note that $ac_compile itself does not contain backslashes and begins
19469    # with a dollar sign (not a hyphen), so the echo should work correctly.
19470    # The option is referenced via a variable to avoid confusing sed.
19471    lt_compile=`echo "$ac_compile" | $SED \
19472    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19473    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19474    -e 's:$: $lt_compiler_flag:'`
19475    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19476    (eval "$lt_compile" 2>conftest.err)
19477    ac_status=$?
19478    cat conftest.err >&5
19479    echo "$as_me:$LINENO: \$? = $ac_status" >&5
19480    if (exit $ac_status) && test -s "$ac_outfile"; then
19481      # The compiler can only warn and ignore the option if not recognized
19482      # So say no if there are warnings other than the usual output.
19483      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
19484      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19485      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
19486        lt_cv_prog_compiler_pic_works=yes
19487      fi
19488    fi
19489    $RM conftest*
19490
19491 fi
19492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
19493 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
19494
19495 if test yes = "$lt_cv_prog_compiler_pic_works"; then
19496     case $lt_prog_compiler_pic in
19497      "" | " "*) ;;
19498      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
19499      esac
19500 else
19501     lt_prog_compiler_pic=
19502      lt_prog_compiler_can_build_shared=no
19503 fi
19504
19505 fi
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517 #
19518 # Check to make sure the static flag actually works.
19519 #
19520 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
19521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
19522 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
19523 if ${lt_cv_prog_compiler_static_works+:} false; then :
19524   $as_echo_n "(cached) " >&6
19525 else
19526   lt_cv_prog_compiler_static_works=no
19527    save_LDFLAGS=$LDFLAGS
19528    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
19529    echo "$lt_simple_link_test_code" > conftest.$ac_ext
19530    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
19531      # The linker can only warn and ignore the option if not recognized
19532      # So say no if there are warnings
19533      if test -s conftest.err; then
19534        # Append any errors to the config.log.
19535        cat conftest.err 1>&5
19536        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
19537        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19538        if diff conftest.exp conftest.er2 >/dev/null; then
19539          lt_cv_prog_compiler_static_works=yes
19540        fi
19541      else
19542        lt_cv_prog_compiler_static_works=yes
19543      fi
19544    fi
19545    $RM -r conftest*
19546    LDFLAGS=$save_LDFLAGS
19547
19548 fi
19549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
19550 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
19551
19552 if test yes = "$lt_cv_prog_compiler_static_works"; then
19553     :
19554 else
19555     lt_prog_compiler_static=
19556 fi
19557
19558
19559
19560
19561
19562
19563
19564   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
19565 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
19566 if ${lt_cv_prog_compiler_c_o+:} false; then :
19567   $as_echo_n "(cached) " >&6
19568 else
19569   lt_cv_prog_compiler_c_o=no
19570    $RM -r conftest 2>/dev/null
19571    mkdir conftest
19572    cd conftest
19573    mkdir out
19574    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19575
19576    lt_compiler_flag="-o out/conftest2.$ac_objext"
19577    # Insert the option either (1) after the last *FLAGS variable, or
19578    # (2) before a word containing "conftest.", or (3) at the end.
19579    # Note that $ac_compile itself does not contain backslashes and begins
19580    # with a dollar sign (not a hyphen), so the echo should work correctly.
19581    lt_compile=`echo "$ac_compile" | $SED \
19582    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19583    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19584    -e 's:$: $lt_compiler_flag:'`
19585    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19586    (eval "$lt_compile" 2>out/conftest.err)
19587    ac_status=$?
19588    cat out/conftest.err >&5
19589    echo "$as_me:$LINENO: \$? = $ac_status" >&5
19590    if (exit $ac_status) && test -s out/conftest2.$ac_objext
19591    then
19592      # The compiler can only warn and ignore the option if not recognized
19593      # So say no if there are warnings
19594      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
19595      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
19596      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
19597        lt_cv_prog_compiler_c_o=yes
19598      fi
19599    fi
19600    chmod u+w . 2>&5
19601    $RM conftest*
19602    # SGI C++ compiler will create directory out/ii_files/ for
19603    # template instantiation
19604    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19605    $RM out/* && rmdir out
19606    cd ..
19607    $RM -r conftest
19608    $RM conftest*
19609
19610 fi
19611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
19612 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
19613
19614
19615
19616
19617
19618
19619   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
19620 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
19621 if ${lt_cv_prog_compiler_c_o+:} false; then :
19622   $as_echo_n "(cached) " >&6
19623 else
19624   lt_cv_prog_compiler_c_o=no
19625    $RM -r conftest 2>/dev/null
19626    mkdir conftest
19627    cd conftest
19628    mkdir out
19629    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19630
19631    lt_compiler_flag="-o out/conftest2.$ac_objext"
19632    # Insert the option either (1) after the last *FLAGS variable, or
19633    # (2) before a word containing "conftest.", or (3) at the end.
19634    # Note that $ac_compile itself does not contain backslashes and begins
19635    # with a dollar sign (not a hyphen), so the echo should work correctly.
19636    lt_compile=`echo "$ac_compile" | $SED \
19637    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19638    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19639    -e 's:$: $lt_compiler_flag:'`
19640    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19641    (eval "$lt_compile" 2>out/conftest.err)
19642    ac_status=$?
19643    cat out/conftest.err >&5
19644    echo "$as_me:$LINENO: \$? = $ac_status" >&5
19645    if (exit $ac_status) && test -s out/conftest2.$ac_objext
19646    then
19647      # The compiler can only warn and ignore the option if not recognized
19648      # So say no if there are warnings
19649      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
19650      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
19651      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
19652        lt_cv_prog_compiler_c_o=yes
19653      fi
19654    fi
19655    chmod u+w . 2>&5
19656    $RM conftest*
19657    # SGI C++ compiler will create directory out/ii_files/ for
19658    # template instantiation
19659    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19660    $RM out/* && rmdir out
19661    cd ..
19662    $RM -r conftest
19663    $RM conftest*
19664
19665 fi
19666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
19667 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
19668
19669
19670
19671
19672 hard_links=nottested
19673 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
19674   # do not overwrite the value of need_locks provided by the user
19675   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
19676 $as_echo_n "checking if we can lock with hard links... " >&6; }
19677   hard_links=yes
19678   $RM conftest*
19679   ln conftest.a conftest.b 2>/dev/null && hard_links=no
19680   touch conftest.a
19681   ln conftest.a conftest.b 2>&5 || hard_links=no
19682   ln conftest.a conftest.b 2>/dev/null && hard_links=no
19683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
19684 $as_echo "$hard_links" >&6; }
19685   if test no = "$hard_links"; then
19686     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
19687 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
19688     need_locks=warn
19689   fi
19690 else
19691   need_locks=no
19692 fi
19693
19694
19695
19696
19697
19698
19699   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
19700 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
19701
19702   runpath_var=
19703   allow_undefined_flag=
19704   always_export_symbols=no
19705   archive_cmds=
19706   archive_expsym_cmds=
19707   compiler_needs_object=no
19708   enable_shared_with_static_runtimes=no
19709   export_dynamic_flag_spec=
19710   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
19711   hardcode_automatic=no
19712   hardcode_direct=no
19713   hardcode_direct_absolute=no
19714   hardcode_libdir_flag_spec=
19715   hardcode_libdir_separator=
19716   hardcode_minus_L=no
19717   hardcode_shlibpath_var=unsupported
19718   inherit_rpath=no
19719   link_all_deplibs=unknown
19720   module_cmds=
19721   module_expsym_cmds=
19722   old_archive_from_new_cmds=
19723   old_archive_from_expsyms_cmds=
19724   thread_safe_flag_spec=
19725   whole_archive_flag_spec=
19726   # include_expsyms should be a list of space-separated symbols to be *always*
19727   # included in the symbol list
19728   include_expsyms=
19729   # exclude_expsyms can be an extended regexp of symbols to exclude
19730   # it will be wrapped by ' (' and ')$', so one must not match beginning or
19731   # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
19732   # as well as any symbol that contains 'd'.
19733   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
19734   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
19735   # platforms (ab)use it in PIC code, but their linkers get confused if
19736   # the symbol is explicitly referenced.  Since portable code cannot
19737   # rely on this symbol name, it's probably fine to never include it in
19738   # preloaded symbol tables.
19739   # Exclude shared library initialization/finalization symbols.
19740   extract_expsyms_cmds=
19741
19742   case $host_os in
19743   cygwin* | mingw* | pw32* | cegcc*)
19744     # FIXME: the MSVC++ port hasn't been tested in a loooong time
19745     # When not using gcc, we currently assume that we are using
19746     # Microsoft Visual C++.
19747     if test yes != "$GCC"; then
19748       with_gnu_ld=no
19749     fi
19750     ;;
19751   interix*)
19752     # we just hope/assume this is gcc and not c89 (= MSVC++)
19753     with_gnu_ld=yes
19754     ;;
19755   openbsd* | bitrig*)
19756     with_gnu_ld=no
19757     ;;
19758   esac
19759
19760   ld_shlibs=yes
19761
19762   # On some targets, GNU ld is compatible enough with the native linker
19763   # that we're better off using the native interface for both.
19764   lt_use_gnu_ld_interface=no
19765   if test yes = "$with_gnu_ld"; then
19766     case $host_os in
19767       aix*)
19768         # The AIX port of GNU ld has always aspired to compatibility
19769         # with the native linker.  However, as the warning in the GNU ld
19770         # block says, versions before 2.19.5* couldn't really create working
19771         # shared libraries, regardless of the interface used.
19772         case `$LD -v 2>&1` in
19773           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
19774           *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
19775           *\ \(GNU\ Binutils\)\ [3-9]*) ;;
19776           *)
19777             lt_use_gnu_ld_interface=yes
19778             ;;
19779         esac
19780         ;;
19781       *)
19782         lt_use_gnu_ld_interface=yes
19783         ;;
19784     esac
19785   fi
19786
19787   if test yes = "$lt_use_gnu_ld_interface"; then
19788     # If archive_cmds runs LD, not CC, wlarc should be empty
19789     wlarc='$wl'
19790
19791     # Set some defaults for GNU ld with shared library support. These
19792     # are reset later if shared libraries are not supported. Putting them
19793     # here allows them to be overridden if necessary.
19794     runpath_var=LD_RUN_PATH
19795     hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
19796     export_dynamic_flag_spec='$wl--export-dynamic'
19797     # ancient GNU ld didn't support --whole-archive et. al.
19798     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
19799       whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
19800     else
19801       whole_archive_flag_spec=
19802     fi
19803     supports_anon_versioning=no
19804     case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
19805       *GNU\ gold*) supports_anon_versioning=yes ;;
19806       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
19807       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
19808       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
19809       *\ 2.11.*) ;; # other 2.11 versions
19810       *) supports_anon_versioning=yes ;;
19811     esac
19812
19813     # See if GNU ld supports shared libraries.
19814     case $host_os in
19815     aix[3-9]*)
19816       # On AIX/PPC, the GNU linker is very broken
19817       if test ia64 != "$host_cpu"; then
19818         ld_shlibs=no
19819         cat <<_LT_EOF 1>&2
19820
19821 *** Warning: the GNU linker, at least up to release 2.19, is reported
19822 *** to be unable to reliably create shared libraries on AIX.
19823 *** Therefore, libtool is disabling shared libraries support.  If you
19824 *** really care for shared libraries, you may want to install binutils
19825 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
19826 *** You will then need to restart the configuration process.
19827
19828 _LT_EOF
19829       fi
19830       ;;
19831
19832     amigaos*)
19833       case $host_cpu in
19834       powerpc)
19835             # see comment about AmigaOS4 .so support
19836             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
19837             archive_expsym_cmds=''
19838         ;;
19839       m68k)
19840             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)'
19841             hardcode_libdir_flag_spec='-L$libdir'
19842             hardcode_minus_L=yes
19843         ;;
19844       esac
19845       ;;
19846
19847     beos*)
19848       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
19849         allow_undefined_flag=unsupported
19850         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
19851         # support --undefined.  This deserves some investigation.  FIXME
19852         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
19853       else
19854         ld_shlibs=no
19855       fi
19856       ;;
19857
19858     cygwin* | mingw* | pw32* | cegcc*)
19859       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
19860       # as there is no search path for DLLs.
19861       hardcode_libdir_flag_spec='-L$libdir'
19862       export_dynamic_flag_spec='$wl--export-all-symbols'
19863       allow_undefined_flag=unsupported
19864       always_export_symbols=no
19865       enable_shared_with_static_runtimes=yes
19866       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'
19867       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
19868
19869       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
19870         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
19871         # If the export-symbols file already is a .def file, use it as
19872         # is; otherwise, prepend EXPORTS...
19873         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
19874           cp $export_symbols $output_objdir/$soname.def;
19875         else
19876           echo EXPORTS > $output_objdir/$soname.def;
19877           cat $export_symbols >> $output_objdir/$soname.def;
19878         fi~
19879         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
19880       else
19881         ld_shlibs=no
19882       fi
19883       ;;
19884
19885     haiku*)
19886       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
19887       link_all_deplibs=yes
19888       ;;
19889
19890     os2*)
19891       hardcode_libdir_flag_spec='-L$libdir'
19892       hardcode_minus_L=yes
19893       allow_undefined_flag=unsupported
19894       shrext_cmds=.dll
19895       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
19896         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
19897         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
19898         $ECHO EXPORTS >> $output_objdir/$libname.def~
19899         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
19900         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
19901         emximp -o $lib $output_objdir/$libname.def'
19902       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
19903         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
19904         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
19905         $ECHO EXPORTS >> $output_objdir/$libname.def~
19906         prefix_cmds="$SED"~
19907         if test EXPORTS = "`$SED 1q $export_symbols`"; then
19908           prefix_cmds="$prefix_cmds -e 1d";
19909         fi~
19910         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
19911         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
19912         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
19913         emximp -o $lib $output_objdir/$libname.def'
19914       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
19915       enable_shared_with_static_runtimes=yes
19916       ;;
19917
19918     interix[3-9]*)
19919       hardcode_direct=no
19920       hardcode_shlibpath_var=no
19921       hardcode_libdir_flag_spec='$wl-rpath,$libdir'
19922       export_dynamic_flag_spec='$wl-E'
19923       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
19924       # Instead, shared libraries are loaded at an image base (0x10000000 by
19925       # default) and relocated if they conflict, which is a slow very memory
19926       # consuming and fragmenting process.  To avoid this, we pick a random,
19927       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
19928       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
19929       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
19930       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'
19931       ;;
19932
19933     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
19934       tmp_diet=no
19935       if test linux-dietlibc = "$host_os"; then
19936         case $cc_basename in
19937           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
19938         esac
19939       fi
19940       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
19941          && test no = "$tmp_diet"
19942       then
19943         tmp_addflag=' $pic_flag'
19944         tmp_sharedflag='-shared'
19945         case $cc_basename,$host_cpu in
19946         pgcc*)                          # Portland Group C compiler
19947           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'
19948           tmp_addflag=' $pic_flag'
19949           ;;
19950         pgf77* | pgf90* | pgf95* | pgfortran*)
19951                                         # Portland Group f77 and f90 compilers
19952           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'
19953           tmp_addflag=' $pic_flag -Mnomain' ;;
19954         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
19955           tmp_addflag=' -i_dynamic' ;;
19956         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
19957           tmp_addflag=' -i_dynamic -nofor_main' ;;
19958         ifc* | ifort*)                  # Intel Fortran compiler
19959           tmp_addflag=' -nofor_main' ;;
19960         lf95*)                          # Lahey Fortran 8.1
19961           whole_archive_flag_spec=
19962           tmp_sharedflag='--shared' ;;
19963         nagfor*)                        # NAGFOR 5.3
19964           tmp_sharedflag='-Wl,-shared' ;;
19965         xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
19966           tmp_sharedflag='-qmkshrobj'
19967           tmp_addflag= ;;
19968         nvcc*)  # Cuda Compiler Driver 2.2
19969           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'
19970           compiler_needs_object=yes
19971           ;;
19972         esac
19973         case `$CC -V 2>&1 | sed 5q` in
19974         *Sun\ C*)                       # Sun C 5.9
19975           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'
19976           compiler_needs_object=yes
19977           tmp_sharedflag='-G' ;;
19978         *Sun\ F*)                       # Sun Fortran 8.3
19979           tmp_sharedflag='-G' ;;
19980         esac
19981         archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
19982
19983         if test yes = "$supports_anon_versioning"; then
19984           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
19985             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
19986             echo "local: *; };" >> $output_objdir/$libname.ver~
19987             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
19988         fi
19989
19990         case $cc_basename in
19991         tcc*)
19992           export_dynamic_flag_spec='-rdynamic'
19993           ;;
19994         xlf* | bgf* | bgxlf* | mpixlf*)
19995           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
19996           whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
19997           hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
19998           archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
19999           if test yes = "$supports_anon_versioning"; then
20000             archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
20001               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
20002               echo "local: *; };" >> $output_objdir/$libname.ver~
20003               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
20004           fi
20005           ;;
20006         esac
20007       else
20008         ld_shlibs=no
20009       fi
20010       ;;
20011
20012     netbsd*)
20013       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
20014         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
20015         wlarc=
20016       else
20017         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20018         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20019       fi
20020       ;;
20021
20022     solaris*)
20023       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
20024         ld_shlibs=no
20025         cat <<_LT_EOF 1>&2
20026
20027 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
20028 *** create shared libraries on Solaris systems.  Therefore, libtool
20029 *** is disabling shared libraries support.  We urge you to upgrade GNU
20030 *** binutils to release 2.9.1 or newer.  Another option is to modify
20031 *** your PATH or compiler configuration so that the native linker is
20032 *** used, and then restart.
20033
20034 _LT_EOF
20035       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20036         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20037         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20038       else
20039         ld_shlibs=no
20040       fi
20041       ;;
20042
20043     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
20044       case `$LD -v 2>&1` in
20045         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
20046         ld_shlibs=no
20047         cat <<_LT_EOF 1>&2
20048
20049 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
20050 *** reliably create shared libraries on SCO systems.  Therefore, libtool
20051 *** is disabling shared libraries support.  We urge you to upgrade GNU
20052 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
20053 *** your PATH or compiler configuration so that the native linker is
20054 *** used, and then restart.
20055
20056 _LT_EOF
20057         ;;
20058         *)
20059           # For security reasons, it is highly recommended that you always
20060           # use absolute paths for naming shared libraries, and exclude the
20061           # DT_RUNPATH tag from executables and libraries.  But doing so
20062           # requires that you compile everything twice, which is a pain.
20063           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20064             hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20065             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20066             archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20067           else
20068             ld_shlibs=no
20069           fi
20070         ;;
20071       esac
20072       ;;
20073
20074     sunos4*)
20075       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
20076       wlarc=
20077       hardcode_direct=yes
20078       hardcode_shlibpath_var=no
20079       ;;
20080
20081     *)
20082       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20083         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20084         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20085       else
20086         ld_shlibs=no
20087       fi
20088       ;;
20089     esac
20090
20091     if test no = "$ld_shlibs"; then
20092       runpath_var=
20093       hardcode_libdir_flag_spec=
20094       export_dynamic_flag_spec=
20095       whole_archive_flag_spec=
20096     fi
20097   else
20098     # PORTME fill in a description of your system's linker (not GNU ld)
20099     case $host_os in
20100     aix3*)
20101       allow_undefined_flag=unsupported
20102       always_export_symbols=yes
20103       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'
20104       # Note: this linker hardcodes the directories in LIBPATH if there
20105       # are no directories specified by -L.
20106       hardcode_minus_L=yes
20107       if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
20108         # Neither direct hardcoding nor static linking is supported with a
20109         # broken collect2.
20110         hardcode_direct=unsupported
20111       fi
20112       ;;
20113
20114     aix[4-9]*)
20115       if test ia64 = "$host_cpu"; then
20116         # On IA64, the linker does run time linking by default, so we don't
20117         # have to do anything special.
20118         aix_use_runtimelinking=no
20119         exp_sym_flag='-Bexport'
20120         no_entry_flag=
20121       else
20122         # If we're using GNU nm, then we don't want the "-C" option.
20123         # -C means demangle to GNU nm, but means don't demangle to AIX nm.
20124         # Without the "-l" option, or with the "-B" option, AIX nm treats
20125         # weak defined symbols like other global defined symbols, whereas
20126         # GNU nm marks them as "W".
20127         # While the 'weak' keyword is ignored in the Export File, we need
20128         # it in the Import File for the 'aix-soname' feature, so we have
20129         # to replace the "-B" option with "-P" for AIX nm.
20130         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
20131           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'
20132         else
20133           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'
20134         fi
20135         aix_use_runtimelinking=no
20136
20137         # Test if we are trying to use run time linking or normal
20138         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
20139         # have runtime linking enabled, and use it for executables.
20140         # For shared libraries, we enable/disable runtime linking
20141         # depending on the kind of the shared library created -
20142         # when "with_aix_soname,aix_use_runtimelinking" is:
20143         # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
20144         # "aix,yes"  lib.so          shared, rtl:yes, for executables
20145         #            lib.a           static archive
20146         # "both,no"  lib.so.V(shr.o) shared, rtl:yes
20147         #            lib.a(lib.so.V) shared, rtl:no,  for executables
20148         # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
20149         #            lib.a(lib.so.V) shared, rtl:no
20150         # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
20151         #            lib.a           static archive
20152         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
20153           for ld_flag in $LDFLAGS; do
20154           if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
20155             aix_use_runtimelinking=yes
20156             break
20157           fi
20158           done
20159           if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
20160             # With aix-soname=svr4, we create the lib.so.V shared archives only,
20161             # so we don't have lib.a shared libs to link our executables.
20162             # We have to force runtime linking in this case.
20163             aix_use_runtimelinking=yes
20164             LDFLAGS="$LDFLAGS -Wl,-brtl"
20165           fi
20166           ;;
20167         esac
20168
20169         exp_sym_flag='-bexport'
20170         no_entry_flag='-bnoentry'
20171       fi
20172
20173       # When large executables or shared objects are built, AIX ld can
20174       # have problems creating the table of contents.  If linking a library
20175       # or program results in "error TOC overflow" add -mminimal-toc to
20176       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
20177       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
20178
20179       archive_cmds=''
20180       hardcode_direct=yes
20181       hardcode_direct_absolute=yes
20182       hardcode_libdir_separator=':'
20183       link_all_deplibs=yes
20184       file_list_spec='$wl-f,'
20185       case $with_aix_soname,$aix_use_runtimelinking in
20186       aix,*) ;; # traditional, no import file
20187       svr4,* | *,yes) # use import file
20188         # The Import File defines what to hardcode.
20189         hardcode_direct=no
20190         hardcode_direct_absolute=no
20191         ;;
20192       esac
20193
20194       if test yes = "$GCC"; then
20195         case $host_os in aix4.[012]|aix4.[012].*)
20196         # We only want to do this on AIX 4.2 and lower, the check
20197         # below for broken collect2 doesn't work under 4.3+
20198           collect2name=`$CC -print-prog-name=collect2`
20199           if test -f "$collect2name" &&
20200            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
20201           then
20202           # We have reworked collect2
20203           :
20204           else
20205           # We have old collect2
20206           hardcode_direct=unsupported
20207           # It fails to find uninstalled libraries when the uninstalled
20208           # path is not listed in the libpath.  Setting hardcode_minus_L
20209           # to unsupported forces relinking
20210           hardcode_minus_L=yes
20211           hardcode_libdir_flag_spec='-L$libdir'
20212           hardcode_libdir_separator=
20213           fi
20214           ;;
20215         esac
20216         shared_flag='-shared'
20217         if test yes = "$aix_use_runtimelinking"; then
20218           shared_flag="$shared_flag "'$wl-G'
20219         fi
20220         # Need to ensure runtime linking is disabled for the traditional
20221         # shared library, or the linker may eventually find shared libraries
20222         # /with/ Import File - we do not want to mix them.
20223         shared_flag_aix='-shared'
20224         shared_flag_svr4='-shared $wl-G'
20225       else
20226         # not using gcc
20227         if test ia64 = "$host_cpu"; then
20228         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
20229         # chokes on -Wl,-G. The following line is correct:
20230           shared_flag='-G'
20231         else
20232           if test yes = "$aix_use_runtimelinking"; then
20233             shared_flag='$wl-G'
20234           else
20235             shared_flag='$wl-bM:SRE'
20236           fi
20237           shared_flag_aix='$wl-bM:SRE'
20238           shared_flag_svr4='$wl-G'
20239         fi
20240       fi
20241
20242       export_dynamic_flag_spec='$wl-bexpall'
20243       # It seems that -bexpall does not export symbols beginning with
20244       # underscore (_), so it is better to generate a list of symbols to export.
20245       always_export_symbols=yes
20246       if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
20247         # Warning - without using the other runtime loading flags (-brtl),
20248         # -berok will link without error, but may produce a broken library.
20249         allow_undefined_flag='-berok'
20250         # Determine the default libpath from the value encoded in an
20251         # empty executable.
20252         if test set = "${lt_cv_aix_libpath+set}"; then
20253   aix_libpath=$lt_cv_aix_libpath
20254 else
20255   if ${lt_cv_aix_libpath_+:} false; then :
20256   $as_echo_n "(cached) " >&6
20257 else
20258   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20259 /* end confdefs.h.  */
20260
20261 int
20262 main ()
20263 {
20264
20265   ;
20266   return 0;
20267 }
20268 _ACEOF
20269 if ac_fn_c_try_link "$LINENO"; then :
20270
20271   lt_aix_libpath_sed='
20272       /Import File Strings/,/^$/ {
20273           /^0/ {
20274               s/^0  *\([^ ]*\) *$/\1/
20275               p
20276           }
20277       }'
20278   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20279   # Check for a 64-bit object if we didn't find anything.
20280   if test -z "$lt_cv_aix_libpath_"; then
20281     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20282   fi
20283 fi
20284 rm -f core conftest.err conftest.$ac_objext \
20285     conftest$ac_exeext conftest.$ac_ext
20286   if test -z "$lt_cv_aix_libpath_"; then
20287     lt_cv_aix_libpath_=/usr/lib:/lib
20288   fi
20289
20290 fi
20291
20292   aix_libpath=$lt_cv_aix_libpath_
20293 fi
20294
20295         hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
20296         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
20297       else
20298         if test ia64 = "$host_cpu"; then
20299           hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
20300           allow_undefined_flag="-z nodefs"
20301           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"
20302         else
20303          # Determine the default libpath from the value encoded in an
20304          # empty executable.
20305          if test set = "${lt_cv_aix_libpath+set}"; then
20306   aix_libpath=$lt_cv_aix_libpath
20307 else
20308   if ${lt_cv_aix_libpath_+:} false; then :
20309   $as_echo_n "(cached) " >&6
20310 else
20311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20312 /* end confdefs.h.  */
20313
20314 int
20315 main ()
20316 {
20317
20318   ;
20319   return 0;
20320 }
20321 _ACEOF
20322 if ac_fn_c_try_link "$LINENO"; then :
20323
20324   lt_aix_libpath_sed='
20325       /Import File Strings/,/^$/ {
20326           /^0/ {
20327               s/^0  *\([^ ]*\) *$/\1/
20328               p
20329           }
20330       }'
20331   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20332   # Check for a 64-bit object if we didn't find anything.
20333   if test -z "$lt_cv_aix_libpath_"; then
20334     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20335   fi
20336 fi
20337 rm -f core conftest.err conftest.$ac_objext \
20338     conftest$ac_exeext conftest.$ac_ext
20339   if test -z "$lt_cv_aix_libpath_"; then
20340     lt_cv_aix_libpath_=/usr/lib:/lib
20341   fi
20342
20343 fi
20344
20345   aix_libpath=$lt_cv_aix_libpath_
20346 fi
20347
20348          hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
20349           # Warning - without using the other run time loading flags,
20350           # -berok will link without error, but may produce a broken library.
20351           no_undefined_flag=' $wl-bernotok'
20352           allow_undefined_flag=' $wl-berok'
20353           if test yes = "$with_gnu_ld"; then
20354             # We only use this code for GNU lds that support --whole-archive.
20355             whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
20356           else
20357             # Exported symbols can be pulled into shared objects from archives
20358             whole_archive_flag_spec='$convenience'
20359           fi
20360           archive_cmds_need_lc=yes
20361           archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
20362           # -brtl affects multiple linker settings, -berok does not and is overridden later
20363           compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
20364           if test svr4 != "$with_aix_soname"; then
20365             # This is similar to how AIX traditionally builds its shared libraries.
20366             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'
20367           fi
20368           if test aix != "$with_aix_soname"; then
20369             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'
20370           else
20371             # used by -dlpreopen to get the symbols
20372             archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
20373           fi
20374           archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
20375         fi
20376       fi
20377       ;;
20378
20379     amigaos*)
20380       case $host_cpu in
20381       powerpc)
20382             # see comment about AmigaOS4 .so support
20383             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20384             archive_expsym_cmds=''
20385         ;;
20386       m68k)
20387             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)'
20388             hardcode_libdir_flag_spec='-L$libdir'
20389             hardcode_minus_L=yes
20390         ;;
20391       esac
20392       ;;
20393
20394     bsdi[45]*)
20395       export_dynamic_flag_spec=-rdynamic
20396       ;;
20397
20398     cygwin* | mingw* | pw32* | cegcc*)
20399       # When not using gcc, we currently assume that we are using
20400       # Microsoft Visual C++.
20401       # hardcode_libdir_flag_spec is actually meaningless, as there is
20402       # no search path for DLLs.
20403       case $cc_basename in
20404       cl*)
20405         # Native MSVC
20406         hardcode_libdir_flag_spec=' '
20407         allow_undefined_flag=unsupported
20408         always_export_symbols=yes
20409         file_list_spec='@'
20410         # Tell ltmain to make .lib files, not .a files.
20411         libext=lib
20412         # Tell ltmain to make .dll files, not .so files.
20413         shrext_cmds=.dll
20414         # FIXME: Setting linknames here is a bad hack.
20415         archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
20416         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
20417             cp "$export_symbols" "$output_objdir/$soname.def";
20418             echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
20419           else
20420             $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
20421           fi~
20422           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
20423           linknames='
20424         # The linker will not automatically build a static lib if we build a DLL.
20425         # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
20426         enable_shared_with_static_runtimes=yes
20427         exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
20428         export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
20429         # Don't use ranlib
20430         old_postinstall_cmds='chmod 644 $oldlib'
20431         postlink_cmds='lt_outputfile="@OUTPUT@"~
20432           lt_tool_outputfile="@TOOL_OUTPUT@"~
20433           case $lt_outputfile in
20434             *.exe|*.EXE) ;;
20435             *)
20436               lt_outputfile=$lt_outputfile.exe
20437               lt_tool_outputfile=$lt_tool_outputfile.exe
20438               ;;
20439           esac~
20440           if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
20441             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
20442             $RM "$lt_outputfile.manifest";
20443           fi'
20444         ;;
20445       *)
20446         # Assume MSVC wrapper
20447         hardcode_libdir_flag_spec=' '
20448         allow_undefined_flag=unsupported
20449         # Tell ltmain to make .lib files, not .a files.
20450         libext=lib
20451         # Tell ltmain to make .dll files, not .so files.
20452         shrext_cmds=.dll
20453         # FIXME: Setting linknames here is a bad hack.
20454         archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
20455         # The linker will automatically build a .lib file if we build a DLL.
20456         old_archive_from_new_cmds='true'
20457         # FIXME: Should let the user specify the lib program.
20458         old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
20459         enable_shared_with_static_runtimes=yes
20460         ;;
20461       esac
20462       ;;
20463
20464     darwin* | rhapsody*)
20465
20466
20467   archive_cmds_need_lc=no
20468   hardcode_direct=no
20469   hardcode_automatic=yes
20470   hardcode_shlibpath_var=unsupported
20471   if test yes = "$lt_cv_ld_force_load"; then
20472     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\"`'
20473
20474   else
20475     whole_archive_flag_spec=''
20476   fi
20477   link_all_deplibs=yes
20478   allow_undefined_flag=$_lt_dar_allow_undefined
20479   case $cc_basename in
20480      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
20481      *) _lt_dar_can_shared=$GCC ;;
20482   esac
20483   if test yes = "$_lt_dar_can_shared"; then
20484     output_verbose_link_cmd=func_echo_all
20485     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
20486     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
20487     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"
20488     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"
20489
20490   else
20491   ld_shlibs=no
20492   fi
20493
20494       ;;
20495
20496     dgux*)
20497       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20498       hardcode_libdir_flag_spec='-L$libdir'
20499       hardcode_shlibpath_var=no
20500       ;;
20501
20502     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
20503     # support.  Future versions do this automatically, but an explicit c++rt0.o
20504     # does not break anything, and helps significantly (at the cost of a little
20505     # extra space).
20506     freebsd2.2*)
20507       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
20508       hardcode_libdir_flag_spec='-R$libdir'
20509       hardcode_direct=yes
20510       hardcode_shlibpath_var=no
20511       ;;
20512
20513     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
20514     freebsd2.*)
20515       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
20516       hardcode_direct=yes
20517       hardcode_minus_L=yes
20518       hardcode_shlibpath_var=no
20519       ;;
20520
20521     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
20522     freebsd* | dragonfly*)
20523       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
20524       hardcode_libdir_flag_spec='-R$libdir'
20525       hardcode_direct=yes
20526       hardcode_shlibpath_var=no
20527       ;;
20528
20529     hpux9*)
20530       if test yes = "$GCC"; then
20531         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'
20532       else
20533         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'
20534       fi
20535       hardcode_libdir_flag_spec='$wl+b $wl$libdir'
20536       hardcode_libdir_separator=:
20537       hardcode_direct=yes
20538
20539       # hardcode_minus_L: Not really in the search PATH,
20540       # but as the default location of the library.
20541       hardcode_minus_L=yes
20542       export_dynamic_flag_spec='$wl-E'
20543       ;;
20544
20545     hpux10*)
20546       if test yes,no = "$GCC,$with_gnu_ld"; then
20547         archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
20548       else
20549         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
20550       fi
20551       if test no = "$with_gnu_ld"; then
20552         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
20553         hardcode_libdir_separator=:
20554         hardcode_direct=yes
20555         hardcode_direct_absolute=yes
20556         export_dynamic_flag_spec='$wl-E'
20557         # hardcode_minus_L: Not really in the search PATH,
20558         # but as the default location of the library.
20559         hardcode_minus_L=yes
20560       fi
20561       ;;
20562
20563     hpux11*)
20564       if test yes,no = "$GCC,$with_gnu_ld"; then
20565         case $host_cpu in
20566         hppa*64*)
20567           archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
20568           ;;
20569         ia64*)
20570           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
20571           ;;
20572         *)
20573           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
20574           ;;
20575         esac
20576       else
20577         case $host_cpu in
20578         hppa*64*)
20579           archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
20580           ;;
20581         ia64*)
20582           archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
20583           ;;
20584         *)
20585
20586           # Older versions of the 11.00 compiler do not understand -b yet
20587           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
20588           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
20589 $as_echo_n "checking if $CC understands -b... " >&6; }
20590 if ${lt_cv_prog_compiler__b+:} false; then :
20591   $as_echo_n "(cached) " >&6
20592 else
20593   lt_cv_prog_compiler__b=no
20594    save_LDFLAGS=$LDFLAGS
20595    LDFLAGS="$LDFLAGS -b"
20596    echo "$lt_simple_link_test_code" > conftest.$ac_ext
20597    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
20598      # The linker can only warn and ignore the option if not recognized
20599      # So say no if there are warnings
20600      if test -s conftest.err; then
20601        # Append any errors to the config.log.
20602        cat conftest.err 1>&5
20603        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
20604        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
20605        if diff conftest.exp conftest.er2 >/dev/null; then
20606          lt_cv_prog_compiler__b=yes
20607        fi
20608      else
20609        lt_cv_prog_compiler__b=yes
20610      fi
20611    fi
20612    $RM -r conftest*
20613    LDFLAGS=$save_LDFLAGS
20614
20615 fi
20616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
20617 $as_echo "$lt_cv_prog_compiler__b" >&6; }
20618
20619 if test yes = "$lt_cv_prog_compiler__b"; then
20620     archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
20621 else
20622     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
20623 fi
20624
20625           ;;
20626         esac
20627       fi
20628       if test no = "$with_gnu_ld"; then
20629         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
20630         hardcode_libdir_separator=:
20631
20632         case $host_cpu in
20633         hppa*64*|ia64*)
20634           hardcode_direct=no
20635           hardcode_shlibpath_var=no
20636           ;;
20637         *)
20638           hardcode_direct=yes
20639           hardcode_direct_absolute=yes
20640           export_dynamic_flag_spec='$wl-E'
20641
20642           # hardcode_minus_L: Not really in the search PATH,
20643           # but as the default location of the library.
20644           hardcode_minus_L=yes
20645           ;;
20646         esac
20647       fi
20648       ;;
20649
20650     irix5* | irix6* | nonstopux*)
20651       if test yes = "$GCC"; then
20652         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'
20653         # Try to use the -exported_symbol ld option, if it does not
20654         # work, assume that -exports_file does not work either and
20655         # implicitly export all symbols.
20656         # This should be the same for all languages, so no per-tag cache variable.
20657         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
20658 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
20659 if ${lt_cv_irix_exported_symbol+:} false; then :
20660   $as_echo_n "(cached) " >&6
20661 else
20662   save_LDFLAGS=$LDFLAGS
20663            LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
20664            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20665 /* end confdefs.h.  */
20666 int foo (void) { return 0; }
20667 _ACEOF
20668 if ac_fn_c_try_link "$LINENO"; then :
20669   lt_cv_irix_exported_symbol=yes
20670 else
20671   lt_cv_irix_exported_symbol=no
20672 fi
20673 rm -f core conftest.err conftest.$ac_objext \
20674     conftest$ac_exeext conftest.$ac_ext
20675            LDFLAGS=$save_LDFLAGS
20676 fi
20677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
20678 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
20679         if test yes = "$lt_cv_irix_exported_symbol"; then
20680           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'
20681         fi
20682       else
20683         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'
20684         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'
20685       fi
20686       archive_cmds_need_lc='no'
20687       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20688       hardcode_libdir_separator=:
20689       inherit_rpath=yes
20690       link_all_deplibs=yes
20691       ;;
20692
20693     linux*)
20694       case $cc_basename in
20695       tcc*)
20696         # Fabrice Bellard et al's Tiny C Compiler
20697         ld_shlibs=yes
20698         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
20699         ;;
20700       esac
20701       ;;
20702
20703     netbsd*)
20704       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
20705         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
20706       else
20707         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
20708       fi
20709       hardcode_libdir_flag_spec='-R$libdir'
20710       hardcode_direct=yes
20711       hardcode_shlibpath_var=no
20712       ;;
20713
20714     newsos6)
20715       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20716       hardcode_direct=yes
20717       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20718       hardcode_libdir_separator=:
20719       hardcode_shlibpath_var=no
20720       ;;
20721
20722     *nto* | *qnx*)
20723       ;;
20724
20725     openbsd* | bitrig*)
20726       if test -f /usr/libexec/ld.so; then
20727         hardcode_direct=yes
20728         hardcode_shlibpath_var=no
20729         hardcode_direct_absolute=yes
20730         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
20731           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
20732           archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
20733           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
20734           export_dynamic_flag_spec='$wl-E'
20735         else
20736           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
20737           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
20738         fi
20739       else
20740         ld_shlibs=no
20741       fi
20742       ;;
20743
20744     os2*)
20745       hardcode_libdir_flag_spec='-L$libdir'
20746       hardcode_minus_L=yes
20747       allow_undefined_flag=unsupported
20748       shrext_cmds=.dll
20749       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
20750         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
20751         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
20752         $ECHO EXPORTS >> $output_objdir/$libname.def~
20753         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
20754         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
20755         emximp -o $lib $output_objdir/$libname.def'
20756       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
20757         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
20758         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
20759         $ECHO EXPORTS >> $output_objdir/$libname.def~
20760         prefix_cmds="$SED"~
20761         if test EXPORTS = "`$SED 1q $export_symbols`"; then
20762           prefix_cmds="$prefix_cmds -e 1d";
20763         fi~
20764         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
20765         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
20766         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
20767         emximp -o $lib $output_objdir/$libname.def'
20768       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
20769       enable_shared_with_static_runtimes=yes
20770       ;;
20771
20772     osf3*)
20773       if test yes = "$GCC"; then
20774         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
20775         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'
20776       else
20777         allow_undefined_flag=' -expect_unresolved \*'
20778         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'
20779       fi
20780       archive_cmds_need_lc='no'
20781       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20782       hardcode_libdir_separator=:
20783       ;;
20784
20785     osf4* | osf5*)      # as osf3* with the addition of -msym flag
20786       if test yes = "$GCC"; then
20787         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
20788         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'
20789         hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20790       else
20791         allow_undefined_flag=' -expect_unresolved \*'
20792         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'
20793         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~
20794           $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'
20795
20796         # Both c and cxx compiler support -rpath directly
20797         hardcode_libdir_flag_spec='-rpath $libdir'
20798       fi
20799       archive_cmds_need_lc='no'
20800       hardcode_libdir_separator=:
20801       ;;
20802
20803     solaris*)
20804       no_undefined_flag=' -z defs'
20805       if test yes = "$GCC"; then
20806         wlarc='$wl'
20807         archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
20808         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
20809           $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'
20810       else
20811         case `$CC -V 2>&1` in
20812         *"Compilers 5.0"*)
20813           wlarc=''
20814           archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
20815           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
20816             $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
20817           ;;
20818         *)
20819           wlarc='$wl'
20820           archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
20821           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
20822             $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
20823           ;;
20824         esac
20825       fi
20826       hardcode_libdir_flag_spec='-R$libdir'
20827       hardcode_shlibpath_var=no
20828       case $host_os in
20829       solaris2.[0-5] | solaris2.[0-5].*) ;;
20830       *)
20831         # The compiler driver will combine and reorder linker options,
20832         # but understands '-z linker_flag'.  GCC discards it without '$wl',
20833         # but is careful enough not to reorder.
20834         # Supported since Solaris 2.6 (maybe 2.5.1?)
20835         if test yes = "$GCC"; then
20836           whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
20837         else
20838           whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
20839         fi
20840         ;;
20841       esac
20842       link_all_deplibs=yes
20843       ;;
20844
20845     sunos4*)
20846       if test sequent = "$host_vendor"; then
20847         # Use $CC to link under sequent, because it throws in some extra .o
20848         # files that make .init and .fini sections work.
20849         archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
20850       else
20851         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
20852       fi
20853       hardcode_libdir_flag_spec='-L$libdir'
20854       hardcode_direct=yes
20855       hardcode_minus_L=yes
20856       hardcode_shlibpath_var=no
20857       ;;
20858
20859     sysv4)
20860       case $host_vendor in
20861         sni)
20862           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20863           hardcode_direct=yes # is this really true???
20864         ;;
20865         siemens)
20866           ## LD is ld it makes a PLAMLIB
20867           ## CC just makes a GrossModule.
20868           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
20869           reload_cmds='$CC -r -o $output$reload_objs'
20870           hardcode_direct=no
20871         ;;
20872         motorola)
20873           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20874           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
20875         ;;
20876       esac
20877       runpath_var='LD_RUN_PATH'
20878       hardcode_shlibpath_var=no
20879       ;;
20880
20881     sysv4.3*)
20882       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20883       hardcode_shlibpath_var=no
20884       export_dynamic_flag_spec='-Bexport'
20885       ;;
20886
20887     sysv4*MP*)
20888       if test -d /usr/nec; then
20889         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20890         hardcode_shlibpath_var=no
20891         runpath_var=LD_RUN_PATH
20892         hardcode_runpath_var=yes
20893         ld_shlibs=yes
20894       fi
20895       ;;
20896
20897     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
20898       no_undefined_flag='$wl-z,text'
20899       archive_cmds_need_lc=no
20900       hardcode_shlibpath_var=no
20901       runpath_var='LD_RUN_PATH'
20902
20903       if test yes = "$GCC"; then
20904         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20905         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20906       else
20907         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20908         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20909       fi
20910       ;;
20911
20912     sysv5* | sco3.2v5* | sco5v6*)
20913       # Note: We CANNOT use -z defs as we might desire, because we do not
20914       # link with -lc, and that would cause any symbols used from libc to
20915       # always be unresolved, which means just about no library would
20916       # ever link correctly.  If we're not using GNU ld we use -z text
20917       # though, which does catch some bad symbols but isn't as heavy-handed
20918       # as -z defs.
20919       no_undefined_flag='$wl-z,text'
20920       allow_undefined_flag='$wl-z,nodefs'
20921       archive_cmds_need_lc=no
20922       hardcode_shlibpath_var=no
20923       hardcode_libdir_flag_spec='$wl-R,$libdir'
20924       hardcode_libdir_separator=':'
20925       link_all_deplibs=yes
20926       export_dynamic_flag_spec='$wl-Bexport'
20927       runpath_var='LD_RUN_PATH'
20928
20929       if test yes = "$GCC"; then
20930         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20931         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20932       else
20933         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20934         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20935       fi
20936       ;;
20937
20938     uts4*)
20939       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20940       hardcode_libdir_flag_spec='-L$libdir'
20941       hardcode_shlibpath_var=no
20942       ;;
20943
20944     *)
20945       ld_shlibs=no
20946       ;;
20947     esac
20948
20949     if test sni = "$host_vendor"; then
20950       case $host in
20951       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
20952         export_dynamic_flag_spec='$wl-Blargedynsym'
20953         ;;
20954       esac
20955     fi
20956   fi
20957
20958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
20959 $as_echo "$ld_shlibs" >&6; }
20960 test no = "$ld_shlibs" && can_build_shared=no
20961
20962 with_gnu_ld=$with_gnu_ld
20963
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978 #
20979 # Do we need to explicitly link libc?
20980 #
20981 case "x$archive_cmds_need_lc" in
20982 x|xyes)
20983   # Assume -lc should be added
20984   archive_cmds_need_lc=yes
20985
20986   if test yes,yes = "$GCC,$enable_shared"; then
20987     case $archive_cmds in
20988     *'~'*)
20989       # FIXME: we may have to deal with multi-command sequences.
20990       ;;
20991     '$CC '*)
20992       # Test whether the compiler implicitly links with -lc since on some
20993       # systems, -lgcc has to come before -lc. If gcc already passes -lc
20994       # to ld, don't add -lc before -lgcc.
20995       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
20996 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
20997 if ${lt_cv_archive_cmds_need_lc+:} false; then :
20998   $as_echo_n "(cached) " >&6
20999 else
21000   $RM conftest*
21001         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
21002
21003         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
21004   (eval $ac_compile) 2>&5
21005   ac_status=$?
21006   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21007   test $ac_status = 0; } 2>conftest.err; then
21008           soname=conftest
21009           lib=conftest
21010           libobjs=conftest.$ac_objext
21011           deplibs=
21012           wl=$lt_prog_compiler_wl
21013           pic_flag=$lt_prog_compiler_pic
21014           compiler_flags=-v
21015           linker_flags=-v
21016           verstring=
21017           output_objdir=.
21018           libname=conftest
21019           lt_save_allow_undefined_flag=$allow_undefined_flag
21020           allow_undefined_flag=
21021           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
21022   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
21023   ac_status=$?
21024   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21025   test $ac_status = 0; }
21026           then
21027             lt_cv_archive_cmds_need_lc=no
21028           else
21029             lt_cv_archive_cmds_need_lc=yes
21030           fi
21031           allow_undefined_flag=$lt_save_allow_undefined_flag
21032         else
21033           cat conftest.err 1>&5
21034         fi
21035         $RM conftest*
21036
21037 fi
21038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
21039 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
21040       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
21041       ;;
21042     esac
21043   fi
21044   ;;
21045 esac
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186
21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
21199 $as_echo_n "checking dynamic linker characteristics... " >&6; }
21200
21201 if test yes = "$GCC"; then
21202   case $host_os in
21203     darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
21204     *) lt_awk_arg='/^libraries:/' ;;
21205   esac
21206   case $host_os in
21207     mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
21208     *) lt_sed_strip_eq='s|=/|/|g' ;;
21209   esac
21210   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
21211   case $lt_search_path_spec in
21212   *\;*)
21213     # if the path contains ";" then we assume it to be the separator
21214     # otherwise default to the standard path separator (i.e. ":") - it is
21215     # assumed that no part of a normal pathname contains ";" but that should
21216     # okay in the real world where ";" in dirpaths is itself problematic.
21217     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
21218     ;;
21219   *)
21220     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
21221     ;;
21222   esac
21223   # Ok, now we have the path, separated by spaces, we can step through it
21224   # and add multilib dir if necessary...
21225   lt_tmp_lt_search_path_spec=
21226   lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
21227   # ...but if some path component already ends with the multilib dir we assume
21228   # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
21229   case "$lt_multi_os_dir; $lt_search_path_spec " in
21230   "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
21231     lt_multi_os_dir=
21232     ;;
21233   esac
21234   for lt_sys_path in $lt_search_path_spec; do
21235     if test -d "$lt_sys_path$lt_multi_os_dir"; then
21236       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
21237     elif test -n "$lt_multi_os_dir"; then
21238       test -d "$lt_sys_path" && \
21239         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
21240     fi
21241   done
21242   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
21243 BEGIN {RS = " "; FS = "/|\n";} {
21244   lt_foo = "";
21245   lt_count = 0;
21246   for (lt_i = NF; lt_i > 0; lt_i--) {
21247     if ($lt_i != "" && $lt_i != ".") {
21248       if ($lt_i == "..") {
21249         lt_count++;
21250       } else {
21251         if (lt_count == 0) {
21252           lt_foo = "/" $lt_i lt_foo;
21253         } else {
21254           lt_count--;
21255         }
21256       }
21257     }
21258   }
21259   if (lt_foo != "") { lt_freq[lt_foo]++; }
21260   if (lt_freq[lt_foo] == 1) { print lt_foo; }
21261 }'`
21262   # AWK program above erroneously prepends '/' to C:/dos/paths
21263   # for these hosts.
21264   case $host_os in
21265     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
21266       $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
21267   esac
21268   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
21269 else
21270   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
21271 fi
21272 library_names_spec=
21273 libname_spec='lib$name'
21274 soname_spec=
21275 shrext_cmds=.so
21276 postinstall_cmds=
21277 postuninstall_cmds=
21278 finish_cmds=
21279 finish_eval=
21280 shlibpath_var=
21281 shlibpath_overrides_runpath=unknown
21282 version_type=none
21283 dynamic_linker="$host_os ld.so"
21284 sys_lib_dlsearch_path_spec="/lib /usr/lib"
21285 need_lib_prefix=unknown
21286 hardcode_into_libs=no
21287
21288 # when you set need_version to no, make sure it does not cause -set_version
21289 # flags to be left without arguments
21290 need_version=unknown
21291
21292
21293
21294 case $host_os in
21295 aix3*)
21296   version_type=linux # correct to gnu/linux during the next big refactor
21297   library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
21298   shlibpath_var=LIBPATH
21299
21300   # AIX 3 has no versioning support, so we append a major version to the name.
21301   soname_spec='$libname$release$shared_ext$major'
21302   ;;
21303
21304 aix[4-9]*)
21305   version_type=linux # correct to gnu/linux during the next big refactor
21306   need_lib_prefix=no
21307   need_version=no
21308   hardcode_into_libs=yes
21309   if test ia64 = "$host_cpu"; then
21310     # AIX 5 supports IA64
21311     library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
21312     shlibpath_var=LD_LIBRARY_PATH
21313   else
21314     # With GCC up to 2.95.x, collect2 would create an import file
21315     # for dependence libraries.  The import file would start with
21316     # the line '#! .'.  This would cause the generated library to
21317     # depend on '.', always an invalid library.  This was fixed in
21318     # development snapshots of GCC prior to 3.0.
21319     case $host_os in
21320       aix4 | aix4.[01] | aix4.[01].*)
21321       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
21322            echo ' yes '
21323            echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
21324         :
21325       else
21326         can_build_shared=no
21327       fi
21328       ;;
21329     esac
21330     # Using Import Files as archive members, it is possible to support
21331     # filename-based versioning of shared library archives on AIX. While
21332     # this would work for both with and without runtime linking, it will
21333     # prevent static linking of such archives. So we do filename-based
21334     # shared library versioning with .so extension only, which is used
21335     # when both runtime linking and shared linking is enabled.
21336     # Unfortunately, runtime linking may impact performance, so we do
21337     # not want this to be the default eventually. Also, we use the
21338     # versioned .so libs for executables only if there is the -brtl
21339     # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
21340     # To allow for filename-based versioning support, we need to create
21341     # libNAME.so.V as an archive file, containing:
21342     # *) an Import File, referring to the versioned filename of the
21343     #    archive as well as the shared archive member, telling the
21344     #    bitwidth (32 or 64) of that shared object, and providing the
21345     #    list of exported symbols of that shared object, eventually
21346     #    decorated with the 'weak' keyword
21347     # *) the shared object with the F_LOADONLY flag set, to really avoid
21348     #    it being seen by the linker.
21349     # At run time we better use the real file rather than another symlink,
21350     # but for link time we create the symlink libNAME.so -> libNAME.so.V
21351
21352     case $with_aix_soname,$aix_use_runtimelinking in
21353     # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
21354     # soname into executable. Probably we can add versioning support to
21355     # collect2, so additional links can be useful in future.
21356     aix,yes) # traditional libtool
21357       dynamic_linker='AIX unversionable lib.so'
21358       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
21359       # instead of lib<name>.a to let people know that these are not
21360       # typical AIX shared libraries.
21361       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21362       ;;
21363     aix,no) # traditional AIX only
21364       dynamic_linker='AIX lib.a(lib.so.V)'
21365       # We preserve .a as extension for shared libraries through AIX4.2
21366       # and later when we are not doing run time linking.
21367       library_names_spec='$libname$release.a $libname.a'
21368       soname_spec='$libname$release$shared_ext$major'
21369       ;;
21370     svr4,*) # full svr4 only
21371       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
21372       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
21373       # We do not specify a path in Import Files, so LIBPATH fires.
21374       shlibpath_overrides_runpath=yes
21375       ;;
21376     *,yes) # both, prefer svr4
21377       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
21378       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
21379       # unpreferred sharedlib libNAME.a needs extra handling
21380       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"'
21381       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"'
21382       # We do not specify a path in Import Files, so LIBPATH fires.
21383       shlibpath_overrides_runpath=yes
21384       ;;
21385     *,no) # both, prefer aix
21386       dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
21387       library_names_spec='$libname$release.a $libname.a'
21388       soname_spec='$libname$release$shared_ext$major'
21389       # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
21390       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)'
21391       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"'
21392       ;;
21393     esac
21394     shlibpath_var=LIBPATH
21395   fi
21396   ;;
21397
21398 amigaos*)
21399   case $host_cpu in
21400   powerpc)
21401     # Since July 2007 AmigaOS4 officially supports .so libraries.
21402     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
21403     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21404     ;;
21405   m68k)
21406     library_names_spec='$libname.ixlibrary $libname.a'
21407     # Create ${libname}_ixlibrary.a entries in /sys/libs.
21408     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'
21409     ;;
21410   esac
21411   ;;
21412
21413 beos*)
21414   library_names_spec='$libname$shared_ext'
21415   dynamic_linker="$host_os ld.so"
21416   shlibpath_var=LIBRARY_PATH
21417   ;;
21418
21419 bsdi[45]*)
21420   version_type=linux # correct to gnu/linux during the next big refactor
21421   need_version=no
21422   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21423   soname_spec='$libname$release$shared_ext$major'
21424   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
21425   shlibpath_var=LD_LIBRARY_PATH
21426   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
21427   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
21428   # the default ld.so.conf also contains /usr/contrib/lib and
21429   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
21430   # libtool to hard-code these into programs
21431   ;;
21432
21433 cygwin* | mingw* | pw32* | cegcc*)
21434   version_type=windows
21435   shrext_cmds=.dll
21436   need_version=no
21437   need_lib_prefix=no
21438
21439   case $GCC,$cc_basename in
21440   yes,*)
21441     # gcc
21442     library_names_spec='$libname.dll.a'
21443     # DLL is installed to $(libdir)/../bin by postinstall_cmds
21444     postinstall_cmds='base_file=`basename \$file`~
21445       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
21446       dldir=$destdir/`dirname \$dlpath`~
21447       test -d \$dldir || mkdir -p \$dldir~
21448       $install_prog $dir/$dlname \$dldir/$dlname~
21449       chmod a+x \$dldir/$dlname~
21450       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
21451         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
21452       fi'
21453     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
21454       dlpath=$dir/\$dldll~
21455        $RM \$dlpath'
21456     shlibpath_overrides_runpath=yes
21457
21458     case $host_os in
21459     cygwin*)
21460       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
21461       soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
21462
21463       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
21464       ;;
21465     mingw* | cegcc*)
21466       # MinGW DLLs use traditional 'lib' prefix
21467       soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
21468       ;;
21469     pw32*)
21470       # pw32 DLLs use 'pw' prefix rather than 'lib'
21471       library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
21472       ;;
21473     esac
21474     dynamic_linker='Win32 ld.exe'
21475     ;;
21476
21477   *,cl*)
21478     # Native MSVC
21479     libname_spec='$name'
21480     soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
21481     library_names_spec='$libname.dll.lib'
21482
21483     case $build_os in
21484     mingw*)
21485       sys_lib_search_path_spec=
21486       lt_save_ifs=$IFS
21487       IFS=';'
21488       for lt_path in $LIB
21489       do
21490         IFS=$lt_save_ifs
21491         # Let DOS variable expansion print the short 8.3 style file name.
21492         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
21493         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
21494       done
21495       IFS=$lt_save_ifs
21496       # Convert to MSYS style.
21497       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
21498       ;;
21499     cygwin*)
21500       # Convert to unix form, then to dos form, then back to unix form
21501       # but this time dos style (no spaces!) so that the unix form looks
21502       # like /cygdrive/c/PROGRA~1:/cygdr...
21503       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
21504       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
21505       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
21506       ;;
21507     *)
21508       sys_lib_search_path_spec=$LIB
21509       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
21510         # It is most probably a Windows format PATH.
21511         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
21512       else
21513         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
21514       fi
21515       # FIXME: find the short name or the path components, as spaces are
21516       # common. (e.g. "Program Files" -> "PROGRA~1")
21517       ;;
21518     esac
21519
21520     # DLL is installed to $(libdir)/../bin by postinstall_cmds
21521     postinstall_cmds='base_file=`basename \$file`~
21522       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
21523       dldir=$destdir/`dirname \$dlpath`~
21524       test -d \$dldir || mkdir -p \$dldir~
21525       $install_prog $dir/$dlname \$dldir/$dlname'
21526     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
21527       dlpath=$dir/\$dldll~
21528        $RM \$dlpath'
21529     shlibpath_overrides_runpath=yes
21530     dynamic_linker='Win32 link.exe'
21531     ;;
21532
21533   *)
21534     # Assume MSVC wrapper
21535     library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
21536     dynamic_linker='Win32 ld.exe'
21537     ;;
21538   esac
21539   # FIXME: first we should search . and the directory the executable is in
21540   shlibpath_var=PATH
21541   ;;
21542
21543 darwin* | rhapsody*)
21544   dynamic_linker="$host_os dyld"
21545   version_type=darwin
21546   need_lib_prefix=no
21547   need_version=no
21548   library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
21549   soname_spec='$libname$release$major$shared_ext'
21550   shlibpath_overrides_runpath=yes
21551   shlibpath_var=DYLD_LIBRARY_PATH
21552   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
21553
21554   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
21555   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
21556   ;;
21557
21558 dgux*)
21559   version_type=linux # correct to gnu/linux during the next big refactor
21560   need_lib_prefix=no
21561   need_version=no
21562   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21563   soname_spec='$libname$release$shared_ext$major'
21564   shlibpath_var=LD_LIBRARY_PATH
21565   ;;
21566
21567 freebsd* | dragonfly*)
21568   # DragonFly does not have aout.  When/if they implement a new
21569   # versioning mechanism, adjust this.
21570   if test -x /usr/bin/objformat; then
21571     objformat=`/usr/bin/objformat`
21572   else
21573     case $host_os in
21574     freebsd[23].*) objformat=aout ;;
21575     *) objformat=elf ;;
21576     esac
21577   fi
21578   version_type=freebsd-$objformat
21579   case $version_type in
21580     freebsd-elf*)
21581       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21582       soname_spec='$libname$release$shared_ext$major'
21583       need_version=no
21584       need_lib_prefix=no
21585       ;;
21586     freebsd-*)
21587       library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
21588       need_version=yes
21589       ;;
21590   esac
21591   shlibpath_var=LD_LIBRARY_PATH
21592   case $host_os in
21593   freebsd2.*)
21594     shlibpath_overrides_runpath=yes
21595     ;;
21596   freebsd3.[01]* | freebsdelf3.[01]*)
21597     shlibpath_overrides_runpath=yes
21598     hardcode_into_libs=yes
21599     ;;
21600   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
21601   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
21602     shlibpath_overrides_runpath=no
21603     hardcode_into_libs=yes
21604     ;;
21605   *) # from 4.6 on, and DragonFly
21606     shlibpath_overrides_runpath=yes
21607     hardcode_into_libs=yes
21608     ;;
21609   esac
21610   ;;
21611
21612 haiku*)
21613   version_type=linux # correct to gnu/linux during the next big refactor
21614   need_lib_prefix=no
21615   need_version=no
21616   dynamic_linker="$host_os runtime_loader"
21617   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21618   soname_spec='$libname$release$shared_ext$major'
21619   shlibpath_var=LIBRARY_PATH
21620   shlibpath_overrides_runpath=no
21621   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
21622   hardcode_into_libs=yes
21623   ;;
21624
21625 hpux9* | hpux10* | hpux11*)
21626   # Give a soname corresponding to the major version so that dld.sl refuses to
21627   # link against other versions.
21628   version_type=sunos
21629   need_lib_prefix=no
21630   need_version=no
21631   case $host_cpu in
21632   ia64*)
21633     shrext_cmds='.so'
21634     hardcode_into_libs=yes
21635     dynamic_linker="$host_os dld.so"
21636     shlibpath_var=LD_LIBRARY_PATH
21637     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
21638     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21639     soname_spec='$libname$release$shared_ext$major'
21640     if test 32 = "$HPUX_IA64_MODE"; then
21641       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
21642       sys_lib_dlsearch_path_spec=/usr/lib/hpux32
21643     else
21644       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
21645       sys_lib_dlsearch_path_spec=/usr/lib/hpux64
21646     fi
21647     ;;
21648   hppa*64*)
21649     shrext_cmds='.sl'
21650     hardcode_into_libs=yes
21651     dynamic_linker="$host_os dld.sl"
21652     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
21653     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
21654     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21655     soname_spec='$libname$release$shared_ext$major'
21656     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
21657     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
21658     ;;
21659   *)
21660     shrext_cmds='.sl'
21661     dynamic_linker="$host_os dld.sl"
21662     shlibpath_var=SHLIB_PATH
21663     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
21664     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21665     soname_spec='$libname$release$shared_ext$major'
21666     ;;
21667   esac
21668   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
21669   postinstall_cmds='chmod 555 $lib'
21670   # or fails outright, so override atomically:
21671   install_override_mode=555
21672   ;;
21673
21674 interix[3-9]*)
21675   version_type=linux # correct to gnu/linux during the next big refactor
21676   need_lib_prefix=no
21677   need_version=no
21678   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21679   soname_spec='$libname$release$shared_ext$major'
21680   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
21681   shlibpath_var=LD_LIBRARY_PATH
21682   shlibpath_overrides_runpath=no
21683   hardcode_into_libs=yes
21684   ;;
21685
21686 irix5* | irix6* | nonstopux*)
21687   case $host_os in
21688     nonstopux*) version_type=nonstopux ;;
21689     *)
21690         if test yes = "$lt_cv_prog_gnu_ld"; then
21691                 version_type=linux # correct to gnu/linux during the next big refactor
21692         else
21693                 version_type=irix
21694         fi ;;
21695   esac
21696   need_lib_prefix=no
21697   need_version=no
21698   soname_spec='$libname$release$shared_ext$major'
21699   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
21700   case $host_os in
21701   irix5* | nonstopux*)
21702     libsuff= shlibsuff=
21703     ;;
21704   *)
21705     case $LD in # libtool.m4 will add one of these switches to LD
21706     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
21707       libsuff= shlibsuff= libmagic=32-bit;;
21708     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
21709       libsuff=32 shlibsuff=N32 libmagic=N32;;
21710     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
21711       libsuff=64 shlibsuff=64 libmagic=64-bit;;
21712     *) libsuff= shlibsuff= libmagic=never-match;;
21713     esac
21714     ;;
21715   esac
21716   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
21717   shlibpath_overrides_runpath=no
21718   sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
21719   sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
21720   hardcode_into_libs=yes
21721   ;;
21722
21723 # No shared lib support for Linux oldld, aout, or coff.
21724 linux*oldld* | linux*aout* | linux*coff*)
21725   dynamic_linker=no
21726   ;;
21727
21728 linux*android*)
21729   version_type=none # Android doesn't support versioned libraries.
21730   need_lib_prefix=no
21731   need_version=no
21732   library_names_spec='$libname$release$shared_ext'
21733   soname_spec='$libname$release$shared_ext'
21734   finish_cmds=
21735   shlibpath_var=LD_LIBRARY_PATH
21736   shlibpath_overrides_runpath=yes
21737
21738   # This implies no fast_install, which is unacceptable.
21739   # Some rework will be needed to allow for fast_install
21740   # before this can be enabled.
21741   hardcode_into_libs=yes
21742
21743   dynamic_linker='Android linker'
21744   # Don't embed -rpath directories since the linker doesn't support them.
21745   hardcode_libdir_flag_spec='-L$libdir'
21746   ;;
21747
21748 # This must be glibc/ELF.
21749 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
21750   version_type=linux # correct to gnu/linux during the next big refactor
21751   need_lib_prefix=no
21752   need_version=no
21753   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21754   soname_spec='$libname$release$shared_ext$major'
21755   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
21756   shlibpath_var=LD_LIBRARY_PATH
21757   shlibpath_overrides_runpath=no
21758
21759   # Some binutils ld are patched to set DT_RUNPATH
21760   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
21761   $as_echo_n "(cached) " >&6
21762 else
21763   lt_cv_shlibpath_overrides_runpath=no
21764     save_LDFLAGS=$LDFLAGS
21765     save_libdir=$libdir
21766     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
21767          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
21768     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21769 /* end confdefs.h.  */
21770
21771 int
21772 main ()
21773 {
21774
21775   ;
21776   return 0;
21777 }
21778 _ACEOF
21779 if ac_fn_c_try_link "$LINENO"; then :
21780   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
21781   lt_cv_shlibpath_overrides_runpath=yes
21782 fi
21783 fi
21784 rm -f core conftest.err conftest.$ac_objext \
21785     conftest$ac_exeext conftest.$ac_ext
21786     LDFLAGS=$save_LDFLAGS
21787     libdir=$save_libdir
21788
21789 fi
21790
21791   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
21792
21793   # This implies no fast_install, which is unacceptable.
21794   # Some rework will be needed to allow for fast_install
21795   # before this can be enabled.
21796   hardcode_into_libs=yes
21797
21798   # Ideally, we could use ldconfig to report *all* directores which are
21799   # searched for libraries, however this is still not possible.  Aside from not
21800   # being certain /sbin/ldconfig is available, command
21801   # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
21802   # even though it is searched at run-time.  Try to do the best guess by
21803   # appending ld.so.conf contents (and includes) to the search path.
21804   if test -f /etc/ld.so.conf; then
21805     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' ' '`
21806     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
21807   fi
21808
21809   # We used to test for /lib/ld.so.1 and disable shared libraries on
21810   # powerpc, because MkLinux only supported shared libraries with the
21811   # GNU dynamic linker.  Since this was broken with cross compilers,
21812   # most powerpc-linux boxes support dynamic linking these days and
21813   # people can always --disable-shared, the test was removed, and we
21814   # assume the GNU/Linux dynamic linker is in use.
21815   dynamic_linker='GNU/Linux ld.so'
21816   ;;
21817
21818 netbsd*)
21819   version_type=sunos
21820   need_lib_prefix=no
21821   need_version=no
21822   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
21823     library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
21824     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
21825     dynamic_linker='NetBSD (a.out) ld.so'
21826   else
21827     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21828     soname_spec='$libname$release$shared_ext$major'
21829     dynamic_linker='NetBSD ld.elf_so'
21830   fi
21831   shlibpath_var=LD_LIBRARY_PATH
21832   shlibpath_overrides_runpath=yes
21833   hardcode_into_libs=yes
21834   ;;
21835
21836 newsos6)
21837   version_type=linux # correct to gnu/linux during the next big refactor
21838   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21839   shlibpath_var=LD_LIBRARY_PATH
21840   shlibpath_overrides_runpath=yes
21841   ;;
21842
21843 *nto* | *qnx*)
21844   version_type=qnx
21845   need_lib_prefix=no
21846   need_version=no
21847   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21848   soname_spec='$libname$release$shared_ext$major'
21849   shlibpath_var=LD_LIBRARY_PATH
21850   shlibpath_overrides_runpath=no
21851   hardcode_into_libs=yes
21852   dynamic_linker='ldqnx.so'
21853   ;;
21854
21855 openbsd* | bitrig*)
21856   version_type=sunos
21857   sys_lib_dlsearch_path_spec=/usr/lib
21858   need_lib_prefix=no
21859   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
21860     need_version=no
21861   else
21862     need_version=yes
21863   fi
21864   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
21865   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
21866   shlibpath_var=LD_LIBRARY_PATH
21867   shlibpath_overrides_runpath=yes
21868   ;;
21869
21870 os2*)
21871   libname_spec='$name'
21872   version_type=windows
21873   shrext_cmds=.dll
21874   need_version=no
21875   need_lib_prefix=no
21876   # OS/2 can only load a DLL with a base name of 8 characters or less.
21877   soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
21878     v=$($ECHO $release$versuffix | tr -d .-);
21879     n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
21880     $ECHO $n$v`$shared_ext'
21881   library_names_spec='${libname}_dll.$libext'
21882   dynamic_linker='OS/2 ld.exe'
21883   shlibpath_var=BEGINLIBPATH
21884   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
21885   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
21886   postinstall_cmds='base_file=`basename \$file`~
21887     dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
21888     dldir=$destdir/`dirname \$dlpath`~
21889     test -d \$dldir || mkdir -p \$dldir~
21890     $install_prog $dir/$dlname \$dldir/$dlname~
21891     chmod a+x \$dldir/$dlname~
21892     if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
21893       eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
21894     fi'
21895   postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
21896     dlpath=$dir/\$dldll~
21897     $RM \$dlpath'
21898   ;;
21899
21900 osf3* | osf4* | osf5*)
21901   version_type=osf
21902   need_lib_prefix=no
21903   need_version=no
21904   soname_spec='$libname$release$shared_ext$major'
21905   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21906   shlibpath_var=LD_LIBRARY_PATH
21907   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
21908   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
21909   ;;
21910
21911 rdos*)
21912   dynamic_linker=no
21913   ;;
21914
21915 solaris*)
21916   version_type=linux # correct to gnu/linux during the next big refactor
21917   need_lib_prefix=no
21918   need_version=no
21919   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21920   soname_spec='$libname$release$shared_ext$major'
21921   shlibpath_var=LD_LIBRARY_PATH
21922   shlibpath_overrides_runpath=yes
21923   hardcode_into_libs=yes
21924   # ldd complains unless libraries are executable
21925   postinstall_cmds='chmod +x $lib'
21926   ;;
21927
21928 sunos4*)
21929   version_type=sunos
21930   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
21931   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
21932   shlibpath_var=LD_LIBRARY_PATH
21933   shlibpath_overrides_runpath=yes
21934   if test yes = "$with_gnu_ld"; then
21935     need_lib_prefix=no
21936   fi
21937   need_version=yes
21938   ;;
21939
21940 sysv4 | sysv4.3*)
21941   version_type=linux # correct to gnu/linux during the next big refactor
21942   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21943   soname_spec='$libname$release$shared_ext$major'
21944   shlibpath_var=LD_LIBRARY_PATH
21945   case $host_vendor in
21946     sni)
21947       shlibpath_overrides_runpath=no
21948       need_lib_prefix=no
21949       runpath_var=LD_RUN_PATH
21950       ;;
21951     siemens)
21952       need_lib_prefix=no
21953       ;;
21954     motorola)
21955       need_lib_prefix=no
21956       need_version=no
21957       shlibpath_overrides_runpath=no
21958       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
21959       ;;
21960   esac
21961   ;;
21962
21963 sysv4*MP*)
21964   if test -d /usr/nec; then
21965     version_type=linux # correct to gnu/linux during the next big refactor
21966     library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
21967     soname_spec='$libname$shared_ext.$major'
21968     shlibpath_var=LD_LIBRARY_PATH
21969   fi
21970   ;;
21971
21972 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
21973   version_type=sco
21974   need_lib_prefix=no
21975   need_version=no
21976   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
21977   soname_spec='$libname$release$shared_ext$major'
21978   shlibpath_var=LD_LIBRARY_PATH
21979   shlibpath_overrides_runpath=yes
21980   hardcode_into_libs=yes
21981   if test yes = "$with_gnu_ld"; then
21982     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
21983   else
21984     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
21985     case $host_os in
21986       sco3.2v5*)
21987         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
21988         ;;
21989     esac
21990   fi
21991   sys_lib_dlsearch_path_spec='/usr/lib'
21992   ;;
21993
21994 tpf*)
21995   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
21996   version_type=linux # correct to gnu/linux during the next big refactor
21997   need_lib_prefix=no
21998   need_version=no
21999   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22000   shlibpath_var=LD_LIBRARY_PATH
22001   shlibpath_overrides_runpath=no
22002   hardcode_into_libs=yes
22003   ;;
22004
22005 uts4*)
22006   version_type=linux # correct to gnu/linux during the next big refactor
22007   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22008   soname_spec='$libname$release$shared_ext$major'
22009   shlibpath_var=LD_LIBRARY_PATH
22010   ;;
22011
22012 *)
22013   dynamic_linker=no
22014   ;;
22015 esac
22016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
22017 $as_echo "$dynamic_linker" >&6; }
22018 test no = "$dynamic_linker" && can_build_shared=no
22019
22020 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
22021 if test yes = "$GCC"; then
22022   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
22023 fi
22024
22025 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
22026   sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
22027 fi
22028
22029 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
22030   sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
22031 fi
22032
22033 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
22034 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
22035
22036 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
22037 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
22038
22039 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
22040 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
22041
22042
22043
22044
22045
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
22139 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
22140 hardcode_action=
22141 if test -n "$hardcode_libdir_flag_spec" ||
22142    test -n "$runpath_var" ||
22143    test yes = "$hardcode_automatic"; then
22144
22145   # We can hardcode non-existent directories.
22146   if test no != "$hardcode_direct" &&
22147      # If the only mechanism to avoid hardcoding is shlibpath_var, we
22148      # have to relink, otherwise we might link with an installed library
22149      # when we should be linking with a yet-to-be-installed one
22150      ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
22151      test no != "$hardcode_minus_L"; then
22152     # Linking always hardcodes the temporary library directory.
22153     hardcode_action=relink
22154   else
22155     # We can link without hardcoding, and we can hardcode nonexisting dirs.
22156     hardcode_action=immediate
22157   fi
22158 else
22159   # We cannot hardcode anything, or else we can only hardcode existing
22160   # directories.
22161   hardcode_action=unsupported
22162 fi
22163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
22164 $as_echo "$hardcode_action" >&6; }
22165
22166 if test relink = "$hardcode_action" ||
22167    test yes = "$inherit_rpath"; then
22168   # Fast installation is not supported
22169   enable_fast_install=no
22170 elif test yes = "$shlibpath_overrides_runpath" ||
22171      test no = "$enable_shared"; then
22172   # Fast installation is not necessary
22173   enable_fast_install=needless
22174 fi
22175
22176
22177
22178
22179
22180
22181   if test yes != "$enable_dlopen"; then
22182   enable_dlopen=unknown
22183   enable_dlopen_self=unknown
22184   enable_dlopen_self_static=unknown
22185 else
22186   lt_cv_dlopen=no
22187   lt_cv_dlopen_libs=
22188
22189   case $host_os in
22190   beos*)
22191     lt_cv_dlopen=load_add_on
22192     lt_cv_dlopen_libs=
22193     lt_cv_dlopen_self=yes
22194     ;;
22195
22196   mingw* | pw32* | cegcc*)
22197     lt_cv_dlopen=LoadLibrary
22198     lt_cv_dlopen_libs=
22199     ;;
22200
22201   cygwin*)
22202     lt_cv_dlopen=dlopen
22203     lt_cv_dlopen_libs=
22204     ;;
22205
22206   darwin*)
22207     # if libdl is installed we need to link against it
22208     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
22209 $as_echo_n "checking for dlopen in -ldl... " >&6; }
22210 if ${ac_cv_lib_dl_dlopen+:} false; then :
22211   $as_echo_n "(cached) " >&6
22212 else
22213   ac_check_lib_save_LIBS=$LIBS
22214 LIBS="-ldl  $LIBS"
22215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22216 /* end confdefs.h.  */
22217
22218 /* Override any GCC internal prototype to avoid an error.
22219    Use char because int might match the return type of a GCC
22220    builtin and then its argument prototype would still apply.  */
22221 #ifdef __cplusplus
22222 extern "C"
22223 #endif
22224 char dlopen ();
22225 int
22226 main ()
22227 {
22228 return dlopen ();
22229   ;
22230   return 0;
22231 }
22232 _ACEOF
22233 if ac_fn_c_try_link "$LINENO"; then :
22234   ac_cv_lib_dl_dlopen=yes
22235 else
22236   ac_cv_lib_dl_dlopen=no
22237 fi
22238 rm -f core conftest.err conftest.$ac_objext \
22239     conftest$ac_exeext conftest.$ac_ext
22240 LIBS=$ac_check_lib_save_LIBS
22241 fi
22242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
22243 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
22244 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
22245   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
22246 else
22247
22248     lt_cv_dlopen=dyld
22249     lt_cv_dlopen_libs=
22250     lt_cv_dlopen_self=yes
22251
22252 fi
22253
22254     ;;
22255
22256   tpf*)
22257     # Don't try to run any link tests for TPF.  We know it's impossible
22258     # because TPF is a cross-compiler, and we know how we open DSOs.
22259     lt_cv_dlopen=dlopen
22260     lt_cv_dlopen_libs=
22261     lt_cv_dlopen_self=no
22262     ;;
22263
22264   *)
22265     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
22266 if test "x$ac_cv_func_shl_load" = xyes; then :
22267   lt_cv_dlopen=shl_load
22268 else
22269   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
22270 $as_echo_n "checking for shl_load in -ldld... " >&6; }
22271 if ${ac_cv_lib_dld_shl_load+:} false; then :
22272   $as_echo_n "(cached) " >&6
22273 else
22274   ac_check_lib_save_LIBS=$LIBS
22275 LIBS="-ldld  $LIBS"
22276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22277 /* end confdefs.h.  */
22278
22279 /* Override any GCC internal prototype to avoid an error.
22280    Use char because int might match the return type of a GCC
22281    builtin and then its argument prototype would still apply.  */
22282 #ifdef __cplusplus
22283 extern "C"
22284 #endif
22285 char shl_load ();
22286 int
22287 main ()
22288 {
22289 return shl_load ();
22290   ;
22291   return 0;
22292 }
22293 _ACEOF
22294 if ac_fn_c_try_link "$LINENO"; then :
22295   ac_cv_lib_dld_shl_load=yes
22296 else
22297   ac_cv_lib_dld_shl_load=no
22298 fi
22299 rm -f core conftest.err conftest.$ac_objext \
22300     conftest$ac_exeext conftest.$ac_ext
22301 LIBS=$ac_check_lib_save_LIBS
22302 fi
22303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
22304 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
22305 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
22306   lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
22307 else
22308   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
22309 if test "x$ac_cv_func_dlopen" = xyes; then :
22310   lt_cv_dlopen=dlopen
22311 else
22312   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
22313 $as_echo_n "checking for dlopen in -ldl... " >&6; }
22314 if ${ac_cv_lib_dl_dlopen+:} false; then :
22315   $as_echo_n "(cached) " >&6
22316 else
22317   ac_check_lib_save_LIBS=$LIBS
22318 LIBS="-ldl  $LIBS"
22319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22320 /* end confdefs.h.  */
22321
22322 /* Override any GCC internal prototype to avoid an error.
22323    Use char because int might match the return type of a GCC
22324    builtin and then its argument prototype would still apply.  */
22325 #ifdef __cplusplus
22326 extern "C"
22327 #endif
22328 char dlopen ();
22329 int
22330 main ()
22331 {
22332 return dlopen ();
22333   ;
22334   return 0;
22335 }
22336 _ACEOF
22337 if ac_fn_c_try_link "$LINENO"; then :
22338   ac_cv_lib_dl_dlopen=yes
22339 else
22340   ac_cv_lib_dl_dlopen=no
22341 fi
22342 rm -f core conftest.err conftest.$ac_objext \
22343     conftest$ac_exeext conftest.$ac_ext
22344 LIBS=$ac_check_lib_save_LIBS
22345 fi
22346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
22347 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
22348 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
22349   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
22350 else
22351   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
22352 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
22353 if ${ac_cv_lib_svld_dlopen+:} false; then :
22354   $as_echo_n "(cached) " >&6
22355 else
22356   ac_check_lib_save_LIBS=$LIBS
22357 LIBS="-lsvld  $LIBS"
22358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22359 /* end confdefs.h.  */
22360
22361 /* Override any GCC internal prototype to avoid an error.
22362    Use char because int might match the return type of a GCC
22363    builtin and then its argument prototype would still apply.  */
22364 #ifdef __cplusplus
22365 extern "C"
22366 #endif
22367 char dlopen ();
22368 int
22369 main ()
22370 {
22371 return dlopen ();
22372   ;
22373   return 0;
22374 }
22375 _ACEOF
22376 if ac_fn_c_try_link "$LINENO"; then :
22377   ac_cv_lib_svld_dlopen=yes
22378 else
22379   ac_cv_lib_svld_dlopen=no
22380 fi
22381 rm -f core conftest.err conftest.$ac_objext \
22382     conftest$ac_exeext conftest.$ac_ext
22383 LIBS=$ac_check_lib_save_LIBS
22384 fi
22385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
22386 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
22387 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
22388   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
22389 else
22390   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
22391 $as_echo_n "checking for dld_link in -ldld... " >&6; }
22392 if ${ac_cv_lib_dld_dld_link+:} false; then :
22393   $as_echo_n "(cached) " >&6
22394 else
22395   ac_check_lib_save_LIBS=$LIBS
22396 LIBS="-ldld  $LIBS"
22397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22398 /* end confdefs.h.  */
22399
22400 /* Override any GCC internal prototype to avoid an error.
22401    Use char because int might match the return type of a GCC
22402    builtin and then its argument prototype would still apply.  */
22403 #ifdef __cplusplus
22404 extern "C"
22405 #endif
22406 char dld_link ();
22407 int
22408 main ()
22409 {
22410 return dld_link ();
22411   ;
22412   return 0;
22413 }
22414 _ACEOF
22415 if ac_fn_c_try_link "$LINENO"; then :
22416   ac_cv_lib_dld_dld_link=yes
22417 else
22418   ac_cv_lib_dld_dld_link=no
22419 fi
22420 rm -f core conftest.err conftest.$ac_objext \
22421     conftest$ac_exeext conftest.$ac_ext
22422 LIBS=$ac_check_lib_save_LIBS
22423 fi
22424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
22425 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
22426 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
22427   lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
22428 fi
22429
22430
22431 fi
22432
22433
22434 fi
22435
22436
22437 fi
22438
22439
22440 fi
22441
22442
22443 fi
22444
22445     ;;
22446   esac
22447
22448   if test no = "$lt_cv_dlopen"; then
22449     enable_dlopen=no
22450   else
22451     enable_dlopen=yes
22452   fi
22453
22454   case $lt_cv_dlopen in
22455   dlopen)
22456     save_CPPFLAGS=$CPPFLAGS
22457     test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
22458
22459     save_LDFLAGS=$LDFLAGS
22460     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
22461
22462     save_LIBS=$LIBS
22463     LIBS="$lt_cv_dlopen_libs $LIBS"
22464
22465     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
22466 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
22467 if ${lt_cv_dlopen_self+:} false; then :
22468   $as_echo_n "(cached) " >&6
22469 else
22470           if test yes = "$cross_compiling"; then :
22471   lt_cv_dlopen_self=cross
22472 else
22473   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
22474   lt_status=$lt_dlunknown
22475   cat > conftest.$ac_ext <<_LT_EOF
22476 #line $LINENO "configure"
22477 #include "confdefs.h"
22478
22479 #if HAVE_DLFCN_H
22480 #include <dlfcn.h>
22481 #endif
22482
22483 #include <stdio.h>
22484
22485 #ifdef RTLD_GLOBAL
22486 #  define LT_DLGLOBAL           RTLD_GLOBAL
22487 #else
22488 #  ifdef DL_GLOBAL
22489 #    define LT_DLGLOBAL         DL_GLOBAL
22490 #  else
22491 #    define LT_DLGLOBAL         0
22492 #  endif
22493 #endif
22494
22495 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
22496    find out it does not work in some platform. */
22497 #ifndef LT_DLLAZY_OR_NOW
22498 #  ifdef RTLD_LAZY
22499 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
22500 #  else
22501 #    ifdef DL_LAZY
22502 #      define LT_DLLAZY_OR_NOW          DL_LAZY
22503 #    else
22504 #      ifdef RTLD_NOW
22505 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
22506 #      else
22507 #        ifdef DL_NOW
22508 #          define LT_DLLAZY_OR_NOW      DL_NOW
22509 #        else
22510 #          define LT_DLLAZY_OR_NOW      0
22511 #        endif
22512 #      endif
22513 #    endif
22514 #  endif
22515 #endif
22516
22517 /* When -fvisibility=hidden is used, assume the code has been annotated
22518    correspondingly for the symbols needed.  */
22519 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
22520 int fnord () __attribute__((visibility("default")));
22521 #endif
22522
22523 int fnord () { return 42; }
22524 int main ()
22525 {
22526   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
22527   int status = $lt_dlunknown;
22528
22529   if (self)
22530     {
22531       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
22532       else
22533         {
22534           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
22535           else puts (dlerror ());
22536         }
22537       /* dlclose (self); */
22538     }
22539   else
22540     puts (dlerror ());
22541
22542   return status;
22543 }
22544 _LT_EOF
22545   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
22546   (eval $ac_link) 2>&5
22547   ac_status=$?
22548   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22549   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
22550     (./conftest; exit; ) >&5 2>/dev/null
22551     lt_status=$?
22552     case x$lt_status in
22553       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
22554       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
22555       x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
22556     esac
22557   else :
22558     # compilation failed
22559     lt_cv_dlopen_self=no
22560   fi
22561 fi
22562 rm -fr conftest*
22563
22564
22565 fi
22566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
22567 $as_echo "$lt_cv_dlopen_self" >&6; }
22568
22569     if test yes = "$lt_cv_dlopen_self"; then
22570       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
22571       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
22572 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
22573 if ${lt_cv_dlopen_self_static+:} false; then :
22574   $as_echo_n "(cached) " >&6
22575 else
22576           if test yes = "$cross_compiling"; then :
22577   lt_cv_dlopen_self_static=cross
22578 else
22579   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
22580   lt_status=$lt_dlunknown
22581   cat > conftest.$ac_ext <<_LT_EOF
22582 #line $LINENO "configure"
22583 #include "confdefs.h"
22584
22585 #if HAVE_DLFCN_H
22586 #include <dlfcn.h>
22587 #endif
22588
22589 #include <stdio.h>
22590
22591 #ifdef RTLD_GLOBAL
22592 #  define LT_DLGLOBAL           RTLD_GLOBAL
22593 #else
22594 #  ifdef DL_GLOBAL
22595 #    define LT_DLGLOBAL         DL_GLOBAL
22596 #  else
22597 #    define LT_DLGLOBAL         0
22598 #  endif
22599 #endif
22600
22601 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
22602    find out it does not work in some platform. */
22603 #ifndef LT_DLLAZY_OR_NOW
22604 #  ifdef RTLD_LAZY
22605 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
22606 #  else
22607 #    ifdef DL_LAZY
22608 #      define LT_DLLAZY_OR_NOW          DL_LAZY
22609 #    else
22610 #      ifdef RTLD_NOW
22611 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
22612 #      else
22613 #        ifdef DL_NOW
22614 #          define LT_DLLAZY_OR_NOW      DL_NOW
22615 #        else
22616 #          define LT_DLLAZY_OR_NOW      0
22617 #        endif
22618 #      endif
22619 #    endif
22620 #  endif
22621 #endif
22622
22623 /* When -fvisibility=hidden is used, assume the code has been annotated
22624    correspondingly for the symbols needed.  */
22625 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
22626 int fnord () __attribute__((visibility("default")));
22627 #endif
22628
22629 int fnord () { return 42; }
22630 int main ()
22631 {
22632   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
22633   int status = $lt_dlunknown;
22634
22635   if (self)
22636     {
22637       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
22638       else
22639         {
22640           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
22641           else puts (dlerror ());
22642         }
22643       /* dlclose (self); */
22644     }
22645   else
22646     puts (dlerror ());
22647
22648   return status;
22649 }
22650 _LT_EOF
22651   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
22652   (eval $ac_link) 2>&5
22653   ac_status=$?
22654   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22655   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
22656     (./conftest; exit; ) >&5 2>/dev/null
22657     lt_status=$?
22658     case x$lt_status in
22659       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
22660       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
22661       x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
22662     esac
22663   else :
22664     # compilation failed
22665     lt_cv_dlopen_self_static=no
22666   fi
22667 fi
22668 rm -fr conftest*
22669
22670
22671 fi
22672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
22673 $as_echo "$lt_cv_dlopen_self_static" >&6; }
22674     fi
22675
22676     CPPFLAGS=$save_CPPFLAGS
22677     LDFLAGS=$save_LDFLAGS
22678     LIBS=$save_LIBS
22679     ;;
22680   esac
22681
22682   case $lt_cv_dlopen_self in
22683   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
22684   *) enable_dlopen_self=unknown ;;
22685   esac
22686
22687   case $lt_cv_dlopen_self_static in
22688   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
22689   *) enable_dlopen_self_static=unknown ;;
22690   esac
22691 fi
22692
22693
22694
22695
22696
22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709 striplib=
22710 old_striplib=
22711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
22712 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
22713 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
22714   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
22715   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
22716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22717 $as_echo "yes" >&6; }
22718 else
22719 # FIXME - insert some real tests, host_os isn't really good enough
22720   case $host_os in
22721   darwin*)
22722     if test -n "$STRIP"; then
22723       striplib="$STRIP -x"
22724       old_striplib="$STRIP -S"
22725       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22726 $as_echo "yes" >&6; }
22727     else
22728       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22729 $as_echo "no" >&6; }
22730     fi
22731     ;;
22732   *)
22733     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22734 $as_echo "no" >&6; }
22735     ;;
22736   esac
22737 fi
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750   # Report what library types will actually be built
22751   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
22752 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
22753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
22754 $as_echo "$can_build_shared" >&6; }
22755
22756   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
22757 $as_echo_n "checking whether to build shared libraries... " >&6; }
22758   test no = "$can_build_shared" && enable_shared=no
22759
22760   # On AIX, shared libraries and static libraries use the same namespace, and
22761   # are all built from PIC.
22762   case $host_os in
22763   aix3*)
22764     test yes = "$enable_shared" && enable_static=no
22765     if test -n "$RANLIB"; then
22766       archive_cmds="$archive_cmds~\$RANLIB \$lib"
22767       postinstall_cmds='$RANLIB $lib'
22768     fi
22769     ;;
22770
22771   aix[4-9]*)
22772     if test ia64 != "$host_cpu"; then
22773       case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
22774       yes,aix,yes) ;;                   # shared object as lib.so file only
22775       yes,svr4,*) ;;                    # shared object as lib.so archive member only
22776       yes,*) enable_static=no ;;        # shared object in lib.a archive as well
22777       esac
22778     fi
22779     ;;
22780   esac
22781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
22782 $as_echo "$enable_shared" >&6; }
22783
22784   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
22785 $as_echo_n "checking whether to build static libraries... " >&6; }
22786   # Make sure either enable_shared or enable_static is yes.
22787   test yes = "$enable_shared" || enable_static=yes
22788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
22789 $as_echo "$enable_static" >&6; }
22790
22791
22792
22793
22794 fi
22795 ac_ext=c
22796 ac_cpp='$CPP $CPPFLAGS'
22797 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22798 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22799 ac_compiler_gnu=$ac_cv_c_compiler_gnu
22800
22801 CC=$lt_save_CC
22802
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813
22814
22815
22816
22817         ac_config_commands="$ac_config_commands libtool"
22818
22819
22820
22821
22822 # Only expand once:
22823
22824
22825
22826
22827
22828
22829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
22830 $as_echo_n "checking if sntp will be built... " >&6; }
22831
22832 # Check whether --with-sntp was given.
22833 if test "${with_sntp+set}" = set; then :
22834   withval=$with_sntp;
22835 else
22836   with_sntp="${withsntp=yes}"
22837
22838 fi
22839
22840 case "$with_sntp" in
22841  no)
22842     SNTP=
22843     ;;
22844  *)
22845     SNTP=sntp
22846     ;;
22847 esac
22848
22849  if test -n "$SNTP"; then
22850   BUILD_SNTP_TRUE=
22851   BUILD_SNTP_FALSE='#'
22852 else
22853   BUILD_SNTP_TRUE='#'
22854   BUILD_SNTP_FALSE=
22855 fi
22856
22857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
22858 $as_echo "$with_sntp" >&6; }
22859
22860
22861
22862 case "$SNTP" in
22863  '')
22864     SNTP_DB=
22865     SNTP_DL=
22866     SNTP_DS=
22867     ;;
22868 esac
22869
22870 ###
22871
22872 # NTP has (so far) been relying on leading-edge autogen.
22873 # Therefore, by default:
22874 # - use the version we ship with
22875 # - do not install it
22876 # - build a static copy (AC_DISABLE_SHARED - done earlier)
22877 case "${enable_local_libopts+set}" in
22878  set) ;;
22879  *) enable_local_libopts=yes ;;
22880 esac
22881 case "${enable_libopts_install+set}" in
22882  set) ;;
22883  *) enable_libopts_install=no ;;
22884 esac
22885 enable_nls=no
22886
22887
22888   ac_header_dirent=no
22889 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
22890   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
22891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
22892 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
22893 if eval \${$as_ac_Header+:} false; then :
22894   $as_echo_n "(cached) " >&6
22895 else
22896   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22897 /* end confdefs.h.  */
22898 #include <sys/types.h>
22899 #include <$ac_hdr>
22900
22901 int
22902 main ()
22903 {
22904 if ((DIR *) 0)
22905 return 0;
22906   ;
22907   return 0;
22908 }
22909 _ACEOF
22910 if ac_fn_c_try_compile "$LINENO"; then :
22911   eval "$as_ac_Header=yes"
22912 else
22913   eval "$as_ac_Header=no"
22914 fi
22915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22916 fi
22917 eval ac_res=\$$as_ac_Header
22918                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22919 $as_echo "$ac_res" >&6; }
22920 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
22921   cat >>confdefs.h <<_ACEOF
22922 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
22923 _ACEOF
22924
22925 ac_header_dirent=$ac_hdr; break
22926 fi
22927
22928 done
22929 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
22930 if test $ac_header_dirent = dirent.h; then
22931   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
22932 $as_echo_n "checking for library containing opendir... " >&6; }
22933 if ${ac_cv_search_opendir+:} false; then :
22934   $as_echo_n "(cached) " >&6
22935 else
22936   ac_func_search_save_LIBS=$LIBS
22937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22938 /* end confdefs.h.  */
22939
22940 /* Override any GCC internal prototype to avoid an error.
22941    Use char because int might match the return type of a GCC
22942    builtin and then its argument prototype would still apply.  */
22943 #ifdef __cplusplus
22944 extern "C"
22945 #endif
22946 char opendir ();
22947 int
22948 main ()
22949 {
22950 return opendir ();
22951   ;
22952   return 0;
22953 }
22954 _ACEOF
22955 for ac_lib in '' dir; do
22956   if test -z "$ac_lib"; then
22957     ac_res="none required"
22958   else
22959     ac_res=-l$ac_lib
22960     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22961   fi
22962   if ac_fn_c_try_link "$LINENO"; then :
22963   ac_cv_search_opendir=$ac_res
22964 fi
22965 rm -f core conftest.err conftest.$ac_objext \
22966     conftest$ac_exeext
22967   if ${ac_cv_search_opendir+:} false; then :
22968   break
22969 fi
22970 done
22971 if ${ac_cv_search_opendir+:} false; then :
22972
22973 else
22974   ac_cv_search_opendir=no
22975 fi
22976 rm conftest.$ac_ext
22977 LIBS=$ac_func_search_save_LIBS
22978 fi
22979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
22980 $as_echo "$ac_cv_search_opendir" >&6; }
22981 ac_res=$ac_cv_search_opendir
22982 if test "$ac_res" != no; then :
22983   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22984
22985 fi
22986
22987 else
22988   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
22989 $as_echo_n "checking for library containing opendir... " >&6; }
22990 if ${ac_cv_search_opendir+:} false; then :
22991   $as_echo_n "(cached) " >&6
22992 else
22993   ac_func_search_save_LIBS=$LIBS
22994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22995 /* end confdefs.h.  */
22996
22997 /* Override any GCC internal prototype to avoid an error.
22998    Use char because int might match the return type of a GCC
22999    builtin and then its argument prototype would still apply.  */
23000 #ifdef __cplusplus
23001 extern "C"
23002 #endif
23003 char opendir ();
23004 int
23005 main ()
23006 {
23007 return opendir ();
23008   ;
23009   return 0;
23010 }
23011 _ACEOF
23012 for ac_lib in '' x; do
23013   if test -z "$ac_lib"; then
23014     ac_res="none required"
23015   else
23016     ac_res=-l$ac_lib
23017     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23018   fi
23019   if ac_fn_c_try_link "$LINENO"; then :
23020   ac_cv_search_opendir=$ac_res
23021 fi
23022 rm -f core conftest.err conftest.$ac_objext \
23023     conftest$ac_exeext
23024   if ${ac_cv_search_opendir+:} false; then :
23025   break
23026 fi
23027 done
23028 if ${ac_cv_search_opendir+:} false; then :
23029
23030 else
23031   ac_cv_search_opendir=no
23032 fi
23033 rm conftest.$ac_ext
23034 LIBS=$ac_func_search_save_LIBS
23035 fi
23036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
23037 $as_echo "$ac_cv_search_opendir" >&6; }
23038 ac_res=$ac_cv_search_opendir
23039 if test "$ac_res" != no; then :
23040   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23041
23042 fi
23043
23044 fi
23045
23046
23047   # =================
23048   # AC_CHECK_HEADERS
23049   # =================
23050   for ac_header in  \
23051       sys/mman.h    sys/param.h   sys/poll.h    sys/procset.h \
23052       sys/select.h  sys/socket.h  sys/stropts.h sys/time.h \
23053       sys/un.h      sys/wait.h    dlfcn.h       errno.h \
23054       fcntl.h       libgen.h      libintl.h     memory.h \
23055       netinet/in.h  setjmp.h      stdbool.h     sysexits.h \
23056       unistd.h      utime.h
23057 do :
23058   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23059 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23060 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23061   cat >>confdefs.h <<_ACEOF
23062 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23063 _ACEOF
23064
23065 fi
23066
23067 done
23068
23069
23070   for ac_header in stdarg.h     varargs.h
23071 do :
23072   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23073 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23074 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23075   cat >>confdefs.h <<_ACEOF
23076 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23077 _ACEOF
23078  lo_have_arg_hdr=true;break
23079 else
23080   lo_have_arg_hdr=false
23081 fi
23082
23083 done
23084
23085
23086   for ac_header in string.h     strings.h
23087 do :
23088   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23089 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23090 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23091   cat >>confdefs.h <<_ACEOF
23092 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23093 _ACEOF
23094  lo_have_str_hdr=true;break
23095 else
23096   lo_have_str_hdr=false
23097 fi
23098
23099 done
23100
23101
23102   for ac_header in limits.h     sys/limits.h  values.h
23103 do :
23104   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23105 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23106 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23107   cat >>confdefs.h <<_ACEOF
23108 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23109 _ACEOF
23110  lo_have_lim_hdr=true;break
23111 else
23112   lo_have_lim_hdr=false
23113 fi
23114
23115 done
23116
23117
23118   for ac_header in inttypes.h   stdint.h
23119 do :
23120   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23121 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23122 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23123   cat >>confdefs.h <<_ACEOF
23124 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23125 _ACEOF
23126  lo_have_typ_hdr=true;break
23127 else
23128   lo_have_typ_hdr=false
23129 fi
23130
23131 done
23132
23133
23134   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
23135 $as_echo_n "checking for working stdnoreturn.h... " >&6; }
23136 if ${gl_cv_header_working_stdnoreturn_h+:} false; then :
23137   $as_echo_n "(cached) " >&6
23138 else
23139   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23140 /* end confdefs.h.  */
23141 #include <stdlib.h>
23142             #include <stdnoreturn.h>
23143             /* Do not check for 'noreturn' after the return type.
23144                C11 allows it, but it's rarely done that way
23145                and circa-2012 bleeding-edge GCC rejects it when given
23146                -Werror=old-style-declaration.  */
23147             noreturn void foo1 (void) { exit (0); }
23148             _Noreturn void foo2 (void) { exit (0); }
23149             int testit (int argc, char **argv) {
23150               if (argc & 1)
23151                 return 0;
23152               (argv[0][0] ? foo1 : foo2) ();
23153             }
23154
23155 int
23156 main ()
23157 {
23158
23159   ;
23160   return 0;
23161 }
23162 _ACEOF
23163 if ac_fn_c_try_compile "$LINENO"; then :
23164   gl_cv_header_working_stdnoreturn_h=yes
23165 else
23166   gl_cv_header_working_stdnoreturn_h=no
23167 fi
23168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23169 fi
23170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
23171 $as_echo "$gl_cv_header_working_stdnoreturn_h" >&6; }
23172
23173   if test $gl_cv_header_working_stdnoreturn_h = yes; then
23174     STDNORETURN_H=''
23175   else
23176     STDNORETURN_H='stdnoreturn.h'
23177   fi
23178
23179
23180    if test -n "$STDNORETURN_H"; then
23181   GL_GENERATE_STDNORETURN_H_TRUE=
23182   GL_GENERATE_STDNORETURN_H_FALSE='#'
23183 else
23184   GL_GENERATE_STDNORETURN_H_TRUE='#'
23185   GL_GENERATE_STDNORETURN_H_FALSE=
23186 fi
23187
23188
23189
23190   # ----------------------------------------------------------------------
23191   # check for various programs used during the build.
23192   # On OS/X, "wchar.h" needs "runetype.h" to work properly.
23193   # ----------------------------------------------------------------------
23194   for ac_header in runetype.h wchar.h
23195 do :
23196   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23197 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
23198   $ac_includes_default
23199   #if HAVE_RUNETYPE_H
23200   # include <runetype.h>
23201   #endif
23202
23203 "
23204 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23205   cat >>confdefs.h <<_ACEOF
23206 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23207 _ACEOF
23208
23209 fi
23210
23211 done
23212
23213
23214   # Check whether --enable-nls was given.
23215 if test "${enable_nls+set}" = set; then :
23216   enableval=$enable_nls;
23217 fi
23218
23219   if test "x$enable_nls" != "xno" && \
23220   test "X${ac_cv_header_libintl_h}" = Xyes; then :
23221
23222
23223 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
23224
23225 fi
23226
23227   # --------------------------------------------
23228   # Verify certain entries from AC_CHECK_HEADERS
23229   # --------------------------------------------
23230   ${lo_have_arg_hdr} || \
23231     as_fn_error $? "you must have stdarg.h or varargs.h on your system" "$LINENO" 5
23232
23233   ${lo_have_str_hdr} || \
23234     as_fn_error $? "you must have string.h or strings.h on your system" "$LINENO" 5
23235
23236   ${lo_have_lim_hdr} || \
23237     as_fn_error $? "you must have one of limits.h, sys/limits.h or values.h" "$LINENO" 5
23238
23239   ${lo_have_typ_hdr} || \
23240     as_fn_error $? "you must have inttypes.h or stdint.h on your system" "$LINENO" 5
23241
23242   for f in sys_types sys_param sys_stat string errno stdlib memory setjmp
23243   do eval as_ac_var=\${ac_cv_header_${f}_h}
23244      test "X${as_ac_var}" = Xyes || {
23245        as_fn_error $? "you must have ${f}.h on your system" "$LINENO" 5
23246      }
23247   done
23248   test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
23249     echo '#include <stdint.h>' > inttypes.h
23250
23251   # ----------------------------------------------------------------------
23252   # Checks for typedefs
23253   # ----------------------------------------------------------------------
23254   ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
23255 if test "x$ac_cv_type_wchar_t" = xyes; then :
23256
23257 cat >>confdefs.h <<_ACEOF
23258 #define HAVE_WCHAR_T 1
23259 _ACEOF
23260
23261
23262 fi
23263
23264   ac_fn_c_check_type "$LINENO" "wint_t" "ac_cv_type_wint_t" "
23265     $ac_includes_default
23266     #if HAVE_RUNETYPE_H
23267     # include <runetype.h>
23268     #endif
23269     #if HAVE_WCHAR_H
23270     # include <wchar.h>
23271     #endif
23272
23273 "
23274 if test "x$ac_cv_type_wint_t" = xyes; then :
23275
23276 cat >>confdefs.h <<_ACEOF
23277 #define HAVE_WINT_T 1
23278 _ACEOF
23279
23280
23281 fi
23282
23283   ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
23284 if test "x$ac_cv_type_int8_t" = xyes; then :
23285
23286 cat >>confdefs.h <<_ACEOF
23287 #define HAVE_INT8_T 1
23288 _ACEOF
23289
23290
23291 fi
23292 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
23293 if test "x$ac_cv_type_uint8_t" = xyes; then :
23294
23295 cat >>confdefs.h <<_ACEOF
23296 #define HAVE_UINT8_T 1
23297 _ACEOF
23298
23299
23300 fi
23301 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
23302 if test "x$ac_cv_type_int16_t" = xyes; then :
23303
23304 cat >>confdefs.h <<_ACEOF
23305 #define HAVE_INT16_T 1
23306 _ACEOF
23307
23308
23309 fi
23310 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
23311 if test "x$ac_cv_type_uint16_t" = xyes; then :
23312
23313 cat >>confdefs.h <<_ACEOF
23314 #define HAVE_UINT16_T 1
23315 _ACEOF
23316
23317
23318 fi
23319 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
23320 if test "x$ac_cv_type_int32_t" = xyes; then :
23321
23322 cat >>confdefs.h <<_ACEOF
23323 #define HAVE_INT32_T 1
23324 _ACEOF
23325
23326
23327 fi
23328 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
23329 if test "x$ac_cv_type_uint32_t" = xyes; then :
23330
23331 cat >>confdefs.h <<_ACEOF
23332 #define HAVE_UINT32_T 1
23333 _ACEOF
23334
23335
23336 fi
23337 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
23338 if test "x$ac_cv_type_intptr_t" = xyes; then :
23339
23340 cat >>confdefs.h <<_ACEOF
23341 #define HAVE_INTPTR_T 1
23342 _ACEOF
23343
23344
23345 fi
23346 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
23347 if test "x$ac_cv_type_uintptr_t" = xyes; then :
23348
23349 cat >>confdefs.h <<_ACEOF
23350 #define HAVE_UINTPTR_T 1
23351 _ACEOF
23352
23353
23354 fi
23355 ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
23356 if test "x$ac_cv_type_uint_t" = xyes; then :
23357
23358 cat >>confdefs.h <<_ACEOF
23359 #define HAVE_UINT_T 1
23360 _ACEOF
23361
23362
23363 fi
23364 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
23365 if test "x$ac_cv_type_pid_t" = xyes; then :
23366
23367 cat >>confdefs.h <<_ACEOF
23368 #define HAVE_PID_T 1
23369 _ACEOF
23370
23371
23372 fi
23373 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
23374 if test "x$ac_cv_type_size_t" = xyes; then :
23375
23376 cat >>confdefs.h <<_ACEOF
23377 #define HAVE_SIZE_T 1
23378 _ACEOF
23379
23380
23381 fi
23382 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
23383 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
23384
23385 cat >>confdefs.h <<_ACEOF
23386 #define HAVE_PTRDIFF_T 1
23387 _ACEOF
23388
23389
23390 fi
23391
23392   # The cast to long int works around a bug in the HP C Compiler
23393 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23394 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23395 # This bug is HP SR number 8606223364.
23396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
23397 $as_echo_n "checking size of char *... " >&6; }
23398 if ${ac_cv_sizeof_char_p+:} false; then :
23399   $as_echo_n "(cached) " >&6
23400 else
23401   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p"        "$ac_includes_default"; then :
23402
23403 else
23404   if test "$ac_cv_type_char_p" = yes; then
23405      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23406 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23407 as_fn_error 77 "cannot compute sizeof (char *)
23408 See \`config.log' for more details" "$LINENO" 5; }
23409    else
23410      ac_cv_sizeof_char_p=0
23411    fi
23412 fi
23413
23414 fi
23415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
23416 $as_echo "$ac_cv_sizeof_char_p" >&6; }
23417
23418
23419
23420 cat >>confdefs.h <<_ACEOF
23421 #define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
23422 _ACEOF
23423
23424
23425   # The cast to long int works around a bug in the HP C Compiler
23426 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23427 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23428 # This bug is HP SR number 8606223364.
23429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
23430 $as_echo_n "checking size of int... " >&6; }
23431 if ${ac_cv_sizeof_int+:} false; then :
23432   $as_echo_n "(cached) " >&6
23433 else
23434   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
23435
23436 else
23437   if test "$ac_cv_type_int" = yes; then
23438      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23439 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23440 as_fn_error 77 "cannot compute sizeof (int)
23441 See \`config.log' for more details" "$LINENO" 5; }
23442    else
23443      ac_cv_sizeof_int=0
23444    fi
23445 fi
23446
23447 fi
23448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
23449 $as_echo "$ac_cv_sizeof_int" >&6; }
23450
23451
23452
23453 cat >>confdefs.h <<_ACEOF
23454 #define SIZEOF_INT $ac_cv_sizeof_int
23455 _ACEOF
23456
23457
23458   # The cast to long int works around a bug in the HP C Compiler
23459 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23460 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23461 # This bug is HP SR number 8606223364.
23462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
23463 $as_echo_n "checking size of long... " >&6; }
23464 if ${ac_cv_sizeof_long+:} false; then :
23465   $as_echo_n "(cached) " >&6
23466 else
23467   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
23468
23469 else
23470   if test "$ac_cv_type_long" = yes; then
23471      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23472 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23473 as_fn_error 77 "cannot compute sizeof (long)
23474 See \`config.log' for more details" "$LINENO" 5; }
23475    else
23476      ac_cv_sizeof_long=0
23477    fi
23478 fi
23479
23480 fi
23481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
23482 $as_echo "$ac_cv_sizeof_long" >&6; }
23483
23484
23485
23486 cat >>confdefs.h <<_ACEOF
23487 #define SIZEOF_LONG $ac_cv_sizeof_long
23488 _ACEOF
23489
23490
23491   # The cast to long int works around a bug in the HP C Compiler
23492 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23493 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23494 # This bug is HP SR number 8606223364.
23495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
23496 $as_echo_n "checking size of short... " >&6; }
23497 if ${ac_cv_sizeof_short+:} false; then :
23498   $as_echo_n "(cached) " >&6
23499 else
23500   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
23501
23502 else
23503   if test "$ac_cv_type_short" = yes; then
23504      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23505 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23506 as_fn_error 77 "cannot compute sizeof (short)
23507 See \`config.log' for more details" "$LINENO" 5; }
23508    else
23509      ac_cv_sizeof_short=0
23510    fi
23511 fi
23512
23513 fi
23514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
23515 $as_echo "$ac_cv_sizeof_short" >&6; }
23516
23517
23518
23519 cat >>confdefs.h <<_ACEOF
23520 #define SIZEOF_SHORT $ac_cv_sizeof_short
23521 _ACEOF
23522
23523
23524
23525   # ------------
23526   # AC_CHECK_LIB
23527   # ------------
23528   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
23529 $as_echo_n "checking for pathfind in -lgen... " >&6; }
23530 if ${ac_cv_lib_gen_pathfind+:} false; then :
23531   $as_echo_n "(cached) " >&6
23532 else
23533   ac_check_lib_save_LIBS=$LIBS
23534 LIBS="-lgen  $LIBS"
23535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23536 /* end confdefs.h.  */
23537
23538 /* Override any GCC internal prototype to avoid an error.
23539    Use char because int might match the return type of a GCC
23540    builtin and then its argument prototype would still apply.  */
23541 #ifdef __cplusplus
23542 extern "C"
23543 #endif
23544 char pathfind ();
23545 int
23546 main ()
23547 {
23548 return pathfind ();
23549   ;
23550   return 0;
23551 }
23552 _ACEOF
23553 if ac_fn_c_try_link "$LINENO"; then :
23554   ac_cv_lib_gen_pathfind=yes
23555 else
23556   ac_cv_lib_gen_pathfind=no
23557 fi
23558 rm -f core conftest.err conftest.$ac_objext \
23559     conftest$ac_exeext conftest.$ac_ext
23560 LIBS=$ac_check_lib_save_LIBS
23561 fi
23562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
23563 $as_echo "$ac_cv_lib_gen_pathfind" >&6; }
23564 if test "x$ac_cv_lib_gen_pathfind" = xyes; then :
23565   cat >>confdefs.h <<_ACEOF
23566 #define HAVE_LIBGEN 1
23567 _ACEOF
23568
23569   LIBS="-lgen $LIBS"
23570
23571 fi
23572
23573   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
23574 $as_echo_n "checking for gettext in -lintl... " >&6; }
23575 if ${ac_cv_lib_intl_gettext+:} false; then :
23576   $as_echo_n "(cached) " >&6
23577 else
23578   ac_check_lib_save_LIBS=$LIBS
23579 LIBS="-lintl  $LIBS"
23580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23581 /* end confdefs.h.  */
23582
23583 /* Override any GCC internal prototype to avoid an error.
23584    Use char because int might match the return type of a GCC
23585    builtin and then its argument prototype would still apply.  */
23586 #ifdef __cplusplus
23587 extern "C"
23588 #endif
23589 char gettext ();
23590 int
23591 main ()
23592 {
23593 return gettext ();
23594   ;
23595   return 0;
23596 }
23597 _ACEOF
23598 if ac_fn_c_try_link "$LINENO"; then :
23599   ac_cv_lib_intl_gettext=yes
23600 else
23601   ac_cv_lib_intl_gettext=no
23602 fi
23603 rm -f core conftest.err conftest.$ac_objext \
23604     conftest$ac_exeext conftest.$ac_ext
23605 LIBS=$ac_check_lib_save_LIBS
23606 fi
23607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
23608 $as_echo "$ac_cv_lib_intl_gettext" >&6; }
23609 if test "x$ac_cv_lib_intl_gettext" = xyes; then :
23610   cat >>confdefs.h <<_ACEOF
23611 #define HAVE_LIBINTL 1
23612 _ACEOF
23613
23614   LIBS="-lintl $LIBS"
23615
23616 fi
23617
23618   for ac_func in vprintf
23619 do :
23620   ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
23621 if test "x$ac_cv_func_vprintf" = xyes; then :
23622   cat >>confdefs.h <<_ACEOF
23623 #define HAVE_VPRINTF 1
23624 _ACEOF
23625
23626 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
23627 if test "x$ac_cv_func__doprnt" = xyes; then :
23628
23629 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
23630
23631 fi
23632
23633 fi
23634 done
23635
23636
23637   for ac_header in vfork.h
23638 do :
23639   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
23640 if test "x$ac_cv_header_vfork_h" = xyes; then :
23641   cat >>confdefs.h <<_ACEOF
23642 #define HAVE_VFORK_H 1
23643 _ACEOF
23644
23645 fi
23646
23647 done
23648
23649 for ac_func in fork vfork
23650 do :
23651   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23652 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23653 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
23654   cat >>confdefs.h <<_ACEOF
23655 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23656 _ACEOF
23657
23658 fi
23659 done
23660
23661 if test "x$ac_cv_func_fork" = xyes; then
23662   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
23663 $as_echo_n "checking for working fork... " >&6; }
23664 if ${ac_cv_func_fork_works+:} false; then :
23665   $as_echo_n "(cached) " >&6
23666 else
23667   if test "$cross_compiling" = yes; then :
23668   ac_cv_func_fork_works=cross
23669 else
23670   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23671 /* end confdefs.h.  */
23672 $ac_includes_default
23673 int
23674 main ()
23675 {
23676
23677           /* By Ruediger Kuhlmann. */
23678           return fork () < 0;
23679
23680   ;
23681   return 0;
23682 }
23683 _ACEOF
23684 if ac_fn_c_try_run "$LINENO"; then :
23685   ac_cv_func_fork_works=yes
23686 else
23687   ac_cv_func_fork_works=no
23688 fi
23689 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23690   conftest.$ac_objext conftest.beam conftest.$ac_ext
23691 fi
23692
23693 fi
23694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
23695 $as_echo "$ac_cv_func_fork_works" >&6; }
23696
23697 else
23698   ac_cv_func_fork_works=$ac_cv_func_fork
23699 fi
23700 if test "x$ac_cv_func_fork_works" = xcross; then
23701   case $host in
23702     *-*-amigaos* | *-*-msdosdjgpp*)
23703       # Override, as these systems have only a dummy fork() stub
23704       ac_cv_func_fork_works=no
23705       ;;
23706     *)
23707       ac_cv_func_fork_works=yes
23708       ;;
23709   esac
23710   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23711 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
23712 fi
23713 ac_cv_func_vfork_works=$ac_cv_func_vfork
23714 if test "x$ac_cv_func_vfork" = xyes; then
23715   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
23716 $as_echo_n "checking for working vfork... " >&6; }
23717 if ${ac_cv_func_vfork_works+:} false; then :
23718   $as_echo_n "(cached) " >&6
23719 else
23720   if test "$cross_compiling" = yes; then :
23721   ac_cv_func_vfork_works=cross
23722 else
23723   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23724 /* end confdefs.h.  */
23725 /* Thanks to Paul Eggert for this test.  */
23726 $ac_includes_default
23727 #include <sys/wait.h>
23728 #ifdef HAVE_VFORK_H
23729 # include <vfork.h>
23730 #endif
23731 /* On some sparc systems, changes by the child to local and incoming
23732    argument registers are propagated back to the parent.  The compiler
23733    is told about this with #include <vfork.h>, but some compilers
23734    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23735    static variable whose address is put into a register that is
23736    clobbered by the vfork.  */
23737 static void
23738 #ifdef __cplusplus
23739 sparc_address_test (int arg)
23740 # else
23741 sparc_address_test (arg) int arg;
23742 #endif
23743 {
23744   static pid_t child;
23745   if (!child) {
23746     child = vfork ();
23747     if (child < 0) {
23748       perror ("vfork");
23749       _exit(2);
23750     }
23751     if (!child) {
23752       arg = getpid();
23753       write(-1, "", 0);
23754       _exit (arg);
23755     }
23756   }
23757 }
23758
23759 int
23760 main ()
23761 {
23762   pid_t parent = getpid ();
23763   pid_t child;
23764
23765   sparc_address_test (0);
23766
23767   child = vfork ();
23768
23769   if (child == 0) {
23770     /* Here is another test for sparc vfork register problems.  This
23771        test uses lots of local variables, at least as many local
23772        variables as main has allocated so far including compiler
23773        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23774        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23775        reuse the register of parent for one of the local variables,
23776        since it will think that parent can't possibly be used any more
23777        in this routine.  Assigning to the local variable will thus
23778        munge parent in the parent process.  */
23779     pid_t
23780       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23781       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23782     /* Convince the compiler that p..p7 are live; otherwise, it might
23783        use the same hardware register for all 8 local variables.  */
23784     if (p != p1 || p != p2 || p != p3 || p != p4
23785         || p != p5 || p != p6 || p != p7)
23786       _exit(1);
23787
23788     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23789        from child file descriptors.  If the child closes a descriptor
23790        before it execs or exits, this munges the parent's descriptor
23791        as well.  Test for this by closing stdout in the child.  */
23792     _exit(close(fileno(stdout)) != 0);
23793   } else {
23794     int status;
23795     struct stat st;
23796
23797     while (wait(&status) != child)
23798       ;
23799     return (
23800          /* Was there some problem with vforking?  */
23801          child < 0
23802
23803          /* Did the child fail?  (This shouldn't happen.)  */
23804          || status
23805
23806          /* Did the vfork/compiler bug occur?  */
23807          || parent != getpid()
23808
23809          /* Did the file descriptor bug occur?  */
23810          || fstat(fileno(stdout), &st) != 0
23811          );
23812   }
23813 }
23814 _ACEOF
23815 if ac_fn_c_try_run "$LINENO"; then :
23816   ac_cv_func_vfork_works=yes
23817 else
23818   ac_cv_func_vfork_works=no
23819 fi
23820 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23821   conftest.$ac_objext conftest.beam conftest.$ac_ext
23822 fi
23823
23824 fi
23825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
23826 $as_echo "$ac_cv_func_vfork_works" >&6; }
23827
23828 fi;
23829 if test "x$ac_cv_func_fork_works" = xcross; then
23830   ac_cv_func_vfork_works=$ac_cv_func_vfork
23831   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23832 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
23833 fi
23834
23835 if test "x$ac_cv_func_vfork_works" = xyes; then
23836
23837 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
23838
23839 else
23840
23841 $as_echo "#define vfork fork" >>confdefs.h
23842
23843 fi
23844 if test "x$ac_cv_func_fork_works" = xyes; then
23845
23846 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
23847
23848 fi
23849
23850   for ac_func in mmap canonicalize_file_name snprintf strdup strchr \
23851                  strrchr strsignal fchmod fstat chmod
23852 do :
23853   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23854 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23855 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
23856   cat >>confdefs.h <<_ACEOF
23857 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23858 _ACEOF
23859
23860 fi
23861 done
23862
23863   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
23864 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
23865 if ${ac_cv_path_SED+:} false; then :
23866   $as_echo_n "(cached) " >&6
23867 else
23868             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
23869      for ac_i in 1 2 3 4 5 6 7; do
23870        ac_script="$ac_script$as_nl$ac_script"
23871      done
23872      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
23873      { ac_script=; unset ac_script;}
23874      if test -z "$SED"; then
23875   ac_path_SED_found=false
23876   # Loop through the user's path and test for each of PROGNAME-LIST
23877   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23878 for as_dir in $PATH
23879 do
23880   IFS=$as_save_IFS
23881   test -z "$as_dir" && as_dir=.
23882     for ac_prog in sed gsed; do
23883     for ac_exec_ext in '' $ac_executable_extensions; do
23884       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
23885       as_fn_executable_p "$ac_path_SED" || continue
23886 # Check for GNU ac_path_SED and select it if it is found.
23887   # Check for GNU $ac_path_SED
23888 case `"$ac_path_SED" --version 2>&1` in
23889 *GNU*)
23890   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
23891 *)
23892   ac_count=0
23893   $as_echo_n 0123456789 >"conftest.in"
23894   while :
23895   do
23896     cat "conftest.in" "conftest.in" >"conftest.tmp"
23897     mv "conftest.tmp" "conftest.in"
23898     cp "conftest.in" "conftest.nl"
23899     $as_echo '' >> "conftest.nl"
23900     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
23901     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
23902     as_fn_arith $ac_count + 1 && ac_count=$as_val
23903     if test $ac_count -gt ${ac_path_SED_max-0}; then
23904       # Best one so far, save it but keep looking for a better one
23905       ac_cv_path_SED="$ac_path_SED"
23906       ac_path_SED_max=$ac_count
23907     fi
23908     # 10*(2^10) chars as input seems more than enough
23909     test $ac_count -gt 10 && break
23910   done
23911   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
23912 esac
23913
23914       $ac_path_SED_found && break 3
23915     done
23916   done
23917   done
23918 IFS=$as_save_IFS
23919   if test -z "$ac_cv_path_SED"; then
23920     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
23921   fi
23922 else
23923   ac_cv_path_SED=$SED
23924 fi
23925
23926 fi
23927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
23928 $as_echo "$ac_cv_path_SED" >&6; }
23929  SED="$ac_cv_path_SED"
23930   rm -f conftest.sed
23931
23932   while :
23933   do
23934       POSIX_SHELL=`which bash`
23935       test -x "$POSIX_SHELL" && break
23936       POSIX_SHELL=`which dash`
23937       test -x "$POSIX_SHELL" && break
23938       POSIX_SHELL=/usr/xpg4/bin/sh
23939       test -x "$POSIX_SHELL" && break
23940       POSIX_SHELL=`/bin/sh -c '
23941           exec 2>/dev/null
23942           if ! true ; then exit 1 ; fi
23943           echo /bin/sh'`
23944       test -x "$POSIX_SHELL" && break
23945       as_fn_error $? "cannot locate a working POSIX shell" "$LINENO" 5
23946   done
23947
23948 cat >>confdefs.h <<_ACEOF
23949 #define POSIX_SHELL "${POSIX_SHELL}"
23950 _ACEOF
23951
23952
23953
23954
23955
23956   LIBOPTS_BUILD_BLOCKED=''
23957
23958
23959   NEED_LIBOPTS_DIR=''
23960
23961   # Check whether --enable-local-libopts was given.
23962 if test "${enable_local_libopts+set}" = set; then :
23963   enableval=$enable_local_libopts;
23964     if test x$enableval = xyes ; then
23965        { $as_echo "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
23966 $as_echo "$as_me: Using supplied libopts tearoff" >&6;}
23967        LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
23968        NEED_LIBOPTS_DIR=true
23969        LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
23970     fi
23971 fi
23972
23973
23974   # Check whether --enable-libopts-install was given.
23975 if test "${enable_libopts_install+set}" = set; then :
23976   enableval=$enable_libopts_install;
23977 fi
23978
23979    if test "X${enable_libopts_install}" = Xyes; then
23980   INSTALL_LIBOPTS_TRUE=
23981   INSTALL_LIBOPTS_FALSE='#'
23982 else
23983   INSTALL_LIBOPTS_TRUE='#'
23984   INSTALL_LIBOPTS_FALSE=
23985 fi
23986
23987
23988   if test -z "${NEED_LIBOPTS_DIR}" ; then
23989      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
23990 $as_echo_n "checking whether autoopts-config can be found... " >&6; }
23991
23992 # Check whether --with-autoopts-config was given.
23993 if test "${with_autoopts_config+set}" = set; then :
23994   withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
23995 else
23996   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
23997 $as_echo_n "checking whether autoopts-config is specified... " >&6; }
23998 if ${lo_cv_with_autoopts_config+:} false; then :
23999   $as_echo_n "(cached) " >&6
24000 else
24001   if autoopts-config --help 2>/dev/null 1>&2
24002         then lo_cv_with_autoopts_config=autoopts-config
24003         elif libopts-config --help 2>/dev/null 1>&2
24004         then lo_cv_with_autoopts_config=libopts-config
24005         else lo_cv_with_autoopts_config=no ; fi
24006 fi
24007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
24008 $as_echo "$lo_cv_with_autoopts_config" >&6; }
24009
24010 fi
24011  # end of AC_ARG_WITH
24012
24013      if ${lo_cv_test_autoopts+:} false; then :
24014   $as_echo_n "(cached) " >&6
24015 else
24016
24017         if test -z "${lo_cv_with_autoopts_config}" \
24018                 -o X"${lo_cv_with_autoopts_config}" = Xno
24019         then
24020            if autoopts-config --help 2>/dev/null 1>&2
24021            then lo_cv_with_autoopts_config=autoopts-config
24022            elif libopts-config --help 2>/dev/null 1>&2
24023            then lo_cv_with_autoopts_config=libopts-config
24024            else lo_cv_with_autoopts_config=false ; fi
24025         fi
24026         lo_cv_test_autoopts=`
24027             ${lo_cv_with_autoopts_config} --libs` 2> /dev/null
24028         if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"
24029         then lo_cv_test_autoopts=no ; fi
24030
24031 fi
24032  # end of CACHE_VAL
24033      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
24034 $as_echo "${lo_cv_test_autoopts}" >&6; }
24035
24036      if test "X${lo_cv_test_autoopts}" != Xno
24037      then
24038         LIBOPTS_LDADD="${lo_cv_test_autoopts}"
24039         LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
24040      else
24041         LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
24042         LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
24043         NEED_LIBOPTS_DIR=true
24044      fi
24045   fi # end of if test -z "${NEED_LIBOPTS_DIR}"
24046   if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
24047     NEED_LIBOPTS_DIR=''
24048   fi
24049    if test -n "${NEED_LIBOPTS_DIR}"; then
24050   NEED_LIBOPTS_TRUE=
24051   NEED_LIBOPTS_FALSE='#'
24052 else
24053   NEED_LIBOPTS_TRUE='#'
24054   NEED_LIBOPTS_FALSE=
24055 fi
24056
24057
24058
24059   LIBOPTS_DIR=libopts
24060
24061
24062 # end of AC_DEFUN of LIBOPTS_CHECK_COMMON
24063
24064
24065     if test -z "$NEED_LIBOPTS_TRUE"; then :
24066
24067
24068
24069   # Check to see if a reg expr header is specified.
24070
24071
24072 # Check whether --with-regex-header was given.
24073 if test "${with_regex_header+set}" = set; then :
24074   withval=$with_regex_header; libopts_cv_with_regex_header=${with_regex_header}
24075 else
24076   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a reg expr header is specified" >&5
24077 $as_echo_n "checking whether a reg expr header is specified... " >&6; }
24078 if ${libopts_cv_with_regex_header+:} false; then :
24079   $as_echo_n "(cached) " >&6
24080 else
24081   libopts_cv_with_regex_header=no
24082 fi
24083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_regex_header" >&5
24084 $as_echo "$libopts_cv_with_regex_header" >&6; }
24085
24086 fi
24087  # end of AC_ARG_WITH
24088   if test "X${libopts_cv_with_regex_header}" != Xno
24089   then
24090     cat >>confdefs.h <<_ACEOF
24091 #define REGEX_HEADER <${libopts_cv_with_regex_header}>
24092 _ACEOF
24093
24094   else
24095
24096 $as_echo "#define REGEX_HEADER <regex.h>" >>confdefs.h
24097
24098   fi
24099
24100
24101
24102   # Check to see if a working libregex can be found.
24103
24104
24105 # Check whether --with-libregex was given.
24106 if test "${with_libregex+set}" = set; then :
24107   withval=$with_libregex; libopts_cv_with_libregex_root=${with_libregex}
24108 else
24109   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex was specified" >&5
24110 $as_echo_n "checking whether with-libregex was specified... " >&6; }
24111 if ${libopts_cv_with_libregex_root+:} false; then :
24112   $as_echo_n "(cached) " >&6
24113 else
24114   libopts_cv_with_libregex_root=no
24115 fi
24116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_root" >&5
24117 $as_echo "$libopts_cv_with_libregex_root" >&6; }
24118
24119 fi
24120  # end of AC_ARG_WITH libregex
24121
24122   if test "${with_libregex+set}" = set && \
24123      test "X${withval}" = Xno
24124   then ## disabled by request
24125     libopts_cv_with_libregex_root=no
24126     libopts_cv_with_libregex_cflags=no
24127     libopts_cv_with_libregex_libs=no
24128   else
24129
24130
24131 # Check whether --with-libregex-cflags was given.
24132 if test "${with_libregex_cflags+set}" = set; then :
24133   withval=$with_libregex_cflags; libopts_cv_with_libregex_cflags=${with_libregex_cflags}
24134 else
24135   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-cflags was specified" >&5
24136 $as_echo_n "checking whether with-libregex-cflags was specified... " >&6; }
24137 if ${libopts_cv_with_libregex_cflags+:} false; then :
24138   $as_echo_n "(cached) " >&6
24139 else
24140   libopts_cv_with_libregex_cflags=no
24141 fi
24142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_cflags" >&5
24143 $as_echo "$libopts_cv_with_libregex_cflags" >&6; }
24144
24145 fi
24146  # end of AC_ARG_WITH libregex-cflags
24147
24148
24149 # Check whether --with-libregex-libs was given.
24150 if test "${with_libregex_libs+set}" = set; then :
24151   withval=$with_libregex_libs; libopts_cv_with_libregex_libs=${with_libregex_libs}
24152 else
24153   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-libs was specified" >&5
24154 $as_echo_n "checking whether with-libregex-libs was specified... " >&6; }
24155 if ${libopts_cv_with_libregex_libs+:} false; then :
24156   $as_echo_n "(cached) " >&6
24157 else
24158   libopts_cv_with_libregex_libs=no
24159 fi
24160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_libs" >&5
24161 $as_echo "$libopts_cv_with_libregex_libs" >&6; }
24162
24163 fi
24164  # end of AC_ARG_WITH libregex-libs
24165
24166   case "X${libopts_cv_with_libregex_cflags}" in
24167   Xyes|Xno|X )
24168     case "X${libopts_cv_with_libregex_root}" in
24169     Xyes|Xno|X ) libopts_cv_with_libregex_cflags=no ;;
24170     * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;;
24171     esac
24172   esac
24173   case "X${libopts_cv_with_libregex_libs}" in
24174   Xyes|Xno|X )
24175     case "X${libopts_cv_with_libregex_root}" in
24176     Xyes|Xno|X ) libopts_cv_with_libregex_libs=no ;;
24177     * )        libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex" ;;
24178     esac
24179   esac
24180   libopts_save_CPPFLAGS="${CPPFLAGS}"
24181   libopts_save_LIBS="${LIBS}"
24182   case "X${libopts_cv_with_libregex_cflags}" in
24183   Xyes|Xno|X )
24184     libopts_cv_with_libregex_cflags="" ;;
24185   * ) CPPFLAGS="${CPPFLAGS} ${libopts_cv_with_libregex_cflags}" ;;
24186   esac
24187   case "X${libopts_cv_with_libregex_libs}" in
24188   Xyes|Xno|X )
24189     libopts_cv_with_libregex_libs="" ;;
24190   * )
24191     LIBS="${LIBS} ${libopts_cv_with_libregex_libs}" ;;
24192   esac
24193   LIBREGEX_CFLAGS=""
24194   LIBREGEX_LIBS=""
24195   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libregex functions properly" >&5
24196 $as_echo_n "checking whether libregex functions properly... " >&6; }
24197   if ${libopts_cv_with_libregex+:} false; then :
24198   $as_echo_n "(cached) " >&6
24199 else
24200
24201   if test "$cross_compiling" = yes; then :
24202   libopts_cv_with_libregex=no
24203 else
24204   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24205 /* end confdefs.h.  */
24206 #include <stdio.h>
24207 #include <stdlib.h>
24208 #include <sys/types.h>
24209 #include REGEX_HEADER
24210 static regex_t re;
24211 void comp_re(char const * pzPat) {
24212   int res = regcomp( &re, pzPat, REG_EXTENDED|REG_ICASE|REG_NEWLINE );
24213   if (res == 0) return;
24214   exit( res ); }
24215 int main() {
24216   regmatch_t m[2];
24217   comp_re( "^.*\$"   );
24218   comp_re( "()|no.*" );
24219   comp_re( "."       );
24220   if (regexec( &re, "X", 2, m, 0 ) != 0)  return 1;
24221   if ((m[0].rm_so != 0) || (m[0].rm_eo != 1)) {
24222     fputs( "error: regex -->.<-- did not match\n", stderr );
24223     return 1;
24224   }
24225   return 0; }
24226 _ACEOF
24227 if ac_fn_c_try_run "$LINENO"; then :
24228   libopts_cv_with_libregex=yes
24229 else
24230   libopts_cv_with_libregex=no
24231 fi
24232 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24233   conftest.$ac_objext conftest.beam conftest.$ac_ext
24234 fi
24235  # end of AC_RUN_IFELSE
24236
24237 fi
24238  # end of AC_CACHE_VAL for libopts_cv_with_libregex
24239   fi ## disabled by request
24240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_with_libregex}" >&5
24241 $as_echo "${libopts_cv_with_libregex}" >&6; }
24242   if test "X${libopts_cv_with_libregex}" != Xno
24243   then
24244
24245 $as_echo "#define WITH_LIBREGEX 1" >>confdefs.h
24246
24247   else
24248     CPPFLAGS="${libopts_save_CPPFLAGS}"
24249     LIBS="${libopts_save_LIBS}"
24250     libopts_cv_with_libregex_root=no
24251 libopts_cv_with_libregex_cflags=no
24252 libopts_cv_with_libregex_libs=no
24253 libopts_cv_with_libregex=no
24254   fi
24255
24256
24257
24258   # Check to see if pathfind(3) works.
24259
24260   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pathfind(3) works" >&5
24261 $as_echo_n "checking whether pathfind(3) works... " >&6; }
24262   if ${libopts_cv_run_pathfind+:} false; then :
24263   $as_echo_n "(cached) " >&6
24264 else
24265
24266   if test "$cross_compiling" = yes; then :
24267   libopts_cv_run_pathfind=no
24268
24269 else
24270   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24271 /* end confdefs.h.  */
24272 #include <string.h>
24273 #include <stdlib.h>
24274 int main (int argc, char ** argv) {
24275    char * pz = pathfind( getenv( "PATH" ), "sh", "x" );
24276    return (pz == 0) ? 1 : 0;
24277 }
24278 _ACEOF
24279 if ac_fn_c_try_run "$LINENO"; then :
24280   libopts_cv_run_pathfind=yes
24281 else
24282   libopts_cv_run_pathfind=no
24283 fi
24284 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24285   conftest.$ac_objext conftest.beam conftest.$ac_ext
24286 fi
24287  # end of RUN_IFELSE
24288
24289 fi
24290  # end of AC_CACHE_VAL for libopts_cv_run_pathfind
24291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_pathfind}" >&5
24292 $as_echo "${libopts_cv_run_pathfind}" >&6; }
24293   if test "X${libopts_cv_run_pathfind}" != Xno
24294   then
24295
24296 $as_echo "#define HAVE_PATHFIND 1" >>confdefs.h
24297
24298   fi
24299
24300
24301
24302   # Check to see if /dev/zero is readable device.
24303
24304   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/zero is readable device" >&5
24305 $as_echo_n "checking whether /dev/zero is readable device... " >&6; }
24306   if ${libopts_cv_test_dev_zero+:} false; then :
24307   $as_echo_n "(cached) " >&6
24308 else
24309
24310     libopts_cv_test_dev_zero=`exec 2> /dev/null
24311 dzero=\`ls -lL /dev/zero | egrep ^c......r\`
24312 test -z "${dzero}" && exit 1
24313 echo ${dzero}`
24314     if test $? -ne 0 || test -z "$libopts_cv_test_dev_zero"
24315     then libopts_cv_test_dev_zero=no
24316     fi
24317
24318 fi
24319  # end of CACHE_VAL of libopts_cv_test_dev_zero
24320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_test_dev_zero}" >&5
24321 $as_echo "${libopts_cv_test_dev_zero}" >&6; }
24322   if test "X${libopts_cv_test_dev_zero}" != Xno
24323   then
24324
24325 $as_echo "#define HAVE_DEV_ZERO 1" >>confdefs.h
24326
24327   fi
24328
24329
24330
24331   # Check to see if we have a functional realpath(3C).
24332
24333   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a functional realpath(3C)" >&5
24334 $as_echo_n "checking whether we have a functional realpath(3C)... " >&6; }
24335   if ${libopts_cv_run_realpath+:} false; then :
24336   $as_echo_n "(cached) " >&6
24337 else
24338
24339   if test "$cross_compiling" = yes; then :
24340   libopts_cv_run_realpath=no
24341
24342 else
24343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24344 /* end confdefs.h.  */
24345 #include <limits.h>
24346 #include <stdlib.h>
24347 int main (int argc, char ** argv) {
24348 #ifndef PATH_MAX
24349 choke me!!
24350 #else
24351    char zPath[PATH_MAX+1];
24352 #endif
24353    char *pz = realpath(argv[0], zPath);
24354    return (pz == zPath) ? 0 : 1;
24355 }
24356 _ACEOF
24357 if ac_fn_c_try_run "$LINENO"; then :
24358   libopts_cv_run_realpath=yes
24359 else
24360   libopts_cv_run_realpath=no
24361 fi
24362 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24363   conftest.$ac_objext conftest.beam conftest.$ac_ext
24364 fi
24365  # end of RUN_IFELSE
24366
24367 fi
24368  # end of AC_CACHE_VAL for libopts_cv_run_realpath
24369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_realpath}" >&5
24370 $as_echo "${libopts_cv_run_realpath}" >&6; }
24371   if test "X${libopts_cv_run_realpath}" != Xno
24372   then
24373
24374 $as_echo "#define HAVE_REALPATH 1" >>confdefs.h
24375
24376   fi
24377
24378
24379
24380   # Check to see if strftime() works.
24381
24382   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strftime() works" >&5
24383 $as_echo_n "checking whether strftime() works... " >&6; }
24384   if ${libopts_cv_run_strftime+:} false; then :
24385   $as_echo_n "(cached) " >&6
24386 else
24387
24388   if test "$cross_compiling" = yes; then :
24389   libopts_cv_run_strftime=no
24390
24391 else
24392   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24393 /* end confdefs.h.  */
24394 #include <time.h>
24395 #include <string.h>
24396 char t_buf[ 64 ];
24397 int main() {
24398   static char const z[] = "Thursday Aug 28 240";
24399   struct tm tm;
24400   tm.tm_sec   = 36;  /* seconds after the minute [0, 61]  */
24401   tm.tm_min   = 44;  /* minutes after the hour [0, 59] */
24402   tm.tm_hour  = 12;  /* hour since midnight [0, 23] */
24403   tm.tm_mday  = 28;  /* day of the month [1, 31] */
24404   tm.tm_mon   =  7;  /* months since January [0, 11] */
24405   tm.tm_year  = 86;  /* years since 1900 */
24406   tm.tm_wday  =  4;  /* days since Sunday [0, 6] */
24407   tm.tm_yday  = 239; /* days since January 1 [0, 365] */
24408   tm.tm_isdst =  1;  /* flag for daylight savings time */
24409   strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
24410   return (strcmp( t_buf, z ) != 0); }
24411 _ACEOF
24412 if ac_fn_c_try_run "$LINENO"; then :
24413   libopts_cv_run_strftime=yes
24414 else
24415   libopts_cv_run_strftime=no
24416 fi
24417 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24418   conftest.$ac_objext conftest.beam conftest.$ac_ext
24419 fi
24420  # end of RUN_IFELSE
24421
24422 fi
24423  # end of AC_CACHE_VAL for libopts_cv_run_strftime
24424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_strftime}" >&5
24425 $as_echo "${libopts_cv_run_strftime}" >&6; }
24426   if test "X${libopts_cv_run_strftime}" != Xno
24427   then
24428
24429 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
24430
24431   fi
24432
24433
24434
24435   # Check to see if fopen accepts "b" mode.
24436
24437   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"b\" mode" >&5
24438 $as_echo_n "checking whether fopen accepts \"b\" mode... " >&6; }
24439   if ${libopts_cv_run_fopen_binary+:} false; then :
24440   $as_echo_n "(cached) " >&6
24441 else
24442
24443   if test "$cross_compiling" = yes; then :
24444   libopts_cv_run_fopen_binary=no
24445
24446 else
24447   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24448 /* end confdefs.h.  */
24449 #include <stdio.h>
24450 int main (int argc, char ** argv) {
24451 FILE * fp = fopen("conftest.$ac_ext", "rb");
24452 return (fp == NULL) ? 1 : fclose(fp); }
24453 _ACEOF
24454 if ac_fn_c_try_run "$LINENO"; then :
24455   libopts_cv_run_fopen_binary=yes
24456 else
24457   libopts_cv_run_fopen_binary=no
24458 fi
24459 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24460   conftest.$ac_objext conftest.beam conftest.$ac_ext
24461 fi
24462  # end of RUN_IFELSE
24463
24464 fi
24465  # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
24466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_binary}" >&5
24467 $as_echo "${libopts_cv_run_fopen_binary}" >&6; }
24468   if test "X${libopts_cv_run_fopen_binary}" != Xno
24469   then
24470
24471 $as_echo "#define FOPEN_BINARY_FLAG \"b\"" >>confdefs.h
24472
24473   else
24474
24475 $as_echo "#define FOPEN_BINARY_FLAG \"\"" >>confdefs.h
24476
24477   fi
24478
24479
24480
24481   # Check to see if fopen accepts "t" mode.
24482
24483   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"t\" mode" >&5
24484 $as_echo_n "checking whether fopen accepts \"t\" mode... " >&6; }
24485   if ${libopts_cv_run_fopen_text+:} false; then :
24486   $as_echo_n "(cached) " >&6
24487 else
24488
24489   if test "$cross_compiling" = yes; then :
24490   libopts_cv_run_fopen_text=no
24491
24492 else
24493   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24494 /* end confdefs.h.  */
24495 #include <stdio.h>
24496 int main (int argc, char ** argv) {
24497 FILE * fp = fopen("conftest.$ac_ext", "rt");
24498 return (fp == NULL) ? 1 : fclose(fp); }
24499 _ACEOF
24500 if ac_fn_c_try_run "$LINENO"; then :
24501   libopts_cv_run_fopen_text=yes
24502 else
24503   libopts_cv_run_fopen_text=no
24504 fi
24505 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24506   conftest.$ac_objext conftest.beam conftest.$ac_ext
24507 fi
24508  # end of RUN_IFELSE
24509
24510 fi
24511  # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
24512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_text}" >&5
24513 $as_echo "${libopts_cv_run_fopen_text}" >&6; }
24514   if test "X${libopts_cv_run_fopen_text}" != Xno
24515   then
24516
24517 $as_echo "#define FOPEN_TEXT_FLAG \"t\"" >>confdefs.h
24518
24519   else
24520
24521 $as_echo "#define FOPEN_TEXT_FLAG \"\"" >>confdefs.h
24522
24523   fi
24524
24525
24526
24527   # Check to see if not wanting optional option args.
24528
24529   # Check whether --enable-optional-args was given.
24530 if test "${enable_optional_args+set}" = set; then :
24531   enableval=$enable_optional_args; libopts_cv_enable_optional_args=${enable_optional_args}
24532 else
24533   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether not wanting optional option args" >&5
24534 $as_echo_n "checking whether not wanting optional option args... " >&6; }
24535 if ${libopts_cv_enable_optional_args+:} false; then :
24536   $as_echo_n "(cached) " >&6
24537 else
24538   libopts_cv_enable_optional_args=yes
24539 fi
24540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_enable_optional_args" >&5
24541 $as_echo "$libopts_cv_enable_optional_args" >&6; }
24542
24543 fi
24544  # end of AC_ARG_ENABLE
24545   if test "X${libopts_cv_enable_optional_args}" = Xno
24546   then
24547
24548 $as_echo "#define NO_OPTIONAL_OPT_ARGS 1" >>confdefs.h
24549
24550   fi
24551
24552
24553
24554
24555
24556           fi
24557   ac_config_files="$ac_config_files libopts/Makefile"
24558
24559   # end of AC_DEFUN of LIBOPTS_CHECK
24560
24561
24562 # From when we only used libevent for sntp:
24563 #AM_COND_IF(
24564 #    [BUILD_SNTP],
24565 #    [NTP_LIBEVENT_CHECK],
24566 #    [NTP_LIBEVENT_CHECK_NOBUILD]
24567 #)
24568
24569
24570
24571 ntp_pkgconfig_min_version='0.15.0'
24572 if test -n "$ac_tool_prefix"; then
24573   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24574 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24576 $as_echo_n "checking for $ac_word... " >&6; }
24577 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24578   $as_echo_n "(cached) " >&6
24579 else
24580   case $PKG_CONFIG in
24581   [\\/]* | ?:[\\/]*)
24582   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24583   ;;
24584   *)
24585   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24586 for as_dir in $PATH
24587 do
24588   IFS=$as_save_IFS
24589   test -z "$as_dir" && as_dir=.
24590     for ac_exec_ext in '' $ac_executable_extensions; do
24591   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24592     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24593     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24594     break 2
24595   fi
24596 done
24597   done
24598 IFS=$as_save_IFS
24599
24600   ;;
24601 esac
24602 fi
24603 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24604 if test -n "$PKG_CONFIG"; then
24605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24606 $as_echo "$PKG_CONFIG" >&6; }
24607 else
24608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24609 $as_echo "no" >&6; }
24610 fi
24611
24612
24613 fi
24614 if test -z "$ac_cv_path_PKG_CONFIG"; then
24615   ac_pt_PKG_CONFIG=$PKG_CONFIG
24616   # Extract the first word of "pkg-config", so it can be a program name with args.
24617 set dummy pkg-config; ac_word=$2
24618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24619 $as_echo_n "checking for $ac_word... " >&6; }
24620 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24621   $as_echo_n "(cached) " >&6
24622 else
24623   case $ac_pt_PKG_CONFIG in
24624   [\\/]* | ?:[\\/]*)
24625   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24626   ;;
24627   *)
24628   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24629 for as_dir in $PATH
24630 do
24631   IFS=$as_save_IFS
24632   test -z "$as_dir" && as_dir=.
24633     for ac_exec_ext in '' $ac_executable_extensions; do
24634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24635     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24637     break 2
24638   fi
24639 done
24640   done
24641 IFS=$as_save_IFS
24642
24643   ;;
24644 esac
24645 fi
24646 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24647 if test -n "$ac_pt_PKG_CONFIG"; then
24648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24649 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
24650 else
24651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24652 $as_echo "no" >&6; }
24653 fi
24654
24655   if test "x$ac_pt_PKG_CONFIG" = x; then
24656     PKG_CONFIG=""
24657   else
24658     case $cross_compiling:$ac_tool_warned in
24659 yes:)
24660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24661 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24662 ac_tool_warned=yes ;;
24663 esac
24664     PKG_CONFIG=$ac_pt_PKG_CONFIG
24665   fi
24666 else
24667   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24668 fi
24669
24670 { ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
24671 { ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
24672
24673 case "$PKG_CONFIG" in
24674  /*)
24675     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
24676 $as_echo_n "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
24677     if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
24678         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24679 $as_echo "yes" >&6; }
24680     else
24681         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24682 $as_echo "no" >&6; }
24683         PKG_CONFIG=""
24684     fi
24685     ;;
24686 esac
24687
24688
24689
24690
24691 # Check whether --enable-local-libevent was given.
24692 if test "${enable_local_libevent+set}" = set; then :
24693   enableval=$enable_local_libevent; ntp_use_local_libevent=$enableval
24694 else
24695   ntp_use_local_libevent=${ntp_use_local_libevent-detect}
24696
24697 fi
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708 ntp_libevent_min_version=2
24709 ntp_libevent_tearoff=libevent
24710
24711
24712
24713
24714
24715 case "$ntp_use_local_libevent" in
24716  yes)
24717     ;;
24718  *) # If we have (a good enough) pkg-config, see if it can find libevent
24719     case "$PKG_CONFIG" in
24720      /*)
24721         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
24722 $as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
24723         if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
24724         then
24725             ntp_use_local_libevent=no
24726             { $as_echo "$as_me:${as_lineno-$LINENO}: Using the installed libevent" >&5
24727 $as_echo "$as_me: Using the installed libevent" >&6;}
24728             CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
24729             CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
24730             # HMS: I hope the following is accurate.
24731             # We don't need -levent, we only need  -levent_core.
24732             # While we could grab only the -L stuff, there *might* be
24733             # other flags there we want.  Originally we just removed -levent
24734             # but then somebody decided to install -levent-2.0
24735             # LDADD_LIBEVENT=`$PKG_CONFIG --libs libevent | sed 's:-levent::'`
24736             # So now we dance...
24737             LDADD_LIBEVENT=
24738             for i in `$PKG_CONFIG --libs libevent` `$PKG_CONFIG --cflags-only-other libevent_pthreads`
24739             do
24740                 case "$i" in
24741                  -D*) ;;
24742                  -levent*) ;;
24743                  *) case "$LDADD_LIBEVENT" in
24744                      '') LDADD_LIBEVENT="$i" ;;
24745                      *) LDADD_LIBEVENT="$LDADD_LIBEVENT $i" ;;
24746                     esac
24747                     ;;
24748                 esac
24749             done
24750             case "$LIBISC_PTHREADS_NOTHREADS" in
24751              pthreads)
24752                 LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads"
24753             esac
24754             LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core"
24755             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24756 $as_echo "yes" >&6; }
24757         else
24758             ntp_use_local_libevent=yes
24759             # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
24760             # is "pthreads"?
24761             CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
24762             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24763 $as_echo "no" >&6; }
24764         fi
24765         ;;
24766      *)
24767         ntp_use_local_libevent=yes
24768         ;;
24769     esac
24770     ;;
24771 esac
24772
24773 case "$ntp_use_local_libevent" in
24774  yes)
24775     { $as_echo "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
24776 $as_echo "$as_me: Using libevent tearoff" >&6;}
24777     CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
24778     case "$LIBISC_PTHREADS_NOTHREADS" in
24779      pthreads)
24780         LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_pthreads.la \$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
24781         ;;
24782      *)
24783         LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
24784     esac
24785 esac
24786
24787
24788  if test "x$ntp_use_local_libevent" = "xyes"; then
24789   BUILD_LIBEVENT_TRUE=
24790   BUILD_LIBEVENT_FALSE='#'
24791 else
24792   BUILD_LIBEVENT_TRUE='#'
24793   BUILD_LIBEVENT_FALSE=
24794 fi
24795
24796
24797
24798
24799 case "$ntp_libevent_tearoff" in
24800  libevent)
24801     ;;
24802  *)
24803     as_fn_error $? "ntp_libevent.m4 dir must be libevent, not $ntp_libevent_tearoff" "$LINENO" 5
24804     ;;
24805 esac
24806
24807 case "$ntp_use_local_libevent" in
24808  yes)
24809                         ac_configure_args=" --disable-openssl${ac_configure_args}"
24810     ac_configure_args=" --disable-shared${ac_configure_args}"
24811     ac_configure_args=" --disable-libevent-regress${ac_configure_args}"
24812     ac_configure_args=" --disable-libevent-install${ac_configure_args}"
24813     ac_configure_args=" --enable-silent-rules${ac_configure_args}"
24814     ac_configure_args=" --enable-function-sections${ac_configure_args}"
24815     ac_configure_args=" LEP_CFLAGS='${NTP_HARD_CFLAGS}'${ac_configure_args}"
24816     ac_configure_args=" LEP_CPPFLAGS='${NTP_HARD_CPPFLAGS}'${ac_configure_args}"
24817     ac_configure_args=" LEP_LDFLAGS='${NTP_HARD_LDFLAGS}'${ac_configure_args}"
24818     subdirs="$subdirs libevent"
24819
24820     ;;
24821  *)
24822     NTP_FORCE_LIBEVENT_DIST=libevent
24823     ;;
24824 esac
24825
24826
24827
24828 # Checks for libraries.
24829
24830
24831 LIB_SYSLOG=''
24832
24833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
24834 $as_echo_n "checking for library containing openlog... " >&6; }
24835 if ${ac_cv_search_openlog+:} false; then :
24836   $as_echo_n "(cached) " >&6
24837 else
24838   ac_func_search_save_LIBS=$LIBS
24839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24840 /* end confdefs.h.  */
24841
24842 /* Override any GCC internal prototype to avoid an error.
24843    Use char because int might match the return type of a GCC
24844    builtin and then its argument prototype would still apply.  */
24845 #ifdef __cplusplus
24846 extern "C"
24847 #endif
24848 char openlog ();
24849 int
24850 main ()
24851 {
24852 return openlog ();
24853   ;
24854   return 0;
24855 }
24856 _ACEOF
24857 for ac_lib in '' gen syslog; do
24858   if test -z "$ac_lib"; then
24859     ac_res="none required"
24860   else
24861     ac_res=-l$ac_lib
24862     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24863   fi
24864   if ac_fn_c_try_link "$LINENO"; then :
24865   ac_cv_search_openlog=$ac_res
24866 fi
24867 rm -f core conftest.err conftest.$ac_objext \
24868     conftest$ac_exeext
24869   if ${ac_cv_search_openlog+:} false; then :
24870   break
24871 fi
24872 done
24873 if ${ac_cv_search_openlog+:} false; then :
24874
24875 else
24876   ac_cv_search_openlog=no
24877 fi
24878 rm conftest.$ac_ext
24879 LIBS=$ac_func_search_save_LIBS
24880 fi
24881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
24882 $as_echo "$ac_cv_search_openlog" >&6; }
24883 ac_res=$ac_cv_search_openlog
24884 if test "$ac_res" != no; then :
24885   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24886   case "$ac_cv_search_openlog" in
24887  'none required') ;;
24888  no) ;;
24889  *) LIB_SYSLOG="$ac_cv_search_openlog $LIB_SYSLOG" ;;
24890  esac
24891
24892 fi
24893
24894
24895 # Checks for header files.
24896 for ac_header in netdb.h string.h strings.h syslog.h
24897 do :
24898   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
24899 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
24900 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
24901   cat >>confdefs.h <<_ACEOF
24902 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
24903 _ACEOF
24904
24905 fi
24906
24907 done
24908
24909
24910
24911 for ac_header in sysexits.h
24912 do :
24913   ac_fn_c_check_header_mongrel "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
24914 if test "x$ac_cv_header_sysexits_h" = xyes; then :
24915   cat >>confdefs.h <<_ACEOF
24916 #define HAVE_SYSEXITS_H 1
24917 _ACEOF
24918
24919 else
24920
24921
24922 $as_echo "#define EX_OK 0" >>confdefs.h
24923
24924
24925 $as_echo "#define EX_SOFTWARE 70" >>confdefs.h
24926
24927
24928 fi
24929
24930 done
24931
24932
24933
24934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
24935 $as_echo_n "checking for facilitynames in syslog.h... " >&6; }
24936 if ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+:} false; then :
24937   $as_echo_n "(cached) " >&6
24938 else
24939
24940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24941 /* end confdefs.h.  */
24942
24943 #define SYSLOG_NAMES
24944 #include <stdlib.h>
24945 #include <syslog.h>
24946
24947 int
24948 main ()
24949 {
24950  void *fnames; fnames = facilitynames;
24951   ;
24952   return 0;
24953 }
24954 _ACEOF
24955 if ac_fn_c_try_compile "$LINENO"; then :
24956   ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
24957 else
24958   ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
24959 fi
24960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24961 fi
24962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
24963 $as_echo "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
24964 case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
24965  yes)
24966
24967 $as_echo "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
24968
24969     ;;
24970  no)
24971     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
24972 $as_echo "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
24973     ;;
24974  cross)
24975     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
24976 $as_echo "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
24977     ;;
24978 esac
24979
24980
24981 # Checks for typedefs, structures, and compiler characteristics.
24982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
24983 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
24984 if ${ac_cv_header_stdbool_h+:} false; then :
24985   $as_echo_n "(cached) " >&6
24986 else
24987   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24988 /* end confdefs.h.  */
24989
24990              #include <stdbool.h>
24991              #ifndef bool
24992               "error: bool is not defined"
24993              #endif
24994              #ifndef false
24995               "error: false is not defined"
24996              #endif
24997              #if false
24998               "error: false is not 0"
24999              #endif
25000              #ifndef true
25001               "error: true is not defined"
25002              #endif
25003              #if true != 1
25004               "error: true is not 1"
25005              #endif
25006              #ifndef __bool_true_false_are_defined
25007               "error: __bool_true_false_are_defined is not defined"
25008              #endif
25009
25010              struct s { _Bool s: 1; _Bool t; } s;
25011
25012              char a[true == 1 ? 1 : -1];
25013              char b[false == 0 ? 1 : -1];
25014              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
25015              char d[(bool) 0.5 == true ? 1 : -1];
25016              /* See body of main program for 'e'.  */
25017              char f[(_Bool) 0.0 == false ? 1 : -1];
25018              char g[true];
25019              char h[sizeof (_Bool)];
25020              char i[sizeof s.t];
25021              enum { j = false, k = true, l = false * true, m = true * 256 };
25022              /* The following fails for
25023                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
25024              _Bool n[m];
25025              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
25026              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
25027              /* Catch a bug in an HP-UX C compiler.  See
25028                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
25029                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
25030               */
25031              _Bool q = true;
25032              _Bool *pq = &q;
25033
25034 int
25035 main ()
25036 {
25037
25038              bool e = &s;
25039              *pq |= q;
25040              *pq |= ! q;
25041              /* Refer to every declared value, to avoid compiler optimizations.  */
25042              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
25043                      + !m + !n + !o + !p + !q + !pq);
25044
25045   ;
25046   return 0;
25047 }
25048 _ACEOF
25049 if ac_fn_c_try_compile "$LINENO"; then :
25050   ac_cv_header_stdbool_h=yes
25051 else
25052   ac_cv_header_stdbool_h=no
25053 fi
25054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25055 fi
25056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
25057 $as_echo "$ac_cv_header_stdbool_h" >&6; }
25058    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
25059 if test "x$ac_cv_type__Bool" = xyes; then :
25060
25061 cat >>confdefs.h <<_ACEOF
25062 #define HAVE__BOOL 1
25063 _ACEOF
25064
25065
25066 fi
25067
25068
25069 if test $ac_cv_header_stdbool_h = yes; then
25070
25071 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
25072
25073 fi
25074
25075
25076
25077
25078
25079 VER_SUFFIX=
25080
25081
25082
25083
25084 # Check whether --with-crypto was given.
25085 if test "${with_crypto+set}" = set; then :
25086   withval=$with_crypto;
25087 fi
25088
25089
25090 # Check whether --with-openssl-libdir was given.
25091 if test "${with_openssl_libdir+set}" = set; then :
25092   withval=$with_openssl_libdir;
25093 fi
25094
25095
25096 # Check whether --with-openssl-incdir was given.
25097 if test "${with_openssl_incdir+set}" = set; then :
25098   withval=$with_openssl_incdir;
25099 fi
25100
25101
25102 # Check whether --with-rpath was given.
25103 if test "${with_rpath+set}" = set; then :
25104   withval=$with_rpath;
25105 fi
25106
25107
25108 ntp_openssl=no
25109 ntp_openssl_from_pkg_config=no
25110
25111 with_crypto=${with_crypto:-openssl,libcrypto}
25112 case "$with_crypto" in
25113  yes)
25114     with_crypto=openssl,libcrypto
25115 esac
25116
25117
25118 case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
25119  no:*) ;;
25120  *:notempty:notgiven:notgiven)
25121     for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
25122         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
25123 $as_echo_n "checking pkg-config for $pkg... " >&6; }
25124         if $PKG_CONFIG --exists $pkg ; then
25125             CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
25126             CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
25127             LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`"
25128             LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l --static $pkg`"
25129             LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`"
25130             VER_SUFFIX=o
25131             ntp_openssl=yes
25132             ntp_openssl_from_pkg_config=yes
25133             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25134 $as_echo "yes" >&6; }
25135
25136             break
25137         fi
25138         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25139 $as_echo "no" >&6; }
25140     done
25141 esac
25142 case "$with_crypto:$ntp_openssl" in
25143  no:*) ;;
25144  *:no)
25145     need_dash_r=
25146     need_dash_Wlrpath=
25147     case "${with_rpath-notgiven}" in
25148      yes)
25149         # Lame - what to do if we need -Wl... but not -R?
25150         need_dash_r=1
25151         ;;
25152      notgiven)
25153         case "$host" in
25154          *-*-linux*)
25155             # This may really only be true for gcc
25156             need_dash_Wlrpath=1
25157             ;;
25158          *-*-netbsd*)
25159             need_dash_r=1
25160             ;;
25161          *-*-solaris*)
25162             need_dash_r=1
25163             ;;
25164         esac
25165         ;;
25166     esac
25167
25168     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
25169 $as_echo_n "checking for openssl library directory... " >&6; }
25170     with_openssl_libdir=${with_openssl_libdir-notgiven}
25171     case "$with_openssl_libdir" in
25172      notgiven)
25173         case "$build" in
25174          $host)
25175             with_openssl_libdir=default
25176             ;;
25177          *)
25178             with_openssl_libdir=no
25179             ;;
25180         esac
25181     esac
25182     case "$with_openssl_libdir" in
25183      default)
25184         # Look in:
25185         with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib"
25186         with_openssl_libdir="$with_openssl_libdir /usr/local/lib"
25187         with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib"
25188     esac
25189     case "$with_openssl_libdir" in
25190      no)
25191         ;;
25192      *) # Look for libcrypto.a and libssl.a:
25193         for i in $with_openssl_libdir no
25194         do
25195             case "$host" in
25196              *-*-darwin*)
25197                 test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
25198                 ;;
25199              *)
25200                 test -f $i/libcrypto.so -a -f $i/libssl.so && break
25201                 test -f $i/libcrypto.a -a -f $i/libssl.a && break
25202                 ;;
25203             esac
25204         done
25205         openssl_libdir=$i
25206         ;;
25207     esac
25208     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
25209 $as_echo "$openssl_libdir" >&6; }
25210     case "$openssl_libdir" in
25211      no)
25212         openssl_libdir=
25213         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
25214 $as_echo "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
25215     esac
25216
25217     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
25218 $as_echo_n "checking for openssl include directory... " >&6; }
25219     with_openssl_incdir=${with_openssl_incdir-notgiven}
25220     case "$with_openssl_incdir" in
25221      notgiven)
25222         # Look in:
25223         with_openssl_incdir="/usr/include /usr/sfw/include"
25224         with_openssl_incdir="$with_openssl_incdir /usr/local/include"
25225         with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include"
25226     esac
25227     case "$with_openssl_incdir" in
25228      no)
25229         ;;
25230      *) # look for openssl/evp.h:
25231         for i in $with_openssl_incdir no
25232         do
25233             test -f $i/openssl/evp.h && break
25234         done
25235         openssl_incdir=$i
25236         ;;
25237     esac
25238     { i=; unset i;}
25239     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
25240 $as_echo "$openssl_incdir" >&6; }
25241     case "$openssl_incdir" in
25242      no)
25243         openssl_incdir=
25244         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
25245 $as_echo "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
25246     esac
25247     if test -z "$openssl_libdir" -o -z "$openssl_incdir"
25248     then
25249         ntp_openssl=no
25250     else
25251         ntp_openssl=yes
25252         VER_SUFFIX=o
25253     fi
25254     case "$ntp_openssl" in
25255      yes)
25256         # We have OpenSSL inc/lib dirs - use them.
25257         case "$openssl_incdir" in
25258          /usr/include)
25259             ;;
25260          *)
25261             CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir"
25262             ;;
25263         esac
25264         case "$openssl_libdir" in
25265          /usr/lib)
25266             ;;
25267          *)
25268             LDADD_NTP="$LDADD_NTP -L$openssl_libdir"
25269             case "$need_dash_r" in
25270              1)
25271                 LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir"
25272             esac
25273             case "$need_dash_Wlrpath" in
25274              1)
25275                 LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir"
25276             esac
25277             ;;
25278         esac
25279         LDADD_NTP="$LDADD_NTP -lcrypto"
25280     esac
25281 esac
25282
25283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
25284 $as_echo_n "checking if we will use crypto... " >&6; }
25285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
25286 $as_echo "$ntp_openssl" >&6; }
25287
25288 case "$ntp_openssl" in
25289  yes)
25290
25291 $as_echo "#define OPENSSL /**/" >>confdefs.h
25292
25293     case "$VER_SUFFIX" in
25294      *o*) ;;
25295      *) as_fn_error $? "OPENSSL set but no 'o' in VER_SUFFIX!" "$LINENO" 5 ;;
25296     esac
25297     ;;
25298 esac
25299
25300 NTPO_SAVED_CPPFLAGS="$CPPFLAGS"
25301 CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP"
25302 NTPO_SAVED_LIBS="$LIBS"
25303
25304 #
25305 # check for linking with -lcrypto failure, and try -lcrypto -lz.
25306 # Helps m68k-atari-mint
25307 #
25308 case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
25309  yes:no)
25310     LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
25311     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
25312 $as_echo_n "checking if linking with -lcrypto alone works... " >&6; }
25313 if ${ntp_cv_bare_lcrypto+:} false; then :
25314   $as_echo_n "(cached) " >&6
25315 else
25316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25317 /* end confdefs.h.  */
25318
25319                     #include "openssl/err.h"
25320                     #include "openssl/evp.h"
25321
25322 int
25323 main ()
25324 {
25325
25326                     ERR_load_crypto_strings();
25327                     OpenSSL_add_all_algorithms();
25328
25329
25330   ;
25331   return 0;
25332 }
25333 _ACEOF
25334 if ac_fn_c_try_link "$LINENO"; then :
25335   ntp_cv_bare_lcrypto=yes
25336 else
25337   ntp_cv_bare_lcrypto=no
25338
25339 fi
25340 rm -f core conftest.err conftest.$ac_objext \
25341     conftest$ac_exeext conftest.$ac_ext
25342
25343 fi
25344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
25345 $as_echo "$ntp_cv_bare_lcrypto" >&6; }
25346     case "$ntp_cv_bare_lcrypto" in
25347      no)
25348         LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
25349         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
25350 $as_echo_n "checking if linking with -lcrypto -lz works... " >&6; }
25351 if ${ntp_cv_lcrypto_lz+:} false; then :
25352   $as_echo_n "(cached) " >&6
25353 else
25354   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25355 /* end confdefs.h.  */
25356
25357                         #include "openssl/err.h"
25358                         #include "openssl/evp.h"
25359
25360 int
25361 main ()
25362 {
25363
25364                         ERR_load_crypto_strings();
25365                         OpenSSL_add_all_algorithms();
25366
25367
25368   ;
25369   return 0;
25370 }
25371 _ACEOF
25372 if ac_fn_c_try_link "$LINENO"; then :
25373   ntp_cv_lcrypto_lz=yes
25374 else
25375   ntp_cv_lcrypto_lz=no
25376
25377 fi
25378 rm -f core conftest.err conftest.$ac_objext \
25379     conftest$ac_exeext conftest.$ac_ext
25380
25381 fi
25382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
25383 $as_echo "$ntp_cv_lcrypto_lz" >&6; }
25384         case "$ntp_cv_lcrypto_lz" in
25385          yes)
25386              LDADD_NTP="$LDADD_NTP -lz"
25387         esac
25388     esac
25389 esac
25390
25391 #
25392 # Older OpenSSL headers have a number of callback prototypes inside
25393 # other function prototypes which trigger copious warnings with gcc's
25394 # -Wstrict-prototypes, which is included in -Wall.
25395 #
25396 # An example:
25397 #
25398 # int i2d_RSA_NET(const RSA *a, unsigned char **pp,
25399 #                 int (*cb)(), int sgckey);
25400 #                 ^^^^^^^^^^^
25401 #
25402 #
25403 #
25404 openssl_triggers_warnings=unknown
25405 NTPO_SAVED_CFLAGS="$CFLAGS"
25406
25407 case "$ntp_openssl:$GCC" in
25408  yes:yes)
25409     CFLAGS="$CFLAGS -Werror"
25410     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25411 /* end confdefs.h.  */
25412
25413
25414 int
25415 main ()
25416 {
25417
25418                 /* see if -Werror breaks gcc */
25419
25420
25421   ;
25422   return 0;
25423 }
25424 _ACEOF
25425 if ac_fn_c_try_compile "$LINENO"; then :
25426   gcc_handles_Werror=yes
25427 else
25428   gcc_handles_Werror=no
25429
25430 fi
25431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25432     case "$gcc_handles_Werror" in
25433      no)
25434         # if this gcc doesn't do -Werror go ahead and use
25435         # -Wstrict-prototypes.
25436         openssl_triggers_warnings=yes
25437         ;;
25438      yes)
25439         CFLAGS="$CFLAGS -Wstrict-prototypes"
25440         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25441 /* end confdefs.h.  */
25442
25443                     #include "openssl/asn1_mac.h"
25444                     #include "openssl/bn.h"
25445                     #include "openssl/err.h"
25446                     #include "openssl/evp.h"
25447                     #include "openssl/pem.h"
25448                     #include "openssl/rand.h"
25449                     #include "openssl/x509v3.h"
25450
25451 int
25452 main ()
25453 {
25454
25455                     /* empty body */
25456
25457
25458   ;
25459   return 0;
25460 }
25461 _ACEOF
25462 if ac_fn_c_try_compile "$LINENO"; then :
25463   openssl_triggers_warnings=no
25464 else
25465   openssl_triggers_warnings=yes
25466
25467 fi
25468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25469     esac
25470     case "$openssl_triggers_warnings" in
25471      yes)
25472         CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes"
25473         ;;
25474      *)
25475         CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
25476     esac
25477     ;;
25478  no:yes)
25479     # gcc without OpenSSL
25480     CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
25481 esac
25482
25483 # Because we don't want -Werror for the EVP_MD_do_all_sorted check
25484 CFLAGS="$NTPO_SAVED_CFLAGS"
25485
25486 case "$ntp_openssl" in
25487  yes)
25488     LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
25489     for ac_func in EVP_MD_do_all_sorted
25490 do :
25491   ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
25492 if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes; then :
25493   cat >>confdefs.h <<_ACEOF
25494 #define HAVE_EVP_MD_DO_ALL_SORTED 1
25495 _ACEOF
25496
25497 fi
25498 done
25499
25500     ;;
25501 esac
25502
25503
25504 CPPFLAGS="$NTPO_SAVED_CPPFLAGS"
25505 LIBS="$NTPO_SAVED_LIBS"
25506 { NTPO_SAVED_CFLAGS=; unset NTPO_SAVED_CFLAGS;}
25507 { NTPO_SAVED_CPPFLAGS=; unset NTPO_SAVED_CPPFLAGS;}
25508 { NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;}
25509 { openssl_triggers_warnings=; unset openssl_triggers_warnings;}
25510 { ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
25511
25512
25513
25514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
25515 $as_echo_n "checking for struct sockaddr_storage... " >&6; }
25516 if ${ntp_cv_sockaddr_storage+:} false; then :
25517   $as_echo_n "(cached) " >&6
25518 else
25519   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25520 /* end confdefs.h.  */
25521
25522                 #ifdef HAVE_SYS_TYPES_H
25523                 # include <sys/types.h>
25524                 #endif
25525                 #ifdef HAVE_SYS_SOCKET_H
25526                 # include <sys/socket.h>
25527                 #endif
25528                 #ifdef HAVE_NETINET_IN_H
25529                 # include <netinet/in.h>
25530                 #endif
25531
25532 int
25533 main ()
25534 {
25535
25536                 struct sockaddr_storage n;
25537
25538
25539   ;
25540   return 0;
25541 }
25542 _ACEOF
25543 if ac_fn_c_try_compile "$LINENO"; then :
25544   ntp_cv_sockaddr_storage=yes
25545 else
25546   ntp_cv_sockaddr_storage=no
25547
25548 fi
25549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25550
25551 fi
25552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
25553 $as_echo "$ntp_cv_sockaddr_storage" >&6; }
25554 case "$ntp_cv_sockaddr_storage" in
25555  yes)
25556
25557 $as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
25558
25559     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
25560 $as_echo_n "checking for sockaddr_storage.__ss_family... " >&6; }
25561 if ${ntp_cv_have___ss_family+:} false; then :
25562   $as_echo_n "(cached) " >&6
25563 else
25564   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25565 /* end confdefs.h.  */
25566
25567                     #ifdef HAVE_SYS_TYPES_H
25568                     # include <sys/types.h>
25569                     #endif
25570                     #ifdef HAVE_SYS_SOCKET_H
25571                     # include <sys/socket.h>
25572                     #endif
25573                     #ifdef HAVE_NETINET_IN_H
25574                     # include <netinet/in.h>
25575                     #endif
25576
25577 int
25578 main ()
25579 {
25580
25581                     struct sockaddr_storage s;
25582                     s.__ss_family = 1;
25583
25584
25585   ;
25586   return 0;
25587 }
25588 _ACEOF
25589 if ac_fn_c_try_compile "$LINENO"; then :
25590   ntp_cv_have___ss_family=yes
25591 else
25592   ntp_cv_have___ss_family=no
25593
25594 fi
25595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25596
25597 fi
25598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
25599 $as_echo "$ntp_cv_have___ss_family" >&6; }
25600     case "$ntp_cv_have___ss_family" in
25601      yes)
25602
25603 $as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
25604
25605     esac
25606
25607 esac
25608
25609
25610 #
25611 # Look for in_port_t.
25612 #
25613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
25614 $as_echo_n "checking for in_port_t... " >&6; }
25615 if ${isc_cv_have_in_port_t+:} false; then :
25616   $as_echo_n "(cached) " >&6
25617 else
25618   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25619 /* end confdefs.h.  */
25620
25621                 #include <sys/types.h>
25622                 #include <netinet/in.h>
25623
25624 int
25625 main ()
25626 {
25627
25628                 in_port_t port = 25;
25629                 return (0);
25630
25631
25632   ;
25633   return 0;
25634 }
25635 _ACEOF
25636 if ac_fn_c_try_compile "$LINENO"; then :
25637   isc_cv_have_in_port_t=yes
25638 else
25639   isc_cv_have_in_port_t=no
25640
25641 fi
25642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25643
25644 fi
25645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
25646 $as_echo "$isc_cv_have_in_port_t" >&6; }
25647 case "$isc_cv_have_in_port_t" in
25648  no)
25649
25650 $as_echo "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
25651
25652 esac
25653
25654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
25655 $as_echo_n "checking type of socklen arg for getsockname()... " >&6; }
25656 if ${ntp_cv_getsockname_socklen_type+:} false; then :
25657   $as_echo_n "(cached) " >&6
25658 else
25659
25660     getsockname_socklen_type_found=no
25661     for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
25662         for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
25663             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25664 /* end confdefs.h.  */
25665
25666                         #ifdef HAVE_SYS_TYPES_H
25667                         # include <sys/types.h>
25668                         #endif
25669                         #ifdef HAVE_SYS_SOCKET_H
25670                         # include <sys/socket.h>
25671                         #endif
25672
25673 int
25674 main ()
25675 {
25676
25677                         extern
25678                         getsockname(int, $getsockname_arg2,
25679                                 $ntp_cv_getsockname_socklen_type *);
25680
25681
25682   ;
25683   return 0;
25684 }
25685 _ACEOF
25686 if ac_fn_c_try_compile "$LINENO"; then :
25687   getsockname_socklen_type_found=yes ; break 2
25688 fi
25689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25690         done
25691     done
25692     case "$getsockname_socklen_type_found" in
25693      no)
25694         ntp_cv_getsockname_socklen_type='socklen_t'
25695     esac
25696     { getsockname_arg2=; unset getsockname_arg2;}
25697     { getsockname_socklen_type_found=; unset getsockname_socklen_type_found;}
25698
25699
25700 fi
25701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
25702 $as_echo "$ntp_cv_getsockname_socklen_type" >&6; }
25703
25704 cat >>confdefs.h <<_ACEOF
25705 #define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type
25706 _ACEOF
25707
25708
25709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
25710 $as_echo_n "checking struct sockaddr for sa_len... " >&6; }
25711 if ${isc_cv_platform_havesalen+:} false; then :
25712   $as_echo_n "(cached) " >&6
25713 else
25714   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25715 /* end confdefs.h.  */
25716
25717                 #include <sys/types.h>
25718                 #include <sys/socket.h>
25719
25720 int
25721 main ()
25722 {
25723
25724                 extern struct sockaddr *ps;
25725                 return ps->sa_len;
25726
25727
25728   ;
25729   return 0;
25730 }
25731 _ACEOF
25732 if ac_fn_c_try_compile "$LINENO"; then :
25733   isc_cv_platform_havesalen=yes
25734 else
25735   isc_cv_platform_havesalen=no
25736
25737 fi
25738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25739
25740 fi
25741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_platform_havesalen" >&5
25742 $as_echo "$isc_cv_platform_havesalen" >&6; }
25743 case "$isc_cv_platform_havesalen" in
25744  yes)
25745
25746 $as_echo "#define ISC_PLATFORM_HAVESALEN 1" >>confdefs.h
25747
25748 esac
25749
25750 # Check whether --enable-ipv6 was given.
25751 if test "${enable_ipv6+set}" = set; then :
25752   enableval=$enable_ipv6;
25753 fi
25754
25755
25756 case "$enable_ipv6" in
25757  yes|''|autodetect)
25758     case "$host" in
25759      powerpc-ibm-aix4*)
25760         ;;
25761      *)
25762
25763 $as_echo "#define WANT_IPV6 1" >>confdefs.h
25764
25765         ;;
25766     esac
25767     ;;
25768  no)
25769     ;;
25770 esac
25771
25772
25773 case "$host" in
25774  *-*-darwin*)
25775
25776 $as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
25777
25778 esac
25779
25780
25781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5
25782 $as_echo_n "checking for IPv6 structures... " >&6; }
25783 if ${isc_cv_found_ipv6+:} false; then :
25784   $as_echo_n "(cached) " >&6
25785 else
25786   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25787 /* end confdefs.h.  */
25788
25789                 #include <sys/types.h>
25790                 #include <sys/socket.h>
25791                 #include <netinet/in.h>
25792
25793 int
25794 main ()
25795 {
25796
25797                 struct sockaddr_in6 sin6;
25798
25799
25800   ;
25801   return 0;
25802 }
25803 _ACEOF
25804 if ac_fn_c_try_compile "$LINENO"; then :
25805   isc_cv_found_ipv6=yes
25806 else
25807   isc_cv_found_ipv6=no
25808
25809 fi
25810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25811
25812 fi
25813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_found_ipv6" >&5
25814 $as_echo "$isc_cv_found_ipv6" >&6; }
25815
25816 #
25817 # See whether IPv6 support is provided via a Kame add-on.
25818 # This is done before other IPv6 linking tests so LIBS is properly set.
25819 #
25820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kame IPv6 support" >&5
25821 $as_echo_n "checking for Kame IPv6 support... " >&6; }
25822
25823 # Check whether --with-kame was given.
25824 if test "${with_kame+set}" = set; then :
25825   withval=$with_kame; use_kame="$withval"
25826 else
25827   use_kame="no"
25828
25829 fi
25830
25831 case "$use_kame" in
25832  no)
25833     ;;
25834  yes)
25835     kame_path=/usr/local/v6
25836     ;;
25837  *)
25838     kame_path="$use_kame"
25839     ;;
25840 esac
25841 case "$use_kame" in
25842  no)
25843     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25844 $as_echo "no" >&6; }
25845     ;;
25846  *)
25847     if test -f $kame_path/lib/libinet6.a; then
25848         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kame_path/lib/libinet6.a" >&5
25849 $as_echo "$kame_path/lib/libinet6.a" >&6; }
25850         LIBS="-L$kame_path/lib -linet6 $LIBS"
25851     else
25852         as_fn_error $? "$kame_path/lib/libinet6.a not found.
25853
25854 Please choose the proper path with the following command:
25855
25856     configure --with-kame=PATH
25857 " "$LINENO" 5
25858     fi
25859     ;;
25860 esac
25861
25862 #
25863 # Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
25864 # Including it on Kame-using platforms is very bad, though, because
25865 # Kame uses #error against direct inclusion.   So include it on only
25866 # the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
25867 # This is done before the in6_pktinfo check because that's what
25868 # netinet6/in6.h is needed for.
25869 #
25870 case "$host" in
25871  *-bsdi4.[01]*)
25872
25873 $as_echo "#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >>confdefs.h
25874
25875     isc_netinet6in6_hack="#include <netinet6/in6.h>"
25876     ;;
25877  *)
25878     isc_netinet6in6_hack=""
25879     ;;
25880 esac
25881
25882 #
25883 # This is similar to the netinet6/in6.h issue.
25884 #
25885 case "$host" in
25886  *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
25887
25888 $as_echo "#define ISC_PLATFORM_FIXIN6ISADDR 1" >>confdefs.h
25889
25890     isc_netinetin6_hack="#include <netinet/in6.h>"
25891     ;;
25892  *)
25893     isc_netinetin6_hack=""
25894     ;;
25895 esac
25896
25897
25898 case "$isc_cv_found_ipv6" in
25899  yes)
25900
25901 $as_echo "#define ISC_PLATFORM_HAVEIPV6 1" >>confdefs.h
25902
25903     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
25904 $as_echo_n "checking for in6_pktinfo... " >&6; }
25905 if ${isc_cv_have_in6_pktinfo+:} false; then :
25906   $as_echo_n "(cached) " >&6
25907 else
25908   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25909 /* end confdefs.h.  */
25910
25911                     #include <sys/types.h>
25912                     #include <sys/socket.h>
25913                     #include <netinet/in.h>
25914                     $isc_netinetin6_hack
25915                     $isc_netinet6in6_hack
25916
25917 int
25918 main ()
25919 {
25920
25921                     struct in6_pktinfo xyzzy;
25922
25923
25924   ;
25925   return 0;
25926 }
25927 _ACEOF
25928 if ac_fn_c_try_compile "$LINENO"; then :
25929   isc_cv_have_in6_pktinfo=yes
25930 else
25931   isc_cv_have_in6_pktinfo=no
25932
25933 fi
25934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25935
25936 fi
25937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6_pktinfo" >&5
25938 $as_echo "$isc_cv_have_in6_pktinfo" >&6; }
25939     case "$isc_cv_have_in6_pktinfo" in
25940      yes)
25941
25942 $as_echo "#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >>confdefs.h
25943
25944     esac
25945
25946
25947     # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
25948     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_in6.sin6_scope_id" >&5
25949 $as_echo_n "checking for sockaddr_in6.sin6_scope_id... " >&6; }
25950 if ${isc_cv_have_sin6_scope_id+:} false; then :
25951   $as_echo_n "(cached) " >&6
25952 else
25953   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25954 /* end confdefs.h.  */
25955
25956                     #include <sys/types.h>
25957                     #include <sys/socket.h>
25958                     #include <netinet/in.h>
25959                     $isc_netinetin6_hack
25960                     $isc_netinet6in6_hack
25961
25962 int
25963 main ()
25964 {
25965
25966                     struct sockaddr_in6 xyzzy;
25967                     xyzzy.sin6_scope_id = 0;
25968
25969
25970   ;
25971   return 0;
25972 }
25973 _ACEOF
25974 if ac_fn_c_try_compile "$LINENO"; then :
25975   isc_cv_have_sin6_scope_id=yes
25976 else
25977   isc_cv_have_sin6_scope_id=no
25978
25979 fi
25980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25981
25982 fi
25983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_sin6_scope_id" >&5
25984 $as_echo "$isc_cv_have_sin6_scope_id" >&6; }
25985
25986     case "$isc_cv_have_sin6_scope_id" in
25987      yes)
25988
25989 $as_echo "#define ISC_PLATFORM_HAVESCOPEID 1" >>confdefs.h
25990
25991     esac
25992 esac
25993
25994
25995 # We need this check run even without isc_cv_found_ipv6=yes
25996
25997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
25998 $as_echo_n "checking for in6addr_any... " >&6; }
25999 if ${isc_cv_in6addr_any_links+:} false; then :
26000   $as_echo_n "(cached) " >&6
26001 else
26002
26003         SAVED_LIBS="$LIBS"
26004         LIBS="$LDADD_LIBNTP $LIBS"
26005         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26006 /* end confdefs.h.  */
26007 $ac_includes_default
26008                     #include <sys/socket.h>
26009                     #include <netinet/in.h>
26010                     $isc_netinetin6_hack
26011                     $isc_netinet6in6_hack
26012
26013 int
26014 main ()
26015 {
26016
26017                     printf("%x", in6addr_any.s6_addr[15]);
26018
26019
26020   ;
26021   return 0;
26022 }
26023 _ACEOF
26024 if ac_fn_c_try_link "$LINENO"; then :
26025   isc_cv_in6addr_any_links=yes
26026 else
26027   isc_cv_in6addr_any_links=no
26028
26029 fi
26030 rm -f core conftest.err conftest.$ac_objext \
26031     conftest$ac_exeext conftest.$ac_ext
26032         LIBS="$SAVED_LIBS"
26033         { SAVED_LIBS=; unset SAVED_LIBS;}
26034
26035
26036 fi
26037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
26038 $as_echo "$isc_cv_in6addr_any_links" >&6; }
26039
26040 case "$isc_cv_in6addr_any_links" in
26041  no)
26042
26043 $as_echo "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
26044
26045 esac
26046
26047
26048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5
26049 $as_echo_n "checking for struct if_laddrconf... " >&6; }
26050 if ${isc_cv_struct_if_laddrconf+:} false; then :
26051   $as_echo_n "(cached) " >&6
26052 else
26053   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26054 /* end confdefs.h.  */
26055
26056                 #include <sys/types.h>
26057                 #include <net/if6.h>
26058
26059 int
26060 main ()
26061 {
26062
26063                 struct if_laddrconf a;
26064
26065
26066   ;
26067   return 0;
26068 }
26069 _ACEOF
26070 if ac_fn_c_try_compile "$LINENO"; then :
26071   isc_cv_struct_if_laddrconf=yes
26072 else
26073   isc_cv_struct_if_laddrconf=no
26074
26075 fi
26076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26077
26078 fi
26079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrconf" >&5
26080 $as_echo "$isc_cv_struct_if_laddrconf" >&6; }
26081
26082 case "$isc_cv_struct_if_laddrconf" in
26083  yes)
26084
26085 $as_echo "#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" >>confdefs.h
26086
26087 esac
26088
26089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
26090 $as_echo_n "checking for struct if_laddrreq... " >&6; }
26091 if ${isc_cv_struct_if_laddrreq+:} false; then :
26092   $as_echo_n "(cached) " >&6
26093 else
26094   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26095 /* end confdefs.h.  */
26096
26097                 #include <sys/types.h>
26098                 #include <net/if6.h>
26099
26100 int
26101 main ()
26102 {
26103
26104                 struct if_laddrreq a;
26105
26106
26107   ;
26108   return 0;
26109 }
26110 _ACEOF
26111 if ac_fn_c_try_compile "$LINENO"; then :
26112   isc_cv_struct_if_laddrreq=yes
26113 else
26114   isc_cv_struct_if_laddrreq=no
26115
26116 fi
26117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26118
26119 fi
26120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrreq" >&5
26121 $as_echo "$isc_cv_struct_if_laddrreq" >&6; }
26122
26123 case "$isc_cv_struct_if_laddrreq" in
26124  yes)
26125
26126 $as_echo "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
26127
26128 esac
26129
26130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
26131 $as_echo_n "checking for multicast IP support... " >&6; }
26132 if ${ntp_cv_multicast+:} false; then :
26133   $as_echo_n "(cached) " >&6
26134 else
26135
26136         ntp_cv_multicast=no
26137         case "$host" in
26138          i386-sequent-sysv4)
26139             ;;
26140          *)
26141             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26142 /* end confdefs.h.  */
26143
26144                         #ifdef HAVE_NETINET_IN_H
26145                         # include <netinet/in.h>
26146                         #endif
26147
26148 int
26149 main ()
26150 {
26151
26152                         struct ip_mreq ipmr;
26153                         ipmr.imr_interface.s_addr = 0;
26154
26155
26156   ;
26157   return 0;
26158 }
26159 _ACEOF
26160 if ac_fn_c_try_compile "$LINENO"; then :
26161   ntp_cv_multicast=yes
26162 fi
26163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26164             ;;
26165         esac
26166
26167
26168 fi
26169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
26170 $as_echo "$ntp_cv_multicast" >&6; }
26171 case "$ntp_cv_multicast" in
26172  yes)
26173
26174 $as_echo "#define MCAST 1" >>confdefs.h
26175
26176     { $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
26177 $as_echo_n "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
26178 if ${ntp_cv_typeof_ip_multicast_loop+:} false; then :
26179   $as_echo_n "(cached) " >&6
26180 else
26181
26182             case "$host" in
26183              *-*-netbsd*|*-*-*linux*)
26184                 ntp_cv_typeof_ip_multicast_loop=u_int
26185                 ;;
26186              *)
26187                 ntp_cv_typeof_ip_multicast_loop=u_char
26188                 ;;
26189             esac
26190
26191
26192 fi
26193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
26194 $as_echo "$ntp_cv_typeof_ip_multicast_loop" >&6; }
26195
26196 cat >>confdefs.h <<_ACEOF
26197 #define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop
26198 _ACEOF
26199
26200 esac
26201
26202 # Check whether --enable-getifaddrs was given.
26203 if test "${enable_getifaddrs+set}" = set; then :
26204   enableval=$enable_getifaddrs; want_getifaddrs="$enableval"
26205 else
26206   want_getifaddrs="yes"
26207
26208 fi
26209
26210
26211 case $want_getifaddrs in
26212  glibc)
26213     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
26214 $as_echo "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
26215 esac
26216 case $want_getifaddrs in
26217  no)
26218     ;;
26219  *)
26220     SAVED_LIBS="$LIBS"
26221     LIBS="$LDADD_LIBNTP $LIBS"
26222     for ac_func in getifaddrs
26223 do :
26224   ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
26225 if test "x$ac_cv_func_getifaddrs" = xyes; then :
26226   cat >>confdefs.h <<_ACEOF
26227 #define HAVE_GETIFADDRS 1
26228 _ACEOF
26229
26230 fi
26231 done
26232
26233     LIBS="$SAVED_LIBS"
26234     { SAVED_LIBS=; unset SAVED_LIBS;}
26235     ;;
26236 esac
26237
26238 #
26239 # Check for if_nametoindex() for IPv6 scoped addresses support
26240 #
26241 case "$host" in
26242  *-hp-hpux*)
26243     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
26244 $as_echo_n "checking for library containing if_nametoindex... " >&6; }
26245 if ${ac_cv_search_if_nametoindex+:} false; then :
26246   $as_echo_n "(cached) " >&6
26247 else
26248   ac_func_search_save_LIBS=$LIBS
26249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26250 /* end confdefs.h.  */
26251
26252 /* Override any GCC internal prototype to avoid an error.
26253    Use char because int might match the return type of a GCC
26254    builtin and then its argument prototype would still apply.  */
26255 #ifdef __cplusplus
26256 extern "C"
26257 #endif
26258 char if_nametoindex ();
26259 int
26260 main ()
26261 {
26262 return if_nametoindex ();
26263   ;
26264   return 0;
26265 }
26266 _ACEOF
26267 for ac_lib in '' ipv6; do
26268   if test -z "$ac_lib"; then
26269     ac_res="none required"
26270   else
26271     ac_res=-l$ac_lib
26272     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26273   fi
26274   if ac_fn_c_try_link "$LINENO"; then :
26275   ac_cv_search_if_nametoindex=$ac_res
26276 fi
26277 rm -f core conftest.err conftest.$ac_objext \
26278     conftest$ac_exeext
26279   if ${ac_cv_search_if_nametoindex+:} false; then :
26280   break
26281 fi
26282 done
26283 if ${ac_cv_search_if_nametoindex+:} false; then :
26284
26285 else
26286   ac_cv_search_if_nametoindex=no
26287 fi
26288 rm conftest.$ac_ext
26289 LIBS=$ac_func_search_save_LIBS
26290 fi
26291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
26292 $as_echo "$ac_cv_search_if_nametoindex" >&6; }
26293 ac_res=$ac_cv_search_if_nametoindex
26294 if test "$ac_res" != no; then :
26295   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26296
26297 fi
26298
26299 esac
26300 SAVED_LIBS="$LIBS"
26301 LIBS="$LDADD_LIBNTP $LIBS"
26302 for ac_func in if_nametoindex
26303 do :
26304   ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
26305 if test "x$ac_cv_func_if_nametoindex" = xyes; then :
26306   cat >>confdefs.h <<_ACEOF
26307 #define HAVE_IF_NAMETOINDEX 1
26308 _ACEOF
26309
26310 fi
26311 done
26312
26313 LIBS="$SAVED_LIBS"
26314 { SAVED_LIBS=; unset SAVED_LIBS;}
26315 case "$ac_cv_func_if_nametoindex" in
26316  yes)
26317
26318 $as_echo "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
26319
26320 esac
26321
26322
26323
26324 ###
26325
26326 # Hacks
26327 # these need work if we're to move libntp under sntp
26328
26329 $as_echo "#define HAVE_NO_NICE 1" >>confdefs.h
26330
26331
26332 $as_echo "#define HAVE_TERMIOS 1" >>confdefs.h
26333
26334
26335 # Checks for library functions.
26336 for ac_func in socket
26337 do :
26338   ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
26339 if test "x$ac_cv_func_socket" = xyes; then :
26340   cat >>confdefs.h <<_ACEOF
26341 #define HAVE_SOCKET 1
26342 _ACEOF
26343
26344 fi
26345 done
26346
26347
26348
26349 # We may not need have_unity
26350 have_unity=false
26351 # Extract the first word of "ruby", so it can be a program name with args.
26352 set dummy ruby; ac_word=$2
26353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26354 $as_echo_n "checking for $ac_word... " >&6; }
26355 if ${ac_cv_path_PATH_RUBY+:} false; then :
26356   $as_echo_n "(cached) " >&6
26357 else
26358   case $PATH_RUBY in
26359   [\\/]* | ?:[\\/]*)
26360   ac_cv_path_PATH_RUBY="$PATH_RUBY" # Let the user override the test with a path.
26361   ;;
26362   *)
26363   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26364 for as_dir in $PATH
26365 do
26366   IFS=$as_save_IFS
26367   test -z "$as_dir" && as_dir=.
26368     for ac_exec_ext in '' $ac_executable_extensions; do
26369   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26370     ac_cv_path_PATH_RUBY="$as_dir/$ac_word$ac_exec_ext"
26371     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26372     break 2
26373   fi
26374 done
26375   done
26376 IFS=$as_save_IFS
26377
26378   ;;
26379 esac
26380 fi
26381 PATH_RUBY=$ac_cv_path_PATH_RUBY
26382 if test -n "$PATH_RUBY"; then
26383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_RUBY" >&5
26384 $as_echo "$PATH_RUBY" >&6; }
26385 else
26386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26387 $as_echo "no" >&6; }
26388 fi
26389
26390
26391 case "$PATH_RUBY" in
26392  /*)
26393     have_unity=true
26394     ;;
26395  *) PATH_RUBY="false"
26396     ;;
26397 esac
26398 # We may not need UNITYBUILD_AVAILABLE
26399  if $have_unity; then
26400   UNITYBUILD_AVAILABLE_TRUE=
26401   UNITYBUILD_AVAILABLE_FALSE='#'
26402 else
26403   UNITYBUILD_AVAILABLE_TRUE='#'
26404   UNITYBUILD_AVAILABLE_FALSE=
26405 fi
26406
26407
26408
26409 ## HMS: if we don't find c++ we should not look for gtest.
26410 #AC_PROG_CXX
26411 #NTP_GOOGLETEST
26412
26413
26414 case "$build" in
26415  $host) cross=0 ;;
26416  *)     cross=1 ;;
26417 esac
26418
26419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to enable tests with undiagnosed problems" >&5
26420 $as_echo_n "checking if we want to enable tests with undiagnosed problems... " >&6; }
26421 # Check whether --enable-problem-tests was given.
26422 if test "${enable_problem_tests+set}" = set; then :
26423   enableval=$enable_problem_tests; sntp_ept=$enableval
26424 else
26425   sntp_ept=yes
26426
26427 fi
26428
26429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sntp_ept" >&5
26430 $as_echo "$sntp_ept" >&6; }
26431
26432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-kodDatabase" >&5
26433 $as_echo_n "checking if we can run test-kodDatabase... " >&6; }
26434 sntp_test_kodDatabase="no"
26435 case "$sntp_ept:$cross:$host" in
26436  no:0:*-apple-darwin12.6.0) ;;
26437  *) sntp_test_kodDatabase="yes" ;;
26438 esac
26439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sntp_test_kodDatabase" >&5
26440 $as_echo "$sntp_test_kodDatabase" >&6; }
26441  if test x$sntp_test_kodDatabase = xyes; then
26442   BUILD_TEST_KODDATABASE_TRUE=
26443   BUILD_TEST_KODDATABASE_FALSE='#'
26444 else
26445   BUILD_TEST_KODDATABASE_TRUE='#'
26446   BUILD_TEST_KODDATABASE_FALSE=
26447 fi
26448
26449
26450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-kodFile" >&5
26451 $as_echo_n "checking if we can run test-kodFile... " >&6; }
26452 sntp_test_kodFile="no"
26453 case "$sntp_ept:$cross:$host" in
26454  no:0:*-apple-darwin12.6.0) ;;
26455  *) sntp_test_kodFile="yes" ;;
26456 esac
26457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sntp_test_kodFile" >&5
26458 $as_echo "$sntp_test_kodFile" >&6; }
26459  if test x$sntp_test_kodFile = xyes; then
26460   BUILD_TEST_KODFILE_TRUE=
26461   BUILD_TEST_KODFILE_FALSE='#'
26462 else
26463   BUILD_TEST_KODFILE_TRUE='#'
26464   BUILD_TEST_KODFILE_FALSE=
26465 fi
26466
26467
26468
26469
26470 # All libraries should be in various LIB_* variables now.
26471 #LIBS=
26472 # Sadly not.  There is a gettext() check somewhere, and on Solaris this pulls
26473 # in -lintl -lgen, outside our "scope".
26474
26475 ac_config_files="$ac_config_files Makefile"
26476
26477 ac_config_files="$ac_config_files include/Makefile"
26478
26479 ac_config_files="$ac_config_files scripts/Makefile"
26480
26481 ac_config_files="$ac_config_files tests/Makefile"
26482
26483 ac_config_files="$ac_config_files tests/fileHandlingTest.h"
26484
26485 ac_config_files="$ac_config_files unity/Makefile"
26486
26487
26488 cat >confcache <<\_ACEOF
26489 # This file is a shell script that caches the results of configure
26490 # tests run on this system so they can be shared between configure
26491 # scripts and configure runs, see configure's option --config-cache.
26492 # It is not useful on other systems.  If it contains results you don't
26493 # want to keep, you may remove or edit it.
26494 #
26495 # config.status only pays attention to the cache file if you give it
26496 # the --recheck option to rerun configure.
26497 #
26498 # `ac_cv_env_foo' variables (set or unset) will be overridden when
26499 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26500 # following values.
26501
26502 _ACEOF
26503
26504 # The following way of writing the cache mishandles newlines in values,
26505 # but we know of no workaround that is simple, portable, and efficient.
26506 # So, we kill variables containing newlines.
26507 # Ultrix sh set writes to stderr and can't be redirected directly,
26508 # and sets the high bit in the cache file unless we assign to the vars.
26509 (
26510   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26511     eval ac_val=\$$ac_var
26512     case $ac_val in #(
26513     *${as_nl}*)
26514       case $ac_var in #(
26515       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
26516 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
26517       esac
26518       case $ac_var in #(
26519       _ | IFS | as_nl) ;; #(
26520       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
26521       *) { eval $ac_var=; unset $ac_var;} ;;
26522       esac ;;
26523     esac
26524   done
26525
26526   (set) 2>&1 |
26527     case $as_nl`(ac_space=' '; set) 2>&1` in #(
26528     *${as_nl}ac_space=\ *)
26529       # `set' does not quote correctly, so add quotes: double-quote
26530       # substitution turns \\\\ into \\, and sed turns \\ into \.
26531       sed -n \
26532         "s/'/'\\\\''/g;
26533           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26534       ;; #(
26535     *)
26536       # `set' quotes correctly as required by POSIX, so do not add quotes.
26537       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
26538       ;;
26539     esac |
26540     sort
26541 ) |
26542   sed '
26543      /^ac_cv_env_/b end
26544      t clear
26545      :clear
26546      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26547      t end
26548      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26549      :end' >>confcache
26550 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26551   if test -w "$cache_file"; then
26552     if test "x$cache_file" != "x/dev/null"; then
26553       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
26554 $as_echo "$as_me: updating cache $cache_file" >&6;}
26555       if test ! -f "$cache_file" || test -h "$cache_file"; then
26556         cat confcache >"$cache_file"
26557       else
26558         case $cache_file in #(
26559         */* | ?:*)
26560           mv -f confcache "$cache_file"$$ &&
26561           mv -f "$cache_file"$$ "$cache_file" ;; #(
26562         *)
26563           mv -f confcache "$cache_file" ;;
26564         esac
26565       fi
26566     fi
26567   else
26568     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
26569 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
26570   fi
26571 fi
26572 rm -f confcache
26573
26574 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26575 # Let make expand exec_prefix.
26576 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26577
26578 DEFS=-DHAVE_CONFIG_H
26579
26580 ac_libobjs=
26581 ac_ltlibobjs=
26582 U=
26583 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26584   # 1. Remove the extension, and $U if already installed.
26585   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
26586   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
26587   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
26588   #    will be set to the directory where LIBOBJS objects are built.
26589   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26590   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
26591 done
26592 LIBOBJS=$ac_libobjs
26593
26594 LTLIBOBJS=$ac_ltlibobjs
26595
26596
26597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
26598 $as_echo_n "checking that generated files are newer than configure... " >&6; }
26599    if test -n "$am_sleep_pid"; then
26600      # Hide warnings about reused PIDs.
26601      wait $am_sleep_pid 2>/dev/null
26602    fi
26603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
26604 $as_echo "done" >&6; }
26605  if test -n "$EXEEXT"; then
26606   am__EXEEXT_TRUE=
26607   am__EXEEXT_FALSE='#'
26608 else
26609   am__EXEEXT_TRUE='#'
26610   am__EXEEXT_FALSE=
26611 fi
26612
26613 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
26614   as_fn_error $? "conditional \"AMDEP\" was never defined.
26615 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26616 fi
26617 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
26618   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
26619 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26620 fi
26621
26622 if test -z "${WANT_CALC_TICKADJ_MS_TRUE}" && test -z "${WANT_CALC_TICKADJ_MS_FALSE}"; then
26623   as_fn_error $? "conditional \"WANT_CALC_TICKADJ_MS\" was never defined.
26624 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26625 fi
26626 if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; then
26627   as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
26628 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26629 fi
26630 if test -z "${INSTALL_UPDATE_LEAP_TRUE}" && test -z "${INSTALL_UPDATE_LEAP_FALSE}"; then
26631   as_fn_error $? "conditional \"INSTALL_UPDATE_LEAP\" was never defined.
26632 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26633 fi
26634 if test -z "${NTP_CROSSCOMPILE_TRUE}" && test -z "${NTP_CROSSCOMPILE_FALSE}"; then
26635   as_fn_error $? "conditional \"NTP_CROSSCOMPILE\" was never defined.
26636 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26637 fi
26638 if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
26639   as_fn_error $? "conditional \"PTHREADS\" was never defined.
26640 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26641 fi
26642 if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then
26643   as_fn_error $? "conditional \"BUILD_SNTP\" was never defined.
26644 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26645 fi
26646 if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
26647   as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
26648 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26649 fi
26650 if test -z "${INSTALL_LIBOPTS_TRUE}" && test -z "${INSTALL_LIBOPTS_FALSE}"; then
26651   as_fn_error $? "conditional \"INSTALL_LIBOPTS\" was never defined.
26652 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26653 fi
26654 if test -z "${NEED_LIBOPTS_TRUE}" && test -z "${NEED_LIBOPTS_FALSE}"; then
26655   as_fn_error $? "conditional \"NEED_LIBOPTS\" was never defined.
26656 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26657 fi
26658 if test -z "${BUILD_LIBEVENT_TRUE}" && test -z "${BUILD_LIBEVENT_FALSE}"; then
26659   as_fn_error $? "conditional \"BUILD_LIBEVENT\" was never defined.
26660 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26661 fi
26662 if test -z "${UNITYBUILD_AVAILABLE_TRUE}" && test -z "${UNITYBUILD_AVAILABLE_FALSE}"; then
26663   as_fn_error $? "conditional \"UNITYBUILD_AVAILABLE\" was never defined.
26664 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26665 fi
26666 if test -z "${BUILD_TEST_KODDATABASE_TRUE}" && test -z "${BUILD_TEST_KODDATABASE_FALSE}"; then
26667   as_fn_error $? "conditional \"BUILD_TEST_KODDATABASE\" was never defined.
26668 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26669 fi
26670 if test -z "${BUILD_TEST_KODFILE_TRUE}" && test -z "${BUILD_TEST_KODFILE_FALSE}"; then
26671   as_fn_error $? "conditional \"BUILD_TEST_KODFILE\" was never defined.
26672 Usually this means the macro was only invoked conditionally." "$LINENO" 5
26673 fi
26674
26675 : "${CONFIG_STATUS=./config.status}"
26676 ac_write_fail=0
26677 ac_clean_files_save=$ac_clean_files
26678 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26679 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
26680 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
26681 as_write_fail=0
26682 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
26683 #! $SHELL
26684 # Generated by $as_me.
26685 # Run this file to recreate the current configuration.
26686 # Compiler output produced by configure, useful for debugging
26687 # configure, is in config.log if it exists.
26688
26689 debug=false
26690 ac_cs_recheck=false
26691 ac_cs_silent=false
26692
26693 SHELL=\${CONFIG_SHELL-$SHELL}
26694 export SHELL
26695 _ASEOF
26696 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
26697 ## -------------------- ##
26698 ## M4sh Initialization. ##
26699 ## -------------------- ##
26700
26701 # Be more Bourne compatible
26702 DUALCASE=1; export DUALCASE # for MKS sh
26703 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26704   emulate sh
26705   NULLCMD=:
26706   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26707   # is contrary to our usage.  Disable this feature.
26708   alias -g '${1+"$@"}'='"$@"'
26709   setopt NO_GLOB_SUBST
26710 else
26711   case `(set -o) 2>/dev/null` in #(
26712   *posix*) :
26713     set -o posix ;; #(
26714   *) :
26715      ;;
26716 esac
26717 fi
26718
26719
26720 as_nl='
26721 '
26722 export as_nl
26723 # Printing a long string crashes Solaris 7 /usr/bin/printf.
26724 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
26725 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
26726 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
26727 # Prefer a ksh shell builtin over an external printf program on Solaris,
26728 # but without wasting forks for bash or zsh.
26729 if test -z "$BASH_VERSION$ZSH_VERSION" \
26730     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
26731   as_echo='print -r --'
26732   as_echo_n='print -rn --'
26733 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
26734   as_echo='printf %s\n'
26735   as_echo_n='printf %s'
26736 else
26737   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
26738     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
26739     as_echo_n='/usr/ucb/echo -n'
26740   else
26741     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
26742     as_echo_n_body='eval
26743       arg=$1;
26744       case $arg in #(
26745       *"$as_nl"*)
26746         expr "X$arg" : "X\\(.*\\)$as_nl";
26747         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
26748       esac;
26749       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
26750     '
26751     export as_echo_n_body
26752     as_echo_n='sh -c $as_echo_n_body as_echo'
26753   fi
26754   export as_echo_body
26755   as_echo='sh -c $as_echo_body as_echo'
26756 fi
26757
26758 # The user is always right.
26759 if test "${PATH_SEPARATOR+set}" != set; then
26760   PATH_SEPARATOR=:
26761   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
26762     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
26763       PATH_SEPARATOR=';'
26764   }
26765 fi
26766
26767
26768 # IFS
26769 # We need space, tab and new line, in precisely that order.  Quoting is
26770 # there to prevent editors from complaining about space-tab.
26771 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
26772 # splitting by setting IFS to empty value.)
26773 IFS=" ""        $as_nl"
26774
26775 # Find who we are.  Look in the path if we contain no directory separator.
26776 as_myself=
26777 case $0 in #((
26778   *[\\/]* ) as_myself=$0 ;;
26779   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26780 for as_dir in $PATH
26781 do
26782   IFS=$as_save_IFS
26783   test -z "$as_dir" && as_dir=.
26784     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26785   done
26786 IFS=$as_save_IFS
26787
26788      ;;
26789 esac
26790 # We did not find ourselves, most probably we were run as `sh COMMAND'
26791 # in which case we are not to be found in the path.
26792 if test "x$as_myself" = x; then
26793   as_myself=$0
26794 fi
26795 if test ! -f "$as_myself"; then
26796   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
26797   exit 1
26798 fi
26799
26800 # Unset variables that we do not need and which cause bugs (e.g. in
26801 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
26802 # suppresses any "Segmentation fault" message there.  '((' could
26803 # trigger a bug in pdksh 5.2.14.
26804 for as_var in BASH_ENV ENV MAIL MAILPATH
26805 do eval test x\${$as_var+set} = xset \
26806   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
26807 done
26808 PS1='$ '
26809 PS2='> '
26810 PS4='+ '
26811
26812 # NLS nuisances.
26813 LC_ALL=C
26814 export LC_ALL
26815 LANGUAGE=C
26816 export LANGUAGE
26817
26818 # CDPATH.
26819 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
26820
26821
26822 # as_fn_error STATUS ERROR [LINENO LOG_FD]
26823 # ----------------------------------------
26824 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
26825 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
26826 # script with STATUS, using 1 if that was 0.
26827 as_fn_error ()
26828 {
26829   as_status=$1; test $as_status -eq 0 && as_status=1
26830   if test "$4"; then
26831     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
26832     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
26833   fi
26834   $as_echo "$as_me: error: $2" >&2
26835   as_fn_exit $as_status
26836 } # as_fn_error
26837
26838
26839 # as_fn_set_status STATUS
26840 # -----------------------
26841 # Set $? to STATUS, without forking.
26842 as_fn_set_status ()
26843 {
26844   return $1
26845 } # as_fn_set_status
26846
26847 # as_fn_exit STATUS
26848 # -----------------
26849 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
26850 as_fn_exit ()
26851 {
26852   set +e
26853   as_fn_set_status $1
26854   exit $1
26855 } # as_fn_exit
26856
26857 # as_fn_unset VAR
26858 # ---------------
26859 # Portably unset VAR.
26860 as_fn_unset ()
26861 {
26862   { eval $1=; unset $1;}
26863 }
26864 as_unset=as_fn_unset
26865 # as_fn_append VAR VALUE
26866 # ----------------------
26867 # Append the text in VALUE to the end of the definition contained in VAR. Take
26868 # advantage of any shell optimizations that allow amortized linear growth over
26869 # repeated appends, instead of the typical quadratic growth present in naive
26870 # implementations.
26871 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
26872   eval 'as_fn_append ()
26873   {
26874     eval $1+=\$2
26875   }'
26876 else
26877   as_fn_append ()
26878   {
26879     eval $1=\$$1\$2
26880   }
26881 fi # as_fn_append
26882
26883 # as_fn_arith ARG...
26884 # ------------------
26885 # Perform arithmetic evaluation on the ARGs, and store the result in the
26886 # global $as_val. Take advantage of shells that can avoid forks. The arguments
26887 # must be portable across $(()) and expr.
26888 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
26889   eval 'as_fn_arith ()
26890   {
26891     as_val=$(( $* ))
26892   }'
26893 else
26894   as_fn_arith ()
26895   {
26896     as_val=`expr "$@" || test $? -eq 1`
26897   }
26898 fi # as_fn_arith
26899
26900
26901 if expr a : '\(a\)' >/dev/null 2>&1 &&
26902    test "X`expr 00001 : '.*\(...\)'`" = X001; then
26903   as_expr=expr
26904 else
26905   as_expr=false
26906 fi
26907
26908 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26909   as_basename=basename
26910 else
26911   as_basename=false
26912 fi
26913
26914 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26915   as_dirname=dirname
26916 else
26917   as_dirname=false
26918 fi
26919
26920 as_me=`$as_basename -- "$0" ||
26921 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26922          X"$0" : 'X\(//\)$' \| \
26923          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
26924 $as_echo X/"$0" |
26925     sed '/^.*\/\([^/][^/]*\)\/*$/{
26926             s//\1/
26927             q
26928           }
26929           /^X\/\(\/\/\)$/{
26930             s//\1/
26931             q
26932           }
26933           /^X\/\(\/\).*/{
26934             s//\1/
26935             q
26936           }
26937           s/.*/./; q'`
26938
26939 # Avoid depending upon Character Ranges.
26940 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26941 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26942 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26943 as_cr_digits='0123456789'
26944 as_cr_alnum=$as_cr_Letters$as_cr_digits
26945
26946 ECHO_C= ECHO_N= ECHO_T=
26947 case `echo -n x` in #(((((
26948 -n*)
26949   case `echo 'xy\c'` in
26950   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
26951   xy)  ECHO_C='\c';;
26952   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
26953        ECHO_T=' ';;
26954   esac;;
26955 *)
26956   ECHO_N='-n';;
26957 esac
26958
26959 rm -f conf$$ conf$$.exe conf$$.file
26960 if test -d conf$$.dir; then
26961   rm -f conf$$.dir/conf$$.file
26962 else
26963   rm -f conf$$.dir
26964   mkdir conf$$.dir 2>/dev/null
26965 fi
26966 if (echo >conf$$.file) 2>/dev/null; then
26967   if ln -s conf$$.file conf$$ 2>/dev/null; then
26968     as_ln_s='ln -s'
26969     # ... but there are two gotchas:
26970     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26971     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26972     # In both cases, we have to default to `cp -pR'.
26973     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
26974       as_ln_s='cp -pR'
26975   elif ln conf$$.file conf$$ 2>/dev/null; then
26976     as_ln_s=ln
26977   else
26978     as_ln_s='cp -pR'
26979   fi
26980 else
26981   as_ln_s='cp -pR'
26982 fi
26983 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26984 rmdir conf$$.dir 2>/dev/null
26985
26986
26987 # as_fn_mkdir_p
26988 # -------------
26989 # Create "$as_dir" as a directory, including parents if necessary.
26990 as_fn_mkdir_p ()
26991 {
26992
26993   case $as_dir in #(
26994   -*) as_dir=./$as_dir;;
26995   esac
26996   test -d "$as_dir" || eval $as_mkdir_p || {
26997     as_dirs=
26998     while :; do
26999       case $as_dir in #(
27000       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
27001       *) as_qdir=$as_dir;;
27002       esac
27003       as_dirs="'$as_qdir' $as_dirs"
27004       as_dir=`$as_dirname -- "$as_dir" ||
27005 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27006          X"$as_dir" : 'X\(//\)[^/]' \| \
27007          X"$as_dir" : 'X\(//\)$' \| \
27008          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
27009 $as_echo X"$as_dir" |
27010     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27011             s//\1/
27012             q
27013           }
27014           /^X\(\/\/\)[^/].*/{
27015             s//\1/
27016             q
27017           }
27018           /^X\(\/\/\)$/{
27019             s//\1/
27020             q
27021           }
27022           /^X\(\/\).*/{
27023             s//\1/
27024             q
27025           }
27026           s/.*/./; q'`
27027       test -d "$as_dir" && break
27028     done
27029     test -z "$as_dirs" || eval "mkdir $as_dirs"
27030   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
27031
27032
27033 } # as_fn_mkdir_p
27034 if mkdir -p . 2>/dev/null; then
27035   as_mkdir_p='mkdir -p "$as_dir"'
27036 else
27037   test -d ./-p && rmdir ./-p
27038   as_mkdir_p=false
27039 fi
27040
27041
27042 # as_fn_executable_p FILE
27043 # -----------------------
27044 # Test if FILE is an executable regular file.
27045 as_fn_executable_p ()
27046 {
27047   test -f "$1" && test -x "$1"
27048 } # as_fn_executable_p
27049 as_test_x='test -x'
27050 as_executable_p=as_fn_executable_p
27051
27052 # Sed expression to map a string onto a valid CPP name.
27053 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
27054
27055 # Sed expression to map a string onto a valid variable name.
27056 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
27057
27058
27059 exec 6>&1
27060 ## ----------------------------------- ##
27061 ## Main body of $CONFIG_STATUS script. ##
27062 ## ----------------------------------- ##
27063 _ASEOF
27064 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
27065
27066 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27067 # Save the log message, to keep $0 and so on meaningful, and to
27068 # report actual input values of CONFIG_FILES etc. instead of their
27069 # values after options handling.
27070 ac_log="
27071 This file was extended by sntp $as_me 4.2.8p10, which was
27072 generated by GNU Autoconf 2.69.  Invocation command line was
27073
27074   CONFIG_FILES    = $CONFIG_FILES
27075   CONFIG_HEADERS  = $CONFIG_HEADERS
27076   CONFIG_LINKS    = $CONFIG_LINKS
27077   CONFIG_COMMANDS = $CONFIG_COMMANDS
27078   $ $0 $@
27079
27080 on `(hostname || uname -n) 2>/dev/null | sed 1q`
27081 "
27082
27083 _ACEOF
27084
27085 case $ac_config_files in *"
27086 "*) set x $ac_config_files; shift; ac_config_files=$*;;
27087 esac
27088
27089 case $ac_config_headers in *"
27090 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
27091 esac
27092
27093
27094 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27095 # Files that config.status was made for.
27096 config_files="$ac_config_files"
27097 config_headers="$ac_config_headers"
27098 config_commands="$ac_config_commands"
27099
27100 _ACEOF
27101
27102 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27103 ac_cs_usage="\
27104 \`$as_me' instantiates files and other configuration actions
27105 from templates according to the current configuration.  Unless the files
27106 and actions are specified as TAGs, all are instantiated by default.
27107
27108 Usage: $0 [OPTION]... [TAG]...
27109
27110   -h, --help       print this help, then exit
27111   -V, --version    print version number and configuration settings, then exit
27112       --config     print configuration, then exit
27113   -q, --quiet, --silent
27114                    do not print progress messages
27115   -d, --debug      don't remove temporary files
27116       --recheck    update $as_me by reconfiguring in the same conditions
27117       --file=FILE[:TEMPLATE]
27118                    instantiate the configuration file FILE
27119       --header=FILE[:TEMPLATE]
27120                    instantiate the configuration header FILE
27121
27122 Configuration files:
27123 $config_files
27124
27125 Configuration headers:
27126 $config_headers
27127
27128 Configuration commands:
27129 $config_commands
27130
27131 Report bugs to <http://bugs.ntp.org./>.
27132 sntp home page: <http://www.ntp.org./>."
27133
27134 _ACEOF
27135 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27136 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
27137 ac_cs_version="\\
27138 sntp config.status 4.2.8p10
27139 configured by $0, generated by GNU Autoconf 2.69,
27140   with options \\"\$ac_cs_config\\"
27141
27142 Copyright (C) 2012 Free Software Foundation, Inc.
27143 This config.status script is free software; the Free Software Foundation
27144 gives unlimited permission to copy, distribute and modify it."
27145
27146 ac_pwd='$ac_pwd'
27147 srcdir='$srcdir'
27148 INSTALL='$INSTALL'
27149 MKDIR_P='$MKDIR_P'
27150 AWK='$AWK'
27151 test -n "\$AWK" || AWK=awk
27152 _ACEOF
27153
27154 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27155 # The default lists apply if the user does not specify any file.
27156 ac_need_defaults=:
27157 while test $# != 0
27158 do
27159   case $1 in
27160   --*=?*)
27161     ac_option=`expr "X$1" : 'X\([^=]*\)='`
27162     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
27163     ac_shift=:
27164     ;;
27165   --*=)
27166     ac_option=`expr "X$1" : 'X\([^=]*\)='`
27167     ac_optarg=
27168     ac_shift=:
27169     ;;
27170   *)
27171     ac_option=$1
27172     ac_optarg=$2
27173     ac_shift=shift
27174     ;;
27175   esac
27176
27177   case $ac_option in
27178   # Handling of the options.
27179   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27180     ac_cs_recheck=: ;;
27181   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
27182     $as_echo "$ac_cs_version"; exit ;;
27183   --config | --confi | --conf | --con | --co | --c )
27184     $as_echo "$ac_cs_config"; exit ;;
27185   --debug | --debu | --deb | --de | --d | -d )
27186     debug=: ;;
27187   --file | --fil | --fi | --f )
27188     $ac_shift
27189     case $ac_optarg in
27190     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27191     '') as_fn_error $? "missing file argument" ;;
27192     esac
27193     as_fn_append CONFIG_FILES " '$ac_optarg'"
27194     ac_need_defaults=false;;
27195   --header | --heade | --head | --hea )
27196     $ac_shift
27197     case $ac_optarg in
27198     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27199     esac
27200     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
27201     ac_need_defaults=false;;
27202   --he | --h)
27203     # Conflict between --help and --header
27204     as_fn_error $? "ambiguous option: \`$1'
27205 Try \`$0 --help' for more information.";;
27206   --help | --hel | -h )
27207     $as_echo "$ac_cs_usage"; exit ;;
27208   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27209   | -silent | --silent | --silen | --sile | --sil | --si | --s)
27210     ac_cs_silent=: ;;
27211
27212   # This is an error.
27213   -*) as_fn_error $? "unrecognized option: \`$1'
27214 Try \`$0 --help' for more information." ;;
27215
27216   *) as_fn_append ac_config_targets " $1"
27217      ac_need_defaults=false ;;
27218
27219   esac
27220   shift
27221 done
27222
27223 ac_configure_extra_args=
27224
27225 if $ac_cs_silent; then
27226   exec 6>/dev/null
27227   ac_configure_extra_args="$ac_configure_extra_args --silent"
27228 fi
27229
27230 _ACEOF
27231 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27232 if \$ac_cs_recheck; then
27233   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
27234   shift
27235   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
27236   CONFIG_SHELL='$SHELL'
27237   export CONFIG_SHELL
27238   exec "\$@"
27239 fi
27240
27241 _ACEOF
27242 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27243 exec 5>>config.log
27244 {
27245   echo
27246   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27247 ## Running $as_me. ##
27248 _ASBOX
27249   $as_echo "$ac_log"
27250 } >&5
27251
27252 _ACEOF
27253 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27254 #
27255 # INIT-COMMANDS
27256 #
27257 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
27258
27259
27260 # The HP-UX ksh and POSIX shell print the target directory to stdout
27261 # if CDPATH is set.
27262 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
27263
27264 sed_quote_subst='$sed_quote_subst'
27265 double_quote_subst='$double_quote_subst'
27266 delay_variable_subst='$delay_variable_subst'
27267 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
27268 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
27269 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
27270 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
27271 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
27272 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
27273 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
27274 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
27275 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
27276 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
27277 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
27278 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
27279 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
27280 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
27281 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
27282 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
27283 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
27284 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
27285 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
27286 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
27287 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
27288 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
27289 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
27290 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
27291 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
27292 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
27293 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
27294 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
27295 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
27296 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
27297 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
27298 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
27299 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
27300 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
27301 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
27302 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
27303 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
27304 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
27305 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
27306 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
27307 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
27308 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
27309 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
27310 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
27311 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
27312 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
27313 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
27314 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
27315 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
27316 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
27317 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
27318 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
27319 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
27320 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
27321 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
27322 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
27323 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
27324 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
27325 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
27326 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
27327 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
27328 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
27329 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
27330 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
27331 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
27332 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
27333 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
27334 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
27335 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
27336 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
27337 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
27338 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
27339 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
27340 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
27341 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
27342 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
27343 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
27344 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
27345 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
27346 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
27347 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
27348 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
27349 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
27350 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
27351 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
27352 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
27353 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
27354 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
27355 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
27356 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
27357 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
27358 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
27359 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
27360 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
27361 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
27362 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
27363 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
27364 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
27365 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
27366 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
27367 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
27368 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
27369 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
27370 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
27371 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
27372 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
27373 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
27374 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
27375 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
27376 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
27377 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
27378 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
27379 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
27380 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
27381 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
27382 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
27383 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
27384 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
27385 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
27386 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
27387 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
27388 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
27389 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
27390 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
27391 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
27392 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
27393 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
27394 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
27395 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
27396 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
27397 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
27398 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
27399 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
27400 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
27401 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
27402
27403 LTCC='$LTCC'
27404 LTCFLAGS='$LTCFLAGS'
27405 compiler='$compiler_DEFAULT'
27406
27407 # A function that is used when there is no print builtin or printf.
27408 func_fallback_echo ()
27409 {
27410   eval 'cat <<_LTECHO_EOF
27411 \$1
27412 _LTECHO_EOF'
27413 }
27414
27415 # Quote evaled strings.
27416 for var in SED \
27417 GREP \
27418 EGREP \
27419 FGREP \
27420 SHELL \
27421 ECHO \
27422 LD \
27423 PATH_SEPARATOR \
27424 NM \
27425 LN_S \
27426 lt_SP2NL \
27427 lt_NL2SP \
27428 reload_flag \
27429 OBJDUMP \
27430 deplibs_check_method \
27431 file_magic_cmd \
27432 file_magic_glob \
27433 want_nocaseglob \
27434 DLLTOOL \
27435 sharedlib_from_linklib_cmd \
27436 AR \
27437 AR_FLAGS \
27438 archiver_list_spec \
27439 STRIP \
27440 RANLIB \
27441 CC \
27442 CFLAGS \
27443 compiler \
27444 lt_cv_sys_global_symbol_pipe \
27445 lt_cv_sys_global_symbol_to_cdecl \
27446 lt_cv_sys_global_symbol_to_import \
27447 lt_cv_sys_global_symbol_to_c_name_address \
27448 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
27449 lt_cv_nm_interface \
27450 nm_file_list_spec \
27451 lt_cv_truncate_bin \
27452 lt_prog_compiler_no_builtin_flag \
27453 lt_prog_compiler_pic \
27454 lt_prog_compiler_wl \
27455 lt_prog_compiler_static \
27456 lt_cv_prog_compiler_c_o \
27457 need_locks \
27458 MANIFEST_TOOL \
27459 DSYMUTIL \
27460 NMEDIT \
27461 LIPO \
27462 OTOOL \
27463 OTOOL64 \
27464 shrext_cmds \
27465 export_dynamic_flag_spec \
27466 whole_archive_flag_spec \
27467 compiler_needs_object \
27468 with_gnu_ld \
27469 allow_undefined_flag \
27470 no_undefined_flag \
27471 hardcode_libdir_flag_spec \
27472 hardcode_libdir_separator \
27473 exclude_expsyms \
27474 include_expsyms \
27475 file_list_spec \
27476 variables_saved_for_relink \
27477 libname_spec \
27478 library_names_spec \
27479 soname_spec \
27480 install_override_mode \
27481 finish_eval \
27482 old_striplib \
27483 striplib; do
27484     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
27485     *[\\\\\\\`\\"\\\$]*)
27486       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
27487       ;;
27488     *)
27489       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
27490       ;;
27491     esac
27492 done
27493
27494 # Double-quote double-evaled strings.
27495 for var in reload_cmds \
27496 old_postinstall_cmds \
27497 old_postuninstall_cmds \
27498 old_archive_cmds \
27499 extract_expsyms_cmds \
27500 old_archive_from_new_cmds \
27501 old_archive_from_expsyms_cmds \
27502 archive_cmds \
27503 archive_expsym_cmds \
27504 module_cmds \
27505 module_expsym_cmds \
27506 export_symbols_cmds \
27507 prelink_cmds \
27508 postlink_cmds \
27509 postinstall_cmds \
27510 postuninstall_cmds \
27511 finish_cmds \
27512 sys_lib_search_path_spec \
27513 configure_time_dlsearch_path \
27514 configure_time_lt_sys_library_path; do
27515     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
27516     *[\\\\\\\`\\"\\\$]*)
27517       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
27518       ;;
27519     *)
27520       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
27521       ;;
27522     esac
27523 done
27524
27525 ac_aux_dir='$ac_aux_dir'
27526
27527 # See if we are running on zsh, and set the options that allow our
27528 # commands through without removal of \ escapes INIT.
27529 if test -n "\${ZSH_VERSION+set}"; then
27530    setopt NO_GLOB_SUBST
27531 fi
27532
27533
27534     PACKAGE='$PACKAGE'
27535     VERSION='$VERSION'
27536     RM='$RM'
27537     ofile='$ofile'
27538
27539
27540
27541
27542 _ACEOF
27543
27544 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27545
27546 # Handling of arguments.
27547 for ac_config_target in $ac_config_targets
27548 do
27549   case $ac_config_target in
27550     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
27551     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
27552     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
27553     "libopts/Makefile") CONFIG_FILES="$CONFIG_FILES libopts/Makefile" ;;
27554     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27555     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
27556     "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
27557     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
27558     "tests/fileHandlingTest.h") CONFIG_FILES="$CONFIG_FILES tests/fileHandlingTest.h" ;;
27559     "unity/Makefile") CONFIG_FILES="$CONFIG_FILES unity/Makefile" ;;
27560
27561   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
27562   esac
27563 done
27564
27565
27566 # If the user did not use the arguments to specify the items to instantiate,
27567 # then the envvar interface is used.  Set only those that are not.
27568 # We use the long form for the default assignment because of an extremely
27569 # bizarre bug on SunOS 4.1.3.
27570 if $ac_need_defaults; then
27571   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27572   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27573   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27574 fi
27575
27576 # Have a temporary directory for convenience.  Make it in the build tree
27577 # simply because there is no reason against having it here, and in addition,
27578 # creating and moving files from /tmp can sometimes cause problems.
27579 # Hook for its removal unless debugging.
27580 # Note that there is a small window in which the directory will not be cleaned:
27581 # after its creation but before its name has been assigned to `$tmp'.
27582 $debug ||
27583 {
27584   tmp= ac_tmp=
27585   trap 'exit_status=$?
27586   : "${ac_tmp:=$tmp}"
27587   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
27588 ' 0
27589   trap 'as_fn_exit 1' 1 2 13 15
27590 }
27591 # Create a (secure) tmp directory for tmp files.
27592
27593 {
27594   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
27595   test -d "$tmp"
27596 }  ||
27597 {
27598   tmp=./conf$$-$RANDOM
27599   (umask 077 && mkdir "$tmp")
27600 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
27601 ac_tmp=$tmp
27602
27603 # Set up the scripts for CONFIG_FILES section.
27604 # No need to generate them if there are no CONFIG_FILES.
27605 # This happens for instance with `./config.status config.h'.
27606 if test -n "$CONFIG_FILES"; then
27607
27608
27609 ac_cr=`echo X | tr X '\015'`
27610 # On cygwin, bash can eat \r inside `` if the user requested igncr.
27611 # But we know of no other shell where ac_cr would be empty at this
27612 # point, so we can use a bashism as a fallback.
27613 if test "x$ac_cr" = x; then
27614   eval ac_cr=\$\'\\r\'
27615 fi
27616 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
27617 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
27618   ac_cs_awk_cr='\\r'
27619 else
27620   ac_cs_awk_cr=$ac_cr
27621 fi
27622
27623 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
27624 _ACEOF
27625
27626
27627 {
27628   echo "cat >conf$$subs.awk <<_ACEOF" &&
27629   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
27630   echo "_ACEOF"
27631 } >conf$$subs.sh ||
27632   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27633 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
27634 ac_delim='%!_!# '
27635 for ac_last_try in false false false false false :; do
27636   . ./conf$$subs.sh ||
27637     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27638
27639   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
27640   if test $ac_delim_n = $ac_delim_num; then
27641     break
27642   elif $ac_last_try; then
27643     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27644   else
27645     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27646   fi
27647 done
27648 rm -f conf$$subs.sh
27649
27650 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27651 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
27652 _ACEOF
27653 sed -n '
27654 h
27655 s/^/S["/; s/!.*/"]=/
27656 p
27657 g
27658 s/^[^!]*!//
27659 :repl
27660 t repl
27661 s/'"$ac_delim"'$//
27662 t delim
27663 :nl
27664 h
27665 s/\(.\{148\}\)..*/\1/
27666 t more1
27667 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
27668 p
27669 n
27670 b repl
27671 :more1
27672 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27673 p
27674 g
27675 s/.\{148\}//
27676 t nl
27677 :delim
27678 h
27679 s/\(.\{148\}\)..*/\1/
27680 t more2
27681 s/["\\]/\\&/g; s/^/"/; s/$/"/
27682 p
27683 b
27684 :more2
27685 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27686 p
27687 g
27688 s/.\{148\}//
27689 t delim
27690 ' <conf$$subs.awk | sed '
27691 /^[^""]/{
27692   N
27693   s/\n//
27694 }
27695 ' >>$CONFIG_STATUS || ac_write_fail=1
27696 rm -f conf$$subs.awk
27697 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27698 _ACAWK
27699 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
27700   for (key in S) S_is_set[key] = 1
27701   FS = "\a"
27702
27703 }
27704 {
27705   line = $ 0
27706   nfields = split(line, field, "@")
27707   substed = 0
27708   len = length(field[1])
27709   for (i = 2; i < nfields; i++) {
27710     key = field[i]
27711     keylen = length(key)
27712     if (S_is_set[key]) {
27713       value = S[key]
27714       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
27715       len += length(value) + length(field[++i])
27716       substed = 1
27717     } else
27718       len += 1 + keylen
27719   }
27720
27721   print line
27722 }
27723
27724 _ACAWK
27725 _ACEOF
27726 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27727 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
27728   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
27729 else
27730   cat
27731 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
27732   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
27733 _ACEOF
27734
27735 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
27736 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
27737 # trailing colons and then remove the whole line if VPATH becomes empty
27738 # (actually we leave an empty line to preserve line numbers).
27739 if test "x$srcdir" = x.; then
27740   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
27741 h
27742 s///
27743 s/^/:/
27744 s/[      ]*$/:/
27745 s/:\$(srcdir):/:/g
27746 s/:\${srcdir}:/:/g
27747 s/:@srcdir@:/:/g
27748 s/^:*//
27749 s/:*$//
27750 x
27751 s/\(=[   ]*\).*/\1/
27752 G
27753 s/\n//
27754 s/^[^=]*=[       ]*$//
27755 }'
27756 fi
27757
27758 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27759 fi # test -n "$CONFIG_FILES"
27760
27761 # Set up the scripts for CONFIG_HEADERS section.
27762 # No need to generate them if there are no CONFIG_HEADERS.
27763 # This happens for instance with `./config.status Makefile'.
27764 if test -n "$CONFIG_HEADERS"; then
27765 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
27766 BEGIN {
27767 _ACEOF
27768
27769 # Transform confdefs.h into an awk script `defines.awk', embedded as
27770 # here-document in config.status, that substitutes the proper values into
27771 # config.h.in to produce config.h.
27772
27773 # Create a delimiter string that does not exist in confdefs.h, to ease
27774 # handling of long lines.
27775 ac_delim='%!_!# '
27776 for ac_last_try in false false :; do
27777   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
27778   if test -z "$ac_tt"; then
27779     break
27780   elif $ac_last_try; then
27781     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
27782   else
27783     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27784   fi
27785 done
27786
27787 # For the awk script, D is an array of macro values keyed by name,
27788 # likewise P contains macro parameters if any.  Preserve backslash
27789 # newline sequences.
27790
27791 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27792 sed -n '
27793 s/.\{148\}/&'"$ac_delim"'/g
27794 t rset
27795 :rset
27796 s/^[     ]*#[    ]*define[       ][      ]*/ /
27797 t def
27798 d
27799 :def
27800 s/\\$//
27801 t bsnl
27802 s/["\\]/\\&/g
27803 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
27804 D["\1"]=" \3"/p
27805 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
27806 d
27807 :bsnl
27808 s/["\\]/\\&/g
27809 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
27810 D["\1"]=" \3\\\\\\n"\\/p
27811 t cont
27812 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
27813 t cont
27814 d
27815 :cont
27816 n
27817 s/.\{148\}/&'"$ac_delim"'/g
27818 t clear
27819 :clear
27820 s/\\$//
27821 t bsnlc
27822 s/["\\]/\\&/g; s/^/"/; s/$/"/p
27823 d
27824 :bsnlc
27825 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
27826 b cont
27827 ' <confdefs.h | sed '
27828 s/'"$ac_delim"'/"\\\
27829 "/g' >>$CONFIG_STATUS || ac_write_fail=1
27830
27831 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27832   for (key in D) D_is_set[key] = 1
27833   FS = "\a"
27834 }
27835 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
27836   line = \$ 0
27837   split(line, arg, " ")
27838   if (arg[1] == "#") {
27839     defundef = arg[2]
27840     mac1 = arg[3]
27841   } else {
27842     defundef = substr(arg[1], 2)
27843     mac1 = arg[2]
27844   }
27845   split(mac1, mac2, "(") #)
27846   macro = mac2[1]
27847   prefix = substr(line, 1, index(line, defundef) - 1)
27848   if (D_is_set[macro]) {
27849     # Preserve the white space surrounding the "#".
27850     print prefix "define", macro P[macro] D[macro]
27851     next
27852   } else {
27853     # Replace #undef with comments.  This is necessary, for example,
27854     # in the case of _POSIX_SOURCE, which is predefined and required
27855     # on some systems where configure will not decide to define it.
27856     if (defundef == "undef") {
27857       print "/*", prefix defundef, macro, "*/"
27858       next
27859     }
27860   }
27861 }
27862 { print }
27863 _ACAWK
27864 _ACEOF
27865 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27866   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
27867 fi # test -n "$CONFIG_HEADERS"
27868
27869
27870 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
27871 shift
27872 for ac_tag
27873 do
27874   case $ac_tag in
27875   :[FHLC]) ac_mode=$ac_tag; continue;;
27876   esac
27877   case $ac_mode$ac_tag in
27878   :[FHL]*:*);;
27879   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
27880   :[FH]-) ac_tag=-:-;;
27881   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27882   esac
27883   ac_save_IFS=$IFS
27884   IFS=:
27885   set x $ac_tag
27886   IFS=$ac_save_IFS
27887   shift
27888   ac_file=$1
27889   shift
27890
27891   case $ac_mode in
27892   :L) ac_source=$1;;
27893   :[FH])
27894     ac_file_inputs=
27895     for ac_f
27896     do
27897       case $ac_f in
27898       -) ac_f="$ac_tmp/stdin";;
27899       *) # Look for the file first in the build tree, then in the source tree
27900          # (if the path is not absolute).  The absolute path cannot be DOS-style,
27901          # because $ac_f cannot contain `:'.
27902          test -f "$ac_f" ||
27903            case $ac_f in
27904            [\\/$]*) false;;
27905            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27906            esac ||
27907            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
27908       esac
27909       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
27910       as_fn_append ac_file_inputs " '$ac_f'"
27911     done
27912
27913     # Let's still pretend it is `configure' which instantiates (i.e., don't
27914     # use $as_me), people would be surprised to read:
27915     #    /* config.h.  Generated by config.status.  */
27916     configure_input='Generated from '`
27917           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
27918         `' by configure.'
27919     if test x"$ac_file" != x-; then
27920       configure_input="$ac_file.  $configure_input"
27921       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
27922 $as_echo "$as_me: creating $ac_file" >&6;}
27923     fi
27924     # Neutralize special characters interpreted by sed in replacement strings.
27925     case $configure_input in #(
27926     *\&* | *\|* | *\\* )
27927        ac_sed_conf_input=`$as_echo "$configure_input" |
27928        sed 's/[\\\\&|]/\\\\&/g'`;; #(
27929     *) ac_sed_conf_input=$configure_input;;
27930     esac
27931
27932     case $ac_tag in
27933     *:-:* | *:-) cat >"$ac_tmp/stdin" \
27934       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
27935     esac
27936     ;;
27937   esac
27938
27939   ac_dir=`$as_dirname -- "$ac_file" ||
27940 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27941          X"$ac_file" : 'X\(//\)[^/]' \| \
27942          X"$ac_file" : 'X\(//\)$' \| \
27943          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
27944 $as_echo X"$ac_file" |
27945     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27946             s//\1/
27947             q
27948           }
27949           /^X\(\/\/\)[^/].*/{
27950             s//\1/
27951             q
27952           }
27953           /^X\(\/\/\)$/{
27954             s//\1/
27955             q
27956           }
27957           /^X\(\/\).*/{
27958             s//\1/
27959             q
27960           }
27961           s/.*/./; q'`
27962   as_dir="$ac_dir"; as_fn_mkdir_p
27963   ac_builddir=.
27964
27965 case "$ac_dir" in
27966 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27967 *)
27968   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
27969   # A ".." for each directory in $ac_dir_suffix.
27970   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
27971   case $ac_top_builddir_sub in
27972   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27973   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27974   esac ;;
27975 esac
27976 ac_abs_top_builddir=$ac_pwd
27977 ac_abs_builddir=$ac_pwd$ac_dir_suffix
27978 # for backward compatibility:
27979 ac_top_builddir=$ac_top_build_prefix
27980
27981 case $srcdir in
27982   .)  # We are building in place.
27983     ac_srcdir=.
27984     ac_top_srcdir=$ac_top_builddir_sub
27985     ac_abs_top_srcdir=$ac_pwd ;;
27986   [\\/]* | ?:[\\/]* )  # Absolute name.
27987     ac_srcdir=$srcdir$ac_dir_suffix;
27988     ac_top_srcdir=$srcdir
27989     ac_abs_top_srcdir=$srcdir ;;
27990   *) # Relative name.
27991     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27992     ac_top_srcdir=$ac_top_build_prefix$srcdir
27993     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
27994 esac
27995 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
27996
27997
27998   case $ac_mode in
27999   :F)
28000   #
28001   # CONFIG_FILE
28002   #
28003
28004   case $INSTALL in
28005   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
28006   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
28007   esac
28008   ac_MKDIR_P=$MKDIR_P
28009   case $MKDIR_P in
28010   [\\/$]* | ?:[\\/]* ) ;;
28011   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
28012   esac
28013 _ACEOF
28014
28015 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28016 # If the template does not know about datarootdir, expand it.
28017 # FIXME: This hack should be removed a few years after 2.60.
28018 ac_datarootdir_hack=; ac_datarootdir_seen=
28019 ac_sed_dataroot='
28020 /datarootdir/ {
28021   p
28022   q
28023 }
28024 /@datadir@/p
28025 /@docdir@/p
28026 /@infodir@/p
28027 /@localedir@/p
28028 /@mandir@/p'
28029 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
28030 *datarootdir*) ac_datarootdir_seen=yes;;
28031 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
28032   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28033 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
28034 _ACEOF
28035 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28036   ac_datarootdir_hack='
28037   s&@datadir@&$datadir&g
28038   s&@docdir@&$docdir&g
28039   s&@infodir@&$infodir&g
28040   s&@localedir@&$localedir&g
28041   s&@mandir@&$mandir&g
28042   s&\\\${datarootdir}&$datarootdir&g' ;;
28043 esac
28044 _ACEOF
28045
28046 # Neutralize VPATH when `$srcdir' = `.'.
28047 # Shell code in configure.ac might set extrasub.
28048 # FIXME: do we really want to maintain this feature?
28049 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28050 ac_sed_extra="$ac_vpsub
28051 $extrasub
28052 _ACEOF
28053 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28054 :t
28055 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
28056 s|@configure_input@|$ac_sed_conf_input|;t t
28057 s&@top_builddir@&$ac_top_builddir_sub&;t t
28058 s&@top_build_prefix@&$ac_top_build_prefix&;t t
28059 s&@srcdir@&$ac_srcdir&;t t
28060 s&@abs_srcdir@&$ac_abs_srcdir&;t t
28061 s&@top_srcdir@&$ac_top_srcdir&;t t
28062 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28063 s&@builddir@&$ac_builddir&;t t
28064 s&@abs_builddir@&$ac_abs_builddir&;t t
28065 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28066 s&@INSTALL@&$ac_INSTALL&;t t
28067 s&@MKDIR_P@&$ac_MKDIR_P&;t t
28068 $ac_datarootdir_hack
28069 "
28070 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
28071   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
28072
28073 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28074   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
28075   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
28076       "$ac_tmp/out"`; test -z "$ac_out"; } &&
28077   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
28078 which seems to be undefined.  Please make sure it is defined" >&5
28079 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
28080 which seems to be undefined.  Please make sure it is defined" >&2;}
28081
28082   rm -f "$ac_tmp/stdin"
28083   case $ac_file in
28084   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
28085   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
28086   esac \
28087   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
28088  ;;
28089   :H)
28090   #
28091   # CONFIG_HEADER
28092   #
28093   if test x"$ac_file" != x-; then
28094     {
28095       $as_echo "/* $configure_input  */" \
28096       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
28097     } >"$ac_tmp/config.h" \
28098       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
28099     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
28100       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
28101 $as_echo "$as_me: $ac_file is unchanged" >&6;}
28102     else
28103       rm -f "$ac_file"
28104       mv "$ac_tmp/config.h" "$ac_file" \
28105         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
28106     fi
28107   else
28108     $as_echo "/* $configure_input  */" \
28109       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
28110       || as_fn_error $? "could not create -" "$LINENO" 5
28111   fi
28112 # Compute "$ac_file"'s index in $config_headers.
28113 _am_arg="$ac_file"
28114 _am_stamp_count=1
28115 for _am_header in $config_headers :; do
28116   case $_am_header in
28117     $_am_arg | $_am_arg:* )
28118       break ;;
28119     * )
28120       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
28121   esac
28122 done
28123 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
28124 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28125          X"$_am_arg" : 'X\(//\)[^/]' \| \
28126          X"$_am_arg" : 'X\(//\)$' \| \
28127          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
28128 $as_echo X"$_am_arg" |
28129     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28130             s//\1/
28131             q
28132           }
28133           /^X\(\/\/\)[^/].*/{
28134             s//\1/
28135             q
28136           }
28137           /^X\(\/\/\)$/{
28138             s//\1/
28139             q
28140           }
28141           /^X\(\/\).*/{
28142             s//\1/
28143             q
28144           }
28145           s/.*/./; q'`/stamp-h$_am_stamp_count
28146  ;;
28147
28148   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
28149 $as_echo "$as_me: executing $ac_file commands" >&6;}
28150  ;;
28151   esac
28152
28153
28154   case $ac_file$ac_mode in
28155     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
28156   # Older Autoconf quotes --file arguments for eval, but not when files
28157   # are listed without --file.  Let's play safe and only enable the eval
28158   # if we detect the quoting.
28159   case $CONFIG_FILES in
28160   *\'*) eval set x "$CONFIG_FILES" ;;
28161   *)   set x $CONFIG_FILES ;;
28162   esac
28163   shift
28164   for mf
28165   do
28166     # Strip MF so we end up with the name of the file.
28167     mf=`echo "$mf" | sed -e 's/:.*$//'`
28168     # Check whether this is an Automake generated Makefile or not.
28169     # We used to match only the files named 'Makefile.in', but
28170     # some people rename them; so instead we look at the file content.
28171     # Grep'ing the first line is not enough: some people post-process
28172     # each Makefile.in and add a new line on top of each file to say so.
28173     # Grep'ing the whole file is not good either: AIX grep has a line
28174     # limit of 2048, but all sed's we know have understand at least 4000.
28175     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
28176       dirpart=`$as_dirname -- "$mf" ||
28177 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28178          X"$mf" : 'X\(//\)[^/]' \| \
28179          X"$mf" : 'X\(//\)$' \| \
28180          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
28181 $as_echo X"$mf" |
28182     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28183             s//\1/
28184             q
28185           }
28186           /^X\(\/\/\)[^/].*/{
28187             s//\1/
28188             q
28189           }
28190           /^X\(\/\/\)$/{
28191             s//\1/
28192             q
28193           }
28194           /^X\(\/\).*/{
28195             s//\1/
28196             q
28197           }
28198           s/.*/./; q'`
28199     else
28200       continue
28201     fi
28202     # Extract the definition of DEPDIR, am__include, and am__quote
28203     # from the Makefile without running 'make'.
28204     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
28205     test -z "$DEPDIR" && continue
28206     am__include=`sed -n 's/^am__include = //p' < "$mf"`
28207     test -z "$am__include" && continue
28208     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
28209     # Find all dependency output files, they are included files with
28210     # $(DEPDIR) in their names.  We invoke sed twice because it is the
28211     # simplest approach to changing $(DEPDIR) to its actual value in the
28212     # expansion.
28213     for file in `sed -n "
28214       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
28215          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
28216       # Make sure the directory exists.
28217       test -f "$dirpart/$file" && continue
28218       fdir=`$as_dirname -- "$file" ||
28219 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28220          X"$file" : 'X\(//\)[^/]' \| \
28221          X"$file" : 'X\(//\)$' \| \
28222          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
28223 $as_echo X"$file" |
28224     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28225             s//\1/
28226             q
28227           }
28228           /^X\(\/\/\)[^/].*/{
28229             s//\1/
28230             q
28231           }
28232           /^X\(\/\/\)$/{
28233             s//\1/
28234             q
28235           }
28236           /^X\(\/\).*/{
28237             s//\1/
28238             q
28239           }
28240           s/.*/./; q'`
28241       as_dir=$dirpart/$fdir; as_fn_mkdir_p
28242       # echo "creating $dirpart/$file"
28243       echo '# dummy' > "$dirpart/$file"
28244     done
28245   done
28246 }
28247  ;;
28248     "libtool":C)
28249
28250     # See if we are running on zsh, and set the options that allow our
28251     # commands through without removal of \ escapes.
28252     if test -n "${ZSH_VERSION+set}"; then
28253       setopt NO_GLOB_SUBST
28254     fi
28255
28256     cfgfile=${ofile}T
28257     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
28258     $RM "$cfgfile"
28259
28260     cat <<_LT_EOF >> "$cfgfile"
28261 #! $SHELL
28262 # Generated automatically by $as_me ($PACKAGE) $VERSION
28263 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
28264 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
28265
28266 # Provide generalized library-building support services.
28267 # Written by Gordon Matzigkeit, 1996
28268
28269 # Copyright (C) 2014 Free Software Foundation, Inc.
28270 # This is free software; see the source for copying conditions.  There is NO
28271 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28272
28273 # GNU Libtool is free software; you can redistribute it and/or modify
28274 # it under the terms of the GNU General Public License as published by
28275 # the Free Software Foundation; either version 2 of of the License, or
28276 # (at your option) any later version.
28277 #
28278 # As a special exception to the GNU General Public License, if you
28279 # distribute this file as part of a program or library that is built
28280 # using GNU Libtool, you may include this file under the  same
28281 # distribution terms that you use for the rest of that program.
28282 #
28283 # GNU Libtool is distributed in the hope that it will be useful, but
28284 # WITHOUT ANY WARRANTY; without even the implied warranty of
28285 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28286 # GNU General Public License for more details.
28287 #
28288 # You should have received a copy of the GNU General Public License
28289 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
28290
28291
28292 # The names of the tagged configurations supported by this script.
28293 available_tags=''
28294
28295 # Configured defaults for sys_lib_dlsearch_path munging.
28296 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
28297
28298 # ### BEGIN LIBTOOL CONFIG
28299
28300 # A sed program that does not truncate output.
28301 SED=$lt_SED
28302
28303 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
28304 Xsed="\$SED -e 1s/^X//"
28305
28306 # A grep program that handles long lines.
28307 GREP=$lt_GREP
28308
28309 # An ERE matcher.
28310 EGREP=$lt_EGREP
28311
28312 # A literal string matcher.
28313 FGREP=$lt_FGREP
28314
28315 # Shell to use when invoking shell scripts.
28316 SHELL=$lt_SHELL
28317
28318 # An echo program that protects backslashes.
28319 ECHO=$lt_ECHO
28320
28321 # Whether or not to build shared libraries.
28322 build_libtool_libs=$enable_shared
28323
28324 # Which release of libtool.m4 was used?
28325 macro_version=$macro_version
28326 macro_revision=$macro_revision
28327
28328 # Whether or not to build static libraries.
28329 build_old_libs=$enable_static
28330
28331 # What type of objects to build.
28332 pic_mode=$pic_mode
28333
28334 # Whether or not to optimize for fast installation.
28335 fast_install=$enable_fast_install
28336
28337 # Shared archive member basename,for filename based shared library versioning on AIX.
28338 shared_archive_member_spec=$shared_archive_member_spec
28339
28340 # The PATH separator for the build system.
28341 PATH_SEPARATOR=$lt_PATH_SEPARATOR
28342
28343 # The host system.
28344 host_alias=$host_alias
28345 host=$host
28346 host_os=$host_os
28347
28348 # The build system.
28349 build_alias=$build_alias
28350 build=$build
28351 build_os=$build_os
28352
28353 # A BSD- or MS-compatible name lister.
28354 NM=$lt_NM
28355
28356 # Whether we need soft or hard links.
28357 LN_S=$lt_LN_S
28358
28359 # What is the maximum length of a command?
28360 max_cmd_len=$max_cmd_len
28361
28362 # Object file suffix (normally "o").
28363 objext=$ac_objext
28364
28365 # Executable file suffix (normally "").
28366 exeext=$exeext
28367
28368 # whether the shell understands "unset".
28369 lt_unset=$lt_unset
28370
28371 # turn spaces into newlines.
28372 SP2NL=$lt_lt_SP2NL
28373
28374 # turn newlines into spaces.
28375 NL2SP=$lt_lt_NL2SP
28376
28377 # convert \$build file names to \$host format.
28378 to_host_file_cmd=$lt_cv_to_host_file_cmd
28379
28380 # convert \$build files to toolchain format.
28381 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
28382
28383 # An object symbol dumper.
28384 OBJDUMP=$lt_OBJDUMP
28385
28386 # Method to check whether dependent libraries are shared objects.
28387 deplibs_check_method=$lt_deplibs_check_method
28388
28389 # Command to use when deplibs_check_method = "file_magic".
28390 file_magic_cmd=$lt_file_magic_cmd
28391
28392 # How to find potential files when deplibs_check_method = "file_magic".
28393 file_magic_glob=$lt_file_magic_glob
28394
28395 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
28396 want_nocaseglob=$lt_want_nocaseglob
28397
28398 # DLL creation program.
28399 DLLTOOL=$lt_DLLTOOL
28400
28401 # Command to associate shared and link libraries.
28402 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
28403
28404 # The archiver.
28405 AR=$lt_AR
28406
28407 # Flags to create an archive.
28408 AR_FLAGS=$lt_AR_FLAGS
28409
28410 # How to feed a file listing to the archiver.
28411 archiver_list_spec=$lt_archiver_list_spec
28412
28413 # A symbol stripping program.
28414 STRIP=$lt_STRIP
28415
28416 # Commands used to install an old-style archive.
28417 RANLIB=$lt_RANLIB
28418 old_postinstall_cmds=$lt_old_postinstall_cmds
28419 old_postuninstall_cmds=$lt_old_postuninstall_cmds
28420
28421 # Whether to use a lock for old archive extraction.
28422 lock_old_archive_extraction=$lock_old_archive_extraction
28423
28424 # A C compiler.
28425 LTCC=$lt_CC
28426
28427 # LTCC compiler flags.
28428 LTCFLAGS=$lt_CFLAGS
28429
28430 # Take the output of nm and produce a listing of raw symbols and C names.
28431 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
28432
28433 # Transform the output of nm in a proper C declaration.
28434 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
28435
28436 # Transform the output of nm into a list of symbols to manually relocate.
28437 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
28438
28439 # Transform the output of nm in a C name address pair.
28440 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
28441
28442 # Transform the output of nm in a C name address pair when lib prefix is needed.
28443 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
28444
28445 # The name lister interface.
28446 nm_interface=$lt_lt_cv_nm_interface
28447
28448 # Specify filename containing input files for \$NM.
28449 nm_file_list_spec=$lt_nm_file_list_spec
28450
28451 # The root where to search for dependent libraries,and where our libraries should be installed.
28452 lt_sysroot=$lt_sysroot
28453
28454 # Command to truncate a binary pipe.
28455 lt_truncate_bin=$lt_lt_cv_truncate_bin
28456
28457 # The name of the directory that contains temporary libtool files.
28458 objdir=$objdir
28459
28460 # Used to examine libraries when file_magic_cmd begins with "file".
28461 MAGIC_CMD=$MAGIC_CMD
28462
28463 # Must we lock files when doing compilation?
28464 need_locks=$lt_need_locks
28465
28466 # Manifest tool.
28467 MANIFEST_TOOL=$lt_MANIFEST_TOOL
28468
28469 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
28470 DSYMUTIL=$lt_DSYMUTIL
28471
28472 # Tool to change global to local symbols on Mac OS X.
28473 NMEDIT=$lt_NMEDIT
28474
28475 # Tool to manipulate fat objects and archives on Mac OS X.
28476 LIPO=$lt_LIPO
28477
28478 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
28479 OTOOL=$lt_OTOOL
28480
28481 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
28482 OTOOL64=$lt_OTOOL64
28483
28484 # Old archive suffix (normally "a").
28485 libext=$libext
28486
28487 # Shared library suffix (normally ".so").
28488 shrext_cmds=$lt_shrext_cmds
28489
28490 # The commands to extract the exported symbol list from a shared archive.
28491 extract_expsyms_cmds=$lt_extract_expsyms_cmds
28492
28493 # Variables whose values should be saved in libtool wrapper scripts and
28494 # restored at link time.
28495 variables_saved_for_relink=$lt_variables_saved_for_relink
28496
28497 # Do we need the "lib" prefix for modules?
28498 need_lib_prefix=$need_lib_prefix
28499
28500 # Do we need a version for libraries?
28501 need_version=$need_version
28502
28503 # Library versioning type.
28504 version_type=$version_type
28505
28506 # Shared library runtime path variable.
28507 runpath_var=$runpath_var
28508
28509 # Shared library path variable.
28510 shlibpath_var=$shlibpath_var
28511
28512 # Is shlibpath searched before the hard-coded library search path?
28513 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
28514
28515 # Format of library name prefix.
28516 libname_spec=$lt_libname_spec
28517
28518 # List of archive names.  First name is the real one, the rest are links.
28519 # The last name is the one that the linker finds with -lNAME
28520 library_names_spec=$lt_library_names_spec
28521
28522 # The coded name of the library, if different from the real name.
28523 soname_spec=$lt_soname_spec
28524
28525 # Permission mode override for installation of shared libraries.
28526 install_override_mode=$lt_install_override_mode
28527
28528 # Command to use after installation of a shared archive.
28529 postinstall_cmds=$lt_postinstall_cmds
28530
28531 # Command to use after uninstallation of a shared archive.
28532 postuninstall_cmds=$lt_postuninstall_cmds
28533
28534 # Commands used to finish a libtool library installation in a directory.
28535 finish_cmds=$lt_finish_cmds
28536
28537 # As "finish_cmds", except a single script fragment to be evaled but
28538 # not shown.
28539 finish_eval=$lt_finish_eval
28540
28541 # Whether we should hardcode library paths into libraries.
28542 hardcode_into_libs=$hardcode_into_libs
28543
28544 # Compile-time system search path for libraries.
28545 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
28546
28547 # Detected run-time system search path for libraries.
28548 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
28549
28550 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
28551 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
28552
28553 # Whether dlopen is supported.
28554 dlopen_support=$enable_dlopen
28555
28556 # Whether dlopen of programs is supported.
28557 dlopen_self=$enable_dlopen_self
28558
28559 # Whether dlopen of statically linked programs is supported.
28560 dlopen_self_static=$enable_dlopen_self_static
28561
28562 # Commands to strip libraries.
28563 old_striplib=$lt_old_striplib
28564 striplib=$lt_striplib
28565
28566
28567 # The linker used to build libraries.
28568 LD=$lt_LD
28569
28570 # How to create reloadable object files.
28571 reload_flag=$lt_reload_flag
28572 reload_cmds=$lt_reload_cmds
28573
28574 # Commands used to build an old-style archive.
28575 old_archive_cmds=$lt_old_archive_cmds
28576
28577 # A language specific compiler.
28578 CC=$lt_compiler
28579
28580 # Is the compiler the GNU compiler?
28581 with_gcc=$GCC
28582
28583 # Compiler flag to turn off builtin functions.
28584 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
28585
28586 # Additional compiler flags for building library objects.
28587 pic_flag=$lt_lt_prog_compiler_pic
28588
28589 # How to pass a linker flag through the compiler.
28590 wl=$lt_lt_prog_compiler_wl
28591
28592 # Compiler flag to prevent dynamic linking.
28593 link_static_flag=$lt_lt_prog_compiler_static
28594
28595 # Does compiler simultaneously support -c and -o options?
28596 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
28597
28598 # Whether or not to add -lc for building shared libraries.
28599 build_libtool_need_lc=$archive_cmds_need_lc
28600
28601 # Whether or not to disallow shared libs when runtime libs are static.
28602 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
28603
28604 # Compiler flag to allow reflexive dlopens.
28605 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
28606
28607 # Compiler flag to generate shared objects directly from archives.
28608 whole_archive_flag_spec=$lt_whole_archive_flag_spec
28609
28610 # Whether the compiler copes with passing no objects directly.
28611 compiler_needs_object=$lt_compiler_needs_object
28612
28613 # Create an old-style archive from a shared archive.
28614 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
28615
28616 # Create a temporary old-style archive to link instead of a shared archive.
28617 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
28618
28619 # Commands used to build a shared archive.
28620 archive_cmds=$lt_archive_cmds
28621 archive_expsym_cmds=$lt_archive_expsym_cmds
28622
28623 # Commands used to build a loadable module if different from building
28624 # a shared archive.
28625 module_cmds=$lt_module_cmds
28626 module_expsym_cmds=$lt_module_expsym_cmds
28627
28628 # Whether we are building with GNU ld or not.
28629 with_gnu_ld=$lt_with_gnu_ld
28630
28631 # Flag that allows shared libraries with undefined symbols to be built.
28632 allow_undefined_flag=$lt_allow_undefined_flag
28633
28634 # Flag that enforces no undefined symbols.
28635 no_undefined_flag=$lt_no_undefined_flag
28636
28637 # Flag to hardcode \$libdir into a binary during linking.
28638 # This must work even if \$libdir does not exist
28639 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
28640
28641 # Whether we need a single "-rpath" flag with a separated argument.
28642 hardcode_libdir_separator=$lt_hardcode_libdir_separator
28643
28644 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
28645 # DIR into the resulting binary.
28646 hardcode_direct=$hardcode_direct
28647
28648 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
28649 # DIR into the resulting binary and the resulting library dependency is
28650 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
28651 # library is relocated.
28652 hardcode_direct_absolute=$hardcode_direct_absolute
28653
28654 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
28655 # into the resulting binary.
28656 hardcode_minus_L=$hardcode_minus_L
28657
28658 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
28659 # into the resulting binary.
28660 hardcode_shlibpath_var=$hardcode_shlibpath_var
28661
28662 # Set to "yes" if building a shared library automatically hardcodes DIR
28663 # into the library and all subsequent libraries and executables linked
28664 # against it.
28665 hardcode_automatic=$hardcode_automatic
28666
28667 # Set to yes if linker adds runtime paths of dependent libraries
28668 # to runtime path list.
28669 inherit_rpath=$inherit_rpath
28670
28671 # Whether libtool must link a program against all its dependency libraries.
28672 link_all_deplibs=$link_all_deplibs
28673
28674 # Set to "yes" if exported symbols are required.
28675 always_export_symbols=$always_export_symbols
28676
28677 # The commands to list exported symbols.
28678 export_symbols_cmds=$lt_export_symbols_cmds
28679
28680 # Symbols that should not be listed in the preloaded symbols.
28681 exclude_expsyms=$lt_exclude_expsyms
28682
28683 # Symbols that must always be exported.
28684 include_expsyms=$lt_include_expsyms
28685
28686 # Commands necessary for linking programs (against libraries) with templates.
28687 prelink_cmds=$lt_prelink_cmds
28688
28689 # Commands necessary for finishing linking programs.
28690 postlink_cmds=$lt_postlink_cmds
28691
28692 # Specify filename containing input files.
28693 file_list_spec=$lt_file_list_spec
28694
28695 # How to hardcode a shared library path into an executable.
28696 hardcode_action=$hardcode_action
28697
28698 # ### END LIBTOOL CONFIG
28699
28700 _LT_EOF
28701
28702     cat <<'_LT_EOF' >> "$cfgfile"
28703
28704 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
28705
28706 # func_munge_path_list VARIABLE PATH
28707 # -----------------------------------
28708 # VARIABLE is name of variable containing _space_ separated list of
28709 # directories to be munged by the contents of PATH, which is string
28710 # having a format:
28711 # "DIR[:DIR]:"
28712 #       string "DIR[ DIR]" will be prepended to VARIABLE
28713 # ":DIR[:DIR]"
28714 #       string "DIR[ DIR]" will be appended to VARIABLE
28715 # "DIRP[:DIRP]::[DIRA:]DIRA"
28716 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
28717 #       "DIRA[ DIRA]" will be appended to VARIABLE
28718 # "DIR[:DIR]"
28719 #       VARIABLE will be replaced by "DIR[ DIR]"
28720 func_munge_path_list ()
28721 {
28722     case x$2 in
28723     x)
28724         ;;
28725     *:)
28726         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
28727         ;;
28728     x:*)
28729         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
28730         ;;
28731     *::*)
28732         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
28733         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
28734         ;;
28735     *)
28736         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
28737         ;;
28738     esac
28739 }
28740
28741
28742 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
28743 func_cc_basename ()
28744 {
28745     for cc_temp in $*""; do
28746       case $cc_temp in
28747         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
28748         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
28749         \-*) ;;
28750         *) break;;
28751       esac
28752     done
28753     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
28754 }
28755
28756
28757 # ### END FUNCTIONS SHARED WITH CONFIGURE
28758
28759 _LT_EOF
28760
28761   case $host_os in
28762   aix3*)
28763     cat <<\_LT_EOF >> "$cfgfile"
28764 # AIX sometimes has problems with the GCC collect2 program.  For some
28765 # reason, if we set the COLLECT_NAMES environment variable, the problems
28766 # vanish in a puff of smoke.
28767 if test set != "${COLLECT_NAMES+set}"; then
28768   COLLECT_NAMES=
28769   export COLLECT_NAMES
28770 fi
28771 _LT_EOF
28772     ;;
28773   esac
28774
28775
28776 ltmain=$ac_aux_dir/ltmain.sh
28777
28778
28779   # We use sed instead of cat because bash on DJGPP gets confused if
28780   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
28781   # text mode, it properly converts lines to CR/LF.  This bash problem
28782   # is reportedly fixed, but why not run on old versions too?
28783   sed '$q' "$ltmain" >> "$cfgfile" \
28784      || (rm -f "$cfgfile"; exit 1)
28785
28786    mv -f "$cfgfile" "$ofile" ||
28787     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
28788   chmod +x "$ofile"
28789
28790  ;;
28791
28792   esac
28793 done # for ac_tag
28794
28795
28796 as_fn_exit 0
28797 _ACEOF
28798 ac_clean_files=$ac_clean_files_save
28799
28800 test $ac_write_fail = 0 ||
28801   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
28802
28803
28804 # configure is writing to config.log, and then calls config.status.
28805 # config.status does its own redirection, appending to config.log.
28806 # Unfortunately, on DOS this fails, as config.log is still kept open
28807 # by configure, so config.status won't be able to write to it; its
28808 # output is simply discarded.  So we exec the FD to /dev/null,
28809 # effectively closing config.log, so it can be properly (re)opened and
28810 # appended to by config.status.  When coming back to configure, we
28811 # need to make the FD available again.
28812 if test "$no_create" != yes; then
28813   ac_cs_success=:
28814   ac_config_status_args=
28815   test "$silent" = yes &&
28816     ac_config_status_args="$ac_config_status_args --quiet"
28817   exec 5>/dev/null
28818   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
28819   exec 5>>config.log
28820   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28821   # would make configure fail if this is the last instruction.
28822   $ac_cs_success || as_fn_exit 1
28823 fi
28824
28825 #
28826 # CONFIG_SUBDIRS section.
28827 #
28828 if test "$no_recursion" != yes; then
28829
28830   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
28831   # so they do not pile up.
28832   ac_sub_configure_args=
28833   ac_prev=
28834   eval "set x $ac_configure_args"
28835   shift
28836   for ac_arg
28837   do
28838     if test -n "$ac_prev"; then
28839       ac_prev=
28840       continue
28841     fi
28842     case $ac_arg in
28843     -cache-file | --cache-file | --cache-fil | --cache-fi \
28844     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
28845       ac_prev=cache_file ;;
28846     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
28847     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
28848     | --c=*)
28849       ;;
28850     --config-cache | -C)
28851       ;;
28852     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
28853       ac_prev=srcdir ;;
28854     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
28855       ;;
28856     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
28857       ac_prev=prefix ;;
28858     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
28859       ;;
28860     --disable-option-checking)
28861       ;;
28862     *)
28863       case $ac_arg in
28864       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
28865       esac
28866       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
28867     esac
28868   done
28869
28870   # Always prepend --prefix to ensure using the same prefix
28871   # in subdir configurations.
28872   ac_arg="--prefix=$prefix"
28873   case $ac_arg in
28874   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
28875   esac
28876   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
28877
28878   # Pass --silent
28879   if test "$silent" = yes; then
28880     ac_sub_configure_args="--silent $ac_sub_configure_args"
28881   fi
28882
28883   # Always prepend --disable-option-checking to silence warnings, since
28884   # different subdirs can have different --enable and --with options.
28885   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
28886
28887   ac_popdir=`pwd`
28888   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
28889
28890     # Do not complain, so a configure script can configure whichever
28891     # parts of a large source tree are present.
28892     test -d "$srcdir/$ac_dir" || continue
28893
28894     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
28895     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
28896     $as_echo "$ac_msg" >&6
28897     as_dir="$ac_dir"; as_fn_mkdir_p
28898     ac_builddir=.
28899
28900 case "$ac_dir" in
28901 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28902 *)
28903   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
28904   # A ".." for each directory in $ac_dir_suffix.
28905   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
28906   case $ac_top_builddir_sub in
28907   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28908   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28909   esac ;;
28910 esac
28911 ac_abs_top_builddir=$ac_pwd
28912 ac_abs_builddir=$ac_pwd$ac_dir_suffix
28913 # for backward compatibility:
28914 ac_top_builddir=$ac_top_build_prefix
28915
28916 case $srcdir in
28917   .)  # We are building in place.
28918     ac_srcdir=.
28919     ac_top_srcdir=$ac_top_builddir_sub
28920     ac_abs_top_srcdir=$ac_pwd ;;
28921   [\\/]* | ?:[\\/]* )  # Absolute name.
28922     ac_srcdir=$srcdir$ac_dir_suffix;
28923     ac_top_srcdir=$srcdir
28924     ac_abs_top_srcdir=$srcdir ;;
28925   *) # Relative name.
28926     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28927     ac_top_srcdir=$ac_top_build_prefix$srcdir
28928     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
28929 esac
28930 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
28931
28932
28933     cd "$ac_dir"
28934
28935     # Check for guested configure; otherwise get Cygnus style configure.
28936     if test -f "$ac_srcdir/configure.gnu"; then
28937       ac_sub_configure=$ac_srcdir/configure.gnu
28938     elif test -f "$ac_srcdir/configure"; then
28939       ac_sub_configure=$ac_srcdir/configure
28940     elif test -f "$ac_srcdir/configure.in"; then
28941       # This should be Cygnus configure.
28942       ac_sub_configure=$ac_aux_dir/configure
28943     else
28944       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
28945 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
28946       ac_sub_configure=
28947     fi
28948
28949     # The recursion is here.
28950     if test -n "$ac_sub_configure"; then
28951       # Make the cache file name correct relative to the subdirectory.
28952       case $cache_file in
28953       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
28954       *) # Relative name.
28955         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
28956       esac
28957
28958       { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
28959 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
28960       # The eval makes quoting arguments work.
28961       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
28962            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
28963         as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
28964     fi
28965
28966     cd "$ac_popdir"
28967   done
28968 fi
28969 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
28970   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
28971 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
28972 fi
28973