]> CyberLeo.Net >> Repos - FreeBSD/releng/10.1.git/blob - contrib/ntp/sntp/configure
Fix multiple ntp vulnerabilities.
[FreeBSD/releng/10.1.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.8p8.
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.8p8'
594 PACKAGE_STRING='sntp 4.2.8p8'
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 GTEST_AVAILABLE_FALSE
644 GTEST_AVAILABLE_TRUE
645 GTEST_CPPFLAGS
646 GTEST_CXXFLAGS
647 GTEST_LIBS
648 GTEST_LDFLAGS
649 GTEST_CONFIG
650 CXXCPP
651 am__fastdepCXX_FALSE
652 am__fastdepCXX_TRUE
653 CXXDEPMODE
654 ac_ct_CXX
655 CXXFLAGS
656 CXX
657 UNITYBUILD_AVAILABLE_FALSE
658 UNITYBUILD_AVAILABLE_TRUE
659 PATH_RUBY
660 VER_SUFFIX
661 LIB_SYSLOG
662 subdirs
663 BUILD_LIBEVENT_FALSE
664 BUILD_LIBEVENT_TRUE
665 LDADD_LIBEVENT
666 CPPFLAGS_LIBEVENT
667 CFLAGS_LIBEVENT
668 PKG_CONFIG
669 NTP_FORCE_LIBEVENT_DIST
670 LIBOPTS_DIR
671 LIBOPTS_CFLAGS
672 LIBOPTS_LDADD
673 NEED_LIBOPTS_FALSE
674 NEED_LIBOPTS_TRUE
675 INSTALL_LIBOPTS_FALSE
676 INSTALL_LIBOPTS_TRUE
677 POSIX_SHELL
678 GL_GENERATE_STDNORETURN_H_FALSE
679 GL_GENERATE_STDNORETURN_H_TRUE
680 STDNORETURN_H
681 BUILD_SNTP_FALSE
682 BUILD_SNTP_TRUE
683 SNTP
684 LIBTOOL_DEPS
685 OTOOL64
686 OTOOL
687 LIPO
688 NMEDIT
689 DSYMUTIL
690 MANIFEST_TOOL
691 RANLIB
692 DLLTOOL
693 OBJDUMP
694 LN_S
695 NM
696 ac_ct_DUMPBIN
697 DUMPBIN
698 LIBTOOL
699 LIBOBJS
700 PTHREADS_FALSE
701 PTHREADS_TRUE
702 LIBISC_PTHREADS_NOTHREADS
703 PTHREAD_LIBS
704 LTHREAD_LIBS
705 BUILD_THREAD
706 HAVE_INLINE
707 LDADD_LIBUTIL
708 ALLOCA
709 LIBM
710 EDITLINE_LIBS
711 LD
712 FGREP
713 SED
714 LDADD_LIBNTP
715 NTP_CROSSCOMPILE_FALSE
716 NTP_CROSSCOMPILE_TRUE
717 ac_ct_AR
718 AR
719 INSTALL_UPDATE_LEAP_FALSE
720 INSTALL_UPDATE_LEAP_TRUE
721 UPDATE_LEAP_NI
722 UPDATE_LEAP_MS
723 UPDATE_LEAP_DS
724 UPDATE_LEAP_DL
725 UPDATE_LEAP_DB
726 TIMETRIM_NI
727 TIMETRIM_MS
728 TIMETRIM_DS
729 TIMETRIM_DL
730 TIMETRIM_DB
731 TICKADJ_NI
732 TICKADJ_MS
733 TICKADJ_DS
734 TICKADJ_DL
735 TICKADJ_DB
736 SNTP_NI
737 SNTP_MS
738 SNTP_DS
739 SNTP_DL
740 SNTP_DB
741 NTP_WAIT_NI
742 NTP_WAIT_MS
743 NTP_WAIT_DS
744 NTP_WAIT_DL
745 NTP_WAIT_DB
746 NTP_KEYGEN_NI
747 NTP_KEYGEN_MS
748 NTP_KEYGEN_DS
749 NTP_KEYGEN_DL
750 NTP_KEYGEN_DB
751 NTPTRACE_NI
752 NTPTRACE_MS
753 NTPTRACE_DS
754 NTPTRACE_DL
755 NTPTRACE_DB
756 NTPTIME_NI
757 NTPTIME_MS
758 NTPTIME_DS
759 NTPTIME_DL
760 NTPTIME_DB
761 INSTALL_NTPSWEEP_FALSE
762 INSTALL_NTPSWEEP_TRUE
763 NTPSWEEP_NI
764 NTPSWEEP_MS
765 NTPSWEEP_DS
766 NTPSWEEP_DL
767 NTPSWEEP_DB
768 NTPSNMPD_NI
769 NTPSNMPD_MS
770 NTPSNMPD_DS
771 NTPSNMPD_DL
772 NTPSNMPD_DB
773 NTPQ_NI
774 NTPQ_MS
775 NTPQ_DS
776 NTPQ_DL
777 NTPQ_DB
778 NTPD_NI
779 NTPD_MS
780 NTPD_DS
781 NTPD_DL
782 NTPD_DB
783 NTPDSIM_NI
784 NTPDSIM_MS
785 NTPDSIM_DS
786 NTPDSIM_DL
787 NTPDSIM_DB
788 NTPDC_NI
789 NTPDC_MS
790 NTPDC_DS
791 NTPDC_DL
792 NTPDC_DB
793 NTPDATE_NI
794 NTPDATE_MS
795 NTPDATE_DS
796 NTPDATE_DL
797 NTPDATE_DB
798 MANTAGFMT
799 CALC_TICKADJ_NI
800 CALC_TICKADJ_MS
801 CALC_TICKADJ_DS
802 CALC_TICKADJ_DL
803 CALC_TICKADJ_DB
804 WANT_CALC_TICKADJ_MS_FALSE
805 WANT_CALC_TICKADJ_MS_TRUE
806 LDFLAGS_NTP
807 LDADD_NTP
808 CPPFLAGS_NTP
809 CFLAGS_NTP
810 EGREP
811 GREP
812 CPP
813 am__fastdepCC_FALSE
814 am__fastdepCC_TRUE
815 CCDEPMODE
816 am__nodep
817 AMDEPBACKSLASH
818 AMDEP_FALSE
819 AMDEP_TRUE
820 am__quote
821 am__include
822 DEPDIR
823 OBJEXT
824 EXEEXT
825 ac_ct_CC
826 CPPFLAGS
827 LDFLAGS
828 CFLAGS
829 CC
830 host_os
831 host_vendor
832 host_cpu
833 host
834 build_os
835 build_vendor
836 build_cpu
837 build
838 AM_BACKSLASH
839 AM_DEFAULT_VERBOSITY
840 AM_DEFAULT_V
841 AM_V
842 am__untar
843 am__tar
844 AMTAR
845 am__leading_dot
846 SET_MAKE
847 AWK
848 mkdir_p
849 MKDIR_P
850 INSTALL_STRIP_PROGRAM
851 STRIP
852 install_sh
853 MAKEINFO
854 AUTOHEADER
855 AUTOMAKE
856 AUTOCONF
857 ACLOCAL
858 VERSION
859 PACKAGE
860 CYGPATH_W
861 am__isrc
862 INSTALL_DATA
863 INSTALL_SCRIPT
864 INSTALL_PROGRAM
865 target_alias
866 host_alias
867 build_alias
868 LIBS
869 ECHO_T
870 ECHO_N
871 ECHO_C
872 DEFS
873 mandir
874 localedir
875 libdir
876 psdir
877 pdfdir
878 dvidir
879 htmldir
880 infodir
881 docdir
882 oldincludedir
883 includedir
884 localstatedir
885 sharedstatedir
886 sysconfdir
887 datadir
888 datarootdir
889 libexecdir
890 sbindir
891 bindir
892 program_transform_name
893 prefix
894 exec_prefix
895 PACKAGE_URL
896 PACKAGE_BUGREPORT
897 PACKAGE_STRING
898 PACKAGE_VERSION
899 PACKAGE_TARNAME
900 PACKAGE_NAME
901 PATH_SEPARATOR
902 SHELL'
903 ac_subst_files=''
904 ac_user_opts='
905 enable_option_checking
906 enable_silent_rules
907 enable_dependency_tracking
908 with_locfile
909 with_gnu_ld
910 with_lineeditlibs
911 enable_debugging
912 enable_thread_support
913 with_threads
914 with_yielding_select
915 enable_c99_snprintf
916 enable_clockctl
917 enable_linuxcaps
918 enable_solarisprivs
919 enable_shared
920 enable_static
921 with_pic
922 enable_fast_install
923 with_sysroot
924 enable_libtool_lock
925 with_sntp
926 enable_nls
927 enable_local_libopts
928 enable_libopts_install
929 with_autoopts_config
930 with_regex_header
931 with_libregex
932 with_libregex_cflags
933 with_libregex_libs
934 enable_optional_args
935 enable_local_libevent
936 with_crypto
937 with_openssl_libdir
938 with_openssl_incdir
939 with_rpath
940 enable_ipv6
941 with_kame
942 enable_getifaddrs
943 with_gtest
944 enable_problem_tests
945 '
946       ac_precious_vars='build_alias
947 host_alias
948 target_alias
949 CC
950 CFLAGS
951 LDFLAGS
952 LIBS
953 CPPFLAGS
954 CPP
955 CXX
956 CXXFLAGS
957 CCC
958 CXXCPP'
959 ac_subdirs_all='libevent'
960
961 # Initialize some variables set by options.
962 ac_init_help=
963 ac_init_version=false
964 ac_unrecognized_opts=
965 ac_unrecognized_sep=
966 # The variables have the same names as the options, with
967 # dashes changed to underlines.
968 cache_file=/dev/null
969 exec_prefix=NONE
970 no_create=
971 no_recursion=
972 prefix=NONE
973 program_prefix=NONE
974 program_suffix=NONE
975 program_transform_name=s,x,x,
976 silent=
977 site=
978 srcdir=
979 verbose=
980 x_includes=NONE
981 x_libraries=NONE
982
983 # Installation directory options.
984 # These are left unexpanded so users can "make install exec_prefix=/foo"
985 # and all the variables that are supposed to be based on exec_prefix
986 # by default will actually change.
987 # Use braces instead of parens because sh, perl, etc. also accept them.
988 # (The list follows the same order as the GNU Coding Standards.)
989 bindir='${exec_prefix}/bin'
990 sbindir='${exec_prefix}/sbin'
991 libexecdir='${exec_prefix}/libexec'
992 datarootdir='${prefix}/share'
993 datadir='${datarootdir}'
994 sysconfdir='${prefix}/etc'
995 sharedstatedir='${prefix}/com'
996 localstatedir='${prefix}/var'
997 includedir='${prefix}/include'
998 oldincludedir='/usr/include'
999 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1000 infodir='${datarootdir}/info'
1001 htmldir='${docdir}'
1002 dvidir='${docdir}'
1003 pdfdir='${docdir}'
1004 psdir='${docdir}'
1005 libdir='${exec_prefix}/lib'
1006 localedir='${datarootdir}/locale'
1007 mandir='${datarootdir}/man'
1008
1009 ac_prev=
1010 ac_dashdash=
1011 for ac_option
1012 do
1013   # If the previous option needs an argument, assign it.
1014   if test -n "$ac_prev"; then
1015     eval $ac_prev=\$ac_option
1016     ac_prev=
1017     continue
1018   fi
1019
1020   case $ac_option in
1021   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1022   *=)   ac_optarg= ;;
1023   *)    ac_optarg=yes ;;
1024   esac
1025
1026   # Accept the important Cygnus configure options, so we can diagnose typos.
1027
1028   case $ac_dashdash$ac_option in
1029   --)
1030     ac_dashdash=yes ;;
1031
1032   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1033     ac_prev=bindir ;;
1034   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1035     bindir=$ac_optarg ;;
1036
1037   -build | --build | --buil | --bui | --bu)
1038     ac_prev=build_alias ;;
1039   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1040     build_alias=$ac_optarg ;;
1041
1042   -cache-file | --cache-file | --cache-fil | --cache-fi \
1043   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1044     ac_prev=cache_file ;;
1045   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1046   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1047     cache_file=$ac_optarg ;;
1048
1049   --config-cache | -C)
1050     cache_file=config.cache ;;
1051
1052   -datadir | --datadir | --datadi | --datad)
1053     ac_prev=datadir ;;
1054   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1055     datadir=$ac_optarg ;;
1056
1057   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1058   | --dataroo | --dataro | --datar)
1059     ac_prev=datarootdir ;;
1060   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1061   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1062     datarootdir=$ac_optarg ;;
1063
1064   -disable-* | --disable-*)
1065     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1066     # Reject names that are not valid shell variable names.
1067     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1068       as_fn_error $? "invalid feature name: $ac_useropt"
1069     ac_useropt_orig=$ac_useropt
1070     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1071     case $ac_user_opts in
1072       *"
1073 "enable_$ac_useropt"
1074 "*) ;;
1075       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1076          ac_unrecognized_sep=', ';;
1077     esac
1078     eval enable_$ac_useropt=no ;;
1079
1080   -docdir | --docdir | --docdi | --doc | --do)
1081     ac_prev=docdir ;;
1082   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1083     docdir=$ac_optarg ;;
1084
1085   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1086     ac_prev=dvidir ;;
1087   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1088     dvidir=$ac_optarg ;;
1089
1090   -enable-* | --enable-*)
1091     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1092     # Reject names that are not valid shell variable names.
1093     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1094       as_fn_error $? "invalid feature name: $ac_useropt"
1095     ac_useropt_orig=$ac_useropt
1096     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1097     case $ac_user_opts in
1098       *"
1099 "enable_$ac_useropt"
1100 "*) ;;
1101       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1102          ac_unrecognized_sep=', ';;
1103     esac
1104     eval enable_$ac_useropt=\$ac_optarg ;;
1105
1106   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1107   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1108   | --exec | --exe | --ex)
1109     ac_prev=exec_prefix ;;
1110   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1111   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1112   | --exec=* | --exe=* | --ex=*)
1113     exec_prefix=$ac_optarg ;;
1114
1115   -gas | --gas | --ga | --g)
1116     # Obsolete; use --with-gas.
1117     with_gas=yes ;;
1118
1119   -help | --help | --hel | --he | -h)
1120     ac_init_help=long ;;
1121   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1122     ac_init_help=recursive ;;
1123   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1124     ac_init_help=short ;;
1125
1126   -host | --host | --hos | --ho)
1127     ac_prev=host_alias ;;
1128   -host=* | --host=* | --hos=* | --ho=*)
1129     host_alias=$ac_optarg ;;
1130
1131   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1132     ac_prev=htmldir ;;
1133   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1134   | --ht=*)
1135     htmldir=$ac_optarg ;;
1136
1137   -includedir | --includedir | --includedi | --included | --include \
1138   | --includ | --inclu | --incl | --inc)
1139     ac_prev=includedir ;;
1140   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1141   | --includ=* | --inclu=* | --incl=* | --inc=*)
1142     includedir=$ac_optarg ;;
1143
1144   -infodir | --infodir | --infodi | --infod | --info | --inf)
1145     ac_prev=infodir ;;
1146   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1147     infodir=$ac_optarg ;;
1148
1149   -libdir | --libdir | --libdi | --libd)
1150     ac_prev=libdir ;;
1151   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1152     libdir=$ac_optarg ;;
1153
1154   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1155   | --libexe | --libex | --libe)
1156     ac_prev=libexecdir ;;
1157   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1158   | --libexe=* | --libex=* | --libe=*)
1159     libexecdir=$ac_optarg ;;
1160
1161   -localedir | --localedir | --localedi | --localed | --locale)
1162     ac_prev=localedir ;;
1163   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1164     localedir=$ac_optarg ;;
1165
1166   -localstatedir | --localstatedir | --localstatedi | --localstated \
1167   | --localstate | --localstat | --localsta | --localst | --locals)
1168     ac_prev=localstatedir ;;
1169   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1170   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1171     localstatedir=$ac_optarg ;;
1172
1173   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1174     ac_prev=mandir ;;
1175   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1176     mandir=$ac_optarg ;;
1177
1178   -nfp | --nfp | --nf)
1179     # Obsolete; use --without-fp.
1180     with_fp=no ;;
1181
1182   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1183   | --no-cr | --no-c | -n)
1184     no_create=yes ;;
1185
1186   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1187   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1188     no_recursion=yes ;;
1189
1190   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1191   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1192   | --oldin | --oldi | --old | --ol | --o)
1193     ac_prev=oldincludedir ;;
1194   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1195   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1196   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1197     oldincludedir=$ac_optarg ;;
1198
1199   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1200     ac_prev=prefix ;;
1201   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1202     prefix=$ac_optarg ;;
1203
1204   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1205   | --program-pre | --program-pr | --program-p)
1206     ac_prev=program_prefix ;;
1207   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1208   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1209     program_prefix=$ac_optarg ;;
1210
1211   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1212   | --program-suf | --program-su | --program-s)
1213     ac_prev=program_suffix ;;
1214   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1215   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1216     program_suffix=$ac_optarg ;;
1217
1218   -program-transform-name | --program-transform-name \
1219   | --program-transform-nam | --program-transform-na \
1220   | --program-transform-n | --program-transform- \
1221   | --program-transform | --program-transfor \
1222   | --program-transfo | --program-transf \
1223   | --program-trans | --program-tran \
1224   | --progr-tra | --program-tr | --program-t)
1225     ac_prev=program_transform_name ;;
1226   -program-transform-name=* | --program-transform-name=* \
1227   | --program-transform-nam=* | --program-transform-na=* \
1228   | --program-transform-n=* | --program-transform-=* \
1229   | --program-transform=* | --program-transfor=* \
1230   | --program-transfo=* | --program-transf=* \
1231   | --program-trans=* | --program-tran=* \
1232   | --progr-tra=* | --program-tr=* | --program-t=*)
1233     program_transform_name=$ac_optarg ;;
1234
1235   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1236     ac_prev=pdfdir ;;
1237   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1238     pdfdir=$ac_optarg ;;
1239
1240   -psdir | --psdir | --psdi | --psd | --ps)
1241     ac_prev=psdir ;;
1242   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1243     psdir=$ac_optarg ;;
1244
1245   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1246   | -silent | --silent | --silen | --sile | --sil)
1247     silent=yes ;;
1248
1249   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1250     ac_prev=sbindir ;;
1251   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1252   | --sbi=* | --sb=*)
1253     sbindir=$ac_optarg ;;
1254
1255   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1256   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1257   | --sharedst | --shareds | --shared | --share | --shar \
1258   | --sha | --sh)
1259     ac_prev=sharedstatedir ;;
1260   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1261   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1262   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1263   | --sha=* | --sh=*)
1264     sharedstatedir=$ac_optarg ;;
1265
1266   -site | --site | --sit)
1267     ac_prev=site ;;
1268   -site=* | --site=* | --sit=*)
1269     site=$ac_optarg ;;
1270
1271   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1272     ac_prev=srcdir ;;
1273   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1274     srcdir=$ac_optarg ;;
1275
1276   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1277   | --syscon | --sysco | --sysc | --sys | --sy)
1278     ac_prev=sysconfdir ;;
1279   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1280   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1281     sysconfdir=$ac_optarg ;;
1282
1283   -target | --target | --targe | --targ | --tar | --ta | --t)
1284     ac_prev=target_alias ;;
1285   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1286     target_alias=$ac_optarg ;;
1287
1288   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1289     verbose=yes ;;
1290
1291   -version | --version | --versio | --versi | --vers | -V)
1292     ac_init_version=: ;;
1293
1294   -with-* | --with-*)
1295     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1296     # Reject names that are not valid shell variable names.
1297     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1298       as_fn_error $? "invalid package name: $ac_useropt"
1299     ac_useropt_orig=$ac_useropt
1300     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1301     case $ac_user_opts in
1302       *"
1303 "with_$ac_useropt"
1304 "*) ;;
1305       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1306          ac_unrecognized_sep=', ';;
1307     esac
1308     eval with_$ac_useropt=\$ac_optarg ;;
1309
1310   -without-* | --without-*)
1311     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1312     # Reject names that are not valid shell variable names.
1313     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1314       as_fn_error $? "invalid package name: $ac_useropt"
1315     ac_useropt_orig=$ac_useropt
1316     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1317     case $ac_user_opts in
1318       *"
1319 "with_$ac_useropt"
1320 "*) ;;
1321       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1322          ac_unrecognized_sep=', ';;
1323     esac
1324     eval with_$ac_useropt=no ;;
1325
1326   --x)
1327     # Obsolete; use --with-x.
1328     with_x=yes ;;
1329
1330   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1331   | --x-incl | --x-inc | --x-in | --x-i)
1332     ac_prev=x_includes ;;
1333   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1334   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1335     x_includes=$ac_optarg ;;
1336
1337   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1338   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1339     ac_prev=x_libraries ;;
1340   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1341   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1342     x_libraries=$ac_optarg ;;
1343
1344   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1345 Try \`$0 --help' for more information"
1346     ;;
1347
1348   *=*)
1349     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1350     # Reject names that are not valid shell variable names.
1351     case $ac_envvar in #(
1352       '' | [0-9]* | *[!_$as_cr_alnum]* )
1353       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1354     esac
1355     eval $ac_envvar=\$ac_optarg
1356     export $ac_envvar ;;
1357
1358   *)
1359     # FIXME: should be removed in autoconf 3.0.
1360     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1361     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1362       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1363     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1364     ;;
1365
1366   esac
1367 done
1368
1369 if test -n "$ac_prev"; then
1370   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1371   as_fn_error $? "missing argument to $ac_option"
1372 fi
1373
1374 if test -n "$ac_unrecognized_opts"; then
1375   case $enable_option_checking in
1376     no) ;;
1377     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1378     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1379   esac
1380 fi
1381
1382 # Check all directory arguments for consistency.
1383 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1384                 datadir sysconfdir sharedstatedir localstatedir includedir \
1385                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1386                 libdir localedir mandir
1387 do
1388   eval ac_val=\$$ac_var
1389   # Remove trailing slashes.
1390   case $ac_val in
1391     */ )
1392       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1393       eval $ac_var=\$ac_val;;
1394   esac
1395   # Be sure to have absolute directory names.
1396   case $ac_val in
1397     [\\/$]* | ?:[\\/]* )  continue;;
1398     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1399   esac
1400   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1401 done
1402
1403 # There might be people who depend on the old broken behavior: `$host'
1404 # used to hold the argument of --host etc.
1405 # FIXME: To remove some day.
1406 build=$build_alias
1407 host=$host_alias
1408 target=$target_alias
1409
1410 # FIXME: To remove some day.
1411 if test "x$host_alias" != x; then
1412   if test "x$build_alias" = x; then
1413     cross_compiling=maybe
1414   elif test "x$build_alias" != "x$host_alias"; then
1415     cross_compiling=yes
1416   fi
1417 fi
1418
1419 ac_tool_prefix=
1420 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1421
1422 test "$silent" = yes && exec 6>/dev/null
1423
1424
1425 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1426 ac_ls_di=`ls -di .` &&
1427 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1428   as_fn_error $? "working directory cannot be determined"
1429 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1430   as_fn_error $? "pwd does not report name of working directory"
1431
1432
1433 # Find the source files, if location was not specified.
1434 if test -z "$srcdir"; then
1435   ac_srcdir_defaulted=yes
1436   # Try the directory containing this script, then the parent directory.
1437   ac_confdir=`$as_dirname -- "$as_myself" ||
1438 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1439          X"$as_myself" : 'X\(//\)[^/]' \| \
1440          X"$as_myself" : 'X\(//\)$' \| \
1441          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1442 $as_echo X"$as_myself" |
1443     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1444             s//\1/
1445             q
1446           }
1447           /^X\(\/\/\)[^/].*/{
1448             s//\1/
1449             q
1450           }
1451           /^X\(\/\/\)$/{
1452             s//\1/
1453             q
1454           }
1455           /^X\(\/\).*/{
1456             s//\1/
1457             q
1458           }
1459           s/.*/./; q'`
1460   srcdir=$ac_confdir
1461   if test ! -r "$srcdir/$ac_unique_file"; then
1462     srcdir=..
1463   fi
1464 else
1465   ac_srcdir_defaulted=no
1466 fi
1467 if test ! -r "$srcdir/$ac_unique_file"; then
1468   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1469   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1470 fi
1471 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1472 ac_abs_confdir=`(
1473         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1474         pwd)`
1475 # When building in place, set srcdir=.
1476 if test "$ac_abs_confdir" = "$ac_pwd"; then
1477   srcdir=.
1478 fi
1479 # Remove unnecessary trailing slashes from srcdir.
1480 # Double slashes in file names in object file debugging info
1481 # mess up M-x gdb in Emacs.
1482 case $srcdir in
1483 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1484 esac
1485 for ac_var in $ac_precious_vars; do
1486   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1487   eval ac_env_${ac_var}_value=\$${ac_var}
1488   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1489   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1490 done
1491
1492 #
1493 # Report the --help message.
1494 #
1495 if test "$ac_init_help" = "long"; then
1496   # Omit some internal or obsolete options to make the list less imposing.
1497   # This message is too long to be a string in the A/UX 3.1 sh.
1498   cat <<_ACEOF
1499 \`configure' configures sntp 4.2.8p8 to adapt to many kinds of systems.
1500
1501 Usage: $0 [OPTION]... [VAR=VALUE]...
1502
1503 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1504 VAR=VALUE.  See below for descriptions of some of the useful variables.
1505
1506 Defaults for the options are specified in brackets.
1507
1508 Configuration:
1509   -h, --help              display this help and exit
1510       --help=short        display options specific to this package
1511       --help=recursive    display the short help of all the included packages
1512   -V, --version           display version information and exit
1513   -q, --quiet, --silent   do not print \`checking ...' messages
1514       --cache-file=FILE   cache test results in FILE [disabled]
1515   -C, --config-cache      alias for \`--cache-file=config.cache'
1516   -n, --no-create         do not create output files
1517       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1518
1519 Installation directories:
1520   --prefix=PREFIX         install architecture-independent files in PREFIX
1521                           [$ac_default_prefix]
1522   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1523                           [PREFIX]
1524
1525 By default, \`make install' will install all the files in
1526 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1527 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1528 for instance \`--prefix=\$HOME'.
1529
1530 For better control, use the options below.
1531
1532 Fine tuning of the installation directories:
1533   --bindir=DIR            user executables [EPREFIX/bin]
1534   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1535   --libexecdir=DIR        program executables [EPREFIX/libexec]
1536   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1537   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1538   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1539   --libdir=DIR            object code libraries [EPREFIX/lib]
1540   --includedir=DIR        C header files [PREFIX/include]
1541   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1542   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1543   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1544   --infodir=DIR           info documentation [DATAROOTDIR/info]
1545   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1546   --mandir=DIR            man documentation [DATAROOTDIR/man]
1547   --docdir=DIR            documentation root [DATAROOTDIR/doc/sntp]
1548   --htmldir=DIR           html documentation [DOCDIR]
1549   --dvidir=DIR            dvi documentation [DOCDIR]
1550   --pdfdir=DIR            pdf documentation [DOCDIR]
1551   --psdir=DIR             ps documentation [DOCDIR]
1552 _ACEOF
1553
1554   cat <<\_ACEOF
1555
1556 Program names:
1557   --program-prefix=PREFIX            prepend PREFIX to installed program names
1558   --program-suffix=SUFFIX            append SUFFIX to installed program names
1559   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1560
1561 System types:
1562   --build=BUILD     configure for building on BUILD [guessed]
1563   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1564 _ACEOF
1565 fi
1566
1567 if test -n "$ac_init_help"; then
1568   case $ac_init_help in
1569      short | recursive ) echo "Configuration of sntp 4.2.8p8:";;
1570    esac
1571   cat <<\_ACEOF
1572
1573 Optional Features:
1574   --disable-option-checking  ignore unrecognized --enable/--with options
1575   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1576   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1577   --enable-silent-rules   less verbose build output (undo: "make V=1")
1578   --disable-silent-rules  verbose build output (undo: "make V=0")
1579   --enable-dependency-tracking
1580                           do not reject slow dependency extractors
1581   --disable-dependency-tracking
1582                           speeds up one-time build
1583   defaults:               + yes, - no, s system-specific
1584   --enable-debugging      + include ntpd debugging code
1585   --enable-thread-support s use threads (+ if available)
1586   --enable-c99-snprintf   s force replacement
1587   --enable-clockctl       s Use /dev/clockctl for non-root clock control
1588   --enable-linuxcaps      + Use Linux capabilities for non-root clock control
1589   --enable-solarisprivs   + Use Solaris privileges for non-root clock control
1590   --enable-shared[=PKGS]  build shared libraries [default=no]
1591   --enable-static[=PKGS]  build static libraries [default=yes]
1592   --enable-fast-install[=PKGS]
1593                           optimize for fast installation [default=yes]
1594   --disable-libtool-lock  avoid locking (might break parallel builds)
1595   --disable-nls           disable nls support in libopts
1596   --enable-local-libopts  Use the supplied libopts tearoff code
1597   --enable-libopts-install
1598                           Install libopts with client installation
1599   --disable-optional-args not wanting optional option args
1600   --enable-local-libevent Force using the supplied libevent tearoff code
1601   --enable-ipv6           s use IPv6?
1602
1603   --enable-getifaddrs     + Enable the use of getifaddrs() [[yes|no]].
1604   --enable-problem-tests  + enable tests with undiagnosed problems
1605
1606 Optional Packages:
1607   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1608   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1609   --with-locfile=XXX      os-specific or "legacy"
1610   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1611   --with-lineeditlibs     edit,editline (readline may be specified if desired)
1612   --with-threads          with threads [auto]
1613   --with-yielding-select  with yielding select [auto]
1614   --with-pic              try to use only PIC/non-PIC objects [default=use
1615                           both]
1616   --with-sysroot=DIR Search for dependent libraries within DIR
1617                         (or the compiler's sysroot if not specified).
1618   --without-sntp          - disable building sntp and sntp/tests
1619   --with-autoopts-config  specify the config-info script
1620   --with-regex-header     a reg expr header is specified
1621   --with-libregex         libregex installation prefix
1622   --with-libregex-cflags  libregex compile flags
1623   --with-libregex-libs    libregex link command arguments
1624   --with-crypto           + =openssl,libcrypto
1625
1626   --with-openssl-libdir   + =/something/reasonable
1627
1628   --with-openssl-incdir   + =/something/reasonable
1629
1630   --without-rpath         s Disable auto-added -R linker paths
1631
1632   --with-kame             - =/usr/local/v6
1633   --with-gtest            Use the gtest framework (Default: if it's available)
1634
1635 Some influential environment variables:
1636   CC          C compiler command
1637   CFLAGS      C compiler flags
1638   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1639               nonstandard directory <lib dir>
1640   LIBS        libraries to pass to the linker, e.g. -l<library>
1641   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1642               you have headers in a nonstandard directory <include dir>
1643   CPP         C preprocessor
1644   CXX         C++ compiler command
1645   CXXFLAGS    C++ compiler flags
1646   CXXCPP      C++ preprocessor
1647
1648 Use these variables to override the choices made by `configure' or to help
1649 it to find libraries and programs with nonstandard names/locations.
1650
1651 Report bugs to <http://bugs.ntp.org./>.
1652 sntp home page: <http://www.ntp.org./>.
1653 _ACEOF
1654 ac_status=$?
1655 fi
1656
1657 if test "$ac_init_help" = "recursive"; then
1658   # If there are subdirs, report their specific --help.
1659   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1660     test -d "$ac_dir" ||
1661       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1662       continue
1663     ac_builddir=.
1664
1665 case "$ac_dir" in
1666 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1667 *)
1668   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1669   # A ".." for each directory in $ac_dir_suffix.
1670   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1671   case $ac_top_builddir_sub in
1672   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1673   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1674   esac ;;
1675 esac
1676 ac_abs_top_builddir=$ac_pwd
1677 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1678 # for backward compatibility:
1679 ac_top_builddir=$ac_top_build_prefix
1680
1681 case $srcdir in
1682   .)  # We are building in place.
1683     ac_srcdir=.
1684     ac_top_srcdir=$ac_top_builddir_sub
1685     ac_abs_top_srcdir=$ac_pwd ;;
1686   [\\/]* | ?:[\\/]* )  # Absolute name.
1687     ac_srcdir=$srcdir$ac_dir_suffix;
1688     ac_top_srcdir=$srcdir
1689     ac_abs_top_srcdir=$srcdir ;;
1690   *) # Relative name.
1691     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1692     ac_top_srcdir=$ac_top_build_prefix$srcdir
1693     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1694 esac
1695 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1696
1697     cd "$ac_dir" || { ac_status=$?; continue; }
1698     # Check for guested configure.
1699     if test -f "$ac_srcdir/configure.gnu"; then
1700       echo &&
1701       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1702     elif test -f "$ac_srcdir/configure"; then
1703       echo &&
1704       $SHELL "$ac_srcdir/configure" --help=recursive
1705     else
1706       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1707     fi || ac_status=$?
1708     cd "$ac_pwd" || { ac_status=$?; break; }
1709   done
1710 fi
1711
1712 test -n "$ac_init_help" && exit $ac_status
1713 if $ac_init_version; then
1714   cat <<\_ACEOF
1715 sntp configure 4.2.8p8
1716 generated by GNU Autoconf 2.69
1717
1718 Copyright (C) 2012 Free Software Foundation, Inc.
1719 This configure script is free software; the Free Software Foundation
1720 gives unlimited permission to copy, distribute and modify it.
1721 _ACEOF
1722   exit
1723 fi
1724
1725 ## ------------------------ ##
1726 ## Autoconf initialization. ##
1727 ## ------------------------ ##
1728
1729 # ac_fn_c_try_compile LINENO
1730 # --------------------------
1731 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1732 ac_fn_c_try_compile ()
1733 {
1734   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1735   rm -f conftest.$ac_objext
1736   if { { ac_try="$ac_compile"
1737 case "(($ac_try" in
1738   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1739   *) ac_try_echo=$ac_try;;
1740 esac
1741 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1742 $as_echo "$ac_try_echo"; } >&5
1743   (eval "$ac_compile") 2>conftest.err
1744   ac_status=$?
1745   if test -s conftest.err; then
1746     grep -v '^ *+' conftest.err >conftest.er1
1747     cat conftest.er1 >&5
1748     mv -f conftest.er1 conftest.err
1749   fi
1750   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1751   test $ac_status = 0; } && {
1752          test -z "$ac_c_werror_flag" ||
1753          test ! -s conftest.err
1754        } && test -s conftest.$ac_objext; then :
1755   ac_retval=0
1756 else
1757   $as_echo "$as_me: failed program was:" >&5
1758 sed 's/^/| /' conftest.$ac_ext >&5
1759
1760         ac_retval=1
1761 fi
1762   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1763   as_fn_set_status $ac_retval
1764
1765 } # ac_fn_c_try_compile
1766
1767 # ac_fn_c_try_cpp LINENO
1768 # ----------------------
1769 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1770 ac_fn_c_try_cpp ()
1771 {
1772   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1773   if { { ac_try="$ac_cpp conftest.$ac_ext"
1774 case "(($ac_try" in
1775   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1776   *) ac_try_echo=$ac_try;;
1777 esac
1778 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1779 $as_echo "$ac_try_echo"; } >&5
1780   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1781   ac_status=$?
1782   if test -s conftest.err; then
1783     grep -v '^ *+' conftest.err >conftest.er1
1784     cat conftest.er1 >&5
1785     mv -f conftest.er1 conftest.err
1786   fi
1787   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1788   test $ac_status = 0; } > conftest.i && {
1789          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1790          test ! -s conftest.err
1791        }; then :
1792   ac_retval=0
1793 else
1794   $as_echo "$as_me: failed program was:" >&5
1795 sed 's/^/| /' conftest.$ac_ext >&5
1796
1797     ac_retval=1
1798 fi
1799   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1800   as_fn_set_status $ac_retval
1801
1802 } # ac_fn_c_try_cpp
1803
1804 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1805 # -------------------------------------------------------
1806 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1807 # the include files in INCLUDES and setting the cache variable VAR
1808 # accordingly.
1809 ac_fn_c_check_header_mongrel ()
1810 {
1811   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1812   if eval \${$3+:} false; then :
1813   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1814 $as_echo_n "checking for $2... " >&6; }
1815 if eval \${$3+:} false; then :
1816   $as_echo_n "(cached) " >&6
1817 fi
1818 eval ac_res=\$$3
1819                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1820 $as_echo "$ac_res" >&6; }
1821 else
1822   # Is the header compilable?
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1824 $as_echo_n "checking $2 usability... " >&6; }
1825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1826 /* end confdefs.h.  */
1827 $4
1828 #include <$2>
1829 _ACEOF
1830 if ac_fn_c_try_compile "$LINENO"; then :
1831   ac_header_compiler=yes
1832 else
1833   ac_header_compiler=no
1834 fi
1835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1837 $as_echo "$ac_header_compiler" >&6; }
1838
1839 # Is the header present?
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1841 $as_echo_n "checking $2 presence... " >&6; }
1842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1843 /* end confdefs.h.  */
1844 #include <$2>
1845 _ACEOF
1846 if ac_fn_c_try_cpp "$LINENO"; then :
1847   ac_header_preproc=yes
1848 else
1849   ac_header_preproc=no
1850 fi
1851 rm -f conftest.err conftest.i conftest.$ac_ext
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1853 $as_echo "$ac_header_preproc" >&6; }
1854
1855 # So?  What about this header?
1856 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1857   yes:no: )
1858     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1859 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&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     ;;
1863   no:yes:* )
1864     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1865 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1866     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1867 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1868     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1869 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1870     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1871 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1872     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1873 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1874 ( $as_echo "## ------------------------------------ ##
1875 ## Report this to http://bugs.ntp.org./ ##
1876 ## ------------------------------------ ##"
1877      ) | sed "s/^/$as_me: WARNING:     /" >&2
1878     ;;
1879 esac
1880   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1881 $as_echo_n "checking for $2... " >&6; }
1882 if eval \${$3+:} false; then :
1883   $as_echo_n "(cached) " >&6
1884 else
1885   eval "$3=\$ac_header_compiler"
1886 fi
1887 eval ac_res=\$$3
1888                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1889 $as_echo "$ac_res" >&6; }
1890 fi
1891   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1892
1893 } # ac_fn_c_check_header_mongrel
1894
1895 # ac_fn_c_try_run LINENO
1896 # ----------------------
1897 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1898 # that executables *can* be run.
1899 ac_fn_c_try_run ()
1900 {
1901   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1902   if { { ac_try="$ac_link"
1903 case "(($ac_try" in
1904   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1905   *) ac_try_echo=$ac_try;;
1906 esac
1907 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1908 $as_echo "$ac_try_echo"; } >&5
1909   (eval "$ac_link") 2>&5
1910   ac_status=$?
1911   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1912   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1913   { { case "(($ac_try" in
1914   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1915   *) ac_try_echo=$ac_try;;
1916 esac
1917 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1918 $as_echo "$ac_try_echo"; } >&5
1919   (eval "$ac_try") 2>&5
1920   ac_status=$?
1921   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1922   test $ac_status = 0; }; }; then :
1923   ac_retval=0
1924 else
1925   $as_echo "$as_me: program exited with status $ac_status" >&5
1926        $as_echo "$as_me: failed program was:" >&5
1927 sed 's/^/| /' conftest.$ac_ext >&5
1928
1929        ac_retval=$ac_status
1930 fi
1931   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1932   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1933   as_fn_set_status $ac_retval
1934
1935 } # ac_fn_c_try_run
1936
1937 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1938 # -------------------------------------------------------
1939 # Tests whether HEADER exists and can be compiled using the include files in
1940 # INCLUDES, setting the cache variable VAR accordingly.
1941 ac_fn_c_check_header_compile ()
1942 {
1943   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1944   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1945 $as_echo_n "checking for $2... " >&6; }
1946 if eval \${$3+:} false; then :
1947   $as_echo_n "(cached) " >&6
1948 else
1949   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950 /* end confdefs.h.  */
1951 $4
1952 #include <$2>
1953 _ACEOF
1954 if ac_fn_c_try_compile "$LINENO"; then :
1955   eval "$3=yes"
1956 else
1957   eval "$3=no"
1958 fi
1959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1960 fi
1961 eval ac_res=\$$3
1962                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1963 $as_echo "$ac_res" >&6; }
1964   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1965
1966 } # ac_fn_c_check_header_compile
1967
1968 # ac_fn_c_try_link LINENO
1969 # -----------------------
1970 # Try to link conftest.$ac_ext, and return whether this succeeded.
1971 ac_fn_c_try_link ()
1972 {
1973   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1974   rm -f conftest.$ac_objext conftest$ac_exeext
1975   if { { ac_try="$ac_link"
1976 case "(($ac_try" in
1977   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1978   *) ac_try_echo=$ac_try;;
1979 esac
1980 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1981 $as_echo "$ac_try_echo"; } >&5
1982   (eval "$ac_link") 2>conftest.err
1983   ac_status=$?
1984   if test -s conftest.err; then
1985     grep -v '^ *+' conftest.err >conftest.er1
1986     cat conftest.er1 >&5
1987     mv -f conftest.er1 conftest.err
1988   fi
1989   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1990   test $ac_status = 0; } && {
1991          test -z "$ac_c_werror_flag" ||
1992          test ! -s conftest.err
1993        } && test -s conftest$ac_exeext && {
1994          test "$cross_compiling" = yes ||
1995          test -x conftest$ac_exeext
1996        }; then :
1997   ac_retval=0
1998 else
1999   $as_echo "$as_me: failed program was:" >&5
2000 sed 's/^/| /' conftest.$ac_ext >&5
2001
2002         ac_retval=1
2003 fi
2004   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2005   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2006   # interfere with the next link command; also delete a directory that is
2007   # left behind by Apple's compiler.  We do this before executing the actions.
2008   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2009   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2010   as_fn_set_status $ac_retval
2011
2012 } # ac_fn_c_try_link
2013
2014 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2015 # -------------------------------------------
2016 # Tests whether TYPE exists after having included INCLUDES, setting cache
2017 # variable VAR accordingly.
2018 ac_fn_c_check_type ()
2019 {
2020   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2021   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2022 $as_echo_n "checking for $2... " >&6; }
2023 if eval \${$3+:} false; then :
2024   $as_echo_n "(cached) " >&6
2025 else
2026   eval "$3=no"
2027   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2028 /* end confdefs.h.  */
2029 $4
2030 int
2031 main ()
2032 {
2033 if (sizeof ($2))
2034          return 0;
2035   ;
2036   return 0;
2037 }
2038 _ACEOF
2039 if ac_fn_c_try_compile "$LINENO"; then :
2040   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041 /* end confdefs.h.  */
2042 $4
2043 int
2044 main ()
2045 {
2046 if (sizeof (($2)))
2047             return 0;
2048   ;
2049   return 0;
2050 }
2051 _ACEOF
2052 if ac_fn_c_try_compile "$LINENO"; then :
2053
2054 else
2055   eval "$3=yes"
2056 fi
2057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2058 fi
2059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2060 fi
2061 eval ac_res=\$$3
2062                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2063 $as_echo "$ac_res" >&6; }
2064   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2065
2066 } # ac_fn_c_check_type
2067
2068 # ac_fn_c_check_func LINENO FUNC VAR
2069 # ----------------------------------
2070 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2071 ac_fn_c_check_func ()
2072 {
2073   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2074   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2075 $as_echo_n "checking for $2... " >&6; }
2076 if eval \${$3+:} false; then :
2077   $as_echo_n "(cached) " >&6
2078 else
2079   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2080 /* end confdefs.h.  */
2081 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2082    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2083 #define $2 innocuous_$2
2084
2085 /* System header to define __stub macros and hopefully few prototypes,
2086     which can conflict with char $2 (); below.
2087     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2088     <limits.h> exists even on freestanding compilers.  */
2089
2090 #ifdef __STDC__
2091 # include <limits.h>
2092 #else
2093 # include <assert.h>
2094 #endif
2095
2096 #undef $2
2097
2098 /* Override any GCC internal prototype to avoid an error.
2099    Use char because int might match the return type of a GCC
2100    builtin and then its argument prototype would still apply.  */
2101 #ifdef __cplusplus
2102 extern "C"
2103 #endif
2104 char $2 ();
2105 /* The GNU C library defines this for functions which it implements
2106     to always fail with ENOSYS.  Some functions are actually named
2107     something starting with __ and the normal name is an alias.  */
2108 #if defined __stub_$2 || defined __stub___$2
2109 choke me
2110 #endif
2111
2112 int
2113 main ()
2114 {
2115 return $2 ();
2116   ;
2117   return 0;
2118 }
2119 _ACEOF
2120 if ac_fn_c_try_link "$LINENO"; then :
2121   eval "$3=yes"
2122 else
2123   eval "$3=no"
2124 fi
2125 rm -f core conftest.err conftest.$ac_objext \
2126     conftest$ac_exeext conftest.$ac_ext
2127 fi
2128 eval ac_res=\$$3
2129                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2130 $as_echo "$ac_res" >&6; }
2131   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2132
2133 } # ac_fn_c_check_func
2134
2135 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2136 # ---------------------------------------------
2137 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2138 # accordingly.
2139 ac_fn_c_check_decl ()
2140 {
2141   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2142   as_decl_name=`echo $2|sed 's/ *(.*//'`
2143   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2144   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2145 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2146 if eval \${$3+:} false; then :
2147   $as_echo_n "(cached) " >&6
2148 else
2149   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150 /* end confdefs.h.  */
2151 $4
2152 int
2153 main ()
2154 {
2155 #ifndef $as_decl_name
2156 #ifdef __cplusplus
2157   (void) $as_decl_use;
2158 #else
2159   (void) $as_decl_name;
2160 #endif
2161 #endif
2162
2163   ;
2164   return 0;
2165 }
2166 _ACEOF
2167 if ac_fn_c_try_compile "$LINENO"; then :
2168   eval "$3=yes"
2169 else
2170   eval "$3=no"
2171 fi
2172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2173 fi
2174 eval ac_res=\$$3
2175                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2176 $as_echo "$ac_res" >&6; }
2177   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2178
2179 } # ac_fn_c_check_decl
2180
2181 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2182 # --------------------------------------------
2183 # Tries to find the compile-time value of EXPR in a program that includes
2184 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2185 # computed
2186 ac_fn_c_compute_int ()
2187 {
2188   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2189   if test "$cross_compiling" = yes; then
2190     # Depending upon the size, compute the lo and hi bounds.
2191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2192 /* end confdefs.h.  */
2193 $4
2194 int
2195 main ()
2196 {
2197 static int test_array [1 - 2 * !(($2) >= 0)];
2198 test_array [0] = 0;
2199 return test_array [0];
2200
2201   ;
2202   return 0;
2203 }
2204 _ACEOF
2205 if ac_fn_c_try_compile "$LINENO"; then :
2206   ac_lo=0 ac_mid=0
2207   while :; do
2208     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2209 /* end confdefs.h.  */
2210 $4
2211 int
2212 main ()
2213 {
2214 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2215 test_array [0] = 0;
2216 return test_array [0];
2217
2218   ;
2219   return 0;
2220 }
2221 _ACEOF
2222 if ac_fn_c_try_compile "$LINENO"; then :
2223   ac_hi=$ac_mid; break
2224 else
2225   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2226                         if test $ac_lo -le $ac_mid; then
2227                           ac_lo= ac_hi=
2228                           break
2229                         fi
2230                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2231 fi
2232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2233   done
2234 else
2235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2236 /* end confdefs.h.  */
2237 $4
2238 int
2239 main ()
2240 {
2241 static int test_array [1 - 2 * !(($2) < 0)];
2242 test_array [0] = 0;
2243 return test_array [0];
2244
2245   ;
2246   return 0;
2247 }
2248 _ACEOF
2249 if ac_fn_c_try_compile "$LINENO"; then :
2250   ac_hi=-1 ac_mid=-1
2251   while :; do
2252     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253 /* end confdefs.h.  */
2254 $4
2255 int
2256 main ()
2257 {
2258 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2259 test_array [0] = 0;
2260 return test_array [0];
2261
2262   ;
2263   return 0;
2264 }
2265 _ACEOF
2266 if ac_fn_c_try_compile "$LINENO"; then :
2267   ac_lo=$ac_mid; break
2268 else
2269   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2270                         if test $ac_mid -le $ac_hi; then
2271                           ac_lo= ac_hi=
2272                           break
2273                         fi
2274                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2275 fi
2276 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2277   done
2278 else
2279   ac_lo= ac_hi=
2280 fi
2281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2282 fi
2283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284 # Binary search between lo and hi bounds.
2285 while test "x$ac_lo" != "x$ac_hi"; do
2286   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2287   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2288 /* end confdefs.h.  */
2289 $4
2290 int
2291 main ()
2292 {
2293 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2294 test_array [0] = 0;
2295 return test_array [0];
2296
2297   ;
2298   return 0;
2299 }
2300 _ACEOF
2301 if ac_fn_c_try_compile "$LINENO"; then :
2302   ac_hi=$ac_mid
2303 else
2304   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2305 fi
2306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2307 done
2308 case $ac_lo in #((
2309 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2310 '') ac_retval=1 ;;
2311 esac
2312   else
2313     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2314 /* end confdefs.h.  */
2315 $4
2316 static long int longval () { return $2; }
2317 static unsigned long int ulongval () { return $2; }
2318 #include <stdio.h>
2319 #include <stdlib.h>
2320 int
2321 main ()
2322 {
2323
2324   FILE *f = fopen ("conftest.val", "w");
2325   if (! f)
2326     return 1;
2327   if (($2) < 0)
2328     {
2329       long int i = longval ();
2330       if (i != ($2))
2331         return 1;
2332       fprintf (f, "%ld", i);
2333     }
2334   else
2335     {
2336       unsigned long int i = ulongval ();
2337       if (i != ($2))
2338         return 1;
2339       fprintf (f, "%lu", i);
2340     }
2341   /* Do not output a trailing newline, as this causes \r\n confusion
2342      on some platforms.  */
2343   return ferror (f) || fclose (f) != 0;
2344
2345   ;
2346   return 0;
2347 }
2348 _ACEOF
2349 if ac_fn_c_try_run "$LINENO"; then :
2350   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2351 else
2352   ac_retval=1
2353 fi
2354 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2355   conftest.$ac_objext conftest.beam conftest.$ac_ext
2356 rm -f conftest.val
2357
2358   fi
2359   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2360   as_fn_set_status $ac_retval
2361
2362 } # ac_fn_c_compute_int
2363
2364 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2365 # ----------------------------------------------------
2366 # Tries to find if the field MEMBER exists in type AGGR, after including
2367 # INCLUDES, setting cache variable VAR accordingly.
2368 ac_fn_c_check_member ()
2369 {
2370   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2371   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2372 $as_echo_n "checking for $2.$3... " >&6; }
2373 if eval \${$4+:} false; then :
2374   $as_echo_n "(cached) " >&6
2375 else
2376   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2377 /* end confdefs.h.  */
2378 $5
2379 int
2380 main ()
2381 {
2382 static $2 ac_aggr;
2383 if (ac_aggr.$3)
2384 return 0;
2385   ;
2386   return 0;
2387 }
2388 _ACEOF
2389 if ac_fn_c_try_compile "$LINENO"; then :
2390   eval "$4=yes"
2391 else
2392   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2393 /* end confdefs.h.  */
2394 $5
2395 int
2396 main ()
2397 {
2398 static $2 ac_aggr;
2399 if (sizeof ac_aggr.$3)
2400 return 0;
2401   ;
2402   return 0;
2403 }
2404 _ACEOF
2405 if ac_fn_c_try_compile "$LINENO"; then :
2406   eval "$4=yes"
2407 else
2408   eval "$4=no"
2409 fi
2410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2411 fi
2412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2413 fi
2414 eval ac_res=\$$4
2415                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2416 $as_echo "$ac_res" >&6; }
2417   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2418
2419 } # ac_fn_c_check_member
2420
2421 # ac_fn_cxx_try_compile LINENO
2422 # ----------------------------
2423 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2424 ac_fn_cxx_try_compile ()
2425 {
2426   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2427   rm -f conftest.$ac_objext
2428   if { { ac_try="$ac_compile"
2429 case "(($ac_try" in
2430   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2431   *) ac_try_echo=$ac_try;;
2432 esac
2433 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2434 $as_echo "$ac_try_echo"; } >&5
2435   (eval "$ac_compile") 2>conftest.err
2436   ac_status=$?
2437   if test -s conftest.err; then
2438     grep -v '^ *+' conftest.err >conftest.er1
2439     cat conftest.er1 >&5
2440     mv -f conftest.er1 conftest.err
2441   fi
2442   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2443   test $ac_status = 0; } && {
2444          test -z "$ac_cxx_werror_flag" ||
2445          test ! -s conftest.err
2446        } && test -s conftest.$ac_objext; then :
2447   ac_retval=0
2448 else
2449   $as_echo "$as_me: failed program was:" >&5
2450 sed 's/^/| /' conftest.$ac_ext >&5
2451
2452         ac_retval=1
2453 fi
2454   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2455   as_fn_set_status $ac_retval
2456
2457 } # ac_fn_cxx_try_compile
2458
2459 # ac_fn_cxx_try_cpp LINENO
2460 # ------------------------
2461 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2462 ac_fn_cxx_try_cpp ()
2463 {
2464   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2465   if { { ac_try="$ac_cpp conftest.$ac_ext"
2466 case "(($ac_try" in
2467   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2468   *) ac_try_echo=$ac_try;;
2469 esac
2470 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2471 $as_echo "$ac_try_echo"; } >&5
2472   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2473   ac_status=$?
2474   if test -s conftest.err; then
2475     grep -v '^ *+' conftest.err >conftest.er1
2476     cat conftest.er1 >&5
2477     mv -f conftest.er1 conftest.err
2478   fi
2479   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2480   test $ac_status = 0; } > conftest.i && {
2481          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2482          test ! -s conftest.err
2483        }; then :
2484   ac_retval=0
2485 else
2486   $as_echo "$as_me: failed program was:" >&5
2487 sed 's/^/| /' conftest.$ac_ext >&5
2488
2489     ac_retval=1
2490 fi
2491   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2492   as_fn_set_status $ac_retval
2493
2494 } # ac_fn_cxx_try_cpp
2495
2496 # ac_fn_cxx_try_link LINENO
2497 # -------------------------
2498 # Try to link conftest.$ac_ext, and return whether this succeeded.
2499 ac_fn_cxx_try_link ()
2500 {
2501   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2502   rm -f conftest.$ac_objext conftest$ac_exeext
2503   if { { ac_try="$ac_link"
2504 case "(($ac_try" in
2505   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2506   *) ac_try_echo=$ac_try;;
2507 esac
2508 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2509 $as_echo "$ac_try_echo"; } >&5
2510   (eval "$ac_link") 2>conftest.err
2511   ac_status=$?
2512   if test -s conftest.err; then
2513     grep -v '^ *+' conftest.err >conftest.er1
2514     cat conftest.er1 >&5
2515     mv -f conftest.er1 conftest.err
2516   fi
2517   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2518   test $ac_status = 0; } && {
2519          test -z "$ac_cxx_werror_flag" ||
2520          test ! -s conftest.err
2521        } && test -s conftest$ac_exeext && {
2522          test "$cross_compiling" = yes ||
2523          test -x conftest$ac_exeext
2524        }; then :
2525   ac_retval=0
2526 else
2527   $as_echo "$as_me: failed program was:" >&5
2528 sed 's/^/| /' conftest.$ac_ext >&5
2529
2530         ac_retval=1
2531 fi
2532   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2533   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2534   # interfere with the next link command; also delete a directory that is
2535   # left behind by Apple's compiler.  We do this before executing the actions.
2536   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2537   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2538   as_fn_set_status $ac_retval
2539
2540 } # ac_fn_cxx_try_link
2541 cat >config.log <<_ACEOF
2542 This file contains any messages produced by compilers while
2543 running configure, to aid debugging if configure makes a mistake.
2544
2545 It was created by sntp $as_me 4.2.8p8, which was
2546 generated by GNU Autoconf 2.69.  Invocation command line was
2547
2548   $ $0 $@
2549
2550 _ACEOF
2551 exec 5>>config.log
2552 {
2553 cat <<_ASUNAME
2554 ## --------- ##
2555 ## Platform. ##
2556 ## --------- ##
2557
2558 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2559 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2560 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2561 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2562 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2563
2564 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2565 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2566
2567 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2568 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2569 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2570 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2571 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2572 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2573 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2574
2575 _ASUNAME
2576
2577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2578 for as_dir in $PATH
2579 do
2580   IFS=$as_save_IFS
2581   test -z "$as_dir" && as_dir=.
2582     $as_echo "PATH: $as_dir"
2583   done
2584 IFS=$as_save_IFS
2585
2586 } >&5
2587
2588 cat >&5 <<_ACEOF
2589
2590
2591 ## ----------- ##
2592 ## Core tests. ##
2593 ## ----------- ##
2594
2595 _ACEOF
2596
2597
2598 # Keep a trace of the command line.
2599 # Strip out --no-create and --no-recursion so they do not pile up.
2600 # Strip out --silent because we don't want to record it for future runs.
2601 # Also quote any args containing shell meta-characters.
2602 # Make two passes to allow for proper duplicate-argument suppression.
2603 ac_configure_args=
2604 ac_configure_args0=
2605 ac_configure_args1=
2606 ac_must_keep_next=false
2607 for ac_pass in 1 2
2608 do
2609   for ac_arg
2610   do
2611     case $ac_arg in
2612     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2613     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2614     | -silent | --silent | --silen | --sile | --sil)
2615       continue ;;
2616     *\'*)
2617       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2618     esac
2619     case $ac_pass in
2620     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2621     2)
2622       as_fn_append ac_configure_args1 " '$ac_arg'"
2623       if test $ac_must_keep_next = true; then
2624         ac_must_keep_next=false # Got value, back to normal.
2625       else
2626         case $ac_arg in
2627           *=* | --config-cache | -C | -disable-* | --disable-* \
2628           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2629           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2630           | -with-* | --with-* | -without-* | --without-* | --x)
2631             case "$ac_configure_args0 " in
2632               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2633             esac
2634             ;;
2635           -* ) ac_must_keep_next=true ;;
2636         esac
2637       fi
2638       as_fn_append ac_configure_args " '$ac_arg'"
2639       ;;
2640     esac
2641   done
2642 done
2643 { ac_configure_args0=; unset ac_configure_args0;}
2644 { ac_configure_args1=; unset ac_configure_args1;}
2645
2646 # When interrupted or exit'd, cleanup temporary files, and complete
2647 # config.log.  We remove comments because anyway the quotes in there
2648 # would cause problems or look ugly.
2649 # WARNING: Use '\'' to represent an apostrophe within the trap.
2650 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2651 trap 'exit_status=$?
2652   # Save into config.log some information that might help in debugging.
2653   {
2654     echo
2655
2656     $as_echo "## ---------------- ##
2657 ## Cache variables. ##
2658 ## ---------------- ##"
2659     echo
2660     # The following way of writing the cache mishandles newlines in values,
2661 (
2662   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2663     eval ac_val=\$$ac_var
2664     case $ac_val in #(
2665     *${as_nl}*)
2666       case $ac_var in #(
2667       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2668 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2669       esac
2670       case $ac_var in #(
2671       _ | IFS | as_nl) ;; #(
2672       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2673       *) { eval $ac_var=; unset $ac_var;} ;;
2674       esac ;;
2675     esac
2676   done
2677   (set) 2>&1 |
2678     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2679     *${as_nl}ac_space=\ *)
2680       sed -n \
2681         "s/'\''/'\''\\\\'\'''\''/g;
2682           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2683       ;; #(
2684     *)
2685       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2686       ;;
2687     esac |
2688     sort
2689 )
2690     echo
2691
2692     $as_echo "## ----------------- ##
2693 ## Output variables. ##
2694 ## ----------------- ##"
2695     echo
2696     for ac_var in $ac_subst_vars
2697     do
2698       eval ac_val=\$$ac_var
2699       case $ac_val in
2700       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2701       esac
2702       $as_echo "$ac_var='\''$ac_val'\''"
2703     done | sort
2704     echo
2705
2706     if test -n "$ac_subst_files"; then
2707       $as_echo "## ------------------- ##
2708 ## File substitutions. ##
2709 ## ------------------- ##"
2710       echo
2711       for ac_var in $ac_subst_files
2712       do
2713         eval ac_val=\$$ac_var
2714         case $ac_val in
2715         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2716         esac
2717         $as_echo "$ac_var='\''$ac_val'\''"
2718       done | sort
2719       echo
2720     fi
2721
2722     if test -s confdefs.h; then
2723       $as_echo "## ----------- ##
2724 ## confdefs.h. ##
2725 ## ----------- ##"
2726       echo
2727       cat confdefs.h
2728       echo
2729     fi
2730     test "$ac_signal" != 0 &&
2731       $as_echo "$as_me: caught signal $ac_signal"
2732     $as_echo "$as_me: exit $exit_status"
2733   } >&5
2734   rm -f core *.core core.conftest.* &&
2735     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2736     exit $exit_status
2737 ' 0
2738 for ac_signal in 1 2 13 15; do
2739   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2740 done
2741 ac_signal=0
2742
2743 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2744 rm -f -r conftest* confdefs.h
2745
2746 $as_echo "/* confdefs.h */" > confdefs.h
2747
2748 # Predefined preprocessor variables.
2749
2750 cat >>confdefs.h <<_ACEOF
2751 #define PACKAGE_NAME "$PACKAGE_NAME"
2752 _ACEOF
2753
2754 cat >>confdefs.h <<_ACEOF
2755 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2756 _ACEOF
2757
2758 cat >>confdefs.h <<_ACEOF
2759 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2760 _ACEOF
2761
2762 cat >>confdefs.h <<_ACEOF
2763 #define PACKAGE_STRING "$PACKAGE_STRING"
2764 _ACEOF
2765
2766 cat >>confdefs.h <<_ACEOF
2767 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2768 _ACEOF
2769
2770 cat >>confdefs.h <<_ACEOF
2771 #define PACKAGE_URL "$PACKAGE_URL"
2772 _ACEOF
2773
2774
2775 # Let the site file select an alternate cache file if it wants to.
2776 # Prefer an explicitly selected file to automatically selected ones.
2777 ac_site_file1=NONE
2778 ac_site_file2=NONE
2779 if test -n "$CONFIG_SITE"; then
2780   # We do not want a PATH search for config.site.
2781   case $CONFIG_SITE in #((
2782     -*)  ac_site_file1=./$CONFIG_SITE;;
2783     */*) ac_site_file1=$CONFIG_SITE;;
2784     *)   ac_site_file1=./$CONFIG_SITE;;
2785   esac
2786 elif test "x$prefix" != xNONE; then
2787   ac_site_file1=$prefix/share/config.site
2788   ac_site_file2=$prefix/etc/config.site
2789 else
2790   ac_site_file1=$ac_default_prefix/share/config.site
2791   ac_site_file2=$ac_default_prefix/etc/config.site
2792 fi
2793 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2794 do
2795   test "x$ac_site_file" = xNONE && continue
2796   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2797     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2798 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2799     sed 's/^/| /' "$ac_site_file" >&5
2800     . "$ac_site_file" \
2801       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2802 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2803 as_fn_error $? "failed to load site script $ac_site_file
2804 See \`config.log' for more details" "$LINENO" 5; }
2805   fi
2806 done
2807
2808 if test -r "$cache_file"; then
2809   # Some versions of bash will fail to source /dev/null (special files
2810   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2811   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2812     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2813 $as_echo "$as_me: loading cache $cache_file" >&6;}
2814     case $cache_file in
2815       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2816       *)                      . "./$cache_file";;
2817     esac
2818   fi
2819 else
2820   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2821 $as_echo "$as_me: creating cache $cache_file" >&6;}
2822   >$cache_file
2823 fi
2824
2825 as_fn_append ac_header_list " stdarg.h"
2826 # Check that the precious variables saved in the cache have kept the same
2827 # value.
2828 ac_cache_corrupted=false
2829 for ac_var in $ac_precious_vars; do
2830   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2831   eval ac_new_set=\$ac_env_${ac_var}_set
2832   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2833   eval ac_new_val=\$ac_env_${ac_var}_value
2834   case $ac_old_set,$ac_new_set in
2835     set,)
2836       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2837 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2838       ac_cache_corrupted=: ;;
2839     ,set)
2840       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2841 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2842       ac_cache_corrupted=: ;;
2843     ,);;
2844     *)
2845       if test "x$ac_old_val" != "x$ac_new_val"; then
2846         # differences in whitespace do not lead to failure.
2847         ac_old_val_w=`echo x $ac_old_val`
2848         ac_new_val_w=`echo x $ac_new_val`
2849         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2850           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2851 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2852           ac_cache_corrupted=:
2853         else
2854           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2855 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2856           eval $ac_var=\$ac_old_val
2857         fi
2858         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2859 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2860         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2861 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2862       fi;;
2863   esac
2864   # Pass precious variables to config.status.
2865   if test "$ac_new_set" = set; then
2866     case $ac_new_val in
2867     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2868     *) ac_arg=$ac_var=$ac_new_val ;;
2869     esac
2870     case " $ac_configure_args " in
2871       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2872       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2873     esac
2874   fi
2875 done
2876 if $ac_cache_corrupted; then
2877   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2878 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2879   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2880 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2881   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2882 fi
2883 ## -------------------- ##
2884 ## Main body of script. ##
2885 ## -------------------- ##
2886
2887 ac_ext=c
2888 ac_cpp='$CPP $CPPFLAGS'
2889 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2890 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2891 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2892
2893
2894
2895 ac_aux_dir=
2896 for ac_dir in libevent/build-aux "$srcdir"/libevent/build-aux; do
2897   if test -f "$ac_dir/install-sh"; then
2898     ac_aux_dir=$ac_dir
2899     ac_install_sh="$ac_aux_dir/install-sh -c"
2900     break
2901   elif test -f "$ac_dir/install.sh"; then
2902     ac_aux_dir=$ac_dir
2903     ac_install_sh="$ac_aux_dir/install.sh -c"
2904     break
2905   elif test -f "$ac_dir/shtool"; then
2906     ac_aux_dir=$ac_dir
2907     ac_install_sh="$ac_aux_dir/shtool install -c"
2908     break
2909   fi
2910 done
2911 if test -z "$ac_aux_dir"; then
2912   as_fn_error $? "cannot find install-sh, install.sh, or shtool in libevent/build-aux \"$srcdir\"/libevent/build-aux" "$LINENO" 5
2913 fi
2914
2915 # These three variables are undocumented and unsupported,
2916 # and are intended to be withdrawn in a future Autoconf release.
2917 # They can cause serious problems if a builder's source tree is in a directory
2918 # whose full name contains unusual characters.
2919 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2920 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2921 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2922
2923
2924 ac_ext=c
2925 ac_cpp='$CPP $CPPFLAGS'
2926 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2927 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2928 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2929
2930
2931 # Bump sntp_configure_cache_version for each change to configure.ac or
2932 # .m4 files which invalidates cached values from previous configure
2933 # runs.
2934 #
2935 # If the change affects cache variables used only by the main NTP
2936 # configure.ac, then only its version number should be bumped, while
2937 # the subdir configure.ac version numbers should be unchanged.  The
2938 # same is true for a test/variable that is used only by one subdir
2939 # being changed incompatibly; only that subdir's cache version needs
2940 # bumping.
2941 #
2942 # If a change affects variables shared by all NTP configure scripts,
2943 # please bump the version numbers of each.  If you are not sure, the
2944 # safe choice is to bump all on any cache-invalidating change.
2945 #
2946 # In order to avoid the risk of version stamp collision between -stable
2947 # and -dev branches, do not simply increment the version, instead use
2948 # the date YYYYMMDD optionally with -HHMM if there is more than one
2949 # bump in a day.
2950
2951 sntp_configure_cache_version=20120806
2952
2953 # When the version of config.cache and configure do not
2954 # match, NTP_CACHEVERSION will flush the cache.
2955
2956
2957
2958     ntp_cache_flush=1
2959
2960     case "$ntp_cv_sntp_cache_version" in
2961      $sntp_configure_cache_version)
2962         # same version, good
2963         ntp_cache_flush=0
2964         ;;
2965      '')
2966         # No cache, predates ntp_cv_sntp_cache_version, or is empty.
2967         case "$cache_file" in
2968          /dev/null)
2969             ntp_cache_flush=0
2970             ;;
2971          *)
2972             case "$NTP_CACHEVERSION_PARENT" in
2973              '')
2974                 # Do not clear the cache immediately after it is created
2975                 # empty as it is noisy.  Differentiate a newly-created
2976                 # config.cache from one predating the cache version
2977                 # mechanism by looking for the first cached variable set
2978                 # by Autoconf
2979                 case "$ac_cv_path_install" in
2980                  '')
2981                     # empty config.cache file
2982                     ntp_cache_flush=0
2983                 esac
2984                 ;;
2985              *)
2986                 # Parent configure just created cache from empty,
2987                 # flushing would be counterproductive.
2988                 ntp_cache_flush=0;
2989                 ;;
2990             esac
2991         esac
2992         ;;
2993      *)
2994         # configure cache version mismatches config.cache version
2995         ;;
2996     esac
2997
2998     case "$ntp_cache_flush" in
2999      1)
3000         c_version="${ntp_cv_sntp_cache_version:-(no version found)}"
3001
3002         # Do we flush all variables or exclude others' version stamps?
3003
3004         case "$NTP_CACHEVERSION_PARENT" in
3005          '')
3006             # Clear all *_cv_* variables including our child subdirs'
3007             # ntp_cv_*_cache_version variables.  This prevents subdir
3008             # configure scripts from noticing a version mismatch just
3009             # after the top configure in the invocation cleared and
3010             # recreated the cache.
3011
3012             c_varname_list=`set |
3013                             sed -n -e 's/=.*$//' \
3014                                    -e '/_cv_/p'
3015                            `
3016             ;;
3017          *)
3018             # This is not the top configure this particular invocation.
3019             # Clear all *_cv_* variables sparing the version stamps
3020             # of other configure scripts, so we don't trigger
3021             # useless repeated clearings.
3022
3023             c_varname_list=`set |
3024                             sed -n -e 's/=.*$//' \
3025                                    -e '/ntp_cv_.*_cache_version/d' \
3026                                    -e '/_cv_/p'
3027                            `
3028         esac
3029
3030         for c_varname in $c_varname_list
3031         do
3032                                                     { eval $c_varname=; unset $c_varname; }
3033         done
3034
3035         { $as_echo "$as_me:${as_lineno-$LINENO}: $cache_file saved by another version, ignored." >&5
3036 $as_echo "$as_me: $cache_file saved by another version, ignored." >&6;}
3037         { $as_echo "$as_me:${as_lineno-$LINENO}: configure script cache version: $sntp_configure_cache_version" >&5
3038 $as_echo "$as_me: configure script cache version: $sntp_configure_cache_version" >&6;}
3039         { $as_echo "$as_me:${as_lineno-$LINENO}: $cache_file version: $c_version" >&5
3040 $as_echo "$as_me: $cache_file version: $c_version" >&6;}
3041         { c_varname=; unset c_varname;}
3042         { c_varname_list=; unset c_varname_list;}
3043         { c_version=; unset c_version;}
3044     esac
3045
3046     { ntp_cache_flush=; unset ntp_cache_flush;}
3047
3048     # save configure version in config.cache for next time
3049     ntp_cv_sntp_cache_version="$sntp_configure_cache_version"
3050
3051     # let any subdir configure.ac NTP_CACHEVERSION invocations
3052     # know they are not the top level.
3053     NTP_CACHEVERSION_PARENT='sntp' ; export NTP_CACHEVERSION_PARENT
3054
3055
3056 am__api_version='1.15'
3057
3058 # Find a good install program.  We prefer a C program (faster),
3059 # so one script is as good as another.  But avoid the broken or
3060 # incompatible versions:
3061 # SysV /etc/install, /usr/sbin/install
3062 # SunOS /usr/etc/install
3063 # IRIX /sbin/install
3064 # AIX /bin/install
3065 # AmigaOS /C/install, which installs bootblocks on floppy discs
3066 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3067 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3068 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3069 # OS/2's system install, which has a completely different semantic
3070 # ./install, which can be erroneously created by make from ./install.sh.
3071 # Reject install programs that cannot install multiple files.
3072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3073 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3074 if test -z "$INSTALL"; then
3075 if ${ac_cv_path_install+:} false; then :
3076   $as_echo_n "(cached) " >&6
3077 else
3078   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3079 for as_dir in $PATH
3080 do
3081   IFS=$as_save_IFS
3082   test -z "$as_dir" && as_dir=.
3083     # Account for people who put trailing slashes in PATH elements.
3084 case $as_dir/ in #((
3085   ./ | .// | /[cC]/* | \
3086   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3087   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3088   /usr/ucb/* ) ;;
3089   *)
3090     # OSF1 and SCO ODT 3.0 have their own names for install.
3091     # Don't use installbsd from OSF since it installs stuff as root
3092     # by default.
3093     for ac_prog in ginstall scoinst install; do
3094       for ac_exec_ext in '' $ac_executable_extensions; do
3095         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3096           if test $ac_prog = install &&
3097             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3098             # AIX install.  It has an incompatible calling convention.
3099             :
3100           elif test $ac_prog = install &&
3101             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3102             # program-specific install script used by HP pwplus--don't use.
3103             :
3104           else
3105             rm -rf conftest.one conftest.two conftest.dir
3106             echo one > conftest.one
3107             echo two > conftest.two
3108             mkdir conftest.dir
3109             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3110               test -s conftest.one && test -s conftest.two &&
3111               test -s conftest.dir/conftest.one &&
3112               test -s conftest.dir/conftest.two
3113             then
3114               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3115               break 3
3116             fi
3117           fi
3118         fi
3119       done
3120     done
3121     ;;
3122 esac
3123
3124   done
3125 IFS=$as_save_IFS
3126
3127 rm -rf conftest.one conftest.two conftest.dir
3128
3129 fi
3130   if test "${ac_cv_path_install+set}" = set; then
3131     INSTALL=$ac_cv_path_install
3132   else
3133     # As a last resort, use the slow shell script.  Don't cache a
3134     # value for INSTALL within a source directory, because that will
3135     # break other packages using the cache if that directory is
3136     # removed, or if the value is a relative name.
3137     INSTALL=$ac_install_sh
3138   fi
3139 fi
3140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3141 $as_echo "$INSTALL" >&6; }
3142
3143 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3144 # It thinks the first close brace ends the variable substitution.
3145 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3146
3147 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3148
3149 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3150
3151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3152 $as_echo_n "checking whether build environment is sane... " >&6; }
3153 # Reject unsafe characters in $srcdir or the absolute working directory
3154 # name.  Accept space and tab only in the latter.
3155 am_lf='
3156 '
3157 case `pwd` in
3158   *[\\\"\#\$\&\'\`$am_lf]*)
3159     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3160 esac
3161 case $srcdir in
3162   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3163     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3164 esac
3165
3166 # Do 'set' in a subshell so we don't clobber the current shell's
3167 # arguments.  Must try -L first in case configure is actually a
3168 # symlink; some systems play weird games with the mod time of symlinks
3169 # (eg FreeBSD returns the mod time of the symlink's containing
3170 # directory).
3171 if (
3172    am_has_slept=no
3173    for am_try in 1 2; do
3174      echo "timestamp, slept: $am_has_slept" > conftest.file
3175      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3176      if test "$*" = "X"; then
3177         # -L didn't work.
3178         set X `ls -t "$srcdir/configure" conftest.file`
3179      fi
3180      if test "$*" != "X $srcdir/configure conftest.file" \
3181         && test "$*" != "X conftest.file $srcdir/configure"; then
3182
3183         # If neither matched, then we have a broken ls.  This can happen
3184         # if, for instance, CONFIG_SHELL is bash and it inherits a
3185         # broken ls alias from the environment.  This has actually
3186         # happened.  Such a system could not be considered "sane".
3187         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3188   alias in your environment" "$LINENO" 5
3189      fi
3190      if test "$2" = conftest.file || test $am_try -eq 2; then
3191        break
3192      fi
3193      # Just in case.
3194      sleep 1
3195      am_has_slept=yes
3196    done
3197    test "$2" = conftest.file
3198    )
3199 then
3200    # Ok.
3201    :
3202 else
3203    as_fn_error $? "newly created file is older than distributed files!
3204 Check your system clock" "$LINENO" 5
3205 fi
3206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3207 $as_echo "yes" >&6; }
3208 # If we didn't sleep, we still need to ensure time stamps of config.status and
3209 # generated files are strictly newer.
3210 am_sleep_pid=
3211 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3212   ( sleep 1 ) &
3213   am_sleep_pid=$!
3214 fi
3215
3216 rm -f conftest.file
3217
3218 test "$program_prefix" != NONE &&
3219   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3220 # Use a double $ so make ignores it.
3221 test "$program_suffix" != NONE &&
3222   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3223 # Double any \ or $.
3224 # By default was `s,x,x', remove it if useless.
3225 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3226 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3227
3228 # Expand $ac_aux_dir to an absolute path.
3229 am_aux_dir=`cd "$ac_aux_dir" && pwd`
3230
3231 if test x"${MISSING+set}" != xset; then
3232   case $am_aux_dir in
3233   *\ * | *\     *)
3234     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3235   *)
3236     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3237   esac
3238 fi
3239 # Use eval to expand $SHELL
3240 if eval "$MISSING --is-lightweight"; then
3241   am_missing_run="$MISSING "
3242 else
3243   am_missing_run=
3244   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3245 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3246 fi
3247
3248 if test x"${install_sh+set}" != xset; then
3249   case $am_aux_dir in
3250   *\ * | *\     *)
3251     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3252   *)
3253     install_sh="\${SHELL} $am_aux_dir/install-sh"
3254   esac
3255 fi
3256
3257 # Installed binaries are usually stripped using 'strip' when the user
3258 # run "make install-strip".  However 'strip' might not be the right
3259 # tool to use in cross-compilation environments, therefore Automake
3260 # will honor the 'STRIP' environment variable to overrule this program.
3261 if test "$cross_compiling" != no; then
3262   if test -n "$ac_tool_prefix"; then
3263   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3264 set dummy ${ac_tool_prefix}strip; ac_word=$2
3265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3266 $as_echo_n "checking for $ac_word... " >&6; }
3267 if ${ac_cv_prog_STRIP+:} false; then :
3268   $as_echo_n "(cached) " >&6
3269 else
3270   if test -n "$STRIP"; then
3271   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3272 else
3273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3274 for as_dir in $PATH
3275 do
3276   IFS=$as_save_IFS
3277   test -z "$as_dir" && as_dir=.
3278     for ac_exec_ext in '' $ac_executable_extensions; do
3279   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3280     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3281     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3282     break 2
3283   fi
3284 done
3285   done
3286 IFS=$as_save_IFS
3287
3288 fi
3289 fi
3290 STRIP=$ac_cv_prog_STRIP
3291 if test -n "$STRIP"; then
3292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3293 $as_echo "$STRIP" >&6; }
3294 else
3295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3296 $as_echo "no" >&6; }
3297 fi
3298
3299
3300 fi
3301 if test -z "$ac_cv_prog_STRIP"; then
3302   ac_ct_STRIP=$STRIP
3303   # Extract the first word of "strip", so it can be a program name with args.
3304 set dummy strip; ac_word=$2
3305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3306 $as_echo_n "checking for $ac_word... " >&6; }
3307 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3308   $as_echo_n "(cached) " >&6
3309 else
3310   if test -n "$ac_ct_STRIP"; then
3311   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3312 else
3313 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3314 for as_dir in $PATH
3315 do
3316   IFS=$as_save_IFS
3317   test -z "$as_dir" && as_dir=.
3318     for ac_exec_ext in '' $ac_executable_extensions; do
3319   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3320     ac_cv_prog_ac_ct_STRIP="strip"
3321     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3322     break 2
3323   fi
3324 done
3325   done
3326 IFS=$as_save_IFS
3327
3328 fi
3329 fi
3330 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3331 if test -n "$ac_ct_STRIP"; then
3332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3333 $as_echo "$ac_ct_STRIP" >&6; }
3334 else
3335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3336 $as_echo "no" >&6; }
3337 fi
3338
3339   if test "x$ac_ct_STRIP" = x; then
3340     STRIP=":"
3341   else
3342     case $cross_compiling:$ac_tool_warned in
3343 yes:)
3344 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3345 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3346 ac_tool_warned=yes ;;
3347 esac
3348     STRIP=$ac_ct_STRIP
3349   fi
3350 else
3351   STRIP="$ac_cv_prog_STRIP"
3352 fi
3353
3354 fi
3355 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3356
3357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3358 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3359 if test -z "$MKDIR_P"; then
3360   if ${ac_cv_path_mkdir+:} false; then :
3361   $as_echo_n "(cached) " >&6
3362 else
3363   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3364 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3365 do
3366   IFS=$as_save_IFS
3367   test -z "$as_dir" && as_dir=.
3368     for ac_prog in mkdir gmkdir; do
3369          for ac_exec_ext in '' $ac_executable_extensions; do
3370            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3371            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3372              'mkdir (GNU coreutils) '* | \
3373              'mkdir (coreutils) '* | \
3374              'mkdir (fileutils) '4.1*)
3375                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3376                break 3;;
3377            esac
3378          done
3379        done
3380   done
3381 IFS=$as_save_IFS
3382
3383 fi
3384
3385   test -d ./--version && rmdir ./--version
3386   if test "${ac_cv_path_mkdir+set}" = set; then
3387     MKDIR_P="$ac_cv_path_mkdir -p"
3388   else
3389     # As a last resort, use the slow shell script.  Don't cache a
3390     # value for MKDIR_P within a source directory, because that will
3391     # break other packages using the cache if that directory is
3392     # removed, or if the value is a relative name.
3393     MKDIR_P="$ac_install_sh -d"
3394   fi
3395 fi
3396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3397 $as_echo "$MKDIR_P" >&6; }
3398
3399 for ac_prog in gawk mawk nawk awk
3400 do
3401   # Extract the first word of "$ac_prog", so it can be a program name with args.
3402 set dummy $ac_prog; ac_word=$2
3403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3404 $as_echo_n "checking for $ac_word... " >&6; }
3405 if ${ac_cv_prog_AWK+:} false; then :
3406   $as_echo_n "(cached) " >&6
3407 else
3408   if test -n "$AWK"; then
3409   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3410 else
3411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3412 for as_dir in $PATH
3413 do
3414   IFS=$as_save_IFS
3415   test -z "$as_dir" && as_dir=.
3416     for ac_exec_ext in '' $ac_executable_extensions; do
3417   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3418     ac_cv_prog_AWK="$ac_prog"
3419     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3420     break 2
3421   fi
3422 done
3423   done
3424 IFS=$as_save_IFS
3425
3426 fi
3427 fi
3428 AWK=$ac_cv_prog_AWK
3429 if test -n "$AWK"; then
3430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3431 $as_echo "$AWK" >&6; }
3432 else
3433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3434 $as_echo "no" >&6; }
3435 fi
3436
3437
3438   test -n "$AWK" && break
3439 done
3440
3441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3442 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3443 set x ${MAKE-make}
3444 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3445 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3446   $as_echo_n "(cached) " >&6
3447 else
3448   cat >conftest.make <<\_ACEOF
3449 SHELL = /bin/sh
3450 all:
3451         @echo '@@@%%%=$(MAKE)=@@@%%%'
3452 _ACEOF
3453 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3454 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3455   *@@@%%%=?*=@@@%%%*)
3456     eval ac_cv_prog_make_${ac_make}_set=yes;;
3457   *)
3458     eval ac_cv_prog_make_${ac_make}_set=no;;
3459 esac
3460 rm -f conftest.make
3461 fi
3462 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3464 $as_echo "yes" >&6; }
3465   SET_MAKE=
3466 else
3467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3468 $as_echo "no" >&6; }
3469   SET_MAKE="MAKE=${MAKE-make}"
3470 fi
3471
3472 rm -rf .tst 2>/dev/null
3473 mkdir .tst 2>/dev/null
3474 if test -d .tst; then
3475   am__leading_dot=.
3476 else
3477   am__leading_dot=_
3478 fi
3479 rmdir .tst 2>/dev/null
3480
3481 # Check whether --enable-silent-rules was given.
3482 if test "${enable_silent_rules+set}" = set; then :
3483   enableval=$enable_silent_rules;
3484 fi
3485
3486 case $enable_silent_rules in # (((
3487   yes) AM_DEFAULT_VERBOSITY=0;;
3488    no) AM_DEFAULT_VERBOSITY=1;;
3489     *) AM_DEFAULT_VERBOSITY=1;;
3490 esac
3491 am_make=${MAKE-make}
3492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3493 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3494 if ${am_cv_make_support_nested_variables+:} false; then :
3495   $as_echo_n "(cached) " >&6
3496 else
3497   if $as_echo 'TRUE=$(BAR$(V))
3498 BAR0=false
3499 BAR1=true
3500 V=1
3501 am__doit:
3502         @$(TRUE)
3503 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3504   am_cv_make_support_nested_variables=yes
3505 else
3506   am_cv_make_support_nested_variables=no
3507 fi
3508 fi
3509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3510 $as_echo "$am_cv_make_support_nested_variables" >&6; }
3511 if test $am_cv_make_support_nested_variables = yes; then
3512     AM_V='$(V)'
3513   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3514 else
3515   AM_V=$AM_DEFAULT_VERBOSITY
3516   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3517 fi
3518 AM_BACKSLASH='\'
3519
3520 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3521   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3522   # is not polluted with repeated "-I."
3523   am__isrc=' -I$(srcdir)'
3524   # test to see if srcdir already configured
3525   if test -f $srcdir/config.status; then
3526     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3527   fi
3528 fi
3529
3530 # test whether we have cygpath
3531 if test -z "$CYGPATH_W"; then
3532   if (cygpath --version) >/dev/null 2>/dev/null; then
3533     CYGPATH_W='cygpath -w'
3534   else
3535     CYGPATH_W=echo
3536   fi
3537 fi
3538
3539
3540 # Define the identity of the package.
3541  PACKAGE='sntp'
3542  VERSION='4.2.8p8'
3543
3544
3545 cat >>confdefs.h <<_ACEOF
3546 #define PACKAGE "$PACKAGE"
3547 _ACEOF
3548
3549
3550 cat >>confdefs.h <<_ACEOF
3551 #define VERSION "$VERSION"
3552 _ACEOF
3553
3554 # Some tools Automake needs.
3555
3556 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3557
3558
3559 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3560
3561
3562 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3563
3564
3565 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3566
3567
3568 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3569
3570 # For better backward compatibility.  To be removed once Automake 1.9.x
3571 # dies out for good.  For more background, see:
3572 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3573 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3574 mkdir_p='$(MKDIR_P)'
3575
3576 # We need awk for the "check" target (and possibly the TAP driver).  The
3577 # system "awk" is bad on some platforms.
3578 # Always define AMTAR for backward compatibility.  Yes, it's still used
3579 # in the wild :-(  We should find a proper way to deprecate it ...
3580 AMTAR='$${TAR-tar}'
3581
3582
3583 # We'll loop over all known methods to create a tar archive until one works.
3584 _am_tools='gnutar  pax cpio none'
3585
3586 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3587
3588
3589
3590
3591
3592
3593 # POSIX will say in a future version that running "rm -f" with no argument
3594 # is OK; and we want to be able to make that assumption in our Makefile
3595 # recipes.  So use an aggressive probe to check that the usage we want is
3596 # actually supported "in the wild" to an acceptable degree.
3597 # See automake bug#10828.
3598 # To make any issue more visible, cause the running configure to be aborted
3599 # by default if the 'rm' program in use doesn't match our expectations; the
3600 # user can still override this though.
3601 if rm -f && rm -fr && rm -rf; then : OK; else
3602   cat >&2 <<'END'
3603 Oops!
3604
3605 Your 'rm' program seems unable to run without file operands specified
3606 on the command line, even when the '-f' option is present.  This is contrary
3607 to the behaviour of most rm programs out there, and not conforming with
3608 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3609
3610 Please tell bug-automake@gnu.org about your system, including the value
3611 of your $PATH and any error possibly output before this message.  This
3612 can help us improve future automake versions.
3613
3614 END
3615   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3616     echo 'Configuration will proceed anyway, since you have set the' >&2
3617     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3618     echo >&2
3619   else
3620     cat >&2 <<'END'
3621 Aborting the configuration process, to ensure you take notice of the issue.
3622
3623 You can download and install GNU coreutils to get an 'rm' implementation
3624 that behaves properly: <http://www.gnu.org/software/coreutils/>.
3625
3626 If you want to complete the configuration process using your problematic
3627 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3628 to "yes", and re-run configure.
3629
3630 END
3631     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3632   fi
3633 fi
3634
3635 # Check whether --enable-silent-rules was given.
3636 if test "${enable_silent_rules+set}" = set; then :
3637   enableval=$enable_silent_rules;
3638 fi
3639
3640 case $enable_silent_rules in # (((
3641   yes) AM_DEFAULT_VERBOSITY=0;;
3642    no) AM_DEFAULT_VERBOSITY=1;;
3643     *) AM_DEFAULT_VERBOSITY=0;;
3644 esac
3645 am_make=${MAKE-make}
3646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3647 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3648 if ${am_cv_make_support_nested_variables+:} false; then :
3649   $as_echo_n "(cached) " >&6
3650 else
3651   if $as_echo 'TRUE=$(BAR$(V))
3652 BAR0=false
3653 BAR1=true
3654 V=1
3655 am__doit:
3656         @$(TRUE)
3657 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3658   am_cv_make_support_nested_variables=yes
3659 else
3660   am_cv_make_support_nested_variables=no
3661 fi
3662 fi
3663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3664 $as_echo "$am_cv_make_support_nested_variables" >&6; }
3665 if test $am_cv_make_support_nested_variables = yes; then
3666     AM_V='$(V)'
3667   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3668 else
3669   AM_V=$AM_DEFAULT_VERBOSITY
3670   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3671 fi
3672 AM_BACKSLASH='\'
3673
3674
3675 # Make sure we can run config.sub.
3676 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3677   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3678
3679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3680 $as_echo_n "checking build system type... " >&6; }
3681 if ${ac_cv_build+:} false; then :
3682   $as_echo_n "(cached) " >&6
3683 else
3684   ac_build_alias=$build_alias
3685 test "x$ac_build_alias" = x &&
3686   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3687 test "x$ac_build_alias" = x &&
3688   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3689 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3690   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3691
3692 fi
3693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3694 $as_echo "$ac_cv_build" >&6; }
3695 case $ac_cv_build in
3696 *-*-*) ;;
3697 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3698 esac
3699 build=$ac_cv_build
3700 ac_save_IFS=$IFS; IFS='-'
3701 set x $ac_cv_build
3702 shift
3703 build_cpu=$1
3704 build_vendor=$2
3705 shift; shift
3706 # Remember, the first character of IFS is used to create $*,
3707 # except with old shells:
3708 build_os=$*
3709 IFS=$ac_save_IFS
3710 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3711
3712
3713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3714 $as_echo_n "checking host system type... " >&6; }
3715 if ${ac_cv_host+:} false; then :
3716   $as_echo_n "(cached) " >&6
3717 else
3718   if test "x$host_alias" = x; then
3719   ac_cv_host=$ac_cv_build
3720 else
3721   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3722     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3723 fi
3724
3725 fi
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3727 $as_echo "$ac_cv_host" >&6; }
3728 case $ac_cv_host in
3729 *-*-*) ;;
3730 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3731 esac
3732 host=$ac_cv_host
3733 ac_save_IFS=$IFS; IFS='-'
3734 set x $ac_cv_host
3735 shift
3736 host_cpu=$1
3737 host_vendor=$2
3738 shift; shift
3739 # Remember, the first character of IFS is used to create $*,
3740 # except with old shells:
3741 host_os=$*
3742 IFS=$ac_save_IFS
3743 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3744
3745
3746
3747 cat >>confdefs.h <<_ACEOF
3748 #define STR_SYSTEM "$host"
3749 _ACEOF
3750
3751 ac_config_headers="$ac_config_headers config.h"
3752
3753
3754 DEPDIR="${am__leading_dot}deps"
3755
3756 ac_config_commands="$ac_config_commands depfiles"
3757
3758
3759 am_make=${MAKE-make}
3760 cat > confinc << 'END'
3761 am__doit:
3762         @echo this is the am__doit target
3763 .PHONY: am__doit
3764 END
3765 # If we don't find an include directive, just comment out the code.
3766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3767 $as_echo_n "checking for style of include used by $am_make... " >&6; }
3768 am__include="#"
3769 am__quote=
3770 _am_result=none
3771 # First try GNU make style include.
3772 echo "include confinc" > confmf
3773 # Ignore all kinds of additional output from 'make'.
3774 case `$am_make -s -f confmf 2> /dev/null` in #(
3775 *the\ am__doit\ target*)
3776   am__include=include
3777   am__quote=
3778   _am_result=GNU
3779   ;;
3780 esac
3781 # Now try BSD make style include.
3782 if test "$am__include" = "#"; then
3783    echo '.include "confinc"' > confmf
3784    case `$am_make -s -f confmf 2> /dev/null` in #(
3785    *the\ am__doit\ target*)
3786      am__include=.include
3787      am__quote="\""
3788      _am_result=BSD
3789      ;;
3790    esac
3791 fi
3792
3793
3794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3795 $as_echo "$_am_result" >&6; }
3796 rm -f confinc confmf
3797
3798 # Check whether --enable-dependency-tracking was given.
3799 if test "${enable_dependency_tracking+set}" = set; then :
3800   enableval=$enable_dependency_tracking;
3801 fi
3802
3803 if test "x$enable_dependency_tracking" != xno; then
3804   am_depcomp="$ac_aux_dir/depcomp"
3805   AMDEPBACKSLASH='\'
3806   am__nodep='_no'
3807 fi
3808  if test "x$enable_dependency_tracking" != xno; then
3809   AMDEP_TRUE=
3810   AMDEP_FALSE='#'
3811 else
3812   AMDEP_TRUE='#'
3813   AMDEP_FALSE=
3814 fi
3815
3816
3817 ac_ext=c
3818 ac_cpp='$CPP $CPPFLAGS'
3819 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3820 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3821 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3822 if test -n "$ac_tool_prefix"; then
3823   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3824 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3826 $as_echo_n "checking for $ac_word... " >&6; }
3827 if ${ac_cv_prog_CC+:} false; then :
3828   $as_echo_n "(cached) " >&6
3829 else
3830   if test -n "$CC"; then
3831   ac_cv_prog_CC="$CC" # Let the user override the test.
3832 else
3833 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3834 for as_dir in $PATH
3835 do
3836   IFS=$as_save_IFS
3837   test -z "$as_dir" && as_dir=.
3838     for ac_exec_ext in '' $ac_executable_extensions; do
3839   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3840     ac_cv_prog_CC="${ac_tool_prefix}gcc"
3841     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3842     break 2
3843   fi
3844 done
3845   done
3846 IFS=$as_save_IFS
3847
3848 fi
3849 fi
3850 CC=$ac_cv_prog_CC
3851 if test -n "$CC"; then
3852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3853 $as_echo "$CC" >&6; }
3854 else
3855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3856 $as_echo "no" >&6; }
3857 fi
3858
3859
3860 fi
3861 if test -z "$ac_cv_prog_CC"; then
3862   ac_ct_CC=$CC
3863   # Extract the first word of "gcc", so it can be a program name with args.
3864 set dummy gcc; ac_word=$2
3865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3866 $as_echo_n "checking for $ac_word... " >&6; }
3867 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3868   $as_echo_n "(cached) " >&6
3869 else
3870   if test -n "$ac_ct_CC"; then
3871   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3872 else
3873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3874 for as_dir in $PATH
3875 do
3876   IFS=$as_save_IFS
3877   test -z "$as_dir" && as_dir=.
3878     for ac_exec_ext in '' $ac_executable_extensions; do
3879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3880     ac_cv_prog_ac_ct_CC="gcc"
3881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3882     break 2
3883   fi
3884 done
3885   done
3886 IFS=$as_save_IFS
3887
3888 fi
3889 fi
3890 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3891 if test -n "$ac_ct_CC"; then
3892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3893 $as_echo "$ac_ct_CC" >&6; }
3894 else
3895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3896 $as_echo "no" >&6; }
3897 fi
3898
3899   if test "x$ac_ct_CC" = x; then
3900     CC=""
3901   else
3902     case $cross_compiling:$ac_tool_warned in
3903 yes:)
3904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3905 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3906 ac_tool_warned=yes ;;
3907 esac
3908     CC=$ac_ct_CC
3909   fi
3910 else
3911   CC="$ac_cv_prog_CC"
3912 fi
3913
3914 if test -z "$CC"; then
3915           if test -n "$ac_tool_prefix"; then
3916     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3917 set dummy ${ac_tool_prefix}cc; ac_word=$2
3918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3919 $as_echo_n "checking for $ac_word... " >&6; }
3920 if ${ac_cv_prog_CC+:} false; then :
3921   $as_echo_n "(cached) " >&6
3922 else
3923   if test -n "$CC"; then
3924   ac_cv_prog_CC="$CC" # Let the user override the test.
3925 else
3926 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3927 for as_dir in $PATH
3928 do
3929   IFS=$as_save_IFS
3930   test -z "$as_dir" && as_dir=.
3931     for ac_exec_ext in '' $ac_executable_extensions; do
3932   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3933     ac_cv_prog_CC="${ac_tool_prefix}cc"
3934     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3935     break 2
3936   fi
3937 done
3938   done
3939 IFS=$as_save_IFS
3940
3941 fi
3942 fi
3943 CC=$ac_cv_prog_CC
3944 if test -n "$CC"; then
3945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3946 $as_echo "$CC" >&6; }
3947 else
3948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3949 $as_echo "no" >&6; }
3950 fi
3951
3952
3953   fi
3954 fi
3955 if test -z "$CC"; then
3956   # Extract the first word of "cc", so it can be a program name with args.
3957 set dummy cc; ac_word=$2
3958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3959 $as_echo_n "checking for $ac_word... " >&6; }
3960 if ${ac_cv_prog_CC+:} false; then :
3961   $as_echo_n "(cached) " >&6
3962 else
3963   if test -n "$CC"; then
3964   ac_cv_prog_CC="$CC" # Let the user override the test.
3965 else
3966   ac_prog_rejected=no
3967 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3968 for as_dir in $PATH
3969 do
3970   IFS=$as_save_IFS
3971   test -z "$as_dir" && as_dir=.
3972     for ac_exec_ext in '' $ac_executable_extensions; do
3973   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3974     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3975        ac_prog_rejected=yes
3976        continue
3977      fi
3978     ac_cv_prog_CC="cc"
3979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3980     break 2
3981   fi
3982 done
3983   done
3984 IFS=$as_save_IFS
3985
3986 if test $ac_prog_rejected = yes; then
3987   # We found a bogon in the path, so make sure we never use it.
3988   set dummy $ac_cv_prog_CC
3989   shift
3990   if test $# != 0; then
3991     # We chose a different compiler from the bogus one.
3992     # However, it has the same basename, so the bogon will be chosen
3993     # first if we set CC to just the basename; use the full file name.
3994     shift
3995     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3996   fi
3997 fi
3998 fi
3999 fi
4000 CC=$ac_cv_prog_CC
4001 if test -n "$CC"; then
4002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4003 $as_echo "$CC" >&6; }
4004 else
4005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4006 $as_echo "no" >&6; }
4007 fi
4008
4009
4010 fi
4011 if test -z "$CC"; then
4012   if test -n "$ac_tool_prefix"; then
4013   for ac_prog in cl.exe
4014   do
4015     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4016 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4018 $as_echo_n "checking for $ac_word... " >&6; }
4019 if ${ac_cv_prog_CC+:} false; then :
4020   $as_echo_n "(cached) " >&6
4021 else
4022   if test -n "$CC"; then
4023   ac_cv_prog_CC="$CC" # Let the user override the test.
4024 else
4025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4026 for as_dir in $PATH
4027 do
4028   IFS=$as_save_IFS
4029   test -z "$as_dir" && as_dir=.
4030     for ac_exec_ext in '' $ac_executable_extensions; do
4031   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4032     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4033     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4034     break 2
4035   fi
4036 done
4037   done
4038 IFS=$as_save_IFS
4039
4040 fi
4041 fi
4042 CC=$ac_cv_prog_CC
4043 if test -n "$CC"; then
4044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4045 $as_echo "$CC" >&6; }
4046 else
4047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4048 $as_echo "no" >&6; }
4049 fi
4050
4051
4052     test -n "$CC" && break
4053   done
4054 fi
4055 if test -z "$CC"; then
4056   ac_ct_CC=$CC
4057   for ac_prog in cl.exe
4058 do
4059   # Extract the first word of "$ac_prog", so it can be a program name with args.
4060 set dummy $ac_prog; ac_word=$2
4061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4062 $as_echo_n "checking for $ac_word... " >&6; }
4063 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4064   $as_echo_n "(cached) " >&6
4065 else
4066   if test -n "$ac_ct_CC"; then
4067   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4068 else
4069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4070 for as_dir in $PATH
4071 do
4072   IFS=$as_save_IFS
4073   test -z "$as_dir" && as_dir=.
4074     for ac_exec_ext in '' $ac_executable_extensions; do
4075   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4076     ac_cv_prog_ac_ct_CC="$ac_prog"
4077     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4078     break 2
4079   fi
4080 done
4081   done
4082 IFS=$as_save_IFS
4083
4084 fi
4085 fi
4086 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4087 if test -n "$ac_ct_CC"; then
4088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4089 $as_echo "$ac_ct_CC" >&6; }
4090 else
4091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4092 $as_echo "no" >&6; }
4093 fi
4094
4095
4096   test -n "$ac_ct_CC" && break
4097 done
4098
4099   if test "x$ac_ct_CC" = x; then
4100     CC=""
4101   else
4102     case $cross_compiling:$ac_tool_warned in
4103 yes:)
4104 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4105 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4106 ac_tool_warned=yes ;;
4107 esac
4108     CC=$ac_ct_CC
4109   fi
4110 fi
4111
4112 fi
4113
4114
4115 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4116 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4117 as_fn_error $? "no acceptable C compiler found in \$PATH
4118 See \`config.log' for more details" "$LINENO" 5; }
4119
4120 # Provide some information about the compiler.
4121 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4122 set X $ac_compile
4123 ac_compiler=$2
4124 for ac_option in --version -v -V -qversion; do
4125   { { ac_try="$ac_compiler $ac_option >&5"
4126 case "(($ac_try" in
4127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4128   *) ac_try_echo=$ac_try;;
4129 esac
4130 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4131 $as_echo "$ac_try_echo"; } >&5
4132   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4133   ac_status=$?
4134   if test -s conftest.err; then
4135     sed '10a\
4136 ... rest of stderr output deleted ...
4137          10q' conftest.err >conftest.er1
4138     cat conftest.er1 >&5
4139   fi
4140   rm -f conftest.er1 conftest.err
4141   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4142   test $ac_status = 0; }
4143 done
4144
4145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4146 /* end confdefs.h.  */
4147
4148 int
4149 main ()
4150 {
4151
4152   ;
4153   return 0;
4154 }
4155 _ACEOF
4156 ac_clean_files_save=$ac_clean_files
4157 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4158 # Try to create an executable without -o first, disregard a.out.
4159 # It will help us diagnose broken compilers, and finding out an intuition
4160 # of exeext.
4161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4162 $as_echo_n "checking whether the C compiler works... " >&6; }
4163 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4164
4165 # The possible output files:
4166 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4167
4168 ac_rmfiles=
4169 for ac_file in $ac_files
4170 do
4171   case $ac_file in
4172     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4173     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4174   esac
4175 done
4176 rm -f $ac_rmfiles
4177
4178 if { { ac_try="$ac_link_default"
4179 case "(($ac_try" in
4180   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4181   *) ac_try_echo=$ac_try;;
4182 esac
4183 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4184 $as_echo "$ac_try_echo"; } >&5
4185   (eval "$ac_link_default") 2>&5
4186   ac_status=$?
4187   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4188   test $ac_status = 0; }; then :
4189   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4190 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4191 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4192 # so that the user can short-circuit this test for compilers unknown to
4193 # Autoconf.
4194 for ac_file in $ac_files ''
4195 do
4196   test -f "$ac_file" || continue
4197   case $ac_file in
4198     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4199         ;;
4200     [ab].out )
4201         # We found the default executable, but exeext='' is most
4202         # certainly right.
4203         break;;
4204     *.* )
4205         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4206         then :; else
4207            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4208         fi
4209         # We set ac_cv_exeext here because the later test for it is not
4210         # safe: cross compilers may not add the suffix if given an `-o'
4211         # argument, so we may need to know it at that point already.
4212         # Even if this section looks crufty: it has the advantage of
4213         # actually working.
4214         break;;
4215     * )
4216         break;;
4217   esac
4218 done
4219 test "$ac_cv_exeext" = no && ac_cv_exeext=
4220
4221 else
4222   ac_file=''
4223 fi
4224 if test -z "$ac_file"; then :
4225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4226 $as_echo "no" >&6; }
4227 $as_echo "$as_me: failed program was:" >&5
4228 sed 's/^/| /' conftest.$ac_ext >&5
4229
4230 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4231 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4232 as_fn_error 77 "C compiler cannot create executables
4233 See \`config.log' for more details" "$LINENO" 5; }
4234 else
4235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4236 $as_echo "yes" >&6; }
4237 fi
4238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4239 $as_echo_n "checking for C compiler default output file name... " >&6; }
4240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4241 $as_echo "$ac_file" >&6; }
4242 ac_exeext=$ac_cv_exeext
4243
4244 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4245 ac_clean_files=$ac_clean_files_save
4246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4247 $as_echo_n "checking for suffix of executables... " >&6; }
4248 if { { ac_try="$ac_link"
4249 case "(($ac_try" in
4250   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4251   *) ac_try_echo=$ac_try;;
4252 esac
4253 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4254 $as_echo "$ac_try_echo"; } >&5
4255   (eval "$ac_link") 2>&5
4256   ac_status=$?
4257   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4258   test $ac_status = 0; }; then :
4259   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4260 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4261 # work properly (i.e., refer to `conftest.exe'), while it won't with
4262 # `rm'.
4263 for ac_file in conftest.exe conftest conftest.*; do
4264   test -f "$ac_file" || continue
4265   case $ac_file in
4266     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4267     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4268           break;;
4269     * ) break;;
4270   esac
4271 done
4272 else
4273   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4274 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4275 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4276 See \`config.log' for more details" "$LINENO" 5; }
4277 fi
4278 rm -f conftest conftest$ac_cv_exeext
4279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4280 $as_echo "$ac_cv_exeext" >&6; }
4281
4282 rm -f conftest.$ac_ext
4283 EXEEXT=$ac_cv_exeext
4284 ac_exeext=$EXEEXT
4285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4286 /* end confdefs.h.  */
4287 #include <stdio.h>
4288 int
4289 main ()
4290 {
4291 FILE *f = fopen ("conftest.out", "w");
4292  return ferror (f) || fclose (f) != 0;
4293
4294   ;
4295   return 0;
4296 }
4297 _ACEOF
4298 ac_clean_files="$ac_clean_files conftest.out"
4299 # Check that the compiler produces executables we can run.  If not, either
4300 # the compiler is broken, or we cross compile.
4301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4302 $as_echo_n "checking whether we are cross compiling... " >&6; }
4303 if test "$cross_compiling" != yes; then
4304   { { ac_try="$ac_link"
4305 case "(($ac_try" in
4306   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4307   *) ac_try_echo=$ac_try;;
4308 esac
4309 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4310 $as_echo "$ac_try_echo"; } >&5
4311   (eval "$ac_link") 2>&5
4312   ac_status=$?
4313   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4314   test $ac_status = 0; }
4315   if { ac_try='./conftest$ac_cv_exeext'
4316   { { case "(($ac_try" in
4317   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4318   *) ac_try_echo=$ac_try;;
4319 esac
4320 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4321 $as_echo "$ac_try_echo"; } >&5
4322   (eval "$ac_try") 2>&5
4323   ac_status=$?
4324   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4325   test $ac_status = 0; }; }; then
4326     cross_compiling=no
4327   else
4328     if test "$cross_compiling" = maybe; then
4329         cross_compiling=yes
4330     else
4331         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4332 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4333 as_fn_error $? "cannot run C compiled programs.
4334 If you meant to cross compile, use \`--host'.
4335 See \`config.log' for more details" "$LINENO" 5; }
4336     fi
4337   fi
4338 fi
4339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4340 $as_echo "$cross_compiling" >&6; }
4341
4342 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4343 ac_clean_files=$ac_clean_files_save
4344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4345 $as_echo_n "checking for suffix of object files... " >&6; }
4346 if ${ac_cv_objext+:} false; then :
4347   $as_echo_n "(cached) " >&6
4348 else
4349   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4350 /* end confdefs.h.  */
4351
4352 int
4353 main ()
4354 {
4355
4356   ;
4357   return 0;
4358 }
4359 _ACEOF
4360 rm -f conftest.o conftest.obj
4361 if { { ac_try="$ac_compile"
4362 case "(($ac_try" in
4363   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4364   *) ac_try_echo=$ac_try;;
4365 esac
4366 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4367 $as_echo "$ac_try_echo"; } >&5
4368   (eval "$ac_compile") 2>&5
4369   ac_status=$?
4370   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4371   test $ac_status = 0; }; then :
4372   for ac_file in conftest.o conftest.obj conftest.*; do
4373   test -f "$ac_file" || continue;
4374   case $ac_file in
4375     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4376     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4377        break;;
4378   esac
4379 done
4380 else
4381   $as_echo "$as_me: failed program was:" >&5
4382 sed 's/^/| /' conftest.$ac_ext >&5
4383
4384 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4385 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4386 as_fn_error $? "cannot compute suffix of object files: cannot compile
4387 See \`config.log' for more details" "$LINENO" 5; }
4388 fi
4389 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4390 fi
4391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4392 $as_echo "$ac_cv_objext" >&6; }
4393 OBJEXT=$ac_cv_objext
4394 ac_objext=$OBJEXT
4395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4396 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4397 if ${ac_cv_c_compiler_gnu+:} false; then :
4398   $as_echo_n "(cached) " >&6
4399 else
4400   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4401 /* end confdefs.h.  */
4402
4403 int
4404 main ()
4405 {
4406 #ifndef __GNUC__
4407        choke me
4408 #endif
4409
4410   ;
4411   return 0;
4412 }
4413 _ACEOF
4414 if ac_fn_c_try_compile "$LINENO"; then :
4415   ac_compiler_gnu=yes
4416 else
4417   ac_compiler_gnu=no
4418 fi
4419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4420 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4421
4422 fi
4423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4424 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4425 if test $ac_compiler_gnu = yes; then
4426   GCC=yes
4427 else
4428   GCC=
4429 fi
4430 ac_test_CFLAGS=${CFLAGS+set}
4431 ac_save_CFLAGS=$CFLAGS
4432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4433 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4434 if ${ac_cv_prog_cc_g+:} false; then :
4435   $as_echo_n "(cached) " >&6
4436 else
4437   ac_save_c_werror_flag=$ac_c_werror_flag
4438    ac_c_werror_flag=yes
4439    ac_cv_prog_cc_g=no
4440    CFLAGS="-g"
4441    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4442 /* end confdefs.h.  */
4443
4444 int
4445 main ()
4446 {
4447
4448   ;
4449   return 0;
4450 }
4451 _ACEOF
4452 if ac_fn_c_try_compile "$LINENO"; then :
4453   ac_cv_prog_cc_g=yes
4454 else
4455   CFLAGS=""
4456       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4457 /* end confdefs.h.  */
4458
4459 int
4460 main ()
4461 {
4462
4463   ;
4464   return 0;
4465 }
4466 _ACEOF
4467 if ac_fn_c_try_compile "$LINENO"; then :
4468
4469 else
4470   ac_c_werror_flag=$ac_save_c_werror_flag
4471          CFLAGS="-g"
4472          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4473 /* end confdefs.h.  */
4474
4475 int
4476 main ()
4477 {
4478
4479   ;
4480   return 0;
4481 }
4482 _ACEOF
4483 if ac_fn_c_try_compile "$LINENO"; then :
4484   ac_cv_prog_cc_g=yes
4485 fi
4486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4487 fi
4488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4489 fi
4490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4491    ac_c_werror_flag=$ac_save_c_werror_flag
4492 fi
4493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4494 $as_echo "$ac_cv_prog_cc_g" >&6; }
4495 if test "$ac_test_CFLAGS" = set; then
4496   CFLAGS=$ac_save_CFLAGS
4497 elif test $ac_cv_prog_cc_g = yes; then
4498   if test "$GCC" = yes; then
4499     CFLAGS="-g -O2"
4500   else
4501     CFLAGS="-g"
4502   fi
4503 else
4504   if test "$GCC" = yes; then
4505     CFLAGS="-O2"
4506   else
4507     CFLAGS=
4508   fi
4509 fi
4510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4511 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4512 if ${ac_cv_prog_cc_c89+:} false; then :
4513   $as_echo_n "(cached) " >&6
4514 else
4515   ac_cv_prog_cc_c89=no
4516 ac_save_CC=$CC
4517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4518 /* end confdefs.h.  */
4519 #include <stdarg.h>
4520 #include <stdio.h>
4521 struct stat;
4522 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4523 struct buf { int x; };
4524 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4525 static char *e (p, i)
4526      char **p;
4527      int i;
4528 {
4529   return p[i];
4530 }
4531 static char *f (char * (*g) (char **, int), char **p, ...)
4532 {
4533   char *s;
4534   va_list v;
4535   va_start (v,p);
4536   s = g (p, va_arg (v,int));
4537   va_end (v);
4538   return s;
4539 }
4540
4541 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4542    function prototypes and stuff, but not '\xHH' hex character constants.
4543    These don't provoke an error unfortunately, instead are silently treated
4544    as 'x'.  The following induces an error, until -std is added to get
4545    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4546    array size at least.  It's necessary to write '\x00'==0 to get something
4547    that's true only with -std.  */
4548 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4549
4550 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4551    inside strings and character constants.  */
4552 #define FOO(x) 'x'
4553 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4554
4555 int test (int i, double x);
4556 struct s1 {int (*f) (int a);};
4557 struct s2 {int (*f) (double a);};
4558 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4559 int argc;
4560 char **argv;
4561 int
4562 main ()
4563 {
4564 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4565   ;
4566   return 0;
4567 }
4568 _ACEOF
4569 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4570         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4571 do
4572   CC="$ac_save_CC $ac_arg"
4573   if ac_fn_c_try_compile "$LINENO"; then :
4574   ac_cv_prog_cc_c89=$ac_arg
4575 fi
4576 rm -f core conftest.err conftest.$ac_objext
4577   test "x$ac_cv_prog_cc_c89" != "xno" && break
4578 done
4579 rm -f conftest.$ac_ext
4580 CC=$ac_save_CC
4581
4582 fi
4583 # AC_CACHE_VAL
4584 case "x$ac_cv_prog_cc_c89" in
4585   x)
4586     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4587 $as_echo "none needed" >&6; } ;;
4588   xno)
4589     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4590 $as_echo "unsupported" >&6; } ;;
4591   *)
4592     CC="$CC $ac_cv_prog_cc_c89"
4593     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4594 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4595 esac
4596 if test "x$ac_cv_prog_cc_c89" != xno; then :
4597
4598 fi
4599
4600 ac_ext=c
4601 ac_cpp='$CPP $CPPFLAGS'
4602 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4603 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4604 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4605
4606 ac_ext=c
4607 ac_cpp='$CPP $CPPFLAGS'
4608 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4609 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4610 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4612 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4613 if ${am_cv_prog_cc_c_o+:} false; then :
4614   $as_echo_n "(cached) " >&6
4615 else
4616   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4617 /* end confdefs.h.  */
4618
4619 int
4620 main ()
4621 {
4622
4623   ;
4624   return 0;
4625 }
4626 _ACEOF
4627   # Make sure it works both with $CC and with simple cc.
4628   # Following AC_PROG_CC_C_O, we do the test twice because some
4629   # compilers refuse to overwrite an existing .o file with -o,
4630   # though they will create one.
4631   am_cv_prog_cc_c_o=yes
4632   for am_i in 1 2; do
4633     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4634    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4635    ac_status=$?
4636    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4637    (exit $ac_status); } \
4638          && test -f conftest2.$ac_objext; then
4639       : OK
4640     else
4641       am_cv_prog_cc_c_o=no
4642       break
4643     fi
4644   done
4645   rm -f core conftest*
4646   unset am_i
4647 fi
4648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4649 $as_echo "$am_cv_prog_cc_c_o" >&6; }
4650 if test "$am_cv_prog_cc_c_o" != yes; then
4651    # Losing compiler, so override with the script.
4652    # FIXME: It is wrong to rewrite CC.
4653    # But if we don't then we get into trouble of one sort or another.
4654    # A longer-term fix would be to have automake use am__CC in this case,
4655    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4656    CC="$am_aux_dir/compile $CC"
4657 fi
4658 ac_ext=c
4659 ac_cpp='$CPP $CPPFLAGS'
4660 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4661 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4662 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4663
4664
4665 depcc="$CC"   am_compiler_list=
4666
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4668 $as_echo_n "checking dependency style of $depcc... " >&6; }
4669 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4670   $as_echo_n "(cached) " >&6
4671 else
4672   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4673   # We make a subdir and do the tests there.  Otherwise we can end up
4674   # making bogus files that we don't know about and never remove.  For
4675   # instance it was reported that on HP-UX the gcc test will end up
4676   # making a dummy file named 'D' -- because '-MD' means "put the output
4677   # in D".
4678   rm -rf conftest.dir
4679   mkdir conftest.dir
4680   # Copy depcomp to subdir because otherwise we won't find it if we're
4681   # using a relative directory.
4682   cp "$am_depcomp" conftest.dir
4683   cd conftest.dir
4684   # We will build objects and dependencies in a subdirectory because
4685   # it helps to detect inapplicable dependency modes.  For instance
4686   # both Tru64's cc and ICC support -MD to output dependencies as a
4687   # side effect of compilation, but ICC will put the dependencies in
4688   # the current directory while Tru64 will put them in the object
4689   # directory.
4690   mkdir sub
4691
4692   am_cv_CC_dependencies_compiler_type=none
4693   if test "$am_compiler_list" = ""; then
4694      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4695   fi
4696   am__universal=false
4697   case " $depcc " in #(
4698      *\ -arch\ *\ -arch\ *) am__universal=true ;;
4699      esac
4700
4701   for depmode in $am_compiler_list; do
4702     # Setup a source with many dependencies, because some compilers
4703     # like to wrap large dependency lists on column 80 (with \), and
4704     # we should not choose a depcomp mode which is confused by this.
4705     #
4706     # We need to recreate these files for each test, as the compiler may
4707     # overwrite some of them when testing with obscure command lines.
4708     # This happens at least with the AIX C compiler.
4709     : > sub/conftest.c
4710     for i in 1 2 3 4 5 6; do
4711       echo '#include "conftst'$i'.h"' >> sub/conftest.c
4712       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4713       # Solaris 10 /bin/sh.
4714       echo '/* dummy */' > sub/conftst$i.h
4715     done
4716     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4717
4718     # We check with '-c' and '-o' for the sake of the "dashmstdout"
4719     # mode.  It turns out that the SunPro C++ compiler does not properly
4720     # handle '-M -o', and we need to detect this.  Also, some Intel
4721     # versions had trouble with output in subdirs.
4722     am__obj=sub/conftest.${OBJEXT-o}
4723     am__minus_obj="-o $am__obj"
4724     case $depmode in
4725     gcc)
4726       # This depmode causes a compiler race in universal mode.
4727       test "$am__universal" = false || continue
4728       ;;
4729     nosideeffect)
4730       # After this tag, mechanisms are not by side-effect, so they'll
4731       # only be used when explicitly requested.
4732       if test "x$enable_dependency_tracking" = xyes; then
4733         continue
4734       else
4735         break
4736       fi
4737       ;;
4738     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4739       # This compiler won't grok '-c -o', but also, the minuso test has
4740       # not run yet.  These depmodes are late enough in the game, and
4741       # so weak that their functioning should not be impacted.
4742       am__obj=conftest.${OBJEXT-o}
4743       am__minus_obj=
4744       ;;
4745     none) break ;;
4746     esac
4747     if depmode=$depmode \
4748        source=sub/conftest.c object=$am__obj \
4749        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4750        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4751          >/dev/null 2>conftest.err &&
4752        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4753        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4754        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4755        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4756       # icc doesn't choke on unknown options, it will just issue warnings
4757       # or remarks (even with -Werror).  So we grep stderr for any message
4758       # that says an option was ignored or not supported.
4759       # When given -MP, icc 7.0 and 7.1 complain thusly:
4760       #   icc: Command line warning: ignoring option '-M'; no argument required
4761       # The diagnosis changed in icc 8.0:
4762       #   icc: Command line remark: option '-MP' not supported
4763       if (grep 'ignoring option' conftest.err ||
4764           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4765         am_cv_CC_dependencies_compiler_type=$depmode
4766         break
4767       fi
4768     fi
4769   done
4770
4771   cd ..
4772   rm -rf conftest.dir
4773 else
4774   am_cv_CC_dependencies_compiler_type=none
4775 fi
4776
4777 fi
4778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4779 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4780 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4781
4782  if
4783   test "x$enable_dependency_tracking" != xno \
4784   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4785   am__fastdepCC_TRUE=
4786   am__fastdepCC_FALSE='#'
4787 else
4788   am__fastdepCC_TRUE='#'
4789   am__fastdepCC_FALSE=
4790 fi
4791
4792
4793
4794 ac_ext=c
4795 ac_cpp='$CPP $CPPFLAGS'
4796 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4797 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4798 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4800 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4801 # On Suns, sometimes $CPP names a directory.
4802 if test -n "$CPP" && test -d "$CPP"; then
4803   CPP=
4804 fi
4805 if test -z "$CPP"; then
4806   if ${ac_cv_prog_CPP+:} false; then :
4807   $as_echo_n "(cached) " >&6
4808 else
4809       # Double quotes because CPP needs to be expanded
4810     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4811     do
4812       ac_preproc_ok=false
4813 for ac_c_preproc_warn_flag in '' yes
4814 do
4815   # Use a header file that comes with gcc, so configuring glibc
4816   # with a fresh cross-compiler works.
4817   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4818   # <limits.h> exists even on freestanding compilers.
4819   # On the NeXT, cc -E runs the code through the compiler's parser,
4820   # not just through cpp. "Syntax error" is here to catch this case.
4821   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4822 /* end confdefs.h.  */
4823 #ifdef __STDC__
4824 # include <limits.h>
4825 #else
4826 # include <assert.h>
4827 #endif
4828                      Syntax error
4829 _ACEOF
4830 if ac_fn_c_try_cpp "$LINENO"; then :
4831
4832 else
4833   # Broken: fails on valid input.
4834 continue
4835 fi
4836 rm -f conftest.err conftest.i conftest.$ac_ext
4837
4838   # OK, works on sane cases.  Now check whether nonexistent headers
4839   # can be detected and how.
4840   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4841 /* end confdefs.h.  */
4842 #include <ac_nonexistent.h>
4843 _ACEOF
4844 if ac_fn_c_try_cpp "$LINENO"; then :
4845   # Broken: success on invalid input.
4846 continue
4847 else
4848   # Passes both tests.
4849 ac_preproc_ok=:
4850 break
4851 fi
4852 rm -f conftest.err conftest.i conftest.$ac_ext
4853
4854 done
4855 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4856 rm -f conftest.i conftest.err conftest.$ac_ext
4857 if $ac_preproc_ok; then :
4858   break
4859 fi
4860
4861     done
4862     ac_cv_prog_CPP=$CPP
4863
4864 fi
4865   CPP=$ac_cv_prog_CPP
4866 else
4867   ac_cv_prog_CPP=$CPP
4868 fi
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4870 $as_echo "$CPP" >&6; }
4871 ac_preproc_ok=false
4872 for ac_c_preproc_warn_flag in '' yes
4873 do
4874   # Use a header file that comes with gcc, so configuring glibc
4875   # with a fresh cross-compiler works.
4876   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4877   # <limits.h> exists even on freestanding compilers.
4878   # On the NeXT, cc -E runs the code through the compiler's parser,
4879   # not just through cpp. "Syntax error" is here to catch this case.
4880   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4881 /* end confdefs.h.  */
4882 #ifdef __STDC__
4883 # include <limits.h>
4884 #else
4885 # include <assert.h>
4886 #endif
4887                      Syntax error
4888 _ACEOF
4889 if ac_fn_c_try_cpp "$LINENO"; then :
4890
4891 else
4892   # Broken: fails on valid input.
4893 continue
4894 fi
4895 rm -f conftest.err conftest.i conftest.$ac_ext
4896
4897   # OK, works on sane cases.  Now check whether nonexistent headers
4898   # can be detected and how.
4899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4900 /* end confdefs.h.  */
4901 #include <ac_nonexistent.h>
4902 _ACEOF
4903 if ac_fn_c_try_cpp "$LINENO"; then :
4904   # Broken: success on invalid input.
4905 continue
4906 else
4907   # Passes both tests.
4908 ac_preproc_ok=:
4909 break
4910 fi
4911 rm -f conftest.err conftest.i conftest.$ac_ext
4912
4913 done
4914 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4915 rm -f conftest.i conftest.err conftest.$ac_ext
4916 if $ac_preproc_ok; then :
4917
4918 else
4919   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4920 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4921 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4922 See \`config.log' for more details" "$LINENO" 5; }
4923 fi
4924
4925 ac_ext=c
4926 ac_cpp='$CPP $CPPFLAGS'
4927 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4928 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4929 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4930
4931
4932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4933 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4934 if ${ac_cv_path_GREP+:} false; then :
4935   $as_echo_n "(cached) " >&6
4936 else
4937   if test -z "$GREP"; then
4938   ac_path_GREP_found=false
4939   # Loop through the user's path and test for each of PROGNAME-LIST
4940   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4941 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4942 do
4943   IFS=$as_save_IFS
4944   test -z "$as_dir" && as_dir=.
4945     for ac_prog in grep ggrep; do
4946     for ac_exec_ext in '' $ac_executable_extensions; do
4947       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4948       as_fn_executable_p "$ac_path_GREP" || continue
4949 # Check for GNU ac_path_GREP and select it if it is found.
4950   # Check for GNU $ac_path_GREP
4951 case `"$ac_path_GREP" --version 2>&1` in
4952 *GNU*)
4953   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4954 *)
4955   ac_count=0
4956   $as_echo_n 0123456789 >"conftest.in"
4957   while :
4958   do
4959     cat "conftest.in" "conftest.in" >"conftest.tmp"
4960     mv "conftest.tmp" "conftest.in"
4961     cp "conftest.in" "conftest.nl"
4962     $as_echo 'GREP' >> "conftest.nl"
4963     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4964     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4965     as_fn_arith $ac_count + 1 && ac_count=$as_val
4966     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4967       # Best one so far, save it but keep looking for a better one
4968       ac_cv_path_GREP="$ac_path_GREP"
4969       ac_path_GREP_max=$ac_count
4970     fi
4971     # 10*(2^10) chars as input seems more than enough
4972     test $ac_count -gt 10 && break
4973   done
4974   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4975 esac
4976
4977       $ac_path_GREP_found && break 3
4978     done
4979   done
4980   done
4981 IFS=$as_save_IFS
4982   if test -z "$ac_cv_path_GREP"; then
4983     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4984   fi
4985 else
4986   ac_cv_path_GREP=$GREP
4987 fi
4988
4989 fi
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4991 $as_echo "$ac_cv_path_GREP" >&6; }
4992  GREP="$ac_cv_path_GREP"
4993
4994
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4996 $as_echo_n "checking for egrep... " >&6; }
4997 if ${ac_cv_path_EGREP+:} false; then :
4998   $as_echo_n "(cached) " >&6
4999 else
5000   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5001    then ac_cv_path_EGREP="$GREP -E"
5002    else
5003      if test -z "$EGREP"; then
5004   ac_path_EGREP_found=false
5005   # Loop through the user's path and test for each of PROGNAME-LIST
5006   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5007 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5008 do
5009   IFS=$as_save_IFS
5010   test -z "$as_dir" && as_dir=.
5011     for ac_prog in egrep; do
5012     for ac_exec_ext in '' $ac_executable_extensions; do
5013       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5014       as_fn_executable_p "$ac_path_EGREP" || continue
5015 # Check for GNU ac_path_EGREP and select it if it is found.
5016   # Check for GNU $ac_path_EGREP
5017 case `"$ac_path_EGREP" --version 2>&1` in
5018 *GNU*)
5019   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5020 *)
5021   ac_count=0
5022   $as_echo_n 0123456789 >"conftest.in"
5023   while :
5024   do
5025     cat "conftest.in" "conftest.in" >"conftest.tmp"
5026     mv "conftest.tmp" "conftest.in"
5027     cp "conftest.in" "conftest.nl"
5028     $as_echo 'EGREP' >> "conftest.nl"
5029     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5030     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5031     as_fn_arith $ac_count + 1 && ac_count=$as_val
5032     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5033       # Best one so far, save it but keep looking for a better one
5034       ac_cv_path_EGREP="$ac_path_EGREP"
5035       ac_path_EGREP_max=$ac_count
5036     fi
5037     # 10*(2^10) chars as input seems more than enough
5038     test $ac_count -gt 10 && break
5039   done
5040   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5041 esac
5042
5043       $ac_path_EGREP_found && break 3
5044     done
5045   done
5046   done
5047 IFS=$as_save_IFS
5048   if test -z "$ac_cv_path_EGREP"; then
5049     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5050   fi
5051 else
5052   ac_cv_path_EGREP=$EGREP
5053 fi
5054
5055    fi
5056 fi
5057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5058 $as_echo "$ac_cv_path_EGREP" >&6; }
5059  EGREP="$ac_cv_path_EGREP"
5060
5061
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5063 $as_echo_n "checking for ANSI C header files... " >&6; }
5064 if ${ac_cv_header_stdc+:} false; then :
5065   $as_echo_n "(cached) " >&6
5066 else
5067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5068 /* end confdefs.h.  */
5069 #include <stdlib.h>
5070 #include <stdarg.h>
5071 #include <string.h>
5072 #include <float.h>
5073
5074 int
5075 main ()
5076 {
5077
5078   ;
5079   return 0;
5080 }
5081 _ACEOF
5082 if ac_fn_c_try_compile "$LINENO"; then :
5083   ac_cv_header_stdc=yes
5084 else
5085   ac_cv_header_stdc=no
5086 fi
5087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5088
5089 if test $ac_cv_header_stdc = yes; then
5090   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5092 /* end confdefs.h.  */
5093 #include <string.h>
5094
5095 _ACEOF
5096 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5097   $EGREP "memchr" >/dev/null 2>&1; then :
5098
5099 else
5100   ac_cv_header_stdc=no
5101 fi
5102 rm -f conftest*
5103
5104 fi
5105
5106 if test $ac_cv_header_stdc = yes; then
5107   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5108   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5109 /* end confdefs.h.  */
5110 #include <stdlib.h>
5111
5112 _ACEOF
5113 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5114   $EGREP "free" >/dev/null 2>&1; then :
5115
5116 else
5117   ac_cv_header_stdc=no
5118 fi
5119 rm -f conftest*
5120
5121 fi
5122
5123 if test $ac_cv_header_stdc = yes; then
5124   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5125   if test "$cross_compiling" = yes; then :
5126   :
5127 else
5128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5129 /* end confdefs.h.  */
5130 #include <ctype.h>
5131 #include <stdlib.h>
5132 #if ((' ' & 0x0FF) == 0x020)
5133 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5134 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5135 #else
5136 # define ISLOWER(c) \
5137                    (('a' <= (c) && (c) <= 'i') \
5138                      || ('j' <= (c) && (c) <= 'r') \
5139                      || ('s' <= (c) && (c) <= 'z'))
5140 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5141 #endif
5142
5143 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5144 int
5145 main ()
5146 {
5147   int i;
5148   for (i = 0; i < 256; i++)
5149     if (XOR (islower (i), ISLOWER (i))
5150         || toupper (i) != TOUPPER (i))
5151       return 2;
5152   return 0;
5153 }
5154 _ACEOF
5155 if ac_fn_c_try_run "$LINENO"; then :
5156
5157 else
5158   ac_cv_header_stdc=no
5159 fi
5160 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5161   conftest.$ac_objext conftest.beam conftest.$ac_ext
5162 fi
5163
5164 fi
5165 fi
5166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5167 $as_echo "$ac_cv_header_stdc" >&6; }
5168 if test $ac_cv_header_stdc = yes; then
5169
5170 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5171
5172 fi
5173
5174 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5175 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5176                   inttypes.h stdint.h unistd.h
5177 do :
5178   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5179 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5180 "
5181 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5182   cat >>confdefs.h <<_ACEOF
5183 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5184 _ACEOF
5185
5186 fi
5187
5188 done
5189
5190
5191
5192
5193
5194   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5195 if test "x$ac_cv_header_minix_config_h" = xyes; then :
5196   MINIX=yes
5197 else
5198   MINIX=
5199 fi
5200
5201
5202   if test "$MINIX" = yes; then
5203
5204 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5205
5206
5207 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5208
5209
5210 $as_echo "#define _MINIX 1" >>confdefs.h
5211
5212   fi
5213
5214         case "$host_os" in
5215     hpux*)
5216
5217 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5218
5219       ;;
5220   esac
5221
5222
5223   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5224 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5225 if ${ac_cv_safe_to_define___extensions__+:} false; then :
5226   $as_echo_n "(cached) " >&6
5227 else
5228   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5229 /* end confdefs.h.  */
5230
5231 #         define __EXTENSIONS__ 1
5232           $ac_includes_default
5233 int
5234 main ()
5235 {
5236
5237   ;
5238   return 0;
5239 }
5240 _ACEOF
5241 if ac_fn_c_try_compile "$LINENO"; then :
5242   ac_cv_safe_to_define___extensions__=yes
5243 else
5244   ac_cv_safe_to_define___extensions__=no
5245 fi
5246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5247 fi
5248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5249 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5250   test $ac_cv_safe_to_define___extensions__ = yes &&
5251     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5252
5253   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5254
5255   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5256
5257   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5258
5259   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5260
5261
5262
5263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5264 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5265 if ${ac_cv_prog_cc_c89+:} false; then :
5266   $as_echo_n "(cached) " >&6
5267 else
5268   ac_cv_prog_cc_c89=no
5269 ac_save_CC=$CC
5270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5271 /* end confdefs.h.  */
5272 #include <stdarg.h>
5273 #include <stdio.h>
5274 struct stat;
5275 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5276 struct buf { int x; };
5277 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5278 static char *e (p, i)
5279      char **p;
5280      int i;
5281 {
5282   return p[i];
5283 }
5284 static char *f (char * (*g) (char **, int), char **p, ...)
5285 {
5286   char *s;
5287   va_list v;
5288   va_start (v,p);
5289   s = g (p, va_arg (v,int));
5290   va_end (v);
5291   return s;
5292 }
5293
5294 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5295    function prototypes and stuff, but not '\xHH' hex character constants.
5296    These don't provoke an error unfortunately, instead are silently treated
5297    as 'x'.  The following induces an error, until -std is added to get
5298    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5299    array size at least.  It's necessary to write '\x00'==0 to get something
5300    that's true only with -std.  */
5301 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5302
5303 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5304    inside strings and character constants.  */
5305 #define FOO(x) 'x'
5306 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5307
5308 int test (int i, double x);
5309 struct s1 {int (*f) (int a);};
5310 struct s2 {int (*f) (double a);};
5311 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5312 int argc;
5313 char **argv;
5314 int
5315 main ()
5316 {
5317 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5318   ;
5319   return 0;
5320 }
5321 _ACEOF
5322 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5323         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5324 do
5325   CC="$ac_save_CC $ac_arg"
5326   if ac_fn_c_try_compile "$LINENO"; then :
5327   ac_cv_prog_cc_c89=$ac_arg
5328 fi
5329 rm -f core conftest.err conftest.$ac_objext
5330   test "x$ac_cv_prog_cc_c89" != "xno" && break
5331 done
5332 rm -f conftest.$ac_ext
5333 CC=$ac_save_CC
5334
5335 fi
5336 # AC_CACHE_VAL
5337 case "x$ac_cv_prog_cc_c89" in
5338   x)
5339     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5340 $as_echo "none needed" >&6; } ;;
5341   xno)
5342     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5343 $as_echo "unsupported" >&6; } ;;
5344   *)
5345     CC="$CC $ac_cv_prog_cc_c89"
5346     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5347 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5348 esac
5349 if test "x$ac_cv_prog_cc_c89" != xno; then :
5350
5351 fi
5352
5353
5354    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
5355 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
5356 if ${ac_cv_prog_cc_c99+:} false; then :
5357   $as_echo_n "(cached) " >&6
5358 else
5359   ac_cv_prog_cc_c99=no
5360 ac_save_CC=$CC
5361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5362 /* end confdefs.h.  */
5363 #include <stdarg.h>
5364 #include <stdbool.h>
5365 #include <stdlib.h>
5366 #include <wchar.h>
5367 #include <stdio.h>
5368
5369 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
5370 #define debug(...) fprintf (stderr, __VA_ARGS__)
5371 #define showlist(...) puts (#__VA_ARGS__)
5372 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5373 static void
5374 test_varargs_macros (void)
5375 {
5376   int x = 1234;
5377   int y = 5678;
5378   debug ("Flag");
5379   debug ("X = %d\n", x);
5380   showlist (The first, second, and third items.);
5381   report (x>y, "x is %d but y is %d", x, y);
5382 }
5383
5384 // Check long long types.
5385 #define BIG64 18446744073709551615ull
5386 #define BIG32 4294967295ul
5387 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5388 #if !BIG_OK
5389   your preprocessor is broken;
5390 #endif
5391 #if BIG_OK
5392 #else
5393   your preprocessor is broken;
5394 #endif
5395 static long long int bignum = -9223372036854775807LL;
5396 static unsigned long long int ubignum = BIG64;
5397
5398 struct incomplete_array
5399 {
5400   int datasize;
5401   double data[];
5402 };
5403
5404 struct named_init {
5405   int number;
5406   const wchar_t *name;
5407   double average;
5408 };
5409
5410 typedef const char *ccp;
5411
5412 static inline int
5413 test_restrict (ccp restrict text)
5414 {
5415   // See if C++-style comments work.
5416   // Iterate through items via the restricted pointer.
5417   // Also check for declarations in for loops.
5418   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5419     continue;
5420   return 0;
5421 }
5422
5423 // Check varargs and va_copy.
5424 static void
5425 test_varargs (const char *format, ...)
5426 {
5427   va_list args;
5428   va_start (args, format);
5429   va_list args_copy;
5430   va_copy (args_copy, args);
5431
5432   const char *str;
5433   int number;
5434   float fnumber;
5435
5436   while (*format)
5437     {
5438       switch (*format++)
5439         {
5440         case 's': // string
5441           str = va_arg (args_copy, const char *);
5442           break;
5443         case 'd': // int
5444           number = va_arg (args_copy, int);
5445           break;
5446         case 'f': // float
5447           fnumber = va_arg (args_copy, double);
5448           break;
5449         default:
5450           break;
5451         }
5452     }
5453   va_end (args_copy);
5454   va_end (args);
5455 }
5456
5457 int
5458 main ()
5459 {
5460
5461   // Check bool.
5462   _Bool success = false;
5463
5464   // Check restrict.
5465   if (test_restrict ("String literal") == 0)
5466     success = true;
5467   char *restrict newvar = "Another string";
5468
5469   // Check varargs.
5470   test_varargs ("s, d' f .", "string", 65, 34.234);
5471   test_varargs_macros ();
5472
5473   // Check flexible array members.
5474   struct incomplete_array *ia =
5475     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5476   ia->datasize = 10;
5477   for (int i = 0; i < ia->datasize; ++i)
5478     ia->data[i] = i * 1.234;
5479
5480   // Check named initializers.
5481   struct named_init ni = {
5482     .number = 34,
5483     .name = L"Test wide string",
5484     .average = 543.34343,
5485   };
5486
5487   ni.number = 58;
5488
5489   int dynamic_array[ni.number];
5490   dynamic_array[ni.number - 1] = 543;
5491
5492   // work around unused variable warnings
5493   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5494           || dynamic_array[ni.number - 1] != 543);
5495
5496   ;
5497   return 0;
5498 }
5499 _ACEOF
5500 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
5501 do
5502   CC="$ac_save_CC $ac_arg"
5503   if ac_fn_c_try_compile "$LINENO"; then :
5504   ac_cv_prog_cc_c99=$ac_arg
5505 fi
5506 rm -f core conftest.err conftest.$ac_objext
5507   test "x$ac_cv_prog_cc_c99" != "xno" && break
5508 done
5509 rm -f conftest.$ac_ext
5510 CC=$ac_save_CC
5511
5512 fi
5513 # AC_CACHE_VAL
5514 case "x$ac_cv_prog_cc_c99" in
5515   x)
5516     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5517 $as_echo "none needed" >&6; } ;;
5518   xno)
5519     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5520 $as_echo "unsupported" >&6; } ;;
5521   *)
5522     CC="$CC $ac_cv_prog_cc_c99"
5523     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5524 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5525 esac
5526 if test "x$ac_cv_prog_cc_c99" != xno; then :
5527
5528 fi
5529
5530
5531
5532
5533
5534
5535 ac_ext=c
5536 ac_cpp='$CPP $CPPFLAGS'
5537 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5538 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5539 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5540 if test -n "$ac_tool_prefix"; then
5541   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5542 set dummy ${ac_tool_prefix}gcc; ac_word=$2
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5544 $as_echo_n "checking for $ac_word... " >&6; }
5545 if ${ac_cv_prog_CC+:} false; then :
5546   $as_echo_n "(cached) " >&6
5547 else
5548   if test -n "$CC"; then
5549   ac_cv_prog_CC="$CC" # Let the user override the test.
5550 else
5551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5552 for as_dir in $PATH
5553 do
5554   IFS=$as_save_IFS
5555   test -z "$as_dir" && as_dir=.
5556     for ac_exec_ext in '' $ac_executable_extensions; do
5557   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5558     ac_cv_prog_CC="${ac_tool_prefix}gcc"
5559     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5560     break 2
5561   fi
5562 done
5563   done
5564 IFS=$as_save_IFS
5565
5566 fi
5567 fi
5568 CC=$ac_cv_prog_CC
5569 if test -n "$CC"; then
5570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5571 $as_echo "$CC" >&6; }
5572 else
5573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5574 $as_echo "no" >&6; }
5575 fi
5576
5577
5578 fi
5579 if test -z "$ac_cv_prog_CC"; then
5580   ac_ct_CC=$CC
5581   # Extract the first word of "gcc", so it can be a program name with args.
5582 set dummy gcc; ac_word=$2
5583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5584 $as_echo_n "checking for $ac_word... " >&6; }
5585 if ${ac_cv_prog_ac_ct_CC+:} false; then :
5586   $as_echo_n "(cached) " >&6
5587 else
5588   if test -n "$ac_ct_CC"; then
5589   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5590 else
5591 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5592 for as_dir in $PATH
5593 do
5594   IFS=$as_save_IFS
5595   test -z "$as_dir" && as_dir=.
5596     for ac_exec_ext in '' $ac_executable_extensions; do
5597   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5598     ac_cv_prog_ac_ct_CC="gcc"
5599     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5600     break 2
5601   fi
5602 done
5603   done
5604 IFS=$as_save_IFS
5605
5606 fi
5607 fi
5608 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5609 if test -n "$ac_ct_CC"; then
5610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5611 $as_echo "$ac_ct_CC" >&6; }
5612 else
5613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5614 $as_echo "no" >&6; }
5615 fi
5616
5617   if test "x$ac_ct_CC" = x; then
5618     CC=""
5619   else
5620     case $cross_compiling:$ac_tool_warned in
5621 yes:)
5622 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5623 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5624 ac_tool_warned=yes ;;
5625 esac
5626     CC=$ac_ct_CC
5627   fi
5628 else
5629   CC="$ac_cv_prog_CC"
5630 fi
5631
5632 if test -z "$CC"; then
5633           if test -n "$ac_tool_prefix"; then
5634     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5635 set dummy ${ac_tool_prefix}cc; ac_word=$2
5636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5637 $as_echo_n "checking for $ac_word... " >&6; }
5638 if ${ac_cv_prog_CC+:} false; then :
5639   $as_echo_n "(cached) " >&6
5640 else
5641   if test -n "$CC"; then
5642   ac_cv_prog_CC="$CC" # Let the user override the test.
5643 else
5644 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5645 for as_dir in $PATH
5646 do
5647   IFS=$as_save_IFS
5648   test -z "$as_dir" && as_dir=.
5649     for ac_exec_ext in '' $ac_executable_extensions; do
5650   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5651     ac_cv_prog_CC="${ac_tool_prefix}cc"
5652     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5653     break 2
5654   fi
5655 done
5656   done
5657 IFS=$as_save_IFS
5658
5659 fi
5660 fi
5661 CC=$ac_cv_prog_CC
5662 if test -n "$CC"; then
5663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5664 $as_echo "$CC" >&6; }
5665 else
5666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5667 $as_echo "no" >&6; }
5668 fi
5669
5670
5671   fi
5672 fi
5673 if test -z "$CC"; then
5674   # Extract the first word of "cc", so it can be a program name with args.
5675 set dummy cc; ac_word=$2
5676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5677 $as_echo_n "checking for $ac_word... " >&6; }
5678 if ${ac_cv_prog_CC+:} false; then :
5679   $as_echo_n "(cached) " >&6
5680 else
5681   if test -n "$CC"; then
5682   ac_cv_prog_CC="$CC" # Let the user override the test.
5683 else
5684   ac_prog_rejected=no
5685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5686 for as_dir in $PATH
5687 do
5688   IFS=$as_save_IFS
5689   test -z "$as_dir" && as_dir=.
5690     for ac_exec_ext in '' $ac_executable_extensions; do
5691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5692     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5693        ac_prog_rejected=yes
5694        continue
5695      fi
5696     ac_cv_prog_CC="cc"
5697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5698     break 2
5699   fi
5700 done
5701   done
5702 IFS=$as_save_IFS
5703
5704 if test $ac_prog_rejected = yes; then
5705   # We found a bogon in the path, so make sure we never use it.
5706   set dummy $ac_cv_prog_CC
5707   shift
5708   if test $# != 0; then
5709     # We chose a different compiler from the bogus one.
5710     # However, it has the same basename, so the bogon will be chosen
5711     # first if we set CC to just the basename; use the full file name.
5712     shift
5713     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5714   fi
5715 fi
5716 fi
5717 fi
5718 CC=$ac_cv_prog_CC
5719 if test -n "$CC"; then
5720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5721 $as_echo "$CC" >&6; }
5722 else
5723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5724 $as_echo "no" >&6; }
5725 fi
5726
5727
5728 fi
5729 if test -z "$CC"; then
5730   if test -n "$ac_tool_prefix"; then
5731   for ac_prog in cl.exe
5732   do
5733     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5734 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5736 $as_echo_n "checking for $ac_word... " >&6; }
5737 if ${ac_cv_prog_CC+:} false; then :
5738   $as_echo_n "(cached) " >&6
5739 else
5740   if test -n "$CC"; then
5741   ac_cv_prog_CC="$CC" # Let the user override the test.
5742 else
5743 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5744 for as_dir in $PATH
5745 do
5746   IFS=$as_save_IFS
5747   test -z "$as_dir" && as_dir=.
5748     for ac_exec_ext in '' $ac_executable_extensions; do
5749   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5750     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5751     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5752     break 2
5753   fi
5754 done
5755   done
5756 IFS=$as_save_IFS
5757
5758 fi
5759 fi
5760 CC=$ac_cv_prog_CC
5761 if test -n "$CC"; then
5762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5763 $as_echo "$CC" >&6; }
5764 else
5765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5766 $as_echo "no" >&6; }
5767 fi
5768
5769
5770     test -n "$CC" && break
5771   done
5772 fi
5773 if test -z "$CC"; then
5774   ac_ct_CC=$CC
5775   for ac_prog in cl.exe
5776 do
5777   # Extract the first word of "$ac_prog", so it can be a program name with args.
5778 set dummy $ac_prog; ac_word=$2
5779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5780 $as_echo_n "checking for $ac_word... " >&6; }
5781 if ${ac_cv_prog_ac_ct_CC+:} false; then :
5782   $as_echo_n "(cached) " >&6
5783 else
5784   if test -n "$ac_ct_CC"; then
5785   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5786 else
5787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5788 for as_dir in $PATH
5789 do
5790   IFS=$as_save_IFS
5791   test -z "$as_dir" && as_dir=.
5792     for ac_exec_ext in '' $ac_executable_extensions; do
5793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5794     ac_cv_prog_ac_ct_CC="$ac_prog"
5795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5796     break 2
5797   fi
5798 done
5799   done
5800 IFS=$as_save_IFS
5801
5802 fi
5803 fi
5804 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5805 if test -n "$ac_ct_CC"; then
5806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5807 $as_echo "$ac_ct_CC" >&6; }
5808 else
5809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5810 $as_echo "no" >&6; }
5811 fi
5812
5813
5814   test -n "$ac_ct_CC" && break
5815 done
5816
5817   if test "x$ac_ct_CC" = x; then
5818     CC=""
5819   else
5820     case $cross_compiling:$ac_tool_warned in
5821 yes:)
5822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5823 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5824 ac_tool_warned=yes ;;
5825 esac
5826     CC=$ac_ct_CC
5827   fi
5828 fi
5829
5830 fi
5831
5832
5833 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5834 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5835 as_fn_error $? "no acceptable C compiler found in \$PATH
5836 See \`config.log' for more details" "$LINENO" 5; }
5837
5838 # Provide some information about the compiler.
5839 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5840 set X $ac_compile
5841 ac_compiler=$2
5842 for ac_option in --version -v -V -qversion; do
5843   { { ac_try="$ac_compiler $ac_option >&5"
5844 case "(($ac_try" in
5845   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5846   *) ac_try_echo=$ac_try;;
5847 esac
5848 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5849 $as_echo "$ac_try_echo"; } >&5
5850   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5851   ac_status=$?
5852   if test -s conftest.err; then
5853     sed '10a\
5854 ... rest of stderr output deleted ...
5855          10q' conftest.err >conftest.er1
5856     cat conftest.er1 >&5
5857   fi
5858   rm -f conftest.er1 conftest.err
5859   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5860   test $ac_status = 0; }
5861 done
5862
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5864 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5865 if ${ac_cv_c_compiler_gnu+:} false; then :
5866   $as_echo_n "(cached) " >&6
5867 else
5868   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5869 /* end confdefs.h.  */
5870
5871 int
5872 main ()
5873 {
5874 #ifndef __GNUC__
5875        choke me
5876 #endif
5877
5878   ;
5879   return 0;
5880 }
5881 _ACEOF
5882 if ac_fn_c_try_compile "$LINENO"; then :
5883   ac_compiler_gnu=yes
5884 else
5885   ac_compiler_gnu=no
5886 fi
5887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5888 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5889
5890 fi
5891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5892 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5893 if test $ac_compiler_gnu = yes; then
5894   GCC=yes
5895 else
5896   GCC=
5897 fi
5898 ac_test_CFLAGS=${CFLAGS+set}
5899 ac_save_CFLAGS=$CFLAGS
5900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5901 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5902 if ${ac_cv_prog_cc_g+:} false; then :
5903   $as_echo_n "(cached) " >&6
5904 else
5905   ac_save_c_werror_flag=$ac_c_werror_flag
5906    ac_c_werror_flag=yes
5907    ac_cv_prog_cc_g=no
5908    CFLAGS="-g"
5909    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5910 /* end confdefs.h.  */
5911
5912 int
5913 main ()
5914 {
5915
5916   ;
5917   return 0;
5918 }
5919 _ACEOF
5920 if ac_fn_c_try_compile "$LINENO"; then :
5921   ac_cv_prog_cc_g=yes
5922 else
5923   CFLAGS=""
5924       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5925 /* end confdefs.h.  */
5926
5927 int
5928 main ()
5929 {
5930
5931   ;
5932   return 0;
5933 }
5934 _ACEOF
5935 if ac_fn_c_try_compile "$LINENO"; then :
5936
5937 else
5938   ac_c_werror_flag=$ac_save_c_werror_flag
5939          CFLAGS="-g"
5940          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5941 /* end confdefs.h.  */
5942
5943 int
5944 main ()
5945 {
5946
5947   ;
5948   return 0;
5949 }
5950 _ACEOF
5951 if ac_fn_c_try_compile "$LINENO"; then :
5952   ac_cv_prog_cc_g=yes
5953 fi
5954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5955 fi
5956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5957 fi
5958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5959    ac_c_werror_flag=$ac_save_c_werror_flag
5960 fi
5961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5962 $as_echo "$ac_cv_prog_cc_g" >&6; }
5963 if test "$ac_test_CFLAGS" = set; then
5964   CFLAGS=$ac_save_CFLAGS
5965 elif test $ac_cv_prog_cc_g = yes; then
5966   if test "$GCC" = yes; then
5967     CFLAGS="-g -O2"
5968   else
5969     CFLAGS="-g"
5970   fi
5971 else
5972   if test "$GCC" = yes; then
5973     CFLAGS="-O2"
5974   else
5975     CFLAGS=
5976   fi
5977 fi
5978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5979 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5980 if ${ac_cv_prog_cc_c89+:} false; then :
5981   $as_echo_n "(cached) " >&6
5982 else
5983   ac_cv_prog_cc_c89=no
5984 ac_save_CC=$CC
5985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5986 /* end confdefs.h.  */
5987 #include <stdarg.h>
5988 #include <stdio.h>
5989 struct stat;
5990 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5991 struct buf { int x; };
5992 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5993 static char *e (p, i)
5994      char **p;
5995      int i;
5996 {
5997   return p[i];
5998 }
5999 static char *f (char * (*g) (char **, int), char **p, ...)
6000 {
6001   char *s;
6002   va_list v;
6003   va_start (v,p);
6004   s = g (p, va_arg (v,int));
6005   va_end (v);
6006   return s;
6007 }
6008
6009 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6010    function prototypes and stuff, but not '\xHH' hex character constants.
6011    These don't provoke an error unfortunately, instead are silently treated
6012    as 'x'.  The following induces an error, until -std is added to get
6013    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6014    array size at least.  It's necessary to write '\x00'==0 to get something
6015    that's true only with -std.  */
6016 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6017
6018 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6019    inside strings and character constants.  */
6020 #define FOO(x) 'x'
6021 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6022
6023 int test (int i, double x);
6024 struct s1 {int (*f) (int a);};
6025 struct s2 {int (*f) (double a);};
6026 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6027 int argc;
6028 char **argv;
6029 int
6030 main ()
6031 {
6032 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6033   ;
6034   return 0;
6035 }
6036 _ACEOF
6037 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6038         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6039 do
6040   CC="$ac_save_CC $ac_arg"
6041   if ac_fn_c_try_compile "$LINENO"; then :
6042   ac_cv_prog_cc_c89=$ac_arg
6043 fi
6044 rm -f core conftest.err conftest.$ac_objext
6045   test "x$ac_cv_prog_cc_c89" != "xno" && break
6046 done
6047 rm -f conftest.$ac_ext
6048 CC=$ac_save_CC
6049
6050 fi
6051 # AC_CACHE_VAL
6052 case "x$ac_cv_prog_cc_c89" in
6053   x)
6054     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6055 $as_echo "none needed" >&6; } ;;
6056   xno)
6057     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6058 $as_echo "unsupported" >&6; } ;;
6059   *)
6060     CC="$CC $ac_cv_prog_cc_c89"
6061     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6062 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6063 esac
6064 if test "x$ac_cv_prog_cc_c89" != xno; then :
6065
6066 fi
6067
6068 ac_ext=c
6069 ac_cpp='$CPP $CPPFLAGS'
6070 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6071 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6072 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6073
6074 ac_ext=c
6075 ac_cpp='$CPP $CPPFLAGS'
6076 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6077 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6078 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6080 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
6081 if ${am_cv_prog_cc_c_o+:} false; then :
6082   $as_echo_n "(cached) " >&6
6083 else
6084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6085 /* end confdefs.h.  */
6086
6087 int
6088 main ()
6089 {
6090
6091   ;
6092   return 0;
6093 }
6094 _ACEOF
6095   # Make sure it works both with $CC and with simple cc.
6096   # Following AC_PROG_CC_C_O, we do the test twice because some
6097   # compilers refuse to overwrite an existing .o file with -o,
6098   # though they will create one.
6099   am_cv_prog_cc_c_o=yes
6100   for am_i in 1 2; do
6101     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6102    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6103    ac_status=$?
6104    echo "$as_me:$LINENO: \$? = $ac_status" >&5
6105    (exit $ac_status); } \
6106          && test -f conftest2.$ac_objext; then
6107       : OK
6108     else
6109       am_cv_prog_cc_c_o=no
6110       break
6111     fi
6112   done
6113   rm -f core conftest*
6114   unset am_i
6115 fi
6116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6117 $as_echo "$am_cv_prog_cc_c_o" >&6; }
6118 if test "$am_cv_prog_cc_c_o" != yes; then
6119    # Losing compiler, so override with the script.
6120    # FIXME: It is wrong to rewrite CC.
6121    # But if we don't then we get into trouble of one sort or another.
6122    # A longer-term fix would be to have automake use am__CC in this case,
6123    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6124    CC="$am_aux_dir/compile $CC"
6125 fi
6126 ac_ext=c
6127 ac_cpp='$CPP $CPPFLAGS'
6128 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6129 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6130 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6131
6132
6133 depcc="$CC"   am_compiler_list=
6134
6135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6136 $as_echo_n "checking dependency style of $depcc... " >&6; }
6137 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6138   $as_echo_n "(cached) " >&6
6139 else
6140   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6141   # We make a subdir and do the tests there.  Otherwise we can end up
6142   # making bogus files that we don't know about and never remove.  For
6143   # instance it was reported that on HP-UX the gcc test will end up
6144   # making a dummy file named 'D' -- because '-MD' means "put the output
6145   # in D".
6146   rm -rf conftest.dir
6147   mkdir conftest.dir
6148   # Copy depcomp to subdir because otherwise we won't find it if we're
6149   # using a relative directory.
6150   cp "$am_depcomp" conftest.dir
6151   cd conftest.dir
6152   # We will build objects and dependencies in a subdirectory because
6153   # it helps to detect inapplicable dependency modes.  For instance
6154   # both Tru64's cc and ICC support -MD to output dependencies as a
6155   # side effect of compilation, but ICC will put the dependencies in
6156   # the current directory while Tru64 will put them in the object
6157   # directory.
6158   mkdir sub
6159
6160   am_cv_CC_dependencies_compiler_type=none
6161   if test "$am_compiler_list" = ""; then
6162      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6163   fi
6164   am__universal=false
6165   case " $depcc " in #(
6166      *\ -arch\ *\ -arch\ *) am__universal=true ;;
6167      esac
6168
6169   for depmode in $am_compiler_list; do
6170     # Setup a source with many dependencies, because some compilers
6171     # like to wrap large dependency lists on column 80 (with \), and
6172     # we should not choose a depcomp mode which is confused by this.
6173     #
6174     # We need to recreate these files for each test, as the compiler may
6175     # overwrite some of them when testing with obscure command lines.
6176     # This happens at least with the AIX C compiler.
6177     : > sub/conftest.c
6178     for i in 1 2 3 4 5 6; do
6179       echo '#include "conftst'$i'.h"' >> sub/conftest.c
6180       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6181       # Solaris 10 /bin/sh.
6182       echo '/* dummy */' > sub/conftst$i.h
6183     done
6184     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6185
6186     # We check with '-c' and '-o' for the sake of the "dashmstdout"
6187     # mode.  It turns out that the SunPro C++ compiler does not properly
6188     # handle '-M -o', and we need to detect this.  Also, some Intel
6189     # versions had trouble with output in subdirs.
6190     am__obj=sub/conftest.${OBJEXT-o}
6191     am__minus_obj="-o $am__obj"
6192     case $depmode in
6193     gcc)
6194       # This depmode causes a compiler race in universal mode.
6195       test "$am__universal" = false || continue
6196       ;;
6197     nosideeffect)
6198       # After this tag, mechanisms are not by side-effect, so they'll
6199       # only be used when explicitly requested.
6200       if test "x$enable_dependency_tracking" = xyes; then
6201         continue
6202       else
6203         break
6204       fi
6205       ;;
6206     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6207       # This compiler won't grok '-c -o', but also, the minuso test has
6208       # not run yet.  These depmodes are late enough in the game, and
6209       # so weak that their functioning should not be impacted.
6210       am__obj=conftest.${OBJEXT-o}
6211       am__minus_obj=
6212       ;;
6213     none) break ;;
6214     esac
6215     if depmode=$depmode \
6216        source=sub/conftest.c object=$am__obj \
6217        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6218        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6219          >/dev/null 2>conftest.err &&
6220        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6221        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6222        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6223        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6224       # icc doesn't choke on unknown options, it will just issue warnings
6225       # or remarks (even with -Werror).  So we grep stderr for any message
6226       # that says an option was ignored or not supported.
6227       # When given -MP, icc 7.0 and 7.1 complain thusly:
6228       #   icc: Command line warning: ignoring option '-M'; no argument required
6229       # The diagnosis changed in icc 8.0:
6230       #   icc: Command line remark: option '-MP' not supported
6231       if (grep 'ignoring option' conftest.err ||
6232           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6233         am_cv_CC_dependencies_compiler_type=$depmode
6234         break
6235       fi
6236     fi
6237   done
6238
6239   cd ..
6240   rm -rf conftest.dir
6241 else
6242   am_cv_CC_dependencies_compiler_type=none
6243 fi
6244
6245 fi
6246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6247 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6248 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6249
6250  if
6251   test "x$enable_dependency_tracking" != xno \
6252   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6253   am__fastdepCC_TRUE=
6254   am__fastdepCC_FALSE='#'
6255 else
6256   am__fastdepCC_TRUE='#'
6257   am__fastdepCC_FALSE=
6258 fi
6259
6260
6261 # Ralf Wildenhues: With per-target flags we need CC_C_O
6262 # AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
6263
6264 if test $ac_cv_c_compiler_gnu = yes; then
6265     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
6266 $as_echo_n "checking whether $CC needs -traditional... " >&6; }
6267 if ${ac_cv_prog_gcc_traditional+:} false; then :
6268   $as_echo_n "(cached) " >&6
6269 else
6270     ac_pattern="Autoconf.*'x'"
6271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6272 /* end confdefs.h.  */
6273 #include <sgtty.h>
6274 Autoconf TIOCGETP
6275 _ACEOF
6276 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6277   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
6278   ac_cv_prog_gcc_traditional=yes
6279 else
6280   ac_cv_prog_gcc_traditional=no
6281 fi
6282 rm -f conftest*
6283
6284
6285   if test $ac_cv_prog_gcc_traditional = no; then
6286     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6287 /* end confdefs.h.  */
6288 #include <termio.h>
6289 Autoconf TCGETA
6290 _ACEOF
6291 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6292   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
6293   ac_cv_prog_gcc_traditional=yes
6294 fi
6295 rm -f conftest*
6296
6297   fi
6298 fi
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
6300 $as_echo "$ac_cv_prog_gcc_traditional" >&6; }
6301   if test $ac_cv_prog_gcc_traditional = yes; then
6302     CC="$CC -traditional"
6303   fi
6304 fi
6305
6306
6307
6308
6309
6310 CFLAGS_NTP=
6311 CPPFLAGS_NTP=
6312 LDADD_NTP=
6313 LDFLAGS_NTP=
6314
6315
6316
6317
6318
6319 case "$ac_cv_prog_cc_c89" in
6320  no)
6321     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
6322                  version 4.2.5 and higher." >&5
6323 $as_echo "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
6324                  version 4.2.5 and higher." >&2;}
6325     ;;
6326 esac
6327
6328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
6329 $as_echo_n "checking if $CC can handle #warning... " >&6; }
6330 if ${ntp_cv_cpp_warning+:} false; then :
6331   $as_echo_n "(cached) " >&6
6332 else
6333   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6334 /* end confdefs.h.  */
6335
6336 int
6337 main ()
6338 {
6339 #warning foo
6340   ;
6341   return 0;
6342 }
6343 _ACEOF
6344 if ac_fn_c_try_compile "$LINENO"; then :
6345   ntp_cv_cpp_warning=yes
6346 else
6347   ntp_cv_cpp_warning=no
6348
6349 fi
6350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6351
6352 fi
6353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cpp_warning" >&5
6354 $as_echo "$ntp_cv_cpp_warning" >&6; }
6355 case "$ntp_cv_cpp_warning" in
6356  no)
6357
6358 $as_echo "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
6359
6360 esac
6361
6362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__((...))" >&5
6363 $as_echo_n "checking if $CC supports __attribute__((...))... " >&6; }
6364 if ${ntp_cv_cc_attribute+:} false; then :
6365   $as_echo_n "(cached) " >&6
6366 else
6367   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6368 /* end confdefs.h.  */
6369
6370 int
6371 main ()
6372 {
6373 void foo(void) __attribute__((__noreturn__));
6374
6375   ;
6376   return 0;
6377 }
6378 _ACEOF
6379 if ac_fn_c_try_compile "$LINENO"; then :
6380   ntp_cv_cc_attribute=yes
6381 else
6382   ntp_cv_cc_attribute=no
6383
6384 fi
6385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6386
6387 fi
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cc_attribute" >&5
6389 $as_echo "$ntp_cv_cc_attribute" >&6; }
6390 case "$ntp_cv_cc_attribute" in
6391  yes)
6392
6393 $as_echo "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h
6394
6395 esac
6396
6397
6398 case "$GCC" in
6399  yes)
6400     SAVED_CFLAGS="$CFLAGS"
6401     CFLAGS="$CFLAGS -Wstrict-overflow"
6402     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
6403 $as_echo_n "checking if $CC can handle -Wstrict-overflow... " >&6; }
6404 if ${ntp_cv_gcc_Wstrict_overflow+:} false; then :
6405   $as_echo_n "(cached) " >&6
6406 else
6407   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6408 /* end confdefs.h.  */
6409
6410 int
6411 main ()
6412 {
6413
6414   ;
6415   return 0;
6416 }
6417 _ACEOF
6418 if ac_fn_c_try_compile "$LINENO"; then :
6419   ntp_cv_gcc_Wstrict_overflow=yes
6420 else
6421   ntp_cv_gcc_Wstrict_overflow=no
6422
6423 fi
6424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6425
6426 fi
6427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wstrict_overflow" >&5
6428 $as_echo "$ntp_cv_gcc_Wstrict_overflow" >&6; }
6429     #
6430     # $ntp_cv_gcc_Wstrict_overflow is tested later to add the
6431     # flag to CFLAGS.
6432     #
6433     CFLAGS="$SAVED_CFLAGS -Winit-self"
6434     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
6435 $as_echo_n "checking if $CC can handle -Winit-self... " >&6; }
6436 if ${ntp_cv_gcc_Winit_self+:} false; then :
6437   $as_echo_n "(cached) " >&6
6438 else
6439
6440             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6441 /* end confdefs.h.  */
6442
6443 int
6444 main ()
6445 {
6446
6447   ;
6448   return 0;
6449 }
6450 _ACEOF
6451 if ac_fn_c_try_compile "$LINENO"; then :
6452   ntp_cv_gcc_Winit_self=yes
6453 else
6454   ntp_cv_gcc_Winit_self=no
6455
6456 fi
6457 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6458
6459
6460 fi
6461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
6462 $as_echo "$ntp_cv_gcc_Winit_self" >&6; }
6463     CFLAGS="$SAVED_CFLAGS"
6464     { SAVED_CFLAGS=; unset SAVED_CFLAGS;}
6465     #
6466     # $ntp_cv_gcc_Winit_self is tested later to add the
6467     # flag to CFLAGS_NTP.
6468     #
6469     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
6470 $as_echo_n "checking if linker supports omitting unused code and data... " >&6; }
6471 if ${ntp_cv_gc_sections_runs+:} false; then :
6472   $as_echo_n "(cached) " >&6
6473 else
6474
6475                                                                                             origCFLAGS="$CFLAGS"
6476             CFLAGS="$CFLAGS -Wl,--gc-sections"
6477             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6478 /* end confdefs.h.  */
6479
6480                         #include <stdlib.h>
6481                         #include <stdio.h>
6482
6483 int
6484 main ()
6485 {
6486
6487                         FILE *  fpC;
6488                         char    buf[32];
6489                         size_t  cch;
6490                         int     read_success_once;
6491
6492                         fpC = fopen("conftest.c", "r");
6493                         if (NULL == fpC)
6494                                 exit(1);
6495                         do {
6496                                 cch = fread(buf, sizeof(buf), 1, fpC);
6497                                 read_success_once |= (0 != cch);
6498                         } while (0 != cch);
6499                         if (!read_success_once)
6500                                 exit(2);
6501                         if (!feof(fpC))
6502                                 exit(3);
6503                         if (0 != fclose(fpC))
6504                                 exit(4);
6505
6506                         exit(EXIT_SUCCESS);
6507
6508
6509   ;
6510   return 0;
6511 }
6512 _ACEOF
6513 if ac_fn_c_try_link "$LINENO"; then :
6514
6515                     if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
6516                         ntp_cv_gc_sections_runs=no
6517                     else
6518                         ntp_cv_gc_sections_runs=no
6519                         ./conftest >/dev/null 2>&1 && ntp_cv_gc_sections_runs=yes
6520                     fi
6521
6522 else
6523   ntp_cv_gc_sections_runs=no
6524
6525 fi
6526 rm -f core conftest.err conftest.$ac_objext \
6527     conftest$ac_exeext conftest.$ac_ext
6528             CFLAGS="$origCFLAGS"
6529             { origCFLAGS=; unset origCFLAGS;}
6530
6531
6532 fi
6533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gc_sections_runs" >&5
6534 $as_echo "$ntp_cv_gc_sections_runs" >&6; }
6535     case "$ntp_cv_gc_sections_runs" in
6536      yes)
6537         LDADD_LIBNTP="-Wl,--gc-sections"
6538         CFLAGS_NTP="$CFLAGS_NTP -ffunction-sections -fdata-sections"
6539         ;;
6540      no)
6541         LDADD_LIBNTP=
6542         ;;
6543     esac
6544     CFLAGS_NTP="$CFLAGS_NTP -Wall"
6545     CFLAGS_NTP="$CFLAGS_NTP -Wcast-align"
6546     CFLAGS_NTP="$CFLAGS_NTP -Wcast-qual"
6547     # CFLAGS_NTP="$CFLAGS_NTP -Wconversion"
6548     # CFLAGS_NTP="$CFLAGS_NTP -Werror"
6549     # CFLAGS_NTP="$CFLAGS_NTP -Wextra"
6550     # CFLAGS_NTP="$CFLAGS_NTP -Wfloat-equal"
6551     CFLAGS_NTP="$CFLAGS_NTP -Wmissing-prototypes"
6552     CFLAGS_NTP="$CFLAGS_NTP -Wpointer-arith"
6553     CFLAGS_NTP="$CFLAGS_NTP -Wshadow"
6554     # CFLAGS_NTP="$CFLAGS_NTP -Wtraditional"
6555     # CFLAGS_NTP="$CFLAGS_NTP -Wwrite-strings"
6556     case "$ntp_cv_gcc_Winit_self" in
6557      yes)
6558         CFLAGS_NTP="$CFLAGS_NTP -Winit-self"
6559     esac
6560     case "$ntp_cv_gcc_Wstrict_overflow" in
6561      yes)
6562         CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
6563     esac
6564     # -W[no-]strict-prototypes might be added by NTP_OPENSSL
6565 esac
6566
6567
6568     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
6569 $as_echo_n "checking additional compiler flags... " >&6; }
6570     # allow ntp_os_cflags to be preset to skip this stuff
6571     case "${ntp_os_cflags+set}" in
6572      set)
6573         ;;
6574      *)
6575         ntp_os_cflags=
6576         case "$host_os" in
6577          aix[1-3]*)
6578             ;;
6579          aix4.[0-2]*)
6580             # turn on additional headers
6581             ntp_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
6582             ;;
6583          aix5.3*)
6584             # avoid circular dependencies in yp headers, and more
6585             ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
6586             ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS -D_MSGQSUPPORT"
6587             ;;
6588          aix*)
6589             # XXX Only verified thru AIX6.
6590             # aix7 seems to need a different XOPEN_SOURCE_EXTENDED thing.
6591             # avoid circular dependencies in yp headers
6592             # _XOPEN_SOURCE=500 = X/Open 5: POSIX 1995
6593             # _XOPEN_SOURCE=600 = X/Open 6: POSIX 2004
6594             # _XOPEN_SOURCE=700 = X/Open 7: POSIX 2008
6595             ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_SOURCE=600"
6596             ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS"
6597             ;;
6598          amigaos)
6599             ntp_os_cflags="-DSYS_AMIGA"
6600             ;;
6601          darwin*|macosx*|rhapsody*)
6602             ntp_os_cflags="-D_P1003_1B_VISIBLE"
6603             ;;
6604          hpux10.*)              # at least for hppa2.0-hp-hpux10.20
6605             case "$GCC" in
6606              yes)
6607                 ;;
6608              *)
6609                 # use Ansi compiler on HPUX, and some -Wp magic
6610                 ntp_os_cflags="-Ae -Wp,-H18816"
6611                 ;;
6612             esac
6613             ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
6614             ;;
6615          hpux*)
6616             case "$GCC" in
6617              yes)
6618                 ;;
6619              *)
6620                 # use Ansi compiler on HPUX
6621                 ntp_os_cflags="-Ae"
6622             esac
6623             ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
6624             ;;
6625          irix6*)
6626             case "$CC" in
6627              cc)
6628                 # do not use 64-bit compiler
6629                 ntp_os_cflags="-n32 -mips3 -Wl,-woff,84"
6630             esac
6631             ;;
6632          nextstep3)
6633             ntp_os_cflags="-posix"
6634             ;;
6635          solaris1*|solaris2.[0-5]|solaris2.5.*)
6636             ;;
6637          sunos[34]*|sunos5.[0-5]|sunos5.5.*)
6638             ;;
6639          solaris2*|sunos5*)
6640             # turn on 64-bit file offset interface
6641             ntp_os_cflags="-D_LARGEFILE64_SOURCE"
6642             ;;
6643          vxworks*)
6644             case "$build" in
6645              $host)
6646                 ;;
6647              *)
6648                 # Quick and dirty sanity check
6649                 case "$VX_KERNEL" in
6650                  '')
6651                     as_fn_error $? "See html/build/hints/vxworks.html" "$LINENO" 5
6652                 esac
6653                 ntp_os_cflags="-DSYS_VXWORKS"
6654             esac
6655             ;;
6656         esac
6657     esac
6658     case "$ntp_os_cflags" in
6659      '')
6660         ntp_os_cflags_msg="none needed"
6661         ;;
6662      *)
6663         ntp_os_cflags_msg="$ntp_os_cflags"
6664     esac
6665     CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
6666     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
6667 $as_echo "$ntp_os_cflags_msg" >&6; }
6668     { ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
6669     ###
6670     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5
6671 $as_echo_n "checking additional linker flags... " >&6; }
6672     # HMS: The following might still need tweaking
6673     # allow ntp_os_ldflags to be preset to skip this stuff
6674     case "${ntp_os_ldflags+set}" in
6675      set)
6676         ;;
6677      *)
6678         ntp_os_ldflags=
6679         case "$host_os" in
6680          hpux*)
6681             case "$GCC" in
6682              yes)
6683                 ntp_os_ldflags="-Wl,+allowdups"
6684                 ;;
6685             esac
6686             ;;
6687         esac
6688         ;;
6689     esac
6690     case "$ntp_os_ldflags" in
6691      '')
6692         ntp_os_ldflags_msg="none needed"
6693         ;;
6694      *)
6695         ntp_os_ldflags_msg="$ntp_os_ldflags"
6696     esac
6697     LDFLAGS_NTP="$LDFLAGS_NTP $ntp_os_ldflags"
6698     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_ldflags_msg" >&5
6699 $as_echo "$ntp_os_ldflags_msg" >&6; }
6700     { ntp_os_ldflags_msg=; unset ntp_os_ldflags_msg;}
6701
6702
6703
6704  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
6705 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
6706 if ${ac_cv_c_bigendian+:} false; then :
6707   $as_echo_n "(cached) " >&6
6708 else
6709   ac_cv_c_bigendian=unknown
6710     # See if we're dealing with a universal compiler.
6711     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6712 /* end confdefs.h.  */
6713 #ifndef __APPLE_CC__
6714                not a universal capable compiler
6715              #endif
6716              typedef int dummy;
6717
6718 _ACEOF
6719 if ac_fn_c_try_compile "$LINENO"; then :
6720
6721         # Check for potential -arch flags.  It is not universal unless
6722         # there are at least two -arch flags with different values.
6723         ac_arch=
6724         ac_prev=
6725         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
6726          if test -n "$ac_prev"; then
6727            case $ac_word in
6728              i?86 | x86_64 | ppc | ppc64)
6729                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
6730                  ac_arch=$ac_word
6731                else
6732                  ac_cv_c_bigendian=universal
6733                  break
6734                fi
6735                ;;
6736            esac
6737            ac_prev=
6738          elif test "x$ac_word" = "x-arch"; then
6739            ac_prev=arch
6740          fi
6741        done
6742 fi
6743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6744     if test $ac_cv_c_bigendian = unknown; then
6745       # See if sys/param.h defines the BYTE_ORDER macro.
6746       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6747 /* end confdefs.h.  */
6748 #include <sys/types.h>
6749              #include <sys/param.h>
6750
6751 int
6752 main ()
6753 {
6754 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
6755                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
6756                      && LITTLE_ENDIAN)
6757               bogus endian macros
6758              #endif
6759
6760   ;
6761   return 0;
6762 }
6763 _ACEOF
6764 if ac_fn_c_try_compile "$LINENO"; then :
6765   # It does; now see whether it defined to BIG_ENDIAN or not.
6766          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6767 /* end confdefs.h.  */
6768 #include <sys/types.h>
6769                 #include <sys/param.h>
6770
6771 int
6772 main ()
6773 {
6774 #if BYTE_ORDER != BIG_ENDIAN
6775                  not big endian
6776                 #endif
6777
6778   ;
6779   return 0;
6780 }
6781 _ACEOF
6782 if ac_fn_c_try_compile "$LINENO"; then :
6783   ac_cv_c_bigendian=yes
6784 else
6785   ac_cv_c_bigendian=no
6786 fi
6787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6788 fi
6789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6790     fi
6791     if test $ac_cv_c_bigendian = unknown; then
6792       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
6793       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6794 /* end confdefs.h.  */
6795 #include <limits.h>
6796
6797 int
6798 main ()
6799 {
6800 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
6801               bogus endian macros
6802              #endif
6803
6804   ;
6805   return 0;
6806 }
6807 _ACEOF
6808 if ac_fn_c_try_compile "$LINENO"; then :
6809   # It does; now see whether it defined to _BIG_ENDIAN or not.
6810          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6811 /* end confdefs.h.  */
6812 #include <limits.h>
6813
6814 int
6815 main ()
6816 {
6817 #ifndef _BIG_ENDIAN
6818                  not big endian
6819                 #endif
6820
6821   ;
6822   return 0;
6823 }
6824 _ACEOF
6825 if ac_fn_c_try_compile "$LINENO"; then :
6826   ac_cv_c_bigendian=yes
6827 else
6828   ac_cv_c_bigendian=no
6829 fi
6830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6831 fi
6832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6833     fi
6834     if test $ac_cv_c_bigendian = unknown; then
6835       # Compile a test program.
6836       if test "$cross_compiling" = yes; then :
6837   # Try to guess by grepping values from an object file.
6838          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6839 /* end confdefs.h.  */
6840 short int ascii_mm[] =
6841                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
6842                 short int ascii_ii[] =
6843                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
6844                 int use_ascii (int i) {
6845                   return ascii_mm[i] + ascii_ii[i];
6846                 }
6847                 short int ebcdic_ii[] =
6848                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
6849                 short int ebcdic_mm[] =
6850                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
6851                 int use_ebcdic (int i) {
6852                   return ebcdic_mm[i] + ebcdic_ii[i];
6853                 }
6854                 extern int foo;
6855
6856 int
6857 main ()
6858 {
6859 return use_ascii (foo) == use_ebcdic (foo);
6860   ;
6861   return 0;
6862 }
6863 _ACEOF
6864 if ac_fn_c_try_compile "$LINENO"; then :
6865   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
6866               ac_cv_c_bigendian=yes
6867             fi
6868             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
6869               if test "$ac_cv_c_bigendian" = unknown; then
6870                 ac_cv_c_bigendian=no
6871               else
6872                 # finding both strings is unlikely to happen, but who knows?
6873                 ac_cv_c_bigendian=unknown
6874               fi
6875             fi
6876 fi
6877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6878 else
6879   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6880 /* end confdefs.h.  */
6881 $ac_includes_default
6882 int
6883 main ()
6884 {
6885
6886              /* Are we little or big endian?  From Harbison&Steele.  */
6887              union
6888              {
6889                long int l;
6890                char c[sizeof (long int)];
6891              } u;
6892              u.l = 1;
6893              return u.c[sizeof (long int) - 1] == 1;
6894
6895   ;
6896   return 0;
6897 }
6898 _ACEOF
6899 if ac_fn_c_try_run "$LINENO"; then :
6900   ac_cv_c_bigendian=no
6901 else
6902   ac_cv_c_bigendian=yes
6903 fi
6904 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6905   conftest.$ac_objext conftest.beam conftest.$ac_ext
6906 fi
6907
6908     fi
6909 fi
6910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
6911 $as_echo "$ac_cv_c_bigendian" >&6; }
6912  case $ac_cv_c_bigendian in #(
6913    yes)
6914      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
6915 ;; #(
6916    no)
6917       ;; #(
6918    universal)
6919
6920 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
6921
6922      ;; #(
6923    *)
6924      as_fn_error $? "unknown endianness
6925  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
6926  esac
6927
6928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
6929 $as_echo_n "checking for working volatile... " >&6; }
6930 if ${ac_cv_c_volatile+:} false; then :
6931   $as_echo_n "(cached) " >&6
6932 else
6933   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6934 /* end confdefs.h.  */
6935
6936 int
6937 main ()
6938 {
6939
6940 volatile int x;
6941 int * volatile y = (int *) 0;
6942 return !x && !y;
6943   ;
6944   return 0;
6945 }
6946 _ACEOF
6947 if ac_fn_c_try_compile "$LINENO"; then :
6948   ac_cv_c_volatile=yes
6949 else
6950   ac_cv_c_volatile=no
6951 fi
6952 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6953 fi
6954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
6955 $as_echo "$ac_cv_c_volatile" >&6; }
6956 if test $ac_cv_c_volatile = no; then
6957
6958 $as_echo "#define volatile /**/" >>confdefs.h
6959
6960 fi
6961
6962 ac_ext=c
6963 ac_cpp='$CPP $CPPFLAGS'
6964 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6965 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6966 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6968 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6969 # On Suns, sometimes $CPP names a directory.
6970 if test -n "$CPP" && test -d "$CPP"; then
6971   CPP=
6972 fi
6973 if test -z "$CPP"; then
6974   if ${ac_cv_prog_CPP+:} false; then :
6975   $as_echo_n "(cached) " >&6
6976 else
6977       # Double quotes because CPP needs to be expanded
6978     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6979     do
6980       ac_preproc_ok=false
6981 for ac_c_preproc_warn_flag in '' yes
6982 do
6983   # Use a header file that comes with gcc, so configuring glibc
6984   # with a fresh cross-compiler works.
6985   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6986   # <limits.h> exists even on freestanding compilers.
6987   # On the NeXT, cc -E runs the code through the compiler's parser,
6988   # not just through cpp. "Syntax error" is here to catch this case.
6989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6990 /* end confdefs.h.  */
6991 #ifdef __STDC__
6992 # include <limits.h>
6993 #else
6994 # include <assert.h>
6995 #endif
6996                      Syntax error
6997 _ACEOF
6998 if ac_fn_c_try_cpp "$LINENO"; then :
6999
7000 else
7001   # Broken: fails on valid input.
7002 continue
7003 fi
7004 rm -f conftest.err conftest.i conftest.$ac_ext
7005
7006   # OK, works on sane cases.  Now check whether nonexistent headers
7007   # can be detected and how.
7008   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7009 /* end confdefs.h.  */
7010 #include <ac_nonexistent.h>
7011 _ACEOF
7012 if ac_fn_c_try_cpp "$LINENO"; then :
7013   # Broken: success on invalid input.
7014 continue
7015 else
7016   # Passes both tests.
7017 ac_preproc_ok=:
7018 break
7019 fi
7020 rm -f conftest.err conftest.i conftest.$ac_ext
7021
7022 done
7023 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7024 rm -f conftest.i conftest.err conftest.$ac_ext
7025 if $ac_preproc_ok; then :
7026   break
7027 fi
7028
7029     done
7030     ac_cv_prog_CPP=$CPP
7031
7032 fi
7033   CPP=$ac_cv_prog_CPP
7034 else
7035   ac_cv_prog_CPP=$CPP
7036 fi
7037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7038 $as_echo "$CPP" >&6; }
7039 ac_preproc_ok=false
7040 for ac_c_preproc_warn_flag in '' yes
7041 do
7042   # Use a header file that comes with gcc, so configuring glibc
7043   # with a fresh cross-compiler works.
7044   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7045   # <limits.h> exists even on freestanding compilers.
7046   # On the NeXT, cc -E runs the code through the compiler's parser,
7047   # not just through cpp. "Syntax error" is here to catch this case.
7048   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7049 /* end confdefs.h.  */
7050 #ifdef __STDC__
7051 # include <limits.h>
7052 #else
7053 # include <assert.h>
7054 #endif
7055                      Syntax error
7056 _ACEOF
7057 if ac_fn_c_try_cpp "$LINENO"; then :
7058
7059 else
7060   # Broken: fails on valid input.
7061 continue
7062 fi
7063 rm -f conftest.err conftest.i conftest.$ac_ext
7064
7065   # OK, works on sane cases.  Now check whether nonexistent headers
7066   # can be detected and how.
7067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7068 /* end confdefs.h.  */
7069 #include <ac_nonexistent.h>
7070 _ACEOF
7071 if ac_fn_c_try_cpp "$LINENO"; then :
7072   # Broken: success on invalid input.
7073 continue
7074 else
7075   # Passes both tests.
7076 ac_preproc_ok=:
7077 break
7078 fi
7079 rm -f conftest.err conftest.i conftest.$ac_ext
7080
7081 done
7082 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7083 rm -f conftest.i conftest.err conftest.$ac_ext
7084 if $ac_preproc_ok; then :
7085
7086 else
7087   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7088 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7089 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7090 See \`config.log' for more details" "$LINENO" 5; }
7091 fi
7092
7093 ac_ext=c
7094 ac_cpp='$CPP $CPPFLAGS'
7095 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7096 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7097 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7098
7099
7100
7101
7102
7103
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for install dir and man conventions" >&5
7105 $as_echo_n "checking for install dir and man conventions... " >&6; }
7106
7107
7108 # Check whether --with-locfile was given.
7109 if test "${with_locfile+set}" = set; then :
7110   withval=$with_locfile;
7111 else
7112   with_locfile=no
7113
7114 fi
7115
7116
7117 (                                                                       \
7118     SENTINEL_DIR="$PWD" &&                                              \
7119     cd $srcdir/ &&                                                      \
7120     case "$with_locfile" in                                             \
7121      yes|no|'')                                                         \
7122         scripts/genLocInfo -d "$SENTINEL_DIR"                           \
7123         ;;                                                              \
7124      *)                                                                 \
7125         scripts/genLocInfo -d "$SENTINEL_DIR" -f "$with_locfile"        \
7126         ;;                                                              \
7127     esac                                                                \
7128 ) > genLocInfo.i 2> genLocInfo.err
7129 . ./genLocInfo.i
7130
7131 case "$GENLOCINFO" in
7132  OK)
7133     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENLOCINFOFILE" >&5
7134 $as_echo "in file $GENLOCINFOFILE" >&6; }
7135     rm genLocInfo.err genLocInfo.i
7136     ;;
7137  *)
7138     { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
7139 $as_echo "failed." >&6; }
7140     as_fn_error $? "Problem with genLocInfo!" "$LINENO" 5
7141     ;;
7142 esac
7143
7144  if test "$CALC_TICKADJ_MS" ; then
7145   WANT_CALC_TICKADJ_MS_TRUE=
7146   WANT_CALC_TICKADJ_MS_FALSE='#'
7147 else
7148   WANT_CALC_TICKADJ_MS_TRUE='#'
7149   WANT_CALC_TICKADJ_MS_FALSE=
7150 fi
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194  if test -z "$NTPSWEEP_NI" ; then
7195   INSTALL_NTPSWEEP_TRUE=
7196   INSTALL_NTPSWEEP_FALSE='#'
7197 else
7198   INSTALL_NTPSWEEP_TRUE='#'
7199   INSTALL_NTPSWEEP_FALSE=
7200 fi
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242  if test -z "$UPDATE_LEAP_NI" ; then
7243   INSTALL_UPDATE_LEAP_TRUE=
7244   INSTALL_UPDATE_LEAP_FALSE='#'
7245 else
7246   INSTALL_UPDATE_LEAP_TRUE='#'
7247   INSTALL_UPDATE_LEAP_FALSE=
7248 fi
7249
7250
7251
7252
7253 if test -n "$ac_tool_prefix"; then
7254   for ac_prog in ar lib "link -lib"
7255   do
7256     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7257 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7259 $as_echo_n "checking for $ac_word... " >&6; }
7260 if ${ac_cv_prog_AR+:} false; then :
7261   $as_echo_n "(cached) " >&6
7262 else
7263   if test -n "$AR"; then
7264   ac_cv_prog_AR="$AR" # Let the user override the test.
7265 else
7266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7267 for as_dir in $PATH
7268 do
7269   IFS=$as_save_IFS
7270   test -z "$as_dir" && as_dir=.
7271     for ac_exec_ext in '' $ac_executable_extensions; do
7272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7273     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
7274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7275     break 2
7276   fi
7277 done
7278   done
7279 IFS=$as_save_IFS
7280
7281 fi
7282 fi
7283 AR=$ac_cv_prog_AR
7284 if test -n "$AR"; then
7285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7286 $as_echo "$AR" >&6; }
7287 else
7288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7289 $as_echo "no" >&6; }
7290 fi
7291
7292
7293     test -n "$AR" && break
7294   done
7295 fi
7296 if test -z "$AR"; then
7297   ac_ct_AR=$AR
7298   for ac_prog in ar lib "link -lib"
7299 do
7300   # Extract the first word of "$ac_prog", so it can be a program name with args.
7301 set dummy $ac_prog; ac_word=$2
7302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7303 $as_echo_n "checking for $ac_word... " >&6; }
7304 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7305   $as_echo_n "(cached) " >&6
7306 else
7307   if test -n "$ac_ct_AR"; then
7308   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7309 else
7310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7311 for as_dir in $PATH
7312 do
7313   IFS=$as_save_IFS
7314   test -z "$as_dir" && as_dir=.
7315     for ac_exec_ext in '' $ac_executable_extensions; do
7316   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7317     ac_cv_prog_ac_ct_AR="$ac_prog"
7318     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7319     break 2
7320   fi
7321 done
7322   done
7323 IFS=$as_save_IFS
7324
7325 fi
7326 fi
7327 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7328 if test -n "$ac_ct_AR"; then
7329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7330 $as_echo "$ac_ct_AR" >&6; }
7331 else
7332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7333 $as_echo "no" >&6; }
7334 fi
7335
7336
7337   test -n "$ac_ct_AR" && break
7338 done
7339
7340   if test "x$ac_ct_AR" = x; then
7341     AR="false"
7342   else
7343     case $cross_compiling:$ac_tool_warned in
7344 yes:)
7345 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7346 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7347 ac_tool_warned=yes ;;
7348 esac
7349     AR=$ac_ct_AR
7350   fi
7351 fi
7352
7353 : ${AR=ar}
7354
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
7356 $as_echo_n "checking the archiver ($AR) interface... " >&6; }
7357 if ${am_cv_ar_interface+:} false; then :
7358   $as_echo_n "(cached) " >&6
7359 else
7360   ac_ext=c
7361 ac_cpp='$CPP $CPPFLAGS'
7362 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7363 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7364 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7365
7366    am_cv_ar_interface=ar
7367    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7368 /* end confdefs.h.  */
7369 int some_variable = 0;
7370 _ACEOF
7371 if ac_fn_c_try_compile "$LINENO"; then :
7372   am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
7373       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
7374   (eval $am_ar_try) 2>&5
7375   ac_status=$?
7376   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7377   test $ac_status = 0; }
7378       if test "$ac_status" -eq 0; then
7379         am_cv_ar_interface=ar
7380       else
7381         am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
7382         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
7383   (eval $am_ar_try) 2>&5
7384   ac_status=$?
7385   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7386   test $ac_status = 0; }
7387         if test "$ac_status" -eq 0; then
7388           am_cv_ar_interface=lib
7389         else
7390           am_cv_ar_interface=unknown
7391         fi
7392       fi
7393       rm -f conftest.lib libconftest.a
7394
7395 fi
7396 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397    ac_ext=c
7398 ac_cpp='$CPP $CPPFLAGS'
7399 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7400 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7401 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7402
7403 fi
7404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
7405 $as_echo "$am_cv_ar_interface" >&6; }
7406
7407 case $am_cv_ar_interface in
7408 ar)
7409   ;;
7410 lib)
7411   # Microsoft lib, so override with the ar-lib wrapper script.
7412   # FIXME: It is wrong to rewrite AR.
7413   # But if we don't then we get into trouble of one sort or another.
7414   # A longer-term fix would be to have automake use am__AR in this case,
7415   # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
7416   # similar.
7417   AR="$am_aux_dir/ar-lib $AR"
7418   ;;
7419 unknown)
7420   as_fn_error $? "could not determine $AR interface" "$LINENO" 5
7421   ;;
7422 esac
7423
7424
7425
7426
7427
7428 # Expose a cross-compilation indicator to makefiles
7429  if test $build != $host; then
7430   NTP_CROSSCOMPILE_TRUE=
7431   NTP_CROSSCOMPILE_FALSE='#'
7432 else
7433   NTP_CROSSCOMPILE_TRUE='#'
7434   NTP_CROSSCOMPILE_FALSE=
7435 fi
7436
7437
7438
7439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7440 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
7441 if ${ac_cv_path_SED+:} false; then :
7442   $as_echo_n "(cached) " >&6
7443 else
7444             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7445      for ac_i in 1 2 3 4 5 6 7; do
7446        ac_script="$ac_script$as_nl$ac_script"
7447      done
7448      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7449      { ac_script=; unset ac_script;}
7450      if test -z "$SED"; then
7451   ac_path_SED_found=false
7452   # Loop through the user's path and test for each of PROGNAME-LIST
7453   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7454 for as_dir in $PATH
7455 do
7456   IFS=$as_save_IFS
7457   test -z "$as_dir" && as_dir=.
7458     for ac_prog in sed gsed; do
7459     for ac_exec_ext in '' $ac_executable_extensions; do
7460       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7461       as_fn_executable_p "$ac_path_SED" || continue
7462 # Check for GNU ac_path_SED and select it if it is found.
7463   # Check for GNU $ac_path_SED
7464 case `"$ac_path_SED" --version 2>&1` in
7465 *GNU*)
7466   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7467 *)
7468   ac_count=0
7469   $as_echo_n 0123456789 >"conftest.in"
7470   while :
7471   do
7472     cat "conftest.in" "conftest.in" >"conftest.tmp"
7473     mv "conftest.tmp" "conftest.in"
7474     cp "conftest.in" "conftest.nl"
7475     $as_echo '' >> "conftest.nl"
7476     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7477     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7478     as_fn_arith $ac_count + 1 && ac_count=$as_val
7479     if test $ac_count -gt ${ac_path_SED_max-0}; then
7480       # Best one so far, save it but keep looking for a better one
7481       ac_cv_path_SED="$ac_path_SED"
7482       ac_path_SED_max=$ac_count
7483     fi
7484     # 10*(2^10) chars as input seems more than enough
7485     test $ac_count -gt 10 && break
7486   done
7487   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7488 esac
7489
7490       $ac_path_SED_found && break 3
7491     done
7492   done
7493   done
7494 IFS=$as_save_IFS
7495   if test -z "$ac_cv_path_SED"; then
7496     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7497   fi
7498 else
7499   ac_cv_path_SED=$SED
7500 fi
7501
7502 fi
7503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7504 $as_echo "$ac_cv_path_SED" >&6; }
7505  SED="$ac_cv_path_SED"
7506   rm -f conftest.sed
7507
7508 test -z "$SED" && SED=sed
7509 Xsed="$SED -e 1s/^X//"
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7522 $as_echo_n "checking for fgrep... " >&6; }
7523 if ${ac_cv_path_FGREP+:} false; then :
7524   $as_echo_n "(cached) " >&6
7525 else
7526   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7527    then ac_cv_path_FGREP="$GREP -F"
7528    else
7529      if test -z "$FGREP"; then
7530   ac_path_FGREP_found=false
7531   # Loop through the user's path and test for each of PROGNAME-LIST
7532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7533 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7534 do
7535   IFS=$as_save_IFS
7536   test -z "$as_dir" && as_dir=.
7537     for ac_prog in fgrep; do
7538     for ac_exec_ext in '' $ac_executable_extensions; do
7539       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
7540       as_fn_executable_p "$ac_path_FGREP" || continue
7541 # Check for GNU ac_path_FGREP and select it if it is found.
7542   # Check for GNU $ac_path_FGREP
7543 case `"$ac_path_FGREP" --version 2>&1` in
7544 *GNU*)
7545   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7546 *)
7547   ac_count=0
7548   $as_echo_n 0123456789 >"conftest.in"
7549   while :
7550   do
7551     cat "conftest.in" "conftest.in" >"conftest.tmp"
7552     mv "conftest.tmp" "conftest.in"
7553     cp "conftest.in" "conftest.nl"
7554     $as_echo 'FGREP' >> "conftest.nl"
7555     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7556     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7557     as_fn_arith $ac_count + 1 && ac_count=$as_val
7558     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7559       # Best one so far, save it but keep looking for a better one
7560       ac_cv_path_FGREP="$ac_path_FGREP"
7561       ac_path_FGREP_max=$ac_count
7562     fi
7563     # 10*(2^10) chars as input seems more than enough
7564     test $ac_count -gt 10 && break
7565   done
7566   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7567 esac
7568
7569       $ac_path_FGREP_found && break 3
7570     done
7571   done
7572   done
7573 IFS=$as_save_IFS
7574   if test -z "$ac_cv_path_FGREP"; then
7575     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7576   fi
7577 else
7578   ac_cv_path_FGREP=$FGREP
7579 fi
7580
7581    fi
7582 fi
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7584 $as_echo "$ac_cv_path_FGREP" >&6; }
7585  FGREP="$ac_cv_path_FGREP"
7586
7587
7588 test -z "$GREP" && GREP=grep
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7607 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7608 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7609
7610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7611 $as_echo_n "checking how to print strings... " >&6; }
7612 # Test print first, because it will be a builtin if present.
7613 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7614    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7615   ECHO='print -r --'
7616 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7617   ECHO='printf %s\n'
7618 else
7619   # Use this function as a fallback that always works.
7620   func_fallback_echo ()
7621   {
7622     eval 'cat <<_LTECHO_EOF
7623 $1
7624 _LTECHO_EOF'
7625   }
7626   ECHO='func_fallback_echo'
7627 fi
7628
7629 # func_echo_all arg...
7630 # Invoke $ECHO with all args, space-separated.
7631 func_echo_all ()
7632 {
7633     $ECHO ""
7634 }
7635
7636 case "$ECHO" in
7637   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
7638 $as_echo "printf" >&6; } ;;
7639   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
7640 $as_echo "print -r" >&6; } ;;
7641   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
7642 $as_echo "cat" >&6; } ;;
7643 esac
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7659 if test "x$ac_cv_type_pid_t" = xyes; then :
7660
7661 else
7662
7663 cat >>confdefs.h <<_ACEOF
7664 #define pid_t int
7665 _ACEOF
7666
7667 fi
7668
7669 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7670 if test "x$ac_cv_type_size_t" = xyes; then :
7671
7672 else
7673
7674 cat >>confdefs.h <<_ACEOF
7675 #define size_t unsigned int
7676 _ACEOF
7677
7678 fi
7679
7680
7681             # Check whether --enable-c99-snprintf was given.
7682 if test "${enable_c99_snprintf+set}" = set; then :
7683   enableval=$enable_c99_snprintf; force_c99_snprintf=$enableval
7684 else
7685   force_c99_snprintf=no
7686
7687 fi
7688
7689     case "$force_c99_snprintf" in
7690      yes)
7691         hw_force_rpl_snprintf=yes
7692         hw_force_rpl_vsnprintf=yes
7693     esac
7694
7695
7696
7697
7698
7699
7700   for ac_header in $ac_header_list
7701 do :
7702   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7703 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7704 "
7705 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7706   cat >>confdefs.h <<_ACEOF
7707 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7708 _ACEOF
7709
7710 fi
7711
7712 done
7713
7714
7715
7716
7717
7718
7719
7720   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7721 $as_echo_n "checking for unsigned long long int... " >&6; }
7722 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
7723   $as_echo_n "(cached) " >&6
7724 else
7725   ac_cv_type_unsigned_long_long_int=yes
7726      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7727        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7728 /* end confdefs.h.  */
7729
7730   /* For now, do not test the preprocessor; as of 2007 there are too many
7731          implementations with broken preprocessors.  Perhaps this can
7732          be revisited in 2012.  In the meantime, code should not expect
7733          #if to work with literals wider than 32 bits.  */
7734       /* Test literals.  */
7735       long long int ll = 9223372036854775807ll;
7736       long long int nll = -9223372036854775807LL;
7737       unsigned long long int ull = 18446744073709551615ULL;
7738       /* Test constant expressions.   */
7739       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
7740                      ? 1 : -1)];
7741       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
7742                      ? 1 : -1)];
7743       int i = 63;
7744 int
7745 main ()
7746 {
7747 /* Test availability of runtime routines for shift and division.  */
7748       long long int llmax = 9223372036854775807ll;
7749       unsigned long long int ullmax = 18446744073709551615ull;
7750       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
7751               | (llmax / ll) | (llmax % ll)
7752               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
7753               | (ullmax / ull) | (ullmax % ull));
7754   ;
7755   return 0;
7756 }
7757
7758 _ACEOF
7759 if ac_fn_c_try_link "$LINENO"; then :
7760
7761 else
7762   ac_cv_type_unsigned_long_long_int=no
7763 fi
7764 rm -f core conftest.err conftest.$ac_objext \
7765     conftest$ac_exeext conftest.$ac_ext
7766      fi
7767 fi
7768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
7769 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
7770   if test $ac_cv_type_unsigned_long_long_int = yes; then
7771
7772 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
7773
7774   fi
7775
7776
7777       ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
7778 if test "x$ac_cv_func_vsnprintf" = xyes; then :
7779   hw_cv_func_vsnprintf=yes
7780 else
7781   hw_cv_func_vsnprintf=no
7782 fi
7783
7784   if test "$hw_cv_func_vsnprintf" = yes; then :
7785   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
7786 $as_echo_n "checking whether vsnprintf is C99 compliant... " >&6; }
7787 if ${hw_cv_func_vsnprintf_c99+:} false; then :
7788   $as_echo_n "(cached) " >&6
7789 else
7790   if test "$cross_compiling" = yes; then :
7791   hw_cv_func_vsnprintf_c99=no
7792 else
7793   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7794 /* end confdefs.h.  */
7795 #if HAVE_STDARG_H
7796           #include <stdarg.h>
7797           #endif
7798           #include <stdio.h>
7799           static int testprintf(char *buf, size_t size, const char *format, ...)
7800           {
7801             int result;
7802             va_list ap;
7803             va_start(ap, format);
7804             result = vsnprintf(buf, size, format, ap);
7805             va_end(ap);
7806             return result;
7807           }
7808 int
7809 main ()
7810 {
7811 char buf[43];
7812           if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
7813               testprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
7814               buf[0] != 'T' || buf[3] != '\0')
7815             return 1;
7816   ;
7817   return 0;
7818 }
7819 _ACEOF
7820 if ac_fn_c_try_run "$LINENO"; then :
7821   hw_cv_func_vsnprintf_c99=yes
7822 else
7823   hw_cv_func_vsnprintf_c99=no
7824 fi
7825 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7826   conftest.$ac_objext conftest.beam conftest.$ac_ext
7827 fi
7828
7829 fi
7830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
7831 $as_echo "$hw_cv_func_vsnprintf_c99" >&6; }
7832 else
7833   hw_cv_func_vsnprintf_c99=no
7834 fi
7835
7836 $as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
7837
7838   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement vsnprintf will be used" >&5
7839 $as_echo_n "checking if C99-snprintf replacement vsnprintf will be used... " >&6; }
7840   if test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no; then :
7841   hw_use_rpl_vsnprintf=yes
7842 else
7843   hw_use_rpl_vsnprintf=no
7844 fi
7845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_vsnprintf" >&5
7846 $as_echo "$hw_use_rpl_vsnprintf" >&6; }
7847   if test "$hw_use_rpl_vsnprintf" = yes; then :
7848
7849 $as_echo "#define HW_WANT_RPL_VSNPRINTF 1" >>confdefs.h
7850
7851     if test ${hw_nodef_vsnprintf=no} = no; then :
7852
7853 $as_echo "#define vsnprintf rpl_vsnprintf" >>confdefs.h
7854
7855 fi
7856     for ac_header in inttypes.h locale.h stddef.h stdint.h
7857 do :
7858   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7859 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7860 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7861   cat >>confdefs.h <<_ACEOF
7862 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7863 _ACEOF
7864
7865 fi
7866
7867 done
7868
7869     ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
7870 "
7871 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
7872
7873 cat >>confdefs.h <<_ACEOF
7874 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
7875 _ACEOF
7876
7877
7878 fi
7879 ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include <locale.h>
7880 "
7881 if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes; then :
7882
7883 cat >>confdefs.h <<_ACEOF
7884 #define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1
7885 _ACEOF
7886
7887
7888 fi
7889
7890
7891   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
7892 $as_echo_n "checking for long double... " >&6; }
7893 if ${ac_cv_type_long_double+:} false; then :
7894   $as_echo_n "(cached) " >&6
7895 else
7896   if test "$GCC" = yes; then
7897        ac_cv_type_long_double=yes
7898      else
7899        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7900 /* end confdefs.h.  */
7901 /* The Stardent Vistra knows sizeof (long double), but does
7902                  not support it.  */
7903               long double foo = 0.0L;
7904 int
7905 main ()
7906 {
7907 static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
7908               sizeof (double) <= sizeof (long double))];
7909 test_array [0] = 0;
7910 return test_array [0];
7911
7912   ;
7913   return 0;
7914 }
7915 _ACEOF
7916 if ac_fn_c_try_compile "$LINENO"; then :
7917   ac_cv_type_long_double=yes
7918 else
7919   ac_cv_type_long_double=no
7920 fi
7921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7922      fi
7923 fi
7924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
7925 $as_echo "$ac_cv_type_long_double" >&6; }
7926   if test $ac_cv_type_long_double = yes; then
7927
7928 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
7929
7930   fi
7931
7932
7933
7934   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
7935 $as_echo_n "checking for long long int... " >&6; }
7936 if ${ac_cv_type_long_long_int+:} false; then :
7937   $as_echo_n "(cached) " >&6
7938 else
7939   ac_cv_type_long_long_int=yes
7940       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7941         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
7942         if test $ac_cv_type_long_long_int = yes; then
7943                                   if test "$cross_compiling" = yes; then :
7944   :
7945 else
7946   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7947 /* end confdefs.h.  */
7948 #include <limits.h>
7949                  #ifndef LLONG_MAX
7950                  # define HALF \
7951                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
7952                  # define LLONG_MAX (HALF - 1 + HALF)
7953                  #endif
7954 int
7955 main ()
7956 {
7957 long long int n = 1;
7958                  int i;
7959                  for (i = 0; ; i++)
7960                    {
7961                      long long int m = n << i;
7962                      if (m >> i != n)
7963                        return 1;
7964                      if (LLONG_MAX / 2 < m)
7965                        break;
7966                    }
7967                  return 0;
7968   ;
7969   return 0;
7970 }
7971 _ACEOF
7972 if ac_fn_c_try_run "$LINENO"; then :
7973
7974 else
7975   ac_cv_type_long_long_int=no
7976 fi
7977 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7978   conftest.$ac_objext conftest.beam conftest.$ac_ext
7979 fi
7980
7981         fi
7982       fi
7983 fi
7984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
7985 $as_echo "$ac_cv_type_long_long_int" >&6; }
7986   if test $ac_cv_type_long_long_int = yes; then
7987
7988 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
7989
7990   fi
7991
7992
7993   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7994 $as_echo_n "checking for unsigned long long int... " >&6; }
7995 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
7996   $as_echo_n "(cached) " >&6
7997 else
7998   ac_cv_type_unsigned_long_long_int=yes
7999      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8000        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8001 /* end confdefs.h.  */
8002
8003   /* For now, do not test the preprocessor; as of 2007 there are too many
8004          implementations with broken preprocessors.  Perhaps this can
8005          be revisited in 2012.  In the meantime, code should not expect
8006          #if to work with literals wider than 32 bits.  */
8007       /* Test literals.  */
8008       long long int ll = 9223372036854775807ll;
8009       long long int nll = -9223372036854775807LL;
8010       unsigned long long int ull = 18446744073709551615ULL;
8011       /* Test constant expressions.   */
8012       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
8013                      ? 1 : -1)];
8014       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
8015                      ? 1 : -1)];
8016       int i = 63;
8017 int
8018 main ()
8019 {
8020 /* Test availability of runtime routines for shift and division.  */
8021       long long int llmax = 9223372036854775807ll;
8022       unsigned long long int ullmax = 18446744073709551615ull;
8023       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
8024               | (llmax / ll) | (llmax % ll)
8025               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
8026               | (ullmax / ull) | (ullmax % ull));
8027   ;
8028   return 0;
8029 }
8030
8031 _ACEOF
8032 if ac_fn_c_try_link "$LINENO"; then :
8033
8034 else
8035   ac_cv_type_unsigned_long_long_int=no
8036 fi
8037 rm -f core conftest.err conftest.$ac_objext \
8038     conftest$ac_exeext conftest.$ac_ext
8039      fi
8040 fi
8041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
8042 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
8043   if test $ac_cv_type_unsigned_long_long_int = yes; then
8044
8045 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8046
8047   fi
8048
8049     ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
8050 if test "x$ac_cv_type_size_t" = xyes; then :
8051
8052 else
8053
8054 cat >>confdefs.h <<_ACEOF
8055 #define size_t unsigned int
8056 _ACEOF
8057
8058 fi
8059
8060
8061
8062   ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
8063 if test "x$ac_cv_type_intmax_t" = xyes; then :
8064
8065 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
8066
8067 else
8068   test $ac_cv_type_long_long_int = yes \
8069        && ac_type='long long int' \
8070        || ac_type='long int'
8071
8072 cat >>confdefs.h <<_ACEOF
8073 #define intmax_t $ac_type
8074 _ACEOF
8075
8076 fi
8077
8078
8079
8080
8081   ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
8082 if test "x$ac_cv_type_uintmax_t" = xyes; then :
8083
8084 $as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
8085
8086 else
8087   test $ac_cv_type_unsigned_long_long_int = yes \
8088        && ac_type='unsigned long long int' \
8089        || ac_type='unsigned long int'
8090
8091 cat >>confdefs.h <<_ACEOF
8092 #define uintmax_t $ac_type
8093 _ACEOF
8094
8095 fi
8096
8097
8098
8099   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
8100 if test "x$ac_cv_type_uintptr_t" = xyes; then :
8101
8102 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
8103
8104 else
8105   for ac_type in 'unsigned int' 'unsigned long int' \
8106         'unsigned long long int'; do
8107        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8108 /* end confdefs.h.  */
8109 $ac_includes_default
8110 int
8111 main ()
8112 {
8113 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
8114 test_array [0] = 0;
8115 return test_array [0];
8116
8117   ;
8118   return 0;
8119 }
8120 _ACEOF
8121 if ac_fn_c_try_compile "$LINENO"; then :
8122
8123 cat >>confdefs.h <<_ACEOF
8124 #define uintptr_t $ac_type
8125 _ACEOF
8126
8127           ac_type=
8128 fi
8129 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8130        test -z "$ac_type" && break
8131      done
8132 fi
8133
8134
8135     ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
8136 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
8137
8138 cat >>confdefs.h <<_ACEOF
8139 #define HAVE_PTRDIFF_T 1
8140 _ACEOF
8141
8142
8143 fi
8144
8145     for ac_func in localeconv
8146 do :
8147   ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
8148 if test "x$ac_cv_func_localeconv" = xyes; then :
8149   cat >>confdefs.h <<_ACEOF
8150 #define HAVE_LOCALECONV 1
8151 _ACEOF
8152
8153 fi
8154 done
8155
8156
8157   if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
8158   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
8159 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
8160 if ${ac_cv_c_const+:} false; then :
8161   $as_echo_n "(cached) " >&6
8162 else
8163   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8164 /* end confdefs.h.  */
8165
8166 int
8167 main ()
8168 {
8169
8170 #ifndef __cplusplus
8171   /* Ultrix mips cc rejects this sort of thing.  */
8172   typedef int charset[2];
8173   const charset cs = { 0, 0 };
8174   /* SunOS 4.1.1 cc rejects this.  */
8175   char const *const *pcpcc;
8176   char **ppc;
8177   /* NEC SVR4.0.2 mips cc rejects this.  */
8178   struct point {int x, y;};
8179   static struct point const zero = {0,0};
8180   /* AIX XL C 1.02.0.0 rejects this.
8181      It does not let you subtract one const X* pointer from another in
8182      an arm of an if-expression whose if-part is not a constant
8183      expression */
8184   const char *g = "string";
8185   pcpcc = &g + (g ? g-g : 0);
8186   /* HPUX 7.0 cc rejects these. */
8187   ++pcpcc;
8188   ppc = (char**) pcpcc;
8189   pcpcc = (char const *const *) ppc;
8190   { /* SCO 3.2v4 cc rejects this sort of thing.  */
8191     char tx;
8192     char *t = &tx;
8193     char const *s = 0 ? (char *) 0 : (char const *) 0;
8194
8195     *t++ = 0;
8196     if (s) return 0;
8197   }
8198   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
8199     int x[] = {25, 17};
8200     const int *foo = &x[0];
8201     ++foo;
8202   }
8203   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8204     typedef const int *iptr;
8205     iptr p = 0;
8206     ++p;
8207   }
8208   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
8209        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8210     struct s { int j; const int *ap[3]; } bx;
8211     struct s *b = &bx; b->j = 5;
8212   }
8213   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8214     const int foo = 10;
8215     if (!foo) return 0;
8216   }
8217   return !cs[0] && !zero.x;
8218 #endif
8219
8220   ;
8221   return 0;
8222 }
8223 _ACEOF
8224 if ac_fn_c_try_compile "$LINENO"; then :
8225   ac_cv_c_const=yes
8226 else
8227   ac_cv_c_const=no
8228 fi
8229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8230 fi
8231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
8232 $as_echo "$ac_cv_c_const" >&6; }
8233 if test $ac_cv_c_const = no; then
8234
8235 $as_echo "#define const /**/" >>confdefs.h
8236
8237 fi
8238
8239
8240
8241
8242     case " $LIBOBJS " in
8243   *" snprintf.$ac_objext "* ) ;;
8244   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
8245  ;;
8246 esac
8247
8248     _hw_cv_func_xprintf_replace_done=yes
8249 fi
8250
8251 fi
8252
8253
8254     ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
8255 if test "x$ac_cv_func_snprintf" = xyes; then :
8256   hw_cv_func_snprintf=yes
8257 else
8258   hw_cv_func_snprintf=no
8259 fi
8260
8261   if test "$hw_cv_func_snprintf" = yes; then :
8262   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
8263 $as_echo_n "checking whether snprintf is C99 compliant... " >&6; }
8264 if ${hw_cv_func_snprintf_c99+:} false; then :
8265   $as_echo_n "(cached) " >&6
8266 else
8267   if test "$cross_compiling" = yes; then :
8268   hw_cv_func_snprintf_c99=no
8269 else
8270   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8271 /* end confdefs.h.  */
8272 #include <stdio.h>
8273 int
8274 main ()
8275 {
8276 char buf[43];
8277           if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
8278               snprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
8279               buf[0] != 'T' || buf[3] != '\0')
8280             return 1;
8281   ;
8282   return 0;
8283 }
8284 _ACEOF
8285 if ac_fn_c_try_run "$LINENO"; then :
8286   hw_cv_func_snprintf_c99=yes
8287 else
8288   hw_cv_func_snprintf_c99=no
8289 fi
8290 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8291   conftest.$ac_objext conftest.beam conftest.$ac_ext
8292 fi
8293
8294 fi
8295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
8296 $as_echo "$hw_cv_func_snprintf_c99" >&6; }
8297 else
8298   hw_cv_func_snprintf_c99=no
8299 fi
8300
8301 $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
8302
8303   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement snprintf will be used" >&5
8304 $as_echo_n "checking if C99-snprintf replacement snprintf will be used... " >&6; }
8305   if test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no; then :
8306   hw_use_rpl_snprintf=yes
8307 else
8308   hw_use_rpl_snprintf=no
8309 fi
8310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_snprintf" >&5
8311 $as_echo "$hw_use_rpl_snprintf" >&6; }
8312   if test "$hw_use_rpl_snprintf" = yes; then :
8313
8314 $as_echo "#define HW_WANT_RPL_SNPRINTF 1" >>confdefs.h
8315
8316     if test ${hw_nodef_snprintf=no} = no; then :
8317
8318 $as_echo "#define snprintf rpl_snprintf" >>confdefs.h
8319
8320 fi
8321
8322   if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
8323   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
8324 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
8325 if ${ac_cv_c_const+:} false; then :
8326   $as_echo_n "(cached) " >&6
8327 else
8328   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8329 /* end confdefs.h.  */
8330
8331 int
8332 main ()
8333 {
8334
8335 #ifndef __cplusplus
8336   /* Ultrix mips cc rejects this sort of thing.  */
8337   typedef int charset[2];
8338   const charset cs = { 0, 0 };
8339   /* SunOS 4.1.1 cc rejects this.  */
8340   char const *const *pcpcc;
8341   char **ppc;
8342   /* NEC SVR4.0.2 mips cc rejects this.  */
8343   struct point {int x, y;};
8344   static struct point const zero = {0,0};
8345   /* AIX XL C 1.02.0.0 rejects this.
8346      It does not let you subtract one const X* pointer from another in
8347      an arm of an if-expression whose if-part is not a constant
8348      expression */
8349   const char *g = "string";
8350   pcpcc = &g + (g ? g-g : 0);
8351   /* HPUX 7.0 cc rejects these. */
8352   ++pcpcc;
8353   ppc = (char**) pcpcc;
8354   pcpcc = (char const *const *) ppc;
8355   { /* SCO 3.2v4 cc rejects this sort of thing.  */
8356     char tx;
8357     char *t = &tx;
8358     char const *s = 0 ? (char *) 0 : (char const *) 0;
8359
8360     *t++ = 0;
8361     if (s) return 0;
8362   }
8363   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
8364     int x[] = {25, 17};
8365     const int *foo = &x[0];
8366     ++foo;
8367   }
8368   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8369     typedef const int *iptr;
8370     iptr p = 0;
8371     ++p;
8372   }
8373   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
8374        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8375     struct s { int j; const int *ap[3]; } bx;
8376     struct s *b = &bx; b->j = 5;
8377   }
8378   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8379     const int foo = 10;
8380     if (!foo) return 0;
8381   }
8382   return !cs[0] && !zero.x;
8383 #endif
8384
8385   ;
8386   return 0;
8387 }
8388 _ACEOF
8389 if ac_fn_c_try_compile "$LINENO"; then :
8390   ac_cv_c_const=yes
8391 else
8392   ac_cv_c_const=no
8393 fi
8394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8395 fi
8396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
8397 $as_echo "$ac_cv_c_const" >&6; }
8398 if test $ac_cv_c_const = no; then
8399
8400 $as_echo "#define const /**/" >>confdefs.h
8401
8402 fi
8403
8404
8405
8406
8407     case " $LIBOBJS " in
8408   *" snprintf.$ac_objext "* ) ;;
8409   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
8410  ;;
8411 esac
8412
8413     _hw_cv_func_xprintf_replace_done=yes
8414 fi
8415
8416 fi
8417
8418
8419
8420
8421
8422 # HMS: Save $LIBS and empty it.
8423 # any LIBS we add here should go in to LDADD_LIBNTP
8424
8425 __LIBS=$LIBS
8426 LIBS=
8427
8428
8429
8430 # [Bug 2332] because we need to know if we are using GNU ld...
8431
8432
8433 # Check whether --with-gnu-ld was given.
8434 if test "${with_gnu_ld+set}" = set; then :
8435   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8436 else
8437   with_gnu_ld=no
8438 fi
8439
8440 ac_prog=ld
8441 if test "$GCC" = yes; then
8442   # Check if gcc -print-prog-name=ld gives a path.
8443   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8444 $as_echo_n "checking for ld used by $CC... " >&6; }
8445   case $host in
8446   *-*-mingw*)
8447     # gcc leaves a trailing carriage return which upsets mingw
8448     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8449   *)
8450     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8451   esac
8452   case $ac_prog in
8453     # Accept absolute paths.
8454     [\\/]* | ?:[\\/]*)
8455       re_direlt='/[^/][^/]*/\.\./'
8456       # Canonicalize the pathname of ld
8457       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
8458       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
8459         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
8460       done
8461       test -z "$LD" && LD="$ac_prog"
8462       ;;
8463   "")
8464     # If it fails, then pretend we aren't using GCC.
8465     ac_prog=ld
8466     ;;
8467   *)
8468     # If it is relative, then search for the first ld in PATH.
8469     with_gnu_ld=unknown
8470     ;;
8471   esac
8472 elif test "$with_gnu_ld" = yes; then
8473   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8474 $as_echo_n "checking for GNU ld... " >&6; }
8475 else
8476   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8477 $as_echo_n "checking for non-GNU ld... " >&6; }
8478 fi
8479 if ${lt_cv_path_LD+:} false; then :
8480   $as_echo_n "(cached) " >&6
8481 else
8482   if test -z "$LD"; then
8483   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8484   for ac_dir in $PATH; do
8485     IFS="$lt_save_ifs"
8486     test -z "$ac_dir" && ac_dir=.
8487     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8488       lt_cv_path_LD="$ac_dir/$ac_prog"
8489       # Check to see if the program is GNU ld.  I'd rather use --version,
8490       # but apparently some variants of GNU ld only accept -v.
8491       # Break only if it was the GNU/non-GNU ld that we prefer.
8492       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
8493       *GNU* | *'with BFD'*)
8494         test "$with_gnu_ld" != no && break
8495         ;;
8496       *)
8497         test "$with_gnu_ld" != yes && break
8498         ;;
8499       esac
8500     fi
8501   done
8502   IFS="$lt_save_ifs"
8503 else
8504   lt_cv_path_LD="$LD" # Let the user override the test with a path.
8505 fi
8506 fi
8507
8508 LD="$lt_cv_path_LD"
8509 if test -n "$LD"; then
8510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8511 $as_echo "$LD" >&6; }
8512 else
8513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8514 $as_echo "no" >&6; }
8515 fi
8516 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8518 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8519 if ${lt_cv_prog_gnu_ld+:} false; then :
8520   $as_echo_n "(cached) " >&6
8521 else
8522   # I'd rather use --version here, but apparently some GNU lds only accept -v.
8523 case `$LD -v 2>&1 </dev/null` in
8524 *GNU* | *'with BFD'*)
8525   lt_cv_prog_gnu_ld=yes
8526   ;;
8527 *)
8528   lt_cv_prog_gnu_ld=no
8529   ;;
8530 esac
8531 fi
8532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
8533 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
8534 with_gnu_ld=$lt_cv_prog_gnu_ld
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
8547 $as_echo_n "checking for directory path separator... " >&6; }
8548 if ${ntp_cv_dir_sep+:} false; then :
8549   $as_echo_n "(cached) " >&6
8550 else
8551
8552         case "$ntp_cv_dir_sep" in
8553          '')
8554             case "$host_os" in
8555              *djgpp | *mingw32* | *emx*)
8556                 ntp_cv_dir_sep="'\\'"
8557                 ;;
8558              *)
8559                 ntp_cv_dir_sep="'/'"
8560                 ;;
8561             esac
8562         esac
8563
8564
8565 fi
8566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
8567 $as_echo "$ntp_cv_dir_sep" >&6; }
8568
8569 cat >>confdefs.h <<_ACEOF
8570 #define DIR_SEP $ntp_cv_dir_sep
8571 _ACEOF
8572
8573
8574
8575     NTP_ORIG_LIBS="$LIBS"
8576
8577 # Check whether --with-lineeditlibs was given.
8578 if test "${with_lineeditlibs+set}" = set; then :
8579   withval=$with_lineeditlibs; use_lineeditlibs="$withval"
8580 else
8581   use_lineeditlibs="edit,editline"
8582
8583 fi
8584
8585     { $as_echo "$as_me:${as_lineno-$LINENO}: checking line editing libraries" >&5
8586 $as_echo_n "checking line editing libraries... " >&6; }
8587     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_lineeditlibs" >&5
8588 $as_echo "$use_lineeditlibs" >&6; }
8589     case "$use_lineeditlibs" in
8590      no)
8591         ntp_lib_lineedit=no
8592         ;;
8593      *)
8594         for lineedit_lib in `echo $use_lineeditlibs | sed -e 's/,/ /'`; do
8595             for term_lib in "" termcap curses ncurses; do
8596                 case "$term_lib" in
8597                  '')
8598                     TRY_LIB="-l$lineedit_lib"
8599                     ;;
8600                  *)
8601                     TRY_LIB="-l$lineedit_lib -l$term_lib"
8602                     ;;
8603                 esac
8604                 LIBS="$NTP_ORIG_LIBS $TRY_LIB"
8605                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline() with $TRY_LIB" >&5
8606 $as_echo_n "checking for readline() with $TRY_LIB... " >&6; }
8607                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8608 /* end confdefs.h.  */
8609
8610 /* Override any GCC internal prototype to avoid an error.
8611    Use char because int might match the return type of a GCC
8612    builtin and then its argument prototype would still apply.  */
8613 #ifdef __cplusplus
8614 extern "C"
8615 #endif
8616 char readline ();
8617 int
8618 main ()
8619 {
8620 return readline ();
8621   ;
8622   return 0;
8623 }
8624 _ACEOF
8625 if ac_fn_c_try_link "$LINENO"; then :
8626   ntp_lib_lineedit="$TRY_LIB"
8627 fi
8628 rm -f core conftest.err conftest.$ac_objext \
8629     conftest$ac_exeext conftest.$ac_ext
8630                 case "$ntp_lib_lineedit" in
8631                  '')
8632                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8633 $as_echo "no" >&6; }
8634                     ;;
8635                  *)
8636                     # Use readline()
8637                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8638 $as_echo "yes" >&6; }
8639                     break
8640                 esac
8641                 case "$term_lib" in
8642                  '')
8643                     # do not try el_gets without a terminal library
8644                     ;;
8645                  *)
8646                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_gets() with $TRY_LIB" >&5
8647 $as_echo_n "checking for el_gets() with $TRY_LIB... " >&6; }
8648                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8649 /* end confdefs.h.  */
8650
8651 /* Override any GCC internal prototype to avoid an error.
8652    Use char because int might match the return type of a GCC
8653    builtin and then its argument prototype would still apply.  */
8654 #ifdef __cplusplus
8655 extern "C"
8656 #endif
8657 char el_gets ();
8658 int
8659 main ()
8660 {
8661 return el_gets ();
8662   ;
8663   return 0;
8664 }
8665 _ACEOF
8666 if ac_fn_c_try_link "$LINENO"; then :
8667   ntp_lib_lineedit="$TRY_LIB"
8668 fi
8669 rm -f core conftest.err conftest.$ac_objext \
8670     conftest$ac_exeext conftest.$ac_ext
8671                     case "$ntp_lib_lineedit" in
8672                      '')
8673                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8674 $as_echo "no" >&6; }
8675                         ;;
8676                      *) # Use el_gets()
8677                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8678 $as_echo "yes" >&6; }
8679                         break
8680                         ;;
8681                     esac        # $ntp_lib_lineedit
8682                 esac            # $term_lib
8683             done
8684             case "$ntp_lib_lineedit" in
8685              '')
8686                 ;;
8687              *)
8688                 break
8689                 ;;
8690             esac
8691         done
8692         LIBS="$NTP_ORIG_LIBS"
8693         ;;
8694     esac        # $use_lineeditlibs
8695
8696     case "$ntp_lib_lineedit" in
8697      '')
8698         ntp_lib_lineedit="no"
8699         ;;
8700      no)
8701         ;;
8702      *)
8703         EDITLINE_LIBS="$ntp_lib_lineedit"
8704
8705         ;;
8706     esac        # $ntp_lib_lineedit
8707
8708     case "$ntp_lib_lineedit" in
8709      no)
8710         ;;
8711      *)
8712         for ac_header in readline.h readline/readline.h histedit.h
8713 do :
8714   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8715 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8716 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8717   cat >>confdefs.h <<_ACEOF
8718 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8719 _ACEOF
8720
8721 fi
8722
8723 done
8724
8725         for ac_header in history.h readline/history.h
8726 do :
8727   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8728 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8729 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8730   cat >>confdefs.h <<_ACEOF
8731 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8732 _ACEOF
8733
8734 fi
8735
8736 done
8737
8738
8739         case "$ac_cv_header_histedit_h" in
8740          yes)
8741             { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to el_init()" >&5
8742 $as_echo_n "checking number of arguments to el_init()... " >&6; }
8743 if ${ntp_cv_el_init_args+:} false; then :
8744   $as_echo_n "(cached) " >&6
8745 else
8746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8747 /* end confdefs.h.  */
8748
8749                             #include <stdio.h>
8750                             #include <histedit.h>
8751
8752 int
8753 main ()
8754 {
8755
8756                             el_init("conftest", stdin, stdout, stderr);
8757
8758
8759   ;
8760   return 0;
8761 }
8762 _ACEOF
8763 if ac_fn_c_try_compile "$LINENO"; then :
8764   ntp_cv_el_init_args=4
8765 else
8766   ntp_cv_el_init_args=3
8767
8768 fi
8769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8770
8771 fi
8772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_el_init_args" >&5
8773 $as_echo "$ntp_cv_el_init_args" >&6; }
8774
8775 cat >>confdefs.h <<_ACEOF
8776 #define EL_INIT_ARGS $ntp_cv_el_init_args
8777 _ACEOF
8778
8779         esac
8780
8781         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
8782 $as_echo_n "checking whether readline supports history... " >&6; }
8783
8784         ntp_lib_lineedit_history="no"
8785         ORIG_LIBS="$LIBS"
8786         LIBS="$ORIG_LIBS $ntp_lib_lineedit"
8787         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8788 /* end confdefs.h.  */
8789
8790 /* Override any GCC internal prototype to avoid an error.
8791    Use char because int might match the return type of a GCC
8792    builtin and then its argument prototype would still apply.  */
8793 #ifdef __cplusplus
8794 extern "C"
8795 #endif
8796 char add_history ();
8797 int
8798 main ()
8799 {
8800 return add_history ();
8801   ;
8802   return 0;
8803 }
8804 _ACEOF
8805 if ac_fn_c_try_link "$LINENO"; then :
8806   ntp_lib_lineedit_history="yes"
8807 fi
8808 rm -f core conftest.err conftest.$ac_objext \
8809     conftest$ac_exeext conftest.$ac_ext
8810         LIBS="$ORIG_LIBS"
8811
8812         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_lib_lineedit_history" >&5
8813 $as_echo "$ntp_lib_lineedit_history" >&6; }
8814
8815         case "$ntp_lib_lineedit_history" in
8816          yes)
8817
8818 $as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
8819
8820         esac
8821     esac        # $ntp_lib_lineedit
8822     { NTP_ORIG_LIBS=; unset NTP_ORIG_LIBS;}
8823     { ORIG_LIBS=; unset ORIG_LIBS;}
8824     { TRY_LIB=; unset TRY_LIB;}
8825     { use_lineeditlibs=; unset use_lineeditlibs;}
8826
8827
8828 LIBM=
8829 case "$host" in
8830  *-*-darwin*)
8831     ;;
8832  *)
8833     _libs=$LIBS
8834     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
8835 $as_echo_n "checking for library containing cos... " >&6; }
8836 if ${ac_cv_search_cos+:} false; then :
8837   $as_echo_n "(cached) " >&6
8838 else
8839   ac_func_search_save_LIBS=$LIBS
8840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8841 /* end confdefs.h.  */
8842
8843 /* Override any GCC internal prototype to avoid an error.
8844    Use char because int might match the return type of a GCC
8845    builtin and then its argument prototype would still apply.  */
8846 #ifdef __cplusplus
8847 extern "C"
8848 #endif
8849 char cos ();
8850 int
8851 main ()
8852 {
8853 return cos ();
8854   ;
8855   return 0;
8856 }
8857 _ACEOF
8858 for ac_lib in '' m; do
8859   if test -z "$ac_lib"; then
8860     ac_res="none required"
8861   else
8862     ac_res=-l$ac_lib
8863     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8864   fi
8865   if ac_fn_c_try_link "$LINENO"; then :
8866   ac_cv_search_cos=$ac_res
8867 fi
8868 rm -f core conftest.err conftest.$ac_objext \
8869     conftest$ac_exeext
8870   if ${ac_cv_search_cos+:} false; then :
8871   break
8872 fi
8873 done
8874 if ${ac_cv_search_cos+:} false; then :
8875
8876 else
8877   ac_cv_search_cos=no
8878 fi
8879 rm conftest.$ac_ext
8880 LIBS=$ac_func_search_save_LIBS
8881 fi
8882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
8883 $as_echo "$ac_cv_search_cos" >&6; }
8884 ac_res=$ac_cv_search_cos
8885 if test "$ac_res" != no; then :
8886   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8887   LIBM="-lm"
8888 fi
8889
8890     LIBS=$_libs
8891     ;;
8892 esac
8893
8894 { _libs=; unset _libs;}
8895
8896
8897 for ac_header in vfork.h
8898 do :
8899   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
8900 if test "x$ac_cv_header_vfork_h" = xyes; then :
8901   cat >>confdefs.h <<_ACEOF
8902 #define HAVE_VFORK_H 1
8903 _ACEOF
8904
8905 fi
8906
8907 done
8908
8909 for ac_func in fork vfork
8910 do :
8911   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8912 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8913 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8914   cat >>confdefs.h <<_ACEOF
8915 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8916 _ACEOF
8917
8918 fi
8919 done
8920
8921 if test "x$ac_cv_func_fork" = xyes; then
8922   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
8923 $as_echo_n "checking for working fork... " >&6; }
8924 if ${ac_cv_func_fork_works+:} false; then :
8925   $as_echo_n "(cached) " >&6
8926 else
8927   if test "$cross_compiling" = yes; then :
8928   ac_cv_func_fork_works=cross
8929 else
8930   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8931 /* end confdefs.h.  */
8932 $ac_includes_default
8933 int
8934 main ()
8935 {
8936
8937           /* By Ruediger Kuhlmann. */
8938           return fork () < 0;
8939
8940   ;
8941   return 0;
8942 }
8943 _ACEOF
8944 if ac_fn_c_try_run "$LINENO"; then :
8945   ac_cv_func_fork_works=yes
8946 else
8947   ac_cv_func_fork_works=no
8948 fi
8949 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8950   conftest.$ac_objext conftest.beam conftest.$ac_ext
8951 fi
8952
8953 fi
8954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
8955 $as_echo "$ac_cv_func_fork_works" >&6; }
8956
8957 else
8958   ac_cv_func_fork_works=$ac_cv_func_fork
8959 fi
8960 if test "x$ac_cv_func_fork_works" = xcross; then
8961   case $host in
8962     *-*-amigaos* | *-*-msdosdjgpp*)
8963       # Override, as these systems have only a dummy fork() stub
8964       ac_cv_func_fork_works=no
8965       ;;
8966     *)
8967       ac_cv_func_fork_works=yes
8968       ;;
8969   esac
8970   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
8971 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
8972 fi
8973 ac_cv_func_vfork_works=$ac_cv_func_vfork
8974 if test "x$ac_cv_func_vfork" = xyes; then
8975   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
8976 $as_echo_n "checking for working vfork... " >&6; }
8977 if ${ac_cv_func_vfork_works+:} false; then :
8978   $as_echo_n "(cached) " >&6
8979 else
8980   if test "$cross_compiling" = yes; then :
8981   ac_cv_func_vfork_works=cross
8982 else
8983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8984 /* end confdefs.h.  */
8985 /* Thanks to Paul Eggert for this test.  */
8986 $ac_includes_default
8987 #include <sys/wait.h>
8988 #ifdef HAVE_VFORK_H
8989 # include <vfork.h>
8990 #endif
8991 /* On some sparc systems, changes by the child to local and incoming
8992    argument registers are propagated back to the parent.  The compiler
8993    is told about this with #include <vfork.h>, but some compilers
8994    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
8995    static variable whose address is put into a register that is
8996    clobbered by the vfork.  */
8997 static void
8998 #ifdef __cplusplus
8999 sparc_address_test (int arg)
9000 # else
9001 sparc_address_test (arg) int arg;
9002 #endif
9003 {
9004   static pid_t child;
9005   if (!child) {
9006     child = vfork ();
9007     if (child < 0) {
9008       perror ("vfork");
9009       _exit(2);
9010     }
9011     if (!child) {
9012       arg = getpid();
9013       write(-1, "", 0);
9014       _exit (arg);
9015     }
9016   }
9017 }
9018
9019 int
9020 main ()
9021 {
9022   pid_t parent = getpid ();
9023   pid_t child;
9024
9025   sparc_address_test (0);
9026
9027   child = vfork ();
9028
9029   if (child == 0) {
9030     /* Here is another test for sparc vfork register problems.  This
9031        test uses lots of local variables, at least as many local
9032        variables as main has allocated so far including compiler
9033        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
9034        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
9035        reuse the register of parent for one of the local variables,
9036        since it will think that parent can't possibly be used any more
9037        in this routine.  Assigning to the local variable will thus
9038        munge parent in the parent process.  */
9039     pid_t
9040       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9041       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9042     /* Convince the compiler that p..p7 are live; otherwise, it might
9043        use the same hardware register for all 8 local variables.  */
9044     if (p != p1 || p != p2 || p != p3 || p != p4
9045         || p != p5 || p != p6 || p != p7)
9046       _exit(1);
9047
9048     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
9049        from child file descriptors.  If the child closes a descriptor
9050        before it execs or exits, this munges the parent's descriptor
9051        as well.  Test for this by closing stdout in the child.  */
9052     _exit(close(fileno(stdout)) != 0);
9053   } else {
9054     int status;
9055     struct stat st;
9056
9057     while (wait(&status) != child)
9058       ;
9059     return (
9060          /* Was there some problem with vforking?  */
9061          child < 0
9062
9063          /* Did the child fail?  (This shouldn't happen.)  */
9064          || status
9065
9066          /* Did the vfork/compiler bug occur?  */
9067          || parent != getpid()
9068
9069          /* Did the file descriptor bug occur?  */
9070          || fstat(fileno(stdout), &st) != 0
9071          );
9072   }
9073 }
9074 _ACEOF
9075 if ac_fn_c_try_run "$LINENO"; then :
9076   ac_cv_func_vfork_works=yes
9077 else
9078   ac_cv_func_vfork_works=no
9079 fi
9080 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9081   conftest.$ac_objext conftest.beam conftest.$ac_ext
9082 fi
9083
9084 fi
9085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
9086 $as_echo "$ac_cv_func_vfork_works" >&6; }
9087
9088 fi;
9089 if test "x$ac_cv_func_fork_works" = xcross; then
9090   ac_cv_func_vfork_works=$ac_cv_func_vfork
9091   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
9092 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
9093 fi
9094
9095 if test "x$ac_cv_func_vfork_works" = xyes; then
9096
9097 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
9098
9099 else
9100
9101 $as_echo "#define vfork fork" >>confdefs.h
9102
9103 fi
9104 if test "x$ac_cv_func_fork_works" = xyes; then
9105
9106 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
9107
9108 fi
9109
9110 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9111 # for constant arguments.  Useless!
9112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9113 $as_echo_n "checking for working alloca.h... " >&6; }
9114 if ${ac_cv_working_alloca_h+:} false; then :
9115   $as_echo_n "(cached) " >&6
9116 else
9117   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9118 /* end confdefs.h.  */
9119 #include <alloca.h>
9120 int
9121 main ()
9122 {
9123 char *p = (char *) alloca (2 * sizeof (int));
9124                           if (p) return 0;
9125   ;
9126   return 0;
9127 }
9128 _ACEOF
9129 if ac_fn_c_try_link "$LINENO"; then :
9130   ac_cv_working_alloca_h=yes
9131 else
9132   ac_cv_working_alloca_h=no
9133 fi
9134 rm -f core conftest.err conftest.$ac_objext \
9135     conftest$ac_exeext conftest.$ac_ext
9136 fi
9137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9138 $as_echo "$ac_cv_working_alloca_h" >&6; }
9139 if test $ac_cv_working_alloca_h = yes; then
9140
9141 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
9142
9143 fi
9144
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9146 $as_echo_n "checking for alloca... " >&6; }
9147 if ${ac_cv_func_alloca_works+:} false; then :
9148   $as_echo_n "(cached) " >&6
9149 else
9150   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9151 /* end confdefs.h.  */
9152 #ifdef __GNUC__
9153 # define alloca __builtin_alloca
9154 #else
9155 # ifdef _MSC_VER
9156 #  include <malloc.h>
9157 #  define alloca _alloca
9158 # else
9159 #  ifdef HAVE_ALLOCA_H
9160 #   include <alloca.h>
9161 #  else
9162 #   ifdef _AIX
9163  #pragma alloca
9164 #   else
9165 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9166 void *alloca (size_t);
9167 #    endif
9168 #   endif
9169 #  endif
9170 # endif
9171 #endif
9172
9173 int
9174 main ()
9175 {
9176 char *p = (char *) alloca (1);
9177                                     if (p) return 0;
9178   ;
9179   return 0;
9180 }
9181 _ACEOF
9182 if ac_fn_c_try_link "$LINENO"; then :
9183   ac_cv_func_alloca_works=yes
9184 else
9185   ac_cv_func_alloca_works=no
9186 fi
9187 rm -f core conftest.err conftest.$ac_objext \
9188     conftest$ac_exeext conftest.$ac_ext
9189 fi
9190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9191 $as_echo "$ac_cv_func_alloca_works" >&6; }
9192
9193 if test $ac_cv_func_alloca_works = yes; then
9194
9195 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
9196
9197 else
9198   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9199 # that cause trouble.  Some versions do not even contain alloca or
9200 # contain a buggy version.  If you still want to use their alloca,
9201 # use ar to extract alloca.o from them instead of compiling alloca.c.
9202
9203 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
9204
9205 $as_echo "#define C_ALLOCA 1" >>confdefs.h
9206
9207
9208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9209 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9210 if ${ac_cv_os_cray+:} false; then :
9211   $as_echo_n "(cached) " >&6
9212 else
9213   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9214 /* end confdefs.h.  */
9215 #if defined CRAY && ! defined CRAY2
9216 webecray
9217 #else
9218 wenotbecray
9219 #endif
9220
9221 _ACEOF
9222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9223   $EGREP "webecray" >/dev/null 2>&1; then :
9224   ac_cv_os_cray=yes
9225 else
9226   ac_cv_os_cray=no
9227 fi
9228 rm -f conftest*
9229
9230 fi
9231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9232 $as_echo "$ac_cv_os_cray" >&6; }
9233 if test $ac_cv_os_cray = yes; then
9234   for ac_func in _getb67 GETB67 getb67; do
9235     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9236 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9237 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9238
9239 cat >>confdefs.h <<_ACEOF
9240 #define CRAY_STACKSEG_END $ac_func
9241 _ACEOF
9242
9243     break
9244 fi
9245
9246   done
9247 fi
9248
9249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9250 $as_echo_n "checking stack direction for C alloca... " >&6; }
9251 if ${ac_cv_c_stack_direction+:} false; then :
9252   $as_echo_n "(cached) " >&6
9253 else
9254   if test "$cross_compiling" = yes; then :
9255   ac_cv_c_stack_direction=0
9256 else
9257   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9258 /* end confdefs.h.  */
9259 $ac_includes_default
9260 int
9261 find_stack_direction (int *addr, int depth)
9262 {
9263   int dir, dummy = 0;
9264   if (! addr)
9265     addr = &dummy;
9266   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
9267   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
9268   return dir + dummy;
9269 }
9270
9271 int
9272 main (int argc, char **argv)
9273 {
9274   return find_stack_direction (0, argc + !argv + 20) < 0;
9275 }
9276 _ACEOF
9277 if ac_fn_c_try_run "$LINENO"; then :
9278   ac_cv_c_stack_direction=1
9279 else
9280   ac_cv_c_stack_direction=-1
9281 fi
9282 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9283   conftest.$ac_objext conftest.beam conftest.$ac_ext
9284 fi
9285
9286 fi
9287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9288 $as_echo "$ac_cv_c_stack_direction" >&6; }
9289 cat >>confdefs.h <<_ACEOF
9290 #define STACK_DIRECTION $ac_cv_c_stack_direction
9291 _ACEOF
9292
9293
9294 fi
9295
9296 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
9297 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
9298   ac_have_decl=1
9299 else
9300   ac_have_decl=0
9301 fi
9302
9303 cat >>confdefs.h <<_ACEOF
9304 #define HAVE_DECL_STRERROR_R $ac_have_decl
9305 _ACEOF
9306
9307 for ac_func in strerror_r
9308 do :
9309   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
9310 if test "x$ac_cv_func_strerror_r" = xyes; then :
9311   cat >>confdefs.h <<_ACEOF
9312 #define HAVE_STRERROR_R 1
9313 _ACEOF
9314
9315 fi
9316 done
9317
9318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
9319 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
9320 if ${ac_cv_func_strerror_r_char_p+:} false; then :
9321   $as_echo_n "(cached) " >&6
9322 else
9323
9324     ac_cv_func_strerror_r_char_p=no
9325     if test $ac_cv_have_decl_strerror_r = yes; then
9326       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9327 /* end confdefs.h.  */
9328 $ac_includes_default
9329 int
9330 main ()
9331 {
9332
9333           char buf[100];
9334           char x = *strerror_r (0, buf, sizeof buf);
9335           char *p = strerror_r (0, buf, sizeof buf);
9336           return !p || x;
9337
9338   ;
9339   return 0;
9340 }
9341 _ACEOF
9342 if ac_fn_c_try_compile "$LINENO"; then :
9343   ac_cv_func_strerror_r_char_p=yes
9344 fi
9345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9346     else
9347       # strerror_r is not declared.  Choose between
9348       # systems that have relatively inaccessible declarations for the
9349       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
9350       # former has a strerror_r that returns char*, while the latter
9351       # has a strerror_r that returns `int'.
9352       # This test should segfault on the DEC system.
9353       if test "$cross_compiling" = yes; then :
9354   :
9355 else
9356   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9357 /* end confdefs.h.  */
9358 $ac_includes_default
9359         extern char *strerror_r ();
9360 int
9361 main ()
9362 {
9363 char buf[100];
9364           char x = *strerror_r (0, buf, sizeof buf);
9365           return ! isalpha (x);
9366   ;
9367   return 0;
9368 }
9369 _ACEOF
9370 if ac_fn_c_try_run "$LINENO"; then :
9371   ac_cv_func_strerror_r_char_p=yes
9372 fi
9373 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9374   conftest.$ac_objext conftest.beam conftest.$ac_ext
9375 fi
9376
9377     fi
9378
9379 fi
9380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
9381 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
9382 if test $ac_cv_func_strerror_r_char_p = yes; then
9383
9384 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
9385
9386 fi
9387
9388
9389 ac_busted_vpath_in_make=no
9390 case "$build" in
9391  *-*-irix6.1*)  # 64 bit only
9392     # busted vpath?
9393     ;;
9394  *-*-irix6*)    # 6.2 (and later?)
9395     ac_busted_vpath_in_make=yes
9396     ;;
9397  *-*-solaris2.5.1)
9398     ac_busted_vpath_in_make=yes
9399     ;;
9400  *-*-unicosmp*)
9401     ac_busted_vpath_in_make=yes
9402     ;;
9403 esac
9404
9405 case "$ac_busted_vpath_in_make$srcdir" in
9406  yes.|no*)
9407     ;;
9408  *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
9409      '')
9410         as_fn_error $? "building outside of the main directory requires GNU make" "$LINENO" 5
9411     esac
9412     ;;
9413 esac
9414
9415 case "$host" in
9416  *-*-aix4*)
9417         # Bug 2516:
9418         # Was *-*-aix[[4-9]]*
9419         # XXX only verified thru AIX6.  But...
9420         # Ken Link says this is fine for AIX 5.3 and 7.1, and sees no reason
9421         # that this support would be in 5.3, removed in 6, and added back.
9422         #
9423         # (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
9424         # (returning ENOSYS).  I didn't check 4.2.  If, in the future,
9425         # IBM pulls its thumbs out long enough to implement clock_settime,
9426         # this conditional will need to change.  Maybe use AC_TRY_RUN
9427         # instead to try to set the time to itself and check errno.
9428     ;;
9429  *)
9430     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
9431 $as_echo_n "checking for library containing clock_gettime... " >&6; }
9432 if ${ac_cv_search_clock_gettime+:} false; then :
9433   $as_echo_n "(cached) " >&6
9434 else
9435   ac_func_search_save_LIBS=$LIBS
9436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9437 /* end confdefs.h.  */
9438
9439 /* Override any GCC internal prototype to avoid an error.
9440    Use char because int might match the return type of a GCC
9441    builtin and then its argument prototype would still apply.  */
9442 #ifdef __cplusplus
9443 extern "C"
9444 #endif
9445 char clock_gettime ();
9446 int
9447 main ()
9448 {
9449 return clock_gettime ();
9450   ;
9451   return 0;
9452 }
9453 _ACEOF
9454 for ac_lib in '' rt; do
9455   if test -z "$ac_lib"; then
9456     ac_res="none required"
9457   else
9458     ac_res=-l$ac_lib
9459     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9460   fi
9461   if ac_fn_c_try_link "$LINENO"; then :
9462   ac_cv_search_clock_gettime=$ac_res
9463 fi
9464 rm -f core conftest.err conftest.$ac_objext \
9465     conftest$ac_exeext
9466   if ${ac_cv_search_clock_gettime+:} false; then :
9467   break
9468 fi
9469 done
9470 if ${ac_cv_search_clock_gettime+:} false; then :
9471
9472 else
9473   ac_cv_search_clock_gettime=no
9474 fi
9475 rm conftest.$ac_ext
9476 LIBS=$ac_func_search_save_LIBS
9477 fi
9478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
9479 $as_echo "$ac_cv_search_clock_gettime" >&6; }
9480 ac_res=$ac_cv_search_clock_gettime
9481 if test "$ac_res" != no; then :
9482   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9483   case "$ac_cv_search_clock_gettime" in
9484  'none required') ;;
9485  no) ;;
9486  *) LDADD_LIBNTP="$ac_cv_search_clock_gettime $LDADD_LIBNTP" ;;
9487  esac
9488
9489 fi
9490
9491     for ac_func in clock_getres clock_gettime clock_settime
9492 do :
9493   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9494 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9495 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9496   cat >>confdefs.h <<_ACEOF
9497 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9498 _ACEOF
9499
9500 fi
9501 done
9502
9503     ;;
9504 esac
9505
9506 for ac_func in getclock stime timegm strlcpy strlcat
9507 do :
9508   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9509 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9510 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9511   cat >>confdefs.h <<_ACEOF
9512 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9513 _ACEOF
9514
9515 fi
9516 done
9517
9518
9519 # Bug 2713
9520 LDADD_LIBUTIL=
9521
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing snprintb" >&5
9523 $as_echo_n "checking for library containing snprintb... " >&6; }
9524 if ${ac_cv_search_snprintb+:} false; then :
9525   $as_echo_n "(cached) " >&6
9526 else
9527   ac_func_search_save_LIBS=$LIBS
9528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9529 /* end confdefs.h.  */
9530
9531 /* Override any GCC internal prototype to avoid an error.
9532    Use char because int might match the return type of a GCC
9533    builtin and then its argument prototype would still apply.  */
9534 #ifdef __cplusplus
9535 extern "C"
9536 #endif
9537 char snprintb ();
9538 int
9539 main ()
9540 {
9541 return snprintb ();
9542   ;
9543   return 0;
9544 }
9545 _ACEOF
9546 for ac_lib in '' util; do
9547   if test -z "$ac_lib"; then
9548     ac_res="none required"
9549   else
9550     ac_res=-l$ac_lib
9551     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9552   fi
9553   if ac_fn_c_try_link "$LINENO"; then :
9554   ac_cv_search_snprintb=$ac_res
9555 fi
9556 rm -f core conftest.err conftest.$ac_objext \
9557     conftest$ac_exeext
9558   if ${ac_cv_search_snprintb+:} false; then :
9559   break
9560 fi
9561 done
9562 if ${ac_cv_search_snprintb+:} false; then :
9563
9564 else
9565   ac_cv_search_snprintb=no
9566 fi
9567 rm conftest.$ac_ext
9568 LIBS=$ac_func_search_save_LIBS
9569 fi
9570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_snprintb" >&5
9571 $as_echo "$ac_cv_search_snprintb" >&6; }
9572 ac_res=$ac_cv_search_snprintb
9573 if test "$ac_res" != no; then :
9574   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9575   case "$ac_cv_search_snprintb" in
9576  'none required') ;;
9577  no) ;;
9578  *) LDADD_LIBUTIL="$ac_cv_search_snprintb $LDADD_LIBUTIL" ;;
9579  esac
9580
9581 $as_echo "#define USE_SNPRINTB 1" >>confdefs.h
9582
9583 fi
9584
9585
9586 #
9587 for ac_header in errno.h sys/socket.h sys/types.h time.h
9588 do :
9589   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9590 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9591 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9592   cat >>confdefs.h <<_ACEOF
9593 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9594 _ACEOF
9595
9596 fi
9597
9598 done
9599
9600 for ac_header in net/if.h
9601 do :
9602   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
9603     #ifdef HAVE_SYS_SOCKET_H
9604     # include <sys/socket.h>
9605     #endif
9606
9607 "
9608 if test "x$ac_cv_header_net_if_h" = xyes; then :
9609   cat >>confdefs.h <<_ACEOF
9610 #define HAVE_NET_IF_H 1
9611 _ACEOF
9612
9613 fi
9614
9615 done
9616
9617 case "$host" in
9618  *-hp-hpux*)
9619     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/if.h requires mpinfou predeclaration" >&5
9620 $as_echo_n "checking if net/if.h requires mpinfou predeclaration... " >&6; }
9621 if ${ntp_cv_predecl_mpinfou+:} false; then :
9622   $as_echo_n "(cached) " >&6
9623 else
9624
9625             np_cv_predecl_mpinfou=no
9626             case "$ac_cv_header_net_if_h" in
9627              no)
9628                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9629 /* end confdefs.h.  */
9630
9631                             typedef union mpinfou {
9632                                     struct pdk_mpinfo *pdkptr;
9633                                     struct mpinfo *pikptr;
9634                             } mpinfou_t;
9635                             #ifdef HAVE_SYS_SOCKET_H
9636                             # include <sys/socket.h>
9637                             #endif
9638                             #include <net/if.h>
9639
9640 int
9641 main ()
9642 {
9643
9644
9645
9646   ;
9647   return 0;
9648 }
9649 _ACEOF
9650 if ac_fn_c_try_compile "$LINENO"; then :
9651
9652                         ntp_cv_predecl_mpinfou=yes
9653                         ac_cv_header_net_if_h=yes
9654
9655
9656 fi
9657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9658             esac
9659
9660
9661 fi
9662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_predecl_mpinfou" >&5
9663 $as_echo "$ntp_cv_predecl_mpinfou" >&6; }
9664     case "$ntp_cv_predecl_mpinfou" in
9665      yes)
9666         cat >>confdefs.h <<_ACEOF
9667 #ifndef MPINFOU_PREDECLARED
9668 # define MPINFOU_PREDECLARED
9669 typedef union mpinfou {
9670         struct pdk_mpinfo *pdkptr;
9671         struct mpinfo *pikptr;
9672 } mpinfou_t;
9673 #endif
9674 _ACEOF
9675
9676     esac
9677 esac
9678
9679 case "$host" in
9680  *-linux*)
9681     for ac_header in linux/if_addr.h
9682 do :
9683   ac_fn_c_check_header_compile "$LINENO" "linux/if_addr.h" "ac_cv_header_linux_if_addr_h" "
9684         #ifdef HAVE_SYS_SOCKET_H
9685         # include <sys/socket.h>
9686         #endif
9687
9688 "
9689 if test "x$ac_cv_header_linux_if_addr_h" = xyes; then :
9690   cat >>confdefs.h <<_ACEOF
9691 #define HAVE_LINUX_IF_ADDR_H 1
9692 _ACEOF
9693
9694 fi
9695
9696 done
9697
9698
9699 $as_echo "#define NEED_EARLY_FORK 1" >>confdefs.h
9700
9701 esac
9702
9703 for ac_header in arpa/nameser.h sys/param.h sys/time.h sys/timers.h
9704 do :
9705   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9706 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9707 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9708   cat >>confdefs.h <<_ACEOF
9709 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9710 _ACEOF
9711
9712 fi
9713
9714 done
9715
9716 # sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
9717 for ac_header in sys/sysctl.h
9718 do :
9719   ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
9720     #if defined HAVE_SYS_PARAM_H
9721     # include <sys/param.h>
9722     #endif
9723
9724 "
9725 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
9726   cat >>confdefs.h <<_ACEOF
9727 #define HAVE_SYS_SYSCTL_H 1
9728 _ACEOF
9729
9730 fi
9731
9732 done
9733
9734 for ac_header in netinet/in_system.h netinet/in_systm.h netinet/in.h
9735 do :
9736   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9737 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9738 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9739   cat >>confdefs.h <<_ACEOF
9740 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9741 _ACEOF
9742
9743 fi
9744
9745 done
9746
9747
9748 for ac_header in resolv.h
9749 do :
9750   ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
9751     #ifdef HAVE_SYS_TYPES_H
9752     # include <sys/types.h>
9753     #endif
9754     #ifdef HAVE_NETINET_IN_H
9755     # include <netinet/in.h>
9756     #endif
9757     #ifdef HAVE_ARPA_NAMESER_H
9758     # include <arpa/nameser.h>
9759     #endif
9760
9761 "
9762 if test "x$ac_cv_header_resolv_h" = xyes; then :
9763   cat >>confdefs.h <<_ACEOF
9764 #define HAVE_RESOLV_H 1
9765 _ACEOF
9766
9767 fi
9768
9769 done
9770
9771
9772 for ac_header in net/if_var.h
9773 do :
9774   ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
9775     #if HAVE_SYS_TYPES_H
9776     # include <sys/types.h>
9777     #endif
9778     #ifdef HAVE_SYS_SOCKET_H
9779     # include <sys/socket.h>
9780     #endif
9781     #ifdef HAVE_NETINET_IN_H
9782     # include <netinet/in.h>
9783     #endif
9784     #ifdef HAVE_NET_IF_H
9785     # include <net/if.h>
9786     #endif
9787
9788 "
9789 if test "x$ac_cv_header_net_if_var_h" = xyes; then :
9790   cat >>confdefs.h <<_ACEOF
9791 #define HAVE_NET_IF_VAR_H 1
9792 _ACEOF
9793
9794 fi
9795
9796 done
9797
9798
9799 for ac_header in netinet/ip.h netinet/in_var.h
9800 do :
9801   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9802 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
9803     #ifdef HAVE_SYS_TYPES_H
9804     # include <sys/types.h>
9805     #endif
9806     #ifdef HAVE_SYS_SOCKET_H
9807     # include <sys/socket.h>
9808     #endif
9809     #ifdef HAVE_NET_IF_H
9810     # include <net/if.h>
9811     #endif
9812     #ifdef HAVE_NETINET_IN_H
9813     # include <netinet/in.h>
9814     #endif
9815     #ifdef HAVE_NET_IF_VAR_H
9816     # include <net/if_var.h>
9817     #endif
9818     #ifdef HAVE_NETINET_IN_SYSTM_H
9819     # include <netinet/in_systm.h>
9820     #endif
9821
9822 "
9823 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9824   cat >>confdefs.h <<_ACEOF
9825 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9826 _ACEOF
9827
9828 fi
9829
9830 done
9831
9832
9833 # HMS: Do we need to check for -lsocket before or after these tests?
9834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
9835 $as_echo_n "checking for library containing inet_pton... " >&6; }
9836 if ${ac_cv_search_inet_pton+:} false; then :
9837   $as_echo_n "(cached) " >&6
9838 else
9839   ac_func_search_save_LIBS=$LIBS
9840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9841 /* end confdefs.h.  */
9842
9843 /* Override any GCC internal prototype to avoid an error.
9844    Use char because int might match the return type of a GCC
9845    builtin and then its argument prototype would still apply.  */
9846 #ifdef __cplusplus
9847 extern "C"
9848 #endif
9849 char inet_pton ();
9850 int
9851 main ()
9852 {
9853 return inet_pton ();
9854   ;
9855   return 0;
9856 }
9857 _ACEOF
9858 for ac_lib in '' nsl; do
9859   if test -z "$ac_lib"; then
9860     ac_res="none required"
9861   else
9862     ac_res=-l$ac_lib
9863     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9864   fi
9865   if ac_fn_c_try_link "$LINENO"; then :
9866   ac_cv_search_inet_pton=$ac_res
9867 fi
9868 rm -f core conftest.err conftest.$ac_objext \
9869     conftest$ac_exeext
9870   if ${ac_cv_search_inet_pton+:} false; then :
9871   break
9872 fi
9873 done
9874 if ${ac_cv_search_inet_pton+:} false; then :
9875
9876 else
9877   ac_cv_search_inet_pton=no
9878 fi
9879 rm conftest.$ac_ext
9880 LIBS=$ac_func_search_save_LIBS
9881 fi
9882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
9883 $as_echo "$ac_cv_search_inet_pton" >&6; }
9884 ac_res=$ac_cv_search_inet_pton
9885 if test "$ac_res" != no; then :
9886   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9887   case "$ac_cv_search_inet_pton" in
9888  'none required') ;;
9889  no) ;;
9890  *) LDADD_LIBNTP="$ac_cv_search_inet_pton $LDADD_LIBNTP" ;;
9891  esac
9892
9893 fi
9894
9895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
9896 $as_echo_n "checking for library containing inet_ntop... " >&6; }
9897 if ${ac_cv_search_inet_ntop+:} false; then :
9898   $as_echo_n "(cached) " >&6
9899 else
9900   ac_func_search_save_LIBS=$LIBS
9901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9902 /* end confdefs.h.  */
9903
9904 /* Override any GCC internal prototype to avoid an error.
9905    Use char because int might match the return type of a GCC
9906    builtin and then its argument prototype would still apply.  */
9907 #ifdef __cplusplus
9908 extern "C"
9909 #endif
9910 char inet_ntop ();
9911 int
9912 main ()
9913 {
9914 return inet_ntop ();
9915   ;
9916   return 0;
9917 }
9918 _ACEOF
9919 for ac_lib in '' resolv; do
9920   if test -z "$ac_lib"; then
9921     ac_res="none required"
9922   else
9923     ac_res=-l$ac_lib
9924     LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
9925   fi
9926   if ac_fn_c_try_link "$LINENO"; then :
9927   ac_cv_search_inet_ntop=$ac_res
9928 fi
9929 rm -f core conftest.err conftest.$ac_objext \
9930     conftest$ac_exeext
9931   if ${ac_cv_search_inet_ntop+:} false; then :
9932   break
9933 fi
9934 done
9935 if ${ac_cv_search_inet_ntop+:} false; then :
9936
9937 else
9938   ac_cv_search_inet_ntop=no
9939 fi
9940 rm conftest.$ac_ext
9941 LIBS=$ac_func_search_save_LIBS
9942 fi
9943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
9944 $as_echo "$ac_cv_search_inet_ntop" >&6; }
9945 ac_res=$ac_cv_search_inet_ntop
9946 if test "$ac_res" != no; then :
9947   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9948   case "$ac_cv_search_inet_ntop" in
9949  'none required') ;;
9950  no) ;;
9951  *) LDADD_LIBNTP="$ac_cv_search_inet_ntop $LDADD_LIBNTP" ;;
9952  esac
9953
9954 fi
9955
9956
9957 # [Bug 1628] On Solaris, we need -lxnet -lsocket.  Generalize this to
9958 # avoid keying on the OS name:  If we find socket functions in
9959 # libsocket, next try for them in libxnet without libsocket, if found,
9960 # list both.  If we simply tested libxnet first, we would find the
9961 # functions there and never add libsocket.  See also [Bug 660]
9962 # http://bugs.ntp.org/show_bug.cgi?id=660#c9
9963 saved_LIBS=$LIBS
9964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
9965 $as_echo_n "checking for library containing setsockopt... " >&6; }
9966 if ${ac_cv_search_setsockopt+:} false; then :
9967   $as_echo_n "(cached) " >&6
9968 else
9969   ac_func_search_save_LIBS=$LIBS
9970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9971 /* end confdefs.h.  */
9972
9973 /* Override any GCC internal prototype to avoid an error.
9974    Use char because int might match the return type of a GCC
9975    builtin and then its argument prototype would still apply.  */
9976 #ifdef __cplusplus
9977 extern "C"
9978 #endif
9979 char setsockopt ();
9980 int
9981 main ()
9982 {
9983 return setsockopt ();
9984   ;
9985   return 0;
9986 }
9987 _ACEOF
9988 for ac_lib in '' socket; do
9989   if test -z "$ac_lib"; then
9990     ac_res="none required"
9991   else
9992     ac_res=-l$ac_lib
9993     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9994   fi
9995   if ac_fn_c_try_link "$LINENO"; then :
9996   ac_cv_search_setsockopt=$ac_res
9997 fi
9998 rm -f core conftest.err conftest.$ac_objext \
9999     conftest$ac_exeext
10000   if ${ac_cv_search_setsockopt+:} false; then :
10001   break
10002 fi
10003 done
10004 if ${ac_cv_search_setsockopt+:} false; then :
10005
10006 else
10007   ac_cv_search_setsockopt=no
10008 fi
10009 rm conftest.$ac_ext
10010 LIBS=$ac_func_search_save_LIBS
10011 fi
10012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
10013 $as_echo "$ac_cv_search_setsockopt" >&6; }
10014 ac_res=$ac_cv_search_setsockopt
10015 if test "$ac_res" != no; then :
10016   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10017   case "$ac_cv_search_setsockopt" in
10018  'none required') ;;
10019  no) ;;
10020  *) LDADD_LIBNTP="$ac_cv_search_setsockopt $LDADD_LIBNTP" ;;
10021  esac
10022
10023 fi
10024
10025 case "$ac_cv_search_setsockopt" in
10026  -lsocket)
10027     LIBS="$saved_LIBS"
10028     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
10029 $as_echo_n "checking for library containing getsockopt... " >&6; }
10030 if ${ac_cv_search_getsockopt+:} false; then :
10031   $as_echo_n "(cached) " >&6
10032 else
10033   ac_func_search_save_LIBS=$LIBS
10034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10035 /* end confdefs.h.  */
10036
10037 /* Override any GCC internal prototype to avoid an error.
10038    Use char because int might match the return type of a GCC
10039    builtin and then its argument prototype would still apply.  */
10040 #ifdef __cplusplus
10041 extern "C"
10042 #endif
10043 char getsockopt ();
10044 int
10045 main ()
10046 {
10047 return getsockopt ();
10048   ;
10049   return 0;
10050 }
10051 _ACEOF
10052 for ac_lib in '' xnet; do
10053   if test -z "$ac_lib"; then
10054     ac_res="none required"
10055   else
10056     ac_res=-l$ac_lib
10057     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10058   fi
10059   if ac_fn_c_try_link "$LINENO"; then :
10060   ac_cv_search_getsockopt=$ac_res
10061 fi
10062 rm -f core conftest.err conftest.$ac_objext \
10063     conftest$ac_exeext
10064   if ${ac_cv_search_getsockopt+:} false; then :
10065   break
10066 fi
10067 done
10068 if ${ac_cv_search_getsockopt+:} false; then :
10069
10070 else
10071   ac_cv_search_getsockopt=no
10072 fi
10073 rm conftest.$ac_ext
10074 LIBS=$ac_func_search_save_LIBS
10075 fi
10076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
10077 $as_echo "$ac_cv_search_getsockopt" >&6; }
10078 ac_res=$ac_cv_search_getsockopt
10079 if test "$ac_res" != no; then :
10080   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10081   case "$ac_cv_search_getsockopt" in
10082  'none required') ;;
10083  no) ;;
10084  *) LDADD_LIBNTP="$ac_cv_search_getsockopt $LDADD_LIBNTP" ;;
10085  esac
10086
10087 fi
10088
10089     # XXX Possible trouble here - reading the comments above and looking at the
10090     # code below I wonder if we'll add -lxnet when we don't need it.
10091     # Also, do we need to add -lxnet to LDADD_LIBNTP, or perhaps see if it's
10092     # there when it is not needed?
10093     case "$ac_cv_search_getsockopt" in
10094      -lxnet)
10095         LIBS="-lxnet -lsocket $saved_LIBS"
10096         ;;
10097      *) LIBS="-lsocket $saved_LIBS"
10098         ;;
10099     esac
10100     ;;
10101 esac
10102 { saved_LIBS=; unset saved_LIBS;}
10103
10104 # Bug 2427 - look for recvmsg here.
10105 for ac_func in recvmsg
10106 do :
10107   ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
10108 if test "x$ac_cv_func_recvmsg" = xyes; then :
10109   cat >>confdefs.h <<_ACEOF
10110 #define HAVE_RECVMSG 1
10111 _ACEOF
10112
10113 fi
10114 done
10115
10116
10117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10118 $as_echo_n "checking for inline... " >&6; }
10119 if ${ac_cv_c_inline+:} false; then :
10120   $as_echo_n "(cached) " >&6
10121 else
10122   ac_cv_c_inline=no
10123 for ac_kw in inline __inline__ __inline; do
10124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10125 /* end confdefs.h.  */
10126 #ifndef __cplusplus
10127 typedef int foo_t;
10128 static $ac_kw foo_t static_foo () {return 0; }
10129 $ac_kw foo_t foo () {return 0; }
10130 #endif
10131
10132 _ACEOF
10133 if ac_fn_c_try_compile "$LINENO"; then :
10134   ac_cv_c_inline=$ac_kw
10135 fi
10136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10137   test "$ac_cv_c_inline" != no && break
10138 done
10139
10140 fi
10141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10142 $as_echo "$ac_cv_c_inline" >&6; }
10143
10144 case $ac_cv_c_inline in
10145   inline | yes) ;;
10146   *)
10147     case $ac_cv_c_inline in
10148       no) ac_val=;;
10149       *) ac_val=$ac_cv_c_inline;;
10150     esac
10151     cat >>confdefs.h <<_ACEOF
10152 #ifndef __cplusplus
10153 #define inline $ac_val
10154 #endif
10155 _ACEOF
10156     ;;
10157 esac
10158
10159
10160 case "$ac_cv_c_inline" in
10161  '')
10162     ;;
10163  *)
10164
10165 $as_echo "#define HAVE_INLINE 1" >>confdefs.h
10166
10167
10168 esac
10169
10170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10171 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10172 if ${ac_cv_header_time+:} false; then :
10173   $as_echo_n "(cached) " >&6
10174 else
10175   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10176 /* end confdefs.h.  */
10177 #include <sys/types.h>
10178 #include <sys/time.h>
10179 #include <time.h>
10180
10181 int
10182 main ()
10183 {
10184 if ((struct tm *) 0)
10185 return 0;
10186   ;
10187   return 0;
10188 }
10189 _ACEOF
10190 if ac_fn_c_try_compile "$LINENO"; then :
10191   ac_cv_header_time=yes
10192 else
10193   ac_cv_header_time=no
10194 fi
10195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10196 fi
10197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10198 $as_echo "$ac_cv_header_time" >&6; }
10199 if test $ac_cv_header_time = yes; then
10200
10201 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
10202
10203 fi
10204
10205 # The cast to long int works around a bug in the HP C Compiler
10206 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10207 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10208 # This bug is HP SR number 8606223364.
10209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
10210 $as_echo_n "checking size of time_t... " >&6; }
10211 if ${ac_cv_sizeof_time_t+:} false; then :
10212   $as_echo_n "(cached) " >&6
10213 else
10214   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
10215
10216 else
10217   if test "$ac_cv_type_time_t" = yes; then
10218      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10219 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10220 as_fn_error 77 "cannot compute sizeof (time_t)
10221 See \`config.log' for more details" "$LINENO" 5; }
10222    else
10223      ac_cv_sizeof_time_t=0
10224    fi
10225 fi
10226
10227 fi
10228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
10229 $as_echo "$ac_cv_sizeof_time_t" >&6; }
10230
10231
10232
10233 cat >>confdefs.h <<_ACEOF
10234 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
10235 _ACEOF
10236
10237
10238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10239 $as_echo_n "checking whether char is unsigned... " >&6; }
10240 if ${ac_cv_c_char_unsigned+:} false; then :
10241   $as_echo_n "(cached) " >&6
10242 else
10243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10244 /* end confdefs.h.  */
10245 $ac_includes_default
10246 int
10247 main ()
10248 {
10249 static int test_array [1 - 2 * !(((char) -1) < 0)];
10250 test_array [0] = 0;
10251 return test_array [0];
10252
10253   ;
10254   return 0;
10255 }
10256 _ACEOF
10257 if ac_fn_c_try_compile "$LINENO"; then :
10258   ac_cv_c_char_unsigned=no
10259 else
10260   ac_cv_c_char_unsigned=yes
10261 fi
10262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10263 fi
10264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10265 $as_echo "$ac_cv_c_char_unsigned" >&6; }
10266 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
10267   $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
10268
10269 fi
10270                 # The cast to long int works around a bug in the HP C Compiler
10271 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10272 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10273 # This bug is HP SR number 8606223364.
10274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
10275 $as_echo_n "checking size of signed char... " >&6; }
10276 if ${ac_cv_sizeof_signed_char+:} false; then :
10277   $as_echo_n "(cached) " >&6
10278 else
10279   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char"        "$ac_includes_default"; then :
10280
10281 else
10282   if test "$ac_cv_type_signed_char" = yes; then
10283      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10284 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10285 as_fn_error 77 "cannot compute sizeof (signed char)
10286 See \`config.log' for more details" "$LINENO" 5; }
10287    else
10288      ac_cv_sizeof_signed_char=0
10289    fi
10290 fi
10291
10292 fi
10293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
10294 $as_echo "$ac_cv_sizeof_signed_char" >&6; }
10295
10296
10297
10298 cat >>confdefs.h <<_ACEOF
10299 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10300 _ACEOF
10301
10302
10303 ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
10304 if test "x$ac_cv_type_s_char" = xyes; then :
10305
10306 cat >>confdefs.h <<_ACEOF
10307 #define HAVE_S_CHAR 1
10308 _ACEOF
10309
10310
10311 fi
10312 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
10313 if test "x$ac_cv_type_long_long" = xyes; then :
10314
10315 cat >>confdefs.h <<_ACEOF
10316 #define HAVE_LONG_LONG 1
10317 _ACEOF
10318
10319
10320 fi
10321
10322 # The cast to long int works around a bug in the HP C Compiler
10323 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10324 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10325 # This bug is HP SR number 8606223364.
10326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
10327 $as_echo_n "checking size of short... " >&6; }
10328 if ${ac_cv_sizeof_short+:} false; then :
10329   $as_echo_n "(cached) " >&6
10330 else
10331   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
10332
10333 else
10334   if test "$ac_cv_type_short" = yes; then
10335      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10336 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10337 as_fn_error 77 "cannot compute sizeof (short)
10338 See \`config.log' for more details" "$LINENO" 5; }
10339    else
10340      ac_cv_sizeof_short=0
10341    fi
10342 fi
10343
10344 fi
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
10346 $as_echo "$ac_cv_sizeof_short" >&6; }
10347
10348
10349
10350 cat >>confdefs.h <<_ACEOF
10351 #define SIZEOF_SHORT $ac_cv_sizeof_short
10352 _ACEOF
10353
10354
10355 # The cast to long int works around a bug in the HP C Compiler
10356 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10357 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10358 # This bug is HP SR number 8606223364.
10359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
10360 $as_echo_n "checking size of int... " >&6; }
10361 if ${ac_cv_sizeof_int+:} false; then :
10362   $as_echo_n "(cached) " >&6
10363 else
10364   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
10365
10366 else
10367   if test "$ac_cv_type_int" = yes; then
10368      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10369 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10370 as_fn_error 77 "cannot compute sizeof (int)
10371 See \`config.log' for more details" "$LINENO" 5; }
10372    else
10373      ac_cv_sizeof_int=0
10374    fi
10375 fi
10376
10377 fi
10378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
10379 $as_echo "$ac_cv_sizeof_int" >&6; }
10380
10381
10382
10383 cat >>confdefs.h <<_ACEOF
10384 #define SIZEOF_INT $ac_cv_sizeof_int
10385 _ACEOF
10386
10387
10388 # The cast to long int works around a bug in the HP C Compiler
10389 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10390 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10391 # This bug is HP SR number 8606223364.
10392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
10393 $as_echo_n "checking size of long... " >&6; }
10394 if ${ac_cv_sizeof_long+:} false; then :
10395   $as_echo_n "(cached) " >&6
10396 else
10397   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
10398
10399 else
10400   if test "$ac_cv_type_long" = yes; then
10401      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10402 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10403 as_fn_error 77 "cannot compute sizeof (long)
10404 See \`config.log' for more details" "$LINENO" 5; }
10405    else
10406      ac_cv_sizeof_long=0
10407    fi
10408 fi
10409
10410 fi
10411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
10412 $as_echo "$ac_cv_sizeof_long" >&6; }
10413
10414
10415
10416 cat >>confdefs.h <<_ACEOF
10417 #define SIZEOF_LONG $ac_cv_sizeof_long
10418 _ACEOF
10419
10420
10421
10422 case "$ac_cv_type_long_long" in
10423  no)
10424     ;;
10425  *)
10426     # The cast to long int works around a bug in the HP C Compiler
10427 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10428 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10429 # This bug is HP SR number 8606223364.
10430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
10431 $as_echo_n "checking size of long long... " >&6; }
10432 if ${ac_cv_sizeof_long_long+:} false; then :
10433   $as_echo_n "(cached) " >&6
10434 else
10435   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
10436
10437 else
10438   if test "$ac_cv_type_long_long" = yes; then
10439      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10440 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10441 as_fn_error 77 "cannot compute sizeof (long long)
10442 See \`config.log' for more details" "$LINENO" 5; }
10443    else
10444      ac_cv_sizeof_long_long=0
10445    fi
10446 fi
10447
10448 fi
10449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10450 $as_echo "$ac_cv_sizeof_long_long" >&6; }
10451
10452
10453
10454 cat >>confdefs.h <<_ACEOF
10455 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10456 _ACEOF
10457
10458
10459     ;;
10460 esac
10461
10462 case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
10463  *yes)
10464     # We have a typedef for s_char.  Might as well believe it...
10465     ;;
10466  no0no)
10467     # We have signed chars, can't say 'signed char', no s_char typedef.
10468
10469 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
10470
10471     ;;
10472  no1no)
10473     # We have signed chars, can say 'signed char', no s_char typedef.
10474
10475 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
10476
10477     ;;
10478  yes0no)
10479     # We have unsigned chars, can't say 'signed char', no s_char typedef.
10480     as_fn_error $? "No way to specify a signed character!" "$LINENO" 5
10481     ;;
10482  yes1no)
10483     # We have unsigned chars, can say 'signed char', no s_char typedef.
10484
10485 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
10486
10487     ;;
10488 esac
10489
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
10491 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
10492 if ${ac_cv_type_uid_t+:} false; then :
10493   $as_echo_n "(cached) " >&6
10494 else
10495   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10496 /* end confdefs.h.  */
10497 #include <sys/types.h>
10498
10499 _ACEOF
10500 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10501   $EGREP "uid_t" >/dev/null 2>&1; then :
10502   ac_cv_type_uid_t=yes
10503 else
10504   ac_cv_type_uid_t=no
10505 fi
10506 rm -f conftest*
10507
10508 fi
10509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
10510 $as_echo "$ac_cv_type_uid_t" >&6; }
10511 if test $ac_cv_type_uid_t = no; then
10512
10513 $as_echo "#define uid_t int" >>confdefs.h
10514
10515
10516 $as_echo "#define gid_t int" >>confdefs.h
10517
10518 fi
10519
10520
10521
10522
10523
10524
10525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
10526 $as_echo_n "checking if we're including debugging code... " >&6; }
10527 # Check whether --enable-debugging was given.
10528 if test "${enable_debugging+set}" = set; then :
10529   enableval=$enable_debugging; ntp_ok=$enableval
10530 else
10531   ntp_ok=yes
10532
10533 fi
10534
10535 case "$ntp_ok" in
10536  yes)
10537
10538 $as_echo "#define DEBUG 1" >>confdefs.h
10539
10540 esac
10541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
10542 $as_echo "$ntp_ok" >&6; }
10543
10544
10545
10546 # check if we can compile with pthreads
10547 for ac_header in semaphore.h
10548 do :
10549   ac_fn_c_check_header_mongrel "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
10550 if test "x$ac_cv_header_semaphore_h" = xyes; then :
10551   cat >>confdefs.h <<_ACEOF
10552 #define HAVE_SEMAPHORE_H 1
10553 _ACEOF
10554
10555 fi
10556
10557 done
10558
10559 for ac_func in socketpair
10560 do :
10561   ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
10562 if test "x$ac_cv_func_socketpair" = xyes; then :
10563   cat >>confdefs.h <<_ACEOF
10564 #define HAVE_SOCKETPAIR 1
10565 _ACEOF
10566
10567 fi
10568 done
10569
10570 # Check whether --enable-thread-support was given.
10571 if test "${enable_thread_support+set}" = set; then :
10572   enableval=$enable_thread_support;
10573 else
10574   enable_thread_support=yes
10575
10576 fi
10577
10578 have_pthreads=no
10579 case "$enable_thread_support" in
10580  no) ;;
10581  *)
10582     ol_found_pthreads=no
10583
10584
10585
10586 ac_ext=c
10587 ac_cpp='$CPP $CPPFLAGS'
10588 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10589 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10590 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10591
10592 # OpenLDAP --with-threads
10593
10594 # Check whether --with-threads was given.
10595 if test "${with_threads+set}" = set; then :
10596   withval=$with_threads;
10597         ol_arg=invalid
10598         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
10599                 if test "$withval" = "$ol_val" ; then
10600                         ol_arg="$ol_val"
10601                 fi
10602         done
10603         if test "$ol_arg" = "invalid" ; then
10604                 as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
10605         fi
10606         ol_with_threads="$ol_arg"
10607
10608 else
10609         ol_with_threads="auto"
10610 fi
10611 # end --with-threads
10612
10613
10614 case "$ol_with_threads$host" in
10615  auto*-*-solaris2.[0-6])
10616         ol_with_threads=no
10617     ;;
10618 esac
10619
10620
10621 ol_aix_threads=no
10622 case "$host" in
10623 *-*-aix*)       if test -z "$CC" ; then
10624                 case "$ol_with_threads" in
10625                 auto | yes |  posix) ol_aix_threads=yes ;;
10626                 esac
10627         fi
10628 ;;
10629 esac
10630
10631 if test $ol_aix_threads = yes ; then
10632         if test -z "${CC}" ; then
10633                 for ac_prog in cc_r xlc_r cc
10634 do
10635   # Extract the first word of "$ac_prog", so it can be a program name with args.
10636 set dummy $ac_prog; ac_word=$2
10637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10638 $as_echo_n "checking for $ac_word... " >&6; }
10639 if ${ac_cv_prog_CC+:} false; then :
10640   $as_echo_n "(cached) " >&6
10641 else
10642   if test -n "$CC"; then
10643   ac_cv_prog_CC="$CC" # Let the user override the test.
10644 else
10645 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10646 for as_dir in $PATH
10647 do
10648   IFS=$as_save_IFS
10649   test -z "$as_dir" && as_dir=.
10650     for ac_exec_ext in '' $ac_executable_extensions; do
10651   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10652     ac_cv_prog_CC="$ac_prog"
10653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10654     break 2
10655   fi
10656 done
10657   done
10658 IFS=$as_save_IFS
10659
10660 fi
10661 fi
10662 CC=$ac_cv_prog_CC
10663 if test -n "$CC"; then
10664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
10665 $as_echo "$CC" >&6; }
10666 else
10667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10668 $as_echo "no" >&6; }
10669 fi
10670
10671
10672   test -n "$CC" && break
10673 done
10674
10675
10676                 if test "$CC" = cc ; then
10677                                                 if test $ol_with_threads != auto ; then
10678                                 as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
10679                         else
10680                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
10681 $as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
10682                         fi
10683                         ol_with_threads=no
10684                 fi
10685         fi
10686
10687         case ${CC} in cc_r | xlc_r)
10688                 ol_with_threads=posix
10689                 ol_cv_pthread_create=yes
10690                 ;;
10691         esac
10692 fi
10693
10694 ol_link_threads=no
10695 # OpenLDAP --with-yielding_select
10696
10697 # Check whether --with-yielding_select was given.
10698 if test "${with_yielding_select+set}" = set; then :
10699   withval=$with_yielding_select;
10700         ol_arg=invalid
10701         for ol_val in auto yes no manual  ; do
10702                 if test "$withval" = "$ol_val" ; then
10703                         ol_arg="$ol_val"
10704                 fi
10705         done
10706         if test "$ol_arg" = "invalid" ; then
10707                 as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
10708         fi
10709         ol_with_yielding_select="$ol_arg"
10710
10711 else
10712         ol_with_yielding_select="auto"
10713 fi
10714 # end --with-yielding_select
10715
10716
10717 case $ol_with_threads in auto | yes | nt)
10718
10719
10720         ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
10721 if test "x$ac_cv_func__beginthread" = xyes; then :
10722
10723 fi
10724
10725
10726         if test $ac_cv_func__beginthread = yes ; then
10727
10728 $as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
10729
10730                 ol_cv_nt_threads=yes
10731         fi
10732
10733
10734         if test "$ol_cv_nt_threads" = yes ; then
10735                 ol_link_threads=nt
10736                 ol_with_threads=found
10737                 ol_with_yielding_select=yes
10738
10739
10740 $as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
10741
10742
10743 $as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
10744
10745         fi
10746
10747         if test $ol_with_threads = nt ; then
10748                 as_fn_error $? "could not locate NT Threads" "$LINENO" 5
10749         fi
10750         ;;
10751 esac
10752
10753 case $ol_with_threads in auto | yes | posix)
10754
10755         for ac_header in pthread.h
10756 do :
10757   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10758 if test "x$ac_cv_header_pthread_h" = xyes; then :
10759   cat >>confdefs.h <<_ACEOF
10760 #define HAVE_PTHREAD_H 1
10761 _ACEOF
10762
10763 fi
10764
10765 done
10766
10767
10768         if test $ac_cv_header_pthread_h = yes ; then
10769                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
10770 $as_echo_n "checking POSIX thread version... " >&6; }
10771 if ${ol_cv_pthread_version+:} false; then :
10772   $as_echo_n "(cached) " >&6
10773 else
10774
10775         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10776 /* end confdefs.h.  */
10777
10778 #               include <pthread.h>
10779
10780 int
10781 main ()
10782 {
10783
10784                 int i = PTHREAD_CREATE_JOINABLE;
10785
10786   ;
10787   return 0;
10788 }
10789 _ACEOF
10790 if ac_fn_c_try_compile "$LINENO"; then :
10791
10792         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10793 /* end confdefs.h.  */
10794 #include <pthread.h>
10795
10796 _ACEOF
10797 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10798   $EGREP "pthread_detach" >/dev/null 2>&1; then :
10799   ol_cv_pthread_version=10
10800 else
10801   ol_cv_pthread_version=8
10802 fi
10803 rm -f conftest*
10804
10805 else
10806
10807         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10808 /* end confdefs.h.  */
10809
10810 #               include <pthread.h>
10811 #               ifdef PTHREAD_CREATE_UNDETACHED
10812                 draft7
10813 #               endif
10814
10815 _ACEOF
10816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10817   $EGREP "draft7" >/dev/null 2>&1; then :
10818   ol_cv_pthread_version=7
10819 else
10820
10821         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10822 /* end confdefs.h.  */
10823 #include <pthread.h>
10824
10825 _ACEOF
10826 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10827   $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
10828   ol_cv_pthread_version=6
10829 else
10830
10831         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10832 /* end confdefs.h.  */
10833
10834 #               include <pthread.h>
10835 #ifdef          PTHREAD_MUTEX_INITIALIZER
10836                 draft5
10837 #endif
10838
10839 _ACEOF
10840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10841   $EGREP "draft5" >/dev/null 2>&1; then :
10842   ol_cv_pthread_version=5
10843 else
10844   ol_cv_pthread_version=4
10845 fi
10846 rm -f conftest*
10847
10848 fi
10849 rm -f conftest*
10850
10851 fi
10852 rm -f conftest*
10853
10854 fi
10855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10856
10857 fi
10858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
10859 $as_echo "$ol_cv_pthread_version" >&6; }
10860
10861
10862                 if test $ol_cv_pthread_version != 0 ; then
10863
10864 cat >>confdefs.h <<_ACEOF
10865 #define HAVE_PTHREADS $ol_cv_pthread_version
10866 _ACEOF
10867
10868                 else
10869                         as_fn_error $? "unknown pthread version" "$LINENO" 5
10870                 fi
10871
10872                 # consider threads found
10873                 ol_with_threads=found
10874
10875
10876         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
10877 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
10878 if ${ol_cv_header_linux_threads+:} false; then :
10879   $as_echo_n "(cached) " >&6
10880 else
10881   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10882 /* end confdefs.h.  */
10883 #include <pthread.h>
10884 _ACEOF
10885 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10886   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
10887   ol_cv_header_linux_threads=yes
10888 else
10889   ol_cv_header_linux_threads=no
10890 fi
10891 rm -f conftest*
10892
10893
10894 fi
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
10896 $as_echo "$ol_cv_header_linux_threads" >&6; }
10897         if test $ol_cv_header_linux_threads = yes; then
10898
10899 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
10900
10901         fi
10902
10903
10904         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
10905 $as_echo_n "checking for GNU Pth pthread.h... " >&6; }
10906 if ${ol_cv_header_gnu_pth_pthread_h+:} false; then :
10907   $as_echo_n "(cached) " >&6
10908 else
10909   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10910 /* end confdefs.h.  */
10911 #include <pthread.h>
10912 #ifdef _POSIX_THREAD_IS_GNU_PTH
10913         __gnu_pth__;
10914 #endif
10915
10916 _ACEOF
10917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10918   $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
10919   ol_cv_header_gnu_pth_pthread_h=yes
10920 else
10921   ol_cv_header_gnu_pth_pthread_h=no
10922 fi
10923 rm -f conftest*
10924
10925
10926 fi
10927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
10928 $as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
10929
10930
10931                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
10932                         for ac_header in sched.h
10933 do :
10934   ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
10935 if test "x$ac_cv_header_sched_h" = xyes; then :
10936   cat >>confdefs.h <<_ACEOF
10937 #define HAVE_SCHED_H 1
10938 _ACEOF
10939
10940 fi
10941
10942 done
10943
10944                 fi
10945
10946
10947                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
10948 $as_echo_n "checking for pthread_create in default libraries... " >&6; }
10949 if ${ol_cv_pthread_create+:} false; then :
10950   $as_echo_n "(cached) " >&6
10951 else
10952
10953                         if test "$cross_compiling" = yes; then :
10954   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10955 /* end confdefs.h.  */
10956
10957 /* pthread test headers */
10958 #include <pthread.h>
10959 #if HAVE_PTHREADS < 7
10960 #include <errno.h>
10961 #endif
10962 #ifndef NULL
10963 #define NULL (void*)0
10964 #endif
10965
10966 static void *task(p)
10967         void *p;
10968 {
10969         return (void *) (p == NULL);
10970 }
10971
10972 int
10973 main ()
10974 {
10975
10976         /* pthread test function */
10977 #ifndef PTHREAD_CREATE_DETACHED
10978 #define PTHREAD_CREATE_DETACHED 1
10979 #endif
10980         pthread_t t;
10981         int status;
10982         int detach = PTHREAD_CREATE_DETACHED;
10983
10984 #if HAVE_PTHREADS > 4
10985         /* Final pthreads */
10986         pthread_attr_t attr;
10987
10988         status = pthread_attr_init(&attr);
10989         if( status ) return status;
10990
10991 #if HAVE_PTHREADS < 7
10992         status = pthread_attr_setdetachstate(&attr, &detach);
10993         if( status < 0 ) status = errno;
10994 #else
10995         status = pthread_attr_setdetachstate(&attr, detach);
10996 #endif
10997         if( status ) return status;
10998         status = pthread_create( &t, &attr, task, NULL );
10999 #if HAVE_PTHREADS < 7
11000         if( status < 0 ) status = errno;
11001 #endif
11002         if( status ) return status;
11003 #else
11004         /* Draft 4 pthreads */
11005         status = pthread_create( &t, pthread_attr_default, task, NULL );
11006         if( status ) return errno;
11007
11008         /* give thread a chance to complete */
11009         /* it should remain joinable and hence detachable */
11010         sleep( 1 );
11011
11012         status = pthread_detach( &t );
11013         if( status ) return errno;
11014 #endif
11015
11016 #ifdef HAVE_LINUX_THREADS
11017         pthread_kill_other_threads_np();
11018 #endif
11019
11020         return 0;
11021
11022   ;
11023   return 0;
11024 }
11025 _ACEOF
11026 if ac_fn_c_try_link "$LINENO"; then :
11027   ol_cv_pthread_create=yes
11028 else
11029   ol_cv_pthread_create=no
11030 fi
11031 rm -f core conftest.err conftest.$ac_objext \
11032     conftest$ac_exeext conftest.$ac_ext
11033 else
11034   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11035 /* end confdefs.h.  */
11036
11037
11038 /* pthread test headers */
11039 #include <pthread.h>
11040 #if HAVE_PTHREADS < 7
11041 #include <errno.h>
11042 #endif
11043 #ifndef NULL
11044 #define NULL (void*)0
11045 #endif
11046
11047 static void *task(p)
11048         void *p;
11049 {
11050         return (void *) (p == NULL);
11051 }
11052
11053
11054 int main(argc, argv)
11055         int argc;
11056         char **argv;
11057 {
11058
11059         /* pthread test function */
11060 #ifndef PTHREAD_CREATE_DETACHED
11061 #define PTHREAD_CREATE_DETACHED 1
11062 #endif
11063         pthread_t t;
11064         int status;
11065         int detach = PTHREAD_CREATE_DETACHED;
11066
11067 #if HAVE_PTHREADS > 4
11068         /* Final pthreads */
11069         pthread_attr_t attr;
11070
11071         status = pthread_attr_init(&attr);
11072         if( status ) return status;
11073
11074 #if HAVE_PTHREADS < 7
11075         status = pthread_attr_setdetachstate(&attr, &detach);
11076         if( status < 0 ) status = errno;
11077 #else
11078         status = pthread_attr_setdetachstate(&attr, detach);
11079 #endif
11080         if( status ) return status;
11081         status = pthread_create( &t, &attr, task, NULL );
11082 #if HAVE_PTHREADS < 7
11083         if( status < 0 ) status = errno;
11084 #endif
11085         if( status ) return status;
11086 #else
11087         /* Draft 4 pthreads */
11088         status = pthread_create( &t, pthread_attr_default, task, NULL );
11089         if( status ) return errno;
11090
11091         /* give thread a chance to complete */
11092         /* it should remain joinable and hence detachable */
11093         sleep( 1 );
11094
11095         status = pthread_detach( &t );
11096         if( status ) return errno;
11097 #endif
11098
11099 #ifdef HAVE_LINUX_THREADS
11100         pthread_kill_other_threads_np();
11101 #endif
11102
11103         return 0;
11104
11105 }
11106
11107 _ACEOF
11108 if ac_fn_c_try_run "$LINENO"; then :
11109   ol_cv_pthread_create=yes
11110 else
11111   ol_cv_pthread_create=no
11112 fi
11113 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11114   conftest.$ac_objext conftest.beam conftest.$ac_ext
11115 fi
11116
11117 fi
11118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
11119 $as_echo "$ol_cv_pthread_create" >&6; }
11120
11121                 if test $ol_cv_pthread_create != no ; then
11122                         ol_link_threads=posix
11123                         ol_link_pthreads=""
11124                 fi
11125
11126                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11127 if test "$ol_link_threads" = no ; then
11128         # try -kthread
11129         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
11130 $as_echo_n "checking for pthread link with -kthread... " >&6; }
11131 if ${ol_cv_pthread_kthread+:} false; then :
11132   $as_echo_n "(cached) " >&6
11133 else
11134
11135                 # save the flags
11136                 ol_LIBS="$LIBS"
11137                 LIBS="-kthread $LIBS"
11138
11139                 if test "$cross_compiling" = yes; then :
11140   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11141 /* end confdefs.h.  */
11142
11143 /* pthread test headers */
11144 #include <pthread.h>
11145 #if HAVE_PTHREADS < 7
11146 #include <errno.h>
11147 #endif
11148 #ifndef NULL
11149 #define NULL (void*)0
11150 #endif
11151
11152 static void *task(p)
11153         void *p;
11154 {
11155         return (void *) (p == NULL);
11156 }
11157
11158 int
11159 main ()
11160 {
11161
11162         /* pthread test function */
11163 #ifndef PTHREAD_CREATE_DETACHED
11164 #define PTHREAD_CREATE_DETACHED 1
11165 #endif
11166         pthread_t t;
11167         int status;
11168         int detach = PTHREAD_CREATE_DETACHED;
11169
11170 #if HAVE_PTHREADS > 4
11171         /* Final pthreads */
11172         pthread_attr_t attr;
11173
11174         status = pthread_attr_init(&attr);
11175         if( status ) return status;
11176
11177 #if HAVE_PTHREADS < 7
11178         status = pthread_attr_setdetachstate(&attr, &detach);
11179         if( status < 0 ) status = errno;
11180 #else
11181         status = pthread_attr_setdetachstate(&attr, detach);
11182 #endif
11183         if( status ) return status;
11184         status = pthread_create( &t, &attr, task, NULL );
11185 #if HAVE_PTHREADS < 7
11186         if( status < 0 ) status = errno;
11187 #endif
11188         if( status ) return status;
11189 #else
11190         /* Draft 4 pthreads */
11191         status = pthread_create( &t, pthread_attr_default, task, NULL );
11192         if( status ) return errno;
11193
11194         /* give thread a chance to complete */
11195         /* it should remain joinable and hence detachable */
11196         sleep( 1 );
11197
11198         status = pthread_detach( &t );
11199         if( status ) return errno;
11200 #endif
11201
11202 #ifdef HAVE_LINUX_THREADS
11203         pthread_kill_other_threads_np();
11204 #endif
11205
11206         return 0;
11207
11208   ;
11209   return 0;
11210 }
11211 _ACEOF
11212 if ac_fn_c_try_link "$LINENO"; then :
11213   ol_cv_pthread_kthread=yes
11214 else
11215   ol_cv_pthread_kthread=no
11216 fi
11217 rm -f core conftest.err conftest.$ac_objext \
11218     conftest$ac_exeext conftest.$ac_ext
11219 else
11220   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11221 /* end confdefs.h.  */
11222
11223
11224 /* pthread test headers */
11225 #include <pthread.h>
11226 #if HAVE_PTHREADS < 7
11227 #include <errno.h>
11228 #endif
11229 #ifndef NULL
11230 #define NULL (void*)0
11231 #endif
11232
11233 static void *task(p)
11234         void *p;
11235 {
11236         return (void *) (p == NULL);
11237 }
11238
11239
11240 int main(argc, argv)
11241         int argc;
11242         char **argv;
11243 {
11244
11245         /* pthread test function */
11246 #ifndef PTHREAD_CREATE_DETACHED
11247 #define PTHREAD_CREATE_DETACHED 1
11248 #endif
11249         pthread_t t;
11250         int status;
11251         int detach = PTHREAD_CREATE_DETACHED;
11252
11253 #if HAVE_PTHREADS > 4
11254         /* Final pthreads */
11255         pthread_attr_t attr;
11256
11257         status = pthread_attr_init(&attr);
11258         if( status ) return status;
11259
11260 #if HAVE_PTHREADS < 7
11261         status = pthread_attr_setdetachstate(&attr, &detach);
11262         if( status < 0 ) status = errno;
11263 #else
11264         status = pthread_attr_setdetachstate(&attr, detach);
11265 #endif
11266         if( status ) return status;
11267         status = pthread_create( &t, &attr, task, NULL );
11268 #if HAVE_PTHREADS < 7
11269         if( status < 0 ) status = errno;
11270 #endif
11271         if( status ) return status;
11272 #else
11273         /* Draft 4 pthreads */
11274         status = pthread_create( &t, pthread_attr_default, task, NULL );
11275         if( status ) return errno;
11276
11277         /* give thread a chance to complete */
11278         /* it should remain joinable and hence detachable */
11279         sleep( 1 );
11280
11281         status = pthread_detach( &t );
11282         if( status ) return errno;
11283 #endif
11284
11285 #ifdef HAVE_LINUX_THREADS
11286         pthread_kill_other_threads_np();
11287 #endif
11288
11289         return 0;
11290
11291 }
11292
11293 _ACEOF
11294 if ac_fn_c_try_run "$LINENO"; then :
11295   ol_cv_pthread_kthread=yes
11296 else
11297   ol_cv_pthread_kthread=no
11298 fi
11299 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11300   conftest.$ac_objext conftest.beam conftest.$ac_ext
11301 fi
11302
11303
11304                 # restore the LIBS
11305                 LIBS="$ol_LIBS"
11306
11307 fi
11308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
11309 $as_echo "$ol_cv_pthread_kthread" >&6; }
11310
11311         if test $ol_cv_pthread_kthread = yes ; then
11312                 ol_link_pthreads="-kthread"
11313                 ol_link_threads=posix
11314         fi
11315 fi
11316
11317                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11318 if test "$ol_link_threads" = no ; then
11319         # try -pthread
11320         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
11321 $as_echo_n "checking for pthread link with -pthread... " >&6; }
11322 if ${ol_cv_pthread_pthread+:} false; then :
11323   $as_echo_n "(cached) " >&6
11324 else
11325
11326                 # save the flags
11327                 ol_LIBS="$LIBS"
11328                 LIBS="-pthread $LIBS"
11329
11330                 if test "$cross_compiling" = yes; then :
11331   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11332 /* end confdefs.h.  */
11333
11334 /* pthread test headers */
11335 #include <pthread.h>
11336 #if HAVE_PTHREADS < 7
11337 #include <errno.h>
11338 #endif
11339 #ifndef NULL
11340 #define NULL (void*)0
11341 #endif
11342
11343 static void *task(p)
11344         void *p;
11345 {
11346         return (void *) (p == NULL);
11347 }
11348
11349 int
11350 main ()
11351 {
11352
11353         /* pthread test function */
11354 #ifndef PTHREAD_CREATE_DETACHED
11355 #define PTHREAD_CREATE_DETACHED 1
11356 #endif
11357         pthread_t t;
11358         int status;
11359         int detach = PTHREAD_CREATE_DETACHED;
11360
11361 #if HAVE_PTHREADS > 4
11362         /* Final pthreads */
11363         pthread_attr_t attr;
11364
11365         status = pthread_attr_init(&attr);
11366         if( status ) return status;
11367
11368 #if HAVE_PTHREADS < 7
11369         status = pthread_attr_setdetachstate(&attr, &detach);
11370         if( status < 0 ) status = errno;
11371 #else
11372         status = pthread_attr_setdetachstate(&attr, detach);
11373 #endif
11374         if( status ) return status;
11375         status = pthread_create( &t, &attr, task, NULL );
11376 #if HAVE_PTHREADS < 7
11377         if( status < 0 ) status = errno;
11378 #endif
11379         if( status ) return status;
11380 #else
11381         /* Draft 4 pthreads */
11382         status = pthread_create( &t, pthread_attr_default, task, NULL );
11383         if( status ) return errno;
11384
11385         /* give thread a chance to complete */
11386         /* it should remain joinable and hence detachable */
11387         sleep( 1 );
11388
11389         status = pthread_detach( &t );
11390         if( status ) return errno;
11391 #endif
11392
11393 #ifdef HAVE_LINUX_THREADS
11394         pthread_kill_other_threads_np();
11395 #endif
11396
11397         return 0;
11398
11399   ;
11400   return 0;
11401 }
11402 _ACEOF
11403 if ac_fn_c_try_link "$LINENO"; then :
11404   ol_cv_pthread_pthread=yes
11405 else
11406   ol_cv_pthread_pthread=no
11407 fi
11408 rm -f core conftest.err conftest.$ac_objext \
11409     conftest$ac_exeext conftest.$ac_ext
11410 else
11411   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11412 /* end confdefs.h.  */
11413
11414
11415 /* pthread test headers */
11416 #include <pthread.h>
11417 #if HAVE_PTHREADS < 7
11418 #include <errno.h>
11419 #endif
11420 #ifndef NULL
11421 #define NULL (void*)0
11422 #endif
11423
11424 static void *task(p)
11425         void *p;
11426 {
11427         return (void *) (p == NULL);
11428 }
11429
11430
11431 int main(argc, argv)
11432         int argc;
11433         char **argv;
11434 {
11435
11436         /* pthread test function */
11437 #ifndef PTHREAD_CREATE_DETACHED
11438 #define PTHREAD_CREATE_DETACHED 1
11439 #endif
11440         pthread_t t;
11441         int status;
11442         int detach = PTHREAD_CREATE_DETACHED;
11443
11444 #if HAVE_PTHREADS > 4
11445         /* Final pthreads */
11446         pthread_attr_t attr;
11447
11448         status = pthread_attr_init(&attr);
11449         if( status ) return status;
11450
11451 #if HAVE_PTHREADS < 7
11452         status = pthread_attr_setdetachstate(&attr, &detach);
11453         if( status < 0 ) status = errno;
11454 #else
11455         status = pthread_attr_setdetachstate(&attr, detach);
11456 #endif
11457         if( status ) return status;
11458         status = pthread_create( &t, &attr, task, NULL );
11459 #if HAVE_PTHREADS < 7
11460         if( status < 0 ) status = errno;
11461 #endif
11462         if( status ) return status;
11463 #else
11464         /* Draft 4 pthreads */
11465         status = pthread_create( &t, pthread_attr_default, task, NULL );
11466         if( status ) return errno;
11467
11468         /* give thread a chance to complete */
11469         /* it should remain joinable and hence detachable */
11470         sleep( 1 );
11471
11472         status = pthread_detach( &t );
11473         if( status ) return errno;
11474 #endif
11475
11476 #ifdef HAVE_LINUX_THREADS
11477         pthread_kill_other_threads_np();
11478 #endif
11479
11480         return 0;
11481
11482 }
11483
11484 _ACEOF
11485 if ac_fn_c_try_run "$LINENO"; then :
11486   ol_cv_pthread_pthread=yes
11487 else
11488   ol_cv_pthread_pthread=no
11489 fi
11490 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11491   conftest.$ac_objext conftest.beam conftest.$ac_ext
11492 fi
11493
11494
11495                 # restore the LIBS
11496                 LIBS="$ol_LIBS"
11497
11498 fi
11499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
11500 $as_echo "$ol_cv_pthread_pthread" >&6; }
11501
11502         if test $ol_cv_pthread_pthread = yes ; then
11503                 ol_link_pthreads="-pthread"
11504                 ol_link_threads=posix
11505         fi
11506 fi
11507
11508                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
11509 if test "$ol_link_threads" = no ; then
11510         # try -pthreads
11511         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
11512 $as_echo_n "checking for pthread link with -pthreads... " >&6; }
11513 if ${ol_cv_pthread_pthreads+:} false; then :
11514   $as_echo_n "(cached) " >&6
11515 else
11516
11517                 # save the flags
11518                 ol_LIBS="$LIBS"
11519                 LIBS="-pthreads $LIBS"
11520
11521                 if test "$cross_compiling" = yes; then :
11522   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11523 /* end confdefs.h.  */
11524
11525 /* pthread test headers */
11526 #include <pthread.h>
11527 #if HAVE_PTHREADS < 7
11528 #include <errno.h>
11529 #endif
11530 #ifndef NULL
11531 #define NULL (void*)0
11532 #endif
11533
11534 static void *task(p)
11535         void *p;
11536 {
11537         return (void *) (p == NULL);
11538 }
11539
11540 int
11541 main ()
11542 {
11543
11544         /* pthread test function */
11545 #ifndef PTHREAD_CREATE_DETACHED
11546 #define PTHREAD_CREATE_DETACHED 1
11547 #endif
11548         pthread_t t;
11549         int status;
11550         int detach = PTHREAD_CREATE_DETACHED;
11551
11552 #if HAVE_PTHREADS > 4
11553         /* Final pthreads */
11554         pthread_attr_t attr;
11555
11556         status = pthread_attr_init(&attr);
11557         if( status ) return status;
11558
11559 #if HAVE_PTHREADS < 7
11560         status = pthread_attr_setdetachstate(&attr, &detach);
11561         if( status < 0 ) status = errno;
11562 #else
11563         status = pthread_attr_setdetachstate(&attr, detach);
11564 #endif
11565         if( status ) return status;
11566         status = pthread_create( &t, &attr, task, NULL );
11567 #if HAVE_PTHREADS < 7
11568         if( status < 0 ) status = errno;
11569 #endif
11570         if( status ) return status;
11571 #else
11572         /* Draft 4 pthreads */
11573         status = pthread_create( &t, pthread_attr_default, task, NULL );
11574         if( status ) return errno;
11575
11576         /* give thread a chance to complete */
11577         /* it should remain joinable and hence detachable */
11578         sleep( 1 );
11579
11580         status = pthread_detach( &t );
11581         if( status ) return errno;
11582 #endif
11583
11584 #ifdef HAVE_LINUX_THREADS
11585         pthread_kill_other_threads_np();
11586 #endif
11587
11588         return 0;
11589
11590   ;
11591   return 0;
11592 }
11593 _ACEOF
11594 if ac_fn_c_try_link "$LINENO"; then :
11595   ol_cv_pthread_pthreads=yes
11596 else
11597   ol_cv_pthread_pthreads=no
11598 fi
11599 rm -f core conftest.err conftest.$ac_objext \
11600     conftest$ac_exeext conftest.$ac_ext
11601 else
11602   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11603 /* end confdefs.h.  */
11604
11605
11606 /* pthread test headers */
11607 #include <pthread.h>
11608 #if HAVE_PTHREADS < 7
11609 #include <errno.h>
11610 #endif
11611 #ifndef NULL
11612 #define NULL (void*)0
11613 #endif
11614
11615 static void *task(p)
11616         void *p;
11617 {
11618         return (void *) (p == NULL);
11619 }
11620
11621
11622 int main(argc, argv)
11623         int argc;
11624         char **argv;
11625 {
11626
11627         /* pthread test function */
11628 #ifndef PTHREAD_CREATE_DETACHED
11629 #define PTHREAD_CREATE_DETACHED 1
11630 #endif
11631         pthread_t t;
11632         int status;
11633         int detach = PTHREAD_CREATE_DETACHED;
11634
11635 #if HAVE_PTHREADS > 4
11636         /* Final pthreads */
11637         pthread_attr_t attr;
11638
11639         status = pthread_attr_init(&attr);
11640         if( status ) return status;
11641
11642 #if HAVE_PTHREADS < 7
11643         status = pthread_attr_setdetachstate(&attr, &detach);
11644         if( status < 0 ) status = errno;
11645 #else
11646         status = pthread_attr_setdetachstate(&attr, detach);
11647 #endif
11648         if( status ) return status;
11649         status = pthread_create( &t, &attr, task, NULL );
11650 #if HAVE_PTHREADS < 7
11651         if( status < 0 ) status = errno;
11652 #endif
11653         if( status ) return status;
11654 #else
11655         /* Draft 4 pthreads */
11656         status = pthread_create( &t, pthread_attr_default, task, NULL );
11657         if( status ) return errno;
11658
11659         /* give thread a chance to complete */
11660         /* it should remain joinable and hence detachable */
11661         sleep( 1 );
11662
11663         status = pthread_detach( &t );
11664         if( status ) return errno;
11665 #endif
11666
11667 #ifdef HAVE_LINUX_THREADS
11668         pthread_kill_other_threads_np();
11669 #endif
11670
11671         return 0;
11672
11673 }
11674
11675 _ACEOF
11676 if ac_fn_c_try_run "$LINENO"; then :
11677   ol_cv_pthread_pthreads=yes
11678 else
11679   ol_cv_pthread_pthreads=no
11680 fi
11681 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11682   conftest.$ac_objext conftest.beam conftest.$ac_ext
11683 fi
11684
11685
11686                 # restore the LIBS
11687                 LIBS="$ol_LIBS"
11688
11689 fi
11690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
11691 $as_echo "$ol_cv_pthread_pthreads" >&6; }
11692
11693         if test $ol_cv_pthread_pthreads = yes ; then
11694                 ol_link_pthreads="-pthreads"
11695                 ol_link_threads=posix
11696         fi
11697 fi
11698
11699                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
11700 if test "$ol_link_threads" = no ; then
11701         # try -mthreads
11702         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
11703 $as_echo_n "checking for pthread link with -mthreads... " >&6; }
11704 if ${ol_cv_pthread_mthreads+:} false; then :
11705   $as_echo_n "(cached) " >&6
11706 else
11707
11708                 # save the flags
11709                 ol_LIBS="$LIBS"
11710                 LIBS="-mthreads $LIBS"
11711
11712                 if test "$cross_compiling" = yes; then :
11713   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11714 /* end confdefs.h.  */
11715
11716 /* pthread test headers */
11717 #include <pthread.h>
11718 #if HAVE_PTHREADS < 7
11719 #include <errno.h>
11720 #endif
11721 #ifndef NULL
11722 #define NULL (void*)0
11723 #endif
11724
11725 static void *task(p)
11726         void *p;
11727 {
11728         return (void *) (p == NULL);
11729 }
11730
11731 int
11732 main ()
11733 {
11734
11735         /* pthread test function */
11736 #ifndef PTHREAD_CREATE_DETACHED
11737 #define PTHREAD_CREATE_DETACHED 1
11738 #endif
11739         pthread_t t;
11740         int status;
11741         int detach = PTHREAD_CREATE_DETACHED;
11742
11743 #if HAVE_PTHREADS > 4
11744         /* Final pthreads */
11745         pthread_attr_t attr;
11746
11747         status = pthread_attr_init(&attr);
11748         if( status ) return status;
11749
11750 #if HAVE_PTHREADS < 7
11751         status = pthread_attr_setdetachstate(&attr, &detach);
11752         if( status < 0 ) status = errno;
11753 #else
11754         status = pthread_attr_setdetachstate(&attr, detach);
11755 #endif
11756         if( status ) return status;
11757         status = pthread_create( &t, &attr, task, NULL );
11758 #if HAVE_PTHREADS < 7
11759         if( status < 0 ) status = errno;
11760 #endif
11761         if( status ) return status;
11762 #else
11763         /* Draft 4 pthreads */
11764         status = pthread_create( &t, pthread_attr_default, task, NULL );
11765         if( status ) return errno;
11766
11767         /* give thread a chance to complete */
11768         /* it should remain joinable and hence detachable */
11769         sleep( 1 );
11770
11771         status = pthread_detach( &t );
11772         if( status ) return errno;
11773 #endif
11774
11775 #ifdef HAVE_LINUX_THREADS
11776         pthread_kill_other_threads_np();
11777 #endif
11778
11779         return 0;
11780
11781   ;
11782   return 0;
11783 }
11784 _ACEOF
11785 if ac_fn_c_try_link "$LINENO"; then :
11786   ol_cv_pthread_mthreads=yes
11787 else
11788   ol_cv_pthread_mthreads=no
11789 fi
11790 rm -f core conftest.err conftest.$ac_objext \
11791     conftest$ac_exeext conftest.$ac_ext
11792 else
11793   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11794 /* end confdefs.h.  */
11795
11796
11797 /* pthread test headers */
11798 #include <pthread.h>
11799 #if HAVE_PTHREADS < 7
11800 #include <errno.h>
11801 #endif
11802 #ifndef NULL
11803 #define NULL (void*)0
11804 #endif
11805
11806 static void *task(p)
11807         void *p;
11808 {
11809         return (void *) (p == NULL);
11810 }
11811
11812
11813 int main(argc, argv)
11814         int argc;
11815         char **argv;
11816 {
11817
11818         /* pthread test function */
11819 #ifndef PTHREAD_CREATE_DETACHED
11820 #define PTHREAD_CREATE_DETACHED 1
11821 #endif
11822         pthread_t t;
11823         int status;
11824         int detach = PTHREAD_CREATE_DETACHED;
11825
11826 #if HAVE_PTHREADS > 4
11827         /* Final pthreads */
11828         pthread_attr_t attr;
11829
11830         status = pthread_attr_init(&attr);
11831         if( status ) return status;
11832
11833 #if HAVE_PTHREADS < 7
11834         status = pthread_attr_setdetachstate(&attr, &detach);
11835         if( status < 0 ) status = errno;
11836 #else
11837         status = pthread_attr_setdetachstate(&attr, detach);
11838 #endif
11839         if( status ) return status;
11840         status = pthread_create( &t, &attr, task, NULL );
11841 #if HAVE_PTHREADS < 7
11842         if( status < 0 ) status = errno;
11843 #endif
11844         if( status ) return status;
11845 #else
11846         /* Draft 4 pthreads */
11847         status = pthread_create( &t, pthread_attr_default, task, NULL );
11848         if( status ) return errno;
11849
11850         /* give thread a chance to complete */
11851         /* it should remain joinable and hence detachable */
11852         sleep( 1 );
11853
11854         status = pthread_detach( &t );
11855         if( status ) return errno;
11856 #endif
11857
11858 #ifdef HAVE_LINUX_THREADS
11859         pthread_kill_other_threads_np();
11860 #endif
11861
11862         return 0;
11863
11864 }
11865
11866 _ACEOF
11867 if ac_fn_c_try_run "$LINENO"; then :
11868   ol_cv_pthread_mthreads=yes
11869 else
11870   ol_cv_pthread_mthreads=no
11871 fi
11872 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11873   conftest.$ac_objext conftest.beam conftest.$ac_ext
11874 fi
11875
11876
11877                 # restore the LIBS
11878                 LIBS="$ol_LIBS"
11879
11880 fi
11881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
11882 $as_echo "$ol_cv_pthread_mthreads" >&6; }
11883
11884         if test $ol_cv_pthread_mthreads = yes ; then
11885                 ol_link_pthreads="-mthreads"
11886                 ol_link_threads=posix
11887         fi
11888 fi
11889
11890                 # Pthread try link: -thread (ol_cv_pthread_thread)
11891 if test "$ol_link_threads" = no ; then
11892         # try -thread
11893         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
11894 $as_echo_n "checking for pthread link with -thread... " >&6; }
11895 if ${ol_cv_pthread_thread+:} false; then :
11896   $as_echo_n "(cached) " >&6
11897 else
11898
11899                 # save the flags
11900                 ol_LIBS="$LIBS"
11901                 LIBS="-thread $LIBS"
11902
11903                 if test "$cross_compiling" = yes; then :
11904   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11905 /* end confdefs.h.  */
11906
11907 /* pthread test headers */
11908 #include <pthread.h>
11909 #if HAVE_PTHREADS < 7
11910 #include <errno.h>
11911 #endif
11912 #ifndef NULL
11913 #define NULL (void*)0
11914 #endif
11915
11916 static void *task(p)
11917         void *p;
11918 {
11919         return (void *) (p == NULL);
11920 }
11921
11922 int
11923 main ()
11924 {
11925
11926         /* pthread test function */
11927 #ifndef PTHREAD_CREATE_DETACHED
11928 #define PTHREAD_CREATE_DETACHED 1
11929 #endif
11930         pthread_t t;
11931         int status;
11932         int detach = PTHREAD_CREATE_DETACHED;
11933
11934 #if HAVE_PTHREADS > 4
11935         /* Final pthreads */
11936         pthread_attr_t attr;
11937
11938         status = pthread_attr_init(&attr);
11939         if( status ) return status;
11940
11941 #if HAVE_PTHREADS < 7
11942         status = pthread_attr_setdetachstate(&attr, &detach);
11943         if( status < 0 ) status = errno;
11944 #else
11945         status = pthread_attr_setdetachstate(&attr, detach);
11946 #endif
11947         if( status ) return status;
11948         status = pthread_create( &t, &attr, task, NULL );
11949 #if HAVE_PTHREADS < 7
11950         if( status < 0 ) status = errno;
11951 #endif
11952         if( status ) return status;
11953 #else
11954         /* Draft 4 pthreads */
11955         status = pthread_create( &t, pthread_attr_default, task, NULL );
11956         if( status ) return errno;
11957
11958         /* give thread a chance to complete */
11959         /* it should remain joinable and hence detachable */
11960         sleep( 1 );
11961
11962         status = pthread_detach( &t );
11963         if( status ) return errno;
11964 #endif
11965
11966 #ifdef HAVE_LINUX_THREADS
11967         pthread_kill_other_threads_np();
11968 #endif
11969
11970         return 0;
11971
11972   ;
11973   return 0;
11974 }
11975 _ACEOF
11976 if ac_fn_c_try_link "$LINENO"; then :
11977   ol_cv_pthread_thread=yes
11978 else
11979   ol_cv_pthread_thread=no
11980 fi
11981 rm -f core conftest.err conftest.$ac_objext \
11982     conftest$ac_exeext conftest.$ac_ext
11983 else
11984   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11985 /* end confdefs.h.  */
11986
11987
11988 /* pthread test headers */
11989 #include <pthread.h>
11990 #if HAVE_PTHREADS < 7
11991 #include <errno.h>
11992 #endif
11993 #ifndef NULL
11994 #define NULL (void*)0
11995 #endif
11996
11997 static void *task(p)
11998         void *p;
11999 {
12000         return (void *) (p == NULL);
12001 }
12002
12003
12004 int main(argc, argv)
12005         int argc;
12006         char **argv;
12007 {
12008
12009         /* pthread test function */
12010 #ifndef PTHREAD_CREATE_DETACHED
12011 #define PTHREAD_CREATE_DETACHED 1
12012 #endif
12013         pthread_t t;
12014         int status;
12015         int detach = PTHREAD_CREATE_DETACHED;
12016
12017 #if HAVE_PTHREADS > 4
12018         /* Final pthreads */
12019         pthread_attr_t attr;
12020
12021         status = pthread_attr_init(&attr);
12022         if( status ) return status;
12023
12024 #if HAVE_PTHREADS < 7
12025         status = pthread_attr_setdetachstate(&attr, &detach);
12026         if( status < 0 ) status = errno;
12027 #else
12028         status = pthread_attr_setdetachstate(&attr, detach);
12029 #endif
12030         if( status ) return status;
12031         status = pthread_create( &t, &attr, task, NULL );
12032 #if HAVE_PTHREADS < 7
12033         if( status < 0 ) status = errno;
12034 #endif
12035         if( status ) return status;
12036 #else
12037         /* Draft 4 pthreads */
12038         status = pthread_create( &t, pthread_attr_default, task, NULL );
12039         if( status ) return errno;
12040
12041         /* give thread a chance to complete */
12042         /* it should remain joinable and hence detachable */
12043         sleep( 1 );
12044
12045         status = pthread_detach( &t );
12046         if( status ) return errno;
12047 #endif
12048
12049 #ifdef HAVE_LINUX_THREADS
12050         pthread_kill_other_threads_np();
12051 #endif
12052
12053         return 0;
12054
12055 }
12056
12057 _ACEOF
12058 if ac_fn_c_try_run "$LINENO"; then :
12059   ol_cv_pthread_thread=yes
12060 else
12061   ol_cv_pthread_thread=no
12062 fi
12063 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12064   conftest.$ac_objext conftest.beam conftest.$ac_ext
12065 fi
12066
12067
12068                 # restore the LIBS
12069                 LIBS="$ol_LIBS"
12070
12071 fi
12072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
12073 $as_echo "$ol_cv_pthread_thread" >&6; }
12074
12075         if test $ol_cv_pthread_thread = yes ; then
12076                 ol_link_pthreads="-thread"
12077                 ol_link_threads=posix
12078         fi
12079 fi
12080
12081
12082                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12083 if test "$ol_link_threads" = no ; then
12084         # try -lpthread -lmach -lexc -lc_r
12085         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12086 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
12087 if ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+:} false; then :
12088   $as_echo_n "(cached) " >&6
12089 else
12090
12091                 # save the flags
12092                 ol_LIBS="$LIBS"
12093                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12094
12095                 if test "$cross_compiling" = yes; then :
12096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12097 /* end confdefs.h.  */
12098
12099 /* pthread test headers */
12100 #include <pthread.h>
12101 #if HAVE_PTHREADS < 7
12102 #include <errno.h>
12103 #endif
12104 #ifndef NULL
12105 #define NULL (void*)0
12106 #endif
12107
12108 static void *task(p)
12109         void *p;
12110 {
12111         return (void *) (p == NULL);
12112 }
12113
12114 int
12115 main ()
12116 {
12117
12118         /* pthread test function */
12119 #ifndef PTHREAD_CREATE_DETACHED
12120 #define PTHREAD_CREATE_DETACHED 1
12121 #endif
12122         pthread_t t;
12123         int status;
12124         int detach = PTHREAD_CREATE_DETACHED;
12125
12126 #if HAVE_PTHREADS > 4
12127         /* Final pthreads */
12128         pthread_attr_t attr;
12129
12130         status = pthread_attr_init(&attr);
12131         if( status ) return status;
12132
12133 #if HAVE_PTHREADS < 7
12134         status = pthread_attr_setdetachstate(&attr, &detach);
12135         if( status < 0 ) status = errno;
12136 #else
12137         status = pthread_attr_setdetachstate(&attr, detach);
12138 #endif
12139         if( status ) return status;
12140         status = pthread_create( &t, &attr, task, NULL );
12141 #if HAVE_PTHREADS < 7
12142         if( status < 0 ) status = errno;
12143 #endif
12144         if( status ) return status;
12145 #else
12146         /* Draft 4 pthreads */
12147         status = pthread_create( &t, pthread_attr_default, task, NULL );
12148         if( status ) return errno;
12149
12150         /* give thread a chance to complete */
12151         /* it should remain joinable and hence detachable */
12152         sleep( 1 );
12153
12154         status = pthread_detach( &t );
12155         if( status ) return errno;
12156 #endif
12157
12158 #ifdef HAVE_LINUX_THREADS
12159         pthread_kill_other_threads_np();
12160 #endif
12161
12162         return 0;
12163
12164   ;
12165   return 0;
12166 }
12167 _ACEOF
12168 if ac_fn_c_try_link "$LINENO"; then :
12169   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12170 else
12171   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12172 fi
12173 rm -f core conftest.err conftest.$ac_objext \
12174     conftest$ac_exeext conftest.$ac_ext
12175 else
12176   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12177 /* end confdefs.h.  */
12178
12179
12180 /* pthread test headers */
12181 #include <pthread.h>
12182 #if HAVE_PTHREADS < 7
12183 #include <errno.h>
12184 #endif
12185 #ifndef NULL
12186 #define NULL (void*)0
12187 #endif
12188
12189 static void *task(p)
12190         void *p;
12191 {
12192         return (void *) (p == NULL);
12193 }
12194
12195
12196 int main(argc, argv)
12197         int argc;
12198         char **argv;
12199 {
12200
12201         /* pthread test function */
12202 #ifndef PTHREAD_CREATE_DETACHED
12203 #define PTHREAD_CREATE_DETACHED 1
12204 #endif
12205         pthread_t t;
12206         int status;
12207         int detach = PTHREAD_CREATE_DETACHED;
12208
12209 #if HAVE_PTHREADS > 4
12210         /* Final pthreads */
12211         pthread_attr_t attr;
12212
12213         status = pthread_attr_init(&attr);
12214         if( status ) return status;
12215
12216 #if HAVE_PTHREADS < 7
12217         status = pthread_attr_setdetachstate(&attr, &detach);
12218         if( status < 0 ) status = errno;
12219 #else
12220         status = pthread_attr_setdetachstate(&attr, detach);
12221 #endif
12222         if( status ) return status;
12223         status = pthread_create( &t, &attr, task, NULL );
12224 #if HAVE_PTHREADS < 7
12225         if( status < 0 ) status = errno;
12226 #endif
12227         if( status ) return status;
12228 #else
12229         /* Draft 4 pthreads */
12230         status = pthread_create( &t, pthread_attr_default, task, NULL );
12231         if( status ) return errno;
12232
12233         /* give thread a chance to complete */
12234         /* it should remain joinable and hence detachable */
12235         sleep( 1 );
12236
12237         status = pthread_detach( &t );
12238         if( status ) return errno;
12239 #endif
12240
12241 #ifdef HAVE_LINUX_THREADS
12242         pthread_kill_other_threads_np();
12243 #endif
12244
12245         return 0;
12246
12247 }
12248
12249 _ACEOF
12250 if ac_fn_c_try_run "$LINENO"; then :
12251   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12252 else
12253   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12254 fi
12255 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12256   conftest.$ac_objext conftest.beam conftest.$ac_ext
12257 fi
12258
12259
12260                 # restore the LIBS
12261                 LIBS="$ol_LIBS"
12262
12263 fi
12264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
12265 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
12266
12267         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12268                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12269                 ol_link_threads=posix
12270         fi
12271 fi
12272
12273                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12274 if test "$ol_link_threads" = no ; then
12275         # try -lpthread -lmach -lexc
12276         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
12277 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
12278 if ${ol_cv_pthread_lpthread_lmach_lexc+:} false; then :
12279   $as_echo_n "(cached) " >&6
12280 else
12281
12282                 # save the flags
12283                 ol_LIBS="$LIBS"
12284                 LIBS="-lpthread -lmach -lexc $LIBS"
12285
12286                 if test "$cross_compiling" = yes; then :
12287   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12288 /* end confdefs.h.  */
12289
12290 /* pthread test headers */
12291 #include <pthread.h>
12292 #if HAVE_PTHREADS < 7
12293 #include <errno.h>
12294 #endif
12295 #ifndef NULL
12296 #define NULL (void*)0
12297 #endif
12298
12299 static void *task(p)
12300         void *p;
12301 {
12302         return (void *) (p == NULL);
12303 }
12304
12305 int
12306 main ()
12307 {
12308
12309         /* pthread test function */
12310 #ifndef PTHREAD_CREATE_DETACHED
12311 #define PTHREAD_CREATE_DETACHED 1
12312 #endif
12313         pthread_t t;
12314         int status;
12315         int detach = PTHREAD_CREATE_DETACHED;
12316
12317 #if HAVE_PTHREADS > 4
12318         /* Final pthreads */
12319         pthread_attr_t attr;
12320
12321         status = pthread_attr_init(&attr);
12322         if( status ) return status;
12323
12324 #if HAVE_PTHREADS < 7
12325         status = pthread_attr_setdetachstate(&attr, &detach);
12326         if( status < 0 ) status = errno;
12327 #else
12328         status = pthread_attr_setdetachstate(&attr, detach);
12329 #endif
12330         if( status ) return status;
12331         status = pthread_create( &t, &attr, task, NULL );
12332 #if HAVE_PTHREADS < 7
12333         if( status < 0 ) status = errno;
12334 #endif
12335         if( status ) return status;
12336 #else
12337         /* Draft 4 pthreads */
12338         status = pthread_create( &t, pthread_attr_default, task, NULL );
12339         if( status ) return errno;
12340
12341         /* give thread a chance to complete */
12342         /* it should remain joinable and hence detachable */
12343         sleep( 1 );
12344
12345         status = pthread_detach( &t );
12346         if( status ) return errno;
12347 #endif
12348
12349 #ifdef HAVE_LINUX_THREADS
12350         pthread_kill_other_threads_np();
12351 #endif
12352
12353         return 0;
12354
12355   ;
12356   return 0;
12357 }
12358 _ACEOF
12359 if ac_fn_c_try_link "$LINENO"; then :
12360   ol_cv_pthread_lpthread_lmach_lexc=yes
12361 else
12362   ol_cv_pthread_lpthread_lmach_lexc=no
12363 fi
12364 rm -f core conftest.err conftest.$ac_objext \
12365     conftest$ac_exeext conftest.$ac_ext
12366 else
12367   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12368 /* end confdefs.h.  */
12369
12370
12371 /* pthread test headers */
12372 #include <pthread.h>
12373 #if HAVE_PTHREADS < 7
12374 #include <errno.h>
12375 #endif
12376 #ifndef NULL
12377 #define NULL (void*)0
12378 #endif
12379
12380 static void *task(p)
12381         void *p;
12382 {
12383         return (void *) (p == NULL);
12384 }
12385
12386
12387 int main(argc, argv)
12388         int argc;
12389         char **argv;
12390 {
12391
12392         /* pthread test function */
12393 #ifndef PTHREAD_CREATE_DETACHED
12394 #define PTHREAD_CREATE_DETACHED 1
12395 #endif
12396         pthread_t t;
12397         int status;
12398         int detach = PTHREAD_CREATE_DETACHED;
12399
12400 #if HAVE_PTHREADS > 4
12401         /* Final pthreads */
12402         pthread_attr_t attr;
12403
12404         status = pthread_attr_init(&attr);
12405         if( status ) return status;
12406
12407 #if HAVE_PTHREADS < 7
12408         status = pthread_attr_setdetachstate(&attr, &detach);
12409         if( status < 0 ) status = errno;
12410 #else
12411         status = pthread_attr_setdetachstate(&attr, detach);
12412 #endif
12413         if( status ) return status;
12414         status = pthread_create( &t, &attr, task, NULL );
12415 #if HAVE_PTHREADS < 7
12416         if( status < 0 ) status = errno;
12417 #endif
12418         if( status ) return status;
12419 #else
12420         /* Draft 4 pthreads */
12421         status = pthread_create( &t, pthread_attr_default, task, NULL );
12422         if( status ) return errno;
12423
12424         /* give thread a chance to complete */
12425         /* it should remain joinable and hence detachable */
12426         sleep( 1 );
12427
12428         status = pthread_detach( &t );
12429         if( status ) return errno;
12430 #endif
12431
12432 #ifdef HAVE_LINUX_THREADS
12433         pthread_kill_other_threads_np();
12434 #endif
12435
12436         return 0;
12437
12438 }
12439
12440 _ACEOF
12441 if ac_fn_c_try_run "$LINENO"; then :
12442   ol_cv_pthread_lpthread_lmach_lexc=yes
12443 else
12444   ol_cv_pthread_lpthread_lmach_lexc=no
12445 fi
12446 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12447   conftest.$ac_objext conftest.beam conftest.$ac_ext
12448 fi
12449
12450
12451                 # restore the LIBS
12452                 LIBS="$ol_LIBS"
12453
12454 fi
12455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
12456 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
12457
12458         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
12459                 ol_link_pthreads="-lpthread -lmach -lexc"
12460                 ol_link_threads=posix
12461         fi
12462 fi
12463
12464
12465                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
12466 if test "$ol_link_threads" = no ; then
12467         # try -lpthread -Wl,-woff,85
12468         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
12469 $as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
12470 if ${ol_cv_pthread_lib_lpthread_woff+:} false; then :
12471   $as_echo_n "(cached) " >&6
12472 else
12473
12474                 # save the flags
12475                 ol_LIBS="$LIBS"
12476                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
12477
12478                 if test "$cross_compiling" = yes; then :
12479   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12480 /* end confdefs.h.  */
12481
12482 /* pthread test headers */
12483 #include <pthread.h>
12484 #if HAVE_PTHREADS < 7
12485 #include <errno.h>
12486 #endif
12487 #ifndef NULL
12488 #define NULL (void*)0
12489 #endif
12490
12491 static void *task(p)
12492         void *p;
12493 {
12494         return (void *) (p == NULL);
12495 }
12496
12497 int
12498 main ()
12499 {
12500
12501         /* pthread test function */
12502 #ifndef PTHREAD_CREATE_DETACHED
12503 #define PTHREAD_CREATE_DETACHED 1
12504 #endif
12505         pthread_t t;
12506         int status;
12507         int detach = PTHREAD_CREATE_DETACHED;
12508
12509 #if HAVE_PTHREADS > 4
12510         /* Final pthreads */
12511         pthread_attr_t attr;
12512
12513         status = pthread_attr_init(&attr);
12514         if( status ) return status;
12515
12516 #if HAVE_PTHREADS < 7
12517         status = pthread_attr_setdetachstate(&attr, &detach);
12518         if( status < 0 ) status = errno;
12519 #else
12520         status = pthread_attr_setdetachstate(&attr, detach);
12521 #endif
12522         if( status ) return status;
12523         status = pthread_create( &t, &attr, task, NULL );
12524 #if HAVE_PTHREADS < 7
12525         if( status < 0 ) status = errno;
12526 #endif
12527         if( status ) return status;
12528 #else
12529         /* Draft 4 pthreads */
12530         status = pthread_create( &t, pthread_attr_default, task, NULL );
12531         if( status ) return errno;
12532
12533         /* give thread a chance to complete */
12534         /* it should remain joinable and hence detachable */
12535         sleep( 1 );
12536
12537         status = pthread_detach( &t );
12538         if( status ) return errno;
12539 #endif
12540
12541 #ifdef HAVE_LINUX_THREADS
12542         pthread_kill_other_threads_np();
12543 #endif
12544
12545         return 0;
12546
12547   ;
12548   return 0;
12549 }
12550 _ACEOF
12551 if ac_fn_c_try_link "$LINENO"; then :
12552   ol_cv_pthread_lib_lpthread_woff=yes
12553 else
12554   ol_cv_pthread_lib_lpthread_woff=no
12555 fi
12556 rm -f core conftest.err conftest.$ac_objext \
12557     conftest$ac_exeext conftest.$ac_ext
12558 else
12559   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12560 /* end confdefs.h.  */
12561
12562
12563 /* pthread test headers */
12564 #include <pthread.h>
12565 #if HAVE_PTHREADS < 7
12566 #include <errno.h>
12567 #endif
12568 #ifndef NULL
12569 #define NULL (void*)0
12570 #endif
12571
12572 static void *task(p)
12573         void *p;
12574 {
12575         return (void *) (p == NULL);
12576 }
12577
12578
12579 int main(argc, argv)
12580         int argc;
12581         char **argv;
12582 {
12583
12584         /* pthread test function */
12585 #ifndef PTHREAD_CREATE_DETACHED
12586 #define PTHREAD_CREATE_DETACHED 1
12587 #endif
12588         pthread_t t;
12589         int status;
12590         int detach = PTHREAD_CREATE_DETACHED;
12591
12592 #if HAVE_PTHREADS > 4
12593         /* Final pthreads */
12594         pthread_attr_t attr;
12595
12596         status = pthread_attr_init(&attr);
12597         if( status ) return status;
12598
12599 #if HAVE_PTHREADS < 7
12600         status = pthread_attr_setdetachstate(&attr, &detach);
12601         if( status < 0 ) status = errno;
12602 #else
12603         status = pthread_attr_setdetachstate(&attr, detach);
12604 #endif
12605         if( status ) return status;
12606         status = pthread_create( &t, &attr, task, NULL );
12607 #if HAVE_PTHREADS < 7
12608         if( status < 0 ) status = errno;
12609 #endif
12610         if( status ) return status;
12611 #else
12612         /* Draft 4 pthreads */
12613         status = pthread_create( &t, pthread_attr_default, task, NULL );
12614         if( status ) return errno;
12615
12616         /* give thread a chance to complete */
12617         /* it should remain joinable and hence detachable */
12618         sleep( 1 );
12619
12620         status = pthread_detach( &t );
12621         if( status ) return errno;
12622 #endif
12623
12624 #ifdef HAVE_LINUX_THREADS
12625         pthread_kill_other_threads_np();
12626 #endif
12627
12628         return 0;
12629
12630 }
12631
12632 _ACEOF
12633 if ac_fn_c_try_run "$LINENO"; then :
12634   ol_cv_pthread_lib_lpthread_woff=yes
12635 else
12636   ol_cv_pthread_lib_lpthread_woff=no
12637 fi
12638 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12639   conftest.$ac_objext conftest.beam conftest.$ac_ext
12640 fi
12641
12642
12643                 # restore the LIBS
12644                 LIBS="$ol_LIBS"
12645
12646 fi
12647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
12648 $as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
12649
12650         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
12651                 ol_link_pthreads="-lpthread -Wl,-woff,85"
12652                 ol_link_threads=posix
12653         fi
12654 fi
12655
12656
12657                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
12658 if test "$ol_link_threads" = no ; then
12659         # try -lpthread
12660         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
12661 $as_echo_n "checking for pthread link with -lpthread... " >&6; }
12662 if ${ol_cv_pthread_lpthread+:} false; then :
12663   $as_echo_n "(cached) " >&6
12664 else
12665
12666                 # save the flags
12667                 ol_LIBS="$LIBS"
12668                 LIBS="-lpthread $LIBS"
12669
12670                 if test "$cross_compiling" = yes; then :
12671   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12672 /* end confdefs.h.  */
12673
12674 /* pthread test headers */
12675 #include <pthread.h>
12676 #if HAVE_PTHREADS < 7
12677 #include <errno.h>
12678 #endif
12679 #ifndef NULL
12680 #define NULL (void*)0
12681 #endif
12682
12683 static void *task(p)
12684         void *p;
12685 {
12686         return (void *) (p == NULL);
12687 }
12688
12689 int
12690 main ()
12691 {
12692
12693         /* pthread test function */
12694 #ifndef PTHREAD_CREATE_DETACHED
12695 #define PTHREAD_CREATE_DETACHED 1
12696 #endif
12697         pthread_t t;
12698         int status;
12699         int detach = PTHREAD_CREATE_DETACHED;
12700
12701 #if HAVE_PTHREADS > 4
12702         /* Final pthreads */
12703         pthread_attr_t attr;
12704
12705         status = pthread_attr_init(&attr);
12706         if( status ) return status;
12707
12708 #if HAVE_PTHREADS < 7
12709         status = pthread_attr_setdetachstate(&attr, &detach);
12710         if( status < 0 ) status = errno;
12711 #else
12712         status = pthread_attr_setdetachstate(&attr, detach);
12713 #endif
12714         if( status ) return status;
12715         status = pthread_create( &t, &attr, task, NULL );
12716 #if HAVE_PTHREADS < 7
12717         if( status < 0 ) status = errno;
12718 #endif
12719         if( status ) return status;
12720 #else
12721         /* Draft 4 pthreads */
12722         status = pthread_create( &t, pthread_attr_default, task, NULL );
12723         if( status ) return errno;
12724
12725         /* give thread a chance to complete */
12726         /* it should remain joinable and hence detachable */
12727         sleep( 1 );
12728
12729         status = pthread_detach( &t );
12730         if( status ) return errno;
12731 #endif
12732
12733 #ifdef HAVE_LINUX_THREADS
12734         pthread_kill_other_threads_np();
12735 #endif
12736
12737         return 0;
12738
12739   ;
12740   return 0;
12741 }
12742 _ACEOF
12743 if ac_fn_c_try_link "$LINENO"; then :
12744   ol_cv_pthread_lpthread=yes
12745 else
12746   ol_cv_pthread_lpthread=no
12747 fi
12748 rm -f core conftest.err conftest.$ac_objext \
12749     conftest$ac_exeext conftest.$ac_ext
12750 else
12751   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12752 /* end confdefs.h.  */
12753
12754
12755 /* pthread test headers */
12756 #include <pthread.h>
12757 #if HAVE_PTHREADS < 7
12758 #include <errno.h>
12759 #endif
12760 #ifndef NULL
12761 #define NULL (void*)0
12762 #endif
12763
12764 static void *task(p)
12765         void *p;
12766 {
12767         return (void *) (p == NULL);
12768 }
12769
12770
12771 int main(argc, argv)
12772         int argc;
12773         char **argv;
12774 {
12775
12776         /* pthread test function */
12777 #ifndef PTHREAD_CREATE_DETACHED
12778 #define PTHREAD_CREATE_DETACHED 1
12779 #endif
12780         pthread_t t;
12781         int status;
12782         int detach = PTHREAD_CREATE_DETACHED;
12783
12784 #if HAVE_PTHREADS > 4
12785         /* Final pthreads */
12786         pthread_attr_t attr;
12787
12788         status = pthread_attr_init(&attr);
12789         if( status ) return status;
12790
12791 #if HAVE_PTHREADS < 7
12792         status = pthread_attr_setdetachstate(&attr, &detach);
12793         if( status < 0 ) status = errno;
12794 #else
12795         status = pthread_attr_setdetachstate(&attr, detach);
12796 #endif
12797         if( status ) return status;
12798         status = pthread_create( &t, &attr, task, NULL );
12799 #if HAVE_PTHREADS < 7
12800         if( status < 0 ) status = errno;
12801 #endif
12802         if( status ) return status;
12803 #else
12804         /* Draft 4 pthreads */
12805         status = pthread_create( &t, pthread_attr_default, task, NULL );
12806         if( status ) return errno;
12807
12808         /* give thread a chance to complete */
12809         /* it should remain joinable and hence detachable */
12810         sleep( 1 );
12811
12812         status = pthread_detach( &t );
12813         if( status ) return errno;
12814 #endif
12815
12816 #ifdef HAVE_LINUX_THREADS
12817         pthread_kill_other_threads_np();
12818 #endif
12819
12820         return 0;
12821
12822 }
12823
12824 _ACEOF
12825 if ac_fn_c_try_run "$LINENO"; then :
12826   ol_cv_pthread_lpthread=yes
12827 else
12828   ol_cv_pthread_lpthread=no
12829 fi
12830 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12831   conftest.$ac_objext conftest.beam conftest.$ac_ext
12832 fi
12833
12834
12835                 # restore the LIBS
12836                 LIBS="$ol_LIBS"
12837
12838 fi
12839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
12840 $as_echo "$ol_cv_pthread_lpthread" >&6; }
12841
12842         if test $ol_cv_pthread_lpthread = yes ; then
12843                 ol_link_pthreads="-lpthread"
12844                 ol_link_threads=posix
12845         fi
12846 fi
12847
12848                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
12849 if test "$ol_link_threads" = no ; then
12850         # try -lc_r
12851         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
12852 $as_echo_n "checking for pthread link with -lc_r... " >&6; }
12853 if ${ol_cv_pthread_lc_r+:} false; then :
12854   $as_echo_n "(cached) " >&6
12855 else
12856
12857                 # save the flags
12858                 ol_LIBS="$LIBS"
12859                 LIBS="-lc_r $LIBS"
12860
12861                 if test "$cross_compiling" = yes; then :
12862   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12863 /* end confdefs.h.  */
12864
12865 /* pthread test headers */
12866 #include <pthread.h>
12867 #if HAVE_PTHREADS < 7
12868 #include <errno.h>
12869 #endif
12870 #ifndef NULL
12871 #define NULL (void*)0
12872 #endif
12873
12874 static void *task(p)
12875         void *p;
12876 {
12877         return (void *) (p == NULL);
12878 }
12879
12880 int
12881 main ()
12882 {
12883
12884         /* pthread test function */
12885 #ifndef PTHREAD_CREATE_DETACHED
12886 #define PTHREAD_CREATE_DETACHED 1
12887 #endif
12888         pthread_t t;
12889         int status;
12890         int detach = PTHREAD_CREATE_DETACHED;
12891
12892 #if HAVE_PTHREADS > 4
12893         /* Final pthreads */
12894         pthread_attr_t attr;
12895
12896         status = pthread_attr_init(&attr);
12897         if( status ) return status;
12898
12899 #if HAVE_PTHREADS < 7
12900         status = pthread_attr_setdetachstate(&attr, &detach);
12901         if( status < 0 ) status = errno;
12902 #else
12903         status = pthread_attr_setdetachstate(&attr, detach);
12904 #endif
12905         if( status ) return status;
12906         status = pthread_create( &t, &attr, task, NULL );
12907 #if HAVE_PTHREADS < 7
12908         if( status < 0 ) status = errno;
12909 #endif
12910         if( status ) return status;
12911 #else
12912         /* Draft 4 pthreads */
12913         status = pthread_create( &t, pthread_attr_default, task, NULL );
12914         if( status ) return errno;
12915
12916         /* give thread a chance to complete */
12917         /* it should remain joinable and hence detachable */
12918         sleep( 1 );
12919
12920         status = pthread_detach( &t );
12921         if( status ) return errno;
12922 #endif
12923
12924 #ifdef HAVE_LINUX_THREADS
12925         pthread_kill_other_threads_np();
12926 #endif
12927
12928         return 0;
12929
12930   ;
12931   return 0;
12932 }
12933 _ACEOF
12934 if ac_fn_c_try_link "$LINENO"; then :
12935   ol_cv_pthread_lc_r=yes
12936 else
12937   ol_cv_pthread_lc_r=no
12938 fi
12939 rm -f core conftest.err conftest.$ac_objext \
12940     conftest$ac_exeext conftest.$ac_ext
12941 else
12942   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12943 /* end confdefs.h.  */
12944
12945
12946 /* pthread test headers */
12947 #include <pthread.h>
12948 #if HAVE_PTHREADS < 7
12949 #include <errno.h>
12950 #endif
12951 #ifndef NULL
12952 #define NULL (void*)0
12953 #endif
12954
12955 static void *task(p)
12956         void *p;
12957 {
12958         return (void *) (p == NULL);
12959 }
12960
12961
12962 int main(argc, argv)
12963         int argc;
12964         char **argv;
12965 {
12966
12967         /* pthread test function */
12968 #ifndef PTHREAD_CREATE_DETACHED
12969 #define PTHREAD_CREATE_DETACHED 1
12970 #endif
12971         pthread_t t;
12972         int status;
12973         int detach = PTHREAD_CREATE_DETACHED;
12974
12975 #if HAVE_PTHREADS > 4
12976         /* Final pthreads */
12977         pthread_attr_t attr;
12978
12979         status = pthread_attr_init(&attr);
12980         if( status ) return status;
12981
12982 #if HAVE_PTHREADS < 7
12983         status = pthread_attr_setdetachstate(&attr, &detach);
12984         if( status < 0 ) status = errno;
12985 #else
12986         status = pthread_attr_setdetachstate(&attr, detach);
12987 #endif
12988         if( status ) return status;
12989         status = pthread_create( &t, &attr, task, NULL );
12990 #if HAVE_PTHREADS < 7
12991         if( status < 0 ) status = errno;
12992 #endif
12993         if( status ) return status;
12994 #else
12995         /* Draft 4 pthreads */
12996         status = pthread_create( &t, pthread_attr_default, task, NULL );
12997         if( status ) return errno;
12998
12999         /* give thread a chance to complete */
13000         /* it should remain joinable and hence detachable */
13001         sleep( 1 );
13002
13003         status = pthread_detach( &t );
13004         if( status ) return errno;
13005 #endif
13006
13007 #ifdef HAVE_LINUX_THREADS
13008         pthread_kill_other_threads_np();
13009 #endif
13010
13011         return 0;
13012
13013 }
13014
13015 _ACEOF
13016 if ac_fn_c_try_run "$LINENO"; then :
13017   ol_cv_pthread_lc_r=yes
13018 else
13019   ol_cv_pthread_lc_r=no
13020 fi
13021 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13022   conftest.$ac_objext conftest.beam conftest.$ac_ext
13023 fi
13024
13025
13026                 # restore the LIBS
13027                 LIBS="$ol_LIBS"
13028
13029 fi
13030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
13031 $as_echo "$ol_cv_pthread_lc_r" >&6; }
13032
13033         if test $ol_cv_pthread_lc_r = yes ; then
13034                 ol_link_pthreads="-lc_r"
13035                 ol_link_threads=posix
13036         fi
13037 fi
13038
13039
13040                 # Pthread try link: -threads (ol_cv_pthread_threads)
13041 if test "$ol_link_threads" = no ; then
13042         # try -threads
13043         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
13044 $as_echo_n "checking for pthread link with -threads... " >&6; }
13045 if ${ol_cv_pthread_threads+:} false; then :
13046   $as_echo_n "(cached) " >&6
13047 else
13048
13049                 # save the flags
13050                 ol_LIBS="$LIBS"
13051                 LIBS="-threads $LIBS"
13052
13053                 if test "$cross_compiling" = yes; then :
13054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13055 /* end confdefs.h.  */
13056
13057 /* pthread test headers */
13058 #include <pthread.h>
13059 #if HAVE_PTHREADS < 7
13060 #include <errno.h>
13061 #endif
13062 #ifndef NULL
13063 #define NULL (void*)0
13064 #endif
13065
13066 static void *task(p)
13067         void *p;
13068 {
13069         return (void *) (p == NULL);
13070 }
13071
13072 int
13073 main ()
13074 {
13075
13076         /* pthread test function */
13077 #ifndef PTHREAD_CREATE_DETACHED
13078 #define PTHREAD_CREATE_DETACHED 1
13079 #endif
13080         pthread_t t;
13081         int status;
13082         int detach = PTHREAD_CREATE_DETACHED;
13083
13084 #if HAVE_PTHREADS > 4
13085         /* Final pthreads */
13086         pthread_attr_t attr;
13087
13088         status = pthread_attr_init(&attr);
13089         if( status ) return status;
13090
13091 #if HAVE_PTHREADS < 7
13092         status = pthread_attr_setdetachstate(&attr, &detach);
13093         if( status < 0 ) status = errno;
13094 #else
13095         status = pthread_attr_setdetachstate(&attr, detach);
13096 #endif
13097         if( status ) return status;
13098         status = pthread_create( &t, &attr, task, NULL );
13099 #if HAVE_PTHREADS < 7
13100         if( status < 0 ) status = errno;
13101 #endif
13102         if( status ) return status;
13103 #else
13104         /* Draft 4 pthreads */
13105         status = pthread_create( &t, pthread_attr_default, task, NULL );
13106         if( status ) return errno;
13107
13108         /* give thread a chance to complete */
13109         /* it should remain joinable and hence detachable */
13110         sleep( 1 );
13111
13112         status = pthread_detach( &t );
13113         if( status ) return errno;
13114 #endif
13115
13116 #ifdef HAVE_LINUX_THREADS
13117         pthread_kill_other_threads_np();
13118 #endif
13119
13120         return 0;
13121
13122   ;
13123   return 0;
13124 }
13125 _ACEOF
13126 if ac_fn_c_try_link "$LINENO"; then :
13127   ol_cv_pthread_threads=yes
13128 else
13129   ol_cv_pthread_threads=no
13130 fi
13131 rm -f core conftest.err conftest.$ac_objext \
13132     conftest$ac_exeext conftest.$ac_ext
13133 else
13134   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13135 /* end confdefs.h.  */
13136
13137
13138 /* pthread test headers */
13139 #include <pthread.h>
13140 #if HAVE_PTHREADS < 7
13141 #include <errno.h>
13142 #endif
13143 #ifndef NULL
13144 #define NULL (void*)0
13145 #endif
13146
13147 static void *task(p)
13148         void *p;
13149 {
13150         return (void *) (p == NULL);
13151 }
13152
13153
13154 int main(argc, argv)
13155         int argc;
13156         char **argv;
13157 {
13158
13159         /* pthread test function */
13160 #ifndef PTHREAD_CREATE_DETACHED
13161 #define PTHREAD_CREATE_DETACHED 1
13162 #endif
13163         pthread_t t;
13164         int status;
13165         int detach = PTHREAD_CREATE_DETACHED;
13166
13167 #if HAVE_PTHREADS > 4
13168         /* Final pthreads */
13169         pthread_attr_t attr;
13170
13171         status = pthread_attr_init(&attr);
13172         if( status ) return status;
13173
13174 #if HAVE_PTHREADS < 7
13175         status = pthread_attr_setdetachstate(&attr, &detach);
13176         if( status < 0 ) status = errno;
13177 #else
13178         status = pthread_attr_setdetachstate(&attr, detach);
13179 #endif
13180         if( status ) return status;
13181         status = pthread_create( &t, &attr, task, NULL );
13182 #if HAVE_PTHREADS < 7
13183         if( status < 0 ) status = errno;
13184 #endif
13185         if( status ) return status;
13186 #else
13187         /* Draft 4 pthreads */
13188         status = pthread_create( &t, pthread_attr_default, task, NULL );
13189         if( status ) return errno;
13190
13191         /* give thread a chance to complete */
13192         /* it should remain joinable and hence detachable */
13193         sleep( 1 );
13194
13195         status = pthread_detach( &t );
13196         if( status ) return errno;
13197 #endif
13198
13199 #ifdef HAVE_LINUX_THREADS
13200         pthread_kill_other_threads_np();
13201 #endif
13202
13203         return 0;
13204
13205 }
13206
13207 _ACEOF
13208 if ac_fn_c_try_run "$LINENO"; then :
13209   ol_cv_pthread_threads=yes
13210 else
13211   ol_cv_pthread_threads=no
13212 fi
13213 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13214   conftest.$ac_objext conftest.beam conftest.$ac_ext
13215 fi
13216
13217
13218                 # restore the LIBS
13219                 LIBS="$ol_LIBS"
13220
13221 fi
13222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
13223 $as_echo "$ol_cv_pthread_threads" >&6; }
13224
13225         if test $ol_cv_pthread_threads = yes ; then
13226                 ol_link_pthreads="-threads"
13227                 ol_link_threads=posix
13228         fi
13229 fi
13230
13231
13232                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13233 if test "$ol_link_threads" = no ; then
13234         # try -lpthreads -lmach -lexc -lc_r
13235         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13236 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
13237 if ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+:} false; then :
13238   $as_echo_n "(cached) " >&6
13239 else
13240
13241                 # save the flags
13242                 ol_LIBS="$LIBS"
13243                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13244
13245                 if test "$cross_compiling" = yes; then :
13246   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13247 /* end confdefs.h.  */
13248
13249 /* pthread test headers */
13250 #include <pthread.h>
13251 #if HAVE_PTHREADS < 7
13252 #include <errno.h>
13253 #endif
13254 #ifndef NULL
13255 #define NULL (void*)0
13256 #endif
13257
13258 static void *task(p)
13259         void *p;
13260 {
13261         return (void *) (p == NULL);
13262 }
13263
13264 int
13265 main ()
13266 {
13267
13268         /* pthread test function */
13269 #ifndef PTHREAD_CREATE_DETACHED
13270 #define PTHREAD_CREATE_DETACHED 1
13271 #endif
13272         pthread_t t;
13273         int status;
13274         int detach = PTHREAD_CREATE_DETACHED;
13275
13276 #if HAVE_PTHREADS > 4
13277         /* Final pthreads */
13278         pthread_attr_t attr;
13279
13280         status = pthread_attr_init(&attr);
13281         if( status ) return status;
13282
13283 #if HAVE_PTHREADS < 7
13284         status = pthread_attr_setdetachstate(&attr, &detach);
13285         if( status < 0 ) status = errno;
13286 #else
13287         status = pthread_attr_setdetachstate(&attr, detach);
13288 #endif
13289         if( status ) return status;
13290         status = pthread_create( &t, &attr, task, NULL );
13291 #if HAVE_PTHREADS < 7
13292         if( status < 0 ) status = errno;
13293 #endif
13294         if( status ) return status;
13295 #else
13296         /* Draft 4 pthreads */
13297         status = pthread_create( &t, pthread_attr_default, task, NULL );
13298         if( status ) return errno;
13299
13300         /* give thread a chance to complete */
13301         /* it should remain joinable and hence detachable */
13302         sleep( 1 );
13303
13304         status = pthread_detach( &t );
13305         if( status ) return errno;
13306 #endif
13307
13308 #ifdef HAVE_LINUX_THREADS
13309         pthread_kill_other_threads_np();
13310 #endif
13311
13312         return 0;
13313
13314   ;
13315   return 0;
13316 }
13317 _ACEOF
13318 if ac_fn_c_try_link "$LINENO"; then :
13319   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13320 else
13321   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13322 fi
13323 rm -f core conftest.err conftest.$ac_objext \
13324     conftest$ac_exeext conftest.$ac_ext
13325 else
13326   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13327 /* end confdefs.h.  */
13328
13329
13330 /* pthread test headers */
13331 #include <pthread.h>
13332 #if HAVE_PTHREADS < 7
13333 #include <errno.h>
13334 #endif
13335 #ifndef NULL
13336 #define NULL (void*)0
13337 #endif
13338
13339 static void *task(p)
13340         void *p;
13341 {
13342         return (void *) (p == NULL);
13343 }
13344
13345
13346 int main(argc, argv)
13347         int argc;
13348         char **argv;
13349 {
13350
13351         /* pthread test function */
13352 #ifndef PTHREAD_CREATE_DETACHED
13353 #define PTHREAD_CREATE_DETACHED 1
13354 #endif
13355         pthread_t t;
13356         int status;
13357         int detach = PTHREAD_CREATE_DETACHED;
13358
13359 #if HAVE_PTHREADS > 4
13360         /* Final pthreads */
13361         pthread_attr_t attr;
13362
13363         status = pthread_attr_init(&attr);
13364         if( status ) return status;
13365
13366 #if HAVE_PTHREADS < 7
13367         status = pthread_attr_setdetachstate(&attr, &detach);
13368         if( status < 0 ) status = errno;
13369 #else
13370         status = pthread_attr_setdetachstate(&attr, detach);
13371 #endif
13372         if( status ) return status;
13373         status = pthread_create( &t, &attr, task, NULL );
13374 #if HAVE_PTHREADS < 7
13375         if( status < 0 ) status = errno;
13376 #endif
13377         if( status ) return status;
13378 #else
13379         /* Draft 4 pthreads */
13380         status = pthread_create( &t, pthread_attr_default, task, NULL );
13381         if( status ) return errno;
13382
13383         /* give thread a chance to complete */
13384         /* it should remain joinable and hence detachable */
13385         sleep( 1 );
13386
13387         status = pthread_detach( &t );
13388         if( status ) return errno;
13389 #endif
13390
13391 #ifdef HAVE_LINUX_THREADS
13392         pthread_kill_other_threads_np();
13393 #endif
13394
13395         return 0;
13396
13397 }
13398
13399 _ACEOF
13400 if ac_fn_c_try_run "$LINENO"; then :
13401   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13402 else
13403   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13404 fi
13405 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13406   conftest.$ac_objext conftest.beam conftest.$ac_ext
13407 fi
13408
13409
13410                 # restore the LIBS
13411                 LIBS="$ol_LIBS"
13412
13413 fi
13414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
13415 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
13416
13417         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
13418                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
13419                 ol_link_threads=posix
13420         fi
13421 fi
13422
13423                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
13424 if test "$ol_link_threads" = no ; then
13425         # try -lpthreads -lmach -lexc
13426         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
13427 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
13428 if ${ol_cv_pthread_lpthreads_lmach_lexc+:} false; then :
13429   $as_echo_n "(cached) " >&6
13430 else
13431
13432                 # save the flags
13433                 ol_LIBS="$LIBS"
13434                 LIBS="-lpthreads -lmach -lexc $LIBS"
13435
13436                 if test "$cross_compiling" = yes; then :
13437   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13438 /* end confdefs.h.  */
13439
13440 /* pthread test headers */
13441 #include <pthread.h>
13442 #if HAVE_PTHREADS < 7
13443 #include <errno.h>
13444 #endif
13445 #ifndef NULL
13446 #define NULL (void*)0
13447 #endif
13448
13449 static void *task(p)
13450         void *p;
13451 {
13452         return (void *) (p == NULL);
13453 }
13454
13455 int
13456 main ()
13457 {
13458
13459         /* pthread test function */
13460 #ifndef PTHREAD_CREATE_DETACHED
13461 #define PTHREAD_CREATE_DETACHED 1
13462 #endif
13463         pthread_t t;
13464         int status;
13465         int detach = PTHREAD_CREATE_DETACHED;
13466
13467 #if HAVE_PTHREADS > 4
13468         /* Final pthreads */
13469         pthread_attr_t attr;
13470
13471         status = pthread_attr_init(&attr);
13472         if( status ) return status;
13473
13474 #if HAVE_PTHREADS < 7
13475         status = pthread_attr_setdetachstate(&attr, &detach);
13476         if( status < 0 ) status = errno;
13477 #else
13478         status = pthread_attr_setdetachstate(&attr, detach);
13479 #endif
13480         if( status ) return status;
13481         status = pthread_create( &t, &attr, task, NULL );
13482 #if HAVE_PTHREADS < 7
13483         if( status < 0 ) status = errno;
13484 #endif
13485         if( status ) return status;
13486 #else
13487         /* Draft 4 pthreads */
13488         status = pthread_create( &t, pthread_attr_default, task, NULL );
13489         if( status ) return errno;
13490
13491         /* give thread a chance to complete */
13492         /* it should remain joinable and hence detachable */
13493         sleep( 1 );
13494
13495         status = pthread_detach( &t );
13496         if( status ) return errno;
13497 #endif
13498
13499 #ifdef HAVE_LINUX_THREADS
13500         pthread_kill_other_threads_np();
13501 #endif
13502
13503         return 0;
13504
13505   ;
13506   return 0;
13507 }
13508 _ACEOF
13509 if ac_fn_c_try_link "$LINENO"; then :
13510   ol_cv_pthread_lpthreads_lmach_lexc=yes
13511 else
13512   ol_cv_pthread_lpthreads_lmach_lexc=no
13513 fi
13514 rm -f core conftest.err conftest.$ac_objext \
13515     conftest$ac_exeext conftest.$ac_ext
13516 else
13517   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13518 /* end confdefs.h.  */
13519
13520
13521 /* pthread test headers */
13522 #include <pthread.h>
13523 #if HAVE_PTHREADS < 7
13524 #include <errno.h>
13525 #endif
13526 #ifndef NULL
13527 #define NULL (void*)0
13528 #endif
13529
13530 static void *task(p)
13531         void *p;
13532 {
13533         return (void *) (p == NULL);
13534 }
13535
13536
13537 int main(argc, argv)
13538         int argc;
13539         char **argv;
13540 {
13541
13542         /* pthread test function */
13543 #ifndef PTHREAD_CREATE_DETACHED
13544 #define PTHREAD_CREATE_DETACHED 1
13545 #endif
13546         pthread_t t;
13547         int status;
13548         int detach = PTHREAD_CREATE_DETACHED;
13549
13550 #if HAVE_PTHREADS > 4
13551         /* Final pthreads */
13552         pthread_attr_t attr;
13553
13554         status = pthread_attr_init(&attr);
13555         if( status ) return status;
13556
13557 #if HAVE_PTHREADS < 7
13558         status = pthread_attr_setdetachstate(&attr, &detach);
13559         if( status < 0 ) status = errno;
13560 #else
13561         status = pthread_attr_setdetachstate(&attr, detach);
13562 #endif
13563         if( status ) return status;
13564         status = pthread_create( &t, &attr, task, NULL );
13565 #if HAVE_PTHREADS < 7
13566         if( status < 0 ) status = errno;
13567 #endif
13568         if( status ) return status;
13569 #else
13570         /* Draft 4 pthreads */
13571         status = pthread_create( &t, pthread_attr_default, task, NULL );
13572         if( status ) return errno;
13573
13574         /* give thread a chance to complete */
13575         /* it should remain joinable and hence detachable */
13576         sleep( 1 );
13577
13578         status = pthread_detach( &t );
13579         if( status ) return errno;
13580 #endif
13581
13582 #ifdef HAVE_LINUX_THREADS
13583         pthread_kill_other_threads_np();
13584 #endif
13585
13586         return 0;
13587
13588 }
13589
13590 _ACEOF
13591 if ac_fn_c_try_run "$LINENO"; then :
13592   ol_cv_pthread_lpthreads_lmach_lexc=yes
13593 else
13594   ol_cv_pthread_lpthreads_lmach_lexc=no
13595 fi
13596 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13597   conftest.$ac_objext conftest.beam conftest.$ac_ext
13598 fi
13599
13600
13601                 # restore the LIBS
13602                 LIBS="$ol_LIBS"
13603
13604 fi
13605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
13606 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
13607
13608         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
13609                 ol_link_pthreads="-lpthreads -lmach -lexc"
13610                 ol_link_threads=posix
13611         fi
13612 fi
13613
13614                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
13615 if test "$ol_link_threads" = no ; then
13616         # try -lpthreads -lexc
13617         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
13618 $as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
13619 if ${ol_cv_pthread_lpthreads_lexc+:} false; then :
13620   $as_echo_n "(cached) " >&6
13621 else
13622
13623                 # save the flags
13624                 ol_LIBS="$LIBS"
13625                 LIBS="-lpthreads -lexc $LIBS"
13626
13627                 if test "$cross_compiling" = yes; then :
13628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13629 /* end confdefs.h.  */
13630
13631 /* pthread test headers */
13632 #include <pthread.h>
13633 #if HAVE_PTHREADS < 7
13634 #include <errno.h>
13635 #endif
13636 #ifndef NULL
13637 #define NULL (void*)0
13638 #endif
13639
13640 static void *task(p)
13641         void *p;
13642 {
13643         return (void *) (p == NULL);
13644 }
13645
13646 int
13647 main ()
13648 {
13649
13650         /* pthread test function */
13651 #ifndef PTHREAD_CREATE_DETACHED
13652 #define PTHREAD_CREATE_DETACHED 1
13653 #endif
13654         pthread_t t;
13655         int status;
13656         int detach = PTHREAD_CREATE_DETACHED;
13657
13658 #if HAVE_PTHREADS > 4
13659         /* Final pthreads */
13660         pthread_attr_t attr;
13661
13662         status = pthread_attr_init(&attr);
13663         if( status ) return status;
13664
13665 #if HAVE_PTHREADS < 7
13666         status = pthread_attr_setdetachstate(&attr, &detach);
13667         if( status < 0 ) status = errno;
13668 #else
13669         status = pthread_attr_setdetachstate(&attr, detach);
13670 #endif
13671         if( status ) return status;
13672         status = pthread_create( &t, &attr, task, NULL );
13673 #if HAVE_PTHREADS < 7
13674         if( status < 0 ) status = errno;
13675 #endif
13676         if( status ) return status;
13677 #else
13678         /* Draft 4 pthreads */
13679         status = pthread_create( &t, pthread_attr_default, task, NULL );
13680         if( status ) return errno;
13681
13682         /* give thread a chance to complete */
13683         /* it should remain joinable and hence detachable */
13684         sleep( 1 );
13685
13686         status = pthread_detach( &t );
13687         if( status ) return errno;
13688 #endif
13689
13690 #ifdef HAVE_LINUX_THREADS
13691         pthread_kill_other_threads_np();
13692 #endif
13693
13694         return 0;
13695
13696   ;
13697   return 0;
13698 }
13699 _ACEOF
13700 if ac_fn_c_try_link "$LINENO"; then :
13701   ol_cv_pthread_lpthreads_lexc=yes
13702 else
13703   ol_cv_pthread_lpthreads_lexc=no
13704 fi
13705 rm -f core conftest.err conftest.$ac_objext \
13706     conftest$ac_exeext conftest.$ac_ext
13707 else
13708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13709 /* end confdefs.h.  */
13710
13711
13712 /* pthread test headers */
13713 #include <pthread.h>
13714 #if HAVE_PTHREADS < 7
13715 #include <errno.h>
13716 #endif
13717 #ifndef NULL
13718 #define NULL (void*)0
13719 #endif
13720
13721 static void *task(p)
13722         void *p;
13723 {
13724         return (void *) (p == NULL);
13725 }
13726
13727
13728 int main(argc, argv)
13729         int argc;
13730         char **argv;
13731 {
13732
13733         /* pthread test function */
13734 #ifndef PTHREAD_CREATE_DETACHED
13735 #define PTHREAD_CREATE_DETACHED 1
13736 #endif
13737         pthread_t t;
13738         int status;
13739         int detach = PTHREAD_CREATE_DETACHED;
13740
13741 #if HAVE_PTHREADS > 4
13742         /* Final pthreads */
13743         pthread_attr_t attr;
13744
13745         status = pthread_attr_init(&attr);
13746         if( status ) return status;
13747
13748 #if HAVE_PTHREADS < 7
13749         status = pthread_attr_setdetachstate(&attr, &detach);
13750         if( status < 0 ) status = errno;
13751 #else
13752         status = pthread_attr_setdetachstate(&attr, detach);
13753 #endif
13754         if( status ) return status;
13755         status = pthread_create( &t, &attr, task, NULL );
13756 #if HAVE_PTHREADS < 7
13757         if( status < 0 ) status = errno;
13758 #endif
13759         if( status ) return status;
13760 #else
13761         /* Draft 4 pthreads */
13762         status = pthread_create( &t, pthread_attr_default, task, NULL );
13763         if( status ) return errno;
13764
13765         /* give thread a chance to complete */
13766         /* it should remain joinable and hence detachable */
13767         sleep( 1 );
13768
13769         status = pthread_detach( &t );
13770         if( status ) return errno;
13771 #endif
13772
13773 #ifdef HAVE_LINUX_THREADS
13774         pthread_kill_other_threads_np();
13775 #endif
13776
13777         return 0;
13778
13779 }
13780
13781 _ACEOF
13782 if ac_fn_c_try_run "$LINENO"; then :
13783   ol_cv_pthread_lpthreads_lexc=yes
13784 else
13785   ol_cv_pthread_lpthreads_lexc=no
13786 fi
13787 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13788   conftest.$ac_objext conftest.beam conftest.$ac_ext
13789 fi
13790
13791
13792                 # restore the LIBS
13793                 LIBS="$ol_LIBS"
13794
13795 fi
13796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
13797 $as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
13798
13799         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
13800                 ol_link_pthreads="-lpthreads -lexc"
13801                 ol_link_threads=posix
13802         fi
13803 fi
13804
13805
13806                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
13807 if test "$ol_link_threads" = no ; then
13808         # try -lpthreads
13809         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
13810 $as_echo_n "checking for pthread link with -lpthreads... " >&6; }
13811 if ${ol_cv_pthread_lib_lpthreads+:} false; then :
13812   $as_echo_n "(cached) " >&6
13813 else
13814
13815                 # save the flags
13816                 ol_LIBS="$LIBS"
13817                 LIBS="-lpthreads $LIBS"
13818
13819                 if test "$cross_compiling" = yes; then :
13820   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13821 /* end confdefs.h.  */
13822
13823 /* pthread test headers */
13824 #include <pthread.h>
13825 #if HAVE_PTHREADS < 7
13826 #include <errno.h>
13827 #endif
13828 #ifndef NULL
13829 #define NULL (void*)0
13830 #endif
13831
13832 static void *task(p)
13833         void *p;
13834 {
13835         return (void *) (p == NULL);
13836 }
13837
13838 int
13839 main ()
13840 {
13841
13842         /* pthread test function */
13843 #ifndef PTHREAD_CREATE_DETACHED
13844 #define PTHREAD_CREATE_DETACHED 1
13845 #endif
13846         pthread_t t;
13847         int status;
13848         int detach = PTHREAD_CREATE_DETACHED;
13849
13850 #if HAVE_PTHREADS > 4
13851         /* Final pthreads */
13852         pthread_attr_t attr;
13853
13854         status = pthread_attr_init(&attr);
13855         if( status ) return status;
13856
13857 #if HAVE_PTHREADS < 7
13858         status = pthread_attr_setdetachstate(&attr, &detach);
13859         if( status < 0 ) status = errno;
13860 #else
13861         status = pthread_attr_setdetachstate(&attr, detach);
13862 #endif
13863         if( status ) return status;
13864         status = pthread_create( &t, &attr, task, NULL );
13865 #if HAVE_PTHREADS < 7
13866         if( status < 0 ) status = errno;
13867 #endif
13868         if( status ) return status;
13869 #else
13870         /* Draft 4 pthreads */
13871         status = pthread_create( &t, pthread_attr_default, task, NULL );
13872         if( status ) return errno;
13873
13874         /* give thread a chance to complete */
13875         /* it should remain joinable and hence detachable */
13876         sleep( 1 );
13877
13878         status = pthread_detach( &t );
13879         if( status ) return errno;
13880 #endif
13881
13882 #ifdef HAVE_LINUX_THREADS
13883         pthread_kill_other_threads_np();
13884 #endif
13885
13886         return 0;
13887
13888   ;
13889   return 0;
13890 }
13891 _ACEOF
13892 if ac_fn_c_try_link "$LINENO"; then :
13893   ol_cv_pthread_lib_lpthreads=yes
13894 else
13895   ol_cv_pthread_lib_lpthreads=no
13896 fi
13897 rm -f core conftest.err conftest.$ac_objext \
13898     conftest$ac_exeext conftest.$ac_ext
13899 else
13900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13901 /* end confdefs.h.  */
13902
13903
13904 /* pthread test headers */
13905 #include <pthread.h>
13906 #if HAVE_PTHREADS < 7
13907 #include <errno.h>
13908 #endif
13909 #ifndef NULL
13910 #define NULL (void*)0
13911 #endif
13912
13913 static void *task(p)
13914         void *p;
13915 {
13916         return (void *) (p == NULL);
13917 }
13918
13919
13920 int main(argc, argv)
13921         int argc;
13922         char **argv;
13923 {
13924
13925         /* pthread test function */
13926 #ifndef PTHREAD_CREATE_DETACHED
13927 #define PTHREAD_CREATE_DETACHED 1
13928 #endif
13929         pthread_t t;
13930         int status;
13931         int detach = PTHREAD_CREATE_DETACHED;
13932
13933 #if HAVE_PTHREADS > 4
13934         /* Final pthreads */
13935         pthread_attr_t attr;
13936
13937         status = pthread_attr_init(&attr);
13938         if( status ) return status;
13939
13940 #if HAVE_PTHREADS < 7
13941         status = pthread_attr_setdetachstate(&attr, &detach);
13942         if( status < 0 ) status = errno;
13943 #else
13944         status = pthread_attr_setdetachstate(&attr, detach);
13945 #endif
13946         if( status ) return status;
13947         status = pthread_create( &t, &attr, task, NULL );
13948 #if HAVE_PTHREADS < 7
13949         if( status < 0 ) status = errno;
13950 #endif
13951         if( status ) return status;
13952 #else
13953         /* Draft 4 pthreads */
13954         status = pthread_create( &t, pthread_attr_default, task, NULL );
13955         if( status ) return errno;
13956
13957         /* give thread a chance to complete */
13958         /* it should remain joinable and hence detachable */
13959         sleep( 1 );
13960
13961         status = pthread_detach( &t );
13962         if( status ) return errno;
13963 #endif
13964
13965 #ifdef HAVE_LINUX_THREADS
13966         pthread_kill_other_threads_np();
13967 #endif
13968
13969         return 0;
13970
13971 }
13972
13973 _ACEOF
13974 if ac_fn_c_try_run "$LINENO"; then :
13975   ol_cv_pthread_lib_lpthreads=yes
13976 else
13977   ol_cv_pthread_lib_lpthreads=no
13978 fi
13979 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13980   conftest.$ac_objext conftest.beam conftest.$ac_ext
13981 fi
13982
13983
13984                 # restore the LIBS
13985                 LIBS="$ol_LIBS"
13986
13987 fi
13988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
13989 $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
13990
13991         if test $ol_cv_pthread_lib_lpthreads = yes ; then
13992                 ol_link_pthreads="-lpthreads"
13993                 ol_link_threads=posix
13994         fi
13995 fi
13996
13997
13998 { $as_echo "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
13999 $as_echo "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
14000
14001                 if test $ol_link_threads != no ; then
14002                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14003
14004                                                 save_CPPFLAGS="$CPPFLAGS"
14005                         save_LIBS="$LIBS"
14006                         LIBS="$LTHREAD_LIBS $LIBS"
14007
14008                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14009 do :
14010   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14011 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14012 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14013   cat >>confdefs.h <<_ACEOF
14014 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14015 _ACEOF
14016
14017 fi
14018 done
14019
14020
14021                         if test $ac_cv_func_sched_yield = no &&
14022                            test $ac_cv_func_pthread_yield = no &&
14023                            test $ac_cv_func_thr_yield = no ; then
14024                                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
14025 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
14026 if ${ac_cv_lib_rt_sched_yield+:} false; then :
14027   $as_echo_n "(cached) " >&6
14028 else
14029   ac_check_lib_save_LIBS=$LIBS
14030 LIBS="-lrt  $LIBS"
14031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14032 /* end confdefs.h.  */
14033
14034 /* Override any GCC internal prototype to avoid an error.
14035    Use char because int might match the return type of a GCC
14036    builtin and then its argument prototype would still apply.  */
14037 #ifdef __cplusplus
14038 extern "C"
14039 #endif
14040 char sched_yield ();
14041 int
14042 main ()
14043 {
14044 return sched_yield ();
14045   ;
14046   return 0;
14047 }
14048 _ACEOF
14049 if ac_fn_c_try_link "$LINENO"; then :
14050   ac_cv_lib_rt_sched_yield=yes
14051 else
14052   ac_cv_lib_rt_sched_yield=no
14053 fi
14054 rm -f core conftest.err conftest.$ac_objext \
14055     conftest$ac_exeext conftest.$ac_ext
14056 LIBS=$ac_check_lib_save_LIBS
14057 fi
14058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
14059 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
14060 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
14061   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14062
14063 $as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
14064
14065                                         ac_cv_func_sched_yield=yes
14066 else
14067   ac_cv_func_sched_yield=no
14068 fi
14069
14070                         fi
14071                         if test $ac_cv_func_sched_yield = no &&
14072                            test $ac_cv_func_pthread_yield = no &&
14073                            test "$ac_cv_func_thr_yield" = no ; then
14074                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
14075 $as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
14076                         fi
14077
14078                                                 for ac_func in pthread_kill
14079 do :
14080   ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
14081 if test "x$ac_cv_func_pthread_kill" = xyes; then :
14082   cat >>confdefs.h <<_ACEOF
14083 #define HAVE_PTHREAD_KILL 1
14084 _ACEOF
14085
14086 fi
14087 done
14088
14089
14090                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
14091 $as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
14092 if ${ol_cv_func_pthread_rwlock_destroy+:} false; then :
14093   $as_echo_n "(cached) " >&6
14094 else
14095
14096                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14097 /* end confdefs.h.  */
14098
14099 #include <pthread.h>
14100 pthread_rwlock_t rwlock;
14101
14102 int
14103 main ()
14104 {
14105 pthread_rwlock_destroy(&rwlock);
14106   ;
14107   return 0;
14108 }
14109 _ACEOF
14110 if ac_fn_c_try_link "$LINENO"; then :
14111   ol_cv_func_pthread_rwlock_destroy=yes
14112 else
14113   ol_cv_func_pthread_rwlock_destroy=no
14114 fi
14115 rm -f core conftest.err conftest.$ac_objext \
14116     conftest$ac_exeext conftest.$ac_ext
14117
14118 fi
14119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
14120 $as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
14121                         if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
14122
14123 $as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
14124
14125                         fi
14126
14127                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
14128 $as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
14129 if ${ol_cv_func_pthread_detach+:} false; then :
14130   $as_echo_n "(cached) " >&6
14131 else
14132
14133                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14134 /* end confdefs.h.  */
14135
14136 #include <pthread.h>
14137 #ifndef NULL
14138 #define NULL (void*)0
14139 #endif
14140
14141 int
14142 main ()
14143 {
14144 pthread_detach(NULL);
14145   ;
14146   return 0;
14147 }
14148 _ACEOF
14149 if ac_fn_c_try_link "$LINENO"; then :
14150   ol_cv_func_pthread_detach=yes
14151 else
14152   ol_cv_func_pthread_detach=no
14153 fi
14154 rm -f core conftest.err conftest.$ac_objext \
14155     conftest$ac_exeext conftest.$ac_ext
14156
14157 fi
14158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
14159 $as_echo "$ol_cv_func_pthread_detach" >&6; }
14160
14161                         if test $ol_cv_func_pthread_detach = no ; then
14162                                 as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
14163                         fi
14164
14165
14166 $as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
14167
14168
14169                                                 for ac_func in \
14170                                 pthread_setconcurrency \
14171                                 pthread_getconcurrency \
14172                                 thr_setconcurrency \
14173                                 thr_getconcurrency \
14174
14175 do :
14176   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14177 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14178 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14179   cat >>confdefs.h <<_ACEOF
14180 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14181 _ACEOF
14182
14183 fi
14184 done
14185
14186
14187
14188         for ac_func in pthread_kill_other_threads_np
14189 do :
14190   ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
14191 if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes; then :
14192   cat >>confdefs.h <<_ACEOF
14193 #define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
14194 _ACEOF
14195
14196 fi
14197 done
14198
14199         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
14200 $as_echo_n "checking for LinuxThreads implementation... " >&6; }
14201 if ${ol_cv_sys_linux_threads+:} false; then :
14202   $as_echo_n "(cached) " >&6
14203 else
14204   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14205 fi
14206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
14207 $as_echo "$ol_cv_sys_linux_threads" >&6; }
14208
14209
14210
14211
14212         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
14213 $as_echo_n "checking for LinuxThreads consistency... " >&6; }
14214 if ${ol_cv_linux_threads+:} false; then :
14215   $as_echo_n "(cached) " >&6
14216 else
14217
14218                 if test $ol_cv_header_linux_threads = yes &&
14219                    test $ol_cv_sys_linux_threads = yes; then
14220                         ol_cv_linux_threads=yes
14221                 elif test $ol_cv_header_linux_threads = no &&
14222                      test $ol_cv_sys_linux_threads = no; then
14223                         ol_cv_linux_threads=no
14224                 else
14225                         ol_cv_linux_threads=error
14226                 fi
14227
14228 fi
14229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
14230 $as_echo "$ol_cv_linux_threads" >&6; }
14231
14232
14233                         if test $ol_cv_linux_threads = error; then
14234                                 as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
14235                         fi
14236
14237                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
14238 $as_echo_n "checking if pthread_create() works... " >&6; }
14239 if ${ol_cv_pthread_create_works+:} false; then :
14240   $as_echo_n "(cached) " >&6
14241 else
14242
14243                         if test "$cross_compiling" = yes; then :
14244                                 ol_cv_pthread_create_works=yes
14245 else
14246   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14247 /* end confdefs.h.  */
14248
14249
14250 /* pthread test headers */
14251 #include <pthread.h>
14252 #if HAVE_PTHREADS < 7
14253 #include <errno.h>
14254 #endif
14255 #ifndef NULL
14256 #define NULL (void*)0
14257 #endif
14258
14259 static void *task(p)
14260         void *p;
14261 {
14262         return (void *) (p == NULL);
14263 }
14264
14265
14266 int main(argc, argv)
14267         int argc;
14268         char **argv;
14269 {
14270
14271         /* pthread test function */
14272 #ifndef PTHREAD_CREATE_DETACHED
14273 #define PTHREAD_CREATE_DETACHED 1
14274 #endif
14275         pthread_t t;
14276         int status;
14277         int detach = PTHREAD_CREATE_DETACHED;
14278
14279 #if HAVE_PTHREADS > 4
14280         /* Final pthreads */
14281         pthread_attr_t attr;
14282
14283         status = pthread_attr_init(&attr);
14284         if( status ) return status;
14285
14286 #if HAVE_PTHREADS < 7
14287         status = pthread_attr_setdetachstate(&attr, &detach);
14288         if( status < 0 ) status = errno;
14289 #else
14290         status = pthread_attr_setdetachstate(&attr, detach);
14291 #endif
14292         if( status ) return status;
14293         status = pthread_create( &t, &attr, task, NULL );
14294 #if HAVE_PTHREADS < 7
14295         if( status < 0 ) status = errno;
14296 #endif
14297         if( status ) return status;
14298 #else
14299         /* Draft 4 pthreads */
14300         status = pthread_create( &t, pthread_attr_default, task, NULL );
14301         if( status ) return errno;
14302
14303         /* give thread a chance to complete */
14304         /* it should remain joinable and hence detachable */
14305         sleep( 1 );
14306
14307         status = pthread_detach( &t );
14308         if( status ) return errno;
14309 #endif
14310
14311 #ifdef HAVE_LINUX_THREADS
14312         pthread_kill_other_threads_np();
14313 #endif
14314
14315         return 0;
14316
14317 }
14318
14319 _ACEOF
14320 if ac_fn_c_try_run "$LINENO"; then :
14321   ol_cv_pthread_create_works=yes
14322 else
14323   ol_cv_pthread_create_works=no
14324 fi
14325 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14326   conftest.$ac_objext conftest.beam conftest.$ac_ext
14327 fi
14328
14329 fi
14330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
14331 $as_echo "$ol_cv_pthread_create_works" >&6; }
14332
14333                         if test $ol_cv_pthread_create_works = no ; then
14334                                 as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
14335                         fi
14336
14337                         ol_replace_broken_yield=no
14338
14339                         if test $ol_replace_broken_yield = yes ; then
14340
14341 $as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
14342
14343                         fi
14344
14345                                                 if test x$ol_with_yielding_select = xauto ; then
14346                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
14347 $as_echo_n "checking if select yields when using pthreads... " >&6; }
14348 if ${ol_cv_pthread_select_yields+:} false; then :
14349   $as_echo_n "(cached) " >&6
14350 else
14351
14352                                 if test "$cross_compiling" = yes; then :
14353   ol_cv_pthread_select_yields=cross
14354 else
14355   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14356 /* end confdefs.h.  */
14357
14358 #include <sys/types.h>
14359 #include <sys/time.h>
14360 #include <unistd.h>
14361 #include <pthread.h>
14362 #ifndef NULL
14363 #define NULL (void*) 0
14364 #endif
14365
14366 static int fildes[2];
14367
14368 static void *task(p)
14369         void *p;
14370 {
14371         int i;
14372         struct timeval tv;
14373
14374         fd_set rfds;
14375
14376         tv.tv_sec=10;
14377         tv.tv_usec=0;
14378
14379         FD_ZERO(&rfds);
14380         FD_SET(fildes[0], &rfds);
14381
14382         /* we're not interested in any fds */
14383         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
14384
14385         if(i < 0) {
14386                 perror("select");
14387                 exit(10);
14388         }
14389
14390         exit(0); /* if we exit here, the select blocked the whole process */
14391 }
14392
14393 int main(argc, argv)
14394         int argc;
14395         char **argv;
14396 {
14397         pthread_t t;
14398
14399         /* create a pipe to select */
14400         if(pipe(&fildes[0])) {
14401                 perror("select");
14402                 exit(1);
14403         }
14404
14405 #ifdef HAVE_PTHREAD_SETCONCURRENCY
14406         (void) pthread_setconcurrency(2);
14407 #else
14408 #ifdef HAVE_THR_SETCONCURRENCY
14409         /* Set Solaris LWP concurrency to 2 */
14410         thr_setconcurrency(2);
14411 #endif
14412 #endif
14413
14414 #if HAVE_PTHREADS < 6
14415         pthread_create(&t, pthread_attr_default, task, NULL);
14416 #else
14417         pthread_create(&t, NULL, task, NULL);
14418 #endif
14419
14420         /* make sure task runs first */
14421 #ifdef HAVE_THR_YIELD
14422         thr_yield();
14423 #elif defined( HAVE_SCHED_YIELD )
14424         sched_yield();
14425 #elif defined( HAVE_PTHREAD_YIELD )
14426         pthread_yield();
14427 #endif
14428
14429         exit(2);
14430 }
14431 _ACEOF
14432 if ac_fn_c_try_run "$LINENO"; then :
14433   ol_cv_pthread_select_yields=no
14434 else
14435   ol_cv_pthread_select_yields=yes
14436 fi
14437 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14438   conftest.$ac_objext conftest.beam conftest.$ac_ext
14439 fi
14440
14441 fi
14442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
14443 $as_echo "$ol_cv_pthread_select_yields" >&6; }
14444
14445                                 if test $ol_cv_pthread_select_yields = cross ; then
14446                                         as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
14447                                 fi
14448
14449                                 if test $ol_cv_pthread_select_yields = yes ; then
14450                                         ol_with_yielding_select=yes
14451                                 fi
14452                         fi
14453
14454                                                 CPPFLAGS="$save_CPPFLAGS"
14455                         LIBS="$save_LIBS"
14456                 else
14457                         as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
14458                 fi
14459         fi
14460
14461         if test $ol_with_threads = posix ; then
14462                 as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
14463         fi
14464         ;;
14465 esac
14466
14467 case $ol_with_threads in auto | yes | mach)
14468
14469                 for ac_header in mach/cthreads.h cthreads.h
14470 do :
14471   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14472 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14473 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14474   cat >>confdefs.h <<_ACEOF
14475 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14476 _ACEOF
14477
14478 fi
14479
14480 done
14481
14482         if test $ac_cv_header_mach_cthreads_h = yes ; then
14483                 ol_with_threads=found
14484
14485                                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
14486 if test "x$ac_cv_func_cthread_fork" = xyes; then :
14487   ol_link_threads=yes
14488 fi
14489
14490
14491                 if test $ol_link_threads = no ; then
14492                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
14493 $as_echo_n "checking for cthread_fork with -all_load... " >&6; }
14494 if ${ol_cv_cthread_all_load+:} false; then :
14495   $as_echo_n "(cached) " >&6
14496 else
14497
14498                                                                 save_LIBS="$LIBS"
14499                                 LIBS="-all_load $LIBS"
14500                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14501 /* end confdefs.h.  */
14502 #include <mach/cthreads.h>
14503 int
14504 main ()
14505 {
14506
14507                                         cthread_fork((void *)0, (void *)0);
14508
14509   ;
14510   return 0;
14511 }
14512 _ACEOF
14513 if ac_fn_c_try_link "$LINENO"; then :
14514   ol_cv_cthread_all_load=yes
14515 else
14516   ol_cv_cthread_all_load=no
14517 fi
14518 rm -f core conftest.err conftest.$ac_objext \
14519     conftest$ac_exeext conftest.$ac_ext
14520                                                                 LIBS="$save_LIBS"
14521
14522 fi
14523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
14524 $as_echo "$ol_cv_cthread_all_load" >&6; }
14525
14526                         if test $ol_cv_cthread_all_load = yes ; then
14527                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
14528                                 ol_link_threads=mach
14529                                 ol_with_threads=found
14530                         fi
14531                 fi
14532
14533         elif test $ac_cv_header_cthreads_h = yes ; then
14534
14535                 ol_with_threads=found
14536
14537                                 save_LIBS="$LIBS"
14538                 LIBS="$LIBS -lthreads"
14539                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
14540 if test "x$ac_cv_func_cthread_fork" = xyes; then :
14541   ol_link_threads=yes
14542 fi
14543
14544                 LIBS="$save_LIBS"
14545
14546                 if test $ol_link_threads = yes ; then
14547                         LTHREAD_LIBS="-lthreads"
14548                         ol_link_threads=mach
14549                         ol_with_threads=found
14550                 else
14551                         as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
14552                 fi
14553
14554         elif test $ol_with_threads = mach ; then
14555                 as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
14556         fi
14557
14558         if test $ol_link_threads = mach ; then
14559
14560 $as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
14561
14562         elif test $ol_with_threads = found ; then
14563                 as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
14564         fi
14565         ;;
14566 esac
14567
14568 case $ol_with_threads in auto | yes | pth)
14569
14570         for ac_header in pth.h
14571 do :
14572   ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
14573 if test "x$ac_cv_header_pth_h" = xyes; then :
14574   cat >>confdefs.h <<_ACEOF
14575 #define HAVE_PTH_H 1
14576 _ACEOF
14577
14578 fi
14579
14580 done
14581
14582
14583         if test $ac_cv_header_pth_h = yes ; then
14584                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
14585 $as_echo_n "checking for pth_version in -lpth... " >&6; }
14586 if ${ac_cv_lib_pth_pth_version+:} false; then :
14587   $as_echo_n "(cached) " >&6
14588 else
14589   ac_check_lib_save_LIBS=$LIBS
14590 LIBS="-lpth  $LIBS"
14591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14592 /* end confdefs.h.  */
14593
14594 /* Override any GCC internal prototype to avoid an error.
14595    Use char because int might match the return type of a GCC
14596    builtin and then its argument prototype would still apply.  */
14597 #ifdef __cplusplus
14598 extern "C"
14599 #endif
14600 char pth_version ();
14601 int
14602 main ()
14603 {
14604 return pth_version ();
14605   ;
14606   return 0;
14607 }
14608 _ACEOF
14609 if ac_fn_c_try_link "$LINENO"; then :
14610   ac_cv_lib_pth_pth_version=yes
14611 else
14612   ac_cv_lib_pth_pth_version=no
14613 fi
14614 rm -f core conftest.err conftest.$ac_objext \
14615     conftest$ac_exeext conftest.$ac_ext
14616 LIBS=$ac_check_lib_save_LIBS
14617 fi
14618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
14619 $as_echo "$ac_cv_lib_pth_pth_version" >&6; }
14620 if test "x$ac_cv_lib_pth_pth_version" = xyes; then :
14621   have_pth=yes
14622 else
14623   have_pth=no
14624 fi
14625
14626
14627                 if test $have_pth = yes ; then
14628
14629 $as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
14630
14631                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
14632                         ol_link_threads=pth
14633                         ol_with_threads=found
14634
14635                         if test x$ol_with_yielding_select = xauto ; then
14636                                 ol_with_yielding_select=yes
14637                         fi
14638                 fi
14639         fi
14640         ;;
14641 esac
14642
14643 case $ol_with_threads in auto | yes | lwp)
14644
14645                 for ac_header in thread.h synch.h
14646 do :
14647   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14648 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14649 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14650   cat >>confdefs.h <<_ACEOF
14651 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14652 _ACEOF
14653
14654 fi
14655
14656 done
14657
14658         if test $ac_cv_header_thread_h = yes &&
14659            test $ac_cv_header_synch_h = yes ; then
14660                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
14661 $as_echo_n "checking for thr_create in -lthread... " >&6; }
14662 if ${ac_cv_lib_thread_thr_create+:} false; then :
14663   $as_echo_n "(cached) " >&6
14664 else
14665   ac_check_lib_save_LIBS=$LIBS
14666 LIBS="-lthread  $LIBS"
14667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14668 /* end confdefs.h.  */
14669
14670 /* Override any GCC internal prototype to avoid an error.
14671    Use char because int might match the return type of a GCC
14672    builtin and then its argument prototype would still apply.  */
14673 #ifdef __cplusplus
14674 extern "C"
14675 #endif
14676 char thr_create ();
14677 int
14678 main ()
14679 {
14680 return thr_create ();
14681   ;
14682   return 0;
14683 }
14684 _ACEOF
14685 if ac_fn_c_try_link "$LINENO"; then :
14686   ac_cv_lib_thread_thr_create=yes
14687 else
14688   ac_cv_lib_thread_thr_create=no
14689 fi
14690 rm -f core conftest.err conftest.$ac_objext \
14691     conftest$ac_exeext conftest.$ac_ext
14692 LIBS=$ac_check_lib_save_LIBS
14693 fi
14694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
14695 $as_echo "$ac_cv_lib_thread_thr_create" >&6; }
14696 if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
14697   have_thr=yes
14698 else
14699   have_thr=no
14700 fi
14701
14702
14703                 if test $have_thr = yes ; then
14704
14705 $as_echo "#define HAVE_THR 1" >>confdefs.h
14706
14707                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
14708                         ol_link_threads=thr
14709
14710                         if test x$ol_with_yielding_select = xauto ; then
14711                                 ol_with_yielding_select=yes
14712                         fi
14713
14714                                                 for ac_func in \
14715                                 thr_setconcurrency \
14716                                 thr_getconcurrency \
14717
14718 do :
14719   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14720 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14721 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14722   cat >>confdefs.h <<_ACEOF
14723 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14724 _ACEOF
14725
14726 fi
14727 done
14728
14729                 fi
14730         fi
14731
14732                 for ac_header in lwp/lwp.h
14733 do :
14734   ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
14735 if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
14736   cat >>confdefs.h <<_ACEOF
14737 #define HAVE_LWP_LWP_H 1
14738 _ACEOF
14739
14740 fi
14741
14742 done
14743
14744         if test $ac_cv_header_lwp_lwp_h = yes ; then
14745                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
14746 $as_echo_n "checking for lwp_create in -llwp... " >&6; }
14747 if ${ac_cv_lib_lwp_lwp_create+:} false; then :
14748   $as_echo_n "(cached) " >&6
14749 else
14750   ac_check_lib_save_LIBS=$LIBS
14751 LIBS="-llwp  $LIBS"
14752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14753 /* end confdefs.h.  */
14754
14755 /* Override any GCC internal prototype to avoid an error.
14756    Use char because int might match the return type of a GCC
14757    builtin and then its argument prototype would still apply.  */
14758 #ifdef __cplusplus
14759 extern "C"
14760 #endif
14761 char lwp_create ();
14762 int
14763 main ()
14764 {
14765 return lwp_create ();
14766   ;
14767   return 0;
14768 }
14769 _ACEOF
14770 if ac_fn_c_try_link "$LINENO"; then :
14771   ac_cv_lib_lwp_lwp_create=yes
14772 else
14773   ac_cv_lib_lwp_lwp_create=no
14774 fi
14775 rm -f core conftest.err conftest.$ac_objext \
14776     conftest$ac_exeext conftest.$ac_ext
14777 LIBS=$ac_check_lib_save_LIBS
14778 fi
14779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
14780 $as_echo "$ac_cv_lib_lwp_lwp_create" >&6; }
14781 if test "x$ac_cv_lib_lwp_lwp_create" = xyes; then :
14782   have_lwp=yes
14783 else
14784   have_lwp=no
14785 fi
14786
14787
14788                 if test $have_lwp = yes ; then
14789
14790 $as_echo "#define HAVE_LWP 1" >>confdefs.h
14791
14792                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
14793                         ol_link_threads=lwp
14794
14795                         if test x$ol_with_yielding_select = xauto ; then
14796                                 ol_with_yielding_select=no
14797                         fi
14798                 fi
14799         fi
14800         ;;
14801 esac
14802
14803 if test $ol_with_yielding_select = yes ; then
14804
14805 $as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
14806
14807 fi
14808
14809 if test $ol_with_threads = manual ; then
14810                 ol_link_threads=yes
14811
14812         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
14813 $as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
14814
14815         for ac_header in pthread.h sched.h
14816 do :
14817   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14818 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14819 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14820   cat >>confdefs.h <<_ACEOF
14821 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14822 _ACEOF
14823
14824 fi
14825
14826 done
14827
14828         for ac_func in sched_yield pthread_yield
14829 do :
14830   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14831 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14832 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14833   cat >>confdefs.h <<_ACEOF
14834 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14835 _ACEOF
14836
14837 fi
14838 done
14839
14840
14841         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
14842 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
14843 if ${ol_cv_header_linux_threads+:} false; then :
14844   $as_echo_n "(cached) " >&6
14845 else
14846   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14847 /* end confdefs.h.  */
14848 #include <pthread.h>
14849 _ACEOF
14850 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14851   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
14852   ol_cv_header_linux_threads=yes
14853 else
14854   ol_cv_header_linux_threads=no
14855 fi
14856 rm -f conftest*
14857
14858
14859 fi
14860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
14861 $as_echo "$ol_cv_header_linux_threads" >&6; }
14862         if test $ol_cv_header_linux_threads = yes; then
14863
14864 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
14865
14866         fi
14867
14868
14869         for ac_header in mach/cthreads.h
14870 do :
14871   ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
14872 if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
14873   cat >>confdefs.h <<_ACEOF
14874 #define HAVE_MACH_CTHREADS_H 1
14875 _ACEOF
14876
14877 fi
14878
14879 done
14880
14881         for ac_header in lwp/lwp.h
14882 do :
14883   ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
14884 if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
14885   cat >>confdefs.h <<_ACEOF
14886 #define HAVE_LWP_LWP_H 1
14887 _ACEOF
14888
14889 fi
14890
14891 done
14892
14893         for ac_header in thread.h synch.h
14894 do :
14895   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14896 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14897 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14898   cat >>confdefs.h <<_ACEOF
14899 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14900 _ACEOF
14901
14902 fi
14903
14904 done
14905
14906 fi
14907
14908 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
14909
14910 $as_echo "#define REENTRANT 1" >>confdefs.h
14911
14912
14913 $as_echo "#define _REENTRANT 1" >>confdefs.h
14914
14915
14916 $as_echo "#define THREAD_SAFE 1" >>confdefs.h
14917
14918
14919 $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
14920
14921
14922 $as_echo "#define THREADSAFE 1" >>confdefs.h
14923
14924
14925 $as_echo "#define _THREADSAFE 1" >>confdefs.h
14926
14927
14928 $as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
14929
14930
14931                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
14932 $as_echo_n "checking for thread specific errno... " >&6; }
14933 if ${ol_cv_errno_thread_specific+:} false; then :
14934   $as_echo_n "(cached) " >&6
14935 else
14936
14937                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14938 /* end confdefs.h.  */
14939 #include <errno.h>
14940 int
14941 main ()
14942 {
14943 errno = 0;
14944   ;
14945   return 0;
14946 }
14947 _ACEOF
14948 if ac_fn_c_try_link "$LINENO"; then :
14949   ol_cv_errno_thread_specific=yes
14950 else
14951   ol_cv_errno_thread_specific=no
14952 fi
14953 rm -f core conftest.err conftest.$ac_objext \
14954     conftest$ac_exeext conftest.$ac_ext
14955
14956 fi
14957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
14958 $as_echo "$ol_cv_errno_thread_specific" >&6; }
14959
14960                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
14961 $as_echo_n "checking for thread specific h_errno... " >&6; }
14962 if ${ol_cv_h_errno_thread_specific+:} false; then :
14963   $as_echo_n "(cached) " >&6
14964 else
14965
14966                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14967 /* end confdefs.h.  */
14968 #include <netdb.h>
14969 int
14970 main ()
14971 {
14972 h_errno = 0;
14973   ;
14974   return 0;
14975 }
14976 _ACEOF
14977 if ac_fn_c_try_link "$LINENO"; then :
14978   ol_cv_h_errno_thread_specific=yes
14979 else
14980   ol_cv_h_errno_thread_specific=no
14981 fi
14982 rm -f core conftest.err conftest.$ac_objext \
14983     conftest$ac_exeext conftest.$ac_ext
14984
14985 fi
14986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
14987 $as_echo "$ol_cv_h_errno_thread_specific" >&6; }
14988
14989         if test $ol_cv_errno_thread_specific != yes ||
14990            test $ol_cv_h_errno_thread_specific != yes ; then
14991                 LIBS="$LTHREAD_LIBS $LIBS"
14992                 LTHREAD_LIBS=""
14993         fi
14994
14995 fi
14996
14997 if test $ol_link_threads = no ; then
14998         if test $ol_with_threads = yes ; then
14999                 as_fn_error $? "no suitable thread support" "$LINENO" 5
15000         fi
15001
15002         if test $ol_with_threads = auto ; then
15003                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
15004 $as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
15005                 ol_with_threads=no
15006         fi
15007
15008
15009 $as_echo "#define NO_THREADS 1" >>confdefs.h
15010
15011         LTHREAD_LIBS=""
15012         BUILD_THREAD=no
15013 else
15014         BUILD_THREAD=yes
15015 fi
15016
15017 if test $ol_link_threads != no ; then
15018
15019 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
15020
15021 fi
15022
15023 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
15024 case "$ol_with_threads" in
15025  no)
15026     ol_pthread_ok=no
15027
15028     ;;
15029  *)
15030     ol_found_pthreads=yes
15031     ;;
15032 esac
15033
15034 ac_ext=c
15035 ac_cpp='$CPP $CPPFLAGS'
15036 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15037 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15038 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15039
15040
15041
15042
15043
15044
15045     case "$ol_found_pthreads" in
15046      yes)
15047         saved_LIBS="$LIBS"
15048         LIBS="$LTHREAD_LIBS $LIBS"
15049         saved_CFLAGS="$CFLAGS"
15050         CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
15051         for ac_func in sem_timedwait
15052 do :
15053   ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
15054 if test "x$ac_cv_func_sem_timedwait" = xyes; then :
15055   cat >>confdefs.h <<_ACEOF
15056 #define HAVE_SEM_TIMEDWAIT 1
15057 _ACEOF
15058
15059 fi
15060 done
15061
15062         LIBS="$saved_LIBS"
15063         { saved_LIBS=; unset saved_LIBS;}
15064         CFLAGS="$saved_CFLAGS"
15065         { saved_CFLAGS=; unset saved_CFLAGS;}
15066         case "$ac_cv_func_sem_timedwait" in
15067          yes)
15068             PTHREAD_LIBS="$LTHREAD_LIBS"
15069             have_pthreads=yes
15070         esac
15071     esac
15072 esac
15073
15074 case "$have_pthreads" in
15075  yes)
15076     CFLAGS_NTP="$CFLAGS_NTP $PTHREAD_CFLAGS"
15077     saved_LIBS="$LIBS"
15078     LIBS="$LTHREAD_LIBS $LIBS"
15079     saved_CFLAGS="$CFLAGS"
15080     CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
15081     # The cast to long int works around a bug in the HP C Compiler
15082 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15083 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15084 # This bug is HP SR number 8606223364.
15085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
15086 $as_echo_n "checking size of pthread_t... " >&6; }
15087 if ${ac_cv_sizeof_pthread_t+:} false; then :
15088   $as_echo_n "(cached) " >&6
15089 else
15090   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "
15091             $ac_includes_default
15092             #include <pthread.h>
15093
15094
15095 "; then :
15096
15097 else
15098   if test "$ac_cv_type_pthread_t" = yes; then
15099      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15100 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15101 as_fn_error 77 "cannot compute sizeof (pthread_t)
15102 See \`config.log' for more details" "$LINENO" 5; }
15103    else
15104      ac_cv_sizeof_pthread_t=0
15105    fi
15106 fi
15107
15108 fi
15109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
15110 $as_echo "$ac_cv_sizeof_pthread_t" >&6; }
15111
15112
15113
15114 cat >>confdefs.h <<_ACEOF
15115 #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
15116 _ACEOF
15117
15118
15119     LIBISC_PTHREADS_NOTHREADS=pthreads
15120
15121 $as_echo "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
15122
15123     #
15124     # We'd like to use sigwait() too
15125     #
15126     ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
15127 if test "x$ac_cv_func_sigwait" = xyes; then :
15128   have_sigwait=yes
15129 else
15130   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
15131 $as_echo_n "checking for sigwait in -lc... " >&6; }
15132 if ${ac_cv_lib_c_sigwait+:} false; then :
15133   $as_echo_n "(cached) " >&6
15134 else
15135   ac_check_lib_save_LIBS=$LIBS
15136 LIBS="-lc  $LIBS"
15137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15138 /* end confdefs.h.  */
15139
15140 /* Override any GCC internal prototype to avoid an error.
15141    Use char because int might match the return type of a GCC
15142    builtin and then its argument prototype would still apply.  */
15143 #ifdef __cplusplus
15144 extern "C"
15145 #endif
15146 char sigwait ();
15147 int
15148 main ()
15149 {
15150 return sigwait ();
15151   ;
15152   return 0;
15153 }
15154 _ACEOF
15155 if ac_fn_c_try_link "$LINENO"; then :
15156   ac_cv_lib_c_sigwait=yes
15157 else
15158   ac_cv_lib_c_sigwait=no
15159 fi
15160 rm -f core conftest.err conftest.$ac_objext \
15161     conftest$ac_exeext conftest.$ac_ext
15162 LIBS=$ac_check_lib_save_LIBS
15163 fi
15164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
15165 $as_echo "$ac_cv_lib_c_sigwait" >&6; }
15166 if test "x$ac_cv_lib_c_sigwait" = xyes; then :
15167   have_sigwait=yes
15168 else
15169   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
15170 $as_echo_n "checking for sigwait in -lpthread... " >&6; }
15171 if ${ac_cv_lib_pthread_sigwait+:} false; then :
15172   $as_echo_n "(cached) " >&6
15173 else
15174   ac_check_lib_save_LIBS=$LIBS
15175 LIBS="-lpthread  $LIBS"
15176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15177 /* end confdefs.h.  */
15178
15179 /* Override any GCC internal prototype to avoid an error.
15180    Use char because int might match the return type of a GCC
15181    builtin and then its argument prototype would still apply.  */
15182 #ifdef __cplusplus
15183 extern "C"
15184 #endif
15185 char sigwait ();
15186 int
15187 main ()
15188 {
15189 return sigwait ();
15190   ;
15191   return 0;
15192 }
15193 _ACEOF
15194 if ac_fn_c_try_link "$LINENO"; then :
15195   ac_cv_lib_pthread_sigwait=yes
15196 else
15197   ac_cv_lib_pthread_sigwait=no
15198 fi
15199 rm -f core conftest.err conftest.$ac_objext \
15200     conftest$ac_exeext conftest.$ac_ext
15201 LIBS=$ac_check_lib_save_LIBS
15202 fi
15203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
15204 $as_echo "$ac_cv_lib_pthread_sigwait" >&6; }
15205 if test "x$ac_cv_lib_pthread_sigwait" = xyes; then :
15206   have_sigwait=yes
15207 else
15208   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
15209 $as_echo_n "checking for _Psigwait in -lpthread... " >&6; }
15210 if ${ac_cv_lib_pthread__Psigwait+:} false; then :
15211   $as_echo_n "(cached) " >&6
15212 else
15213   ac_check_lib_save_LIBS=$LIBS
15214 LIBS="-lpthread  $LIBS"
15215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15216 /* end confdefs.h.  */
15217
15218 /* Override any GCC internal prototype to avoid an error.
15219    Use char because int might match the return type of a GCC
15220    builtin and then its argument prototype would still apply.  */
15221 #ifdef __cplusplus
15222 extern "C"
15223 #endif
15224 char _Psigwait ();
15225 int
15226 main ()
15227 {
15228 return _Psigwait ();
15229   ;
15230   return 0;
15231 }
15232 _ACEOF
15233 if ac_fn_c_try_link "$LINENO"; then :
15234   ac_cv_lib_pthread__Psigwait=yes
15235 else
15236   ac_cv_lib_pthread__Psigwait=no
15237 fi
15238 rm -f core conftest.err conftest.$ac_objext \
15239     conftest$ac_exeext conftest.$ac_ext
15240 LIBS=$ac_check_lib_save_LIBS
15241 fi
15242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
15243 $as_echo "$ac_cv_lib_pthread__Psigwait" >&6; }
15244 if test "x$ac_cv_lib_pthread__Psigwait" = xyes; then :
15245   have_sigwait=yes
15246 else
15247   have_sigwait=no
15248
15249 fi
15250
15251
15252 fi
15253
15254
15255 fi
15256
15257
15258 fi
15259
15260     case "$host:$have_sigwait" in
15261      *-freebsd*:no)
15262         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
15263 $as_echo_n "checking for sigwait in -lc_r... " >&6; }
15264 if ${ac_cv_lib_c_r_sigwait+:} false; then :
15265   $as_echo_n "(cached) " >&6
15266 else
15267   ac_check_lib_save_LIBS=$LIBS
15268 LIBS="-lc_r  $LIBS"
15269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15270 /* end confdefs.h.  */
15271
15272 /* Override any GCC internal prototype to avoid an error.
15273    Use char because int might match the return type of a GCC
15274    builtin and then its argument prototype would still apply.  */
15275 #ifdef __cplusplus
15276 extern "C"
15277 #endif
15278 char sigwait ();
15279 int
15280 main ()
15281 {
15282 return sigwait ();
15283   ;
15284   return 0;
15285 }
15286 _ACEOF
15287 if ac_fn_c_try_link "$LINENO"; then :
15288   ac_cv_lib_c_r_sigwait=yes
15289 else
15290   ac_cv_lib_c_r_sigwait=no
15291 fi
15292 rm -f core conftest.err conftest.$ac_objext \
15293     conftest$ac_exeext conftest.$ac_ext
15294 LIBS=$ac_check_lib_save_LIBS
15295 fi
15296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
15297 $as_echo "$ac_cv_lib_c_r_sigwait" >&6; }
15298 if test "x$ac_cv_lib_c_r_sigwait" = xyes; then :
15299   have_sigwait=yes
15300
15301 fi
15302
15303     esac
15304     case "$have_sigwait" in
15305      yes)
15306         ac_cv_func_sigwait=yes
15307
15308 $as_echo "#define HAVE_SIGWAIT 1" >>confdefs.h
15309
15310     esac
15311
15312     for ac_func in pthread_attr_getstacksize
15313 do :
15314   ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
15315 if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes; then :
15316   cat >>confdefs.h <<_ACEOF
15317 #define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
15318 _ACEOF
15319
15320 fi
15321 done
15322
15323     for ac_func in pthread_attr_setstacksize sysconf
15324 do :
15325   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15326 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15327 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15328   cat >>confdefs.h <<_ACEOF
15329 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15330 _ACEOF
15331
15332 fi
15333 done
15334
15335
15336     case "$host" in
15337      *-freebsd5.[012]|*-freebsd5.[012].*)
15338         ;;
15339      *-freebsd5.[3456789]|*-freebsd5.[3456789].*|*-freebsd6.*)
15340
15341 $as_echo "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
15342
15343         ;;
15344      *-bsdi3.*|*-bsdi4.0*)
15345
15346 $as_echo "#define NEED_PTHREAD_INIT 1" >>confdefs.h
15347
15348         ;;
15349      *-linux*)
15350
15351 $as_echo "#define HAVE_LINUXTHREADS 1" >>confdefs.h
15352
15353         ;;
15354      *-solaris*)
15355         $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
15356
15357         for ac_func in pthread_setconcurrency
15358 do :
15359   ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
15360 if test "x$ac_cv_func_pthread_setconcurrency" = xyes; then :
15361   cat >>confdefs.h <<_ACEOF
15362 #define HAVE_PTHREAD_SETCONCURRENCY 1
15363 _ACEOF
15364
15365 fi
15366 done
15367
15368         case "$ac_cv_func_pthread_setconcurrency" in
15369          yes)
15370
15371 $as_echo "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
15372
15373         esac
15374         ;;
15375      *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
15376
15377 $as_echo "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
15378
15379         ;;
15380     esac
15381     hack_shutup_pthreadonceinit=no
15382     case "$host" in
15383      *-aix5.[123].*)
15384         hack_shutup_pthreadonceinit=yes
15385         ;;
15386      *-solaris2.[89])
15387         hack_shutup_pthreadonceinit=yes
15388         ;;
15389      *-solaris2.1[0-9])
15390         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
15391 $as_echo_n "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
15392 if ${ntp_cv_braces_around_pthread_once_init+:} false; then :
15393   $as_echo_n "(cached) " >&6
15394 else
15395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15396 /* end confdefs.h.  */
15397
15398                         #include <pthread.h>
15399
15400 int
15401 main ()
15402 {
15403
15404                         static pthread_once_t once_test =
15405                                                 PTHREAD_ONCE_INIT;
15406
15407
15408   ;
15409   return 0;
15410 }
15411 _ACEOF
15412 if ac_fn_c_try_compile "$LINENO"; then :
15413   ntp_cv_braces_around_pthread_once_init=no
15414 else
15415   ntp_cv_braces_around_pthread_once_init=yes
15416
15417 fi
15418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15419
15420 fi
15421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
15422 $as_echo "$ntp_cv_braces_around_pthread_once_init" >&6; }
15423         case "$ntp_cv_braces_around_pthread_once_init" in
15424          yes)
15425             hack_shutup_pthreadonceinit=yes
15426         esac
15427         ;;
15428     esac
15429     case "$hack_shutup_pthreadonceinit" in
15430      yes)
15431
15432 $as_echo "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
15433
15434     esac
15435     LIBS="$saved_LIBS"
15436     { saved_LIBS=; unset saved_LIBS;}
15437     CFLAGS="$saved_CFLAGS"
15438     { saved_CFLAGS=; unset saved_CFLAGS;}
15439     ;;
15440  *)
15441     LIBISC_PTHREADS_NOTHREADS=nothreads
15442     ;;
15443 esac
15444
15445  if test "$have_pthreads" != "no"; then
15446   PTHREADS_TRUE=
15447   PTHREADS_FALSE='#'
15448 else
15449   PTHREADS_TRUE='#'
15450   PTHREADS_FALSE=
15451 fi
15452
15453
15454
15455
15456
15457
15458
15459 case "$hw_use_rpl_vsnprintf:$hw_cv_func_vsnprintf" in
15460  no:yes)
15461     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
15462 $as_echo_n "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
15463 if ${ntp_cv_vsnprintf_percent_m+:} false; then :
15464   $as_echo_n "(cached) " >&6
15465 else
15466   if test "$cross_compiling" = yes; then :
15467   ntp_cv_vsnprintf_percent_m=no
15468
15469 else
15470   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15471 /* end confdefs.h.  */
15472
15473                     #include <stdarg.h>
15474                     #include <errno.h>
15475                     #include <stdio.h>
15476                     #include <string.h>
15477
15478                     int call_vsnprintf(
15479                             char *      dst,
15480                             size_t      sz,
15481                             const char *fmt,
15482                             ...
15483                             );
15484
15485                     int call_vsnprintf(
15486                             char *      dst,
15487                             size_t      sz,
15488                             const char *fmt,
15489                             ...
15490                             )
15491                     {
15492                             va_list     ap;
15493                             int         rc;
15494
15495                             va_start(ap, fmt);
15496                             rc = vsnprintf(dst, sz, fmt, ap);
15497                             va_end(ap);
15498
15499                             return rc;
15500                     }
15501
15502 int
15503 main ()
15504 {
15505
15506                     char        sbuf[512];
15507                     char        pbuf[512];
15508                     int         slen;
15509
15510                     strcpy(sbuf, strerror(ENOENT));
15511                     errno = ENOENT;
15512                     slen = call_vsnprintf(pbuf, sizeof(pbuf), "%m",
15513                                           "wrong");
15514                     return strcmp(sbuf, pbuf);
15515
15516
15517   ;
15518   return 0;
15519 }
15520 _ACEOF
15521 if ac_fn_c_try_run "$LINENO"; then :
15522   ntp_cv_vsnprintf_percent_m=yes
15523 else
15524   ntp_cv_vsnprintf_percent_m=no
15525 fi
15526 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15527   conftest.$ac_objext conftest.beam conftest.$ac_ext
15528 fi
15529
15530
15531 fi
15532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
15533 $as_echo "$ntp_cv_vsnprintf_percent_m" >&6; }
15534     case "$ntp_cv_vsnprintf_percent_m" in
15535      yes)
15536
15537 $as_echo "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
15538
15539     esac
15540 esac
15541
15542 for ac_header in sys/clockctl.h
15543 do :
15544   ac_fn_c_check_header_mongrel "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
15545 if test "x$ac_cv_header_sys_clockctl_h" = xyes; then :
15546   cat >>confdefs.h <<_ACEOF
15547 #define HAVE_SYS_CLOCKCTL_H 1
15548 _ACEOF
15549
15550 fi
15551
15552 done
15553
15554
15555 # Check whether --enable-clockctl was given.
15556 if test "${enable_clockctl+set}" = set; then :
15557   enableval=$enable_clockctl; ntp_use_dev_clockctl=$enableval
15558 else
15559   ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h
15560
15561 fi
15562
15563
15564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
15565 $as_echo_n "checking if we should use /dev/clockctl... " >&6; }
15566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
15567 $as_echo "$ntp_use_dev_clockctl" >&6; }
15568
15569
15570 for ac_header in sys/capability.h sys/prctl.h
15571 do :
15572   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15573 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15574 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15575   cat >>confdefs.h <<_ACEOF
15576 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15577 _ACEOF
15578
15579 fi
15580
15581 done
15582
15583
15584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
15585 $as_echo_n "checking if we have linux capabilities (libcap)... " >&6; }
15586
15587 case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
15588  yesyes)
15589     case "$host" in
15590      mips-sgi-irix*)
15591         ntp_have_linuxcaps=no
15592         ;;
15593      *) ntp_have_linuxcaps=yes
15594         ;;
15595     esac
15596     ;;
15597  *)
15598     ntp_have_linuxcaps=no
15599     ;;
15600 esac
15601
15602 # Check whether --enable-linuxcaps was given.
15603 if test "${enable_linuxcaps+set}" = set; then :
15604   enableval=$enable_linuxcaps; ntp_have_linuxcaps=$enableval
15605
15606 fi
15607
15608
15609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
15610 $as_echo "$ntp_have_linuxcaps" >&6; }
15611
15612 case "$ntp_have_linuxcaps" in
15613  yes)
15614
15615 $as_echo "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
15616
15617     LIBS="$LIBS -lcap"
15618     ;;
15619 esac
15620
15621
15622 for ac_header in priv.h
15623 do :
15624   ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
15625 if test "x$ac_cv_header_priv_h" = xyes; then :
15626   cat >>confdefs.h <<_ACEOF
15627 #define HAVE_PRIV_H 1
15628 _ACEOF
15629
15630 fi
15631
15632 done
15633
15634
15635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
15636 $as_echo_n "checking if we have solaris privileges... " >&6; }
15637
15638 case "$ac_cv_header_priv_h" in
15639  yes)
15640     case "$host" in
15641      *-solaris*)
15642         ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
15643 if test "x$ac_cv_func_setppriv" = xyes; then :
15644   ntp_have_solarisprivs=yes
15645 else
15646   ntp_have_solarisprivs=no
15647
15648 fi
15649
15650         ;;
15651     esac
15652 esac
15653
15654 # Check whether --enable-solarisprivs was given.
15655 if test "${enable_solarisprivs+set}" = set; then :
15656   enableval=$enable_solarisprivs; ntp_have_solarisprivs=$enableval
15657
15658 fi
15659
15660
15661
15662 case "$ntp_have_solarisprivs" in
15663  yes)
15664
15665 $as_echo "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
15666
15667 esac
15668
15669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
15670 $as_echo "$ntp_have_solarisprivs" >&6; }
15671
15672 case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs" in
15673  *yes*)
15674
15675 $as_echo "#define HAVE_DROPROOT 1" >>confdefs.h
15676
15677 esac
15678
15679 case "$host" in
15680  *-*-darwin*)
15681     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
15682 $as_echo_n "checking for library containing res_9_init... " >&6; }
15683 if ${ac_cv_search_res_9_init+:} false; then :
15684   $as_echo_n "(cached) " >&6
15685 else
15686   ac_func_search_save_LIBS=$LIBS
15687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15688 /* end confdefs.h.  */
15689
15690 /* Override any GCC internal prototype to avoid an error.
15691    Use char because int might match the return type of a GCC
15692    builtin and then its argument prototype would still apply.  */
15693 #ifdef __cplusplus
15694 extern "C"
15695 #endif
15696 char res_9_init ();
15697 int
15698 main ()
15699 {
15700 return res_9_init ();
15701   ;
15702   return 0;
15703 }
15704 _ACEOF
15705 for ac_lib in '' resolv; do
15706   if test -z "$ac_lib"; then
15707     ac_res="none required"
15708   else
15709     ac_res=-l$ac_lib
15710     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15711   fi
15712   if ac_fn_c_try_link "$LINENO"; then :
15713   ac_cv_search_res_9_init=$ac_res
15714 fi
15715 rm -f core conftest.err conftest.$ac_objext \
15716     conftest$ac_exeext
15717   if ${ac_cv_search_res_9_init+:} false; then :
15718   break
15719 fi
15720 done
15721 if ${ac_cv_search_res_9_init+:} false; then :
15722
15723 else
15724   ac_cv_search_res_9_init=no
15725 fi
15726 rm conftest.$ac_ext
15727 LIBS=$ac_func_search_save_LIBS
15728 fi
15729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
15730 $as_echo "$ac_cv_search_res_9_init" >&6; }
15731 ac_res=$ac_cv_search_res_9_init
15732 if test "$ac_res" != no; then :
15733   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15734
15735 fi
15736
15737     ;;
15738  *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
15739 $as_echo_n "checking for library containing res_init... " >&6; }
15740 if ${ac_cv_search_res_init+:} false; then :
15741   $as_echo_n "(cached) " >&6
15742 else
15743   ac_func_search_save_LIBS=$LIBS
15744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15745 /* end confdefs.h.  */
15746
15747 /* Override any GCC internal prototype to avoid an error.
15748    Use char because int might match the return type of a GCC
15749    builtin and then its argument prototype would still apply.  */
15750 #ifdef __cplusplus
15751 extern "C"
15752 #endif
15753 char res_init ();
15754 int
15755 main ()
15756 {
15757 return res_init ();
15758   ;
15759   return 0;
15760 }
15761 _ACEOF
15762 for ac_lib in '' resolv; do
15763   if test -z "$ac_lib"; then
15764     ac_res="none required"
15765   else
15766     ac_res=-l$ac_lib
15767     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15768   fi
15769   if ac_fn_c_try_link "$LINENO"; then :
15770   ac_cv_search_res_init=$ac_res
15771 fi
15772 rm -f core conftest.err conftest.$ac_objext \
15773     conftest$ac_exeext
15774   if ${ac_cv_search_res_init+:} false; then :
15775   break
15776 fi
15777 done
15778 if ${ac_cv_search_res_init+:} false; then :
15779
15780 else
15781   ac_cv_search_res_init=no
15782 fi
15783 rm conftest.$ac_ext
15784 LIBS=$ac_func_search_save_LIBS
15785 fi
15786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
15787 $as_echo "$ac_cv_search_res_init" >&6; }
15788 ac_res=$ac_cv_search_res_init
15789 if test "$ac_res" != no; then :
15790   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15791
15792 fi
15793
15794     ;;
15795 esac
15796 for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
15797 do :
15798   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15799 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
15800 #  include <sys/types.h>
15801 #endif
15802 #ifdef HAVE_NETINET_IN_H
15803 #  include <netinet/in.h>   /* inet_ functions / structs */
15804 #endif
15805 #ifdef HAVE_ARPA_NAMESER_H
15806 #  include <arpa/nameser.h> /* DNS HEADER struct */
15807 #endif
15808 #ifdef HAVE_NETDB_H
15809 #  include <netdb.h>
15810 #endif
15811 "
15812 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15813   cat >>confdefs.h <<_ACEOF
15814 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15815 _ACEOF
15816
15817 fi
15818
15819 done
15820
15821
15822 #HMS: Why do we do this check so "early"?
15823 for ac_func in res_init
15824 do :
15825   ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
15826 if test "x$ac_cv_func_res_init" = xyes; then :
15827   cat >>confdefs.h <<_ACEOF
15828 #define HAVE_RES_INIT 1
15829 _ACEOF
15830
15831 else
15832   for ac_func in __res_init
15833 do :
15834   ac_fn_c_check_func "$LINENO" "__res_init" "ac_cv_func___res_init"
15835 if test "x$ac_cv_func___res_init" = xyes; then :
15836   cat >>confdefs.h <<_ACEOF
15837 #define HAVE___RES_INIT 1
15838 _ACEOF
15839
15840 fi
15841 done
15842
15843 fi
15844 done
15845
15846
15847 # We also need -lsocket, but we have tested for that already.
15848 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
15849 if test "x$ac_cv_func_inet_ntop" = xyes; then :
15850
15851 else
15852
15853 $as_echo "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
15854
15855 fi
15856
15857 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
15858 if test "x$ac_cv_func_inet_pton" = xyes; then :
15859
15860 else
15861
15862 $as_echo "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
15863
15864 fi
15865
15866
15867 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
15868 if test "x$ac_cv_type_uintptr_t" = xyes; then :
15869
15870 cat >>confdefs.h <<_ACEOF
15871 #define HAVE_UINTPTR_T 1
15872 _ACEOF
15873
15874
15875 fi
15876 ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" "$ac_includes_default"
15877 if test "x$ac_cv_type_int32" = xyes; then :
15878
15879 cat >>confdefs.h <<_ACEOF
15880 #define HAVE_INT32 1
15881 _ACEOF
15882
15883
15884 fi
15885 ac_fn_c_check_type "$LINENO" "u_int32" "ac_cv_type_u_int32" "$ac_includes_default"
15886 if test "x$ac_cv_type_u_int32" = xyes; then :
15887
15888 cat >>confdefs.h <<_ACEOF
15889 #define HAVE_U_INT32 1
15890 _ACEOF
15891
15892
15893 fi
15894
15895
15896
15897
15898 case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
15899  no::yes)
15900     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
15901 $as_echo_n "checking for int32 with DNS headers included... " >&6; }
15902 if ${ntp_cv_type_int32_with_dns+:} false; then :
15903   $as_echo_n "(cached) " >&6
15904 else
15905   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15906 /* end confdefs.h.  */
15907
15908                     #ifdef HAVE_ARPA_NAMESER_H
15909                     # include <arpa/nameser.h>
15910                     #endif
15911                     #include <resolv.h>
15912
15913 int
15914 main ()
15915 {
15916
15917                     size_t cb = sizeof(int32);
15918
15919
15920   ;
15921   return 0;
15922 }
15923 _ACEOF
15924 if ac_fn_c_try_compile "$LINENO"; then :
15925   ntp_cv_type_int32_with_dns=yes
15926 else
15927   ntp_cv_type_int32_with_dns=no
15928
15929 fi
15930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15931
15932 fi
15933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
15934 $as_echo "$ntp_cv_type_int32_with_dns" >&6; }
15935     case "$ntp_cv_type_int32_with_dns" in
15936      yes)
15937
15938 $as_echo "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
15939
15940     esac
15941 esac
15942
15943 case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
15944  no::yes)
15945     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
15946 $as_echo_n "checking for u_int32 with DNS headers included... " >&6; }
15947 if ${ntp_cv_type_u_int32_with_dns+:} false; then :
15948   $as_echo_n "(cached) " >&6
15949 else
15950   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15951 /* end confdefs.h.  */
15952
15953                     #ifdef HAVE_ARPA_NAMESER_H
15954                     # include <arpa/nameser.h>
15955                     #endif
15956                     #include <resolv.h>
15957
15958 int
15959 main ()
15960 {
15961
15962                     size_t cb = sizeof(u_int32);
15963
15964
15965   ;
15966   return 0;
15967 }
15968 _ACEOF
15969 if ac_fn_c_try_compile "$LINENO"; then :
15970   ntp_cv_type_u_int32_with_dns=yes
15971 else
15972   ntp_cv_type_u_int32_with_dns=no
15973
15974 fi
15975 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15976
15977 fi
15978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
15979 $as_echo "$ntp_cv_type_u_int32_with_dns" >&6; }
15980     case "$ntp_cv_type_u_int32_with_dns" in
15981      yes)
15982
15983 $as_echo "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
15984
15985     esac
15986 esac
15987
15988 for ac_header in sys/timepps.h
15989 do :
15990   ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
15991         #ifdef HAVE_SYS_TIME_H
15992         # include <sys/time.h>
15993         #endif
15994         #ifdef HAVE_ERRNO_H
15995         # include <errno.h>
15996         #endif
15997
15998
15999 "
16000 if test "x$ac_cv_header_sys_timepps_h" = xyes; then :
16001   cat >>confdefs.h <<_ACEOF
16002 #define HAVE_SYS_TIMEPPS_H 1
16003 _ACEOF
16004
16005 fi
16006
16007 done
16008
16009
16010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
16011 $as_echo_n "checking for struct timespec... " >&6; }
16012 if ${ntp_cv_struct_timespec+:} false; then :
16013   $as_echo_n "(cached) " >&6
16014 else
16015   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16016 /* end confdefs.h.  */
16017
16018                 #include <sys/time.h>
16019                 /* Under SunOS, timespec is in sys/timepps.h,
16020                    which needs errno.h and FRAC */
16021                 #ifdef HAVE_ERRNO_H
16022                 # include <errno.h>
16023                 #endif
16024                 #ifdef HAVE_SYS_TIMEPPS_H
16025                 # define FRAC 4294967296
16026                 # include <sys/timepps.h>
16027                 #endif
16028
16029 int
16030 main ()
16031 {
16032
16033                 struct timespec n;
16034
16035
16036   ;
16037   return 0;
16038 }
16039 _ACEOF
16040 if ac_fn_c_try_compile "$LINENO"; then :
16041   ntp_cv_struct_timespec=yes
16042 else
16043   ntp_cv_struct_timespec=no
16044
16045 fi
16046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16047
16048 fi
16049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_timespec" >&5
16050 $as_echo "$ntp_cv_struct_timespec" >&6; }
16051 case "$ntp_cv_struct_timespec" in
16052  yes)
16053
16054 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
16055
16056 esac
16057
16058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ntptimeval" >&5
16059 $as_echo_n "checking for struct ntptimeval... " >&6; }
16060 if ${ntp_cv_struct_ntptimeval+:} false; then :
16061   $as_echo_n "(cached) " >&6
16062 else
16063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16064 /* end confdefs.h.  */
16065
16066                 #include <sys/time.h>
16067                 #include <sys/timex.h>
16068
16069 int
16070 main ()
16071 {
16072
16073                 struct ntptimeval n;
16074
16075
16076   ;
16077   return 0;
16078 }
16079 _ACEOF
16080 if ac_fn_c_try_compile "$LINENO"; then :
16081   ntp_cv_struct_ntptimeval=yes
16082 else
16083   ntp_cv_struct_ntptimeval=no
16084
16085 fi
16086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16087
16088 fi
16089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ntptimeval" >&5
16090 $as_echo "$ntp_cv_struct_ntptimeval" >&6; }
16091 case "$ntp_cv_struct_ntptimeval" in
16092  yes)
16093
16094 $as_echo "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
16095
16096 esac
16097
16098 for ac_header in md5.h
16099 do :
16100   ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
16101         #ifdef HAVE_SYS_TYPES_H
16102         # include <sys/types.h>
16103         #endif
16104
16105
16106 "
16107 if test "x$ac_cv_header_md5_h" = xyes; then :
16108   cat >>confdefs.h <<_ACEOF
16109 #define HAVE_MD5_H 1
16110 _ACEOF
16111
16112 fi
16113
16114 done
16115
16116
16117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
16118 $as_echo_n "checking for library containing MD5Init... " >&6; }
16119 if ${ac_cv_search_MD5Init+:} false; then :
16120   $as_echo_n "(cached) " >&6
16121 else
16122   ac_func_search_save_LIBS=$LIBS
16123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16124 /* end confdefs.h.  */
16125
16126 /* Override any GCC internal prototype to avoid an error.
16127    Use char because int might match the return type of a GCC
16128    builtin and then its argument prototype would still apply.  */
16129 #ifdef __cplusplus
16130 extern "C"
16131 #endif
16132 char MD5Init ();
16133 int
16134 main ()
16135 {
16136 return MD5Init ();
16137   ;
16138   return 0;
16139 }
16140 _ACEOF
16141 for ac_lib in '' md5 md; do
16142   if test -z "$ac_lib"; then
16143     ac_res="none required"
16144   else
16145     ac_res=-l$ac_lib
16146     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16147   fi
16148   if ac_fn_c_try_link "$LINENO"; then :
16149   ac_cv_search_MD5Init=$ac_res
16150 fi
16151 rm -f core conftest.err conftest.$ac_objext \
16152     conftest$ac_exeext
16153   if ${ac_cv_search_MD5Init+:} false; then :
16154   break
16155 fi
16156 done
16157 if ${ac_cv_search_MD5Init+:} false; then :
16158
16159 else
16160   ac_cv_search_MD5Init=no
16161 fi
16162 rm conftest.$ac_ext
16163 LIBS=$ac_func_search_save_LIBS
16164 fi
16165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
16166 $as_echo "$ac_cv_search_MD5Init" >&6; }
16167 ac_res=$ac_cv_search_MD5Init
16168 if test "$ac_res" != no; then :
16169   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16170
16171 fi
16172
16173 for ac_func in MD5Init sysconf getdtablesize sigaction sigset sigvec
16174 do :
16175   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16176 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16177 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16178   cat >>confdefs.h <<_ACEOF
16179 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16180 _ACEOF
16181
16182 fi
16183 done
16184
16185
16186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
16187 $as_echo_n "checking for SIGIO... " >&6; }
16188 if ${ntp_cv_hdr_def_sigio+:} false; then :
16189   $as_echo_n "(cached) " >&6
16190 else
16191   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16192 /* end confdefs.h.  */
16193
16194             #include <signal.h>
16195
16196             #ifndef SIGIO
16197             # error
16198             #endif
16199
16200 _ACEOF
16201 if ac_fn_c_try_cpp "$LINENO"; then :
16202   ntp_cv_hdr_def_sigio=yes
16203 else
16204   ntp_cv_hdr_def_sigio=no
16205
16206 fi
16207 rm -f conftest.err conftest.i conftest.$ac_ext
16208
16209 fi
16210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
16211 $as_echo "$ntp_cv_hdr_def_sigio" >&6; }
16212
16213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
16214 $as_echo_n "checking if we want to use SIGIO... " >&6; }
16215 ans=no
16216 case "$ntp_cv_hdr_def_sigio" in
16217  yes)
16218     ans=yes
16219     case "$host" in
16220      alpha*-dec-osf4*|alpha*-dec-osf5*)
16221         ans=no
16222         ;;
16223      *-convex-*)
16224         ans=no
16225         ;;
16226      *-dec-*)
16227         ans=no
16228         ;;
16229      *-pc-cygwin*)
16230         ans=no
16231         ;;
16232      *-sni-sysv*)
16233         ans=no
16234         ;;
16235      *-stratus-vos)
16236         ans=no
16237         ;;
16238      *-univel-sysv*)
16239         ans=no
16240         ;;
16241      *-*-irix6*)
16242         ans=no
16243         ;;
16244      *-*-freebsd*)
16245         ans=no
16246         ;;
16247      *-*-*linux*)
16248         ans=no
16249         ;;
16250      *-*-unicosmp*)
16251         ans=no
16252         ;;
16253      *-*-kfreebsd*)
16254         ans=no
16255         ;;
16256      m68k-*-mint*)
16257         ans=no
16258         ;;
16259     esac
16260     ;;
16261 esac
16262 case "$ans" in
16263  yes)
16264
16265 $as_echo "#define HAVE_SIGNALED_IO 1" >>confdefs.h
16266
16267 esac
16268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16269 $as_echo "$ans" >&6; }
16270
16271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
16272 $as_echo_n "checking for SIGPOLL... " >&6; }
16273 if ${ntp_cv_hdr_def_sigpoll+:} false; then :
16274   $as_echo_n "(cached) " >&6
16275 else
16276   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16277 /* end confdefs.h.  */
16278
16279             #include <signal.h>
16280
16281             #ifndef SIGPOLL
16282             # error
16283             #endif
16284
16285 _ACEOF
16286 if ac_fn_c_try_cpp "$LINENO"; then :
16287   ntp_cv_hdr_def_sigpoll=yes
16288 else
16289   ntp_cv_hdr_def_sigpoll=no
16290
16291 fi
16292 rm -f conftest.err conftest.i conftest.$ac_ext
16293
16294 fi
16295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
16296 $as_echo "$ntp_cv_hdr_def_sigpoll" >&6; }
16297
16298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
16299 $as_echo_n "checking if we can use SIGPOLL for UDP I/O... " >&6; }
16300 ans=no
16301 case "$ntp_cv_hdr_def_sigpoll" in
16302  yes)
16303     case "$host" in
16304      mips-sgi-irix*)
16305         ans=no
16306         ;;
16307      vax-dec-bsd)
16308         ans=no
16309         ;;
16310      *-pc-cygwin*)
16311         ans=no
16312         ;;
16313      *-sni-sysv*)
16314         ans=no
16315         ;;
16316      *-stratus-vos)
16317         ans=no
16318         ;;
16319      *-*-aix[4-9]*)
16320         # XXX Only verified thru AIX6
16321         ans=no
16322         ;;
16323      *-*-hpux*)
16324         ans=no
16325         ;;
16326      *-*-*linux*)
16327         ans=no
16328         ;;
16329      *-*-osf*)
16330         ans=no
16331         ;;
16332      *-*-qnx*)
16333         ans=no
16334         ;;
16335      *-*-sunos*)
16336         ans=no
16337         ;;
16338      *-*-solaris*)
16339         ans=no
16340         ;;
16341      *-*-ultrix*)
16342         ans=no
16343         ;;
16344      *-*-unicosmp*)
16345         ans=no
16346         ;;
16347      *-*-kfreebsd*)
16348         ans=no
16349         ;;
16350      *) ans=yes
16351         ;;
16352     esac
16353     ;;
16354 esac
16355 case "$ans" in
16356  yes)
16357
16358 $as_echo "#define USE_UDP_SIGPOLL 1" >>confdefs.h
16359
16360 esac
16361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16362 $as_echo "$ans" >&6; }
16363
16364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
16365 $as_echo_n "checking if we can use SIGPOLL for TTY I/O... " >&6; }
16366 ans=no
16367 case "$ntp_cv_hdr_def_sigpoll" in
16368  yes)
16369     case "$host" in
16370      mips-sgi-irix*)
16371         ans=no
16372         ;;
16373      vax-dec-bsd)
16374         ans=no
16375         ;;
16376      *-pc-cygwin*)
16377         ans=no
16378         ;;
16379      *-sni-sysv*)
16380         ans=no
16381         ;;
16382      *-stratus-vos)
16383         ans=no
16384         ;;
16385      *-*-aix[4-9]*)
16386         # XXX Only verified thru AIX6
16387         ans=no
16388         ;;
16389      *-*-hpux*)
16390         ans=no
16391         ;;
16392      *-*-*linux*)
16393         ans=no
16394         ;;
16395      *-*-osf*)
16396         ans=no
16397         ;;
16398      *-*-sunos*)
16399         ans=no
16400         ;;
16401      *-*-ultrix*)
16402         ans=no
16403         ;;
16404      *-*-qnx*)
16405         ans=no
16406         ;;
16407      *-*-unicosmp*)
16408         ans=no
16409         ;;
16410      *-*-kfreebsd*)
16411         ans=no
16412         ;;
16413      *) ans=yes
16414         ;;
16415     esac
16416     ;;
16417 esac
16418 case "$ans" in
16419  yes)
16420
16421 $as_echo "#define USE_TTY_SIGPOLL 1" >>confdefs.h
16422
16423 esac
16424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16425 $as_echo "$ans" >&6; }
16426
16427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
16428 $as_echo_n "checking number of arguments to gettimeofday()... " >&6; }
16429 if ${ntp_cv_func_Xettimeofday_nargs+:} false; then :
16430   $as_echo_n "(cached) " >&6
16431 else
16432   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16433 /* end confdefs.h.  */
16434
16435                 #include <sys/time.h>
16436
16437 int
16438 main ()
16439 {
16440
16441                 gettimeofday(0, 0);
16442                 settimeofday(0, 0);
16443
16444
16445   ;
16446   return 0;
16447 }
16448 _ACEOF
16449 if ac_fn_c_try_compile "$LINENO"; then :
16450   ntp_cv_func_Xettimeofday_nargs=2
16451 else
16452   ntp_cv_func_Xettimeofday_nargs=1
16453
16454 fi
16455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16456
16457 fi
16458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
16459 $as_echo "$ntp_cv_func_Xettimeofday_nargs" >&6; }
16460 case "$ntp_cv_func_Xettimeofday_nargs" in
16461  1)
16462
16463 $as_echo "#define SYSV_TIMEOFDAY 1" >>confdefs.h
16464
16465 esac
16466
16467 for ac_func in settimeofday
16468 do :
16469   ac_fn_c_check_func "$LINENO" "settimeofday" "ac_cv_func_settimeofday"
16470 if test "x$ac_cv_func_settimeofday" = xyes; then :
16471   cat >>confdefs.h <<_ACEOF
16472 #define HAVE_SETTIMEOFDAY 1
16473 _ACEOF
16474
16475 else
16476
16477     case "$host" in
16478      *-*-mpeix*) ac_cv_func_settimeofday=yes
16479     esac
16480
16481 fi
16482 done
16483
16484
16485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
16486 $as_echo_n "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
16487 ntp_warning='GRONK'
16488 ans=none
16489 case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
16490  yes*)
16491     ntp_warning=''
16492     ans='clock_settime()'
16493     ;;
16494  noyes*)
16495     ntp_warning='But clock_settime() would be better (if we had it)'
16496     ans='settimeofday()'
16497     ;;
16498  nonoyes)
16499     ntp_warning='Which is the worst of the three'
16500     ans='stime()'
16501     ;;
16502  *)
16503     case "$build" in
16504      $host)
16505         ntp_warning='Which leaves us with nothing to use!'
16506     esac
16507 esac
16508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16509 $as_echo "$ans" >&6; }
16510 case "$ntp_warning" in
16511  '')
16512     ;;
16513  *)
16514     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
16515 $as_echo "$as_me: WARNING: *** $ntp_warning ***" >&2;}
16516     ;;
16517 esac
16518
16519
16520 LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
16521 LIBS=$__LIBS
16522 { __LIBS=; unset __LIBS;}
16523
16524
16525
16526 # Check whether --enable-shared was given.
16527 if test "${enable_shared+set}" = set; then :
16528   enableval=$enable_shared; p=${PACKAGE-default}
16529     case $enableval in
16530     yes) enable_shared=yes ;;
16531     no) enable_shared=no ;;
16532     *)
16533       enable_shared=no
16534       # Look at the argument we got.  We use all the common list separators.
16535       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
16536       for pkg in $enableval; do
16537         IFS="$lt_save_ifs"
16538         if test "X$pkg" = "X$p"; then
16539           enable_shared=yes
16540         fi
16541       done
16542       IFS="$lt_save_ifs"
16543       ;;
16544     esac
16545 else
16546   enable_shared=no
16547 fi
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557 case `pwd` in
16558   *\ * | *\     *)
16559     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
16560 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
16561 esac
16562
16563
16564
16565 macro_version='2.4.2'
16566 macro_revision='1.3337'
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580 ltmain="$ac_aux_dir/ltmain.sh"
16581
16582 # Backslashify metacharacters that are still active within
16583 # double-quoted strings.
16584 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
16585
16586 # Same as above, but do not quote variable references.
16587 double_quote_subst='s/\(["`\\]\)/\\\1/g'
16588
16589 # Sed substitution to delay expansion of an escaped shell variable in a
16590 # double_quote_subst'ed string.
16591 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
16592
16593 # Sed substitution to delay expansion of an escaped single quote.
16594 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
16595
16596 # Sed substitution to avoid accidental globbing in evaled expressions
16597 no_glob_subst='s/\*/\\\*/g'
16598
16599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
16600 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
16601 if ${lt_cv_path_NM+:} false; then :
16602   $as_echo_n "(cached) " >&6
16603 else
16604   if test -n "$NM"; then
16605   # Let the user override the test.
16606   lt_cv_path_NM="$NM"
16607 else
16608   lt_nm_to_check="${ac_tool_prefix}nm"
16609   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
16610     lt_nm_to_check="$lt_nm_to_check nm"
16611   fi
16612   for lt_tmp_nm in $lt_nm_to_check; do
16613     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
16614     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
16615       IFS="$lt_save_ifs"
16616       test -z "$ac_dir" && ac_dir=.
16617       tmp_nm="$ac_dir/$lt_tmp_nm"
16618       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
16619         # Check to see if the nm accepts a BSD-compat flag.
16620         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
16621         #   nm: unknown option "B" ignored
16622         # Tru64's nm complains that /dev/null is an invalid object file
16623         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
16624         */dev/null* | *'Invalid file or object type'*)
16625           lt_cv_path_NM="$tmp_nm -B"
16626           break
16627           ;;
16628         *)
16629           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
16630           */dev/null*)
16631             lt_cv_path_NM="$tmp_nm -p"
16632             break
16633             ;;
16634           *)
16635             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
16636             continue # so that we can try to find one that supports BSD flags
16637             ;;
16638           esac
16639           ;;
16640         esac
16641       fi
16642     done
16643     IFS="$lt_save_ifs"
16644   done
16645   : ${lt_cv_path_NM=no}
16646 fi
16647 fi
16648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
16649 $as_echo "$lt_cv_path_NM" >&6; }
16650 if test "$lt_cv_path_NM" != "no"; then
16651   NM="$lt_cv_path_NM"
16652 else
16653   # Didn't find any BSD compatible name lister, look for dumpbin.
16654   if test -n "$DUMPBIN"; then :
16655     # Let the user override the test.
16656   else
16657     if test -n "$ac_tool_prefix"; then
16658   for ac_prog in dumpbin "link -dump"
16659   do
16660     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16661 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16663 $as_echo_n "checking for $ac_word... " >&6; }
16664 if ${ac_cv_prog_DUMPBIN+:} false; then :
16665   $as_echo_n "(cached) " >&6
16666 else
16667   if test -n "$DUMPBIN"; then
16668   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
16669 else
16670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16671 for as_dir in $PATH
16672 do
16673   IFS=$as_save_IFS
16674   test -z "$as_dir" && as_dir=.
16675     for ac_exec_ext in '' $ac_executable_extensions; do
16676   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16677     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
16678     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16679     break 2
16680   fi
16681 done
16682   done
16683 IFS=$as_save_IFS
16684
16685 fi
16686 fi
16687 DUMPBIN=$ac_cv_prog_DUMPBIN
16688 if test -n "$DUMPBIN"; then
16689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
16690 $as_echo "$DUMPBIN" >&6; }
16691 else
16692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16693 $as_echo "no" >&6; }
16694 fi
16695
16696
16697     test -n "$DUMPBIN" && break
16698   done
16699 fi
16700 if test -z "$DUMPBIN"; then
16701   ac_ct_DUMPBIN=$DUMPBIN
16702   for ac_prog in dumpbin "link -dump"
16703 do
16704   # Extract the first word of "$ac_prog", so it can be a program name with args.
16705 set dummy $ac_prog; ac_word=$2
16706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16707 $as_echo_n "checking for $ac_word... " >&6; }
16708 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
16709   $as_echo_n "(cached) " >&6
16710 else
16711   if test -n "$ac_ct_DUMPBIN"; then
16712   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
16713 else
16714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16715 for as_dir in $PATH
16716 do
16717   IFS=$as_save_IFS
16718   test -z "$as_dir" && as_dir=.
16719     for ac_exec_ext in '' $ac_executable_extensions; do
16720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16721     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
16722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16723     break 2
16724   fi
16725 done
16726   done
16727 IFS=$as_save_IFS
16728
16729 fi
16730 fi
16731 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
16732 if test -n "$ac_ct_DUMPBIN"; then
16733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
16734 $as_echo "$ac_ct_DUMPBIN" >&6; }
16735 else
16736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16737 $as_echo "no" >&6; }
16738 fi
16739
16740
16741   test -n "$ac_ct_DUMPBIN" && break
16742 done
16743
16744   if test "x$ac_ct_DUMPBIN" = x; then
16745     DUMPBIN=":"
16746   else
16747     case $cross_compiling:$ac_tool_warned in
16748 yes:)
16749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16750 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16751 ac_tool_warned=yes ;;
16752 esac
16753     DUMPBIN=$ac_ct_DUMPBIN
16754   fi
16755 fi
16756
16757     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
16758     *COFF*)
16759       DUMPBIN="$DUMPBIN -symbols"
16760       ;;
16761     *)
16762       DUMPBIN=:
16763       ;;
16764     esac
16765   fi
16766
16767   if test "$DUMPBIN" != ":"; then
16768     NM="$DUMPBIN"
16769   fi
16770 fi
16771 test -z "$NM" && NM=nm
16772
16773
16774
16775
16776
16777
16778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
16779 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
16780 if ${lt_cv_nm_interface+:} false; then :
16781   $as_echo_n "(cached) " >&6
16782 else
16783   lt_cv_nm_interface="BSD nm"
16784   echo "int some_variable = 0;" > conftest.$ac_ext
16785   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
16786   (eval "$ac_compile" 2>conftest.err)
16787   cat conftest.err >&5
16788   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
16789   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
16790   cat conftest.err >&5
16791   (eval echo "\"\$as_me:$LINENO: output\"" >&5)
16792   cat conftest.out >&5
16793   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
16794     lt_cv_nm_interface="MS dumpbin"
16795   fi
16796   rm -f conftest*
16797 fi
16798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
16799 $as_echo "$lt_cv_nm_interface" >&6; }
16800
16801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
16802 $as_echo_n "checking whether ln -s works... " >&6; }
16803 LN_S=$as_ln_s
16804 if test "$LN_S" = "ln -s"; then
16805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16806 $as_echo "yes" >&6; }
16807 else
16808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
16809 $as_echo "no, using $LN_S" >&6; }
16810 fi
16811
16812 # find the maximum length of command line arguments
16813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
16814 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
16815 if ${lt_cv_sys_max_cmd_len+:} false; then :
16816   $as_echo_n "(cached) " >&6
16817 else
16818     i=0
16819   teststring="ABCD"
16820
16821   case $build_os in
16822   msdosdjgpp*)
16823     # On DJGPP, this test can blow up pretty badly due to problems in libc
16824     # (any single argument exceeding 2000 bytes causes a buffer overrun
16825     # during glob expansion).  Even if it were fixed, the result of this
16826     # check would be larger than it should be.
16827     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
16828     ;;
16829
16830   gnu*)
16831     # Under GNU Hurd, this test is not required because there is
16832     # no limit to the length of command line arguments.
16833     # Libtool will interpret -1 as no limit whatsoever
16834     lt_cv_sys_max_cmd_len=-1;
16835     ;;
16836
16837   cygwin* | mingw* | cegcc*)
16838     # On Win9x/ME, this test blows up -- it succeeds, but takes
16839     # about 5 minutes as the teststring grows exponentially.
16840     # Worse, since 9x/ME are not pre-emptively multitasking,
16841     # you end up with a "frozen" computer, even though with patience
16842     # the test eventually succeeds (with a max line length of 256k).
16843     # Instead, let's just punt: use the minimum linelength reported by
16844     # all of the supported platforms: 8192 (on NT/2K/XP).
16845     lt_cv_sys_max_cmd_len=8192;
16846     ;;
16847
16848   mint*)
16849     # On MiNT this can take a long time and run out of memory.
16850     lt_cv_sys_max_cmd_len=8192;
16851     ;;
16852
16853   amigaos*)
16854     # On AmigaOS with pdksh, this test takes hours, literally.
16855     # So we just punt and use a minimum line length of 8192.
16856     lt_cv_sys_max_cmd_len=8192;
16857     ;;
16858
16859   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
16860     # This has been around since 386BSD, at least.  Likely further.
16861     if test -x /sbin/sysctl; then
16862       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
16863     elif test -x /usr/sbin/sysctl; then
16864       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
16865     else
16866       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
16867     fi
16868     # And add a safety zone
16869     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
16870     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
16871     ;;
16872
16873   interix*)
16874     # We know the value 262144 and hardcode it with a safety zone (like BSD)
16875     lt_cv_sys_max_cmd_len=196608
16876     ;;
16877
16878   osf*)
16879     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
16880     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
16881     # nice to cause kernel panics so lets avoid the loop below.
16882     # First set a reasonable default.
16883     lt_cv_sys_max_cmd_len=16384
16884     #
16885     if test -x /sbin/sysconfig; then
16886       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
16887         *1*) lt_cv_sys_max_cmd_len=-1 ;;
16888       esac
16889     fi
16890     ;;
16891   sco3.2v5*)
16892     lt_cv_sys_max_cmd_len=102400
16893     ;;
16894   sysv5* | sco5v6* | sysv4.2uw2*)
16895     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
16896     if test -n "$kargmax"; then
16897       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
16898     else
16899       lt_cv_sys_max_cmd_len=32768
16900     fi
16901     ;;
16902   *)
16903     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
16904     if test -n "$lt_cv_sys_max_cmd_len"; then
16905       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
16906       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
16907     else
16908       # Make teststring a little bigger before we do anything with it.
16909       # a 1K string should be a reasonable start.
16910       for i in 1 2 3 4 5 6 7 8 ; do
16911         teststring=$teststring$teststring
16912       done
16913       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
16914       # If test is not a shell built-in, we'll probably end up computing a
16915       # maximum length that is only half of the actual maximum length, but
16916       # we can't tell.
16917       while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
16918                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
16919               test $i != 17 # 1/2 MB should be enough
16920       do
16921         i=`expr $i + 1`
16922         teststring=$teststring$teststring
16923       done
16924       # Only check the string length outside the loop.
16925       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
16926       teststring=
16927       # Add a significant safety factor because C++ compilers can tack on
16928       # massive amounts of additional arguments before passing them to the
16929       # linker.  It appears as though 1/2 is a usable value.
16930       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
16931     fi
16932     ;;
16933   esac
16934
16935 fi
16936
16937 if test -n $lt_cv_sys_max_cmd_len ; then
16938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
16939 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
16940 else
16941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
16942 $as_echo "none" >&6; }
16943 fi
16944 max_cmd_len=$lt_cv_sys_max_cmd_len
16945
16946
16947
16948
16949
16950
16951 : ${CP="cp -f"}
16952 : ${MV="mv -f"}
16953 : ${RM="rm -f"}
16954
16955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
16956 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
16957 # Try some XSI features
16958 xsi_shell=no
16959 ( _lt_dummy="a/b/c"
16960   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
16961       = c,a/b,b/c, \
16962     && eval 'test $(( 1 + 1 )) -eq 2 \
16963     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
16964   && xsi_shell=yes
16965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
16966 $as_echo "$xsi_shell" >&6; }
16967
16968
16969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
16970 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
16971 lt_shell_append=no
16972 ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
16973     >/dev/null 2>&1 \
16974   && lt_shell_append=yes
16975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
16976 $as_echo "$lt_shell_append" >&6; }
16977
16978
16979 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
16980   lt_unset=unset
16981 else
16982   lt_unset=false
16983 fi
16984
16985
16986
16987
16988
16989 # test EBCDIC or ASCII
16990 case `echo X|tr X '\101'` in
16991  A) # ASCII based system
16992     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
16993   lt_SP2NL='tr \040 \012'
16994   lt_NL2SP='tr \015\012 \040\040'
16995   ;;
16996  *) # EBCDIC based system
16997   lt_SP2NL='tr \100 \n'
16998   lt_NL2SP='tr \r\n \100\100'
16999   ;;
17000 esac
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
17011 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
17012 if ${lt_cv_to_host_file_cmd+:} false; then :
17013   $as_echo_n "(cached) " >&6
17014 else
17015   case $host in
17016   *-*-mingw* )
17017     case $build in
17018       *-*-mingw* ) # actually msys
17019         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
17020         ;;
17021       *-*-cygwin* )
17022         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
17023         ;;
17024       * ) # otherwise, assume *nix
17025         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
17026         ;;
17027     esac
17028     ;;
17029   *-*-cygwin* )
17030     case $build in
17031       *-*-mingw* ) # actually msys
17032         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
17033         ;;
17034       *-*-cygwin* )
17035         lt_cv_to_host_file_cmd=func_convert_file_noop
17036         ;;
17037       * ) # otherwise, assume *nix
17038         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
17039         ;;
17040     esac
17041     ;;
17042   * ) # unhandled hosts (and "normal" native builds)
17043     lt_cv_to_host_file_cmd=func_convert_file_noop
17044     ;;
17045 esac
17046
17047 fi
17048
17049 to_host_file_cmd=$lt_cv_to_host_file_cmd
17050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
17051 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
17052
17053
17054
17055
17056
17057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
17058 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
17059 if ${lt_cv_to_tool_file_cmd+:} false; then :
17060   $as_echo_n "(cached) " >&6
17061 else
17062   #assume ordinary cross tools, or native build.
17063 lt_cv_to_tool_file_cmd=func_convert_file_noop
17064 case $host in
17065   *-*-mingw* )
17066     case $build in
17067       *-*-mingw* ) # actually msys
17068         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
17069         ;;
17070     esac
17071     ;;
17072 esac
17073
17074 fi
17075
17076 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
17077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
17078 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
17079
17080
17081
17082
17083
17084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
17085 $as_echo_n "checking for $LD option to reload object files... " >&6; }
17086 if ${lt_cv_ld_reload_flag+:} false; then :
17087   $as_echo_n "(cached) " >&6
17088 else
17089   lt_cv_ld_reload_flag='-r'
17090 fi
17091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
17092 $as_echo "$lt_cv_ld_reload_flag" >&6; }
17093 reload_flag=$lt_cv_ld_reload_flag
17094 case $reload_flag in
17095 "" | " "*) ;;
17096 *) reload_flag=" $reload_flag" ;;
17097 esac
17098 reload_cmds='$LD$reload_flag -o $output$reload_objs'
17099 case $host_os in
17100   cygwin* | mingw* | pw32* | cegcc*)
17101     if test "$GCC" != yes; then
17102       reload_cmds=false
17103     fi
17104     ;;
17105   darwin*)
17106     if test "$GCC" = yes; then
17107       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
17108     else
17109       reload_cmds='$LD$reload_flag -o $output$reload_objs'
17110     fi
17111     ;;
17112 esac
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122 if test -n "$ac_tool_prefix"; then
17123   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
17124 set dummy ${ac_tool_prefix}objdump; ac_word=$2
17125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17126 $as_echo_n "checking for $ac_word... " >&6; }
17127 if ${ac_cv_prog_OBJDUMP+:} false; then :
17128   $as_echo_n "(cached) " >&6
17129 else
17130   if test -n "$OBJDUMP"; then
17131   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
17132 else
17133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17134 for as_dir in $PATH
17135 do
17136   IFS=$as_save_IFS
17137   test -z "$as_dir" && as_dir=.
17138     for ac_exec_ext in '' $ac_executable_extensions; do
17139   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17140     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
17141     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17142     break 2
17143   fi
17144 done
17145   done
17146 IFS=$as_save_IFS
17147
17148 fi
17149 fi
17150 OBJDUMP=$ac_cv_prog_OBJDUMP
17151 if test -n "$OBJDUMP"; then
17152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
17153 $as_echo "$OBJDUMP" >&6; }
17154 else
17155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17156 $as_echo "no" >&6; }
17157 fi
17158
17159
17160 fi
17161 if test -z "$ac_cv_prog_OBJDUMP"; then
17162   ac_ct_OBJDUMP=$OBJDUMP
17163   # Extract the first word of "objdump", so it can be a program name with args.
17164 set dummy objdump; ac_word=$2
17165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17166 $as_echo_n "checking for $ac_word... " >&6; }
17167 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
17168   $as_echo_n "(cached) " >&6
17169 else
17170   if test -n "$ac_ct_OBJDUMP"; then
17171   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
17172 else
17173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17174 for as_dir in $PATH
17175 do
17176   IFS=$as_save_IFS
17177   test -z "$as_dir" && as_dir=.
17178     for ac_exec_ext in '' $ac_executable_extensions; do
17179   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17180     ac_cv_prog_ac_ct_OBJDUMP="objdump"
17181     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17182     break 2
17183   fi
17184 done
17185   done
17186 IFS=$as_save_IFS
17187
17188 fi
17189 fi
17190 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
17191 if test -n "$ac_ct_OBJDUMP"; then
17192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
17193 $as_echo "$ac_ct_OBJDUMP" >&6; }
17194 else
17195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17196 $as_echo "no" >&6; }
17197 fi
17198
17199   if test "x$ac_ct_OBJDUMP" = x; then
17200     OBJDUMP="false"
17201   else
17202     case $cross_compiling:$ac_tool_warned in
17203 yes:)
17204 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17205 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17206 ac_tool_warned=yes ;;
17207 esac
17208     OBJDUMP=$ac_ct_OBJDUMP
17209   fi
17210 else
17211   OBJDUMP="$ac_cv_prog_OBJDUMP"
17212 fi
17213
17214 test -z "$OBJDUMP" && OBJDUMP=objdump
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
17225 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
17226 if ${lt_cv_deplibs_check_method+:} false; then :
17227   $as_echo_n "(cached) " >&6
17228 else
17229   lt_cv_file_magic_cmd='$MAGIC_CMD'
17230 lt_cv_file_magic_test_file=
17231 lt_cv_deplibs_check_method='unknown'
17232 # Need to set the preceding variable on all platforms that support
17233 # interlibrary dependencies.
17234 # 'none' -- dependencies not supported.
17235 # `unknown' -- same as none, but documents that we really don't know.
17236 # 'pass_all' -- all dependencies passed with no checks.
17237 # 'test_compile' -- check by making test program.
17238 # 'file_magic [[regex]]' -- check by looking for files in library path
17239 # which responds to the $file_magic_cmd with a given extended regex.
17240 # If you have `file' or equivalent on your system and you're not sure
17241 # whether `pass_all' will *always* work, you probably want this one.
17242
17243 case $host_os in
17244 aix[4-9]*)
17245   lt_cv_deplibs_check_method=pass_all
17246   ;;
17247
17248 beos*)
17249   lt_cv_deplibs_check_method=pass_all
17250   ;;
17251
17252 bsdi[45]*)
17253   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
17254   lt_cv_file_magic_cmd='/usr/bin/file -L'
17255   lt_cv_file_magic_test_file=/shlib/libc.so
17256   ;;
17257
17258 cygwin*)
17259   # func_win32_libid is a shell function defined in ltmain.sh
17260   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
17261   lt_cv_file_magic_cmd='func_win32_libid'
17262   ;;
17263
17264 mingw* | pw32*)
17265   # Base MSYS/MinGW do not provide the 'file' command needed by
17266   # func_win32_libid shell function, so use a weaker test based on 'objdump',
17267   # unless we find 'file', for example because we are cross-compiling.
17268   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
17269   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
17270     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
17271     lt_cv_file_magic_cmd='func_win32_libid'
17272   else
17273     # Keep this pattern in sync with the one in func_win32_libid.
17274     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
17275     lt_cv_file_magic_cmd='$OBJDUMP -f'
17276   fi
17277   ;;
17278
17279 cegcc*)
17280   # use the weaker test based on 'objdump'. See mingw*.
17281   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
17282   lt_cv_file_magic_cmd='$OBJDUMP -f'
17283   ;;
17284
17285 darwin* | rhapsody*)
17286   lt_cv_deplibs_check_method=pass_all
17287   ;;
17288
17289 freebsd* | dragonfly*)
17290   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
17291     case $host_cpu in
17292     i*86 )
17293       # Not sure whether the presence of OpenBSD here was a mistake.
17294       # Let's accept both of them until this is cleared up.
17295       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
17296       lt_cv_file_magic_cmd=/usr/bin/file
17297       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
17298       ;;
17299     esac
17300   else
17301     lt_cv_deplibs_check_method=pass_all
17302   fi
17303   ;;
17304
17305 gnu*)
17306   lt_cv_deplibs_check_method=pass_all
17307   ;;
17308
17309 haiku*)
17310   lt_cv_deplibs_check_method=pass_all
17311   ;;
17312
17313 hpux10.20* | hpux11*)
17314   lt_cv_file_magic_cmd=/usr/bin/file
17315   case $host_cpu in
17316   ia64*)
17317     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
17318     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
17319     ;;
17320   hppa*64*)
17321     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]'
17322     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
17323     ;;
17324   *)
17325     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
17326     lt_cv_file_magic_test_file=/usr/lib/libc.sl
17327     ;;
17328   esac
17329   ;;
17330
17331 interix[3-9]*)
17332   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
17333   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
17334   ;;
17335
17336 irix5* | irix6* | nonstopux*)
17337   case $LD in
17338   *-32|*"-32 ") libmagic=32-bit;;
17339   *-n32|*"-n32 ") libmagic=N32;;
17340   *-64|*"-64 ") libmagic=64-bit;;
17341   *) libmagic=never-match;;
17342   esac
17343   lt_cv_deplibs_check_method=pass_all
17344   ;;
17345
17346 # This must be Linux ELF.
17347 linux* | k*bsd*-gnu | kopensolaris*-gnu)
17348   lt_cv_deplibs_check_method=pass_all
17349   ;;
17350
17351 netbsd*)
17352   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
17353     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
17354   else
17355     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
17356   fi
17357   ;;
17358
17359 newos6*)
17360   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
17361   lt_cv_file_magic_cmd=/usr/bin/file
17362   lt_cv_file_magic_test_file=/usr/lib/libnls.so
17363   ;;
17364
17365 *nto* | *qnx*)
17366   lt_cv_deplibs_check_method=pass_all
17367   ;;
17368
17369 openbsd*)
17370   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
17371     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
17372   else
17373     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
17374   fi
17375   ;;
17376
17377 osf3* | osf4* | osf5*)
17378   lt_cv_deplibs_check_method=pass_all
17379   ;;
17380
17381 rdos*)
17382   lt_cv_deplibs_check_method=pass_all
17383   ;;
17384
17385 solaris*)
17386   lt_cv_deplibs_check_method=pass_all
17387   ;;
17388
17389 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
17390   lt_cv_deplibs_check_method=pass_all
17391   ;;
17392
17393 sysv4 | sysv4.3*)
17394   case $host_vendor in
17395   motorola)
17396     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]'
17397     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
17398     ;;
17399   ncr)
17400     lt_cv_deplibs_check_method=pass_all
17401     ;;
17402   sequent)
17403     lt_cv_file_magic_cmd='/bin/file'
17404     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
17405     ;;
17406   sni)
17407     lt_cv_file_magic_cmd='/bin/file'
17408     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
17409     lt_cv_file_magic_test_file=/lib/libc.so
17410     ;;
17411   siemens)
17412     lt_cv_deplibs_check_method=pass_all
17413     ;;
17414   pc)
17415     lt_cv_deplibs_check_method=pass_all
17416     ;;
17417   esac
17418   ;;
17419
17420 tpf*)
17421   lt_cv_deplibs_check_method=pass_all
17422   ;;
17423 esac
17424
17425 fi
17426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
17427 $as_echo "$lt_cv_deplibs_check_method" >&6; }
17428
17429 file_magic_glob=
17430 want_nocaseglob=no
17431 if test "$build" = "$host"; then
17432   case $host_os in
17433   mingw* | pw32*)
17434     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
17435       want_nocaseglob=yes
17436     else
17437       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
17438     fi
17439     ;;
17440   esac
17441 fi
17442
17443 file_magic_cmd=$lt_cv_file_magic_cmd
17444 deplibs_check_method=$lt_cv_deplibs_check_method
17445 test -z "$deplibs_check_method" && deplibs_check_method=unknown
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468 if test -n "$ac_tool_prefix"; then
17469   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
17470 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
17471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17472 $as_echo_n "checking for $ac_word... " >&6; }
17473 if ${ac_cv_prog_DLLTOOL+:} false; then :
17474   $as_echo_n "(cached) " >&6
17475 else
17476   if test -n "$DLLTOOL"; then
17477   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
17478 else
17479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17480 for as_dir in $PATH
17481 do
17482   IFS=$as_save_IFS
17483   test -z "$as_dir" && as_dir=.
17484     for ac_exec_ext in '' $ac_executable_extensions; do
17485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17486     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
17487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17488     break 2
17489   fi
17490 done
17491   done
17492 IFS=$as_save_IFS
17493
17494 fi
17495 fi
17496 DLLTOOL=$ac_cv_prog_DLLTOOL
17497 if test -n "$DLLTOOL"; then
17498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
17499 $as_echo "$DLLTOOL" >&6; }
17500 else
17501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17502 $as_echo "no" >&6; }
17503 fi
17504
17505
17506 fi
17507 if test -z "$ac_cv_prog_DLLTOOL"; then
17508   ac_ct_DLLTOOL=$DLLTOOL
17509   # Extract the first word of "dlltool", so it can be a program name with args.
17510 set dummy dlltool; ac_word=$2
17511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17512 $as_echo_n "checking for $ac_word... " >&6; }
17513 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
17514   $as_echo_n "(cached) " >&6
17515 else
17516   if test -n "$ac_ct_DLLTOOL"; then
17517   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
17518 else
17519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17520 for as_dir in $PATH
17521 do
17522   IFS=$as_save_IFS
17523   test -z "$as_dir" && as_dir=.
17524     for ac_exec_ext in '' $ac_executable_extensions; do
17525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17526     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
17527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17528     break 2
17529   fi
17530 done
17531   done
17532 IFS=$as_save_IFS
17533
17534 fi
17535 fi
17536 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
17537 if test -n "$ac_ct_DLLTOOL"; then
17538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
17539 $as_echo "$ac_ct_DLLTOOL" >&6; }
17540 else
17541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17542 $as_echo "no" >&6; }
17543 fi
17544
17545   if test "x$ac_ct_DLLTOOL" = x; then
17546     DLLTOOL="false"
17547   else
17548     case $cross_compiling:$ac_tool_warned in
17549 yes:)
17550 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17551 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17552 ac_tool_warned=yes ;;
17553 esac
17554     DLLTOOL=$ac_ct_DLLTOOL
17555   fi
17556 else
17557   DLLTOOL="$ac_cv_prog_DLLTOOL"
17558 fi
17559
17560 test -z "$DLLTOOL" && DLLTOOL=dlltool
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
17572 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
17573 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
17574   $as_echo_n "(cached) " >&6
17575 else
17576   lt_cv_sharedlib_from_linklib_cmd='unknown'
17577
17578 case $host_os in
17579 cygwin* | mingw* | pw32* | cegcc*)
17580   # two different shell functions defined in ltmain.sh
17581   # decide which to use based on capabilities of $DLLTOOL
17582   case `$DLLTOOL --help 2>&1` in
17583   *--identify-strict*)
17584     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
17585     ;;
17586   *)
17587     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
17588     ;;
17589   esac
17590   ;;
17591 *)
17592   # fallback: assume linklib IS sharedlib
17593   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
17594   ;;
17595 esac
17596
17597 fi
17598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
17599 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
17600 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
17601 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
17602
17603
17604
17605
17606
17607
17608
17609 if test -n "$ac_tool_prefix"; then
17610   for ac_prog in ar
17611   do
17612     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
17613 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
17614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17615 $as_echo_n "checking for $ac_word... " >&6; }
17616 if ${ac_cv_prog_AR+:} false; then :
17617   $as_echo_n "(cached) " >&6
17618 else
17619   if test -n "$AR"; then
17620   ac_cv_prog_AR="$AR" # Let the user override the test.
17621 else
17622 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17623 for as_dir in $PATH
17624 do
17625   IFS=$as_save_IFS
17626   test -z "$as_dir" && as_dir=.
17627     for ac_exec_ext in '' $ac_executable_extensions; do
17628   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17629     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
17630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17631     break 2
17632   fi
17633 done
17634   done
17635 IFS=$as_save_IFS
17636
17637 fi
17638 fi
17639 AR=$ac_cv_prog_AR
17640 if test -n "$AR"; then
17641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
17642 $as_echo "$AR" >&6; }
17643 else
17644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17645 $as_echo "no" >&6; }
17646 fi
17647
17648
17649     test -n "$AR" && break
17650   done
17651 fi
17652 if test -z "$AR"; then
17653   ac_ct_AR=$AR
17654   for ac_prog in ar
17655 do
17656   # Extract the first word of "$ac_prog", so it can be a program name with args.
17657 set dummy $ac_prog; ac_word=$2
17658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17659 $as_echo_n "checking for $ac_word... " >&6; }
17660 if ${ac_cv_prog_ac_ct_AR+:} false; then :
17661   $as_echo_n "(cached) " >&6
17662 else
17663   if test -n "$ac_ct_AR"; then
17664   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
17665 else
17666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17667 for as_dir in $PATH
17668 do
17669   IFS=$as_save_IFS
17670   test -z "$as_dir" && as_dir=.
17671     for ac_exec_ext in '' $ac_executable_extensions; do
17672   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17673     ac_cv_prog_ac_ct_AR="$ac_prog"
17674     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17675     break 2
17676   fi
17677 done
17678   done
17679 IFS=$as_save_IFS
17680
17681 fi
17682 fi
17683 ac_ct_AR=$ac_cv_prog_ac_ct_AR
17684 if test -n "$ac_ct_AR"; then
17685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
17686 $as_echo "$ac_ct_AR" >&6; }
17687 else
17688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17689 $as_echo "no" >&6; }
17690 fi
17691
17692
17693   test -n "$ac_ct_AR" && break
17694 done
17695
17696   if test "x$ac_ct_AR" = x; then
17697     AR="false"
17698   else
17699     case $cross_compiling:$ac_tool_warned in
17700 yes:)
17701 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17702 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17703 ac_tool_warned=yes ;;
17704 esac
17705     AR=$ac_ct_AR
17706   fi
17707 fi
17708
17709 : ${AR=ar}
17710 : ${AR_FLAGS=cru}
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
17723 $as_echo_n "checking for archiver @FILE support... " >&6; }
17724 if ${lt_cv_ar_at_file+:} false; then :
17725   $as_echo_n "(cached) " >&6
17726 else
17727   lt_cv_ar_at_file=no
17728    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17729 /* end confdefs.h.  */
17730
17731 int
17732 main ()
17733 {
17734
17735   ;
17736   return 0;
17737 }
17738 _ACEOF
17739 if ac_fn_c_try_compile "$LINENO"; then :
17740   echo conftest.$ac_objext > conftest.lst
17741       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
17742       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
17743   (eval $lt_ar_try) 2>&5
17744   ac_status=$?
17745   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17746   test $ac_status = 0; }
17747       if test "$ac_status" -eq 0; then
17748         # Ensure the archiver fails upon bogus file names.
17749         rm -f conftest.$ac_objext libconftest.a
17750         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
17751   (eval $lt_ar_try) 2>&5
17752   ac_status=$?
17753   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17754   test $ac_status = 0; }
17755         if test "$ac_status" -ne 0; then
17756           lt_cv_ar_at_file=@
17757         fi
17758       fi
17759       rm -f conftest.* libconftest.a
17760
17761 fi
17762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17763
17764 fi
17765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
17766 $as_echo "$lt_cv_ar_at_file" >&6; }
17767
17768 if test "x$lt_cv_ar_at_file" = xno; then
17769   archiver_list_spec=
17770 else
17771   archiver_list_spec=$lt_cv_ar_at_file
17772 fi
17773
17774
17775
17776
17777
17778
17779
17780 if test -n "$ac_tool_prefix"; then
17781   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
17782 set dummy ${ac_tool_prefix}strip; ac_word=$2
17783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17784 $as_echo_n "checking for $ac_word... " >&6; }
17785 if ${ac_cv_prog_STRIP+:} false; then :
17786   $as_echo_n "(cached) " >&6
17787 else
17788   if test -n "$STRIP"; then
17789   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
17790 else
17791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17792 for as_dir in $PATH
17793 do
17794   IFS=$as_save_IFS
17795   test -z "$as_dir" && as_dir=.
17796     for ac_exec_ext in '' $ac_executable_extensions; do
17797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17798     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
17799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17800     break 2
17801   fi
17802 done
17803   done
17804 IFS=$as_save_IFS
17805
17806 fi
17807 fi
17808 STRIP=$ac_cv_prog_STRIP
17809 if test -n "$STRIP"; then
17810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
17811 $as_echo "$STRIP" >&6; }
17812 else
17813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17814 $as_echo "no" >&6; }
17815 fi
17816
17817
17818 fi
17819 if test -z "$ac_cv_prog_STRIP"; then
17820   ac_ct_STRIP=$STRIP
17821   # Extract the first word of "strip", so it can be a program name with args.
17822 set dummy strip; ac_word=$2
17823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17824 $as_echo_n "checking for $ac_word... " >&6; }
17825 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
17826   $as_echo_n "(cached) " >&6
17827 else
17828   if test -n "$ac_ct_STRIP"; then
17829   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
17830 else
17831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17832 for as_dir in $PATH
17833 do
17834   IFS=$as_save_IFS
17835   test -z "$as_dir" && as_dir=.
17836     for ac_exec_ext in '' $ac_executable_extensions; do
17837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17838     ac_cv_prog_ac_ct_STRIP="strip"
17839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17840     break 2
17841   fi
17842 done
17843   done
17844 IFS=$as_save_IFS
17845
17846 fi
17847 fi
17848 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
17849 if test -n "$ac_ct_STRIP"; then
17850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
17851 $as_echo "$ac_ct_STRIP" >&6; }
17852 else
17853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17854 $as_echo "no" >&6; }
17855 fi
17856
17857   if test "x$ac_ct_STRIP" = x; then
17858     STRIP=":"
17859   else
17860     case $cross_compiling:$ac_tool_warned in
17861 yes:)
17862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17863 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17864 ac_tool_warned=yes ;;
17865 esac
17866     STRIP=$ac_ct_STRIP
17867   fi
17868 else
17869   STRIP="$ac_cv_prog_STRIP"
17870 fi
17871
17872 test -z "$STRIP" && STRIP=:
17873
17874
17875
17876
17877
17878
17879 if test -n "$ac_tool_prefix"; then
17880   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
17881 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
17882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17883 $as_echo_n "checking for $ac_word... " >&6; }
17884 if ${ac_cv_prog_RANLIB+:} false; then :
17885   $as_echo_n "(cached) " >&6
17886 else
17887   if test -n "$RANLIB"; then
17888   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
17889 else
17890 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17891 for as_dir in $PATH
17892 do
17893   IFS=$as_save_IFS
17894   test -z "$as_dir" && as_dir=.
17895     for ac_exec_ext in '' $ac_executable_extensions; do
17896   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17897     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
17898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17899     break 2
17900   fi
17901 done
17902   done
17903 IFS=$as_save_IFS
17904
17905 fi
17906 fi
17907 RANLIB=$ac_cv_prog_RANLIB
17908 if test -n "$RANLIB"; then
17909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
17910 $as_echo "$RANLIB" >&6; }
17911 else
17912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17913 $as_echo "no" >&6; }
17914 fi
17915
17916
17917 fi
17918 if test -z "$ac_cv_prog_RANLIB"; then
17919   ac_ct_RANLIB=$RANLIB
17920   # Extract the first word of "ranlib", so it can be a program name with args.
17921 set dummy ranlib; ac_word=$2
17922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17923 $as_echo_n "checking for $ac_word... " >&6; }
17924 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
17925   $as_echo_n "(cached) " >&6
17926 else
17927   if test -n "$ac_ct_RANLIB"; then
17928   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
17929 else
17930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17931 for as_dir in $PATH
17932 do
17933   IFS=$as_save_IFS
17934   test -z "$as_dir" && as_dir=.
17935     for ac_exec_ext in '' $ac_executable_extensions; do
17936   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17937     ac_cv_prog_ac_ct_RANLIB="ranlib"
17938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17939     break 2
17940   fi
17941 done
17942   done
17943 IFS=$as_save_IFS
17944
17945 fi
17946 fi
17947 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
17948 if test -n "$ac_ct_RANLIB"; then
17949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
17950 $as_echo "$ac_ct_RANLIB" >&6; }
17951 else
17952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17953 $as_echo "no" >&6; }
17954 fi
17955
17956   if test "x$ac_ct_RANLIB" = x; then
17957     RANLIB=":"
17958   else
17959     case $cross_compiling:$ac_tool_warned in
17960 yes:)
17961 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17962 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17963 ac_tool_warned=yes ;;
17964 esac
17965     RANLIB=$ac_ct_RANLIB
17966   fi
17967 else
17968   RANLIB="$ac_cv_prog_RANLIB"
17969 fi
17970
17971 test -z "$RANLIB" && RANLIB=:
17972
17973
17974
17975
17976
17977
17978 # Determine commands to create old-style static archives.
17979 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
17980 old_postinstall_cmds='chmod 644 $oldlib'
17981 old_postuninstall_cmds=
17982
17983 if test -n "$RANLIB"; then
17984   case $host_os in
17985   openbsd*)
17986     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
17987     ;;
17988   *)
17989     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
17990     ;;
17991   esac
17992   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
17993 fi
17994
17995 case $host_os in
17996   darwin*)
17997     lock_old_archive_extraction=yes ;;
17998   *)
17999     lock_old_archive_extraction=no ;;
18000 esac
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040 # If no C compiler was specified, use CC.
18041 LTCC=${LTCC-"$CC"}
18042
18043 # If no C compiler flags were specified, use CFLAGS.
18044 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
18045
18046 # Allow CC to be a program name with arguments.
18047 compiler=$CC
18048
18049
18050 # Check for command to grab the raw symbol name followed by C symbol from nm.
18051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
18052 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
18053 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
18054   $as_echo_n "(cached) " >&6
18055 else
18056
18057 # These are sane defaults that work on at least a few old systems.
18058 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
18059
18060 # Character class describing NM global symbol codes.
18061 symcode='[BCDEGRST]'
18062
18063 # Regexp to match symbols that can be accessed directly from C.
18064 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
18065
18066 # Define system-specific variables.
18067 case $host_os in
18068 aix*)
18069   symcode='[BCDT]'
18070   ;;
18071 cygwin* | mingw* | pw32* | cegcc*)
18072   symcode='[ABCDGISTW]'
18073   ;;
18074 hpux*)
18075   if test "$host_cpu" = ia64; then
18076     symcode='[ABCDEGRST]'
18077   fi
18078   ;;
18079 irix* | nonstopux*)
18080   symcode='[BCDEGRST]'
18081   ;;
18082 osf*)
18083   symcode='[BCDEGQRST]'
18084   ;;
18085 solaris*)
18086   symcode='[BDRT]'
18087   ;;
18088 sco3.2v5*)
18089   symcode='[DT]'
18090   ;;
18091 sysv4.2uw2*)
18092   symcode='[DT]'
18093   ;;
18094 sysv5* | sco5v6* | unixware* | OpenUNIX*)
18095   symcode='[ABDT]'
18096   ;;
18097 sysv4)
18098   symcode='[DFNSTU]'
18099   ;;
18100 esac
18101
18102 # If we're using GNU nm, then use its standard symbol codes.
18103 case `$NM -V 2>&1` in
18104 *GNU* | *'with BFD'*)
18105   symcode='[ABCDGIRSTW]' ;;
18106 esac
18107
18108 # Transform an extracted symbol line into a proper C declaration.
18109 # Some systems (esp. on ia64) link data and code symbols differently,
18110 # so use this general approach.
18111 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
18112
18113 # Transform an extracted symbol line into symbol name and symbol address
18114 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
18115 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
18116
18117 # Handle CRLF in mingw tool chain
18118 opt_cr=
18119 case $build_os in
18120 mingw*)
18121   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
18122   ;;
18123 esac
18124
18125 # Try without a prefix underscore, then with it.
18126 for ac_symprfx in "" "_"; do
18127
18128   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
18129   symxfrm="\\1 $ac_symprfx\\2 \\2"
18130
18131   # Write the raw and C identifiers.
18132   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
18133     # Fake it for dumpbin and say T for any non-static function
18134     # and D for any global variable.
18135     # Also find C++ and __fastcall symbols from MSVC++,
18136     # which start with @ or ?.
18137     lt_cv_sys_global_symbol_pipe="$AWK '"\
18138 "     {last_section=section; section=\$ 3};"\
18139 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
18140 "     \$ 0!~/External *\|/{next};"\
18141 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
18142 "     {if(hide[section]) next};"\
18143 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
18144 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
18145 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
18146 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
18147 "     ' prfx=^$ac_symprfx"
18148   else
18149     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
18150   fi
18151   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
18152
18153   # Check to see that the pipe works correctly.
18154   pipe_works=no
18155
18156   rm -f conftest*
18157   cat > conftest.$ac_ext <<_LT_EOF
18158 #ifdef __cplusplus
18159 extern "C" {
18160 #endif
18161 char nm_test_var;
18162 void nm_test_func(void);
18163 void nm_test_func(void){}
18164 #ifdef __cplusplus
18165 }
18166 #endif
18167 int main(){nm_test_var='a';nm_test_func();return(0);}
18168 _LT_EOF
18169
18170   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18171   (eval $ac_compile) 2>&5
18172   ac_status=$?
18173   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18174   test $ac_status = 0; }; then
18175     # Now try to grab the symbols.
18176     nlist=conftest.nm
18177     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
18178   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
18179   ac_status=$?
18180   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18181   test $ac_status = 0; } && test -s "$nlist"; then
18182       # Try sorting and uniquifying the output.
18183       if sort "$nlist" | uniq > "$nlist"T; then
18184         mv -f "$nlist"T "$nlist"
18185       else
18186         rm -f "$nlist"T
18187       fi
18188
18189       # Make sure that we snagged all the symbols we need.
18190       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
18191         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
18192           cat <<_LT_EOF > conftest.$ac_ext
18193 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
18194 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
18195 /* DATA imports from DLLs on WIN32 con't be const, because runtime
18196    relocations are performed -- see ld's documentation on pseudo-relocs.  */
18197 # define LT_DLSYM_CONST
18198 #elif defined(__osf__)
18199 /* This system does not cope well with relocations in const data.  */
18200 # define LT_DLSYM_CONST
18201 #else
18202 # define LT_DLSYM_CONST const
18203 #endif
18204
18205 #ifdef __cplusplus
18206 extern "C" {
18207 #endif
18208
18209 _LT_EOF
18210           # Now generate the symbol file.
18211           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
18212
18213           cat <<_LT_EOF >> conftest.$ac_ext
18214
18215 /* The mapping between symbol names and symbols.  */
18216 LT_DLSYM_CONST struct {
18217   const char *name;
18218   void       *address;
18219 }
18220 lt__PROGRAM__LTX_preloaded_symbols[] =
18221 {
18222   { "@PROGRAM@", (void *) 0 },
18223 _LT_EOF
18224           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
18225           cat <<\_LT_EOF >> conftest.$ac_ext
18226   {0, (void *) 0}
18227 };
18228
18229 /* This works around a problem in FreeBSD linker */
18230 #ifdef FREEBSD_WORKAROUND
18231 static const void *lt_preloaded_setup() {
18232   return lt__PROGRAM__LTX_preloaded_symbols;
18233 }
18234 #endif
18235
18236 #ifdef __cplusplus
18237 }
18238 #endif
18239 _LT_EOF
18240           # Now try linking the two files.
18241           mv conftest.$ac_objext conftstm.$ac_objext
18242           lt_globsym_save_LIBS=$LIBS
18243           lt_globsym_save_CFLAGS=$CFLAGS
18244           LIBS="conftstm.$ac_objext"
18245           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
18246           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
18247   (eval $ac_link) 2>&5
18248   ac_status=$?
18249   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18250   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
18251             pipe_works=yes
18252           fi
18253           LIBS=$lt_globsym_save_LIBS
18254           CFLAGS=$lt_globsym_save_CFLAGS
18255         else
18256           echo "cannot find nm_test_func in $nlist" >&5
18257         fi
18258       else
18259         echo "cannot find nm_test_var in $nlist" >&5
18260       fi
18261     else
18262       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
18263     fi
18264   else
18265     echo "$progname: failed program was:" >&5
18266     cat conftest.$ac_ext >&5
18267   fi
18268   rm -rf conftest* conftst*
18269
18270   # Do not use the global_symbol_pipe unless it works.
18271   if test "$pipe_works" = yes; then
18272     break
18273   else
18274     lt_cv_sys_global_symbol_pipe=
18275   fi
18276 done
18277
18278 fi
18279
18280 if test -z "$lt_cv_sys_global_symbol_pipe"; then
18281   lt_cv_sys_global_symbol_to_cdecl=
18282 fi
18283 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
18284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
18285 $as_echo "failed" >&6; }
18286 else
18287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18288 $as_echo "ok" >&6; }
18289 fi
18290
18291 # Response file support.
18292 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
18293   nm_file_list_spec='@'
18294 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
18295   nm_file_list_spec='@'
18296 fi
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
18325 $as_echo_n "checking for sysroot... " >&6; }
18326
18327 # Check whether --with-sysroot was given.
18328 if test "${with_sysroot+set}" = set; then :
18329   withval=$with_sysroot;
18330 else
18331   with_sysroot=no
18332 fi
18333
18334
18335 lt_sysroot=
18336 case ${with_sysroot} in #(
18337  yes)
18338    if test "$GCC" = yes; then
18339      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
18340    fi
18341    ;; #(
18342  /*)
18343    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
18344    ;; #(
18345  no|'')
18346    ;; #(
18347  *)
18348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
18349 $as_echo "${with_sysroot}" >&6; }
18350    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
18351    ;;
18352 esac
18353
18354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
18355 $as_echo "${lt_sysroot:-no}" >&6; }
18356
18357
18358
18359
18360
18361 # Check whether --enable-libtool-lock was given.
18362 if test "${enable_libtool_lock+set}" = set; then :
18363   enableval=$enable_libtool_lock;
18364 fi
18365
18366 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
18367
18368 # Some flags need to be propagated to the compiler or linker for good
18369 # libtool support.
18370 case $host in
18371 ia64-*-hpux*)
18372   # Find out which ABI we are using.
18373   echo 'int i;' > conftest.$ac_ext
18374   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18375   (eval $ac_compile) 2>&5
18376   ac_status=$?
18377   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18378   test $ac_status = 0; }; then
18379     case `/usr/bin/file conftest.$ac_objext` in
18380       *ELF-32*)
18381         HPUX_IA64_MODE="32"
18382         ;;
18383       *ELF-64*)
18384         HPUX_IA64_MODE="64"
18385         ;;
18386     esac
18387   fi
18388   rm -rf conftest*
18389   ;;
18390 *-*-irix6*)
18391   # Find out which ABI we are using.
18392   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
18393   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18394   (eval $ac_compile) 2>&5
18395   ac_status=$?
18396   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18397   test $ac_status = 0; }; then
18398     if test "$lt_cv_prog_gnu_ld" = yes; then
18399       case `/usr/bin/file conftest.$ac_objext` in
18400         *32-bit*)
18401           LD="${LD-ld} -melf32bsmip"
18402           ;;
18403         *N32*)
18404           LD="${LD-ld} -melf32bmipn32"
18405           ;;
18406         *64-bit*)
18407           LD="${LD-ld} -melf64bmip"
18408         ;;
18409       esac
18410     else
18411       case `/usr/bin/file conftest.$ac_objext` in
18412         *32-bit*)
18413           LD="${LD-ld} -32"
18414           ;;
18415         *N32*)
18416           LD="${LD-ld} -n32"
18417           ;;
18418         *64-bit*)
18419           LD="${LD-ld} -64"
18420           ;;
18421       esac
18422     fi
18423   fi
18424   rm -rf conftest*
18425   ;;
18426
18427 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
18428 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
18429   # Find out which ABI we are using.
18430   echo 'int i;' > conftest.$ac_ext
18431   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18432   (eval $ac_compile) 2>&5
18433   ac_status=$?
18434   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18435   test $ac_status = 0; }; then
18436     case `/usr/bin/file conftest.o` in
18437       *32-bit*)
18438         case $host in
18439           x86_64-*kfreebsd*-gnu)
18440             LD="${LD-ld} -m elf_i386_fbsd"
18441             ;;
18442           x86_64-*linux*)
18443             LD="${LD-ld} -m elf_i386"
18444             ;;
18445           ppc64-*linux*|powerpc64-*linux*)
18446             LD="${LD-ld} -m elf32ppclinux"
18447             ;;
18448           s390x-*linux*)
18449             LD="${LD-ld} -m elf_s390"
18450             ;;
18451           sparc64-*linux*)
18452             LD="${LD-ld} -m elf32_sparc"
18453             ;;
18454         esac
18455         ;;
18456       *64-bit*)
18457         case $host in
18458           x86_64-*kfreebsd*-gnu)
18459             LD="${LD-ld} -m elf_x86_64_fbsd"
18460             ;;
18461           x86_64-*linux*)
18462             LD="${LD-ld} -m elf_x86_64"
18463             ;;
18464           ppc*-*linux*|powerpc*-*linux*)
18465             LD="${LD-ld} -m elf64ppc"
18466             ;;
18467           s390*-*linux*|s390*-*tpf*)
18468             LD="${LD-ld} -m elf64_s390"
18469             ;;
18470           sparc*-*linux*)
18471             LD="${LD-ld} -m elf64_sparc"
18472             ;;
18473         esac
18474         ;;
18475     esac
18476   fi
18477   rm -rf conftest*
18478   ;;
18479
18480 *-*-sco3.2v5*)
18481   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
18482   SAVE_CFLAGS="$CFLAGS"
18483   CFLAGS="$CFLAGS -belf"
18484   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
18485 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
18486 if ${lt_cv_cc_needs_belf+:} false; then :
18487   $as_echo_n "(cached) " >&6
18488 else
18489   ac_ext=c
18490 ac_cpp='$CPP $CPPFLAGS'
18491 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18492 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18493 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18494
18495      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18496 /* end confdefs.h.  */
18497
18498 int
18499 main ()
18500 {
18501
18502   ;
18503   return 0;
18504 }
18505 _ACEOF
18506 if ac_fn_c_try_link "$LINENO"; then :
18507   lt_cv_cc_needs_belf=yes
18508 else
18509   lt_cv_cc_needs_belf=no
18510 fi
18511 rm -f core conftest.err conftest.$ac_objext \
18512     conftest$ac_exeext conftest.$ac_ext
18513      ac_ext=c
18514 ac_cpp='$CPP $CPPFLAGS'
18515 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18516 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18517 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18518
18519 fi
18520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
18521 $as_echo "$lt_cv_cc_needs_belf" >&6; }
18522   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
18523     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
18524     CFLAGS="$SAVE_CFLAGS"
18525   fi
18526   ;;
18527 sparc*-*solaris*)
18528   # Find out which ABI we are using.
18529   echo 'int i;' > conftest.$ac_ext
18530   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18531   (eval $ac_compile) 2>&5
18532   ac_status=$?
18533   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18534   test $ac_status = 0; }; then
18535     case `/usr/bin/file conftest.o` in
18536     *64-bit*)
18537       case $lt_cv_prog_gnu_ld in
18538       yes*) LD="${LD-ld} -m elf64_sparc" ;;
18539       *)
18540         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
18541           LD="${LD-ld} -64"
18542         fi
18543         ;;
18544       esac
18545       ;;
18546     esac
18547   fi
18548   rm -rf conftest*
18549   ;;
18550 esac
18551
18552 need_locks="$enable_libtool_lock"
18553
18554 if test -n "$ac_tool_prefix"; then
18555   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
18556 set dummy ${ac_tool_prefix}mt; ac_word=$2
18557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18558 $as_echo_n "checking for $ac_word... " >&6; }
18559 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
18560   $as_echo_n "(cached) " >&6
18561 else
18562   if test -n "$MANIFEST_TOOL"; then
18563   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
18564 else
18565 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18566 for as_dir in $PATH
18567 do
18568   IFS=$as_save_IFS
18569   test -z "$as_dir" && as_dir=.
18570     for ac_exec_ext in '' $ac_executable_extensions; do
18571   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18572     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
18573     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18574     break 2
18575   fi
18576 done
18577   done
18578 IFS=$as_save_IFS
18579
18580 fi
18581 fi
18582 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
18583 if test -n "$MANIFEST_TOOL"; then
18584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
18585 $as_echo "$MANIFEST_TOOL" >&6; }
18586 else
18587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18588 $as_echo "no" >&6; }
18589 fi
18590
18591
18592 fi
18593 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
18594   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
18595   # Extract the first word of "mt", so it can be a program name with args.
18596 set dummy mt; ac_word=$2
18597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18598 $as_echo_n "checking for $ac_word... " >&6; }
18599 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
18600   $as_echo_n "(cached) " >&6
18601 else
18602   if test -n "$ac_ct_MANIFEST_TOOL"; then
18603   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
18604 else
18605 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18606 for as_dir in $PATH
18607 do
18608   IFS=$as_save_IFS
18609   test -z "$as_dir" && as_dir=.
18610     for ac_exec_ext in '' $ac_executable_extensions; do
18611   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18612     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
18613     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18614     break 2
18615   fi
18616 done
18617   done
18618 IFS=$as_save_IFS
18619
18620 fi
18621 fi
18622 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
18623 if test -n "$ac_ct_MANIFEST_TOOL"; then
18624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
18625 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
18626 else
18627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18628 $as_echo "no" >&6; }
18629 fi
18630
18631   if test "x$ac_ct_MANIFEST_TOOL" = x; then
18632     MANIFEST_TOOL=":"
18633   else
18634     case $cross_compiling:$ac_tool_warned in
18635 yes:)
18636 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18637 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18638 ac_tool_warned=yes ;;
18639 esac
18640     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
18641   fi
18642 else
18643   MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
18644 fi
18645
18646 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
18647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
18648 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
18649 if ${lt_cv_path_mainfest_tool+:} false; then :
18650   $as_echo_n "(cached) " >&6
18651 else
18652   lt_cv_path_mainfest_tool=no
18653   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
18654   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
18655   cat conftest.err >&5
18656   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
18657     lt_cv_path_mainfest_tool=yes
18658   fi
18659   rm -f conftest*
18660 fi
18661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
18662 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
18663 if test "x$lt_cv_path_mainfest_tool" != xyes; then
18664   MANIFEST_TOOL=:
18665 fi
18666
18667
18668
18669
18670
18671
18672   case $host_os in
18673     rhapsody* | darwin*)
18674     if test -n "$ac_tool_prefix"; then
18675   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
18676 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
18677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18678 $as_echo_n "checking for $ac_word... " >&6; }
18679 if ${ac_cv_prog_DSYMUTIL+:} false; then :
18680   $as_echo_n "(cached) " >&6
18681 else
18682   if test -n "$DSYMUTIL"; then
18683   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
18684 else
18685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18686 for as_dir in $PATH
18687 do
18688   IFS=$as_save_IFS
18689   test -z "$as_dir" && as_dir=.
18690     for ac_exec_ext in '' $ac_executable_extensions; do
18691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18692     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
18693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18694     break 2
18695   fi
18696 done
18697   done
18698 IFS=$as_save_IFS
18699
18700 fi
18701 fi
18702 DSYMUTIL=$ac_cv_prog_DSYMUTIL
18703 if test -n "$DSYMUTIL"; then
18704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18705 $as_echo "$DSYMUTIL" >&6; }
18706 else
18707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18708 $as_echo "no" >&6; }
18709 fi
18710
18711
18712 fi
18713 if test -z "$ac_cv_prog_DSYMUTIL"; then
18714   ac_ct_DSYMUTIL=$DSYMUTIL
18715   # Extract the first word of "dsymutil", so it can be a program name with args.
18716 set dummy dsymutil; ac_word=$2
18717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18718 $as_echo_n "checking for $ac_word... " >&6; }
18719 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
18720   $as_echo_n "(cached) " >&6
18721 else
18722   if test -n "$ac_ct_DSYMUTIL"; then
18723   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
18724 else
18725 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18726 for as_dir in $PATH
18727 do
18728   IFS=$as_save_IFS
18729   test -z "$as_dir" && as_dir=.
18730     for ac_exec_ext in '' $ac_executable_extensions; do
18731   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18732     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
18733     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18734     break 2
18735   fi
18736 done
18737   done
18738 IFS=$as_save_IFS
18739
18740 fi
18741 fi
18742 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
18743 if test -n "$ac_ct_DSYMUTIL"; then
18744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
18745 $as_echo "$ac_ct_DSYMUTIL" >&6; }
18746 else
18747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18748 $as_echo "no" >&6; }
18749 fi
18750
18751   if test "x$ac_ct_DSYMUTIL" = x; then
18752     DSYMUTIL=":"
18753   else
18754     case $cross_compiling:$ac_tool_warned in
18755 yes:)
18756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18757 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18758 ac_tool_warned=yes ;;
18759 esac
18760     DSYMUTIL=$ac_ct_DSYMUTIL
18761   fi
18762 else
18763   DSYMUTIL="$ac_cv_prog_DSYMUTIL"
18764 fi
18765
18766     if test -n "$ac_tool_prefix"; then
18767   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
18768 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
18769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18770 $as_echo_n "checking for $ac_word... " >&6; }
18771 if ${ac_cv_prog_NMEDIT+:} false; then :
18772   $as_echo_n "(cached) " >&6
18773 else
18774   if test -n "$NMEDIT"; then
18775   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
18776 else
18777 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18778 for as_dir in $PATH
18779 do
18780   IFS=$as_save_IFS
18781   test -z "$as_dir" && as_dir=.
18782     for ac_exec_ext in '' $ac_executable_extensions; do
18783   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18784     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
18785     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18786     break 2
18787   fi
18788 done
18789   done
18790 IFS=$as_save_IFS
18791
18792 fi
18793 fi
18794 NMEDIT=$ac_cv_prog_NMEDIT
18795 if test -n "$NMEDIT"; then
18796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
18797 $as_echo "$NMEDIT" >&6; }
18798 else
18799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18800 $as_echo "no" >&6; }
18801 fi
18802
18803
18804 fi
18805 if test -z "$ac_cv_prog_NMEDIT"; then
18806   ac_ct_NMEDIT=$NMEDIT
18807   # Extract the first word of "nmedit", so it can be a program name with args.
18808 set dummy nmedit; ac_word=$2
18809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18810 $as_echo_n "checking for $ac_word... " >&6; }
18811 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
18812   $as_echo_n "(cached) " >&6
18813 else
18814   if test -n "$ac_ct_NMEDIT"; then
18815   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
18816 else
18817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18818 for as_dir in $PATH
18819 do
18820   IFS=$as_save_IFS
18821   test -z "$as_dir" && as_dir=.
18822     for ac_exec_ext in '' $ac_executable_extensions; do
18823   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18824     ac_cv_prog_ac_ct_NMEDIT="nmedit"
18825     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18826     break 2
18827   fi
18828 done
18829   done
18830 IFS=$as_save_IFS
18831
18832 fi
18833 fi
18834 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
18835 if test -n "$ac_ct_NMEDIT"; then
18836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
18837 $as_echo "$ac_ct_NMEDIT" >&6; }
18838 else
18839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18840 $as_echo "no" >&6; }
18841 fi
18842
18843   if test "x$ac_ct_NMEDIT" = x; then
18844     NMEDIT=":"
18845   else
18846     case $cross_compiling:$ac_tool_warned in
18847 yes:)
18848 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18849 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18850 ac_tool_warned=yes ;;
18851 esac
18852     NMEDIT=$ac_ct_NMEDIT
18853   fi
18854 else
18855   NMEDIT="$ac_cv_prog_NMEDIT"
18856 fi
18857
18858     if test -n "$ac_tool_prefix"; then
18859   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
18860 set dummy ${ac_tool_prefix}lipo; ac_word=$2
18861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18862 $as_echo_n "checking for $ac_word... " >&6; }
18863 if ${ac_cv_prog_LIPO+:} false; then :
18864   $as_echo_n "(cached) " >&6
18865 else
18866   if test -n "$LIPO"; then
18867   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
18868 else
18869 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18870 for as_dir in $PATH
18871 do
18872   IFS=$as_save_IFS
18873   test -z "$as_dir" && as_dir=.
18874     for ac_exec_ext in '' $ac_executable_extensions; do
18875   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18876     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
18877     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18878     break 2
18879   fi
18880 done
18881   done
18882 IFS=$as_save_IFS
18883
18884 fi
18885 fi
18886 LIPO=$ac_cv_prog_LIPO
18887 if test -n "$LIPO"; then
18888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
18889 $as_echo "$LIPO" >&6; }
18890 else
18891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18892 $as_echo "no" >&6; }
18893 fi
18894
18895
18896 fi
18897 if test -z "$ac_cv_prog_LIPO"; then
18898   ac_ct_LIPO=$LIPO
18899   # Extract the first word of "lipo", so it can be a program name with args.
18900 set dummy lipo; ac_word=$2
18901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18902 $as_echo_n "checking for $ac_word... " >&6; }
18903 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
18904   $as_echo_n "(cached) " >&6
18905 else
18906   if test -n "$ac_ct_LIPO"; then
18907   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
18908 else
18909 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18910 for as_dir in $PATH
18911 do
18912   IFS=$as_save_IFS
18913   test -z "$as_dir" && as_dir=.
18914     for ac_exec_ext in '' $ac_executable_extensions; do
18915   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18916     ac_cv_prog_ac_ct_LIPO="lipo"
18917     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18918     break 2
18919   fi
18920 done
18921   done
18922 IFS=$as_save_IFS
18923
18924 fi
18925 fi
18926 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
18927 if test -n "$ac_ct_LIPO"; then
18928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
18929 $as_echo "$ac_ct_LIPO" >&6; }
18930 else
18931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18932 $as_echo "no" >&6; }
18933 fi
18934
18935   if test "x$ac_ct_LIPO" = x; then
18936     LIPO=":"
18937   else
18938     case $cross_compiling:$ac_tool_warned in
18939 yes:)
18940 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18941 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18942 ac_tool_warned=yes ;;
18943 esac
18944     LIPO=$ac_ct_LIPO
18945   fi
18946 else
18947   LIPO="$ac_cv_prog_LIPO"
18948 fi
18949
18950     if test -n "$ac_tool_prefix"; then
18951   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
18952 set dummy ${ac_tool_prefix}otool; ac_word=$2
18953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18954 $as_echo_n "checking for $ac_word... " >&6; }
18955 if ${ac_cv_prog_OTOOL+:} false; then :
18956   $as_echo_n "(cached) " >&6
18957 else
18958   if test -n "$OTOOL"; then
18959   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
18960 else
18961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18962 for as_dir in $PATH
18963 do
18964   IFS=$as_save_IFS
18965   test -z "$as_dir" && as_dir=.
18966     for ac_exec_ext in '' $ac_executable_extensions; do
18967   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18968     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
18969     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18970     break 2
18971   fi
18972 done
18973   done
18974 IFS=$as_save_IFS
18975
18976 fi
18977 fi
18978 OTOOL=$ac_cv_prog_OTOOL
18979 if test -n "$OTOOL"; then
18980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18981 $as_echo "$OTOOL" >&6; }
18982 else
18983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18984 $as_echo "no" >&6; }
18985 fi
18986
18987
18988 fi
18989 if test -z "$ac_cv_prog_OTOOL"; then
18990   ac_ct_OTOOL=$OTOOL
18991   # Extract the first word of "otool", so it can be a program name with args.
18992 set dummy otool; ac_word=$2
18993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18994 $as_echo_n "checking for $ac_word... " >&6; }
18995 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
18996   $as_echo_n "(cached) " >&6
18997 else
18998   if test -n "$ac_ct_OTOOL"; then
18999   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
19000 else
19001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19002 for as_dir in $PATH
19003 do
19004   IFS=$as_save_IFS
19005   test -z "$as_dir" && as_dir=.
19006     for ac_exec_ext in '' $ac_executable_extensions; do
19007   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19008     ac_cv_prog_ac_ct_OTOOL="otool"
19009     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19010     break 2
19011   fi
19012 done
19013   done
19014 IFS=$as_save_IFS
19015
19016 fi
19017 fi
19018 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
19019 if test -n "$ac_ct_OTOOL"; then
19020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
19021 $as_echo "$ac_ct_OTOOL" >&6; }
19022 else
19023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19024 $as_echo "no" >&6; }
19025 fi
19026
19027   if test "x$ac_ct_OTOOL" = x; then
19028     OTOOL=":"
19029   else
19030     case $cross_compiling:$ac_tool_warned in
19031 yes:)
19032 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19033 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19034 ac_tool_warned=yes ;;
19035 esac
19036     OTOOL=$ac_ct_OTOOL
19037   fi
19038 else
19039   OTOOL="$ac_cv_prog_OTOOL"
19040 fi
19041
19042     if test -n "$ac_tool_prefix"; then
19043   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
19044 set dummy ${ac_tool_prefix}otool64; ac_word=$2
19045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19046 $as_echo_n "checking for $ac_word... " >&6; }
19047 if ${ac_cv_prog_OTOOL64+:} false; then :
19048   $as_echo_n "(cached) " >&6
19049 else
19050   if test -n "$OTOOL64"; then
19051   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
19052 else
19053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19054 for as_dir in $PATH
19055 do
19056   IFS=$as_save_IFS
19057   test -z "$as_dir" && as_dir=.
19058     for ac_exec_ext in '' $ac_executable_extensions; do
19059   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19060     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
19061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19062     break 2
19063   fi
19064 done
19065   done
19066 IFS=$as_save_IFS
19067
19068 fi
19069 fi
19070 OTOOL64=$ac_cv_prog_OTOOL64
19071 if test -n "$OTOOL64"; then
19072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
19073 $as_echo "$OTOOL64" >&6; }
19074 else
19075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19076 $as_echo "no" >&6; }
19077 fi
19078
19079
19080 fi
19081 if test -z "$ac_cv_prog_OTOOL64"; then
19082   ac_ct_OTOOL64=$OTOOL64
19083   # Extract the first word of "otool64", so it can be a program name with args.
19084 set dummy otool64; ac_word=$2
19085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19086 $as_echo_n "checking for $ac_word... " >&6; }
19087 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
19088   $as_echo_n "(cached) " >&6
19089 else
19090   if test -n "$ac_ct_OTOOL64"; then
19091   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
19092 else
19093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19094 for as_dir in $PATH
19095 do
19096   IFS=$as_save_IFS
19097   test -z "$as_dir" && as_dir=.
19098     for ac_exec_ext in '' $ac_executable_extensions; do
19099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19100     ac_cv_prog_ac_ct_OTOOL64="otool64"
19101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19102     break 2
19103   fi
19104 done
19105   done
19106 IFS=$as_save_IFS
19107
19108 fi
19109 fi
19110 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
19111 if test -n "$ac_ct_OTOOL64"; then
19112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
19113 $as_echo "$ac_ct_OTOOL64" >&6; }
19114 else
19115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19116 $as_echo "no" >&6; }
19117 fi
19118
19119   if test "x$ac_ct_OTOOL64" = x; then
19120     OTOOL64=":"
19121   else
19122     case $cross_compiling:$ac_tool_warned in
19123 yes:)
19124 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19125 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19126 ac_tool_warned=yes ;;
19127 esac
19128     OTOOL64=$ac_ct_OTOOL64
19129   fi
19130 else
19131   OTOOL64="$ac_cv_prog_OTOOL64"
19132 fi
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
19161 $as_echo_n "checking for -single_module linker flag... " >&6; }
19162 if ${lt_cv_apple_cc_single_mod+:} false; then :
19163   $as_echo_n "(cached) " >&6
19164 else
19165   lt_cv_apple_cc_single_mod=no
19166       if test -z "${LT_MULTI_MODULE}"; then
19167         # By default we will add the -single_module flag. You can override
19168         # by either setting the environment variable LT_MULTI_MODULE
19169         # non-empty at configure time, or by adding -multi_module to the
19170         # link flags.
19171         rm -rf libconftest.dylib*
19172         echo "int foo(void){return 1;}" > conftest.c
19173         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
19174 -dynamiclib -Wl,-single_module conftest.c" >&5
19175         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
19176           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
19177         _lt_result=$?
19178         if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
19179           lt_cv_apple_cc_single_mod=yes
19180         else
19181           cat conftest.err >&5
19182         fi
19183         rm -rf libconftest.dylib*
19184         rm -f conftest.*
19185       fi
19186 fi
19187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
19188 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
19189     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
19190 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
19191 if ${lt_cv_ld_exported_symbols_list+:} false; then :
19192   $as_echo_n "(cached) " >&6
19193 else
19194   lt_cv_ld_exported_symbols_list=no
19195       save_LDFLAGS=$LDFLAGS
19196       echo "_main" > conftest.sym
19197       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
19198       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19199 /* end confdefs.h.  */
19200
19201 int
19202 main ()
19203 {
19204
19205   ;
19206   return 0;
19207 }
19208 _ACEOF
19209 if ac_fn_c_try_link "$LINENO"; then :
19210   lt_cv_ld_exported_symbols_list=yes
19211 else
19212   lt_cv_ld_exported_symbols_list=no
19213 fi
19214 rm -f core conftest.err conftest.$ac_objext \
19215     conftest$ac_exeext conftest.$ac_ext
19216         LDFLAGS="$save_LDFLAGS"
19217
19218 fi
19219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
19220 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
19221     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
19222 $as_echo_n "checking for -force_load linker flag... " >&6; }
19223 if ${lt_cv_ld_force_load+:} false; then :
19224   $as_echo_n "(cached) " >&6
19225 else
19226   lt_cv_ld_force_load=no
19227       cat > conftest.c << _LT_EOF
19228 int forced_loaded() { return 2;}
19229 _LT_EOF
19230       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
19231       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
19232       echo "$AR cru libconftest.a conftest.o" >&5
19233       $AR cru libconftest.a conftest.o 2>&5
19234       echo "$RANLIB libconftest.a" >&5
19235       $RANLIB libconftest.a 2>&5
19236       cat > conftest.c << _LT_EOF
19237 int main() { return 0;}
19238 _LT_EOF
19239       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
19240       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
19241       _lt_result=$?
19242       if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
19243         lt_cv_ld_force_load=yes
19244       else
19245         cat conftest.err >&5
19246       fi
19247         rm -f conftest.err libconftest.a conftest conftest.c
19248         rm -rf conftest.dSYM
19249
19250 fi
19251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
19252 $as_echo "$lt_cv_ld_force_load" >&6; }
19253     case $host_os in
19254     rhapsody* | darwin1.[012])
19255       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
19256     darwin1.*)
19257       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
19258     darwin*) # darwin 5.x on
19259       # if running on 10.5 or later, the deployment target defaults
19260       # to the OS version, if on x86, and 10.4, the deployment
19261       # target defaults to 10.4. Don't you love it?
19262       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
19263         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
19264           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
19265         10.[012]*)
19266           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
19267         10.*)
19268           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
19269       esac
19270     ;;
19271   esac
19272     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
19273       _lt_dar_single_mod='$single_module'
19274     fi
19275     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
19276       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
19277     else
19278       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
19279     fi
19280     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
19281       _lt_dsymutil='~$DSYMUTIL $lib || :'
19282     else
19283       _lt_dsymutil=
19284     fi
19285     ;;
19286   esac
19287
19288 for ac_header in dlfcn.h
19289 do :
19290   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
19291 "
19292 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
19293   cat >>confdefs.h <<_ACEOF
19294 #define HAVE_DLFCN_H 1
19295 _ACEOF
19296
19297 fi
19298
19299 done
19300
19301
19302
19303
19304
19305 # Set options
19306
19307
19308
19309         enable_dlopen=no
19310
19311
19312   enable_win32_dll=no
19313
19314
19315
19316   # Check whether --enable-static was given.
19317 if test "${enable_static+set}" = set; then :
19318   enableval=$enable_static; p=${PACKAGE-default}
19319     case $enableval in
19320     yes) enable_static=yes ;;
19321     no) enable_static=no ;;
19322     *)
19323      enable_static=no
19324       # Look at the argument we got.  We use all the common list separators.
19325       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
19326       for pkg in $enableval; do
19327         IFS="$lt_save_ifs"
19328         if test "X$pkg" = "X$p"; then
19329           enable_static=yes
19330         fi
19331       done
19332       IFS="$lt_save_ifs"
19333       ;;
19334     esac
19335 else
19336   enable_static=yes
19337 fi
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348 # Check whether --with-pic was given.
19349 if test "${with_pic+set}" = set; then :
19350   withval=$with_pic; pic_mode="$withval"
19351 else
19352   pic_mode=default
19353 fi
19354
19355
19356 test -z "$pic_mode" && pic_mode=default
19357
19358
19359
19360
19361
19362
19363
19364   # Check whether --enable-fast-install was given.
19365 if test "${enable_fast_install+set}" = set; then :
19366   enableval=$enable_fast_install; p=${PACKAGE-default}
19367     case $enableval in
19368     yes) enable_fast_install=yes ;;
19369     no) enable_fast_install=no ;;
19370     *)
19371       enable_fast_install=no
19372       # Look at the argument we got.  We use all the common list separators.
19373       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
19374       for pkg in $enableval; do
19375         IFS="$lt_save_ifs"
19376         if test "X$pkg" = "X$p"; then
19377           enable_fast_install=yes
19378         fi
19379       done
19380       IFS="$lt_save_ifs"
19381       ;;
19382     esac
19383 else
19384   enable_fast_install=yes
19385 fi
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397 # This can be used to rebuild libtool when needed
19398 LIBTOOL_DEPS="$ltmain"
19399
19400 # Always use our own libtool.
19401 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428 test -z "$LN_S" && LN_S="ln -s"
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443 if test -n "${ZSH_VERSION+set}" ; then
19444    setopt NO_GLOB_SUBST
19445 fi
19446
19447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
19448 $as_echo_n "checking for objdir... " >&6; }
19449 if ${lt_cv_objdir+:} false; then :
19450   $as_echo_n "(cached) " >&6
19451 else
19452   rm -f .libs 2>/dev/null
19453 mkdir .libs 2>/dev/null
19454 if test -d .libs; then
19455   lt_cv_objdir=.libs
19456 else
19457   # MS-DOS does not allow filenames that begin with a dot.
19458   lt_cv_objdir=_libs
19459 fi
19460 rmdir .libs 2>/dev/null
19461 fi
19462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
19463 $as_echo "$lt_cv_objdir" >&6; }
19464 objdir=$lt_cv_objdir
19465
19466
19467
19468
19469
19470 cat >>confdefs.h <<_ACEOF
19471 #define LT_OBJDIR "$lt_cv_objdir/"
19472 _ACEOF
19473
19474
19475
19476
19477 case $host_os in
19478 aix3*)
19479   # AIX sometimes has problems with the GCC collect2 program.  For some
19480   # reason, if we set the COLLECT_NAMES environment variable, the problems
19481   # vanish in a puff of smoke.
19482   if test "X${COLLECT_NAMES+set}" != Xset; then
19483     COLLECT_NAMES=
19484     export COLLECT_NAMES
19485   fi
19486   ;;
19487 esac
19488
19489 # Global variables:
19490 ofile=libtool
19491 can_build_shared=yes
19492
19493 # All known linkers require a `.a' archive for static linking (except MSVC,
19494 # which needs '.lib').
19495 libext=a
19496
19497 with_gnu_ld="$lt_cv_prog_gnu_ld"
19498
19499 old_CC="$CC"
19500 old_CFLAGS="$CFLAGS"
19501
19502 # Set sane defaults for various variables
19503 test -z "$CC" && CC=cc
19504 test -z "$LTCC" && LTCC=$CC
19505 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
19506 test -z "$LD" && LD=ld
19507 test -z "$ac_objext" && ac_objext=o
19508
19509 for cc_temp in $compiler""; do
19510   case $cc_temp in
19511     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
19512     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
19513     \-*) ;;
19514     *) break;;
19515   esac
19516 done
19517 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
19518
19519
19520 # Only perform the check for file, if the check method requires it
19521 test -z "$MAGIC_CMD" && MAGIC_CMD=file
19522 case $deplibs_check_method in
19523 file_magic*)
19524   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
19525     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
19526 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
19527 if ${lt_cv_path_MAGIC_CMD+:} false; then :
19528   $as_echo_n "(cached) " >&6
19529 else
19530   case $MAGIC_CMD in
19531 [\\/*] |  ?:[\\/]*)
19532   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
19533   ;;
19534 *)
19535   lt_save_MAGIC_CMD="$MAGIC_CMD"
19536   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
19537   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
19538   for ac_dir in $ac_dummy; do
19539     IFS="$lt_save_ifs"
19540     test -z "$ac_dir" && ac_dir=.
19541     if test -f $ac_dir/${ac_tool_prefix}file; then
19542       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
19543       if test -n "$file_magic_test_file"; then
19544         case $deplibs_check_method in
19545         "file_magic "*)
19546           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
19547           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19548           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
19549             $EGREP "$file_magic_regex" > /dev/null; then
19550             :
19551           else
19552             cat <<_LT_EOF 1>&2
19553
19554 *** Warning: the command libtool uses to detect shared libraries,
19555 *** $file_magic_cmd, produces output that libtool cannot recognize.
19556 *** The result is that libtool may fail to recognize shared libraries
19557 *** as such.  This will affect the creation of libtool libraries that
19558 *** depend on shared libraries, but programs linked with such libtool
19559 *** libraries will work regardless of this problem.  Nevertheless, you
19560 *** may want to report the problem to your system manager and/or to
19561 *** bug-libtool@gnu.org
19562
19563 _LT_EOF
19564           fi ;;
19565         esac
19566       fi
19567       break
19568     fi
19569   done
19570   IFS="$lt_save_ifs"
19571   MAGIC_CMD="$lt_save_MAGIC_CMD"
19572   ;;
19573 esac
19574 fi
19575
19576 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19577 if test -n "$MAGIC_CMD"; then
19578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
19579 $as_echo "$MAGIC_CMD" >&6; }
19580 else
19581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19582 $as_echo "no" >&6; }
19583 fi
19584
19585
19586
19587
19588
19589 if test -z "$lt_cv_path_MAGIC_CMD"; then
19590   if test -n "$ac_tool_prefix"; then
19591     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
19592 $as_echo_n "checking for file... " >&6; }
19593 if ${lt_cv_path_MAGIC_CMD+:} false; then :
19594   $as_echo_n "(cached) " >&6
19595 else
19596   case $MAGIC_CMD in
19597 [\\/*] |  ?:[\\/]*)
19598   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
19599   ;;
19600 *)
19601   lt_save_MAGIC_CMD="$MAGIC_CMD"
19602   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
19603   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
19604   for ac_dir in $ac_dummy; do
19605     IFS="$lt_save_ifs"
19606     test -z "$ac_dir" && ac_dir=.
19607     if test -f $ac_dir/file; then
19608       lt_cv_path_MAGIC_CMD="$ac_dir/file"
19609       if test -n "$file_magic_test_file"; then
19610         case $deplibs_check_method in
19611         "file_magic "*)
19612           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
19613           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19614           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
19615             $EGREP "$file_magic_regex" > /dev/null; then
19616             :
19617           else
19618             cat <<_LT_EOF 1>&2
19619
19620 *** Warning: the command libtool uses to detect shared libraries,
19621 *** $file_magic_cmd, produces output that libtool cannot recognize.
19622 *** The result is that libtool may fail to recognize shared libraries
19623 *** as such.  This will affect the creation of libtool libraries that
19624 *** depend on shared libraries, but programs linked with such libtool
19625 *** libraries will work regardless of this problem.  Nevertheless, you
19626 *** may want to report the problem to your system manager and/or to
19627 *** bug-libtool@gnu.org
19628
19629 _LT_EOF
19630           fi ;;
19631         esac
19632       fi
19633       break
19634     fi
19635   done
19636   IFS="$lt_save_ifs"
19637   MAGIC_CMD="$lt_save_MAGIC_CMD"
19638   ;;
19639 esac
19640 fi
19641
19642 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19643 if test -n "$MAGIC_CMD"; then
19644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
19645 $as_echo "$MAGIC_CMD" >&6; }
19646 else
19647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19648 $as_echo "no" >&6; }
19649 fi
19650
19651
19652   else
19653     MAGIC_CMD=:
19654   fi
19655 fi
19656
19657   fi
19658   ;;
19659 esac
19660
19661 # Use C for the default configuration in the libtool script
19662
19663 lt_save_CC="$CC"
19664 ac_ext=c
19665 ac_cpp='$CPP $CPPFLAGS'
19666 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19667 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19668 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19669
19670
19671 # Source file extension for C test sources.
19672 ac_ext=c
19673
19674 # Object file extension for compiled C test sources.
19675 objext=o
19676 objext=$objext
19677
19678 # Code to be used in simple compile tests
19679 lt_simple_compile_test_code="int some_variable = 0;"
19680
19681 # Code to be used in simple link tests
19682 lt_simple_link_test_code='int main(){return(0);}'
19683
19684
19685
19686
19687
19688
19689
19690 # If no C compiler was specified, use CC.
19691 LTCC=${LTCC-"$CC"}
19692
19693 # If no C compiler flags were specified, use CFLAGS.
19694 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
19695
19696 # Allow CC to be a program name with arguments.
19697 compiler=$CC
19698
19699 # Save the default compiler, since it gets overwritten when the other
19700 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
19701 compiler_DEFAULT=$CC
19702
19703 # save warnings/boilerplate of simple test code
19704 ac_outfile=conftest.$ac_objext
19705 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
19706 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19707 _lt_compiler_boilerplate=`cat conftest.err`
19708 $RM conftest*
19709
19710 ac_outfile=conftest.$ac_objext
19711 echo "$lt_simple_link_test_code" >conftest.$ac_ext
19712 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19713 _lt_linker_boilerplate=`cat conftest.err`
19714 $RM -r conftest*
19715
19716
19717 ## CAVEAT EMPTOR:
19718 ## There is no encapsulation within the following macros, do not change
19719 ## the running order or otherwise move them around unless you know exactly
19720 ## what you are doing...
19721 if test -n "$compiler"; then
19722
19723 lt_prog_compiler_no_builtin_flag=
19724
19725 if test "$GCC" = yes; then
19726   case $cc_basename in
19727   nvcc*)
19728     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
19729   *)
19730     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
19731   esac
19732
19733   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
19734 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
19735 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
19736   $as_echo_n "(cached) " >&6
19737 else
19738   lt_cv_prog_compiler_rtti_exceptions=no
19739    ac_outfile=conftest.$ac_objext
19740    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19741    lt_compiler_flag="-fno-rtti -fno-exceptions"
19742    # Insert the option either (1) after the last *FLAGS variable, or
19743    # (2) before a word containing "conftest.", or (3) at the end.
19744    # Note that $ac_compile itself does not contain backslashes and begins
19745    # with a dollar sign (not a hyphen), so the echo should work correctly.
19746    # The option is referenced via a variable to avoid confusing sed.
19747    lt_compile=`echo "$ac_compile" | $SED \
19748    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19749    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19750    -e 's:$: $lt_compiler_flag:'`
19751    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19752    (eval "$lt_compile" 2>conftest.err)
19753    ac_status=$?
19754    cat conftest.err >&5
19755    echo "$as_me:$LINENO: \$? = $ac_status" >&5
19756    if (exit $ac_status) && test -s "$ac_outfile"; then
19757      # The compiler can only warn and ignore the option if not recognized
19758      # So say no if there are warnings other than the usual output.
19759      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
19760      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19761      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
19762        lt_cv_prog_compiler_rtti_exceptions=yes
19763      fi
19764    fi
19765    $RM conftest*
19766
19767 fi
19768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
19769 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
19770
19771 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
19772     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
19773 else
19774     :
19775 fi
19776
19777 fi
19778
19779
19780
19781
19782
19783
19784   lt_prog_compiler_wl=
19785 lt_prog_compiler_pic=
19786 lt_prog_compiler_static=
19787
19788
19789   if test "$GCC" = yes; then
19790     lt_prog_compiler_wl='-Wl,'
19791     lt_prog_compiler_static='-static'
19792
19793     case $host_os in
19794       aix*)
19795       # All AIX code is PIC.
19796       if test "$host_cpu" = ia64; then
19797         # AIX 5 now supports IA64 processor
19798         lt_prog_compiler_static='-Bstatic'
19799       fi
19800       ;;
19801
19802     amigaos*)
19803       case $host_cpu in
19804       powerpc)
19805             # see comment about AmigaOS4 .so support
19806             lt_prog_compiler_pic='-fPIC'
19807         ;;
19808       m68k)
19809             # FIXME: we need at least 68020 code to build shared libraries, but
19810             # adding the `-m68020' flag to GCC prevents building anything better,
19811             # like `-m68040'.
19812             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
19813         ;;
19814       esac
19815       ;;
19816
19817     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
19818       # PIC is the default for these OSes.
19819       ;;
19820
19821     mingw* | cygwin* | pw32* | os2* | cegcc*)
19822       # This hack is so that the source file can tell whether it is being
19823       # built for inclusion in a dll (and should export symbols for example).
19824       # Although the cygwin gcc ignores -fPIC, still need this for old-style
19825       # (--disable-auto-import) libraries
19826       lt_prog_compiler_pic='-DDLL_EXPORT'
19827       ;;
19828
19829     darwin* | rhapsody*)
19830       # PIC is the default on this platform
19831       # Common symbols not allowed in MH_DYLIB files
19832       lt_prog_compiler_pic='-fno-common'
19833       ;;
19834
19835     haiku*)
19836       # PIC is the default for Haiku.
19837       # The "-static" flag exists, but is broken.
19838       lt_prog_compiler_static=
19839       ;;
19840
19841     hpux*)
19842       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
19843       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
19844       # sets the default TLS model and affects inlining.
19845       case $host_cpu in
19846       hppa*64*)
19847         # +Z the default
19848         ;;
19849       *)
19850         lt_prog_compiler_pic='-fPIC'
19851         ;;
19852       esac
19853       ;;
19854
19855     interix[3-9]*)
19856       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
19857       # Instead, we relocate shared libraries at runtime.
19858       ;;
19859
19860     msdosdjgpp*)
19861       # Just because we use GCC doesn't mean we suddenly get shared libraries
19862       # on systems that don't support them.
19863       lt_prog_compiler_can_build_shared=no
19864       enable_shared=no
19865       ;;
19866
19867     *nto* | *qnx*)
19868       # QNX uses GNU C++, but need to define -shared option too, otherwise
19869       # it will coredump.
19870       lt_prog_compiler_pic='-fPIC -shared'
19871       ;;
19872
19873     sysv4*MP*)
19874       if test -d /usr/nec; then
19875         lt_prog_compiler_pic=-Kconform_pic
19876       fi
19877       ;;
19878
19879     *)
19880       lt_prog_compiler_pic='-fPIC'
19881       ;;
19882     esac
19883
19884     case $cc_basename in
19885     nvcc*) # Cuda Compiler Driver 2.2
19886       lt_prog_compiler_wl='-Xlinker '
19887       lt_prog_compiler_pic='-Xcompiler -fPIC'
19888       ;;
19889     esac
19890   else
19891     # PORTME Check for flag to pass linker flags through the system compiler.
19892     case $host_os in
19893     aix*)
19894       lt_prog_compiler_wl='-Wl,'
19895       if test "$host_cpu" = ia64; then
19896         # AIX 5 now supports IA64 processor
19897         lt_prog_compiler_static='-Bstatic'
19898       else
19899         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
19900       fi
19901       ;;
19902
19903     mingw* | cygwin* | pw32* | os2* | cegcc*)
19904       # This hack is so that the source file can tell whether it is being
19905       # built for inclusion in a dll (and should export symbols for example).
19906       lt_prog_compiler_pic='-DDLL_EXPORT'
19907       ;;
19908
19909     hpux9* | hpux10* | hpux11*)
19910       lt_prog_compiler_wl='-Wl,'
19911       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
19912       # not for PA HP-UX.
19913       case $host_cpu in
19914       hppa*64*|ia64*)
19915         # +Z the default
19916         ;;
19917       *)
19918         lt_prog_compiler_pic='+Z'
19919         ;;
19920       esac
19921       # Is there a better lt_prog_compiler_static that works with the bundled CC?
19922       lt_prog_compiler_static='${wl}-a ${wl}archive'
19923       ;;
19924
19925     irix5* | irix6* | nonstopux*)
19926       lt_prog_compiler_wl='-Wl,'
19927       # PIC (with -KPIC) is the default.
19928       lt_prog_compiler_static='-non_shared'
19929       ;;
19930
19931     linux* | k*bsd*-gnu | kopensolaris*-gnu)
19932       case $cc_basename in
19933       # old Intel for x86_64 which still supported -KPIC.
19934       ecc*)
19935         lt_prog_compiler_wl='-Wl,'
19936         lt_prog_compiler_pic='-KPIC'
19937         lt_prog_compiler_static='-static'
19938         ;;
19939       # icc used to be incompatible with GCC.
19940       # ICC 10 doesn't accept -KPIC any more.
19941       icc* | ifort*)
19942         lt_prog_compiler_wl='-Wl,'
19943         lt_prog_compiler_pic='-fPIC'
19944         lt_prog_compiler_static='-static'
19945         ;;
19946       # Lahey Fortran 8.1.
19947       lf95*)
19948         lt_prog_compiler_wl='-Wl,'
19949         lt_prog_compiler_pic='--shared'
19950         lt_prog_compiler_static='--static'
19951         ;;
19952       nagfor*)
19953         # NAG Fortran compiler
19954         lt_prog_compiler_wl='-Wl,-Wl,,'
19955         lt_prog_compiler_pic='-PIC'
19956         lt_prog_compiler_static='-Bstatic'
19957         ;;
19958       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
19959         # Portland Group compilers (*not* the Pentium gcc compiler,
19960         # which looks to be a dead project)
19961         lt_prog_compiler_wl='-Wl,'
19962         lt_prog_compiler_pic='-fpic'
19963         lt_prog_compiler_static='-Bstatic'
19964         ;;
19965       ccc*)
19966         lt_prog_compiler_wl='-Wl,'
19967         # All Alpha code is PIC.
19968         lt_prog_compiler_static='-non_shared'
19969         ;;
19970       xl* | bgxl* | bgf* | mpixl*)
19971         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
19972         lt_prog_compiler_wl='-Wl,'
19973         lt_prog_compiler_pic='-qpic'
19974         lt_prog_compiler_static='-qstaticlink'
19975         ;;
19976       *)
19977         case `$CC -V 2>&1 | sed 5q` in
19978         *Sun\ F* | *Sun*Fortran*)
19979           # Sun Fortran 8.3 passes all unrecognized flags to the linker
19980           lt_prog_compiler_pic='-KPIC'
19981           lt_prog_compiler_static='-Bstatic'
19982           lt_prog_compiler_wl=''
19983           ;;
19984         *Sun\ C*)
19985           # Sun C 5.9
19986           lt_prog_compiler_pic='-KPIC'
19987           lt_prog_compiler_static='-Bstatic'
19988           lt_prog_compiler_wl='-Wl,'
19989           ;;
19990         esac
19991         ;;
19992       esac
19993       ;;
19994
19995     newsos6)
19996       lt_prog_compiler_pic='-KPIC'
19997       lt_prog_compiler_static='-Bstatic'
19998       ;;
19999
20000     *nto* | *qnx*)
20001       # QNX uses GNU C++, but need to define -shared option too, otherwise
20002       # it will coredump.
20003       lt_prog_compiler_pic='-fPIC -shared'
20004       ;;
20005
20006     osf3* | osf4* | osf5*)
20007       lt_prog_compiler_wl='-Wl,'
20008       # All OSF/1 code is PIC.
20009       lt_prog_compiler_static='-non_shared'
20010       ;;
20011
20012     rdos*)
20013       lt_prog_compiler_static='-non_shared'
20014       ;;
20015
20016     solaris*)
20017       lt_prog_compiler_pic='-KPIC'
20018       lt_prog_compiler_static='-Bstatic'
20019       case $cc_basename in
20020       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
20021         lt_prog_compiler_wl='-Qoption ld ';;
20022       *)
20023         lt_prog_compiler_wl='-Wl,';;
20024       esac
20025       ;;
20026
20027     sunos4*)
20028       lt_prog_compiler_wl='-Qoption ld '
20029       lt_prog_compiler_pic='-PIC'
20030       lt_prog_compiler_static='-Bstatic'
20031       ;;
20032
20033     sysv4 | sysv4.2uw2* | sysv4.3*)
20034       lt_prog_compiler_wl='-Wl,'
20035       lt_prog_compiler_pic='-KPIC'
20036       lt_prog_compiler_static='-Bstatic'
20037       ;;
20038
20039     sysv4*MP*)
20040       if test -d /usr/nec ;then
20041         lt_prog_compiler_pic='-Kconform_pic'
20042         lt_prog_compiler_static='-Bstatic'
20043       fi
20044       ;;
20045
20046     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
20047       lt_prog_compiler_wl='-Wl,'
20048       lt_prog_compiler_pic='-KPIC'
20049       lt_prog_compiler_static='-Bstatic'
20050       ;;
20051
20052     unicos*)
20053       lt_prog_compiler_wl='-Wl,'
20054       lt_prog_compiler_can_build_shared=no
20055       ;;
20056
20057     uts4*)
20058       lt_prog_compiler_pic='-pic'
20059       lt_prog_compiler_static='-Bstatic'
20060       ;;
20061
20062     *)
20063       lt_prog_compiler_can_build_shared=no
20064       ;;
20065     esac
20066   fi
20067
20068 case $host_os in
20069   # For platforms which do not support PIC, -DPIC is meaningless:
20070   *djgpp*)
20071     lt_prog_compiler_pic=
20072     ;;
20073   *)
20074     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
20075     ;;
20076 esac
20077
20078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
20079 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
20080 if ${lt_cv_prog_compiler_pic+:} false; then :
20081   $as_echo_n "(cached) " >&6
20082 else
20083   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
20084 fi
20085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
20086 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
20087 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
20088
20089 #
20090 # Check to make sure the PIC flag actually works.
20091 #
20092 if test -n "$lt_prog_compiler_pic"; then
20093   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
20094 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
20095 if ${lt_cv_prog_compiler_pic_works+:} false; then :
20096   $as_echo_n "(cached) " >&6
20097 else
20098   lt_cv_prog_compiler_pic_works=no
20099    ac_outfile=conftest.$ac_objext
20100    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20101    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
20102    # Insert the option either (1) after the last *FLAGS variable, or
20103    # (2) before a word containing "conftest.", or (3) at the end.
20104    # Note that $ac_compile itself does not contain backslashes and begins
20105    # with a dollar sign (not a hyphen), so the echo should work correctly.
20106    # The option is referenced via a variable to avoid confusing sed.
20107    lt_compile=`echo "$ac_compile" | $SED \
20108    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20109    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
20110    -e 's:$: $lt_compiler_flag:'`
20111    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
20112    (eval "$lt_compile" 2>conftest.err)
20113    ac_status=$?
20114    cat conftest.err >&5
20115    echo "$as_me:$LINENO: \$? = $ac_status" >&5
20116    if (exit $ac_status) && test -s "$ac_outfile"; then
20117      # The compiler can only warn and ignore the option if not recognized
20118      # So say no if there are warnings other than the usual output.
20119      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
20120      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
20121      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
20122        lt_cv_prog_compiler_pic_works=yes
20123      fi
20124    fi
20125    $RM conftest*
20126
20127 fi
20128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
20129 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
20130
20131 if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
20132     case $lt_prog_compiler_pic in
20133      "" | " "*) ;;
20134      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
20135      esac
20136 else
20137     lt_prog_compiler_pic=
20138      lt_prog_compiler_can_build_shared=no
20139 fi
20140
20141 fi
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153 #
20154 # Check to make sure the static flag actually works.
20155 #
20156 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
20157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
20158 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
20159 if ${lt_cv_prog_compiler_static_works+:} false; then :
20160   $as_echo_n "(cached) " >&6
20161 else
20162   lt_cv_prog_compiler_static_works=no
20163    save_LDFLAGS="$LDFLAGS"
20164    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
20165    echo "$lt_simple_link_test_code" > conftest.$ac_ext
20166    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
20167      # The linker can only warn and ignore the option if not recognized
20168      # So say no if there are warnings
20169      if test -s conftest.err; then
20170        # Append any errors to the config.log.
20171        cat conftest.err 1>&5
20172        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
20173        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
20174        if diff conftest.exp conftest.er2 >/dev/null; then
20175          lt_cv_prog_compiler_static_works=yes
20176        fi
20177      else
20178        lt_cv_prog_compiler_static_works=yes
20179      fi
20180    fi
20181    $RM -r conftest*
20182    LDFLAGS="$save_LDFLAGS"
20183
20184 fi
20185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
20186 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
20187
20188 if test x"$lt_cv_prog_compiler_static_works" = xyes; then
20189     :
20190 else
20191     lt_prog_compiler_static=
20192 fi
20193
20194
20195
20196
20197
20198
20199
20200   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
20201 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
20202 if ${lt_cv_prog_compiler_c_o+:} false; then :
20203   $as_echo_n "(cached) " >&6
20204 else
20205   lt_cv_prog_compiler_c_o=no
20206    $RM -r conftest 2>/dev/null
20207    mkdir conftest
20208    cd conftest
20209    mkdir out
20210    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20211
20212    lt_compiler_flag="-o out/conftest2.$ac_objext"
20213    # Insert the option either (1) after the last *FLAGS variable, or
20214    # (2) before a word containing "conftest.", or (3) at the end.
20215    # Note that $ac_compile itself does not contain backslashes and begins
20216    # with a dollar sign (not a hyphen), so the echo should work correctly.
20217    lt_compile=`echo "$ac_compile" | $SED \
20218    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20219    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
20220    -e 's:$: $lt_compiler_flag:'`
20221    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
20222    (eval "$lt_compile" 2>out/conftest.err)
20223    ac_status=$?
20224    cat out/conftest.err >&5
20225    echo "$as_me:$LINENO: \$? = $ac_status" >&5
20226    if (exit $ac_status) && test -s out/conftest2.$ac_objext
20227    then
20228      # The compiler can only warn and ignore the option if not recognized
20229      # So say no if there are warnings
20230      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
20231      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
20232      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
20233        lt_cv_prog_compiler_c_o=yes
20234      fi
20235    fi
20236    chmod u+w . 2>&5
20237    $RM conftest*
20238    # SGI C++ compiler will create directory out/ii_files/ for
20239    # template instantiation
20240    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
20241    $RM out/* && rmdir out
20242    cd ..
20243    $RM -r conftest
20244    $RM conftest*
20245
20246 fi
20247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
20248 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
20249
20250
20251
20252
20253
20254
20255   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
20256 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
20257 if ${lt_cv_prog_compiler_c_o+:} false; then :
20258   $as_echo_n "(cached) " >&6
20259 else
20260   lt_cv_prog_compiler_c_o=no
20261    $RM -r conftest 2>/dev/null
20262    mkdir conftest
20263    cd conftest
20264    mkdir out
20265    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20266
20267    lt_compiler_flag="-o out/conftest2.$ac_objext"
20268    # Insert the option either (1) after the last *FLAGS variable, or
20269    # (2) before a word containing "conftest.", or (3) at the end.
20270    # Note that $ac_compile itself does not contain backslashes and begins
20271    # with a dollar sign (not a hyphen), so the echo should work correctly.
20272    lt_compile=`echo "$ac_compile" | $SED \
20273    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20274    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
20275    -e 's:$: $lt_compiler_flag:'`
20276    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
20277    (eval "$lt_compile" 2>out/conftest.err)
20278    ac_status=$?
20279    cat out/conftest.err >&5
20280    echo "$as_me:$LINENO: \$? = $ac_status" >&5
20281    if (exit $ac_status) && test -s out/conftest2.$ac_objext
20282    then
20283      # The compiler can only warn and ignore the option if not recognized
20284      # So say no if there are warnings
20285      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
20286      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
20287      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
20288        lt_cv_prog_compiler_c_o=yes
20289      fi
20290    fi
20291    chmod u+w . 2>&5
20292    $RM conftest*
20293    # SGI C++ compiler will create directory out/ii_files/ for
20294    # template instantiation
20295    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
20296    $RM out/* && rmdir out
20297    cd ..
20298    $RM -r conftest
20299    $RM conftest*
20300
20301 fi
20302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
20303 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
20304
20305
20306
20307
20308 hard_links="nottested"
20309 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
20310   # do not overwrite the value of need_locks provided by the user
20311   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
20312 $as_echo_n "checking if we can lock with hard links... " >&6; }
20313   hard_links=yes
20314   $RM conftest*
20315   ln conftest.a conftest.b 2>/dev/null && hard_links=no
20316   touch conftest.a
20317   ln conftest.a conftest.b 2>&5 || hard_links=no
20318   ln conftest.a conftest.b 2>/dev/null && hard_links=no
20319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
20320 $as_echo "$hard_links" >&6; }
20321   if test "$hard_links" = no; then
20322     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
20323 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
20324     need_locks=warn
20325   fi
20326 else
20327   need_locks=no
20328 fi
20329
20330
20331
20332
20333
20334
20335   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
20336 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
20337
20338   runpath_var=
20339   allow_undefined_flag=
20340   always_export_symbols=no
20341   archive_cmds=
20342   archive_expsym_cmds=
20343   compiler_needs_object=no
20344   enable_shared_with_static_runtimes=no
20345   export_dynamic_flag_spec=
20346   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
20347   hardcode_automatic=no
20348   hardcode_direct=no
20349   hardcode_direct_absolute=no
20350   hardcode_libdir_flag_spec=
20351   hardcode_libdir_flag_spec_ld=
20352   hardcode_libdir_separator=
20353   hardcode_minus_L=no
20354   hardcode_shlibpath_var=unsupported
20355   inherit_rpath=no
20356   link_all_deplibs=unknown
20357   module_cmds=
20358   module_expsym_cmds=
20359   old_archive_from_new_cmds=
20360   old_archive_from_expsyms_cmds=
20361   thread_safe_flag_spec=
20362   whole_archive_flag_spec=
20363   # include_expsyms should be a list of space-separated symbols to be *always*
20364   # included in the symbol list
20365   include_expsyms=
20366   # exclude_expsyms can be an extended regexp of symbols to exclude
20367   # it will be wrapped by ` (' and `)$', so one must not match beginning or
20368   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
20369   # as well as any symbol that contains `d'.
20370   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
20371   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
20372   # platforms (ab)use it in PIC code, but their linkers get confused if
20373   # the symbol is explicitly referenced.  Since portable code cannot
20374   # rely on this symbol name, it's probably fine to never include it in
20375   # preloaded symbol tables.
20376   # Exclude shared library initialization/finalization symbols.
20377   extract_expsyms_cmds=
20378
20379   case $host_os in
20380   cygwin* | mingw* | pw32* | cegcc*)
20381     # FIXME: the MSVC++ port hasn't been tested in a loooong time
20382     # When not using gcc, we currently assume that we are using
20383     # Microsoft Visual C++.
20384     if test "$GCC" != yes; then
20385       with_gnu_ld=no
20386     fi
20387     ;;
20388   interix*)
20389     # we just hope/assume this is gcc and not c89 (= MSVC++)
20390     with_gnu_ld=yes
20391     ;;
20392   openbsd*)
20393     with_gnu_ld=no
20394     ;;
20395   esac
20396
20397   ld_shlibs=yes
20398
20399   # On some targets, GNU ld is compatible enough with the native linker
20400   # that we're better off using the native interface for both.
20401   lt_use_gnu_ld_interface=no
20402   if test "$with_gnu_ld" = yes; then
20403     case $host_os in
20404       aix*)
20405         # The AIX port of GNU ld has always aspired to compatibility
20406         # with the native linker.  However, as the warning in the GNU ld
20407         # block says, versions before 2.19.5* couldn't really create working
20408         # shared libraries, regardless of the interface used.
20409         case `$LD -v 2>&1` in
20410           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
20411           *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
20412           *\ \(GNU\ Binutils\)\ [3-9]*) ;;
20413           *)
20414             lt_use_gnu_ld_interface=yes
20415             ;;
20416         esac
20417         ;;
20418       *)
20419         lt_use_gnu_ld_interface=yes
20420         ;;
20421     esac
20422   fi
20423
20424   if test "$lt_use_gnu_ld_interface" = yes; then
20425     # If archive_cmds runs LD, not CC, wlarc should be empty
20426     wlarc='${wl}'
20427
20428     # Set some defaults for GNU ld with shared library support. These
20429     # are reset later if shared libraries are not supported. Putting them
20430     # here allows them to be overridden if necessary.
20431     runpath_var=LD_RUN_PATH
20432     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
20433     export_dynamic_flag_spec='${wl}--export-dynamic'
20434     # ancient GNU ld didn't support --whole-archive et. al.
20435     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
20436       whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
20437     else
20438       whole_archive_flag_spec=
20439     fi
20440     supports_anon_versioning=no
20441     case `$LD -v 2>&1` in
20442       *GNU\ gold*) supports_anon_versioning=yes ;;
20443       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
20444       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
20445       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
20446       *\ 2.11.*) ;; # other 2.11 versions
20447       *) supports_anon_versioning=yes ;;
20448     esac
20449
20450     # See if GNU ld supports shared libraries.
20451     case $host_os in
20452     aix[3-9]*)
20453       # On AIX/PPC, the GNU linker is very broken
20454       if test "$host_cpu" != ia64; then
20455         ld_shlibs=no
20456         cat <<_LT_EOF 1>&2
20457
20458 *** Warning: the GNU linker, at least up to release 2.19, is reported
20459 *** to be unable to reliably create shared libraries on AIX.
20460 *** Therefore, libtool is disabling shared libraries support.  If you
20461 *** really care for shared libraries, you may want to install binutils
20462 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
20463 *** You will then need to restart the configuration process.
20464
20465 _LT_EOF
20466       fi
20467       ;;
20468
20469     amigaos*)
20470       case $host_cpu in
20471       powerpc)
20472             # see comment about AmigaOS4 .so support
20473             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20474             archive_expsym_cmds=''
20475         ;;
20476       m68k)
20477             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)'
20478             hardcode_libdir_flag_spec='-L$libdir'
20479             hardcode_minus_L=yes
20480         ;;
20481       esac
20482       ;;
20483
20484     beos*)
20485       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20486         allow_undefined_flag=unsupported
20487         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
20488         # support --undefined.  This deserves some investigation.  FIXME
20489         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20490       else
20491         ld_shlibs=no
20492       fi
20493       ;;
20494
20495     cygwin* | mingw* | pw32* | cegcc*)
20496       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
20497       # as there is no search path for DLLs.
20498       hardcode_libdir_flag_spec='-L$libdir'
20499       export_dynamic_flag_spec='${wl}--export-all-symbols'
20500       allow_undefined_flag=unsupported
20501       always_export_symbols=no
20502       enable_shared_with_static_runtimes=yes
20503       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'
20504       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
20505
20506       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
20507         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
20508         # If the export-symbols file already is a .def file (1st line
20509         # is EXPORTS), use it as is; otherwise, prepend...
20510         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
20511           cp $export_symbols $output_objdir/$soname.def;
20512         else
20513           echo EXPORTS > $output_objdir/$soname.def;
20514           cat $export_symbols >> $output_objdir/$soname.def;
20515         fi~
20516         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
20517       else
20518         ld_shlibs=no
20519       fi
20520       ;;
20521
20522     haiku*)
20523       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20524       link_all_deplibs=yes
20525       ;;
20526
20527     interix[3-9]*)
20528       hardcode_direct=no
20529       hardcode_shlibpath_var=no
20530       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
20531       export_dynamic_flag_spec='${wl}-E'
20532       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
20533       # Instead, shared libraries are loaded at an image base (0x10000000 by
20534       # default) and relocated if they conflict, which is a slow very memory
20535       # consuming and fragmenting process.  To avoid this, we pick a random,
20536       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
20537       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
20538       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
20539       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'
20540       ;;
20541
20542     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
20543       tmp_diet=no
20544       if test "$host_os" = linux-dietlibc; then
20545         case $cc_basename in
20546           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
20547         esac
20548       fi
20549       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
20550          && test "$tmp_diet" = no
20551       then
20552         tmp_addflag=' $pic_flag'
20553         tmp_sharedflag='-shared'
20554         case $cc_basename,$host_cpu in
20555         pgcc*)                          # Portland Group C compiler
20556           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'
20557           tmp_addflag=' $pic_flag'
20558           ;;
20559         pgf77* | pgf90* | pgf95* | pgfortran*)
20560                                         # Portland Group f77 and f90 compilers
20561           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'
20562           tmp_addflag=' $pic_flag -Mnomain' ;;
20563         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
20564           tmp_addflag=' -i_dynamic' ;;
20565         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
20566           tmp_addflag=' -i_dynamic -nofor_main' ;;
20567         ifc* | ifort*)                  # Intel Fortran compiler
20568           tmp_addflag=' -nofor_main' ;;
20569         lf95*)                          # Lahey Fortran 8.1
20570           whole_archive_flag_spec=
20571           tmp_sharedflag='--shared' ;;
20572         xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
20573           tmp_sharedflag='-qmkshrobj'
20574           tmp_addflag= ;;
20575         nvcc*)  # Cuda Compiler Driver 2.2
20576           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'
20577           compiler_needs_object=yes
20578           ;;
20579         esac
20580         case `$CC -V 2>&1 | sed 5q` in
20581         *Sun\ C*)                       # Sun C 5.9
20582           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'
20583           compiler_needs_object=yes
20584           tmp_sharedflag='-G' ;;
20585         *Sun\ F*)                       # Sun Fortran 8.3
20586           tmp_sharedflag='-G' ;;
20587         esac
20588         archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20589
20590         if test "x$supports_anon_versioning" = xyes; then
20591           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
20592             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
20593             echo "local: *; };" >> $output_objdir/$libname.ver~
20594             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
20595         fi
20596
20597         case $cc_basename in
20598         xlf* | bgf* | bgxlf* | mpixlf*)
20599           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
20600           whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
20601           hardcode_libdir_flag_spec=
20602           hardcode_libdir_flag_spec_ld='-rpath $libdir'
20603           archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
20604           if test "x$supports_anon_versioning" = xyes; then
20605             archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
20606               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
20607               echo "local: *; };" >> $output_objdir/$libname.ver~
20608               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
20609           fi
20610           ;;
20611         esac
20612       else
20613         ld_shlibs=no
20614       fi
20615       ;;
20616
20617     netbsd*)
20618       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
20619         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
20620         wlarc=
20621       else
20622         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20623         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20624       fi
20625       ;;
20626
20627     solaris*)
20628       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
20629         ld_shlibs=no
20630         cat <<_LT_EOF 1>&2
20631
20632 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
20633 *** create shared libraries on Solaris systems.  Therefore, libtool
20634 *** is disabling shared libraries support.  We urge you to upgrade GNU
20635 *** binutils to release 2.9.1 or newer.  Another option is to modify
20636 *** your PATH or compiler configuration so that the native linker is
20637 *** used, and then restart.
20638
20639 _LT_EOF
20640       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20641         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20642         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20643       else
20644         ld_shlibs=no
20645       fi
20646       ;;
20647
20648     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
20649       case `$LD -v 2>&1` in
20650         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
20651         ld_shlibs=no
20652         cat <<_LT_EOF 1>&2
20653
20654 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
20655 *** reliably create shared libraries on SCO systems.  Therefore, libtool
20656 *** is disabling shared libraries support.  We urge you to upgrade GNU
20657 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
20658 *** your PATH or compiler configuration so that the native linker is
20659 *** used, and then restart.
20660
20661 _LT_EOF
20662         ;;
20663         *)
20664           # For security reasons, it is highly recommended that you always
20665           # use absolute paths for naming shared libraries, and exclude the
20666           # DT_RUNPATH tag from executables and libraries.  But doing so
20667           # requires that you compile everything twice, which is a pain.
20668           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20669             hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
20670             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20671             archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20672           else
20673             ld_shlibs=no
20674           fi
20675         ;;
20676       esac
20677       ;;
20678
20679     sunos4*)
20680       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
20681       wlarc=
20682       hardcode_direct=yes
20683       hardcode_shlibpath_var=no
20684       ;;
20685
20686     *)
20687       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20688         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20689         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20690       else
20691         ld_shlibs=no
20692       fi
20693       ;;
20694     esac
20695
20696     if test "$ld_shlibs" = no; then
20697       runpath_var=
20698       hardcode_libdir_flag_spec=
20699       export_dynamic_flag_spec=
20700       whole_archive_flag_spec=
20701     fi
20702   else
20703     # PORTME fill in a description of your system's linker (not GNU ld)
20704     case $host_os in
20705     aix3*)
20706       allow_undefined_flag=unsupported
20707       always_export_symbols=yes
20708       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'
20709       # Note: this linker hardcodes the directories in LIBPATH if there
20710       # are no directories specified by -L.
20711       hardcode_minus_L=yes
20712       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
20713         # Neither direct hardcoding nor static linking is supported with a
20714         # broken collect2.
20715         hardcode_direct=unsupported
20716       fi
20717       ;;
20718
20719     aix[4-9]*)
20720       if test "$host_cpu" = ia64; then
20721         # On IA64, the linker does run time linking by default, so we don't
20722         # have to do anything special.
20723         aix_use_runtimelinking=no
20724         exp_sym_flag='-Bexport'
20725         no_entry_flag=""
20726       else
20727         # If we're using GNU nm, then we don't want the "-C" option.
20728         # -C means demangle to AIX nm, but means don't demangle with GNU nm
20729         # Also, AIX nm treats weak defined symbols like other global
20730         # defined symbols, whereas GNU nm marks them as "W".
20731         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
20732           export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
20733         else
20734           export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
20735         fi
20736         aix_use_runtimelinking=no
20737
20738         # Test if we are trying to use run time linking or normal
20739         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
20740         # need to do runtime linking.
20741         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
20742           for ld_flag in $LDFLAGS; do
20743           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
20744             aix_use_runtimelinking=yes
20745             break
20746           fi
20747           done
20748           ;;
20749         esac
20750
20751         exp_sym_flag='-bexport'
20752         no_entry_flag='-bnoentry'
20753       fi
20754
20755       # When large executables or shared objects are built, AIX ld can
20756       # have problems creating the table of contents.  If linking a library
20757       # or program results in "error TOC overflow" add -mminimal-toc to
20758       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
20759       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
20760
20761       archive_cmds=''
20762       hardcode_direct=yes
20763       hardcode_direct_absolute=yes
20764       hardcode_libdir_separator=':'
20765       link_all_deplibs=yes
20766       file_list_spec='${wl}-f,'
20767
20768       if test "$GCC" = yes; then
20769         case $host_os in aix4.[012]|aix4.[012].*)
20770         # We only want to do this on AIX 4.2 and lower, the check
20771         # below for broken collect2 doesn't work under 4.3+
20772           collect2name=`${CC} -print-prog-name=collect2`
20773           if test -f "$collect2name" &&
20774            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
20775           then
20776           # We have reworked collect2
20777           :
20778           else
20779           # We have old collect2
20780           hardcode_direct=unsupported
20781           # It fails to find uninstalled libraries when the uninstalled
20782           # path is not listed in the libpath.  Setting hardcode_minus_L
20783           # to unsupported forces relinking
20784           hardcode_minus_L=yes
20785           hardcode_libdir_flag_spec='-L$libdir'
20786           hardcode_libdir_separator=
20787           fi
20788           ;;
20789         esac
20790         shared_flag='-shared'
20791         if test "$aix_use_runtimelinking" = yes; then
20792           shared_flag="$shared_flag "'${wl}-G'
20793         fi
20794       else
20795         # not using gcc
20796         if test "$host_cpu" = ia64; then
20797         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
20798         # chokes on -Wl,-G. The following line is correct:
20799           shared_flag='-G'
20800         else
20801           if test "$aix_use_runtimelinking" = yes; then
20802             shared_flag='${wl}-G'
20803           else
20804             shared_flag='${wl}-bM:SRE'
20805           fi
20806         fi
20807       fi
20808
20809       export_dynamic_flag_spec='${wl}-bexpall'
20810       # It seems that -bexpall does not export symbols beginning with
20811       # underscore (_), so it is better to generate a list of symbols to export.
20812       always_export_symbols=yes
20813       if test "$aix_use_runtimelinking" = yes; then
20814         # Warning - without using the other runtime loading flags (-brtl),
20815         # -berok will link without error, but may produce a broken library.
20816         allow_undefined_flag='-berok'
20817         # Determine the default libpath from the value encoded in an
20818         # empty executable.
20819         if test "${lt_cv_aix_libpath+set}" = set; then
20820   aix_libpath=$lt_cv_aix_libpath
20821 else
20822   if ${lt_cv_aix_libpath_+:} false; then :
20823   $as_echo_n "(cached) " >&6
20824 else
20825   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20826 /* end confdefs.h.  */
20827
20828 int
20829 main ()
20830 {
20831
20832   ;
20833   return 0;
20834 }
20835 _ACEOF
20836 if ac_fn_c_try_link "$LINENO"; then :
20837
20838   lt_aix_libpath_sed='
20839       /Import File Strings/,/^$/ {
20840           /^0/ {
20841               s/^0  *\([^ ]*\) *$/\1/
20842               p
20843           }
20844       }'
20845   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20846   # Check for a 64-bit object if we didn't find anything.
20847   if test -z "$lt_cv_aix_libpath_"; then
20848     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20849   fi
20850 fi
20851 rm -f core conftest.err conftest.$ac_objext \
20852     conftest$ac_exeext conftest.$ac_ext
20853   if test -z "$lt_cv_aix_libpath_"; then
20854     lt_cv_aix_libpath_="/usr/lib:/lib"
20855   fi
20856
20857 fi
20858
20859   aix_libpath=$lt_cv_aix_libpath_
20860 fi
20861
20862         hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
20863         archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
20864       else
20865         if test "$host_cpu" = ia64; then
20866           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
20867           allow_undefined_flag="-z nodefs"
20868           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"
20869         else
20870          # Determine the default libpath from the value encoded in an
20871          # empty executable.
20872          if test "${lt_cv_aix_libpath+set}" = set; then
20873   aix_libpath=$lt_cv_aix_libpath
20874 else
20875   if ${lt_cv_aix_libpath_+:} false; then :
20876   $as_echo_n "(cached) " >&6
20877 else
20878   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20879 /* end confdefs.h.  */
20880
20881 int
20882 main ()
20883 {
20884
20885   ;
20886   return 0;
20887 }
20888 _ACEOF
20889 if ac_fn_c_try_link "$LINENO"; then :
20890
20891   lt_aix_libpath_sed='
20892       /Import File Strings/,/^$/ {
20893           /^0/ {
20894               s/^0  *\([^ ]*\) *$/\1/
20895               p
20896           }
20897       }'
20898   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20899   # Check for a 64-bit object if we didn't find anything.
20900   if test -z "$lt_cv_aix_libpath_"; then
20901     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20902   fi
20903 fi
20904 rm -f core conftest.err conftest.$ac_objext \
20905     conftest$ac_exeext conftest.$ac_ext
20906   if test -z "$lt_cv_aix_libpath_"; then
20907     lt_cv_aix_libpath_="/usr/lib:/lib"
20908   fi
20909
20910 fi
20911
20912   aix_libpath=$lt_cv_aix_libpath_
20913 fi
20914
20915          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
20916           # Warning - without using the other run time loading flags,
20917           # -berok will link without error, but may produce a broken library.
20918           no_undefined_flag=' ${wl}-bernotok'
20919           allow_undefined_flag=' ${wl}-berok'
20920           if test "$with_gnu_ld" = yes; then
20921             # We only use this code for GNU lds that support --whole-archive.
20922             whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
20923           else
20924             # Exported symbols can be pulled into shared objects from archives
20925             whole_archive_flag_spec='$convenience'
20926           fi
20927           archive_cmds_need_lc=yes
20928           # This is similar to how AIX traditionally builds its shared libraries.
20929           archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
20930         fi
20931       fi
20932       ;;
20933
20934     amigaos*)
20935       case $host_cpu in
20936       powerpc)
20937             # see comment about AmigaOS4 .so support
20938             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20939             archive_expsym_cmds=''
20940         ;;
20941       m68k)
20942             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)'
20943             hardcode_libdir_flag_spec='-L$libdir'
20944             hardcode_minus_L=yes
20945         ;;
20946       esac
20947       ;;
20948
20949     bsdi[45]*)
20950       export_dynamic_flag_spec=-rdynamic
20951       ;;
20952
20953     cygwin* | mingw* | pw32* | cegcc*)
20954       # When not using gcc, we currently assume that we are using
20955       # Microsoft Visual C++.
20956       # hardcode_libdir_flag_spec is actually meaningless, as there is
20957       # no search path for DLLs.
20958       case $cc_basename in
20959       cl*)
20960         # Native MSVC
20961         hardcode_libdir_flag_spec=' '
20962         allow_undefined_flag=unsupported
20963         always_export_symbols=yes
20964         file_list_spec='@'
20965         # Tell ltmain to make .lib files, not .a files.
20966         libext=lib
20967         # Tell ltmain to make .dll files, not .so files.
20968         shrext_cmds=".dll"
20969         # FIXME: Setting linknames here is a bad hack.
20970         archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
20971         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
20972             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
20973           else
20974             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
20975           fi~
20976           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
20977           linknames='
20978         # The linker will not automatically build a static lib if we build a DLL.
20979         # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
20980         enable_shared_with_static_runtimes=yes
20981         export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
20982         # Don't use ranlib
20983         old_postinstall_cmds='chmod 644 $oldlib'
20984         postlink_cmds='lt_outputfile="@OUTPUT@"~
20985           lt_tool_outputfile="@TOOL_OUTPUT@"~
20986           case $lt_outputfile in
20987             *.exe|*.EXE) ;;
20988             *)
20989               lt_outputfile="$lt_outputfile.exe"
20990               lt_tool_outputfile="$lt_tool_outputfile.exe"
20991               ;;
20992           esac~
20993           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
20994             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
20995             $RM "$lt_outputfile.manifest";
20996           fi'
20997         ;;
20998       *)
20999         # Assume MSVC wrapper
21000         hardcode_libdir_flag_spec=' '
21001         allow_undefined_flag=unsupported
21002         # Tell ltmain to make .lib files, not .a files.
21003         libext=lib
21004         # Tell ltmain to make .dll files, not .so files.
21005         shrext_cmds=".dll"
21006         # FIXME: Setting linknames here is a bad hack.
21007         archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
21008         # The linker will automatically build a .lib file if we build a DLL.
21009         old_archive_from_new_cmds='true'
21010         # FIXME: Should let the user specify the lib program.
21011         old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
21012         enable_shared_with_static_runtimes=yes
21013         ;;
21014       esac
21015       ;;
21016
21017     darwin* | rhapsody*)
21018
21019
21020   archive_cmds_need_lc=no
21021   hardcode_direct=no
21022   hardcode_automatic=yes
21023   hardcode_shlibpath_var=unsupported
21024   if test "$lt_cv_ld_force_load" = "yes"; then
21025     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\"`'
21026   else
21027     whole_archive_flag_spec=''
21028   fi
21029   link_all_deplibs=yes
21030   allow_undefined_flag="$_lt_dar_allow_undefined"
21031   case $cc_basename in
21032      ifort*) _lt_dar_can_shared=yes ;;
21033      *) _lt_dar_can_shared=$GCC ;;
21034   esac
21035   if test "$_lt_dar_can_shared" = "yes"; then
21036     output_verbose_link_cmd=func_echo_all
21037     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
21038     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
21039     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}"
21040     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}"
21041
21042   else
21043   ld_shlibs=no
21044   fi
21045
21046       ;;
21047
21048     dgux*)
21049       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21050       hardcode_libdir_flag_spec='-L$libdir'
21051       hardcode_shlibpath_var=no
21052       ;;
21053
21054     freebsd1*)
21055       ld_shlibs=no
21056       ;;
21057
21058     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
21059     # support.  Future versions do this automatically, but an explicit c++rt0.o
21060     # does not break anything, and helps significantly (at the cost of a little
21061     # extra space).
21062     freebsd2.2*)
21063       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
21064       hardcode_libdir_flag_spec='-R$libdir'
21065       hardcode_direct=yes
21066       hardcode_shlibpath_var=no
21067       ;;
21068
21069     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
21070     freebsd2*)
21071       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
21072       hardcode_direct=yes
21073       hardcode_minus_L=yes
21074       hardcode_shlibpath_var=no
21075       ;;
21076
21077     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
21078     freebsd* | dragonfly*)
21079       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
21080       hardcode_libdir_flag_spec='-R$libdir'
21081       hardcode_direct=yes
21082       hardcode_shlibpath_var=no
21083       ;;
21084
21085     hpux9*)
21086       if test "$GCC" = yes; then
21087         archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
21088       else
21089         archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
21090       fi
21091       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
21092       hardcode_libdir_separator=:
21093       hardcode_direct=yes
21094
21095       # hardcode_minus_L: Not really in the search PATH,
21096       # but as the default location of the library.
21097       hardcode_minus_L=yes
21098       export_dynamic_flag_spec='${wl}-E'
21099       ;;
21100
21101     hpux10*)
21102       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
21103         archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
21104       else
21105         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
21106       fi
21107       if test "$with_gnu_ld" = no; then
21108         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
21109         hardcode_libdir_flag_spec_ld='+b $libdir'
21110         hardcode_libdir_separator=:
21111         hardcode_direct=yes
21112         hardcode_direct_absolute=yes
21113         export_dynamic_flag_spec='${wl}-E'
21114         # hardcode_minus_L: Not really in the search PATH,
21115         # but as the default location of the library.
21116         hardcode_minus_L=yes
21117       fi
21118       ;;
21119
21120     hpux11*)
21121       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
21122         case $host_cpu in
21123         hppa*64*)
21124           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
21125           ;;
21126         ia64*)
21127           archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
21128           ;;
21129         *)
21130           archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
21131           ;;
21132         esac
21133       else
21134         case $host_cpu in
21135         hppa*64*)
21136           archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
21137           ;;
21138         ia64*)
21139           archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
21140           ;;
21141         *)
21142
21143           # Older versions of the 11.00 compiler do not understand -b yet
21144           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
21145           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
21146 $as_echo_n "checking if $CC understands -b... " >&6; }
21147 if ${lt_cv_prog_compiler__b+:} false; then :
21148   $as_echo_n "(cached) " >&6
21149 else
21150   lt_cv_prog_compiler__b=no
21151    save_LDFLAGS="$LDFLAGS"
21152    LDFLAGS="$LDFLAGS -b"
21153    echo "$lt_simple_link_test_code" > conftest.$ac_ext
21154    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
21155      # The linker can only warn and ignore the option if not recognized
21156      # So say no if there are warnings
21157      if test -s conftest.err; then
21158        # Append any errors to the config.log.
21159        cat conftest.err 1>&5
21160        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
21161        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
21162        if diff conftest.exp conftest.er2 >/dev/null; then
21163          lt_cv_prog_compiler__b=yes
21164        fi
21165      else
21166        lt_cv_prog_compiler__b=yes
21167      fi
21168    fi
21169    $RM -r conftest*
21170    LDFLAGS="$save_LDFLAGS"
21171
21172 fi
21173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
21174 $as_echo "$lt_cv_prog_compiler__b" >&6; }
21175
21176 if test x"$lt_cv_prog_compiler__b" = xyes; then
21177     archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
21178 else
21179     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
21180 fi
21181
21182           ;;
21183         esac
21184       fi
21185       if test "$with_gnu_ld" = no; then
21186         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
21187         hardcode_libdir_separator=:
21188
21189         case $host_cpu in
21190         hppa*64*|ia64*)
21191           hardcode_direct=no
21192           hardcode_shlibpath_var=no
21193           ;;
21194         *)
21195           hardcode_direct=yes
21196           hardcode_direct_absolute=yes
21197           export_dynamic_flag_spec='${wl}-E'
21198
21199           # hardcode_minus_L: Not really in the search PATH,
21200           # but as the default location of the library.
21201           hardcode_minus_L=yes
21202           ;;
21203         esac
21204       fi
21205       ;;
21206
21207     irix5* | irix6* | nonstopux*)
21208       if test "$GCC" = yes; then
21209         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'
21210         # Try to use the -exported_symbol ld option, if it does not
21211         # work, assume that -exports_file does not work either and
21212         # implicitly export all symbols.
21213         # This should be the same for all languages, so no per-tag cache variable.
21214         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
21215 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
21216 if ${lt_cv_irix_exported_symbol+:} false; then :
21217   $as_echo_n "(cached) " >&6
21218 else
21219   save_LDFLAGS="$LDFLAGS"
21220            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
21221            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21222 /* end confdefs.h.  */
21223 int foo (void) { return 0; }
21224 _ACEOF
21225 if ac_fn_c_try_link "$LINENO"; then :
21226   lt_cv_irix_exported_symbol=yes
21227 else
21228   lt_cv_irix_exported_symbol=no
21229 fi
21230 rm -f core conftest.err conftest.$ac_objext \
21231     conftest$ac_exeext conftest.$ac_ext
21232            LDFLAGS="$save_LDFLAGS"
21233 fi
21234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
21235 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
21236         if test "$lt_cv_irix_exported_symbol" = yes; then
21237           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'
21238         fi
21239       else
21240         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'
21241         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'
21242       fi
21243       archive_cmds_need_lc='no'
21244       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
21245       hardcode_libdir_separator=:
21246       inherit_rpath=yes
21247       link_all_deplibs=yes
21248       ;;
21249
21250     netbsd*)
21251       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
21252         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
21253       else
21254         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
21255       fi
21256       hardcode_libdir_flag_spec='-R$libdir'
21257       hardcode_direct=yes
21258       hardcode_shlibpath_var=no
21259       ;;
21260
21261     newsos6)
21262       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21263       hardcode_direct=yes
21264       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
21265       hardcode_libdir_separator=:
21266       hardcode_shlibpath_var=no
21267       ;;
21268
21269     *nto* | *qnx*)
21270       ;;
21271
21272     openbsd*)
21273       if test -f /usr/libexec/ld.so; then
21274         hardcode_direct=yes
21275         hardcode_shlibpath_var=no
21276         hardcode_direct_absolute=yes
21277         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
21278           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
21279           archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
21280           hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
21281           export_dynamic_flag_spec='${wl}-E'
21282         else
21283           case $host_os in
21284            openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
21285              archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
21286              hardcode_libdir_flag_spec='-R$libdir'
21287              ;;
21288            *)
21289              archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
21290              hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
21291              ;;
21292           esac
21293         fi
21294       else
21295         ld_shlibs=no
21296       fi
21297       ;;
21298
21299     os2*)
21300       hardcode_libdir_flag_spec='-L$libdir'
21301       hardcode_minus_L=yes
21302       allow_undefined_flag=unsupported
21303       archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
21304       old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
21305       ;;
21306
21307     osf3*)
21308       if test "$GCC" = yes; then
21309         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
21310         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'
21311       else
21312         allow_undefined_flag=' -expect_unresolved \*'
21313         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'
21314       fi
21315       archive_cmds_need_lc='no'
21316       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
21317       hardcode_libdir_separator=:
21318       ;;
21319
21320     osf4* | osf5*)      # as osf3* with the addition of -msym flag
21321       if test "$GCC" = yes; then
21322         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
21323         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'
21324         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
21325       else
21326         allow_undefined_flag=' -expect_unresolved \*'
21327         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'
21328         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~
21329         $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'
21330
21331         # Both c and cxx compiler support -rpath directly
21332         hardcode_libdir_flag_spec='-rpath $libdir'
21333       fi
21334       archive_cmds_need_lc='no'
21335       hardcode_libdir_separator=:
21336       ;;
21337
21338     solaris*)
21339       no_undefined_flag=' -z defs'
21340       if test "$GCC" = yes; then
21341         wlarc='${wl}'
21342         archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
21343         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
21344           $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'
21345       else
21346         case `$CC -V 2>&1` in
21347         *"Compilers 5.0"*)
21348           wlarc=''
21349           archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
21350           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
21351           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
21352           ;;
21353         *)
21354           wlarc='${wl}'
21355           archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
21356           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
21357           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
21358           ;;
21359         esac
21360       fi
21361       hardcode_libdir_flag_spec='-R$libdir'
21362       hardcode_shlibpath_var=no
21363       case $host_os in
21364       solaris2.[0-5] | solaris2.[0-5].*) ;;
21365       *)
21366         # The compiler driver will combine and reorder linker options,
21367         # but understands `-z linker_flag'.  GCC discards it without `$wl',
21368         # but is careful enough not to reorder.
21369         # Supported since Solaris 2.6 (maybe 2.5.1?)
21370         if test "$GCC" = yes; then
21371           whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
21372         else
21373           whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
21374         fi
21375         ;;
21376       esac
21377       link_all_deplibs=yes
21378       ;;
21379
21380     sunos4*)
21381       if test "x$host_vendor" = xsequent; then
21382         # Use $CC to link under sequent, because it throws in some extra .o
21383         # files that make .init and .fini sections work.
21384         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
21385       else
21386         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
21387       fi
21388       hardcode_libdir_flag_spec='-L$libdir'
21389       hardcode_direct=yes
21390       hardcode_minus_L=yes
21391       hardcode_shlibpath_var=no
21392       ;;
21393
21394     sysv4)
21395       case $host_vendor in
21396         sni)
21397           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21398           hardcode_direct=yes # is this really true???
21399         ;;
21400         siemens)
21401           ## LD is ld it makes a PLAMLIB
21402           ## CC just makes a GrossModule.
21403           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
21404           reload_cmds='$CC -r -o $output$reload_objs'
21405           hardcode_direct=no
21406         ;;
21407         motorola)
21408           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21409           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
21410         ;;
21411       esac
21412       runpath_var='LD_RUN_PATH'
21413       hardcode_shlibpath_var=no
21414       ;;
21415
21416     sysv4.3*)
21417       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21418       hardcode_shlibpath_var=no
21419       export_dynamic_flag_spec='-Bexport'
21420       ;;
21421
21422     sysv4*MP*)
21423       if test -d /usr/nec; then
21424         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21425         hardcode_shlibpath_var=no
21426         runpath_var=LD_RUN_PATH
21427         hardcode_runpath_var=yes
21428         ld_shlibs=yes
21429       fi
21430       ;;
21431
21432     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
21433       no_undefined_flag='${wl}-z,text'
21434       archive_cmds_need_lc=no
21435       hardcode_shlibpath_var=no
21436       runpath_var='LD_RUN_PATH'
21437
21438       if test "$GCC" = yes; then
21439         archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21440         archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21441       else
21442         archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21443         archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21444       fi
21445       ;;
21446
21447     sysv5* | sco3.2v5* | sco5v6*)
21448       # Note: We can NOT use -z defs as we might desire, because we do not
21449       # link with -lc, and that would cause any symbols used from libc to
21450       # always be unresolved, which means just about no library would
21451       # ever link correctly.  If we're not using GNU ld we use -z text
21452       # though, which does catch some bad symbols but isn't as heavy-handed
21453       # as -z defs.
21454       no_undefined_flag='${wl}-z,text'
21455       allow_undefined_flag='${wl}-z,nodefs'
21456       archive_cmds_need_lc=no
21457       hardcode_shlibpath_var=no
21458       hardcode_libdir_flag_spec='${wl}-R,$libdir'
21459       hardcode_libdir_separator=':'
21460       link_all_deplibs=yes
21461       export_dynamic_flag_spec='${wl}-Bexport'
21462       runpath_var='LD_RUN_PATH'
21463
21464       if test "$GCC" = yes; then
21465         archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21466         archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21467       else
21468         archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21469         archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21470       fi
21471       ;;
21472
21473     uts4*)
21474       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21475       hardcode_libdir_flag_spec='-L$libdir'
21476       hardcode_shlibpath_var=no
21477       ;;
21478
21479     *)
21480       ld_shlibs=no
21481       ;;
21482     esac
21483
21484     if test x$host_vendor = xsni; then
21485       case $host in
21486       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
21487         export_dynamic_flag_spec='${wl}-Blargedynsym'
21488         ;;
21489       esac
21490     fi
21491   fi
21492
21493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
21494 $as_echo "$ld_shlibs" >&6; }
21495 test "$ld_shlibs" = no && can_build_shared=no
21496
21497 with_gnu_ld=$with_gnu_ld
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
21513 #
21514 # Do we need to explicitly link libc?
21515 #
21516 case "x$archive_cmds_need_lc" in
21517 x|xyes)
21518   # Assume -lc should be added
21519   archive_cmds_need_lc=yes
21520
21521   if test "$enable_shared" = yes && test "$GCC" = yes; then
21522     case $archive_cmds in
21523     *'~'*)
21524       # FIXME: we may have to deal with multi-command sequences.
21525       ;;
21526     '$CC '*)
21527       # Test whether the compiler implicitly links with -lc since on some
21528       # systems, -lgcc has to come before -lc. If gcc already passes -lc
21529       # to ld, don't add -lc before -lgcc.
21530       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
21531 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
21532 if ${lt_cv_archive_cmds_need_lc+:} false; then :
21533   $as_echo_n "(cached) " >&6
21534 else
21535   $RM conftest*
21536         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
21537
21538         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
21539   (eval $ac_compile) 2>&5
21540   ac_status=$?
21541   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21542   test $ac_status = 0; } 2>conftest.err; then
21543           soname=conftest
21544           lib=conftest
21545           libobjs=conftest.$ac_objext
21546           deplibs=
21547           wl=$lt_prog_compiler_wl
21548           pic_flag=$lt_prog_compiler_pic
21549           compiler_flags=-v
21550           linker_flags=-v
21551           verstring=
21552           output_objdir=.
21553           libname=conftest
21554           lt_save_allow_undefined_flag=$allow_undefined_flag
21555           allow_undefined_flag=
21556           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
21557   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
21558   ac_status=$?
21559   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21560   test $ac_status = 0; }
21561           then
21562             lt_cv_archive_cmds_need_lc=no
21563           else
21564             lt_cv_archive_cmds_need_lc=yes
21565           fi
21566           allow_undefined_flag=$lt_save_allow_undefined_flag
21567         else
21568           cat conftest.err 1>&5
21569         fi
21570         $RM conftest*
21571
21572 fi
21573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
21574 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
21575       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
21576       ;;
21577     esac
21578   fi
21579   ;;
21580 esac
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
21739 $as_echo_n "checking dynamic linker characteristics... " >&6; }
21740
21741 if test "$GCC" = yes; then
21742   case $host_os in
21743     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
21744     *) lt_awk_arg="/^libraries:/" ;;
21745   esac
21746   case $host_os in
21747     mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
21748     *) lt_sed_strip_eq="s,=/,/,g" ;;
21749   esac
21750   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
21751   case $lt_search_path_spec in
21752   *\;*)
21753     # if the path contains ";" then we assume it to be the separator
21754     # otherwise default to the standard path separator (i.e. ":") - it is
21755     # assumed that no part of a normal pathname contains ";" but that should
21756     # okay in the real world where ";" in dirpaths is itself problematic.
21757     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
21758     ;;
21759   *)
21760     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
21761     ;;
21762   esac
21763   # Ok, now we have the path, separated by spaces, we can step through it
21764   # and add multilib dir if necessary.
21765   lt_tmp_lt_search_path_spec=
21766   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
21767   for lt_sys_path in $lt_search_path_spec; do
21768     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
21769       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
21770     else
21771       test -d "$lt_sys_path" && \
21772         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
21773     fi
21774   done
21775   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
21776 BEGIN {RS=" "; FS="/|\n";} {
21777   lt_foo="";
21778   lt_count=0;
21779   for (lt_i = NF; lt_i > 0; lt_i--) {
21780     if ($lt_i != "" && $lt_i != ".") {
21781       if ($lt_i == "..") {
21782         lt_count++;
21783       } else {
21784         if (lt_count == 0) {
21785           lt_foo="/" $lt_i lt_foo;
21786         } else {
21787           lt_count--;
21788         }
21789       }
21790     }
21791   }
21792   if (lt_foo != "") { lt_freq[lt_foo]++; }
21793   if (lt_freq[lt_foo] == 1) { print lt_foo; }
21794 }'`
21795   # AWK program above erroneously prepends '/' to C:/dos/paths
21796   # for these hosts.
21797   case $host_os in
21798     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
21799       $SED 's,/\([A-Za-z]:\),\1,g'` ;;
21800   esac
21801   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
21802 else
21803   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
21804 fi
21805 library_names_spec=
21806 libname_spec='lib$name'
21807 soname_spec=
21808 shrext_cmds=".so"
21809 postinstall_cmds=
21810 postuninstall_cmds=
21811 finish_cmds=
21812 finish_eval=
21813 shlibpath_var=
21814 shlibpath_overrides_runpath=unknown
21815 version_type=none
21816 dynamic_linker="$host_os ld.so"
21817 sys_lib_dlsearch_path_spec="/lib /usr/lib"
21818 need_lib_prefix=unknown
21819 hardcode_into_libs=no
21820
21821 # when you set need_version to no, make sure it does not cause -set_version
21822 # flags to be left without arguments
21823 need_version=unknown
21824
21825 case $host_os in
21826 aix3*)
21827   version_type=linux
21828   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
21829   shlibpath_var=LIBPATH
21830
21831   # AIX 3 has no versioning support, so we append a major version to the name.
21832   soname_spec='${libname}${release}${shared_ext}$major'
21833   ;;
21834
21835 aix[4-9]*)
21836   version_type=linux
21837   need_lib_prefix=no
21838   need_version=no
21839   hardcode_into_libs=yes
21840   if test "$host_cpu" = ia64; then
21841     # AIX 5 supports IA64
21842     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
21843     shlibpath_var=LD_LIBRARY_PATH
21844   else
21845     # With GCC up to 2.95.x, collect2 would create an import file
21846     # for dependence libraries.  The import file would start with
21847     # the line `#! .'.  This would cause the generated library to
21848     # depend on `.', always an invalid library.  This was fixed in
21849     # development snapshots of GCC prior to 3.0.
21850     case $host_os in
21851       aix4 | aix4.[01] | aix4.[01].*)
21852       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
21853            echo ' yes '
21854            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
21855         :
21856       else
21857         can_build_shared=no
21858       fi
21859       ;;
21860     esac
21861     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
21862     # soname into executable. Probably we can add versioning support to
21863     # collect2, so additional links can be useful in future.
21864     if test "$aix_use_runtimelinking" = yes; then
21865       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
21866       # instead of lib<name>.a to let people know that these are not
21867       # typical AIX shared libraries.
21868       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
21869     else
21870       # We preserve .a as extension for shared libraries through AIX4.2
21871       # and later when we are not doing run time linking.
21872       library_names_spec='${libname}${release}.a $libname.a'
21873       soname_spec='${libname}${release}${shared_ext}$major'
21874     fi
21875     shlibpath_var=LIBPATH
21876   fi
21877   ;;
21878
21879 amigaos*)
21880   case $host_cpu in
21881   powerpc)
21882     # Since July 2007 AmigaOS4 officially supports .so libraries.
21883     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
21884     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
21885     ;;
21886   m68k)
21887     library_names_spec='$libname.ixlibrary $libname.a'
21888     # Create ${libname}_ixlibrary.a entries in /sys/libs.
21889     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $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'
21890     ;;
21891   esac
21892   ;;
21893
21894 beos*)
21895   library_names_spec='${libname}${shared_ext}'
21896   dynamic_linker="$host_os ld.so"
21897   shlibpath_var=LIBRARY_PATH
21898   ;;
21899
21900 bsdi[45]*)
21901   version_type=linux
21902   need_version=no
21903   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
21904   soname_spec='${libname}${release}${shared_ext}$major'
21905   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
21906   shlibpath_var=LD_LIBRARY_PATH
21907   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
21908   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
21909   # the default ld.so.conf also contains /usr/contrib/lib and
21910   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
21911   # libtool to hard-code these into programs
21912   ;;
21913
21914 cygwin* | mingw* | pw32* | cegcc*)
21915   version_type=windows
21916   shrext_cmds=".dll"
21917   need_version=no
21918   need_lib_prefix=no
21919
21920   case $GCC,$cc_basename in
21921   yes,*)
21922     # gcc
21923     library_names_spec='$libname.dll.a'
21924     # DLL is installed to $(libdir)/../bin by postinstall_cmds
21925     postinstall_cmds='base_file=`basename \${file}`~
21926       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
21927       dldir=$destdir/`dirname \$dlpath`~
21928       test -d \$dldir || mkdir -p \$dldir~
21929       $install_prog $dir/$dlname \$dldir/$dlname~
21930       chmod a+x \$dldir/$dlname~
21931       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
21932         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
21933       fi'
21934     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
21935       dlpath=$dir/\$dldll~
21936        $RM \$dlpath'
21937     shlibpath_overrides_runpath=yes
21938
21939     case $host_os in
21940     cygwin*)
21941       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
21942       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
21943
21944       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
21945       ;;
21946     mingw* | cegcc*)
21947       # MinGW DLLs use traditional 'lib' prefix
21948       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
21949       ;;
21950     pw32*)
21951       # pw32 DLLs use 'pw' prefix rather than 'lib'
21952       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
21953       ;;
21954     esac
21955     dynamic_linker='Win32 ld.exe'
21956     ;;
21957
21958   *,cl*)
21959     # Native MSVC
21960     libname_spec='$name'
21961     soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
21962     library_names_spec='${libname}.dll.lib'
21963
21964     case $build_os in
21965     mingw*)
21966       sys_lib_search_path_spec=
21967       lt_save_ifs=$IFS
21968       IFS=';'
21969       for lt_path in $LIB
21970       do
21971         IFS=$lt_save_ifs
21972         # Let DOS variable expansion print the short 8.3 style file name.
21973         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
21974         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
21975       done
21976       IFS=$lt_save_ifs
21977       # Convert to MSYS style.
21978       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
21979       ;;
21980     cygwin*)
21981       # Convert to unix form, then to dos form, then back to unix form
21982       # but this time dos style (no spaces!) so that the unix form looks
21983       # like /cygdrive/c/PROGRA~1:/cygdr...
21984       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
21985       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
21986       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
21987       ;;
21988     *)
21989       sys_lib_search_path_spec="$LIB"
21990       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
21991         # It is most probably a Windows format PATH.
21992         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
21993       else
21994         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
21995       fi
21996       # FIXME: find the short name or the path components, as spaces are
21997       # common. (e.g. "Program Files" -> "PROGRA~1")
21998       ;;
21999     esac
22000
22001     # DLL is installed to $(libdir)/../bin by postinstall_cmds
22002     postinstall_cmds='base_file=`basename \${file}`~
22003       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
22004       dldir=$destdir/`dirname \$dlpath`~
22005       test -d \$dldir || mkdir -p \$dldir~
22006       $install_prog $dir/$dlname \$dldir/$dlname'
22007     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
22008       dlpath=$dir/\$dldll~
22009        $RM \$dlpath'
22010     shlibpath_overrides_runpath=yes
22011     dynamic_linker='Win32 link.exe'
22012     ;;
22013
22014   *)
22015     # Assume MSVC wrapper
22016     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
22017     dynamic_linker='Win32 ld.exe'
22018     ;;
22019   esac
22020   # FIXME: first we should search . and the directory the executable is in
22021   shlibpath_var=PATH
22022   ;;
22023
22024 darwin* | rhapsody*)
22025   dynamic_linker="$host_os dyld"
22026   version_type=darwin
22027   need_lib_prefix=no
22028   need_version=no
22029   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
22030   soname_spec='${libname}${release}${major}$shared_ext'
22031   shlibpath_overrides_runpath=yes
22032   shlibpath_var=DYLD_LIBRARY_PATH
22033   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
22034
22035   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
22036   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
22037   ;;
22038
22039 dgux*)
22040   version_type=linux
22041   need_lib_prefix=no
22042   need_version=no
22043   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
22044   soname_spec='${libname}${release}${shared_ext}$major'
22045   shlibpath_var=LD_LIBRARY_PATH
22046   ;;
22047
22048 freebsd1*)
22049   dynamic_linker=no
22050   ;;
22051
22052 freebsd* | dragonfly*)
22053   # DragonFly does not have aout.  When/if they implement a new
22054   # versioning mechanism, adjust this.
22055   if test -x /usr/bin/objformat; then
22056     objformat=`/usr/bin/objformat`
22057   else
22058     case $host_os in
22059     freebsd[123]*) objformat=aout ;;
22060     *) objformat=elf ;;
22061     esac
22062   fi
22063   version_type=freebsd-$objformat
22064   case $version_type in
22065     freebsd-elf*)
22066       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
22067       need_version=no
22068       need_lib_prefix=no
22069       ;;
22070     freebsd-*)
22071       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
22072       need_version=yes
22073       ;;
22074   esac
22075   shlibpath_var=LD_LIBRARY_PATH
22076   case $host_os in
22077   freebsd2*)
22078     shlibpath_overrides_runpath=yes
22079     ;;
22080   freebsd3.[01]* | freebsdelf3.[01]*)
22081     shlibpath_overrides_runpath=yes
22082     hardcode_into_libs=yes
22083     ;;
22084   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
22085   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
22086     shlibpath_overrides_runpath=no
22087     hardcode_into_libs=yes
22088     ;;
22089   *) # from 4.6 on, and DragonFly
22090     shlibpath_overrides_runpath=yes
22091     hardcode_into_libs=yes
22092     ;;
22093   esac
22094   ;;
22095
22096 gnu*)
22097   version_type=linux
22098   need_lib_prefix=no
22099   need_version=no
22100   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
22101   soname_spec='${libname}${release}${shared_ext}$major'
22102   shlibpath_var=LD_LIBRARY_PATH
22103   hardcode_into_libs=yes
22104   ;;
22105
22106 haiku*)
22107   version_type=linux
22108   need_lib_prefix=no
22109   need_version=no
22110   dynamic_linker="$host_os runtime_loader"
22111   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
22112   soname_spec='${libname}${release}${shared_ext}$major'
22113   shlibpath_var=LIBRARY_PATH
22114   shlibpath_overrides_runpath=yes
22115   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
22116   hardcode_into_libs=yes
22117   ;;
22118
22119 hpux9* | hpux10* | hpux11*)
22120   # Give a soname corresponding to the major version so that dld.sl refuses to
22121   # link against other versions.
22122   version_type=sunos
22123   need_lib_prefix=no
22124   need_version=no
22125   case $host_cpu in
22126   ia64*)
22127     shrext_cmds='.so'
22128     hardcode_into_libs=yes
22129     dynamic_linker="$host_os dld.so"
22130     shlibpath_var=LD_LIBRARY_PATH
22131     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
22132     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22133     soname_spec='${libname}${release}${shared_ext}$major'
22134     if test "X$HPUX_IA64_MODE" = X32; then
22135       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
22136     else
22137       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
22138     fi
22139     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
22140     ;;
22141   hppa*64*)
22142     shrext_cmds='.sl'
22143     hardcode_into_libs=yes
22144     dynamic_linker="$host_os dld.sl"
22145     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
22146     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
22147     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22148     soname_spec='${libname}${release}${shared_ext}$major'
22149     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
22150     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
22151     ;;
22152   *)
22153     shrext_cmds='.sl'
22154     dynamic_linker="$host_os dld.sl"
22155     shlibpath_var=SHLIB_PATH
22156     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
22157     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22158     soname_spec='${libname}${release}${shared_ext}$major'
22159     ;;
22160   esac
22161   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
22162   postinstall_cmds='chmod 555 $lib'
22163   # or fails outright, so override atomically:
22164   install_override_mode=555
22165   ;;
22166
22167 interix[3-9]*)
22168   version_type=linux
22169   need_lib_prefix=no
22170   need_version=no
22171   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
22172   soname_spec='${libname}${release}${shared_ext}$major'
22173   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
22174   shlibpath_var=LD_LIBRARY_PATH
22175   shlibpath_overrides_runpath=no
22176   hardcode_into_libs=yes
22177   ;;
22178
22179 irix5* | irix6* | nonstopux*)
22180   case $host_os in
22181     nonstopux*) version_type=nonstopux ;;
22182     *)
22183         if test "$lt_cv_prog_gnu_ld" = yes; then
22184                 version_type=linux
22185         else
22186                 version_type=irix
22187         fi ;;
22188   esac
22189   need_lib_prefix=no
22190   need_version=no
22191   soname_spec='${libname}${release}${shared_ext}$major'
22192   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
22193   case $host_os in
22194   irix5* | nonstopux*)
22195     libsuff= shlibsuff=
22196     ;;
22197   *)
22198     case $LD in # libtool.m4 will add one of these switches to LD
22199     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
22200       libsuff= shlibsuff= libmagic=32-bit;;
22201     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
22202       libsuff=32 shlibsuff=N32 libmagic=N32;;
22203     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
22204       libsuff=64 shlibsuff=64 libmagic=64-bit;;
22205     *) libsuff= shlibsuff= libmagic=never-match;;
22206     esac
22207     ;;
22208   esac
22209   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
22210   shlibpath_overrides_runpath=no
22211   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
22212   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
22213   hardcode_into_libs=yes
22214   ;;
22215
22216 # No shared lib support for Linux oldld, aout, or coff.
22217 linux*oldld* | linux*aout* | linux*coff*)
22218   dynamic_linker=no
22219   ;;
22220
22221 # This must be Linux ELF.
22222 linux* | k*bsd*-gnu | kopensolaris*-gnu)
22223   version_type=linux
22224   need_lib_prefix=no
22225   need_version=no
22226   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22227   soname_spec='${libname}${release}${shared_ext}$major'
22228   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
22229   shlibpath_var=LD_LIBRARY_PATH
22230   shlibpath_overrides_runpath=no
22231
22232   # Some binutils ld are patched to set DT_RUNPATH
22233   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
22234   $as_echo_n "(cached) " >&6
22235 else
22236   lt_cv_shlibpath_overrides_runpath=no
22237     save_LDFLAGS=$LDFLAGS
22238     save_libdir=$libdir
22239     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
22240          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
22241     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22242 /* end confdefs.h.  */
22243
22244 int
22245 main ()
22246 {
22247
22248   ;
22249   return 0;
22250 }
22251 _ACEOF
22252 if ac_fn_c_try_link "$LINENO"; then :
22253   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
22254   lt_cv_shlibpath_overrides_runpath=yes
22255 fi
22256 fi
22257 rm -f core conftest.err conftest.$ac_objext \
22258     conftest$ac_exeext conftest.$ac_ext
22259     LDFLAGS=$save_LDFLAGS
22260     libdir=$save_libdir
22261
22262 fi
22263
22264   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
22265
22266   # This implies no fast_install, which is unacceptable.
22267   # Some rework will be needed to allow for fast_install
22268   # before this can be enabled.
22269   hardcode_into_libs=yes
22270
22271   # Append ld.so.conf contents to the search path
22272   if test -f /etc/ld.so.conf; then
22273     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' ' '`
22274     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
22275   fi
22276
22277   # We used to test for /lib/ld.so.1 and disable shared libraries on
22278   # powerpc, because MkLinux only supported shared libraries with the
22279   # GNU dynamic linker.  Since this was broken with cross compilers,
22280   # most powerpc-linux boxes support dynamic linking these days and
22281   # people can always --disable-shared, the test was removed, and we
22282   # assume the GNU/Linux dynamic linker is in use.
22283   dynamic_linker='GNU/Linux ld.so'
22284   ;;
22285
22286 netbsd*)
22287   version_type=sunos
22288   need_lib_prefix=no
22289   need_version=no
22290   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
22291     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
22292     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
22293     dynamic_linker='NetBSD (a.out) ld.so'
22294   else
22295     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
22296     soname_spec='${libname}${release}${shared_ext}$major'
22297     dynamic_linker='NetBSD ld.elf_so'
22298   fi
22299   shlibpath_var=LD_LIBRARY_PATH
22300   shlibpath_overrides_runpath=yes
22301   hardcode_into_libs=yes
22302   ;;
22303
22304 newsos6)
22305   version_type=linux
22306   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22307   shlibpath_var=LD_LIBRARY_PATH
22308   shlibpath_overrides_runpath=yes
22309   ;;
22310
22311 *nto* | *qnx*)
22312   version_type=qnx
22313   need_lib_prefix=no
22314   need_version=no
22315   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22316   soname_spec='${libname}${release}${shared_ext}$major'
22317   shlibpath_var=LD_LIBRARY_PATH
22318   shlibpath_overrides_runpath=no
22319   hardcode_into_libs=yes
22320   dynamic_linker='ldqnx.so'
22321   ;;
22322
22323 openbsd*)
22324   version_type=sunos
22325   sys_lib_dlsearch_path_spec="/usr/lib"
22326   need_lib_prefix=no
22327   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
22328   case $host_os in
22329     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
22330     *)                          need_version=no  ;;
22331   esac
22332   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
22333   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
22334   shlibpath_var=LD_LIBRARY_PATH
22335   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
22336     case $host_os in
22337       openbsd2.[89] | openbsd2.[89].*)
22338         shlibpath_overrides_runpath=no
22339         ;;
22340       *)
22341         shlibpath_overrides_runpath=yes
22342         ;;
22343       esac
22344   else
22345     shlibpath_overrides_runpath=yes
22346   fi
22347   ;;
22348
22349 os2*)
22350   libname_spec='$name'
22351   shrext_cmds=".dll"
22352   need_lib_prefix=no
22353   library_names_spec='$libname${shared_ext} $libname.a'
22354   dynamic_linker='OS/2 ld.exe'
22355   shlibpath_var=LIBPATH
22356   ;;
22357
22358 osf3* | osf4* | osf5*)
22359   version_type=osf
22360   need_lib_prefix=no
22361   need_version=no
22362   soname_spec='${libname}${release}${shared_ext}$major'
22363   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22364   shlibpath_var=LD_LIBRARY_PATH
22365   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
22366   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
22367   ;;
22368
22369 rdos*)
22370   dynamic_linker=no
22371   ;;
22372
22373 solaris*)
22374   version_type=linux
22375   need_lib_prefix=no
22376   need_version=no
22377   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22378   soname_spec='${libname}${release}${shared_ext}$major'
22379   shlibpath_var=LD_LIBRARY_PATH
22380   shlibpath_overrides_runpath=yes
22381   hardcode_into_libs=yes
22382   # ldd complains unless libraries are executable
22383   postinstall_cmds='chmod +x $lib'
22384   ;;
22385
22386 sunos4*)
22387   version_type=sunos
22388   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
22389   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
22390   shlibpath_var=LD_LIBRARY_PATH
22391   shlibpath_overrides_runpath=yes
22392   if test "$with_gnu_ld" = yes; then
22393     need_lib_prefix=no
22394   fi
22395   need_version=yes
22396   ;;
22397
22398 sysv4 | sysv4.3*)
22399   version_type=linux
22400   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22401   soname_spec='${libname}${release}${shared_ext}$major'
22402   shlibpath_var=LD_LIBRARY_PATH
22403   case $host_vendor in
22404     sni)
22405       shlibpath_overrides_runpath=no
22406       need_lib_prefix=no
22407       runpath_var=LD_RUN_PATH
22408       ;;
22409     siemens)
22410       need_lib_prefix=no
22411       ;;
22412     motorola)
22413       need_lib_prefix=no
22414       need_version=no
22415       shlibpath_overrides_runpath=no
22416       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
22417       ;;
22418   esac
22419   ;;
22420
22421 sysv4*MP*)
22422   if test -d /usr/nec ;then
22423     version_type=linux
22424     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
22425     soname_spec='$libname${shared_ext}.$major'
22426     shlibpath_var=LD_LIBRARY_PATH
22427   fi
22428   ;;
22429
22430 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
22431   version_type=freebsd-elf
22432   need_lib_prefix=no
22433   need_version=no
22434   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
22435   soname_spec='${libname}${release}${shared_ext}$major'
22436   shlibpath_var=LD_LIBRARY_PATH
22437   shlibpath_overrides_runpath=yes
22438   hardcode_into_libs=yes
22439   if test "$with_gnu_ld" = yes; then
22440     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
22441   else
22442     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
22443     case $host_os in
22444       sco3.2v5*)
22445         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
22446         ;;
22447     esac
22448   fi
22449   sys_lib_dlsearch_path_spec='/usr/lib'
22450   ;;
22451
22452 tpf*)
22453   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
22454   version_type=linux
22455   need_lib_prefix=no
22456   need_version=no
22457   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22458   shlibpath_var=LD_LIBRARY_PATH
22459   shlibpath_overrides_runpath=no
22460   hardcode_into_libs=yes
22461   ;;
22462
22463 uts4*)
22464   version_type=linux
22465   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22466   soname_spec='${libname}${release}${shared_ext}$major'
22467   shlibpath_var=LD_LIBRARY_PATH
22468   ;;
22469
22470 *)
22471   dynamic_linker=no
22472   ;;
22473 esac
22474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
22475 $as_echo "$dynamic_linker" >&6; }
22476 test "$dynamic_linker" = no && can_build_shared=no
22477
22478 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
22479 if test "$GCC" = yes; then
22480   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
22481 fi
22482
22483 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
22484   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
22485 fi
22486 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
22487   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
22488 fi
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
22582 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
22583 hardcode_action=
22584 if test -n "$hardcode_libdir_flag_spec" ||
22585    test -n "$runpath_var" ||
22586    test "X$hardcode_automatic" = "Xyes" ; then
22587
22588   # We can hardcode non-existent directories.
22589   if test "$hardcode_direct" != no &&
22590      # If the only mechanism to avoid hardcoding is shlibpath_var, we
22591      # have to relink, otherwise we might link with an installed library
22592      # when we should be linking with a yet-to-be-installed one
22593      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
22594      test "$hardcode_minus_L" != no; then
22595     # Linking always hardcodes the temporary library directory.
22596     hardcode_action=relink
22597   else
22598     # We can link without hardcoding, and we can hardcode nonexisting dirs.
22599     hardcode_action=immediate
22600   fi
22601 else
22602   # We cannot hardcode anything, or else we can only hardcode existing
22603   # directories.
22604   hardcode_action=unsupported
22605 fi
22606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
22607 $as_echo "$hardcode_action" >&6; }
22608
22609 if test "$hardcode_action" = relink ||
22610    test "$inherit_rpath" = yes; then
22611   # Fast installation is not supported
22612   enable_fast_install=no
22613 elif test "$shlibpath_overrides_runpath" = yes ||
22614      test "$enable_shared" = no; then
22615   # Fast installation is not necessary
22616   enable_fast_install=needless
22617 fi
22618
22619
22620
22621
22622
22623
22624   if test "x$enable_dlopen" != xyes; then
22625   enable_dlopen=unknown
22626   enable_dlopen_self=unknown
22627   enable_dlopen_self_static=unknown
22628 else
22629   lt_cv_dlopen=no
22630   lt_cv_dlopen_libs=
22631
22632   case $host_os in
22633   beos*)
22634     lt_cv_dlopen="load_add_on"
22635     lt_cv_dlopen_libs=
22636     lt_cv_dlopen_self=yes
22637     ;;
22638
22639   mingw* | pw32* | cegcc*)
22640     lt_cv_dlopen="LoadLibrary"
22641     lt_cv_dlopen_libs=
22642     ;;
22643
22644   cygwin*)
22645     lt_cv_dlopen="dlopen"
22646     lt_cv_dlopen_libs=
22647     ;;
22648
22649   darwin*)
22650   # if libdl is installed we need to link against it
22651     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
22652 $as_echo_n "checking for dlopen in -ldl... " >&6; }
22653 if ${ac_cv_lib_dl_dlopen+:} false; then :
22654   $as_echo_n "(cached) " >&6
22655 else
22656   ac_check_lib_save_LIBS=$LIBS
22657 LIBS="-ldl  $LIBS"
22658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22659 /* end confdefs.h.  */
22660
22661 /* Override any GCC internal prototype to avoid an error.
22662    Use char because int might match the return type of a GCC
22663    builtin and then its argument prototype would still apply.  */
22664 #ifdef __cplusplus
22665 extern "C"
22666 #endif
22667 char dlopen ();
22668 int
22669 main ()
22670 {
22671 return dlopen ();
22672   ;
22673   return 0;
22674 }
22675 _ACEOF
22676 if ac_fn_c_try_link "$LINENO"; then :
22677   ac_cv_lib_dl_dlopen=yes
22678 else
22679   ac_cv_lib_dl_dlopen=no
22680 fi
22681 rm -f core conftest.err conftest.$ac_objext \
22682     conftest$ac_exeext conftest.$ac_ext
22683 LIBS=$ac_check_lib_save_LIBS
22684 fi
22685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
22686 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
22687 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
22688   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
22689 else
22690
22691     lt_cv_dlopen="dyld"
22692     lt_cv_dlopen_libs=
22693     lt_cv_dlopen_self=yes
22694
22695 fi
22696
22697     ;;
22698
22699   *)
22700     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
22701 if test "x$ac_cv_func_shl_load" = xyes; then :
22702   lt_cv_dlopen="shl_load"
22703 else
22704   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
22705 $as_echo_n "checking for shl_load in -ldld... " >&6; }
22706 if ${ac_cv_lib_dld_shl_load+:} false; then :
22707   $as_echo_n "(cached) " >&6
22708 else
22709   ac_check_lib_save_LIBS=$LIBS
22710 LIBS="-ldld  $LIBS"
22711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22712 /* end confdefs.h.  */
22713
22714 /* Override any GCC internal prototype to avoid an error.
22715    Use char because int might match the return type of a GCC
22716    builtin and then its argument prototype would still apply.  */
22717 #ifdef __cplusplus
22718 extern "C"
22719 #endif
22720 char shl_load ();
22721 int
22722 main ()
22723 {
22724 return shl_load ();
22725   ;
22726   return 0;
22727 }
22728 _ACEOF
22729 if ac_fn_c_try_link "$LINENO"; then :
22730   ac_cv_lib_dld_shl_load=yes
22731 else
22732   ac_cv_lib_dld_shl_load=no
22733 fi
22734 rm -f core conftest.err conftest.$ac_objext \
22735     conftest$ac_exeext conftest.$ac_ext
22736 LIBS=$ac_check_lib_save_LIBS
22737 fi
22738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
22739 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
22740 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
22741   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
22742 else
22743   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
22744 if test "x$ac_cv_func_dlopen" = xyes; then :
22745   lt_cv_dlopen="dlopen"
22746 else
22747   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
22748 $as_echo_n "checking for dlopen in -ldl... " >&6; }
22749 if ${ac_cv_lib_dl_dlopen+:} false; then :
22750   $as_echo_n "(cached) " >&6
22751 else
22752   ac_check_lib_save_LIBS=$LIBS
22753 LIBS="-ldl  $LIBS"
22754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22755 /* end confdefs.h.  */
22756
22757 /* Override any GCC internal prototype to avoid an error.
22758    Use char because int might match the return type of a GCC
22759    builtin and then its argument prototype would still apply.  */
22760 #ifdef __cplusplus
22761 extern "C"
22762 #endif
22763 char dlopen ();
22764 int
22765 main ()
22766 {
22767 return dlopen ();
22768   ;
22769   return 0;
22770 }
22771 _ACEOF
22772 if ac_fn_c_try_link "$LINENO"; then :
22773   ac_cv_lib_dl_dlopen=yes
22774 else
22775   ac_cv_lib_dl_dlopen=no
22776 fi
22777 rm -f core conftest.err conftest.$ac_objext \
22778     conftest$ac_exeext conftest.$ac_ext
22779 LIBS=$ac_check_lib_save_LIBS
22780 fi
22781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
22782 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
22783 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
22784   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
22785 else
22786   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
22787 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
22788 if ${ac_cv_lib_svld_dlopen+:} false; then :
22789   $as_echo_n "(cached) " >&6
22790 else
22791   ac_check_lib_save_LIBS=$LIBS
22792 LIBS="-lsvld  $LIBS"
22793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22794 /* end confdefs.h.  */
22795
22796 /* Override any GCC internal prototype to avoid an error.
22797    Use char because int might match the return type of a GCC
22798    builtin and then its argument prototype would still apply.  */
22799 #ifdef __cplusplus
22800 extern "C"
22801 #endif
22802 char dlopen ();
22803 int
22804 main ()
22805 {
22806 return dlopen ();
22807   ;
22808   return 0;
22809 }
22810 _ACEOF
22811 if ac_fn_c_try_link "$LINENO"; then :
22812   ac_cv_lib_svld_dlopen=yes
22813 else
22814   ac_cv_lib_svld_dlopen=no
22815 fi
22816 rm -f core conftest.err conftest.$ac_objext \
22817     conftest$ac_exeext conftest.$ac_ext
22818 LIBS=$ac_check_lib_save_LIBS
22819 fi
22820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
22821 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
22822 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
22823   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
22824 else
22825   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
22826 $as_echo_n "checking for dld_link in -ldld... " >&6; }
22827 if ${ac_cv_lib_dld_dld_link+:} false; then :
22828   $as_echo_n "(cached) " >&6
22829 else
22830   ac_check_lib_save_LIBS=$LIBS
22831 LIBS="-ldld  $LIBS"
22832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22833 /* end confdefs.h.  */
22834
22835 /* Override any GCC internal prototype to avoid an error.
22836    Use char because int might match the return type of a GCC
22837    builtin and then its argument prototype would still apply.  */
22838 #ifdef __cplusplus
22839 extern "C"
22840 #endif
22841 char dld_link ();
22842 int
22843 main ()
22844 {
22845 return dld_link ();
22846   ;
22847   return 0;
22848 }
22849 _ACEOF
22850 if ac_fn_c_try_link "$LINENO"; then :
22851   ac_cv_lib_dld_dld_link=yes
22852 else
22853   ac_cv_lib_dld_dld_link=no
22854 fi
22855 rm -f core conftest.err conftest.$ac_objext \
22856     conftest$ac_exeext conftest.$ac_ext
22857 LIBS=$ac_check_lib_save_LIBS
22858 fi
22859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
22860 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
22861 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
22862   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
22863 fi
22864
22865
22866 fi
22867
22868
22869 fi
22870
22871
22872 fi
22873
22874
22875 fi
22876
22877
22878 fi
22879
22880     ;;
22881   esac
22882
22883   if test "x$lt_cv_dlopen" != xno; then
22884     enable_dlopen=yes
22885   else
22886     enable_dlopen=no
22887   fi
22888
22889   case $lt_cv_dlopen in
22890   dlopen)
22891     save_CPPFLAGS="$CPPFLAGS"
22892     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
22893
22894     save_LDFLAGS="$LDFLAGS"
22895     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
22896
22897     save_LIBS="$LIBS"
22898     LIBS="$lt_cv_dlopen_libs $LIBS"
22899
22900     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
22901 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
22902 if ${lt_cv_dlopen_self+:} false; then :
22903   $as_echo_n "(cached) " >&6
22904 else
22905           if test "$cross_compiling" = yes; then :
22906   lt_cv_dlopen_self=cross
22907 else
22908   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
22909   lt_status=$lt_dlunknown
22910   cat > conftest.$ac_ext <<_LT_EOF
22911 #line $LINENO "configure"
22912 #include "confdefs.h"
22913
22914 #if HAVE_DLFCN_H
22915 #include <dlfcn.h>
22916 #endif
22917
22918 #include <stdio.h>
22919
22920 #ifdef RTLD_GLOBAL
22921 #  define LT_DLGLOBAL           RTLD_GLOBAL
22922 #else
22923 #  ifdef DL_GLOBAL
22924 #    define LT_DLGLOBAL         DL_GLOBAL
22925 #  else
22926 #    define LT_DLGLOBAL         0
22927 #  endif
22928 #endif
22929
22930 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
22931    find out it does not work in some platform. */
22932 #ifndef LT_DLLAZY_OR_NOW
22933 #  ifdef RTLD_LAZY
22934 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
22935 #  else
22936 #    ifdef DL_LAZY
22937 #      define LT_DLLAZY_OR_NOW          DL_LAZY
22938 #    else
22939 #      ifdef RTLD_NOW
22940 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
22941 #      else
22942 #        ifdef DL_NOW
22943 #          define LT_DLLAZY_OR_NOW      DL_NOW
22944 #        else
22945 #          define LT_DLLAZY_OR_NOW      0
22946 #        endif
22947 #      endif
22948 #    endif
22949 #  endif
22950 #endif
22951
22952 /* When -fvisbility=hidden is used, assume the code has been annotated
22953    correspondingly for the symbols needed.  */
22954 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
22955 int fnord () __attribute__((visibility("default")));
22956 #endif
22957
22958 int fnord () { return 42; }
22959 int main ()
22960 {
22961   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
22962   int status = $lt_dlunknown;
22963
22964   if (self)
22965     {
22966       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
22967       else
22968         {
22969           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
22970           else puts (dlerror ());
22971         }
22972       /* dlclose (self); */
22973     }
22974   else
22975     puts (dlerror ());
22976
22977   return status;
22978 }
22979 _LT_EOF
22980   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
22981   (eval $ac_link) 2>&5
22982   ac_status=$?
22983   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22984   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
22985     (./conftest; exit; ) >&5 2>/dev/null
22986     lt_status=$?
22987     case x$lt_status in
22988       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
22989       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
22990       x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
22991     esac
22992   else :
22993     # compilation failed
22994     lt_cv_dlopen_self=no
22995   fi
22996 fi
22997 rm -fr conftest*
22998
22999
23000 fi
23001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
23002 $as_echo "$lt_cv_dlopen_self" >&6; }
23003
23004     if test "x$lt_cv_dlopen_self" = xyes; then
23005       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
23006       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
23007 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
23008 if ${lt_cv_dlopen_self_static+:} false; then :
23009   $as_echo_n "(cached) " >&6
23010 else
23011           if test "$cross_compiling" = yes; then :
23012   lt_cv_dlopen_self_static=cross
23013 else
23014   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
23015   lt_status=$lt_dlunknown
23016   cat > conftest.$ac_ext <<_LT_EOF
23017 #line $LINENO "configure"
23018 #include "confdefs.h"
23019
23020 #if HAVE_DLFCN_H
23021 #include <dlfcn.h>
23022 #endif
23023
23024 #include <stdio.h>
23025
23026 #ifdef RTLD_GLOBAL
23027 #  define LT_DLGLOBAL           RTLD_GLOBAL
23028 #else
23029 #  ifdef DL_GLOBAL
23030 #    define LT_DLGLOBAL         DL_GLOBAL
23031 #  else
23032 #    define LT_DLGLOBAL         0
23033 #  endif
23034 #endif
23035
23036 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
23037    find out it does not work in some platform. */
23038 #ifndef LT_DLLAZY_OR_NOW
23039 #  ifdef RTLD_LAZY
23040 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
23041 #  else
23042 #    ifdef DL_LAZY
23043 #      define LT_DLLAZY_OR_NOW          DL_LAZY
23044 #    else
23045 #      ifdef RTLD_NOW
23046 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
23047 #      else
23048 #        ifdef DL_NOW
23049 #          define LT_DLLAZY_OR_NOW      DL_NOW
23050 #        else
23051 #          define LT_DLLAZY_OR_NOW      0
23052 #        endif
23053 #      endif
23054 #    endif
23055 #  endif
23056 #endif
23057
23058 /* When -fvisbility=hidden is used, assume the code has been annotated
23059    correspondingly for the symbols needed.  */
23060 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
23061 int fnord () __attribute__((visibility("default")));
23062 #endif
23063
23064 int fnord () { return 42; }
23065 int main ()
23066 {
23067   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
23068   int status = $lt_dlunknown;
23069
23070   if (self)
23071     {
23072       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
23073       else
23074         {
23075           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
23076           else puts (dlerror ());
23077         }
23078       /* dlclose (self); */
23079     }
23080   else
23081     puts (dlerror ());
23082
23083   return status;
23084 }
23085 _LT_EOF
23086   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
23087   (eval $ac_link) 2>&5
23088   ac_status=$?
23089   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23090   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
23091     (./conftest; exit; ) >&5 2>/dev/null
23092     lt_status=$?
23093     case x$lt_status in
23094       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
23095       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
23096       x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
23097     esac
23098   else :
23099     # compilation failed
23100     lt_cv_dlopen_self_static=no
23101   fi
23102 fi
23103 rm -fr conftest*
23104
23105
23106 fi
23107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
23108 $as_echo "$lt_cv_dlopen_self_static" >&6; }
23109     fi
23110
23111     CPPFLAGS="$save_CPPFLAGS"
23112     LDFLAGS="$save_LDFLAGS"
23113     LIBS="$save_LIBS"
23114     ;;
23115   esac
23116
23117   case $lt_cv_dlopen_self in
23118   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
23119   *) enable_dlopen_self=unknown ;;
23120   esac
23121
23122   case $lt_cv_dlopen_self_static in
23123   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
23124   *) enable_dlopen_self_static=unknown ;;
23125   esac
23126 fi
23127
23128
23129
23130
23131
23132
23133
23134
23135
23136
23137
23138
23139
23140
23141
23142
23143
23144 striplib=
23145 old_striplib=
23146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
23147 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
23148 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
23149   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
23150   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
23151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23152 $as_echo "yes" >&6; }
23153 else
23154 # FIXME - insert some real tests, host_os isn't really good enough
23155   case $host_os in
23156   darwin*)
23157     if test -n "$STRIP" ; then
23158       striplib="$STRIP -x"
23159       old_striplib="$STRIP -S"
23160       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23161 $as_echo "yes" >&6; }
23162     else
23163       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23164 $as_echo "no" >&6; }
23165     fi
23166     ;;
23167   *)
23168     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23169 $as_echo "no" >&6; }
23170     ;;
23171   esac
23172 fi
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
23185   # Report which library types will actually be built
23186   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
23187 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
23188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
23189 $as_echo "$can_build_shared" >&6; }
23190
23191   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
23192 $as_echo_n "checking whether to build shared libraries... " >&6; }
23193   test "$can_build_shared" = "no" && enable_shared=no
23194
23195   # On AIX, shared libraries and static libraries use the same namespace, and
23196   # are all built from PIC.
23197   case $host_os in
23198   aix3*)
23199     test "$enable_shared" = yes && enable_static=no
23200     if test -n "$RANLIB"; then
23201       archive_cmds="$archive_cmds~\$RANLIB \$lib"
23202       postinstall_cmds='$RANLIB $lib'
23203     fi
23204     ;;
23205
23206   aix[4-9]*)
23207     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
23208       test "$enable_shared" = yes && enable_static=no
23209     fi
23210     ;;
23211   esac
23212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
23213 $as_echo "$enable_shared" >&6; }
23214
23215   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
23216 $as_echo_n "checking whether to build static libraries... " >&6; }
23217   # Make sure either enable_shared or enable_static is yes.
23218   test "$enable_shared" = yes || enable_static=yes
23219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
23220 $as_echo "$enable_static" >&6; }
23221
23222
23223
23224
23225 fi
23226 ac_ext=c
23227 ac_cpp='$CPP $CPPFLAGS'
23228 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23229 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23230 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23231
23232 CC="$lt_save_CC"
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246         ac_config_commands="$ac_config_commands libtool"
23247
23248
23249
23250
23251 # Only expand once:
23252
23253
23254
23255
23256
23257
23258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
23259 $as_echo_n "checking if sntp will be built... " >&6; }
23260
23261 # Check whether --with-sntp was given.
23262 if test "${with_sntp+set}" = set; then :
23263   withval=$with_sntp;
23264 else
23265   with_sntp="${withsntp=yes}"
23266
23267 fi
23268
23269 case "$with_sntp" in
23270  no)
23271     SNTP=
23272     ;;
23273  *)
23274     SNTP=sntp
23275     ;;
23276 esac
23277
23278  if test -n "$SNTP"; then
23279   BUILD_SNTP_TRUE=
23280   BUILD_SNTP_FALSE='#'
23281 else
23282   BUILD_SNTP_TRUE='#'
23283   BUILD_SNTP_FALSE=
23284 fi
23285
23286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
23287 $as_echo "$with_sntp" >&6; }
23288
23289
23290
23291 case "$SNTP" in
23292  '')
23293     SNTP_DB=
23294     SNTP_DL=
23295     SNTP_DS=
23296     ;;
23297 esac
23298
23299 ###
23300
23301 # NTP has (so far) been relying on leading-edge autogen.
23302 # Therefore, by default:
23303 # - use the version we ship with
23304 # - do not install it
23305 # - build a static copy (AC_DISABLE_SHARED - done earlier)
23306 case "${enable_local_libopts+set}" in
23307  set) ;;
23308  *) enable_local_libopts=yes ;;
23309 esac
23310 case "${enable_libopts_install+set}" in
23311  set) ;;
23312  *) enable_libopts_install=no ;;
23313 esac
23314 enable_nls=no
23315
23316
23317   ac_header_dirent=no
23318 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
23319   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
23320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
23321 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
23322 if eval \${$as_ac_Header+:} false; then :
23323   $as_echo_n "(cached) " >&6
23324 else
23325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23326 /* end confdefs.h.  */
23327 #include <sys/types.h>
23328 #include <$ac_hdr>
23329
23330 int
23331 main ()
23332 {
23333 if ((DIR *) 0)
23334 return 0;
23335   ;
23336   return 0;
23337 }
23338 _ACEOF
23339 if ac_fn_c_try_compile "$LINENO"; then :
23340   eval "$as_ac_Header=yes"
23341 else
23342   eval "$as_ac_Header=no"
23343 fi
23344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23345 fi
23346 eval ac_res=\$$as_ac_Header
23347                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23348 $as_echo "$ac_res" >&6; }
23349 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23350   cat >>confdefs.h <<_ACEOF
23351 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
23352 _ACEOF
23353
23354 ac_header_dirent=$ac_hdr; break
23355 fi
23356
23357 done
23358 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
23359 if test $ac_header_dirent = dirent.h; then
23360   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
23361 $as_echo_n "checking for library containing opendir... " >&6; }
23362 if ${ac_cv_search_opendir+:} false; then :
23363   $as_echo_n "(cached) " >&6
23364 else
23365   ac_func_search_save_LIBS=$LIBS
23366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23367 /* end confdefs.h.  */
23368
23369 /* Override any GCC internal prototype to avoid an error.
23370    Use char because int might match the return type of a GCC
23371    builtin and then its argument prototype would still apply.  */
23372 #ifdef __cplusplus
23373 extern "C"
23374 #endif
23375 char opendir ();
23376 int
23377 main ()
23378 {
23379 return opendir ();
23380   ;
23381   return 0;
23382 }
23383 _ACEOF
23384 for ac_lib in '' dir; do
23385   if test -z "$ac_lib"; then
23386     ac_res="none required"
23387   else
23388     ac_res=-l$ac_lib
23389     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23390   fi
23391   if ac_fn_c_try_link "$LINENO"; then :
23392   ac_cv_search_opendir=$ac_res
23393 fi
23394 rm -f core conftest.err conftest.$ac_objext \
23395     conftest$ac_exeext
23396   if ${ac_cv_search_opendir+:} false; then :
23397   break
23398 fi
23399 done
23400 if ${ac_cv_search_opendir+:} false; then :
23401
23402 else
23403   ac_cv_search_opendir=no
23404 fi
23405 rm conftest.$ac_ext
23406 LIBS=$ac_func_search_save_LIBS
23407 fi
23408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
23409 $as_echo "$ac_cv_search_opendir" >&6; }
23410 ac_res=$ac_cv_search_opendir
23411 if test "$ac_res" != no; then :
23412   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23413
23414 fi
23415
23416 else
23417   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
23418 $as_echo_n "checking for library containing opendir... " >&6; }
23419 if ${ac_cv_search_opendir+:} false; then :
23420   $as_echo_n "(cached) " >&6
23421 else
23422   ac_func_search_save_LIBS=$LIBS
23423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23424 /* end confdefs.h.  */
23425
23426 /* Override any GCC internal prototype to avoid an error.
23427    Use char because int might match the return type of a GCC
23428    builtin and then its argument prototype would still apply.  */
23429 #ifdef __cplusplus
23430 extern "C"
23431 #endif
23432 char opendir ();
23433 int
23434 main ()
23435 {
23436 return opendir ();
23437   ;
23438   return 0;
23439 }
23440 _ACEOF
23441 for ac_lib in '' x; do
23442   if test -z "$ac_lib"; then
23443     ac_res="none required"
23444   else
23445     ac_res=-l$ac_lib
23446     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23447   fi
23448   if ac_fn_c_try_link "$LINENO"; then :
23449   ac_cv_search_opendir=$ac_res
23450 fi
23451 rm -f core conftest.err conftest.$ac_objext \
23452     conftest$ac_exeext
23453   if ${ac_cv_search_opendir+:} false; then :
23454   break
23455 fi
23456 done
23457 if ${ac_cv_search_opendir+:} false; then :
23458
23459 else
23460   ac_cv_search_opendir=no
23461 fi
23462 rm conftest.$ac_ext
23463 LIBS=$ac_func_search_save_LIBS
23464 fi
23465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
23466 $as_echo "$ac_cv_search_opendir" >&6; }
23467 ac_res=$ac_cv_search_opendir
23468 if test "$ac_res" != no; then :
23469   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23470
23471 fi
23472
23473 fi
23474
23475
23476   # =================
23477   # AC_CHECK_HEADERS
23478   # =================
23479   for ac_header in  \
23480       sys/mman.h    sys/param.h   sys/poll.h    sys/procset.h \
23481       sys/select.h  sys/socket.h  sys/stropts.h sys/time.h \
23482       sys/un.h      sys/wait.h    dlfcn.h       errno.h \
23483       fcntl.h       libgen.h      libintl.h     memory.h \
23484       netinet/in.h  setjmp.h      stdbool.h     sysexits.h \
23485       unistd.h      utime.h
23486 do :
23487   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23488 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23489 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23490   cat >>confdefs.h <<_ACEOF
23491 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23492 _ACEOF
23493
23494 fi
23495
23496 done
23497
23498
23499   for ac_header in stdarg.h     varargs.h
23500 do :
23501   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23502 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23503 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23504   cat >>confdefs.h <<_ACEOF
23505 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23506 _ACEOF
23507  lo_have_arg_hdr=true;break
23508 else
23509   lo_have_arg_hdr=false
23510 fi
23511
23512 done
23513
23514
23515   for ac_header in string.h     strings.h
23516 do :
23517   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23518 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23519 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23520   cat >>confdefs.h <<_ACEOF
23521 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23522 _ACEOF
23523  lo_have_str_hdr=true;break
23524 else
23525   lo_have_str_hdr=false
23526 fi
23527
23528 done
23529
23530
23531   for ac_header in limits.h     sys/limits.h  values.h
23532 do :
23533   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23534 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23535 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23536   cat >>confdefs.h <<_ACEOF
23537 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23538 _ACEOF
23539  lo_have_lim_hdr=true;break
23540 else
23541   lo_have_lim_hdr=false
23542 fi
23543
23544 done
23545
23546
23547   for ac_header in inttypes.h   stdint.h
23548 do :
23549   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23550 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23551 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23552   cat >>confdefs.h <<_ACEOF
23553 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23554 _ACEOF
23555  lo_have_typ_hdr=true;break
23556 else
23557   lo_have_typ_hdr=false
23558 fi
23559
23560 done
23561
23562
23563   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
23564 $as_echo_n "checking for working stdnoreturn.h... " >&6; }
23565 if ${gl_cv_header_working_stdnoreturn_h+:} false; then :
23566   $as_echo_n "(cached) " >&6
23567 else
23568   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23569 /* end confdefs.h.  */
23570 #include <stdlib.h>
23571             #include <stdnoreturn.h>
23572             /* Do not check for 'noreturn' after the return type.
23573                C11 allows it, but it's rarely done that way
23574                and circa-2012 bleeding-edge GCC rejects it when given
23575                -Werror=old-style-declaration.  */
23576             noreturn void foo1 (void) { exit (0); }
23577             _Noreturn void foo2 (void) { exit (0); }
23578             int testit (int argc, char **argv) {
23579               if (argc & 1)
23580                 return 0;
23581               (argv[0][0] ? foo1 : foo2) ();
23582             }
23583
23584 int
23585 main ()
23586 {
23587
23588   ;
23589   return 0;
23590 }
23591 _ACEOF
23592 if ac_fn_c_try_compile "$LINENO"; then :
23593   gl_cv_header_working_stdnoreturn_h=yes
23594 else
23595   gl_cv_header_working_stdnoreturn_h=no
23596 fi
23597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23598 fi
23599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
23600 $as_echo "$gl_cv_header_working_stdnoreturn_h" >&6; }
23601
23602   if test $gl_cv_header_working_stdnoreturn_h = yes; then
23603     STDNORETURN_H=''
23604   else
23605     STDNORETURN_H='stdnoreturn.h'
23606   fi
23607
23608
23609    if test -n "$STDNORETURN_H"; then
23610   GL_GENERATE_STDNORETURN_H_TRUE=
23611   GL_GENERATE_STDNORETURN_H_FALSE='#'
23612 else
23613   GL_GENERATE_STDNORETURN_H_TRUE='#'
23614   GL_GENERATE_STDNORETURN_H_FALSE=
23615 fi
23616
23617
23618
23619   # ----------------------------------------------------------------------
23620   # check for various programs used during the build.
23621   # On OS/X, "wchar.h" needs "runetype.h" to work properly.
23622   # ----------------------------------------------------------------------
23623   for ac_header in runetype.h wchar.h
23624 do :
23625   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23626 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
23627   $ac_includes_default
23628   #if HAVE_RUNETYPE_H
23629   # include <runetype.h>
23630   #endif
23631
23632 "
23633 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23634   cat >>confdefs.h <<_ACEOF
23635 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23636 _ACEOF
23637
23638 fi
23639
23640 done
23641
23642
23643   # Check whether --enable-nls was given.
23644 if test "${enable_nls+set}" = set; then :
23645   enableval=$enable_nls;
23646 fi
23647
23648   if test "x$enable_nls" != "xno" && \
23649   test "X${ac_cv_header_libintl_h}" = Xyes; then :
23650
23651
23652 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
23653
23654 fi
23655
23656   # --------------------------------------------
23657   # Verify certain entries from AC_CHECK_HEADERS
23658   # --------------------------------------------
23659   ${lo_have_arg_hdr} || \
23660     as_fn_error $? "you must have stdarg.h or varargs.h on your system" "$LINENO" 5
23661
23662   ${lo_have_str_hdr} || \
23663     as_fn_error $? "you must have string.h or strings.h on your system" "$LINENO" 5
23664
23665   ${lo_have_lim_hdr} || \
23666     as_fn_error $? "you must have one of limits.h, sys/limits.h or values.h" "$LINENO" 5
23667
23668   ${lo_have_typ_hdr} || \
23669     as_fn_error $? "you must have inttypes.h or stdint.h on your system" "$LINENO" 5
23670
23671   for f in sys_types sys_param sys_stat string errno stdlib memory setjmp
23672   do eval as_ac_var=\${ac_cv_header_${f}_h}
23673      test "X${as_ac_var}" = Xyes || {
23674        as_fn_error $? "you must have ${f}.h on your system" "$LINENO" 5
23675      }
23676   done
23677   test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
23678     echo '#include <stdint.h>' > inttypes.h
23679
23680   # ----------------------------------------------------------------------
23681   # Checks for typedefs
23682   # ----------------------------------------------------------------------
23683   ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
23684 if test "x$ac_cv_type_wchar_t" = xyes; then :
23685
23686 cat >>confdefs.h <<_ACEOF
23687 #define HAVE_WCHAR_T 1
23688 _ACEOF
23689
23690
23691 fi
23692
23693   ac_fn_c_check_type "$LINENO" "wint_t" "ac_cv_type_wint_t" "
23694     $ac_includes_default
23695     #if HAVE_RUNETYPE_H
23696     # include <runetype.h>
23697     #endif
23698     #if HAVE_WCHAR_H
23699     # include <wchar.h>
23700     #endif
23701
23702 "
23703 if test "x$ac_cv_type_wint_t" = xyes; then :
23704
23705 cat >>confdefs.h <<_ACEOF
23706 #define HAVE_WINT_T 1
23707 _ACEOF
23708
23709
23710 fi
23711
23712   ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
23713 if test "x$ac_cv_type_int8_t" = xyes; then :
23714
23715 cat >>confdefs.h <<_ACEOF
23716 #define HAVE_INT8_T 1
23717 _ACEOF
23718
23719
23720 fi
23721 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
23722 if test "x$ac_cv_type_uint8_t" = xyes; then :
23723
23724 cat >>confdefs.h <<_ACEOF
23725 #define HAVE_UINT8_T 1
23726 _ACEOF
23727
23728
23729 fi
23730 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
23731 if test "x$ac_cv_type_int16_t" = xyes; then :
23732
23733 cat >>confdefs.h <<_ACEOF
23734 #define HAVE_INT16_T 1
23735 _ACEOF
23736
23737
23738 fi
23739 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
23740 if test "x$ac_cv_type_uint16_t" = xyes; then :
23741
23742 cat >>confdefs.h <<_ACEOF
23743 #define HAVE_UINT16_T 1
23744 _ACEOF
23745
23746
23747 fi
23748 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
23749 if test "x$ac_cv_type_int32_t" = xyes; then :
23750
23751 cat >>confdefs.h <<_ACEOF
23752 #define HAVE_INT32_T 1
23753 _ACEOF
23754
23755
23756 fi
23757 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
23758 if test "x$ac_cv_type_uint32_t" = xyes; then :
23759
23760 cat >>confdefs.h <<_ACEOF
23761 #define HAVE_UINT32_T 1
23762 _ACEOF
23763
23764
23765 fi
23766 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
23767 if test "x$ac_cv_type_intptr_t" = xyes; then :
23768
23769 cat >>confdefs.h <<_ACEOF
23770 #define HAVE_INTPTR_T 1
23771 _ACEOF
23772
23773
23774 fi
23775 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
23776 if test "x$ac_cv_type_uintptr_t" = xyes; then :
23777
23778 cat >>confdefs.h <<_ACEOF
23779 #define HAVE_UINTPTR_T 1
23780 _ACEOF
23781
23782
23783 fi
23784 ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
23785 if test "x$ac_cv_type_uint_t" = xyes; then :
23786
23787 cat >>confdefs.h <<_ACEOF
23788 #define HAVE_UINT_T 1
23789 _ACEOF
23790
23791
23792 fi
23793 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
23794 if test "x$ac_cv_type_pid_t" = xyes; then :
23795
23796 cat >>confdefs.h <<_ACEOF
23797 #define HAVE_PID_T 1
23798 _ACEOF
23799
23800
23801 fi
23802 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
23803 if test "x$ac_cv_type_size_t" = xyes; then :
23804
23805 cat >>confdefs.h <<_ACEOF
23806 #define HAVE_SIZE_T 1
23807 _ACEOF
23808
23809
23810 fi
23811 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
23812 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
23813
23814 cat >>confdefs.h <<_ACEOF
23815 #define HAVE_PTRDIFF_T 1
23816 _ACEOF
23817
23818
23819 fi
23820
23821   # The cast to long int works around a bug in the HP C Compiler
23822 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23823 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23824 # This bug is HP SR number 8606223364.
23825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
23826 $as_echo_n "checking size of char *... " >&6; }
23827 if ${ac_cv_sizeof_char_p+:} false; then :
23828   $as_echo_n "(cached) " >&6
23829 else
23830   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p"        "$ac_includes_default"; then :
23831
23832 else
23833   if test "$ac_cv_type_char_p" = yes; then
23834      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23835 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23836 as_fn_error 77 "cannot compute sizeof (char *)
23837 See \`config.log' for more details" "$LINENO" 5; }
23838    else
23839      ac_cv_sizeof_char_p=0
23840    fi
23841 fi
23842
23843 fi
23844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
23845 $as_echo "$ac_cv_sizeof_char_p" >&6; }
23846
23847
23848
23849 cat >>confdefs.h <<_ACEOF
23850 #define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
23851 _ACEOF
23852
23853
23854   # The cast to long int works around a bug in the HP C Compiler
23855 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23856 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23857 # This bug is HP SR number 8606223364.
23858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
23859 $as_echo_n "checking size of int... " >&6; }
23860 if ${ac_cv_sizeof_int+:} false; then :
23861   $as_echo_n "(cached) " >&6
23862 else
23863   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
23864
23865 else
23866   if test "$ac_cv_type_int" = yes; then
23867      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23868 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23869 as_fn_error 77 "cannot compute sizeof (int)
23870 See \`config.log' for more details" "$LINENO" 5; }
23871    else
23872      ac_cv_sizeof_int=0
23873    fi
23874 fi
23875
23876 fi
23877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
23878 $as_echo "$ac_cv_sizeof_int" >&6; }
23879
23880
23881
23882 cat >>confdefs.h <<_ACEOF
23883 #define SIZEOF_INT $ac_cv_sizeof_int
23884 _ACEOF
23885
23886
23887   # The cast to long int works around a bug in the HP C Compiler
23888 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23889 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23890 # This bug is HP SR number 8606223364.
23891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
23892 $as_echo_n "checking size of long... " >&6; }
23893 if ${ac_cv_sizeof_long+:} false; then :
23894   $as_echo_n "(cached) " >&6
23895 else
23896   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
23897
23898 else
23899   if test "$ac_cv_type_long" = yes; then
23900      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23901 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23902 as_fn_error 77 "cannot compute sizeof (long)
23903 See \`config.log' for more details" "$LINENO" 5; }
23904    else
23905      ac_cv_sizeof_long=0
23906    fi
23907 fi
23908
23909 fi
23910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
23911 $as_echo "$ac_cv_sizeof_long" >&6; }
23912
23913
23914
23915 cat >>confdefs.h <<_ACEOF
23916 #define SIZEOF_LONG $ac_cv_sizeof_long
23917 _ACEOF
23918
23919
23920   # The cast to long int works around a bug in the HP C Compiler
23921 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23922 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23923 # This bug is HP SR number 8606223364.
23924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
23925 $as_echo_n "checking size of short... " >&6; }
23926 if ${ac_cv_sizeof_short+:} false; then :
23927   $as_echo_n "(cached) " >&6
23928 else
23929   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
23930
23931 else
23932   if test "$ac_cv_type_short" = yes; then
23933      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23934 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23935 as_fn_error 77 "cannot compute sizeof (short)
23936 See \`config.log' for more details" "$LINENO" 5; }
23937    else
23938      ac_cv_sizeof_short=0
23939    fi
23940 fi
23941
23942 fi
23943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
23944 $as_echo "$ac_cv_sizeof_short" >&6; }
23945
23946
23947
23948 cat >>confdefs.h <<_ACEOF
23949 #define SIZEOF_SHORT $ac_cv_sizeof_short
23950 _ACEOF
23951
23952
23953
23954   # ------------
23955   # AC_CHECK_LIB
23956   # ------------
23957   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
23958 $as_echo_n "checking for pathfind in -lgen... " >&6; }
23959 if ${ac_cv_lib_gen_pathfind+:} false; then :
23960   $as_echo_n "(cached) " >&6
23961 else
23962   ac_check_lib_save_LIBS=$LIBS
23963 LIBS="-lgen  $LIBS"
23964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23965 /* end confdefs.h.  */
23966
23967 /* Override any GCC internal prototype to avoid an error.
23968    Use char because int might match the return type of a GCC
23969    builtin and then its argument prototype would still apply.  */
23970 #ifdef __cplusplus
23971 extern "C"
23972 #endif
23973 char pathfind ();
23974 int
23975 main ()
23976 {
23977 return pathfind ();
23978   ;
23979   return 0;
23980 }
23981 _ACEOF
23982 if ac_fn_c_try_link "$LINENO"; then :
23983   ac_cv_lib_gen_pathfind=yes
23984 else
23985   ac_cv_lib_gen_pathfind=no
23986 fi
23987 rm -f core conftest.err conftest.$ac_objext \
23988     conftest$ac_exeext conftest.$ac_ext
23989 LIBS=$ac_check_lib_save_LIBS
23990 fi
23991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
23992 $as_echo "$ac_cv_lib_gen_pathfind" >&6; }
23993 if test "x$ac_cv_lib_gen_pathfind" = xyes; then :
23994   cat >>confdefs.h <<_ACEOF
23995 #define HAVE_LIBGEN 1
23996 _ACEOF
23997
23998   LIBS="-lgen $LIBS"
23999
24000 fi
24001
24002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
24003 $as_echo_n "checking for gettext in -lintl... " >&6; }
24004 if ${ac_cv_lib_intl_gettext+:} false; then :
24005   $as_echo_n "(cached) " >&6
24006 else
24007   ac_check_lib_save_LIBS=$LIBS
24008 LIBS="-lintl  $LIBS"
24009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24010 /* end confdefs.h.  */
24011
24012 /* Override any GCC internal prototype to avoid an error.
24013    Use char because int might match the return type of a GCC
24014    builtin and then its argument prototype would still apply.  */
24015 #ifdef __cplusplus
24016 extern "C"
24017 #endif
24018 char gettext ();
24019 int
24020 main ()
24021 {
24022 return gettext ();
24023   ;
24024   return 0;
24025 }
24026 _ACEOF
24027 if ac_fn_c_try_link "$LINENO"; then :
24028   ac_cv_lib_intl_gettext=yes
24029 else
24030   ac_cv_lib_intl_gettext=no
24031 fi
24032 rm -f core conftest.err conftest.$ac_objext \
24033     conftest$ac_exeext conftest.$ac_ext
24034 LIBS=$ac_check_lib_save_LIBS
24035 fi
24036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
24037 $as_echo "$ac_cv_lib_intl_gettext" >&6; }
24038 if test "x$ac_cv_lib_intl_gettext" = xyes; then :
24039   cat >>confdefs.h <<_ACEOF
24040 #define HAVE_LIBINTL 1
24041 _ACEOF
24042
24043   LIBS="-lintl $LIBS"
24044
24045 fi
24046
24047   for ac_func in vprintf
24048 do :
24049   ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
24050 if test "x$ac_cv_func_vprintf" = xyes; then :
24051   cat >>confdefs.h <<_ACEOF
24052 #define HAVE_VPRINTF 1
24053 _ACEOF
24054
24055 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
24056 if test "x$ac_cv_func__doprnt" = xyes; then :
24057
24058 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
24059
24060 fi
24061
24062 fi
24063 done
24064
24065
24066   for ac_header in vfork.h
24067 do :
24068   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
24069 if test "x$ac_cv_header_vfork_h" = xyes; then :
24070   cat >>confdefs.h <<_ACEOF
24071 #define HAVE_VFORK_H 1
24072 _ACEOF
24073
24074 fi
24075
24076 done
24077
24078 for ac_func in fork vfork
24079 do :
24080   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24081 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24082 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
24083   cat >>confdefs.h <<_ACEOF
24084 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24085 _ACEOF
24086
24087 fi
24088 done
24089
24090 if test "x$ac_cv_func_fork" = xyes; then
24091   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
24092 $as_echo_n "checking for working fork... " >&6; }
24093 if ${ac_cv_func_fork_works+:} false; then :
24094   $as_echo_n "(cached) " >&6
24095 else
24096   if test "$cross_compiling" = yes; then :
24097   ac_cv_func_fork_works=cross
24098 else
24099   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24100 /* end confdefs.h.  */
24101 $ac_includes_default
24102 int
24103 main ()
24104 {
24105
24106           /* By Ruediger Kuhlmann. */
24107           return fork () < 0;
24108
24109   ;
24110   return 0;
24111 }
24112 _ACEOF
24113 if ac_fn_c_try_run "$LINENO"; then :
24114   ac_cv_func_fork_works=yes
24115 else
24116   ac_cv_func_fork_works=no
24117 fi
24118 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24119   conftest.$ac_objext conftest.beam conftest.$ac_ext
24120 fi
24121
24122 fi
24123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
24124 $as_echo "$ac_cv_func_fork_works" >&6; }
24125
24126 else
24127   ac_cv_func_fork_works=$ac_cv_func_fork
24128 fi
24129 if test "x$ac_cv_func_fork_works" = xcross; then
24130   case $host in
24131     *-*-amigaos* | *-*-msdosdjgpp*)
24132       # Override, as these systems have only a dummy fork() stub
24133       ac_cv_func_fork_works=no
24134       ;;
24135     *)
24136       ac_cv_func_fork_works=yes
24137       ;;
24138   esac
24139   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
24140 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
24141 fi
24142 ac_cv_func_vfork_works=$ac_cv_func_vfork
24143 if test "x$ac_cv_func_vfork" = xyes; then
24144   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
24145 $as_echo_n "checking for working vfork... " >&6; }
24146 if ${ac_cv_func_vfork_works+:} false; then :
24147   $as_echo_n "(cached) " >&6
24148 else
24149   if test "$cross_compiling" = yes; then :
24150   ac_cv_func_vfork_works=cross
24151 else
24152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24153 /* end confdefs.h.  */
24154 /* Thanks to Paul Eggert for this test.  */
24155 $ac_includes_default
24156 #include <sys/wait.h>
24157 #ifdef HAVE_VFORK_H
24158 # include <vfork.h>
24159 #endif
24160 /* On some sparc systems, changes by the child to local and incoming
24161    argument registers are propagated back to the parent.  The compiler
24162    is told about this with #include <vfork.h>, but some compilers
24163    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24164    static variable whose address is put into a register that is
24165    clobbered by the vfork.  */
24166 static void
24167 #ifdef __cplusplus
24168 sparc_address_test (int arg)
24169 # else
24170 sparc_address_test (arg) int arg;
24171 #endif
24172 {
24173   static pid_t child;
24174   if (!child) {
24175     child = vfork ();
24176     if (child < 0) {
24177       perror ("vfork");
24178       _exit(2);
24179     }
24180     if (!child) {
24181       arg = getpid();
24182       write(-1, "", 0);
24183       _exit (arg);
24184     }
24185   }
24186 }
24187
24188 int
24189 main ()
24190 {
24191   pid_t parent = getpid ();
24192   pid_t child;
24193
24194   sparc_address_test (0);
24195
24196   child = vfork ();
24197
24198   if (child == 0) {
24199     /* Here is another test for sparc vfork register problems.  This
24200        test uses lots of local variables, at least as many local
24201        variables as main has allocated so far including compiler
24202        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24203        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24204        reuse the register of parent for one of the local variables,
24205        since it will think that parent can't possibly be used any more
24206        in this routine.  Assigning to the local variable will thus
24207        munge parent in the parent process.  */
24208     pid_t
24209       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24210       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24211     /* Convince the compiler that p..p7 are live; otherwise, it might
24212        use the same hardware register for all 8 local variables.  */
24213     if (p != p1 || p != p2 || p != p3 || p != p4
24214         || p != p5 || p != p6 || p != p7)
24215       _exit(1);
24216
24217     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24218        from child file descriptors.  If the child closes a descriptor
24219        before it execs or exits, this munges the parent's descriptor
24220        as well.  Test for this by closing stdout in the child.  */
24221     _exit(close(fileno(stdout)) != 0);
24222   } else {
24223     int status;
24224     struct stat st;
24225
24226     while (wait(&status) != child)
24227       ;
24228     return (
24229          /* Was there some problem with vforking?  */
24230          child < 0
24231
24232          /* Did the child fail?  (This shouldn't happen.)  */
24233          || status
24234
24235          /* Did the vfork/compiler bug occur?  */
24236          || parent != getpid()
24237
24238          /* Did the file descriptor bug occur?  */
24239          || fstat(fileno(stdout), &st) != 0
24240          );
24241   }
24242 }
24243 _ACEOF
24244 if ac_fn_c_try_run "$LINENO"; then :
24245   ac_cv_func_vfork_works=yes
24246 else
24247   ac_cv_func_vfork_works=no
24248 fi
24249 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24250   conftest.$ac_objext conftest.beam conftest.$ac_ext
24251 fi
24252
24253 fi
24254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
24255 $as_echo "$ac_cv_func_vfork_works" >&6; }
24256
24257 fi;
24258 if test "x$ac_cv_func_fork_works" = xcross; then
24259   ac_cv_func_vfork_works=$ac_cv_func_vfork
24260   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
24261 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
24262 fi
24263
24264 if test "x$ac_cv_func_vfork_works" = xyes; then
24265
24266 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
24267
24268 else
24269
24270 $as_echo "#define vfork fork" >>confdefs.h
24271
24272 fi
24273 if test "x$ac_cv_func_fork_works" = xyes; then
24274
24275 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
24276
24277 fi
24278
24279   for ac_func in mmap canonicalize_file_name snprintf strdup strchr \
24280                  strrchr strsignal fchmod fstat chmod
24281 do :
24282   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24283 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24284 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
24285   cat >>confdefs.h <<_ACEOF
24286 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24287 _ACEOF
24288
24289 fi
24290 done
24291
24292   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
24293 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
24294 if ${ac_cv_path_SED+:} false; then :
24295   $as_echo_n "(cached) " >&6
24296 else
24297             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
24298      for ac_i in 1 2 3 4 5 6 7; do
24299        ac_script="$ac_script$as_nl$ac_script"
24300      done
24301      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
24302      { ac_script=; unset ac_script;}
24303      if test -z "$SED"; then
24304   ac_path_SED_found=false
24305   # Loop through the user's path and test for each of PROGNAME-LIST
24306   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24307 for as_dir in $PATH
24308 do
24309   IFS=$as_save_IFS
24310   test -z "$as_dir" && as_dir=.
24311     for ac_prog in sed gsed; do
24312     for ac_exec_ext in '' $ac_executable_extensions; do
24313       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
24314       as_fn_executable_p "$ac_path_SED" || continue
24315 # Check for GNU ac_path_SED and select it if it is found.
24316   # Check for GNU $ac_path_SED
24317 case `"$ac_path_SED" --version 2>&1` in
24318 *GNU*)
24319   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
24320 *)
24321   ac_count=0
24322   $as_echo_n 0123456789 >"conftest.in"
24323   while :
24324   do
24325     cat "conftest.in" "conftest.in" >"conftest.tmp"
24326     mv "conftest.tmp" "conftest.in"
24327     cp "conftest.in" "conftest.nl"
24328     $as_echo '' >> "conftest.nl"
24329     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
24330     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
24331     as_fn_arith $ac_count + 1 && ac_count=$as_val
24332     if test $ac_count -gt ${ac_path_SED_max-0}; then
24333       # Best one so far, save it but keep looking for a better one
24334       ac_cv_path_SED="$ac_path_SED"
24335       ac_path_SED_max=$ac_count
24336     fi
24337     # 10*(2^10) chars as input seems more than enough
24338     test $ac_count -gt 10 && break
24339   done
24340   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
24341 esac
24342
24343       $ac_path_SED_found && break 3
24344     done
24345   done
24346   done
24347 IFS=$as_save_IFS
24348   if test -z "$ac_cv_path_SED"; then
24349     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
24350   fi
24351 else
24352   ac_cv_path_SED=$SED
24353 fi
24354
24355 fi
24356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
24357 $as_echo "$ac_cv_path_SED" >&6; }
24358  SED="$ac_cv_path_SED"
24359   rm -f conftest.sed
24360
24361   while :
24362   do
24363       POSIX_SHELL=`which bash`
24364       test -x "$POSIX_SHELL" && break
24365       POSIX_SHELL=`which dash`
24366       test -x "$POSIX_SHELL" && break
24367       POSIX_SHELL=/usr/xpg4/bin/sh
24368       test -x "$POSIX_SHELL" && break
24369       POSIX_SHELL=`/bin/sh -c '
24370           exec 2>/dev/null
24371           if ! true ; then exit 1 ; fi
24372           echo /bin/sh'`
24373       test -x "$POSIX_SHELL" && break
24374       as_fn_error $? "cannot locate a working POSIX shell" "$LINENO" 5
24375   done
24376
24377 cat >>confdefs.h <<_ACEOF
24378 #define POSIX_SHELL "${POSIX_SHELL}"
24379 _ACEOF
24380
24381
24382
24383
24384
24385   LIBOPTS_BUILD_BLOCKED=''
24386
24387
24388   NEED_LIBOPTS_DIR=''
24389
24390   # Check whether --enable-local-libopts was given.
24391 if test "${enable_local_libopts+set}" = set; then :
24392   enableval=$enable_local_libopts;
24393     if test x$enableval = xyes ; then
24394        { $as_echo "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
24395 $as_echo "$as_me: Using supplied libopts tearoff" >&6;}
24396        LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
24397        NEED_LIBOPTS_DIR=true
24398        LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
24399     fi
24400 fi
24401
24402
24403   # Check whether --enable-libopts-install was given.
24404 if test "${enable_libopts_install+set}" = set; then :
24405   enableval=$enable_libopts_install;
24406 fi
24407
24408    if test "X${enable_libopts_install}" = Xyes; then
24409   INSTALL_LIBOPTS_TRUE=
24410   INSTALL_LIBOPTS_FALSE='#'
24411 else
24412   INSTALL_LIBOPTS_TRUE='#'
24413   INSTALL_LIBOPTS_FALSE=
24414 fi
24415
24416
24417   if test -z "${NEED_LIBOPTS_DIR}" ; then
24418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
24419 $as_echo_n "checking whether autoopts-config can be found... " >&6; }
24420
24421 # Check whether --with-autoopts-config was given.
24422 if test "${with_autoopts_config+set}" = set; then :
24423   withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
24424 else
24425   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
24426 $as_echo_n "checking whether autoopts-config is specified... " >&6; }
24427 if ${lo_cv_with_autoopts_config+:} false; then :
24428   $as_echo_n "(cached) " >&6
24429 else
24430   if autoopts-config --help 2>/dev/null 1>&2
24431         then lo_cv_with_autoopts_config=autoopts-config
24432         elif libopts-config --help 2>/dev/null 1>&2
24433         then lo_cv_with_autoopts_config=libopts-config
24434         else lo_cv_with_autoopts_config=no ; fi
24435 fi
24436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
24437 $as_echo "$lo_cv_with_autoopts_config" >&6; }
24438
24439 fi
24440  # end of AC_ARG_WITH
24441
24442      if ${lo_cv_test_autoopts+:} false; then :
24443   $as_echo_n "(cached) " >&6
24444 else
24445
24446         if test -z "${lo_cv_with_autoopts_config}" \
24447                 -o X"${lo_cv_with_autoopts_config}" = Xno
24448         then
24449            if autoopts-config --help 2>/dev/null 1>&2
24450            then lo_cv_with_autoopts_config=autoopts-config
24451            elif libopts-config --help 2>/dev/null 1>&2
24452            then lo_cv_with_autoopts_config=libopts-config
24453            else lo_cv_with_autoopts_config=false ; fi
24454         fi
24455         lo_cv_test_autoopts=`
24456             ${lo_cv_with_autoopts_config} --libs` 2> /dev/null
24457         if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"
24458         then lo_cv_test_autoopts=no ; fi
24459
24460 fi
24461  # end of CACHE_VAL
24462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
24463 $as_echo "${lo_cv_test_autoopts}" >&6; }
24464
24465      if test "X${lo_cv_test_autoopts}" != Xno
24466      then
24467         LIBOPTS_LDADD="${lo_cv_test_autoopts}"
24468         LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
24469      else
24470         LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
24471         LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
24472         NEED_LIBOPTS_DIR=true
24473      fi
24474   fi # end of if test -z "${NEED_LIBOPTS_DIR}"
24475   if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
24476     NEED_LIBOPTS_DIR=''
24477   fi
24478    if test -n "${NEED_LIBOPTS_DIR}"; then
24479   NEED_LIBOPTS_TRUE=
24480   NEED_LIBOPTS_FALSE='#'
24481 else
24482   NEED_LIBOPTS_TRUE='#'
24483   NEED_LIBOPTS_FALSE=
24484 fi
24485
24486
24487
24488   LIBOPTS_DIR=libopts
24489
24490
24491 # end of AC_DEFUN of LIBOPTS_CHECK_COMMON
24492
24493
24494     if test -z "$NEED_LIBOPTS_TRUE"; then :
24495
24496
24497
24498   # Check to see if a reg expr header is specified.
24499
24500
24501 # Check whether --with-regex-header was given.
24502 if test "${with_regex_header+set}" = set; then :
24503   withval=$with_regex_header; libopts_cv_with_regex_header=${with_regex_header}
24504 else
24505   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a reg expr header is specified" >&5
24506 $as_echo_n "checking whether a reg expr header is specified... " >&6; }
24507 if ${libopts_cv_with_regex_header+:} false; then :
24508   $as_echo_n "(cached) " >&6
24509 else
24510   libopts_cv_with_regex_header=no
24511 fi
24512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_regex_header" >&5
24513 $as_echo "$libopts_cv_with_regex_header" >&6; }
24514
24515 fi
24516  # end of AC_ARG_WITH
24517   if test "X${libopts_cv_with_regex_header}" != Xno
24518   then
24519     cat >>confdefs.h <<_ACEOF
24520 #define REGEX_HEADER <${libopts_cv_with_regex_header}>
24521 _ACEOF
24522
24523   else
24524
24525 $as_echo "#define REGEX_HEADER <regex.h>" >>confdefs.h
24526
24527   fi
24528
24529
24530
24531   # Check to see if a working libregex can be found.
24532
24533
24534 # Check whether --with-libregex was given.
24535 if test "${with_libregex+set}" = set; then :
24536   withval=$with_libregex; libopts_cv_with_libregex_root=${with_libregex}
24537 else
24538   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex was specified" >&5
24539 $as_echo_n "checking whether with-libregex was specified... " >&6; }
24540 if ${libopts_cv_with_libregex_root+:} false; then :
24541   $as_echo_n "(cached) " >&6
24542 else
24543   libopts_cv_with_libregex_root=no
24544 fi
24545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_root" >&5
24546 $as_echo "$libopts_cv_with_libregex_root" >&6; }
24547
24548 fi
24549  # end of AC_ARG_WITH libregex
24550
24551   if test "${with_libregex+set}" = set && \
24552      test "X${withval}" = Xno
24553   then ## disabled by request
24554     libopts_cv_with_libregex_root=no
24555     libopts_cv_with_libregex_cflags=no
24556     libopts_cv_with_libregex_libs=no
24557   else
24558
24559
24560 # Check whether --with-libregex-cflags was given.
24561 if test "${with_libregex_cflags+set}" = set; then :
24562   withval=$with_libregex_cflags; libopts_cv_with_libregex_cflags=${with_libregex_cflags}
24563 else
24564   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-cflags was specified" >&5
24565 $as_echo_n "checking whether with-libregex-cflags was specified... " >&6; }
24566 if ${libopts_cv_with_libregex_cflags+:} false; then :
24567   $as_echo_n "(cached) " >&6
24568 else
24569   libopts_cv_with_libregex_cflags=no
24570 fi
24571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_cflags" >&5
24572 $as_echo "$libopts_cv_with_libregex_cflags" >&6; }
24573
24574 fi
24575  # end of AC_ARG_WITH libregex-cflags
24576
24577
24578 # Check whether --with-libregex-libs was given.
24579 if test "${with_libregex_libs+set}" = set; then :
24580   withval=$with_libregex_libs; libopts_cv_with_libregex_libs=${with_libregex_libs}
24581 else
24582   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-libs was specified" >&5
24583 $as_echo_n "checking whether with-libregex-libs was specified... " >&6; }
24584 if ${libopts_cv_with_libregex_libs+:} false; then :
24585   $as_echo_n "(cached) " >&6
24586 else
24587   libopts_cv_with_libregex_libs=no
24588 fi
24589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_libs" >&5
24590 $as_echo "$libopts_cv_with_libregex_libs" >&6; }
24591
24592 fi
24593  # end of AC_ARG_WITH libregex-libs
24594
24595   case "X${libopts_cv_with_libregex_cflags}" in
24596   Xyes|Xno|X )
24597     case "X${libopts_cv_with_libregex_root}" in
24598     Xyes|Xno|X ) libopts_cv_with_libregex_cflags=no ;;
24599     * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;;
24600     esac
24601   esac
24602   case "X${libopts_cv_with_libregex_libs}" in
24603   Xyes|Xno|X )
24604     case "X${libopts_cv_with_libregex_root}" in
24605     Xyes|Xno|X ) libopts_cv_with_libregex_libs=no ;;
24606     * )        libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex" ;;
24607     esac
24608   esac
24609   libopts_save_CPPFLAGS="${CPPFLAGS}"
24610   libopts_save_LIBS="${LIBS}"
24611   case "X${libopts_cv_with_libregex_cflags}" in
24612   Xyes|Xno|X )
24613     libopts_cv_with_libregex_cflags="" ;;
24614   * ) CPPFLAGS="${CPPFLAGS} ${libopts_cv_with_libregex_cflags}" ;;
24615   esac
24616   case "X${libopts_cv_with_libregex_libs}" in
24617   Xyes|Xno|X )
24618     libopts_cv_with_libregex_libs="" ;;
24619   * )
24620     LIBS="${LIBS} ${libopts_cv_with_libregex_libs}" ;;
24621   esac
24622   LIBREGEX_CFLAGS=""
24623   LIBREGEX_LIBS=""
24624   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libregex functions properly" >&5
24625 $as_echo_n "checking whether libregex functions properly... " >&6; }
24626   if ${libopts_cv_with_libregex+:} false; then :
24627   $as_echo_n "(cached) " >&6
24628 else
24629
24630   if test "$cross_compiling" = yes; then :
24631   libopts_cv_with_libregex=no
24632 else
24633   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24634 /* end confdefs.h.  */
24635 #include <stdio.h>
24636 #include <stdlib.h>
24637 #include <sys/types.h>
24638 #include REGEX_HEADER
24639 static regex_t re;
24640 void comp_re(char const * pzPat) {
24641   int res = regcomp( &re, pzPat, REG_EXTENDED|REG_ICASE|REG_NEWLINE );
24642   if (res == 0) return;
24643   exit( res ); }
24644 int main() {
24645   regmatch_t m[2];
24646   comp_re( "^.*\$"   );
24647   comp_re( "()|no.*" );
24648   comp_re( "."       );
24649   if (regexec( &re, "X", 2, m, 0 ) != 0)  return 1;
24650   if ((m[0].rm_so != 0) || (m[0].rm_eo != 1)) {
24651     fputs( "error: regex -->.<-- did not match\n", stderr );
24652     return 1;
24653   }
24654   return 0; }
24655 _ACEOF
24656 if ac_fn_c_try_run "$LINENO"; then :
24657   libopts_cv_with_libregex=yes
24658 else
24659   libopts_cv_with_libregex=no
24660 fi
24661 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24662   conftest.$ac_objext conftest.beam conftest.$ac_ext
24663 fi
24664  # end of AC_RUN_IFELSE
24665
24666 fi
24667  # end of AC_CACHE_VAL for libopts_cv_with_libregex
24668   fi ## disabled by request
24669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_with_libregex}" >&5
24670 $as_echo "${libopts_cv_with_libregex}" >&6; }
24671   if test "X${libopts_cv_with_libregex}" != Xno
24672   then
24673
24674 $as_echo "#define WITH_LIBREGEX 1" >>confdefs.h
24675
24676   else
24677     CPPFLAGS="${libopts_save_CPPFLAGS}"
24678     LIBS="${libopts_save_LIBS}"
24679     libopts_cv_with_libregex_root=no
24680 libopts_cv_with_libregex_cflags=no
24681 libopts_cv_with_libregex_libs=no
24682 libopts_cv_with_libregex=no
24683   fi
24684
24685
24686
24687   # Check to see if pathfind(3) works.
24688
24689   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pathfind(3) works" >&5
24690 $as_echo_n "checking whether pathfind(3) works... " >&6; }
24691   if ${libopts_cv_run_pathfind+:} false; then :
24692   $as_echo_n "(cached) " >&6
24693 else
24694
24695   if test "$cross_compiling" = yes; then :
24696   libopts_cv_run_pathfind=no
24697
24698 else
24699   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24700 /* end confdefs.h.  */
24701 #include <string.h>
24702 #include <stdlib.h>
24703 int main (int argc, char ** argv) {
24704    char * pz = pathfind( getenv( "PATH" ), "sh", "x" );
24705    return (pz == 0) ? 1 : 0;
24706 }
24707 _ACEOF
24708 if ac_fn_c_try_run "$LINENO"; then :
24709   libopts_cv_run_pathfind=yes
24710 else
24711   libopts_cv_run_pathfind=no
24712 fi
24713 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24714   conftest.$ac_objext conftest.beam conftest.$ac_ext
24715 fi
24716  # end of RUN_IFELSE
24717
24718 fi
24719  # end of AC_CACHE_VAL for libopts_cv_run_pathfind
24720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_pathfind}" >&5
24721 $as_echo "${libopts_cv_run_pathfind}" >&6; }
24722   if test "X${libopts_cv_run_pathfind}" != Xno
24723   then
24724
24725 $as_echo "#define HAVE_PATHFIND 1" >>confdefs.h
24726
24727   fi
24728
24729
24730
24731   # Check to see if /dev/zero is readable device.
24732
24733   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/zero is readable device" >&5
24734 $as_echo_n "checking whether /dev/zero is readable device... " >&6; }
24735   if ${libopts_cv_test_dev_zero+:} false; then :
24736   $as_echo_n "(cached) " >&6
24737 else
24738
24739     libopts_cv_test_dev_zero=`exec 2> /dev/null
24740 dzero=\`ls -lL /dev/zero | egrep ^c......r\`
24741 test -z "${dzero}" && exit 1
24742 echo ${dzero}`
24743     if test $? -ne 0 || test -z "$libopts_cv_test_dev_zero"
24744     then libopts_cv_test_dev_zero=no
24745     fi
24746
24747 fi
24748  # end of CACHE_VAL of libopts_cv_test_dev_zero
24749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_test_dev_zero}" >&5
24750 $as_echo "${libopts_cv_test_dev_zero}" >&6; }
24751   if test "X${libopts_cv_test_dev_zero}" != Xno
24752   then
24753
24754 $as_echo "#define HAVE_DEV_ZERO 1" >>confdefs.h
24755
24756   fi
24757
24758
24759
24760   # Check to see if we have a functional realpath(3C).
24761
24762   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a functional realpath(3C)" >&5
24763 $as_echo_n "checking whether we have a functional realpath(3C)... " >&6; }
24764   if ${libopts_cv_run_realpath+:} false; then :
24765   $as_echo_n "(cached) " >&6
24766 else
24767
24768   if test "$cross_compiling" = yes; then :
24769   libopts_cv_run_realpath=no
24770
24771 else
24772   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24773 /* end confdefs.h.  */
24774 #include <limits.h>
24775 #include <stdlib.h>
24776 int main (int argc, char ** argv) {
24777 #ifndef PATH_MAX
24778 choke me!!
24779 #else
24780    char zPath[PATH_MAX+1];
24781 #endif
24782    char *pz = realpath(argv[0], zPath);
24783    return (pz == zPath) ? 0 : 1;
24784 }
24785 _ACEOF
24786 if ac_fn_c_try_run "$LINENO"; then :
24787   libopts_cv_run_realpath=yes
24788 else
24789   libopts_cv_run_realpath=no
24790 fi
24791 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24792   conftest.$ac_objext conftest.beam conftest.$ac_ext
24793 fi
24794  # end of RUN_IFELSE
24795
24796 fi
24797  # end of AC_CACHE_VAL for libopts_cv_run_realpath
24798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_realpath}" >&5
24799 $as_echo "${libopts_cv_run_realpath}" >&6; }
24800   if test "X${libopts_cv_run_realpath}" != Xno
24801   then
24802
24803 $as_echo "#define HAVE_REALPATH 1" >>confdefs.h
24804
24805   fi
24806
24807
24808
24809   # Check to see if strftime() works.
24810
24811   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strftime() works" >&5
24812 $as_echo_n "checking whether strftime() works... " >&6; }
24813   if ${libopts_cv_run_strftime+:} false; then :
24814   $as_echo_n "(cached) " >&6
24815 else
24816
24817   if test "$cross_compiling" = yes; then :
24818   libopts_cv_run_strftime=no
24819
24820 else
24821   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24822 /* end confdefs.h.  */
24823 #include <time.h>
24824 #include <string.h>
24825 char t_buf[ 64 ];
24826 int main() {
24827   static char const z[] = "Thursday Aug 28 240";
24828   struct tm tm;
24829   tm.tm_sec   = 36;  /* seconds after the minute [0, 61]  */
24830   tm.tm_min   = 44;  /* minutes after the hour [0, 59] */
24831   tm.tm_hour  = 12;  /* hour since midnight [0, 23] */
24832   tm.tm_mday  = 28;  /* day of the month [1, 31] */
24833   tm.tm_mon   =  7;  /* months since January [0, 11] */
24834   tm.tm_year  = 86;  /* years since 1900 */
24835   tm.tm_wday  =  4;  /* days since Sunday [0, 6] */
24836   tm.tm_yday  = 239; /* days since January 1 [0, 365] */
24837   tm.tm_isdst =  1;  /* flag for daylight savings time */
24838   strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
24839   return (strcmp( t_buf, z ) != 0); }
24840 _ACEOF
24841 if ac_fn_c_try_run "$LINENO"; then :
24842   libopts_cv_run_strftime=yes
24843 else
24844   libopts_cv_run_strftime=no
24845 fi
24846 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24847   conftest.$ac_objext conftest.beam conftest.$ac_ext
24848 fi
24849  # end of RUN_IFELSE
24850
24851 fi
24852  # end of AC_CACHE_VAL for libopts_cv_run_strftime
24853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_strftime}" >&5
24854 $as_echo "${libopts_cv_run_strftime}" >&6; }
24855   if test "X${libopts_cv_run_strftime}" != Xno
24856   then
24857
24858 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
24859
24860   fi
24861
24862
24863
24864   # Check to see if fopen accepts "b" mode.
24865
24866   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"b\" mode" >&5
24867 $as_echo_n "checking whether fopen accepts \"b\" mode... " >&6; }
24868   if ${libopts_cv_run_fopen_binary+:} false; then :
24869   $as_echo_n "(cached) " >&6
24870 else
24871
24872   if test "$cross_compiling" = yes; then :
24873   libopts_cv_run_fopen_binary=no
24874
24875 else
24876   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24877 /* end confdefs.h.  */
24878 #include <stdio.h>
24879 int main (int argc, char ** argv) {
24880 FILE * fp = fopen("conftest.$ac_ext", "rb");
24881 return (fp == NULL) ? 1 : fclose(fp); }
24882 _ACEOF
24883 if ac_fn_c_try_run "$LINENO"; then :
24884   libopts_cv_run_fopen_binary=yes
24885 else
24886   libopts_cv_run_fopen_binary=no
24887 fi
24888 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24889   conftest.$ac_objext conftest.beam conftest.$ac_ext
24890 fi
24891  # end of RUN_IFELSE
24892
24893 fi
24894  # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
24895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_binary}" >&5
24896 $as_echo "${libopts_cv_run_fopen_binary}" >&6; }
24897   if test "X${libopts_cv_run_fopen_binary}" != Xno
24898   then
24899
24900 $as_echo "#define FOPEN_BINARY_FLAG \"b\"" >>confdefs.h
24901
24902   else
24903
24904 $as_echo "#define FOPEN_BINARY_FLAG \"\"" >>confdefs.h
24905
24906   fi
24907
24908
24909
24910   # Check to see if fopen accepts "t" mode.
24911
24912   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"t\" mode" >&5
24913 $as_echo_n "checking whether fopen accepts \"t\" mode... " >&6; }
24914   if ${libopts_cv_run_fopen_text+:} false; then :
24915   $as_echo_n "(cached) " >&6
24916 else
24917
24918   if test "$cross_compiling" = yes; then :
24919   libopts_cv_run_fopen_text=no
24920
24921 else
24922   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24923 /* end confdefs.h.  */
24924 #include <stdio.h>
24925 int main (int argc, char ** argv) {
24926 FILE * fp = fopen("conftest.$ac_ext", "rt");
24927 return (fp == NULL) ? 1 : fclose(fp); }
24928 _ACEOF
24929 if ac_fn_c_try_run "$LINENO"; then :
24930   libopts_cv_run_fopen_text=yes
24931 else
24932   libopts_cv_run_fopen_text=no
24933 fi
24934 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24935   conftest.$ac_objext conftest.beam conftest.$ac_ext
24936 fi
24937  # end of RUN_IFELSE
24938
24939 fi
24940  # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
24941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_text}" >&5
24942 $as_echo "${libopts_cv_run_fopen_text}" >&6; }
24943   if test "X${libopts_cv_run_fopen_text}" != Xno
24944   then
24945
24946 $as_echo "#define FOPEN_TEXT_FLAG \"t\"" >>confdefs.h
24947
24948   else
24949
24950 $as_echo "#define FOPEN_TEXT_FLAG \"\"" >>confdefs.h
24951
24952   fi
24953
24954
24955
24956   # Check to see if not wanting optional option args.
24957
24958   # Check whether --enable-optional-args was given.
24959 if test "${enable_optional_args+set}" = set; then :
24960   enableval=$enable_optional_args; libopts_cv_enable_optional_args=${enable_optional_args}
24961 else
24962   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether not wanting optional option args" >&5
24963 $as_echo_n "checking whether not wanting optional option args... " >&6; }
24964 if ${libopts_cv_enable_optional_args+:} false; then :
24965   $as_echo_n "(cached) " >&6
24966 else
24967   libopts_cv_enable_optional_args=yes
24968 fi
24969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_enable_optional_args" >&5
24970 $as_echo "$libopts_cv_enable_optional_args" >&6; }
24971
24972 fi
24973  # end of AC_ARG_ENABLE
24974   if test "X${libopts_cv_enable_optional_args}" = Xno
24975   then
24976
24977 $as_echo "#define NO_OPTIONAL_OPT_ARGS 1" >>confdefs.h
24978
24979   fi
24980
24981
24982
24983
24984
24985           fi
24986   ac_config_files="$ac_config_files libopts/Makefile"
24987
24988   # end of AC_DEFUN of LIBOPTS_CHECK
24989
24990
24991 # From when we only used libevent for sntp:
24992 #AM_COND_IF(
24993 #    [BUILD_SNTP],
24994 #    [NTP_LIBEVENT_CHECK],
24995 #    [NTP_LIBEVENT_CHECK_NOBUILD]
24996 #)
24997
24998
24999
25000 ntp_pkgconfig_min_version='0.15.0'
25001 if test -n "$ac_tool_prefix"; then
25002   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
25003 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
25004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25005 $as_echo_n "checking for $ac_word... " >&6; }
25006 if ${ac_cv_path_PKG_CONFIG+:} false; then :
25007   $as_echo_n "(cached) " >&6
25008 else
25009   case $PKG_CONFIG in
25010   [\\/]* | ?:[\\/]*)
25011   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
25012   ;;
25013   *)
25014   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25015 for as_dir in $PATH
25016 do
25017   IFS=$as_save_IFS
25018   test -z "$as_dir" && as_dir=.
25019     for ac_exec_ext in '' $ac_executable_extensions; do
25020   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25021     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
25022     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25023     break 2
25024   fi
25025 done
25026   done
25027 IFS=$as_save_IFS
25028
25029   ;;
25030 esac
25031 fi
25032 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
25033 if test -n "$PKG_CONFIG"; then
25034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
25035 $as_echo "$PKG_CONFIG" >&6; }
25036 else
25037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25038 $as_echo "no" >&6; }
25039 fi
25040
25041
25042 fi
25043 if test -z "$ac_cv_path_PKG_CONFIG"; then
25044   ac_pt_PKG_CONFIG=$PKG_CONFIG
25045   # Extract the first word of "pkg-config", so it can be a program name with args.
25046 set dummy pkg-config; ac_word=$2
25047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25048 $as_echo_n "checking for $ac_word... " >&6; }
25049 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
25050   $as_echo_n "(cached) " >&6
25051 else
25052   case $ac_pt_PKG_CONFIG in
25053   [\\/]* | ?:[\\/]*)
25054   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
25055   ;;
25056   *)
25057   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25058 for as_dir in $PATH
25059 do
25060   IFS=$as_save_IFS
25061   test -z "$as_dir" && as_dir=.
25062     for ac_exec_ext in '' $ac_executable_extensions; do
25063   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25064     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
25065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25066     break 2
25067   fi
25068 done
25069   done
25070 IFS=$as_save_IFS
25071
25072   ;;
25073 esac
25074 fi
25075 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
25076 if test -n "$ac_pt_PKG_CONFIG"; then
25077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
25078 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
25079 else
25080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25081 $as_echo "no" >&6; }
25082 fi
25083
25084   if test "x$ac_pt_PKG_CONFIG" = x; then
25085     PKG_CONFIG=""
25086   else
25087     case $cross_compiling:$ac_tool_warned in
25088 yes:)
25089 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25090 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25091 ac_tool_warned=yes ;;
25092 esac
25093     PKG_CONFIG=$ac_pt_PKG_CONFIG
25094   fi
25095 else
25096   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
25097 fi
25098
25099 { ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
25100 { ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
25101
25102 case "$PKG_CONFIG" in
25103  /*)
25104     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
25105 $as_echo_n "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
25106     if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
25107         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25108 $as_echo "yes" >&6; }
25109     else
25110         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25111 $as_echo "no" >&6; }
25112         PKG_CONFIG=""
25113     fi
25114     ;;
25115 esac
25116
25117
25118
25119
25120 # Check whether --enable-local-libevent was given.
25121 if test "${enable_local_libevent+set}" = set; then :
25122   enableval=$enable_local_libevent; ntp_use_local_libevent=$enableval
25123 else
25124   ntp_use_local_libevent=${ntp_use_local_libevent-detect}
25125
25126 fi
25127
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137 ntp_libevent_min_version=2
25138 ntp_libevent_tearoff=libevent
25139
25140
25141
25142
25143
25144 case "$ntp_use_local_libevent" in
25145  yes)
25146     ;;
25147  *) # If we have (a good enough) pkg-config, see if it can find libevent
25148     case "$PKG_CONFIG" in
25149      /*)
25150         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
25151 $as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
25152         if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
25153         then
25154             ntp_use_local_libevent=no
25155             { $as_echo "$as_me:${as_lineno-$LINENO}: Using the installed libevent" >&5
25156 $as_echo "$as_me: Using the installed libevent" >&6;}
25157             CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
25158             CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
25159             # HMS: I hope the following is accurate.
25160             # We don't need -levent, we only need  -levent_core.
25161             # While we could grab only the -L stuff, there *might* be
25162             # other flags there we want.  Originally we just removed -levent
25163             # but then somebody decided to install -levent-2.0
25164             # LDADD_LIBEVENT=`$PKG_CONFIG --libs libevent | sed 's:-levent::'`
25165             # So now we dance...
25166             LDADD_LIBEVENT=
25167             for i in `$PKG_CONFIG --libs libevent` `$PKG_CONFIG --cflags-only-other libevent_pthreads`
25168             do
25169                 case "$i" in
25170                  -D*) ;;
25171                  -levent*) ;;
25172                  *) case "$LDADD_LIBEVENT" in
25173                      '') LDADD_LIBEVENT="$i" ;;
25174                      *) LDADD_LIBEVENT="$LDADD_LIBEVENT $i" ;;
25175                     esac
25176                     ;;
25177                 esac
25178             done
25179             case "$LIBISC_PTHREADS_NOTHREADS" in
25180              pthreads)
25181                 LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads"
25182             esac
25183             LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core"
25184             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25185 $as_echo "yes" >&6; }
25186         else
25187             ntp_use_local_libevent=yes
25188             # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
25189             # is "pthreads"?
25190             CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
25191             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25192 $as_echo "no" >&6; }
25193         fi
25194         ;;
25195      *)
25196         ntp_use_local_libevent=yes
25197         ;;
25198     esac
25199     ;;
25200 esac
25201
25202 case "$ntp_use_local_libevent" in
25203  yes)
25204     { $as_echo "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
25205 $as_echo "$as_me: Using libevent tearoff" >&6;}
25206     CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
25207     case "$LIBISC_PTHREADS_NOTHREADS" in
25208      pthreads)
25209         LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_pthreads.la \$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
25210         ;;
25211      *)
25212         LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
25213     esac
25214 esac
25215
25216
25217  if test "x$ntp_use_local_libevent" = "xyes"; then
25218   BUILD_LIBEVENT_TRUE=
25219   BUILD_LIBEVENT_FALSE='#'
25220 else
25221   BUILD_LIBEVENT_TRUE='#'
25222   BUILD_LIBEVENT_FALSE=
25223 fi
25224
25225
25226
25227
25228 case "$ntp_libevent_tearoff" in
25229  libevent)
25230     ;;
25231  *)
25232     as_fn_error $? "ntp_libevent.m4 dir must be libevent, not $ntp_libevent_tearoff" "$LINENO" 5
25233     ;;
25234 esac
25235
25236 case "$ntp_use_local_libevent" in
25237  yes)
25238                         ac_configure_args=" --disable-openssl${ac_configure_args}"
25239     ac_configure_args=" --disable-shared${ac_configure_args}"
25240     ac_configure_args=" --disable-libevent-regress${ac_configure_args}"
25241     ac_configure_args=" --disable-libevent-install${ac_configure_args}"
25242     ac_configure_args=" --enable-silent-rules${ac_configure_args}"
25243     ac_configure_args=" --enable-function-sections${ac_configure_args}"
25244     subdirs="$subdirs libevent"
25245
25246     ;;
25247  *)
25248     NTP_FORCE_LIBEVENT_DIST=libevent
25249     ;;
25250 esac
25251
25252
25253
25254 # Checks for libraries.
25255
25256
25257 LIB_SYSLOG=''
25258
25259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
25260 $as_echo_n "checking for library containing openlog... " >&6; }
25261 if ${ac_cv_search_openlog+:} false; then :
25262   $as_echo_n "(cached) " >&6
25263 else
25264   ac_func_search_save_LIBS=$LIBS
25265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25266 /* end confdefs.h.  */
25267
25268 /* Override any GCC internal prototype to avoid an error.
25269    Use char because int might match the return type of a GCC
25270    builtin and then its argument prototype would still apply.  */
25271 #ifdef __cplusplus
25272 extern "C"
25273 #endif
25274 char openlog ();
25275 int
25276 main ()
25277 {
25278 return openlog ();
25279   ;
25280   return 0;
25281 }
25282 _ACEOF
25283 for ac_lib in '' gen syslog; do
25284   if test -z "$ac_lib"; then
25285     ac_res="none required"
25286   else
25287     ac_res=-l$ac_lib
25288     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25289   fi
25290   if ac_fn_c_try_link "$LINENO"; then :
25291   ac_cv_search_openlog=$ac_res
25292 fi
25293 rm -f core conftest.err conftest.$ac_objext \
25294     conftest$ac_exeext
25295   if ${ac_cv_search_openlog+:} false; then :
25296   break
25297 fi
25298 done
25299 if ${ac_cv_search_openlog+:} false; then :
25300
25301 else
25302   ac_cv_search_openlog=no
25303 fi
25304 rm conftest.$ac_ext
25305 LIBS=$ac_func_search_save_LIBS
25306 fi
25307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
25308 $as_echo "$ac_cv_search_openlog" >&6; }
25309 ac_res=$ac_cv_search_openlog
25310 if test "$ac_res" != no; then :
25311   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25312   case "$ac_cv_search_openlog" in
25313  'none required') ;;
25314  no) ;;
25315  *) LIB_SYSLOG="$ac_cv_search_openlog $LIB_SYSLOG" ;;
25316  esac
25317
25318 fi
25319
25320
25321 # Checks for header files.
25322 for ac_header in netdb.h string.h strings.h syslog.h
25323 do :
25324   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25325 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25326 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25327   cat >>confdefs.h <<_ACEOF
25328 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25329 _ACEOF
25330
25331 fi
25332
25333 done
25334
25335
25336
25337 for ac_header in sysexits.h
25338 do :
25339   ac_fn_c_check_header_mongrel "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
25340 if test "x$ac_cv_header_sysexits_h" = xyes; then :
25341   cat >>confdefs.h <<_ACEOF
25342 #define HAVE_SYSEXITS_H 1
25343 _ACEOF
25344
25345 else
25346
25347
25348 $as_echo "#define EX_OK 0" >>confdefs.h
25349
25350
25351 $as_echo "#define EX_SOFTWARE 70" >>confdefs.h
25352
25353
25354 fi
25355
25356 done
25357
25358
25359
25360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
25361 $as_echo_n "checking for facilitynames in syslog.h... " >&6; }
25362 if ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+:} false; then :
25363   $as_echo_n "(cached) " >&6
25364 else
25365
25366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25367 /* end confdefs.h.  */
25368
25369 #define SYSLOG_NAMES
25370 #include <stdlib.h>
25371 #include <syslog.h>
25372
25373 int
25374 main ()
25375 {
25376  void *fnames; fnames = facilitynames;
25377   ;
25378   return 0;
25379 }
25380 _ACEOF
25381 if ac_fn_c_try_compile "$LINENO"; then :
25382   ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
25383 else
25384   ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
25385 fi
25386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25387 fi
25388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
25389 $as_echo "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
25390 case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
25391  yes)
25392
25393 $as_echo "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
25394
25395     ;;
25396  no)
25397     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
25398 $as_echo "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
25399     ;;
25400  cross)
25401     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
25402 $as_echo "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
25403     ;;
25404 esac
25405
25406
25407 # Checks for typedefs, structures, and compiler characteristics.
25408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
25409 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
25410 if ${ac_cv_header_stdbool_h+:} false; then :
25411   $as_echo_n "(cached) " >&6
25412 else
25413   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25414 /* end confdefs.h.  */
25415
25416              #include <stdbool.h>
25417              #ifndef bool
25418               "error: bool is not defined"
25419              #endif
25420              #ifndef false
25421               "error: false is not defined"
25422              #endif
25423              #if false
25424               "error: false is not 0"
25425              #endif
25426              #ifndef true
25427               "error: true is not defined"
25428              #endif
25429              #if true != 1
25430               "error: true is not 1"
25431              #endif
25432              #ifndef __bool_true_false_are_defined
25433               "error: __bool_true_false_are_defined is not defined"
25434              #endif
25435
25436              struct s { _Bool s: 1; _Bool t; } s;
25437
25438              char a[true == 1 ? 1 : -1];
25439              char b[false == 0 ? 1 : -1];
25440              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
25441              char d[(bool) 0.5 == true ? 1 : -1];
25442              /* See body of main program for 'e'.  */
25443              char f[(_Bool) 0.0 == false ? 1 : -1];
25444              char g[true];
25445              char h[sizeof (_Bool)];
25446              char i[sizeof s.t];
25447              enum { j = false, k = true, l = false * true, m = true * 256 };
25448              /* The following fails for
25449                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
25450              _Bool n[m];
25451              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
25452              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
25453              /* Catch a bug in an HP-UX C compiler.  See
25454                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
25455                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
25456               */
25457              _Bool q = true;
25458              _Bool *pq = &q;
25459
25460 int
25461 main ()
25462 {
25463
25464              bool e = &s;
25465              *pq |= q;
25466              *pq |= ! q;
25467              /* Refer to every declared value, to avoid compiler optimizations.  */
25468              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
25469                      + !m + !n + !o + !p + !q + !pq);
25470
25471   ;
25472   return 0;
25473 }
25474 _ACEOF
25475 if ac_fn_c_try_compile "$LINENO"; then :
25476   ac_cv_header_stdbool_h=yes
25477 else
25478   ac_cv_header_stdbool_h=no
25479 fi
25480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25481 fi
25482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
25483 $as_echo "$ac_cv_header_stdbool_h" >&6; }
25484    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
25485 if test "x$ac_cv_type__Bool" = xyes; then :
25486
25487 cat >>confdefs.h <<_ACEOF
25488 #define HAVE__BOOL 1
25489 _ACEOF
25490
25491
25492 fi
25493
25494
25495 if test $ac_cv_header_stdbool_h = yes; then
25496
25497 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
25498
25499 fi
25500
25501
25502
25503
25504
25505 VER_SUFFIX=
25506
25507
25508
25509
25510 # Check whether --with-crypto was given.
25511 if test "${with_crypto+set}" = set; then :
25512   withval=$with_crypto;
25513 fi
25514
25515
25516 # Check whether --with-openssl-libdir was given.
25517 if test "${with_openssl_libdir+set}" = set; then :
25518   withval=$with_openssl_libdir;
25519 fi
25520
25521
25522 # Check whether --with-openssl-incdir was given.
25523 if test "${with_openssl_incdir+set}" = set; then :
25524   withval=$with_openssl_incdir;
25525 fi
25526
25527
25528 # Check whether --with-rpath was given.
25529 if test "${with_rpath+set}" = set; then :
25530   withval=$with_rpath;
25531 fi
25532
25533 ntp_openssl=no
25534 ntp_openssl_from_pkg_config=no
25535 with_crypto=${with_crypto:-openssl,libcrypto}
25536 case "$with_crypto" in
25537  yes)
25538     with_crypto=openssl,libcrypto
25539 esac
25540 case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
25541  no:*) ;;
25542  *:notempty:notgiven:notgiven)
25543     for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
25544         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
25545 $as_echo_n "checking pkg-config for $pkg... " >&6; }
25546         if $PKG_CONFIG --exists $pkg ; then
25547             CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
25548             CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
25549             LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`"
25550             LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l $pkg`"
25551             LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`"
25552             VER_SUFFIX=o
25553             ntp_openssl=yes
25554             ntp_openssl_from_pkg_config=yes
25555             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25556 $as_echo "yes" >&6; }
25557
25558             break
25559         fi
25560         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25561 $as_echo "no" >&6; }
25562     done
25563 esac
25564 case "$with_crypto:$ntp_openssl" in
25565  no:*) ;;
25566  *:no)
25567     need_dash_r=
25568     need_dash_Wlrpath=
25569     case "${with_rpath-notgiven}" in
25570      yes)
25571         # Lame - what to do if we need -Wl... but not -R?
25572         need_dash_r=1
25573         ;;
25574      notgiven)
25575         case "$host" in
25576          *-*-linux*)
25577             # This may really only be true for gcc
25578             need_dash_Wlrpath=1
25579             ;;
25580          *-*-netbsd*)
25581             need_dash_r=1
25582             ;;
25583          *-*-solaris*)
25584             need_dash_r=1
25585             ;;
25586         esac
25587         ;;
25588     esac
25589
25590     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
25591 $as_echo_n "checking for openssl library directory... " >&6; }
25592     with_openssl_libdir=${with_openssl_libdir-notgiven}
25593     case "$with_openssl_libdir" in
25594      notgiven)
25595         case "$build" in
25596          $host)
25597             with_openssl_libdir=default
25598             ;;
25599          *)
25600             with_openssl_libdir=no
25601             ;;
25602         esac
25603     esac
25604     case "$with_openssl_libdir" in
25605      default)
25606         # Look in:
25607         with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib"
25608         with_openssl_libdir="$with_openssl_libdir /usr/local/lib"
25609         with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib"
25610     esac
25611     case "$with_openssl_libdir" in
25612      no)
25613         ;;
25614      *) # Look for libcrypto.a and libssl.a:
25615         for i in $with_openssl_libdir no
25616         do
25617             case "$host" in
25618              *-*-darwin*)
25619                 test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
25620                 ;;
25621              *)
25622                 test -f $i/libcrypto.so -a -f $i/libssl.so && break
25623                 test -f $i/libcrypto.a -a -f $i/libssl.a && break
25624                 ;;
25625             esac
25626         done
25627         openssl_libdir=$i
25628         ;;
25629     esac
25630     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
25631 $as_echo "$openssl_libdir" >&6; }
25632     case "$openssl_libdir" in
25633      no)
25634         openssl_libdir=
25635         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
25636 $as_echo "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
25637     esac
25638
25639     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
25640 $as_echo_n "checking for openssl include directory... " >&6; }
25641     with_openssl_incdir=${with_openssl_incdir-notgiven}
25642     case "$with_openssl_incdir" in
25643      notgiven)
25644         # Look in:
25645         with_openssl_incdir="/usr/include /usr/sfw/include"
25646         with_openssl_incdir="$with_openssl_incdir /usr/local/include"
25647         with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include"
25648     esac
25649     case "$with_openssl_incdir" in
25650      no)
25651         ;;
25652      *) # look for openssl/evp.h:
25653         for i in $with_openssl_incdir no
25654         do
25655             test -f $i/openssl/evp.h && break
25656         done
25657         openssl_incdir=$i
25658         ;;
25659     esac
25660     { i=; unset i;}
25661     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
25662 $as_echo "$openssl_incdir" >&6; }
25663     case "$openssl_incdir" in
25664      no)
25665         openssl_incdir=
25666         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
25667 $as_echo "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
25668     esac
25669     if test -z "$openssl_libdir" -o -z "$openssl_incdir"
25670     then
25671         ntp_openssl=no
25672     else
25673         ntp_openssl=yes
25674         VER_SUFFIX=o
25675     fi
25676     case "$ntp_openssl" in
25677      yes)
25678         # We have OpenSSL inc/lib dirs - use them.
25679         case "$openssl_incdir" in
25680          /usr/include)
25681             ;;
25682          *)
25683             CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir"
25684             ;;
25685         esac
25686         case "$openssl_libdir" in
25687          /usr/lib)
25688             ;;
25689          *)
25690             LDADD_NTP="$LDADD_NTP -L$openssl_libdir"
25691             case "$need_dash_r" in
25692              1)
25693                 LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir"
25694             esac
25695             case "$need_dash_Wlrpath" in
25696              1)
25697                 LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir"
25698             esac
25699             ;;
25700         esac
25701         LDADD_NTP="$LDADD_NTP -lcrypto"
25702     esac
25703 esac
25704
25705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
25706 $as_echo_n "checking if we will use crypto... " >&6; }
25707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
25708 $as_echo "$ntp_openssl" >&6; }
25709
25710 case "$ntp_openssl" in
25711  yes)
25712
25713 $as_echo "#define OPENSSL /**/" >>confdefs.h
25714
25715     case "$VER_SUFFIX" in
25716      *o*) ;;
25717      *) as_fn_error $? "OPENSSL set but no 'o' in VER_SUFFIX!" "$LINENO" 5 ;;
25718     esac
25719     ;;
25720 esac
25721
25722 NTPO_SAVED_CPPFLAGS="$CPPFLAGS"
25723 CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP"
25724 NTPO_SAVED_LIBS="$LIBS"
25725
25726 #
25727 # check for linking with -lcrypto failure, and try -lcrypto -lz.
25728 # Helps m68k-atari-mint
25729 #
25730 case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
25731  yes:no)
25732     LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
25733     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
25734 $as_echo_n "checking if linking with -lcrypto alone works... " >&6; }
25735 if ${ntp_cv_bare_lcrypto+:} false; then :
25736   $as_echo_n "(cached) " >&6
25737 else
25738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25739 /* end confdefs.h.  */
25740
25741                     #include "openssl/err.h"
25742                     #include "openssl/evp.h"
25743
25744 int
25745 main ()
25746 {
25747
25748                     ERR_load_crypto_strings();
25749                     OpenSSL_add_all_algorithms();
25750
25751
25752   ;
25753   return 0;
25754 }
25755 _ACEOF
25756 if ac_fn_c_try_link "$LINENO"; then :
25757   ntp_cv_bare_lcrypto=yes
25758 else
25759   ntp_cv_bare_lcrypto=no
25760
25761 fi
25762 rm -f core conftest.err conftest.$ac_objext \
25763     conftest$ac_exeext conftest.$ac_ext
25764
25765 fi
25766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
25767 $as_echo "$ntp_cv_bare_lcrypto" >&6; }
25768     case "$ntp_cv_bare_lcrypto" in
25769      no)
25770         LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
25771         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
25772 $as_echo_n "checking if linking with -lcrypto -lz works... " >&6; }
25773 if ${ntp_cv_lcrypto_lz+:} false; then :
25774   $as_echo_n "(cached) " >&6
25775 else
25776   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25777 /* end confdefs.h.  */
25778
25779                         #include "openssl/err.h"
25780                         #include "openssl/evp.h"
25781
25782 int
25783 main ()
25784 {
25785
25786                         ERR_load_crypto_strings();
25787                         OpenSSL_add_all_algorithms();
25788
25789
25790   ;
25791   return 0;
25792 }
25793 _ACEOF
25794 if ac_fn_c_try_link "$LINENO"; then :
25795   ntp_cv_lcrypto_lz=yes
25796 else
25797   ntp_cv_lcrypto_lz=no
25798
25799 fi
25800 rm -f core conftest.err conftest.$ac_objext \
25801     conftest$ac_exeext conftest.$ac_ext
25802
25803 fi
25804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
25805 $as_echo "$ntp_cv_lcrypto_lz" >&6; }
25806         case "$ntp_cv_lcrypto_lz" in
25807          yes)
25808              LDADD_NTP="$LDADD_NTP -lz"
25809         esac
25810     esac
25811 esac
25812
25813 #
25814 # Older OpenSSL headers have a number of callback prototypes inside
25815 # other function prototypes which trigger copious warnings with gcc's
25816 # -Wstrict-prototypes, which is included in -Wall.
25817 #
25818 # An example:
25819 #
25820 # int i2d_RSA_NET(const RSA *a, unsigned char **pp,
25821 #                 int (*cb)(), int sgckey);
25822 #                 ^^^^^^^^^^^
25823 #
25824 #
25825 #
25826 openssl_triggers_warnings=unknown
25827 NTPO_SAVED_CFLAGS="$CFLAGS"
25828
25829 case "$ntp_openssl:$GCC" in
25830  yes:yes)
25831     CFLAGS="$CFLAGS -Werror"
25832     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25833 /* end confdefs.h.  */
25834
25835
25836 int
25837 main ()
25838 {
25839
25840                 /* see if -Werror breaks gcc */
25841
25842
25843   ;
25844   return 0;
25845 }
25846 _ACEOF
25847 if ac_fn_c_try_compile "$LINENO"; then :
25848   gcc_handles_Werror=yes
25849 else
25850   gcc_handles_Werror=no
25851
25852 fi
25853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25854     case "$gcc_handles_Werror" in
25855      no)
25856         # if this gcc doesn't do -Werror go ahead and use
25857         # -Wstrict-prototypes.
25858         openssl_triggers_warnings=yes
25859         ;;
25860      yes)
25861         CFLAGS="$CFLAGS -Wstrict-prototypes"
25862         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25863 /* end confdefs.h.  */
25864
25865                     #include "openssl/asn1_mac.h"
25866                     #include "openssl/bn.h"
25867                     #include "openssl/err.h"
25868                     #include "openssl/evp.h"
25869                     #include "openssl/pem.h"
25870                     #include "openssl/rand.h"
25871                     #include "openssl/x509v3.h"
25872
25873 int
25874 main ()
25875 {
25876
25877                     /* empty body */
25878
25879
25880   ;
25881   return 0;
25882 }
25883 _ACEOF
25884 if ac_fn_c_try_compile "$LINENO"; then :
25885   openssl_triggers_warnings=no
25886 else
25887   openssl_triggers_warnings=yes
25888
25889 fi
25890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25891     esac
25892     case "$openssl_triggers_warnings" in
25893      yes)
25894         CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes"
25895         ;;
25896      *)
25897         CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
25898     esac
25899     ;;
25900  no:yes)
25901     # gcc without OpenSSL
25902     CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
25903 esac
25904
25905 # Because we don't want -Werror for the EVP_MD_do_all_sorted check
25906 CFLAGS="$NTPO_SAVED_CFLAGS"
25907
25908 case "$ntp_openssl" in
25909  yes)
25910     LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
25911     for ac_func in EVP_MD_do_all_sorted
25912 do :
25913   ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
25914 if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes; then :
25915   cat >>confdefs.h <<_ACEOF
25916 #define HAVE_EVP_MD_DO_ALL_SORTED 1
25917 _ACEOF
25918
25919 fi
25920 done
25921
25922     ;;
25923 esac
25924
25925 CPPFLAGS="$NTPO_SAVED_CPPFLAGS"
25926 LIBS="$NTPO_SAVED_LIBS"
25927 { NTPO_SAVED_CFLAGS=; unset NTPO_SAVED_CFLAGS;}
25928 { NTPO_SAVED_CPPFLAGS=; unset NTPO_SAVED_CPPFLAGS;}
25929 { NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;}
25930 { openssl_triggers_warnings=; unset openssl_triggers_warnings;}
25931 { ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
25932
25933
25934
25935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
25936 $as_echo_n "checking for struct sockaddr_storage... " >&6; }
25937 if ${ntp_cv_sockaddr_storage+:} false; then :
25938   $as_echo_n "(cached) " >&6
25939 else
25940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25941 /* end confdefs.h.  */
25942
25943                 #ifdef HAVE_SYS_TYPES_H
25944                 # include <sys/types.h>
25945                 #endif
25946                 #ifdef HAVE_SYS_SOCKET_H
25947                 # include <sys/socket.h>
25948                 #endif
25949                 #ifdef HAVE_NETINET_IN_H
25950                 # include <netinet/in.h>
25951                 #endif
25952
25953 int
25954 main ()
25955 {
25956
25957                 struct sockaddr_storage n;
25958
25959
25960   ;
25961   return 0;
25962 }
25963 _ACEOF
25964 if ac_fn_c_try_compile "$LINENO"; then :
25965   ntp_cv_sockaddr_storage=yes
25966 else
25967   ntp_cv_sockaddr_storage=no
25968
25969 fi
25970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25971
25972 fi
25973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
25974 $as_echo "$ntp_cv_sockaddr_storage" >&6; }
25975 case "$ntp_cv_sockaddr_storage" in
25976  yes)
25977
25978 $as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
25979
25980     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
25981 $as_echo_n "checking for sockaddr_storage.__ss_family... " >&6; }
25982 if ${ntp_cv_have___ss_family+:} false; then :
25983   $as_echo_n "(cached) " >&6
25984 else
25985   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25986 /* end confdefs.h.  */
25987
25988                     #ifdef HAVE_SYS_TYPES_H
25989                     # include <sys/types.h>
25990                     #endif
25991                     #ifdef HAVE_SYS_SOCKET_H
25992                     # include <sys/socket.h>
25993                     #endif
25994                     #ifdef HAVE_NETINET_IN_H
25995                     # include <netinet/in.h>
25996                     #endif
25997
25998 int
25999 main ()
26000 {
26001
26002                     struct sockaddr_storage s;
26003                     s.__ss_family = 1;
26004
26005
26006   ;
26007   return 0;
26008 }
26009 _ACEOF
26010 if ac_fn_c_try_compile "$LINENO"; then :
26011   ntp_cv_have___ss_family=yes
26012 else
26013   ntp_cv_have___ss_family=no
26014
26015 fi
26016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26017
26018 fi
26019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
26020 $as_echo "$ntp_cv_have___ss_family" >&6; }
26021     case "$ntp_cv_have___ss_family" in
26022      yes)
26023
26024 $as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
26025
26026     esac
26027
26028 esac
26029
26030
26031 #
26032 # Look for in_port_t.
26033 #
26034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
26035 $as_echo_n "checking for in_port_t... " >&6; }
26036 if ${isc_cv_have_in_port_t+:} false; then :
26037   $as_echo_n "(cached) " >&6
26038 else
26039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26040 /* end confdefs.h.  */
26041
26042                 #include <sys/types.h>
26043                 #include <netinet/in.h>
26044
26045 int
26046 main ()
26047 {
26048
26049                 in_port_t port = 25;
26050                 return (0);
26051
26052
26053   ;
26054   return 0;
26055 }
26056 _ACEOF
26057 if ac_fn_c_try_compile "$LINENO"; then :
26058   isc_cv_have_in_port_t=yes
26059 else
26060   isc_cv_have_in_port_t=no
26061
26062 fi
26063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26064
26065 fi
26066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
26067 $as_echo "$isc_cv_have_in_port_t" >&6; }
26068 case "$isc_cv_have_in_port_t" in
26069  no)
26070
26071 $as_echo "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
26072
26073 esac
26074
26075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
26076 $as_echo_n "checking type of socklen arg for getsockname()... " >&6; }
26077 if ${ntp_cv_getsockname_socklen_type+:} false; then :
26078   $as_echo_n "(cached) " >&6
26079 else
26080
26081     getsockname_socklen_type_found=no
26082     for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
26083         for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
26084             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26085 /* end confdefs.h.  */
26086
26087                         #ifdef HAVE_SYS_TYPES_H
26088                         # include <sys/types.h>
26089                         #endif
26090                         #ifdef HAVE_SYS_SOCKET_H
26091                         # include <sys/socket.h>
26092                         #endif
26093
26094 int
26095 main ()
26096 {
26097
26098                         extern
26099                         getsockname(int, $getsockname_arg2,
26100                                 $ntp_cv_getsockname_socklen_type *);
26101
26102
26103   ;
26104   return 0;
26105 }
26106 _ACEOF
26107 if ac_fn_c_try_compile "$LINENO"; then :
26108   getsockname_socklen_type_found=yes ; break 2
26109 fi
26110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26111         done
26112     done
26113     case "$getsockname_socklen_type_found" in
26114      no)
26115         ntp_cv_getsockname_socklen_type='socklen_t'
26116     esac
26117     { getsockname_arg2=; unset getsockname_arg2;}
26118     { getsockname_socklen_type_found=; unset getsockname_socklen_type_found;}
26119
26120
26121 fi
26122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
26123 $as_echo "$ntp_cv_getsockname_socklen_type" >&6; }
26124
26125 cat >>confdefs.h <<_ACEOF
26126 #define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type
26127 _ACEOF
26128
26129
26130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
26131 $as_echo_n "checking struct sockaddr for sa_len... " >&6; }
26132 if ${isc_cv_platform_havesalen+:} false; then :
26133   $as_echo_n "(cached) " >&6
26134 else
26135   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26136 /* end confdefs.h.  */
26137
26138                 #include <sys/types.h>
26139                 #include <sys/socket.h>
26140
26141 int
26142 main ()
26143 {
26144
26145                 extern struct sockaddr *ps;
26146                 return ps->sa_len;
26147
26148
26149   ;
26150   return 0;
26151 }
26152 _ACEOF
26153 if ac_fn_c_try_compile "$LINENO"; then :
26154   isc_cv_platform_havesalen=yes
26155 else
26156   isc_cv_platform_havesalen=no
26157
26158 fi
26159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26160
26161 fi
26162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_platform_havesalen" >&5
26163 $as_echo "$isc_cv_platform_havesalen" >&6; }
26164 case "$isc_cv_platform_havesalen" in
26165  yes)
26166
26167 $as_echo "#define ISC_PLATFORM_HAVESALEN 1" >>confdefs.h
26168
26169 esac
26170
26171 # Check whether --enable-ipv6 was given.
26172 if test "${enable_ipv6+set}" = set; then :
26173   enableval=$enable_ipv6;
26174 fi
26175
26176
26177 case "$enable_ipv6" in
26178  yes|''|autodetect)
26179     case "$host" in
26180      powerpc-ibm-aix4*)
26181         ;;
26182      *)
26183
26184 $as_echo "#define WANT_IPV6 1" >>confdefs.h
26185
26186         ;;
26187     esac
26188     ;;
26189  no)
26190     ;;
26191 esac
26192
26193
26194 case "$host" in
26195  *-*-darwin*)
26196
26197 $as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
26198
26199 esac
26200
26201
26202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5
26203 $as_echo_n "checking for IPv6 structures... " >&6; }
26204 if ${isc_cv_found_ipv6+:} false; then :
26205   $as_echo_n "(cached) " >&6
26206 else
26207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26208 /* end confdefs.h.  */
26209
26210                 #include <sys/types.h>
26211                 #include <sys/socket.h>
26212                 #include <netinet/in.h>
26213
26214 int
26215 main ()
26216 {
26217
26218                 struct sockaddr_in6 sin6;
26219
26220
26221   ;
26222   return 0;
26223 }
26224 _ACEOF
26225 if ac_fn_c_try_compile "$LINENO"; then :
26226   isc_cv_found_ipv6=yes
26227 else
26228   isc_cv_found_ipv6=no
26229
26230 fi
26231 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26232
26233 fi
26234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_found_ipv6" >&5
26235 $as_echo "$isc_cv_found_ipv6" >&6; }
26236
26237 #
26238 # See whether IPv6 support is provided via a Kame add-on.
26239 # This is done before other IPv6 linking tests so LIBS is properly set.
26240 #
26241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kame IPv6 support" >&5
26242 $as_echo_n "checking for Kame IPv6 support... " >&6; }
26243
26244 # Check whether --with-kame was given.
26245 if test "${with_kame+set}" = set; then :
26246   withval=$with_kame; use_kame="$withval"
26247 else
26248   use_kame="no"
26249
26250 fi
26251
26252 case "$use_kame" in
26253  no)
26254     ;;
26255  yes)
26256     kame_path=/usr/local/v6
26257     ;;
26258  *)
26259     kame_path="$use_kame"
26260     ;;
26261 esac
26262 case "$use_kame" in
26263  no)
26264     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26265 $as_echo "no" >&6; }
26266     ;;
26267  *)
26268     if test -f $kame_path/lib/libinet6.a; then
26269         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kame_path/lib/libinet6.a" >&5
26270 $as_echo "$kame_path/lib/libinet6.a" >&6; }
26271         LIBS="-L$kame_path/lib -linet6 $LIBS"
26272     else
26273         as_fn_error $? "$kame_path/lib/libinet6.a not found.
26274
26275 Please choose the proper path with the following command:
26276
26277     configure --with-kame=PATH
26278 " "$LINENO" 5
26279     fi
26280     ;;
26281 esac
26282
26283 #
26284 # Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
26285 # Including it on Kame-using platforms is very bad, though, because
26286 # Kame uses #error against direct inclusion.   So include it on only
26287 # the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
26288 # This is done before the in6_pktinfo check because that's what
26289 # netinet6/in6.h is needed for.
26290 #
26291 case "$host" in
26292  *-bsdi4.[01]*)
26293
26294 $as_echo "#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >>confdefs.h
26295
26296     isc_netinet6in6_hack="#include <netinet6/in6.h>"
26297     ;;
26298  *)
26299     isc_netinet6in6_hack=""
26300     ;;
26301 esac
26302
26303 #
26304 # This is similar to the netinet6/in6.h issue.
26305 #
26306 case "$host" in
26307  *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
26308
26309 $as_echo "#define ISC_PLATFORM_FIXIN6ISADDR 1" >>confdefs.h
26310
26311     isc_netinetin6_hack="#include <netinet/in6.h>"
26312     ;;
26313  *)
26314     isc_netinetin6_hack=""
26315     ;;
26316 esac
26317
26318
26319 case "$isc_cv_found_ipv6" in
26320  yes)
26321
26322 $as_echo "#define ISC_PLATFORM_HAVEIPV6 1" >>confdefs.h
26323
26324     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
26325 $as_echo_n "checking for in6_pktinfo... " >&6; }
26326 if ${isc_cv_have_in6_pktinfo+:} false; then :
26327   $as_echo_n "(cached) " >&6
26328 else
26329   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26330 /* end confdefs.h.  */
26331
26332                     #include <sys/types.h>
26333                     #include <sys/socket.h>
26334                     #include <netinet/in.h>
26335                     $isc_netinetin6_hack
26336                     $isc_netinet6in6_hack
26337
26338 int
26339 main ()
26340 {
26341
26342                     struct in6_pktinfo xyzzy;
26343
26344
26345   ;
26346   return 0;
26347 }
26348 _ACEOF
26349 if ac_fn_c_try_compile "$LINENO"; then :
26350   isc_cv_have_in6_pktinfo=yes
26351 else
26352   isc_cv_have_in6_pktinfo=no
26353
26354 fi
26355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26356
26357 fi
26358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6_pktinfo" >&5
26359 $as_echo "$isc_cv_have_in6_pktinfo" >&6; }
26360     case "$isc_cv_have_in6_pktinfo" in
26361      yes)
26362
26363 $as_echo "#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >>confdefs.h
26364
26365     esac
26366
26367
26368     # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
26369     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_in6.sin6_scope_id" >&5
26370 $as_echo_n "checking for sockaddr_in6.sin6_scope_id... " >&6; }
26371 if ${isc_cv_have_sin6_scope_id+:} false; then :
26372   $as_echo_n "(cached) " >&6
26373 else
26374   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26375 /* end confdefs.h.  */
26376
26377                     #include <sys/types.h>
26378                     #include <sys/socket.h>
26379                     #include <netinet/in.h>
26380                     $isc_netinetin6_hack
26381                     $isc_netinet6in6_hack
26382
26383 int
26384 main ()
26385 {
26386
26387                     struct sockaddr_in6 xyzzy;
26388                     xyzzy.sin6_scope_id = 0;
26389
26390
26391   ;
26392   return 0;
26393 }
26394 _ACEOF
26395 if ac_fn_c_try_compile "$LINENO"; then :
26396   isc_cv_have_sin6_scope_id=yes
26397 else
26398   isc_cv_have_sin6_scope_id=no
26399
26400 fi
26401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26402
26403 fi
26404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_sin6_scope_id" >&5
26405 $as_echo "$isc_cv_have_sin6_scope_id" >&6; }
26406
26407     case "$isc_cv_have_sin6_scope_id" in
26408      yes)
26409
26410 $as_echo "#define ISC_PLATFORM_HAVESCOPEID 1" >>confdefs.h
26411
26412     esac
26413 esac
26414
26415
26416 # We need this check run even without isc_cv_found_ipv6=yes
26417
26418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
26419 $as_echo_n "checking for in6addr_any... " >&6; }
26420 if ${isc_cv_in6addr_any_links+:} false; then :
26421   $as_echo_n "(cached) " >&6
26422 else
26423
26424         SAVED_LIBS="$LIBS"
26425         LIBS="$LDADD_LIBNTP $LIBS"
26426         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26427 /* end confdefs.h.  */
26428 $ac_includes_default
26429                     #include <sys/socket.h>
26430                     #include <netinet/in.h>
26431                     $isc_netinetin6_hack
26432                     $isc_netinet6in6_hack
26433
26434 int
26435 main ()
26436 {
26437
26438                     printf("%x", in6addr_any.s6_addr[15]);
26439
26440
26441   ;
26442   return 0;
26443 }
26444 _ACEOF
26445 if ac_fn_c_try_link "$LINENO"; then :
26446   isc_cv_in6addr_any_links=yes
26447 else
26448   isc_cv_in6addr_any_links=no
26449
26450 fi
26451 rm -f core conftest.err conftest.$ac_objext \
26452     conftest$ac_exeext conftest.$ac_ext
26453         LIBS="$SAVED_LIBS"
26454         { SAVED_LIBS=; unset SAVED_LIBS;}
26455
26456
26457 fi
26458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
26459 $as_echo "$isc_cv_in6addr_any_links" >&6; }
26460
26461 case "$isc_cv_in6addr_any_links" in
26462  no)
26463
26464 $as_echo "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
26465
26466 esac
26467
26468
26469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5
26470 $as_echo_n "checking for struct if_laddrconf... " >&6; }
26471 if ${isc_cv_struct_if_laddrconf+:} false; then :
26472   $as_echo_n "(cached) " >&6
26473 else
26474   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26475 /* end confdefs.h.  */
26476
26477                 #include <sys/types.h>
26478                 #include <net/if6.h>
26479
26480 int
26481 main ()
26482 {
26483
26484                 struct if_laddrconf a;
26485
26486
26487   ;
26488   return 0;
26489 }
26490 _ACEOF
26491 if ac_fn_c_try_compile "$LINENO"; then :
26492   isc_cv_struct_if_laddrconf=yes
26493 else
26494   isc_cv_struct_if_laddrconf=no
26495
26496 fi
26497 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26498
26499 fi
26500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrconf" >&5
26501 $as_echo "$isc_cv_struct_if_laddrconf" >&6; }
26502
26503 case "$isc_cv_struct_if_laddrconf" in
26504  yes)
26505
26506 $as_echo "#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" >>confdefs.h
26507
26508 esac
26509
26510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
26511 $as_echo_n "checking for struct if_laddrreq... " >&6; }
26512 if ${isc_cv_struct_if_laddrreq+:} false; then :
26513   $as_echo_n "(cached) " >&6
26514 else
26515   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26516 /* end confdefs.h.  */
26517
26518                 #include <sys/types.h>
26519                 #include <net/if6.h>
26520
26521 int
26522 main ()
26523 {
26524
26525                 struct if_laddrreq a;
26526
26527
26528   ;
26529   return 0;
26530 }
26531 _ACEOF
26532 if ac_fn_c_try_compile "$LINENO"; then :
26533   isc_cv_struct_if_laddrreq=yes
26534 else
26535   isc_cv_struct_if_laddrreq=no
26536
26537 fi
26538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26539
26540 fi
26541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrreq" >&5
26542 $as_echo "$isc_cv_struct_if_laddrreq" >&6; }
26543
26544 case "$isc_cv_struct_if_laddrreq" in
26545  yes)
26546
26547 $as_echo "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
26548
26549 esac
26550
26551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
26552 $as_echo_n "checking for multicast IP support... " >&6; }
26553 if ${ntp_cv_multicast+:} false; then :
26554   $as_echo_n "(cached) " >&6
26555 else
26556
26557         ntp_cv_multicast=no
26558         case "$host" in
26559          i386-sequent-sysv4)
26560             ;;
26561          *)
26562             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26563 /* end confdefs.h.  */
26564
26565                         #ifdef HAVE_NETINET_IN_H
26566                         # include <netinet/in.h>
26567                         #endif
26568
26569 int
26570 main ()
26571 {
26572
26573                         struct ip_mreq ipmr;
26574                         ipmr.imr_interface.s_addr = 0;
26575
26576
26577   ;
26578   return 0;
26579 }
26580 _ACEOF
26581 if ac_fn_c_try_compile "$LINENO"; then :
26582   ntp_cv_multicast=yes
26583 fi
26584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26585             ;;
26586         esac
26587
26588
26589 fi
26590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
26591 $as_echo "$ntp_cv_multicast" >&6; }
26592 case "$ntp_cv_multicast" in
26593  yes)
26594
26595 $as_echo "#define MCAST 1" >>confdefs.h
26596
26597     { $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
26598 $as_echo_n "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
26599 if ${ntp_cv_typeof_ip_multicast_loop+:} false; then :
26600   $as_echo_n "(cached) " >&6
26601 else
26602
26603             case "$host" in
26604              *-*-netbsd*|*-*-*linux*)
26605                 ntp_cv_typeof_ip_multicast_loop=u_int
26606                 ;;
26607              *)
26608                 ntp_cv_typeof_ip_multicast_loop=u_char
26609                 ;;
26610             esac
26611
26612
26613 fi
26614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
26615 $as_echo "$ntp_cv_typeof_ip_multicast_loop" >&6; }
26616
26617 cat >>confdefs.h <<_ACEOF
26618 #define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop
26619 _ACEOF
26620
26621 esac
26622
26623 # Check whether --enable-getifaddrs was given.
26624 if test "${enable_getifaddrs+set}" = set; then :
26625   enableval=$enable_getifaddrs; want_getifaddrs="$enableval"
26626 else
26627   want_getifaddrs="yes"
26628
26629 fi
26630
26631
26632 case $want_getifaddrs in
26633  glibc)
26634     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
26635 $as_echo "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
26636 esac
26637 case $want_getifaddrs in
26638  no)
26639     ;;
26640  *)
26641     SAVED_LIBS="$LIBS"
26642     LIBS="$LDADD_LIBNTP $LIBS"
26643     for ac_func in getifaddrs
26644 do :
26645   ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
26646 if test "x$ac_cv_func_getifaddrs" = xyes; then :
26647   cat >>confdefs.h <<_ACEOF
26648 #define HAVE_GETIFADDRS 1
26649 _ACEOF
26650
26651 fi
26652 done
26653
26654     LIBS="$SAVED_LIBS"
26655     { SAVED_LIBS=; unset SAVED_LIBS;}
26656     ;;
26657 esac
26658
26659 #
26660 # Check for if_nametoindex() for IPv6 scoped addresses support
26661 #
26662 case "$host" in
26663  *-hp-hpux*)
26664     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
26665 $as_echo_n "checking for library containing if_nametoindex... " >&6; }
26666 if ${ac_cv_search_if_nametoindex+:} false; then :
26667   $as_echo_n "(cached) " >&6
26668 else
26669   ac_func_search_save_LIBS=$LIBS
26670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26671 /* end confdefs.h.  */
26672
26673 /* Override any GCC internal prototype to avoid an error.
26674    Use char because int might match the return type of a GCC
26675    builtin and then its argument prototype would still apply.  */
26676 #ifdef __cplusplus
26677 extern "C"
26678 #endif
26679 char if_nametoindex ();
26680 int
26681 main ()
26682 {
26683 return if_nametoindex ();
26684   ;
26685   return 0;
26686 }
26687 _ACEOF
26688 for ac_lib in '' ipv6; do
26689   if test -z "$ac_lib"; then
26690     ac_res="none required"
26691   else
26692     ac_res=-l$ac_lib
26693     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26694   fi
26695   if ac_fn_c_try_link "$LINENO"; then :
26696   ac_cv_search_if_nametoindex=$ac_res
26697 fi
26698 rm -f core conftest.err conftest.$ac_objext \
26699     conftest$ac_exeext
26700   if ${ac_cv_search_if_nametoindex+:} false; then :
26701   break
26702 fi
26703 done
26704 if ${ac_cv_search_if_nametoindex+:} false; then :
26705
26706 else
26707   ac_cv_search_if_nametoindex=no
26708 fi
26709 rm conftest.$ac_ext
26710 LIBS=$ac_func_search_save_LIBS
26711 fi
26712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
26713 $as_echo "$ac_cv_search_if_nametoindex" >&6; }
26714 ac_res=$ac_cv_search_if_nametoindex
26715 if test "$ac_res" != no; then :
26716   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26717
26718 fi
26719
26720 esac
26721 SAVED_LIBS="$LIBS"
26722 LIBS="$LDADD_LIBNTP $LIBS"
26723 for ac_func in if_nametoindex
26724 do :
26725   ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
26726 if test "x$ac_cv_func_if_nametoindex" = xyes; then :
26727   cat >>confdefs.h <<_ACEOF
26728 #define HAVE_IF_NAMETOINDEX 1
26729 _ACEOF
26730
26731 fi
26732 done
26733
26734 LIBS="$SAVED_LIBS"
26735 { SAVED_LIBS=; unset SAVED_LIBS;}
26736 case "$ac_cv_func_if_nametoindex" in
26737  yes)
26738
26739 $as_echo "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
26740
26741 esac
26742
26743
26744
26745 ###
26746
26747 # Hacks
26748 # these need work if we're to move libntp under sntp
26749
26750 $as_echo "#define HAVE_NO_NICE 1" >>confdefs.h
26751
26752
26753 $as_echo "#define HAVE_TERMIOS 1" >>confdefs.h
26754
26755
26756 # Checks for library functions.
26757 for ac_func in socket
26758 do :
26759   ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
26760 if test "x$ac_cv_func_socket" = xyes; then :
26761   cat >>confdefs.h <<_ACEOF
26762 #define HAVE_SOCKET 1
26763 _ACEOF
26764
26765 fi
26766 done
26767
26768
26769
26770 # We may not need have_unity
26771 have_unity=false
26772 # Extract the first word of "ruby", so it can be a program name with args.
26773 set dummy ruby; ac_word=$2
26774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26775 $as_echo_n "checking for $ac_word... " >&6; }
26776 if ${ac_cv_path_PATH_RUBY+:} false; then :
26777   $as_echo_n "(cached) " >&6
26778 else
26779   case $PATH_RUBY in
26780   [\\/]* | ?:[\\/]*)
26781   ac_cv_path_PATH_RUBY="$PATH_RUBY" # Let the user override the test with a path.
26782   ;;
26783   *)
26784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26785 for as_dir in $PATH
26786 do
26787   IFS=$as_save_IFS
26788   test -z "$as_dir" && as_dir=.
26789     for ac_exec_ext in '' $ac_executable_extensions; do
26790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26791     ac_cv_path_PATH_RUBY="$as_dir/$ac_word$ac_exec_ext"
26792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26793     break 2
26794   fi
26795 done
26796   done
26797 IFS=$as_save_IFS
26798
26799   ;;
26800 esac
26801 fi
26802 PATH_RUBY=$ac_cv_path_PATH_RUBY
26803 if test -n "$PATH_RUBY"; then
26804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_RUBY" >&5
26805 $as_echo "$PATH_RUBY" >&6; }
26806 else
26807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26808 $as_echo "no" >&6; }
26809 fi
26810
26811
26812 case "$PATH_RUBY" in
26813  /*)
26814     have_unity=true
26815     ;;
26816  *) PATH_RUBY="false"
26817     ;;
26818 esac
26819 # We may not need UNITYBUILD_AVAILABLE
26820  if $have_unity; then
26821   UNITYBUILD_AVAILABLE_TRUE=
26822   UNITYBUILD_AVAILABLE_FALSE='#'
26823 else
26824   UNITYBUILD_AVAILABLE_TRUE='#'
26825   UNITYBUILD_AVAILABLE_FALSE=
26826 fi
26827
26828
26829
26830 # HMS: if we don't find c++ we should not look for gtest.
26831 ac_ext=cpp
26832 ac_cpp='$CXXCPP $CPPFLAGS'
26833 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26834 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26835 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26836 if test -z "$CXX"; then
26837   if test -n "$CCC"; then
26838     CXX=$CCC
26839   else
26840     if test -n "$ac_tool_prefix"; then
26841   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
26842   do
26843     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26844 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26846 $as_echo_n "checking for $ac_word... " >&6; }
26847 if ${ac_cv_prog_CXX+:} false; then :
26848   $as_echo_n "(cached) " >&6
26849 else
26850   if test -n "$CXX"; then
26851   ac_cv_prog_CXX="$CXX" # Let the user override the test.
26852 else
26853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26854 for as_dir in $PATH
26855 do
26856   IFS=$as_save_IFS
26857   test -z "$as_dir" && as_dir=.
26858     for ac_exec_ext in '' $ac_executable_extensions; do
26859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26860     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
26861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26862     break 2
26863   fi
26864 done
26865   done
26866 IFS=$as_save_IFS
26867
26868 fi
26869 fi
26870 CXX=$ac_cv_prog_CXX
26871 if test -n "$CXX"; then
26872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
26873 $as_echo "$CXX" >&6; }
26874 else
26875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26876 $as_echo "no" >&6; }
26877 fi
26878
26879
26880     test -n "$CXX" && break
26881   done
26882 fi
26883 if test -z "$CXX"; then
26884   ac_ct_CXX=$CXX
26885   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
26886 do
26887   # Extract the first word of "$ac_prog", so it can be a program name with args.
26888 set dummy $ac_prog; ac_word=$2
26889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26890 $as_echo_n "checking for $ac_word... " >&6; }
26891 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
26892   $as_echo_n "(cached) " >&6
26893 else
26894   if test -n "$ac_ct_CXX"; then
26895   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
26896 else
26897 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26898 for as_dir in $PATH
26899 do
26900   IFS=$as_save_IFS
26901   test -z "$as_dir" && as_dir=.
26902     for ac_exec_ext in '' $ac_executable_extensions; do
26903   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26904     ac_cv_prog_ac_ct_CXX="$ac_prog"
26905     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26906     break 2
26907   fi
26908 done
26909   done
26910 IFS=$as_save_IFS
26911
26912 fi
26913 fi
26914 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
26915 if test -n "$ac_ct_CXX"; then
26916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
26917 $as_echo "$ac_ct_CXX" >&6; }
26918 else
26919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26920 $as_echo "no" >&6; }
26921 fi
26922
26923
26924   test -n "$ac_ct_CXX" && break
26925 done
26926
26927   if test "x$ac_ct_CXX" = x; then
26928     CXX="g++"
26929   else
26930     case $cross_compiling:$ac_tool_warned in
26931 yes:)
26932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26933 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26934 ac_tool_warned=yes ;;
26935 esac
26936     CXX=$ac_ct_CXX
26937   fi
26938 fi
26939
26940   fi
26941 fi
26942 # Provide some information about the compiler.
26943 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
26944 set X $ac_compile
26945 ac_compiler=$2
26946 for ac_option in --version -v -V -qversion; do
26947   { { ac_try="$ac_compiler $ac_option >&5"
26948 case "(($ac_try" in
26949   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26950   *) ac_try_echo=$ac_try;;
26951 esac
26952 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
26953 $as_echo "$ac_try_echo"; } >&5
26954   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
26955   ac_status=$?
26956   if test -s conftest.err; then
26957     sed '10a\
26958 ... rest of stderr output deleted ...
26959          10q' conftest.err >conftest.er1
26960     cat conftest.er1 >&5
26961   fi
26962   rm -f conftest.er1 conftest.err
26963   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26964   test $ac_status = 0; }
26965 done
26966
26967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
26968 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
26969 if ${ac_cv_cxx_compiler_gnu+:} false; then :
26970   $as_echo_n "(cached) " >&6
26971 else
26972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26973 /* end confdefs.h.  */
26974
26975 int
26976 main ()
26977 {
26978 #ifndef __GNUC__
26979        choke me
26980 #endif
26981
26982   ;
26983   return 0;
26984 }
26985 _ACEOF
26986 if ac_fn_cxx_try_compile "$LINENO"; then :
26987   ac_compiler_gnu=yes
26988 else
26989   ac_compiler_gnu=no
26990 fi
26991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26992 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
26993
26994 fi
26995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
26996 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
26997 if test $ac_compiler_gnu = yes; then
26998   GXX=yes
26999 else
27000   GXX=
27001 fi
27002 ac_test_CXXFLAGS=${CXXFLAGS+set}
27003 ac_save_CXXFLAGS=$CXXFLAGS
27004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
27005 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
27006 if ${ac_cv_prog_cxx_g+:} false; then :
27007   $as_echo_n "(cached) " >&6
27008 else
27009   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
27010    ac_cxx_werror_flag=yes
27011    ac_cv_prog_cxx_g=no
27012    CXXFLAGS="-g"
27013    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27014 /* end confdefs.h.  */
27015
27016 int
27017 main ()
27018 {
27019
27020   ;
27021   return 0;
27022 }
27023 _ACEOF
27024 if ac_fn_cxx_try_compile "$LINENO"; then :
27025   ac_cv_prog_cxx_g=yes
27026 else
27027   CXXFLAGS=""
27028       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27029 /* end confdefs.h.  */
27030
27031 int
27032 main ()
27033 {
27034
27035   ;
27036   return 0;
27037 }
27038 _ACEOF
27039 if ac_fn_cxx_try_compile "$LINENO"; then :
27040
27041 else
27042   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
27043          CXXFLAGS="-g"
27044          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27045 /* end confdefs.h.  */
27046
27047 int
27048 main ()
27049 {
27050
27051   ;
27052   return 0;
27053 }
27054 _ACEOF
27055 if ac_fn_cxx_try_compile "$LINENO"; then :
27056   ac_cv_prog_cxx_g=yes
27057 fi
27058 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27059 fi
27060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27061 fi
27062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27063    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
27064 fi
27065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
27066 $as_echo "$ac_cv_prog_cxx_g" >&6; }
27067 if test "$ac_test_CXXFLAGS" = set; then
27068   CXXFLAGS=$ac_save_CXXFLAGS
27069 elif test $ac_cv_prog_cxx_g = yes; then
27070   if test "$GXX" = yes; then
27071     CXXFLAGS="-g -O2"
27072   else
27073     CXXFLAGS="-g"
27074   fi
27075 else
27076   if test "$GXX" = yes; then
27077     CXXFLAGS="-O2"
27078   else
27079     CXXFLAGS=
27080   fi
27081 fi
27082 ac_ext=c
27083 ac_cpp='$CPP $CPPFLAGS'
27084 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27085 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27086 ac_compiler_gnu=$ac_cv_c_compiler_gnu
27087
27088 depcc="$CXX"  am_compiler_list=
27089
27090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
27091 $as_echo_n "checking dependency style of $depcc... " >&6; }
27092 if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
27093   $as_echo_n "(cached) " >&6
27094 else
27095   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
27096   # We make a subdir and do the tests there.  Otherwise we can end up
27097   # making bogus files that we don't know about and never remove.  For
27098   # instance it was reported that on HP-UX the gcc test will end up
27099   # making a dummy file named 'D' -- because '-MD' means "put the output
27100   # in D".
27101   rm -rf conftest.dir
27102   mkdir conftest.dir
27103   # Copy depcomp to subdir because otherwise we won't find it if we're
27104   # using a relative directory.
27105   cp "$am_depcomp" conftest.dir
27106   cd conftest.dir
27107   # We will build objects and dependencies in a subdirectory because
27108   # it helps to detect inapplicable dependency modes.  For instance
27109   # both Tru64's cc and ICC support -MD to output dependencies as a
27110   # side effect of compilation, but ICC will put the dependencies in
27111   # the current directory while Tru64 will put them in the object
27112   # directory.
27113   mkdir sub
27114
27115   am_cv_CXX_dependencies_compiler_type=none
27116   if test "$am_compiler_list" = ""; then
27117      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
27118   fi
27119   am__universal=false
27120   case " $depcc " in #(
27121      *\ -arch\ *\ -arch\ *) am__universal=true ;;
27122      esac
27123
27124   for depmode in $am_compiler_list; do
27125     # Setup a source with many dependencies, because some compilers
27126     # like to wrap large dependency lists on column 80 (with \), and
27127     # we should not choose a depcomp mode which is confused by this.
27128     #
27129     # We need to recreate these files for each test, as the compiler may
27130     # overwrite some of them when testing with obscure command lines.
27131     # This happens at least with the AIX C compiler.
27132     : > sub/conftest.c
27133     for i in 1 2 3 4 5 6; do
27134       echo '#include "conftst'$i'.h"' >> sub/conftest.c
27135       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
27136       # Solaris 10 /bin/sh.
27137       echo '/* dummy */' > sub/conftst$i.h
27138     done
27139     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
27140
27141     # We check with '-c' and '-o' for the sake of the "dashmstdout"
27142     # mode.  It turns out that the SunPro C++ compiler does not properly
27143     # handle '-M -o', and we need to detect this.  Also, some Intel
27144     # versions had trouble with output in subdirs.
27145     am__obj=sub/conftest.${OBJEXT-o}
27146     am__minus_obj="-o $am__obj"
27147     case $depmode in
27148     gcc)
27149       # This depmode causes a compiler race in universal mode.
27150       test "$am__universal" = false || continue
27151       ;;
27152     nosideeffect)
27153       # After this tag, mechanisms are not by side-effect, so they'll
27154       # only be used when explicitly requested.
27155       if test "x$enable_dependency_tracking" = xyes; then
27156         continue
27157       else
27158         break
27159       fi
27160       ;;
27161     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
27162       # This compiler won't grok '-c -o', but also, the minuso test has
27163       # not run yet.  These depmodes are late enough in the game, and
27164       # so weak that their functioning should not be impacted.
27165       am__obj=conftest.${OBJEXT-o}
27166       am__minus_obj=
27167       ;;
27168     none) break ;;
27169     esac
27170     if depmode=$depmode \
27171        source=sub/conftest.c object=$am__obj \
27172        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
27173        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
27174          >/dev/null 2>conftest.err &&
27175        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
27176        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
27177        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
27178        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
27179       # icc doesn't choke on unknown options, it will just issue warnings
27180       # or remarks (even with -Werror).  So we grep stderr for any message
27181       # that says an option was ignored or not supported.
27182       # When given -MP, icc 7.0 and 7.1 complain thusly:
27183       #   icc: Command line warning: ignoring option '-M'; no argument required
27184       # The diagnosis changed in icc 8.0:
27185       #   icc: Command line remark: option '-MP' not supported
27186       if (grep 'ignoring option' conftest.err ||
27187           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
27188         am_cv_CXX_dependencies_compiler_type=$depmode
27189         break
27190       fi
27191     fi
27192   done
27193
27194   cd ..
27195   rm -rf conftest.dir
27196 else
27197   am_cv_CXX_dependencies_compiler_type=none
27198 fi
27199
27200 fi
27201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
27202 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
27203 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
27204
27205  if
27206   test "x$enable_dependency_tracking" != xno \
27207   && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
27208   am__fastdepCXX_TRUE=
27209   am__fastdepCXX_FALSE='#'
27210 else
27211   am__fastdepCXX_TRUE='#'
27212   am__fastdepCXX_FALSE=
27213 fi
27214
27215
27216
27217
27218 func_stripname_cnf ()
27219 {
27220   case ${2} in
27221   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
27222   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
27223   esac
27224 } # func_stripname_cnf
27225
27226       if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
27227     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
27228     (test "X$CXX" != "Xg++"))) ; then
27229   ac_ext=cpp
27230 ac_cpp='$CXXCPP $CPPFLAGS'
27231 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27232 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27233 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
27235 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
27236 if test -z "$CXXCPP"; then
27237   if ${ac_cv_prog_CXXCPP+:} false; then :
27238   $as_echo_n "(cached) " >&6
27239 else
27240       # Double quotes because CXXCPP needs to be expanded
27241     for CXXCPP in "$CXX -E" "/lib/cpp"
27242     do
27243       ac_preproc_ok=false
27244 for ac_cxx_preproc_warn_flag in '' yes
27245 do
27246   # Use a header file that comes with gcc, so configuring glibc
27247   # with a fresh cross-compiler works.
27248   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27249   # <limits.h> exists even on freestanding compilers.
27250   # On the NeXT, cc -E runs the code through the compiler's parser,
27251   # not just through cpp. "Syntax error" is here to catch this case.
27252   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27253 /* end confdefs.h.  */
27254 #ifdef __STDC__
27255 # include <limits.h>
27256 #else
27257 # include <assert.h>
27258 #endif
27259                      Syntax error
27260 _ACEOF
27261 if ac_fn_cxx_try_cpp "$LINENO"; then :
27262
27263 else
27264   # Broken: fails on valid input.
27265 continue
27266 fi
27267 rm -f conftest.err conftest.i conftest.$ac_ext
27268
27269   # OK, works on sane cases.  Now check whether nonexistent headers
27270   # can be detected and how.
27271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27272 /* end confdefs.h.  */
27273 #include <ac_nonexistent.h>
27274 _ACEOF
27275 if ac_fn_cxx_try_cpp "$LINENO"; then :
27276   # Broken: success on invalid input.
27277 continue
27278 else
27279   # Passes both tests.
27280 ac_preproc_ok=:
27281 break
27282 fi
27283 rm -f conftest.err conftest.i conftest.$ac_ext
27284
27285 done
27286 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
27287 rm -f conftest.i conftest.err conftest.$ac_ext
27288 if $ac_preproc_ok; then :
27289   break
27290 fi
27291
27292     done
27293     ac_cv_prog_CXXCPP=$CXXCPP
27294
27295 fi
27296   CXXCPP=$ac_cv_prog_CXXCPP
27297 else
27298   ac_cv_prog_CXXCPP=$CXXCPP
27299 fi
27300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
27301 $as_echo "$CXXCPP" >&6; }
27302 ac_preproc_ok=false
27303 for ac_cxx_preproc_warn_flag in '' yes
27304 do
27305   # Use a header file that comes with gcc, so configuring glibc
27306   # with a fresh cross-compiler works.
27307   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27308   # <limits.h> exists even on freestanding compilers.
27309   # On the NeXT, cc -E runs the code through the compiler's parser,
27310   # not just through cpp. "Syntax error" is here to catch this case.
27311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27312 /* end confdefs.h.  */
27313 #ifdef __STDC__
27314 # include <limits.h>
27315 #else
27316 # include <assert.h>
27317 #endif
27318                      Syntax error
27319 _ACEOF
27320 if ac_fn_cxx_try_cpp "$LINENO"; then :
27321
27322 else
27323   # Broken: fails on valid input.
27324 continue
27325 fi
27326 rm -f conftest.err conftest.i conftest.$ac_ext
27327
27328   # OK, works on sane cases.  Now check whether nonexistent headers
27329   # can be detected and how.
27330   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27331 /* end confdefs.h.  */
27332 #include <ac_nonexistent.h>
27333 _ACEOF
27334 if ac_fn_cxx_try_cpp "$LINENO"; then :
27335   # Broken: success on invalid input.
27336 continue
27337 else
27338   # Passes both tests.
27339 ac_preproc_ok=:
27340 break
27341 fi
27342 rm -f conftest.err conftest.i conftest.$ac_ext
27343
27344 done
27345 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
27346 rm -f conftest.i conftest.err conftest.$ac_ext
27347 if $ac_preproc_ok; then :
27348
27349 else
27350   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27351 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27352 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
27353 See \`config.log' for more details" "$LINENO" 5; }
27354 fi
27355
27356 ac_ext=c
27357 ac_cpp='$CPP $CPPFLAGS'
27358 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27359 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
27361
27362 else
27363   _lt_caught_CXX_error=yes
27364 fi
27365
27366 ac_ext=cpp
27367 ac_cpp='$CXXCPP $CPPFLAGS'
27368 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27369 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27370 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27371
27372 archive_cmds_need_lc_CXX=no
27373 allow_undefined_flag_CXX=
27374 always_export_symbols_CXX=no
27375 archive_expsym_cmds_CXX=
27376 compiler_needs_object_CXX=no
27377 export_dynamic_flag_spec_CXX=
27378 hardcode_direct_CXX=no
27379 hardcode_direct_absolute_CXX=no
27380 hardcode_libdir_flag_spec_CXX=
27381 hardcode_libdir_flag_spec_ld_CXX=
27382 hardcode_libdir_separator_CXX=
27383 hardcode_minus_L_CXX=no
27384 hardcode_shlibpath_var_CXX=unsupported
27385 hardcode_automatic_CXX=no
27386 inherit_rpath_CXX=no
27387 module_cmds_CXX=
27388 module_expsym_cmds_CXX=
27389 link_all_deplibs_CXX=unknown
27390 old_archive_cmds_CXX=$old_archive_cmds
27391 reload_flag_CXX=$reload_flag
27392 reload_cmds_CXX=$reload_cmds
27393 no_undefined_flag_CXX=
27394 whole_archive_flag_spec_CXX=
27395 enable_shared_with_static_runtimes_CXX=no
27396
27397 # Source file extension for C++ test sources.
27398 ac_ext=cpp
27399
27400 # Object file extension for compiled C++ test sources.
27401 objext=o
27402 objext_CXX=$objext
27403
27404 # No sense in running all these tests if we already determined that
27405 # the CXX compiler isn't working.  Some variables (like enable_shared)
27406 # are currently assumed to apply to all compilers on this platform,
27407 # and will be corrupted by setting them based on a non-working compiler.
27408 if test "$_lt_caught_CXX_error" != yes; then
27409   # Code to be used in simple compile tests
27410   lt_simple_compile_test_code="int some_variable = 0;"
27411
27412   # Code to be used in simple link tests
27413   lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
27414
27415   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
27416
27417
27418
27419
27420
27421
27422 # If no C compiler was specified, use CC.
27423 LTCC=${LTCC-"$CC"}
27424
27425 # If no C compiler flags were specified, use CFLAGS.
27426 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
27427
27428 # Allow CC to be a program name with arguments.
27429 compiler=$CC
27430
27431
27432   # save warnings/boilerplate of simple test code
27433   ac_outfile=conftest.$ac_objext
27434 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
27435 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
27436 _lt_compiler_boilerplate=`cat conftest.err`
27437 $RM conftest*
27438
27439   ac_outfile=conftest.$ac_objext
27440 echo "$lt_simple_link_test_code" >conftest.$ac_ext
27441 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
27442 _lt_linker_boilerplate=`cat conftest.err`
27443 $RM -r conftest*
27444
27445
27446   # Allow CC to be a program name with arguments.
27447   lt_save_CC=$CC
27448   lt_save_CFLAGS=$CFLAGS
27449   lt_save_LD=$LD
27450   lt_save_GCC=$GCC
27451   GCC=$GXX
27452   lt_save_with_gnu_ld=$with_gnu_ld
27453   lt_save_path_LD=$lt_cv_path_LD
27454   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
27455     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
27456   else
27457     $as_unset lt_cv_prog_gnu_ld
27458   fi
27459   if test -n "${lt_cv_path_LDCXX+set}"; then
27460     lt_cv_path_LD=$lt_cv_path_LDCXX
27461   else
27462     $as_unset lt_cv_path_LD
27463   fi
27464   test -z "${LDCXX+set}" || LD=$LDCXX
27465   CC=${CXX-"c++"}
27466   CFLAGS=$CXXFLAGS
27467   compiler=$CC
27468   compiler_CXX=$CC
27469   for cc_temp in $compiler""; do
27470   case $cc_temp in
27471     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
27472     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
27473     \-*) ;;
27474     *) break;;
27475   esac
27476 done
27477 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
27478
27479
27480   if test -n "$compiler"; then
27481     # We don't want -fno-exception when compiling C++ code, so set the
27482     # no_builtin_flag separately
27483     if test "$GXX" = yes; then
27484       lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
27485     else
27486       lt_prog_compiler_no_builtin_flag_CXX=
27487     fi
27488
27489     if test "$GXX" = yes; then
27490       # Set up default GNU C++ configuration
27491
27492
27493
27494 # Check whether --with-gnu-ld was given.
27495 if test "${with_gnu_ld+set}" = set; then :
27496   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
27497 else
27498   with_gnu_ld=no
27499 fi
27500
27501 ac_prog=ld
27502 if test "$GCC" = yes; then
27503   # Check if gcc -print-prog-name=ld gives a path.
27504   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
27505 $as_echo_n "checking for ld used by $CC... " >&6; }
27506   case $host in
27507   *-*-mingw*)
27508     # gcc leaves a trailing carriage return which upsets mingw
27509     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
27510   *)
27511     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
27512   esac
27513   case $ac_prog in
27514     # Accept absolute paths.
27515     [\\/]* | ?:[\\/]*)
27516       re_direlt='/[^/][^/]*/\.\./'
27517       # Canonicalize the pathname of ld
27518       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
27519       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
27520         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
27521       done
27522       test -z "$LD" && LD="$ac_prog"
27523       ;;
27524   "")
27525     # If it fails, then pretend we aren't using GCC.
27526     ac_prog=ld
27527     ;;
27528   *)
27529     # If it is relative, then search for the first ld in PATH.
27530     with_gnu_ld=unknown
27531     ;;
27532   esac
27533 elif test "$with_gnu_ld" = yes; then
27534   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
27535 $as_echo_n "checking for GNU ld... " >&6; }
27536 else
27537   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
27538 $as_echo_n "checking for non-GNU ld... " >&6; }
27539 fi
27540 if ${lt_cv_path_LD+:} false; then :
27541   $as_echo_n "(cached) " >&6
27542 else
27543   if test -z "$LD"; then
27544   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
27545   for ac_dir in $PATH; do
27546     IFS="$lt_save_ifs"
27547     test -z "$ac_dir" && ac_dir=.
27548     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
27549       lt_cv_path_LD="$ac_dir/$ac_prog"
27550       # Check to see if the program is GNU ld.  I'd rather use --version,
27551       # but apparently some variants of GNU ld only accept -v.
27552       # Break only if it was the GNU/non-GNU ld that we prefer.
27553       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
27554       *GNU* | *'with BFD'*)
27555         test "$with_gnu_ld" != no && break
27556         ;;
27557       *)
27558         test "$with_gnu_ld" != yes && break
27559         ;;
27560       esac
27561     fi
27562   done
27563   IFS="$lt_save_ifs"
27564 else
27565   lt_cv_path_LD="$LD" # Let the user override the test with a path.
27566 fi
27567 fi
27568
27569 LD="$lt_cv_path_LD"
27570 if test -n "$LD"; then
27571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
27572 $as_echo "$LD" >&6; }
27573 else
27574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27575 $as_echo "no" >&6; }
27576 fi
27577 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
27578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
27579 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
27580 if ${lt_cv_prog_gnu_ld+:} false; then :
27581   $as_echo_n "(cached) " >&6
27582 else
27583   # I'd rather use --version here, but apparently some GNU lds only accept -v.
27584 case `$LD -v 2>&1 </dev/null` in
27585 *GNU* | *'with BFD'*)
27586   lt_cv_prog_gnu_ld=yes
27587   ;;
27588 *)
27589   lt_cv_prog_gnu_ld=no
27590   ;;
27591 esac
27592 fi
27593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
27594 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
27595 with_gnu_ld=$lt_cv_prog_gnu_ld
27596
27597
27598
27599
27600
27601
27602
27603       # Check if GNU C++ uses GNU ld as the underlying linker, since the
27604       # archiving commands below assume that GNU ld is being used.
27605       if test "$with_gnu_ld" = yes; then
27606         archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
27607         archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
27608
27609         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
27610         export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
27611
27612         # If archive_cmds runs LD, not CC, wlarc should be empty
27613         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
27614         #     investigate it a little bit more. (MM)
27615         wlarc='${wl}'
27616
27617         # ancient GNU ld didn't support --whole-archive et. al.
27618         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
27619           $GREP 'no-whole-archive' > /dev/null; then
27620           whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
27621         else
27622           whole_archive_flag_spec_CXX=
27623         fi
27624       else
27625         with_gnu_ld=no
27626         wlarc=
27627
27628         # A generic and very simple default shared library creation
27629         # command for GNU C++ for the case where it uses the native
27630         # linker, instead of GNU ld.  If possible, this setting should
27631         # overridden to take advantage of the native linker features on
27632         # the platform it is being used on.
27633         archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
27634       fi
27635
27636       # Commands to make compiler produce verbose output that lists
27637       # what "hidden" libraries, object files and flags are used when
27638       # linking a shared library.
27639       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
27640
27641     else
27642       GXX=no
27643       with_gnu_ld=no
27644       wlarc=
27645     fi
27646
27647     # PORTME: fill in a description of your system's C++ link characteristics
27648     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
27649 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
27650     ld_shlibs_CXX=yes
27651     case $host_os in
27652       aix3*)
27653         # FIXME: insert proper C++ library support
27654         ld_shlibs_CXX=no
27655         ;;
27656       aix[4-9]*)
27657         if test "$host_cpu" = ia64; then
27658           # On IA64, the linker does run time linking by default, so we don't
27659           # have to do anything special.
27660           aix_use_runtimelinking=no
27661           exp_sym_flag='-Bexport'
27662           no_entry_flag=""
27663         else
27664           aix_use_runtimelinking=no
27665
27666           # Test if we are trying to use run time linking or normal
27667           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
27668           # need to do runtime linking.
27669           case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
27670             for ld_flag in $LDFLAGS; do
27671               case $ld_flag in
27672               *-brtl*)
27673                 aix_use_runtimelinking=yes
27674                 break
27675                 ;;
27676               esac
27677             done
27678             ;;
27679           esac
27680
27681           exp_sym_flag='-bexport'
27682           no_entry_flag='-bnoentry'
27683         fi
27684
27685         # When large executables or shared objects are built, AIX ld can
27686         # have problems creating the table of contents.  If linking a library
27687         # or program results in "error TOC overflow" add -mminimal-toc to
27688         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
27689         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
27690
27691         archive_cmds_CXX=''
27692         hardcode_direct_CXX=yes
27693         hardcode_direct_absolute_CXX=yes
27694         hardcode_libdir_separator_CXX=':'
27695         link_all_deplibs_CXX=yes
27696         file_list_spec_CXX='${wl}-f,'
27697
27698         if test "$GXX" = yes; then
27699           case $host_os in aix4.[012]|aix4.[012].*)
27700           # We only want to do this on AIX 4.2 and lower, the check
27701           # below for broken collect2 doesn't work under 4.3+
27702           collect2name=`${CC} -print-prog-name=collect2`
27703           if test -f "$collect2name" &&
27704              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
27705           then
27706             # We have reworked collect2
27707             :
27708           else
27709             # We have old collect2
27710             hardcode_direct_CXX=unsupported
27711             # It fails to find uninstalled libraries when the uninstalled
27712             # path is not listed in the libpath.  Setting hardcode_minus_L
27713             # to unsupported forces relinking
27714             hardcode_minus_L_CXX=yes
27715             hardcode_libdir_flag_spec_CXX='-L$libdir'
27716             hardcode_libdir_separator_CXX=
27717           fi
27718           esac
27719           shared_flag='-shared'
27720           if test "$aix_use_runtimelinking" = yes; then
27721             shared_flag="$shared_flag "'${wl}-G'
27722           fi
27723         else
27724           # not using gcc
27725           if test "$host_cpu" = ia64; then
27726           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
27727           # chokes on -Wl,-G. The following line is correct:
27728           shared_flag='-G'
27729           else
27730             if test "$aix_use_runtimelinking" = yes; then
27731               shared_flag='${wl}-G'
27732             else
27733               shared_flag='${wl}-bM:SRE'
27734             fi
27735           fi
27736         fi
27737
27738         export_dynamic_flag_spec_CXX='${wl}-bexpall'
27739         # It seems that -bexpall does not export symbols beginning with
27740         # underscore (_), so it is better to generate a list of symbols to
27741         # export.
27742         always_export_symbols_CXX=yes
27743         if test "$aix_use_runtimelinking" = yes; then
27744           # Warning - without using the other runtime loading flags (-brtl),
27745           # -berok will link without error, but may produce a broken library.
27746           allow_undefined_flag_CXX='-berok'
27747           # Determine the default libpath from the value encoded in an empty
27748           # executable.
27749           if test "${lt_cv_aix_libpath+set}" = set; then
27750   aix_libpath=$lt_cv_aix_libpath
27751 else
27752   if ${lt_cv_aix_libpath__CXX+:} false; then :
27753   $as_echo_n "(cached) " >&6
27754 else
27755   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27756 /* end confdefs.h.  */
27757
27758 int
27759 main ()
27760 {
27761
27762   ;
27763   return 0;
27764 }
27765 _ACEOF
27766 if ac_fn_cxx_try_link "$LINENO"; then :
27767
27768   lt_aix_libpath_sed='
27769       /Import File Strings/,/^$/ {
27770           /^0/ {
27771               s/^0  *\([^ ]*\) *$/\1/
27772               p
27773           }
27774       }'
27775   lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
27776   # Check for a 64-bit object if we didn't find anything.
27777   if test -z "$lt_cv_aix_libpath__CXX"; then
27778     lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
27779   fi
27780 fi
27781 rm -f core conftest.err conftest.$ac_objext \
27782     conftest$ac_exeext conftest.$ac_ext
27783   if test -z "$lt_cv_aix_libpath__CXX"; then
27784     lt_cv_aix_libpath__CXX="/usr/lib:/lib"
27785   fi
27786
27787 fi
27788
27789   aix_libpath=$lt_cv_aix_libpath__CXX
27790 fi
27791
27792           hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
27793
27794           archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
27795         else
27796           if test "$host_cpu" = ia64; then
27797             hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
27798             allow_undefined_flag_CXX="-z nodefs"
27799             archive_expsym_cmds_CXX="\$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"
27800           else
27801             # Determine the default libpath from the value encoded in an
27802             # empty executable.
27803             if test "${lt_cv_aix_libpath+set}" = set; then
27804   aix_libpath=$lt_cv_aix_libpath
27805 else
27806   if ${lt_cv_aix_libpath__CXX+:} false; then :
27807   $as_echo_n "(cached) " >&6
27808 else
27809   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27810 /* end confdefs.h.  */
27811
27812 int
27813 main ()
27814 {
27815
27816   ;
27817   return 0;
27818 }
27819 _ACEOF
27820 if ac_fn_cxx_try_link "$LINENO"; then :
27821
27822   lt_aix_libpath_sed='
27823       /Import File Strings/,/^$/ {
27824           /^0/ {
27825               s/^0  *\([^ ]*\) *$/\1/
27826               p
27827           }
27828       }'
27829   lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
27830   # Check for a 64-bit object if we didn't find anything.
27831   if test -z "$lt_cv_aix_libpath__CXX"; then
27832     lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
27833   fi
27834 fi
27835 rm -f core conftest.err conftest.$ac_objext \
27836     conftest$ac_exeext conftest.$ac_ext
27837   if test -z "$lt_cv_aix_libpath__CXX"; then
27838     lt_cv_aix_libpath__CXX="/usr/lib:/lib"
27839   fi
27840
27841 fi
27842
27843   aix_libpath=$lt_cv_aix_libpath__CXX
27844 fi
27845
27846             hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
27847             # Warning - without using the other run time loading flags,
27848             # -berok will link without error, but may produce a broken library.
27849             no_undefined_flag_CXX=' ${wl}-bernotok'
27850             allow_undefined_flag_CXX=' ${wl}-berok'
27851             if test "$with_gnu_ld" = yes; then
27852               # We only use this code for GNU lds that support --whole-archive.
27853               whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
27854             else
27855               # Exported symbols can be pulled into shared objects from archives
27856               whole_archive_flag_spec_CXX='$convenience'
27857             fi
27858             archive_cmds_need_lc_CXX=yes
27859             # This is similar to how AIX traditionally builds its shared
27860             # libraries.
27861             archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
27862           fi
27863         fi
27864         ;;
27865
27866       beos*)
27867         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
27868           allow_undefined_flag_CXX=unsupported
27869           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
27870           # support --undefined.  This deserves some investigation.  FIXME
27871           archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
27872         else
27873           ld_shlibs_CXX=no
27874         fi
27875         ;;
27876
27877       chorus*)
27878         case $cc_basename in
27879           *)
27880           # FIXME: insert proper C++ library support
27881           ld_shlibs_CXX=no
27882           ;;
27883         esac
27884         ;;
27885
27886       cygwin* | mingw* | pw32* | cegcc*)
27887         case $GXX,$cc_basename in
27888         ,cl* | no,cl*)
27889           # Native MSVC
27890           # hardcode_libdir_flag_spec is actually meaningless, as there is
27891           # no search path for DLLs.
27892           hardcode_libdir_flag_spec_CXX=' '
27893           allow_undefined_flag_CXX=unsupported
27894           always_export_symbols_CXX=yes
27895           file_list_spec_CXX='@'
27896           # Tell ltmain to make .lib files, not .a files.
27897           libext=lib
27898           # Tell ltmain to make .dll files, not .so files.
27899           shrext_cmds=".dll"
27900           # FIXME: Setting linknames here is a bad hack.
27901           archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
27902           archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
27903               $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
27904             else
27905               $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
27906             fi~
27907             $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
27908             linknames='
27909           # The linker will not automatically build a static lib if we build a DLL.
27910           # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
27911           enable_shared_with_static_runtimes_CXX=yes
27912           # Don't use ranlib
27913           old_postinstall_cmds_CXX='chmod 644 $oldlib'
27914           postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
27915             lt_tool_outputfile="@TOOL_OUTPUT@"~
27916             case $lt_outputfile in
27917               *.exe|*.EXE) ;;
27918               *)
27919                 lt_outputfile="$lt_outputfile.exe"
27920                 lt_tool_outputfile="$lt_tool_outputfile.exe"
27921                 ;;
27922             esac~
27923             func_to_tool_file "$lt_outputfile"~
27924             if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
27925               $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
27926               $RM "$lt_outputfile.manifest";
27927             fi'
27928           ;;
27929         *)
27930           # g++
27931           # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
27932           # as there is no search path for DLLs.
27933           hardcode_libdir_flag_spec_CXX='-L$libdir'
27934           export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
27935           allow_undefined_flag_CXX=unsupported
27936           always_export_symbols_CXX=no
27937           enable_shared_with_static_runtimes_CXX=yes
27938
27939           if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
27940             archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
27941             # If the export-symbols file already is a .def file (1st line
27942             # is EXPORTS), use it as is; otherwise, prepend...
27943             archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
27944               cp $export_symbols $output_objdir/$soname.def;
27945             else
27946               echo EXPORTS > $output_objdir/$soname.def;
27947               cat $export_symbols >> $output_objdir/$soname.def;
27948             fi~
27949             $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
27950           else
27951             ld_shlibs_CXX=no
27952           fi
27953           ;;
27954         esac
27955         ;;
27956       darwin* | rhapsody*)
27957
27958
27959   archive_cmds_need_lc_CXX=no
27960   hardcode_direct_CXX=no
27961   hardcode_automatic_CXX=yes
27962   hardcode_shlibpath_var_CXX=unsupported
27963   if test "$lt_cv_ld_force_load" = "yes"; then
27964     whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
27965   else
27966     whole_archive_flag_spec_CXX=''
27967   fi
27968   link_all_deplibs_CXX=yes
27969   allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
27970   case $cc_basename in
27971      ifort*) _lt_dar_can_shared=yes ;;
27972      *) _lt_dar_can_shared=$GCC ;;
27973   esac
27974   if test "$_lt_dar_can_shared" = "yes"; then
27975     output_verbose_link_cmd=func_echo_all
27976     archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
27977     module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
27978     archive_expsym_cmds_CXX="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}"
27979     module_expsym_cmds_CXX="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}"
27980        if test "$lt_cv_apple_cc_single_mod" != "yes"; then
27981       archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
27982       archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
27983     fi
27984
27985   else
27986   ld_shlibs_CXX=no
27987   fi
27988
27989         ;;
27990
27991       dgux*)
27992         case $cc_basename in
27993           ec++*)
27994             # FIXME: insert proper C++ library support
27995             ld_shlibs_CXX=no
27996             ;;
27997           ghcx*)
27998             # Green Hills C++ Compiler
27999             # FIXME: insert proper C++ library support
28000             ld_shlibs_CXX=no
28001             ;;
28002           *)
28003             # FIXME: insert proper C++ library support
28004             ld_shlibs_CXX=no
28005             ;;
28006         esac
28007         ;;
28008
28009       freebsd[12]*)
28010         # C++ shared libraries reported to be fairly broken before
28011         # switch to ELF
28012         ld_shlibs_CXX=no
28013         ;;
28014
28015       freebsd-elf*)
28016         archive_cmds_need_lc_CXX=no
28017         ;;
28018
28019       freebsd* | dragonfly*)
28020         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
28021         # conventions
28022         ld_shlibs_CXX=yes
28023         ;;
28024
28025       gnu*)
28026         ;;
28027
28028       haiku*)
28029         archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28030         link_all_deplibs_CXX=yes
28031         ;;
28032
28033       hpux9*)
28034         hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
28035         hardcode_libdir_separator_CXX=:
28036         export_dynamic_flag_spec_CXX='${wl}-E'
28037         hardcode_direct_CXX=yes
28038         hardcode_minus_L_CXX=yes # Not in the search PATH,
28039                                              # but as the default
28040                                              # location of the library.
28041
28042         case $cc_basename in
28043           CC*)
28044             # FIXME: insert proper C++ library support
28045             ld_shlibs_CXX=no
28046             ;;
28047           aCC*)
28048             archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
28049             # Commands to make compiler produce verbose output that lists
28050             # what "hidden" libraries, object files and flags are used when
28051             # linking a shared library.
28052             #
28053             # There doesn't appear to be a way to prevent this compiler from
28054             # explicitly linking system object files so we need to strip them
28055             # from the output so that they don't get included in the library
28056             # dependencies.
28057             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
28058             ;;
28059           *)
28060             if test "$GXX" = yes; then
28061               archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
28062             else
28063               # FIXME: insert proper C++ library support
28064               ld_shlibs_CXX=no
28065             fi
28066             ;;
28067         esac
28068         ;;
28069
28070       hpux10*|hpux11*)
28071         if test $with_gnu_ld = no; then
28072           hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
28073           hardcode_libdir_separator_CXX=:
28074
28075           case $host_cpu in
28076             hppa*64*|ia64*)
28077               ;;
28078             *)
28079               export_dynamic_flag_spec_CXX='${wl}-E'
28080               ;;
28081           esac
28082         fi
28083         case $host_cpu in
28084           hppa*64*|ia64*)
28085             hardcode_direct_CXX=no
28086             hardcode_shlibpath_var_CXX=no
28087             ;;
28088           *)
28089             hardcode_direct_CXX=yes
28090             hardcode_direct_absolute_CXX=yes
28091             hardcode_minus_L_CXX=yes # Not in the search PATH,
28092                                                  # but as the default
28093                                                  # location of the library.
28094             ;;
28095         esac
28096
28097         case $cc_basename in
28098           CC*)
28099             # FIXME: insert proper C++ library support
28100             ld_shlibs_CXX=no
28101             ;;
28102           aCC*)
28103             case $host_cpu in
28104               hppa*64*)
28105                 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28106                 ;;
28107               ia64*)
28108                 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28109                 ;;
28110               *)
28111                 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28112                 ;;
28113             esac
28114             # Commands to make compiler produce verbose output that lists
28115             # what "hidden" libraries, object files and flags are used when
28116             # linking a shared library.
28117             #
28118             # There doesn't appear to be a way to prevent this compiler from
28119             # explicitly linking system object files so we need to strip them
28120             # from the output so that they don't get included in the library
28121             # dependencies.
28122             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
28123             ;;
28124           *)
28125             if test "$GXX" = yes; then
28126               if test $with_gnu_ld = no; then
28127                 case $host_cpu in
28128                   hppa*64*)
28129                     archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28130                     ;;
28131                   ia64*)
28132                     archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28133                     ;;
28134                   *)
28135                     archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28136                     ;;
28137                 esac
28138               fi
28139             else
28140               # FIXME: insert proper C++ library support
28141               ld_shlibs_CXX=no
28142             fi
28143             ;;
28144         esac
28145         ;;
28146
28147       interix[3-9]*)
28148         hardcode_direct_CXX=no
28149         hardcode_shlibpath_var_CXX=no
28150         hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28151         export_dynamic_flag_spec_CXX='${wl}-E'
28152         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
28153         # Instead, shared libraries are loaded at an image base (0x10000000 by
28154         # default) and relocated if they conflict, which is a slow very memory
28155         # consuming and fragmenting process.  To avoid this, we pick a random,
28156         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
28157         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
28158         archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
28159         archive_expsym_cmds_CXX='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'
28160         ;;
28161       irix5* | irix6*)
28162         case $cc_basename in
28163           CC*)
28164             # SGI C++
28165             archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
28166
28167             # Archives containing C++ object files must be created using
28168             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
28169             # necessary to make sure instantiated templates are included
28170             # in the archive.
28171             old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
28172             ;;
28173           *)
28174             if test "$GXX" = yes; then
28175               if test "$with_gnu_ld" = no; then
28176                 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $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'
28177               else
28178                 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
28179               fi
28180             fi
28181             link_all_deplibs_CXX=yes
28182             ;;
28183         esac
28184         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
28185         hardcode_libdir_separator_CXX=:
28186         inherit_rpath_CXX=yes
28187         ;;
28188
28189       linux* | k*bsd*-gnu | kopensolaris*-gnu)
28190         case $cc_basename in
28191           KCC*)
28192             # Kuck and Associates, Inc. (KAI) C++ Compiler
28193
28194             # KCC will only create a shared library if the output file
28195             # ends with ".so" (or ".sl" for HP-UX), so rename the library
28196             # to its proper name (with version) after linking.
28197             archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
28198             archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
28199             # Commands to make compiler produce verbose output that lists
28200             # what "hidden" libraries, object files and flags are used when
28201             # linking a shared library.
28202             #
28203             # There doesn't appear to be a way to prevent this compiler from
28204             # explicitly linking system object files so we need to strip them
28205             # from the output so that they don't get included in the library
28206             # dependencies.
28207             output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
28208
28209             hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28210             export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
28211
28212             # Archives containing C++ object files must be created using
28213             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
28214             old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
28215             ;;
28216           icpc* | ecpc* )
28217             # Intel C++
28218             with_gnu_ld=yes
28219             # version 8.0 and above of icpc choke on multiply defined symbols
28220             # if we add $predep_objects and $postdep_objects, however 7.1 and
28221             # earlier do not add the objects themselves.
28222             case `$CC -V 2>&1` in
28223               *"Version 7."*)
28224                 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
28225                 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
28226                 ;;
28227               *)  # Version 8.0 or newer
28228                 tmp_idyn=
28229                 case $host_cpu in
28230                   ia64*) tmp_idyn=' -i_dynamic';;
28231                 esac
28232                 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28233                 archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
28234                 ;;
28235             esac
28236             archive_cmds_need_lc_CXX=no
28237             hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28238             export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
28239             whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
28240             ;;
28241           pgCC* | pgcpp*)
28242             # Portland Group C++ compiler
28243             case `$CC -V` in
28244             *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
28245               prelink_cmds_CXX='tpldir=Template.dir~
28246                 rm -rf $tpldir~
28247                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
28248                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
28249               old_archive_cmds_CXX='tpldir=Template.dir~
28250                 rm -rf $tpldir~
28251                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
28252                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
28253                 $RANLIB $oldlib'
28254               archive_cmds_CXX='tpldir=Template.dir~
28255                 rm -rf $tpldir~
28256                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
28257                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
28258               archive_expsym_cmds_CXX='tpldir=Template.dir~
28259                 rm -rf $tpldir~
28260                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
28261                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
28262               ;;
28263             *) # Version 6 and above use weak symbols
28264               archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
28265               archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
28266               ;;
28267             esac
28268
28269             hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
28270             export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
28271             whole_archive_flag_spec_CXX='${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'
28272             ;;
28273           cxx*)
28274             # Compaq C++
28275             archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
28276             archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
28277
28278             runpath_var=LD_RUN_PATH
28279             hardcode_libdir_flag_spec_CXX='-rpath $libdir'
28280             hardcode_libdir_separator_CXX=:
28281
28282             # Commands to make compiler produce verbose output that lists
28283             # what "hidden" libraries, object files and flags are used when
28284             # linking a shared library.
28285             #
28286             # There doesn't appear to be a way to prevent this compiler from
28287             # explicitly linking system object files so we need to strip them
28288             # from the output so that they don't get included in the library
28289             # dependencies.
28290             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
28291             ;;
28292           xl* | mpixl* | bgxl*)
28293             # IBM XL 8.0 on PPC, with GNU ld
28294             hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
28295             export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
28296             archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28297             if test "x$supports_anon_versioning" = xyes; then
28298               archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
28299                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
28300                 echo "local: *; };" >> $output_objdir/$libname.ver~
28301                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
28302             fi
28303             ;;
28304           *)
28305             case `$CC -V 2>&1 | sed 5q` in
28306             *Sun\ C*)
28307               # Sun C++ 5.9
28308               no_undefined_flag_CXX=' -zdefs'
28309               archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28310               archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
28311               hardcode_libdir_flag_spec_CXX='-R$libdir'
28312               whole_archive_flag_spec_CXX='${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'
28313               compiler_needs_object_CXX=yes
28314
28315               # Not sure whether something based on
28316               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
28317               # would be better.
28318               output_verbose_link_cmd='func_echo_all'
28319
28320               # Archives containing C++ object files must be created using
28321               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
28322               # necessary to make sure instantiated templates are included
28323               # in the archive.
28324               old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
28325               ;;
28326             esac
28327             ;;
28328         esac
28329         ;;
28330
28331       lynxos*)
28332         # FIXME: insert proper C++ library support
28333         ld_shlibs_CXX=no
28334         ;;
28335
28336       m88k*)
28337         # FIXME: insert proper C++ library support
28338         ld_shlibs_CXX=no
28339         ;;
28340
28341       mvs*)
28342         case $cc_basename in
28343           cxx*)
28344             # FIXME: insert proper C++ library support
28345             ld_shlibs_CXX=no
28346             ;;
28347           *)
28348             # FIXME: insert proper C++ library support
28349             ld_shlibs_CXX=no
28350             ;;
28351         esac
28352         ;;
28353
28354       netbsd*)
28355         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
28356           archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
28357           wlarc=
28358           hardcode_libdir_flag_spec_CXX='-R$libdir'
28359           hardcode_direct_CXX=yes
28360           hardcode_shlibpath_var_CXX=no
28361         fi
28362         # Workaround some broken pre-1.5 toolchains
28363         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
28364         ;;
28365
28366       *nto* | *qnx*)
28367         ld_shlibs_CXX=yes
28368         ;;
28369
28370       openbsd2*)
28371         # C++ shared libraries are fairly broken
28372         ld_shlibs_CXX=no
28373         ;;
28374
28375       openbsd*)
28376         if test -f /usr/libexec/ld.so; then
28377           hardcode_direct_CXX=yes
28378           hardcode_shlibpath_var_CXX=no
28379           hardcode_direct_absolute_CXX=yes
28380           archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
28381           hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28382           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
28383             archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
28384             export_dynamic_flag_spec_CXX='${wl}-E'
28385             whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
28386           fi
28387           output_verbose_link_cmd=func_echo_all
28388         else
28389           ld_shlibs_CXX=no
28390         fi
28391         ;;
28392
28393       osf3* | osf4* | osf5*)
28394         case $cc_basename in
28395           KCC*)
28396             # Kuck and Associates, Inc. (KAI) C++ Compiler
28397
28398             # KCC will only create a shared library if the output file
28399             # ends with ".so" (or ".sl" for HP-UX), so rename the library
28400             # to its proper name (with version) after linking.
28401             archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
28402
28403             hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28404             hardcode_libdir_separator_CXX=:
28405
28406             # Archives containing C++ object files must be created using
28407             # the KAI C++ compiler.
28408             case $host in
28409               osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
28410               *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
28411             esac
28412             ;;
28413           RCC*)
28414             # Rational C++ 2.4.1
28415             # FIXME: insert proper C++ library support
28416             ld_shlibs_CXX=no
28417             ;;
28418           cxx*)
28419             case $host in
28420               osf3*)
28421                 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
28422                 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
28423                 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
28424                 ;;
28425               *)
28426                 allow_undefined_flag_CXX=' -expect_unresolved \*'
28427                 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
28428                 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
28429                   echo "-hidden">> $lib.exp~
28430                   $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
28431                   $RM $lib.exp'
28432                 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
28433                 ;;
28434             esac
28435
28436             hardcode_libdir_separator_CXX=:
28437
28438             # Commands to make compiler produce verbose output that lists
28439             # what "hidden" libraries, object files and flags are used when
28440             # linking a shared library.
28441             #
28442             # There doesn't appear to be a way to prevent this compiler from
28443             # explicitly linking system object files so we need to strip them
28444             # from the output so that they don't get included in the library
28445             # dependencies.
28446             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
28447             ;;
28448           *)
28449             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
28450               allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
28451               case $host in
28452                 osf3*)
28453                   archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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'
28454                   ;;
28455                 *)
28456                   archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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'
28457                   ;;
28458               esac
28459
28460               hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
28461               hardcode_libdir_separator_CXX=:
28462
28463               # Commands to make compiler produce verbose output that lists
28464               # what "hidden" libraries, object files and flags are used when
28465               # linking a shared library.
28466               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
28467
28468             else
28469               # FIXME: insert proper C++ library support
28470               ld_shlibs_CXX=no
28471             fi
28472             ;;
28473         esac
28474         ;;
28475
28476       psos*)
28477         # FIXME: insert proper C++ library support
28478         ld_shlibs_CXX=no
28479         ;;
28480
28481       sunos4*)
28482         case $cc_basename in
28483           CC*)
28484             # Sun C++ 4.x
28485             # FIXME: insert proper C++ library support
28486             ld_shlibs_CXX=no
28487             ;;
28488           lcc*)
28489             # Lucid
28490             # FIXME: insert proper C++ library support
28491             ld_shlibs_CXX=no
28492             ;;
28493           *)
28494             # FIXME: insert proper C++ library support
28495             ld_shlibs_CXX=no
28496             ;;
28497         esac
28498         ;;
28499
28500       solaris*)
28501         case $cc_basename in
28502           CC* | sunCC*)
28503             # Sun C++ 4.2, 5.x and Centerline C++
28504             archive_cmds_need_lc_CXX=yes
28505             no_undefined_flag_CXX=' -zdefs'
28506             archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28507             archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
28508               $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
28509
28510             hardcode_libdir_flag_spec_CXX='-R$libdir'
28511             hardcode_shlibpath_var_CXX=no
28512             case $host_os in
28513               solaris2.[0-5] | solaris2.[0-5].*) ;;
28514               *)
28515                 # The compiler driver will combine and reorder linker options,
28516                 # but understands `-z linker_flag'.
28517                 # Supported since Solaris 2.6 (maybe 2.5.1?)
28518                 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
28519                 ;;
28520             esac
28521             link_all_deplibs_CXX=yes
28522
28523             output_verbose_link_cmd='func_echo_all'
28524
28525             # Archives containing C++ object files must be created using
28526             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
28527             # necessary to make sure instantiated templates are included
28528             # in the archive.
28529             old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
28530             ;;
28531           gcx*)
28532             # Green Hills C++ Compiler
28533             archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
28534
28535             # The C++ compiler must be used to create the archive.
28536             old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
28537             ;;
28538           *)
28539             # GNU C++ compiler with Solaris linker
28540             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
28541               no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
28542               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
28543                 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
28544                 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
28545                   $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
28546
28547                 # Commands to make compiler produce verbose output that lists
28548                 # what "hidden" libraries, object files and flags are used when
28549                 # linking a shared library.
28550                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
28551               else
28552                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
28553                 # platform.
28554                 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
28555                 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
28556                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
28557
28558                 # Commands to make compiler produce verbose output that lists
28559                 # what "hidden" libraries, object files and flags are used when
28560                 # linking a shared library.
28561                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
28562               fi
28563
28564               hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
28565               case $host_os in
28566                 solaris2.[0-5] | solaris2.[0-5].*) ;;
28567                 *)
28568                   whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
28569                   ;;
28570               esac
28571             fi
28572             ;;
28573         esac
28574         ;;
28575
28576     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
28577       no_undefined_flag_CXX='${wl}-z,text'
28578       archive_cmds_need_lc_CXX=no
28579       hardcode_shlibpath_var_CXX=no
28580       runpath_var='LD_RUN_PATH'
28581
28582       case $cc_basename in
28583         CC*)
28584           archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28585           archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28586           ;;
28587         *)
28588           archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28589           archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28590           ;;
28591       esac
28592       ;;
28593
28594       sysv5* | sco3.2v5* | sco5v6*)
28595         # Note: We can NOT use -z defs as we might desire, because we do not
28596         # link with -lc, and that would cause any symbols used from libc to
28597         # always be unresolved, which means just about no library would
28598         # ever link correctly.  If we're not using GNU ld we use -z text
28599         # though, which does catch some bad symbols but isn't as heavy-handed
28600         # as -z defs.
28601         no_undefined_flag_CXX='${wl}-z,text'
28602         allow_undefined_flag_CXX='${wl}-z,nodefs'
28603         archive_cmds_need_lc_CXX=no
28604         hardcode_shlibpath_var_CXX=no
28605         hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
28606         hardcode_libdir_separator_CXX=':'
28607         link_all_deplibs_CXX=yes
28608         export_dynamic_flag_spec_CXX='${wl}-Bexport'
28609         runpath_var='LD_RUN_PATH'
28610
28611         case $cc_basename in
28612           CC*)
28613             archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28614             archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28615             old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
28616               '"$old_archive_cmds_CXX"
28617             reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
28618               '"$reload_cmds_CXX"
28619             ;;
28620           *)
28621             archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28622             archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28623             ;;
28624         esac
28625       ;;
28626
28627       tandem*)
28628         case $cc_basename in
28629           NCC*)
28630             # NonStop-UX NCC 3.20
28631             # FIXME: insert proper C++ library support
28632             ld_shlibs_CXX=no
28633             ;;
28634           *)
28635             # FIXME: insert proper C++ library support
28636             ld_shlibs_CXX=no
28637             ;;
28638         esac
28639         ;;
28640
28641       vxworks*)
28642         # FIXME: insert proper C++ library support
28643         ld_shlibs_CXX=no
28644         ;;
28645
28646       *)
28647         # FIXME: insert proper C++ library support
28648         ld_shlibs_CXX=no
28649         ;;
28650     esac
28651
28652     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
28653 $as_echo "$ld_shlibs_CXX" >&6; }
28654     test "$ld_shlibs_CXX" = no && can_build_shared=no
28655
28656     GCC_CXX="$GXX"
28657     LD_CXX="$LD"
28658
28659     ## CAVEAT EMPTOR:
28660     ## There is no encapsulation within the following macros, do not change
28661     ## the running order or otherwise move them around unless you know exactly
28662     ## what you are doing...
28663     # Dependencies to place before and after the object being linked:
28664 predep_objects_CXX=
28665 postdep_objects_CXX=
28666 predeps_CXX=
28667 postdeps_CXX=
28668 compiler_lib_search_path_CXX=
28669
28670 cat > conftest.$ac_ext <<_LT_EOF
28671 class Foo
28672 {
28673 public:
28674   Foo (void) { a = 0; }
28675 private:
28676   int a;
28677 };
28678 _LT_EOF
28679
28680
28681 _lt_libdeps_save_CFLAGS=$CFLAGS
28682 case "$CC $CFLAGS " in #(
28683 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
28684 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
28685 esac
28686
28687 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
28688   (eval $ac_compile) 2>&5
28689   ac_status=$?
28690   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28691   test $ac_status = 0; }; then
28692   # Parse the compiler output and extract the necessary
28693   # objects, libraries and library flags.
28694
28695   # Sentinel used to keep track of whether or not we are before
28696   # the conftest object file.
28697   pre_test_object_deps_done=no
28698
28699   for p in `eval "$output_verbose_link_cmd"`; do
28700     case ${prev}${p} in
28701
28702     -L* | -R* | -l*)
28703        # Some compilers place space between "-{L,R}" and the path.
28704        # Remove the space.
28705        if test $p = "-L" ||
28706           test $p = "-R"; then
28707          prev=$p
28708          continue
28709        fi
28710
28711        # Expand the sysroot to ease extracting the directories later.
28712        if test -z "$prev"; then
28713          case $p in
28714          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
28715          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
28716          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
28717          esac
28718        fi
28719        case $p in
28720        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
28721        esac
28722        if test "$pre_test_object_deps_done" = no; then
28723          case ${prev} in
28724          -L | -R)
28725            # Internal compiler library paths should come after those
28726            # provided the user.  The postdeps already come after the
28727            # user supplied libs so there is no need to process them.
28728            if test -z "$compiler_lib_search_path_CXX"; then
28729              compiler_lib_search_path_CXX="${prev}${p}"
28730            else
28731              compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
28732            fi
28733            ;;
28734          # The "-l" case would never come before the object being
28735          # linked, so don't bother handling this case.
28736          esac
28737        else
28738          if test -z "$postdeps_CXX"; then
28739            postdeps_CXX="${prev}${p}"
28740          else
28741            postdeps_CXX="${postdeps_CXX} ${prev}${p}"
28742          fi
28743        fi
28744        prev=
28745        ;;
28746
28747     *.lto.$objext) ;; # Ignore GCC LTO objects
28748     *.$objext)
28749        # This assumes that the test object file only shows up
28750        # once in the compiler output.
28751        if test "$p" = "conftest.$objext"; then
28752          pre_test_object_deps_done=yes
28753          continue
28754        fi
28755
28756        if test "$pre_test_object_deps_done" = no; then
28757          if test -z "$predep_objects_CXX"; then
28758            predep_objects_CXX="$p"
28759          else
28760            predep_objects_CXX="$predep_objects_CXX $p"
28761          fi
28762        else
28763          if test -z "$postdep_objects_CXX"; then
28764            postdep_objects_CXX="$p"
28765          else
28766            postdep_objects_CXX="$postdep_objects_CXX $p"
28767          fi
28768        fi
28769        ;;
28770
28771     *) ;; # Ignore the rest.
28772
28773     esac
28774   done
28775
28776   # Clean up.
28777   rm -f a.out a.exe
28778 else
28779   echo "libtool.m4: error: problem compiling CXX test program"
28780 fi
28781
28782 $RM -f confest.$objext
28783 CFLAGS=$_lt_libdeps_save_CFLAGS
28784
28785 # PORTME: override above test on systems where it is broken
28786 case $host_os in
28787 interix[3-9]*)
28788   # Interix 3.5 installs completely hosed .la files for C++, so rather than
28789   # hack all around it, let's just trust "g++" to DTRT.
28790   predep_objects_CXX=
28791   postdep_objects_CXX=
28792   postdeps_CXX=
28793   ;;
28794
28795 linux*)
28796   case `$CC -V 2>&1 | sed 5q` in
28797   *Sun\ C*)
28798     # Sun C++ 5.9
28799
28800     # The more standards-conforming stlport4 library is
28801     # incompatible with the Cstd library. Avoid specifying
28802     # it if it's in CXXFLAGS. Ignore libCrun as
28803     # -library=stlport4 depends on it.
28804     case " $CXX $CXXFLAGS " in
28805     *" -library=stlport4 "*)
28806       solaris_use_stlport4=yes
28807       ;;
28808     esac
28809
28810     if test "$solaris_use_stlport4" != yes; then
28811       postdeps_CXX='-library=Cstd -library=Crun'
28812     fi
28813     ;;
28814   esac
28815   ;;
28816
28817 solaris*)
28818   case $cc_basename in
28819   CC* | sunCC*)
28820     # The more standards-conforming stlport4 library is
28821     # incompatible with the Cstd library. Avoid specifying
28822     # it if it's in CXXFLAGS. Ignore libCrun as
28823     # -library=stlport4 depends on it.
28824     case " $CXX $CXXFLAGS " in
28825     *" -library=stlport4 "*)
28826       solaris_use_stlport4=yes
28827       ;;
28828     esac
28829
28830     # Adding this requires a known-good setup of shared libraries for
28831     # Sun compiler versions before 5.6, else PIC objects from an old
28832     # archive will be linked into the output, leading to subtle bugs.
28833     if test "$solaris_use_stlport4" != yes; then
28834       postdeps_CXX='-library=Cstd -library=Crun'
28835     fi
28836     ;;
28837   esac
28838   ;;
28839 esac
28840
28841
28842 case " $postdeps_CXX " in
28843 *" -lc "*) archive_cmds_need_lc_CXX=no ;;
28844 esac
28845  compiler_lib_search_dirs_CXX=
28846 if test -n "${compiler_lib_search_path_CXX}"; then
28847  compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
28848 fi
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880     lt_prog_compiler_wl_CXX=
28881 lt_prog_compiler_pic_CXX=
28882 lt_prog_compiler_static_CXX=
28883
28884
28885   # C++ specific cases for pic, static, wl, etc.
28886   if test "$GXX" = yes; then
28887     lt_prog_compiler_wl_CXX='-Wl,'
28888     lt_prog_compiler_static_CXX='-static'
28889
28890     case $host_os in
28891     aix*)
28892       # All AIX code is PIC.
28893       if test "$host_cpu" = ia64; then
28894         # AIX 5 now supports IA64 processor
28895         lt_prog_compiler_static_CXX='-Bstatic'
28896       fi
28897       ;;
28898
28899     amigaos*)
28900       case $host_cpu in
28901       powerpc)
28902             # see comment about AmigaOS4 .so support
28903             lt_prog_compiler_pic_CXX='-fPIC'
28904         ;;
28905       m68k)
28906             # FIXME: we need at least 68020 code to build shared libraries, but
28907             # adding the `-m68020' flag to GCC prevents building anything better,
28908             # like `-m68040'.
28909             lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
28910         ;;
28911       esac
28912       ;;
28913
28914     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
28915       # PIC is the default for these OSes.
28916       ;;
28917     mingw* | cygwin* | os2* | pw32* | cegcc*)
28918       # This hack is so that the source file can tell whether it is being
28919       # built for inclusion in a dll (and should export symbols for example).
28920       # Although the cygwin gcc ignores -fPIC, still need this for old-style
28921       # (--disable-auto-import) libraries
28922       lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
28923       ;;
28924     darwin* | rhapsody*)
28925       # PIC is the default on this platform
28926       # Common symbols not allowed in MH_DYLIB files
28927       lt_prog_compiler_pic_CXX='-fno-common'
28928       ;;
28929     *djgpp*)
28930       # DJGPP does not support shared libraries at all
28931       lt_prog_compiler_pic_CXX=
28932       ;;
28933     haiku*)
28934       # PIC is the default for Haiku.
28935       # The "-static" flag exists, but is broken.
28936       lt_prog_compiler_static_CXX=
28937       ;;
28938     interix[3-9]*)
28939       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
28940       # Instead, we relocate shared libraries at runtime.
28941       ;;
28942     sysv4*MP*)
28943       if test -d /usr/nec; then
28944         lt_prog_compiler_pic_CXX=-Kconform_pic
28945       fi
28946       ;;
28947     hpux*)
28948       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
28949       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
28950       # sets the default TLS model and affects inlining.
28951       case $host_cpu in
28952       hppa*64*)
28953         ;;
28954       *)
28955         lt_prog_compiler_pic_CXX='-fPIC'
28956         ;;
28957       esac
28958       ;;
28959     *qnx* | *nto*)
28960       # QNX uses GNU C++, but need to define -shared option too, otherwise
28961       # it will coredump.
28962       lt_prog_compiler_pic_CXX='-fPIC -shared'
28963       ;;
28964     *)
28965       lt_prog_compiler_pic_CXX='-fPIC'
28966       ;;
28967     esac
28968   else
28969     case $host_os in
28970       aix[4-9]*)
28971         # All AIX code is PIC.
28972         if test "$host_cpu" = ia64; then
28973           # AIX 5 now supports IA64 processor
28974           lt_prog_compiler_static_CXX='-Bstatic'
28975         else
28976           lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
28977         fi
28978         ;;
28979       chorus*)
28980         case $cc_basename in
28981         cxch68*)
28982           # Green Hills C++ Compiler
28983           # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
28984           ;;
28985         esac
28986         ;;
28987       mingw* | cygwin* | os2* | pw32* | cegcc*)
28988         # This hack is so that the source file can tell whether it is being
28989         # built for inclusion in a dll (and should export symbols for example).
28990         lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
28991         ;;
28992       dgux*)
28993         case $cc_basename in
28994           ec++*)
28995             lt_prog_compiler_pic_CXX='-KPIC'
28996             ;;
28997           ghcx*)
28998             # Green Hills C++ Compiler
28999             lt_prog_compiler_pic_CXX='-pic'
29000             ;;
29001           *)
29002             ;;
29003         esac
29004         ;;
29005       freebsd* | dragonfly*)
29006         # FreeBSD uses GNU C++
29007         ;;
29008       hpux9* | hpux10* | hpux11*)
29009         case $cc_basename in
29010           CC*)
29011             lt_prog_compiler_wl_CXX='-Wl,'
29012             lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
29013             if test "$host_cpu" != ia64; then
29014               lt_prog_compiler_pic_CXX='+Z'
29015             fi
29016             ;;
29017           aCC*)
29018             lt_prog_compiler_wl_CXX='-Wl,'
29019             lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
29020             case $host_cpu in
29021             hppa*64*|ia64*)
29022               # +Z the default
29023               ;;
29024             *)
29025               lt_prog_compiler_pic_CXX='+Z'
29026               ;;
29027             esac
29028             ;;
29029           *)
29030             ;;
29031         esac
29032         ;;
29033       interix*)
29034         # This is c89, which is MS Visual C++ (no shared libs)
29035         # Anyone wants to do a port?
29036         ;;
29037       irix5* | irix6* | nonstopux*)
29038         case $cc_basename in
29039           CC*)
29040             lt_prog_compiler_wl_CXX='-Wl,'
29041             lt_prog_compiler_static_CXX='-non_shared'
29042             # CC pic flag -KPIC is the default.
29043             ;;
29044           *)
29045             ;;
29046         esac
29047         ;;
29048       linux* | k*bsd*-gnu | kopensolaris*-gnu)
29049         case $cc_basename in
29050           KCC*)
29051             # KAI C++ Compiler
29052             lt_prog_compiler_wl_CXX='--backend -Wl,'
29053             lt_prog_compiler_pic_CXX='-fPIC'
29054             ;;
29055           ecpc* )
29056             # old Intel C++ for x86_64 which still supported -KPIC.
29057             lt_prog_compiler_wl_CXX='-Wl,'
29058             lt_prog_compiler_pic_CXX='-KPIC'
29059             lt_prog_compiler_static_CXX='-static'
29060             ;;
29061           icpc* )
29062             # Intel C++, used to be incompatible with GCC.
29063             # ICC 10 doesn't accept -KPIC any more.
29064             lt_prog_compiler_wl_CXX='-Wl,'
29065             lt_prog_compiler_pic_CXX='-fPIC'
29066             lt_prog_compiler_static_CXX='-static'
29067             ;;
29068           pgCC* | pgcpp*)
29069             # Portland Group C++ compiler
29070             lt_prog_compiler_wl_CXX='-Wl,'
29071             lt_prog_compiler_pic_CXX='-fpic'
29072             lt_prog_compiler_static_CXX='-Bstatic'
29073             ;;
29074           cxx*)
29075             # Compaq C++
29076             # Make sure the PIC flag is empty.  It appears that all Alpha
29077             # Linux and Compaq Tru64 Unix objects are PIC.
29078             lt_prog_compiler_pic_CXX=
29079             lt_prog_compiler_static_CXX='-non_shared'
29080             ;;
29081           xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
29082             # IBM XL 8.0, 9.0 on PPC and BlueGene
29083             lt_prog_compiler_wl_CXX='-Wl,'
29084             lt_prog_compiler_pic_CXX='-qpic'
29085             lt_prog_compiler_static_CXX='-qstaticlink'
29086             ;;
29087           *)
29088             case `$CC -V 2>&1 | sed 5q` in
29089             *Sun\ C*)
29090               # Sun C++ 5.9
29091               lt_prog_compiler_pic_CXX='-KPIC'
29092               lt_prog_compiler_static_CXX='-Bstatic'
29093               lt_prog_compiler_wl_CXX='-Qoption ld '
29094               ;;
29095             esac
29096             ;;
29097         esac
29098         ;;
29099       lynxos*)
29100         ;;
29101       m88k*)
29102         ;;
29103       mvs*)
29104         case $cc_basename in
29105           cxx*)
29106             lt_prog_compiler_pic_CXX='-W c,exportall'
29107             ;;
29108           *)
29109             ;;
29110         esac
29111         ;;
29112       netbsd*)
29113         ;;
29114       *qnx* | *nto*)
29115         # QNX uses GNU C++, but need to define -shared option too, otherwise
29116         # it will coredump.
29117         lt_prog_compiler_pic_CXX='-fPIC -shared'
29118         ;;
29119       osf3* | osf4* | osf5*)
29120         case $cc_basename in
29121           KCC*)
29122             lt_prog_compiler_wl_CXX='--backend -Wl,'
29123             ;;
29124           RCC*)
29125             # Rational C++ 2.4.1
29126             lt_prog_compiler_pic_CXX='-pic'
29127             ;;
29128           cxx*)
29129             # Digital/Compaq C++
29130             lt_prog_compiler_wl_CXX='-Wl,'
29131             # Make sure the PIC flag is empty.  It appears that all Alpha
29132             # Linux and Compaq Tru64 Unix objects are PIC.
29133             lt_prog_compiler_pic_CXX=
29134             lt_prog_compiler_static_CXX='-non_shared'
29135             ;;
29136           *)
29137             ;;
29138         esac
29139         ;;
29140       psos*)
29141         ;;
29142       solaris*)
29143         case $cc_basename in
29144           CC* | sunCC*)
29145             # Sun C++ 4.2, 5.x and Centerline C++
29146             lt_prog_compiler_pic_CXX='-KPIC'
29147             lt_prog_compiler_static_CXX='-Bstatic'
29148             lt_prog_compiler_wl_CXX='-Qoption ld '
29149             ;;
29150           gcx*)
29151             # Green Hills C++ Compiler
29152             lt_prog_compiler_pic_CXX='-PIC'
29153             ;;
29154           *)
29155             ;;
29156         esac
29157         ;;
29158       sunos4*)
29159         case $cc_basename in
29160           CC*)
29161             # Sun C++ 4.x
29162             lt_prog_compiler_pic_CXX='-pic'
29163             lt_prog_compiler_static_CXX='-Bstatic'
29164             ;;
29165           lcc*)
29166             # Lucid
29167             lt_prog_compiler_pic_CXX='-pic'
29168             ;;
29169           *)
29170             ;;
29171         esac
29172         ;;
29173       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
29174         case $cc_basename in
29175           CC*)
29176             lt_prog_compiler_wl_CXX='-Wl,'
29177             lt_prog_compiler_pic_CXX='-KPIC'
29178             lt_prog_compiler_static_CXX='-Bstatic'
29179             ;;
29180         esac
29181         ;;
29182       tandem*)
29183         case $cc_basename in
29184           NCC*)
29185             # NonStop-UX NCC 3.20
29186             lt_prog_compiler_pic_CXX='-KPIC'
29187             ;;
29188           *)
29189             ;;
29190         esac
29191         ;;
29192       vxworks*)
29193         ;;
29194       *)
29195         lt_prog_compiler_can_build_shared_CXX=no
29196         ;;
29197     esac
29198   fi
29199
29200 case $host_os in
29201   # For platforms which do not support PIC, -DPIC is meaningless:
29202   *djgpp*)
29203     lt_prog_compiler_pic_CXX=
29204     ;;
29205   *)
29206     lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
29207     ;;
29208 esac
29209
29210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
29211 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
29212 if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
29213   $as_echo_n "(cached) " >&6
29214 else
29215   lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
29216 fi
29217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
29218 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
29219 lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
29220
29221 #
29222 # Check to make sure the PIC flag actually works.
29223 #
29224 if test -n "$lt_prog_compiler_pic_CXX"; then
29225   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
29226 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
29227 if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
29228   $as_echo_n "(cached) " >&6
29229 else
29230   lt_cv_prog_compiler_pic_works_CXX=no
29231    ac_outfile=conftest.$ac_objext
29232    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
29233    lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
29234    # Insert the option either (1) after the last *FLAGS variable, or
29235    # (2) before a word containing "conftest.", or (3) at the end.
29236    # Note that $ac_compile itself does not contain backslashes and begins
29237    # with a dollar sign (not a hyphen), so the echo should work correctly.
29238    # The option is referenced via a variable to avoid confusing sed.
29239    lt_compile=`echo "$ac_compile" | $SED \
29240    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
29241    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
29242    -e 's:$: $lt_compiler_flag:'`
29243    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
29244    (eval "$lt_compile" 2>conftest.err)
29245    ac_status=$?
29246    cat conftest.err >&5
29247    echo "$as_me:$LINENO: \$? = $ac_status" >&5
29248    if (exit $ac_status) && test -s "$ac_outfile"; then
29249      # The compiler can only warn and ignore the option if not recognized
29250      # So say no if there are warnings other than the usual output.
29251      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
29252      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
29253      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
29254        lt_cv_prog_compiler_pic_works_CXX=yes
29255      fi
29256    fi
29257    $RM conftest*
29258
29259 fi
29260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
29261 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
29262
29263 if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
29264     case $lt_prog_compiler_pic_CXX in
29265      "" | " "*) ;;
29266      *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
29267      esac
29268 else
29269     lt_prog_compiler_pic_CXX=
29270      lt_prog_compiler_can_build_shared_CXX=no
29271 fi
29272
29273 fi
29274
29275
29276
29277
29278
29279 #
29280 # Check to make sure the static flag actually works.
29281 #
29282 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
29283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
29284 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
29285 if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
29286   $as_echo_n "(cached) " >&6
29287 else
29288   lt_cv_prog_compiler_static_works_CXX=no
29289    save_LDFLAGS="$LDFLAGS"
29290    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
29291    echo "$lt_simple_link_test_code" > conftest.$ac_ext
29292    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
29293      # The linker can only warn and ignore the option if not recognized
29294      # So say no if there are warnings
29295      if test -s conftest.err; then
29296        # Append any errors to the config.log.
29297        cat conftest.err 1>&5
29298        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
29299        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
29300        if diff conftest.exp conftest.er2 >/dev/null; then
29301          lt_cv_prog_compiler_static_works_CXX=yes
29302        fi
29303      else
29304        lt_cv_prog_compiler_static_works_CXX=yes
29305      fi
29306    fi
29307    $RM -r conftest*
29308    LDFLAGS="$save_LDFLAGS"
29309
29310 fi
29311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
29312 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
29313
29314 if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
29315     :
29316 else
29317     lt_prog_compiler_static_CXX=
29318 fi
29319
29320
29321
29322
29323     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
29324 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
29325 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
29326   $as_echo_n "(cached) " >&6
29327 else
29328   lt_cv_prog_compiler_c_o_CXX=no
29329    $RM -r conftest 2>/dev/null
29330    mkdir conftest
29331    cd conftest
29332    mkdir out
29333    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
29334
29335    lt_compiler_flag="-o out/conftest2.$ac_objext"
29336    # Insert the option either (1) after the last *FLAGS variable, or
29337    # (2) before a word containing "conftest.", or (3) at the end.
29338    # Note that $ac_compile itself does not contain backslashes and begins
29339    # with a dollar sign (not a hyphen), so the echo should work correctly.
29340    lt_compile=`echo "$ac_compile" | $SED \
29341    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
29342    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
29343    -e 's:$: $lt_compiler_flag:'`
29344    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
29345    (eval "$lt_compile" 2>out/conftest.err)
29346    ac_status=$?
29347    cat out/conftest.err >&5
29348    echo "$as_me:$LINENO: \$? = $ac_status" >&5
29349    if (exit $ac_status) && test -s out/conftest2.$ac_objext
29350    then
29351      # The compiler can only warn and ignore the option if not recognized
29352      # So say no if there are warnings
29353      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
29354      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
29355      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
29356        lt_cv_prog_compiler_c_o_CXX=yes
29357      fi
29358    fi
29359    chmod u+w . 2>&5
29360    $RM conftest*
29361    # SGI C++ compiler will create directory out/ii_files/ for
29362    # template instantiation
29363    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
29364    $RM out/* && rmdir out
29365    cd ..
29366    $RM -r conftest
29367    $RM conftest*
29368
29369 fi
29370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
29371 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
29372
29373
29374
29375     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
29376 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
29377 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
29378   $as_echo_n "(cached) " >&6
29379 else
29380   lt_cv_prog_compiler_c_o_CXX=no
29381    $RM -r conftest 2>/dev/null
29382    mkdir conftest
29383    cd conftest
29384    mkdir out
29385    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
29386
29387    lt_compiler_flag="-o out/conftest2.$ac_objext"
29388    # Insert the option either (1) after the last *FLAGS variable, or
29389    # (2) before a word containing "conftest.", or (3) at the end.
29390    # Note that $ac_compile itself does not contain backslashes and begins
29391    # with a dollar sign (not a hyphen), so the echo should work correctly.
29392    lt_compile=`echo "$ac_compile" | $SED \
29393    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
29394    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
29395    -e 's:$: $lt_compiler_flag:'`
29396    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
29397    (eval "$lt_compile" 2>out/conftest.err)
29398    ac_status=$?
29399    cat out/conftest.err >&5
29400    echo "$as_me:$LINENO: \$? = $ac_status" >&5
29401    if (exit $ac_status) && test -s out/conftest2.$ac_objext
29402    then
29403      # The compiler can only warn and ignore the option if not recognized
29404      # So say no if there are warnings
29405      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
29406      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
29407      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
29408        lt_cv_prog_compiler_c_o_CXX=yes
29409      fi
29410    fi
29411    chmod u+w . 2>&5
29412    $RM conftest*
29413    # SGI C++ compiler will create directory out/ii_files/ for
29414    # template instantiation
29415    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
29416    $RM out/* && rmdir out
29417    cd ..
29418    $RM -r conftest
29419    $RM conftest*
29420
29421 fi
29422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
29423 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
29424
29425
29426
29427
29428 hard_links="nottested"
29429 if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
29430   # do not overwrite the value of need_locks provided by the user
29431   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
29432 $as_echo_n "checking if we can lock with hard links... " >&6; }
29433   hard_links=yes
29434   $RM conftest*
29435   ln conftest.a conftest.b 2>/dev/null && hard_links=no
29436   touch conftest.a
29437   ln conftest.a conftest.b 2>&5 || hard_links=no
29438   ln conftest.a conftest.b 2>/dev/null && hard_links=no
29439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
29440 $as_echo "$hard_links" >&6; }
29441   if test "$hard_links" = no; then
29442     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
29443 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
29444     need_locks=warn
29445   fi
29446 else
29447   need_locks=no
29448 fi
29449
29450
29451
29452     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
29453 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
29454
29455   export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
29456   exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
29457   case $host_os in
29458   aix[4-9]*)
29459     # If we're using GNU nm, then we don't want the "-C" option.
29460     # -C means demangle to AIX nm, but means don't demangle with GNU nm
29461     # Also, AIX nm treats weak defined symbols like other global defined
29462     # symbols, whereas GNU nm marks them as "W".
29463     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
29464       export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
29465     else
29466       export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
29467     fi
29468     ;;
29469   pw32*)
29470     export_symbols_cmds_CXX="$ltdll_cmds"
29471     ;;
29472   cygwin* | mingw* | cegcc*)
29473     case $cc_basename in
29474     cl*) ;;
29475     *)
29476       export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
29477       exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
29478       ;;
29479     esac
29480     ;;
29481   *)
29482     export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
29483     ;;
29484   esac
29485
29486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
29487 $as_echo "$ld_shlibs_CXX" >&6; }
29488 test "$ld_shlibs_CXX" = no && can_build_shared=no
29489
29490 with_gnu_ld_CXX=$with_gnu_ld
29491
29492
29493
29494
29495
29496
29497 #
29498 # Do we need to explicitly link libc?
29499 #
29500 case "x$archive_cmds_need_lc_CXX" in
29501 x|xyes)
29502   # Assume -lc should be added
29503   archive_cmds_need_lc_CXX=yes
29504
29505   if test "$enable_shared" = yes && test "$GCC" = yes; then
29506     case $archive_cmds_CXX in
29507     *'~'*)
29508       # FIXME: we may have to deal with multi-command sequences.
29509       ;;
29510     '$CC '*)
29511       # Test whether the compiler implicitly links with -lc since on some
29512       # systems, -lgcc has to come before -lc. If gcc already passes -lc
29513       # to ld, don't add -lc before -lgcc.
29514       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
29515 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
29516 if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
29517   $as_echo_n "(cached) " >&6
29518 else
29519   $RM conftest*
29520         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
29521
29522         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
29523   (eval $ac_compile) 2>&5
29524   ac_status=$?
29525   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29526   test $ac_status = 0; } 2>conftest.err; then
29527           soname=conftest
29528           lib=conftest
29529           libobjs=conftest.$ac_objext
29530           deplibs=
29531           wl=$lt_prog_compiler_wl_CXX
29532           pic_flag=$lt_prog_compiler_pic_CXX
29533           compiler_flags=-v
29534           linker_flags=-v
29535           verstring=
29536           output_objdir=.
29537           libname=conftest
29538           lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
29539           allow_undefined_flag_CXX=
29540           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
29541   (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
29542   ac_status=$?
29543   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29544   test $ac_status = 0; }
29545           then
29546             lt_cv_archive_cmds_need_lc_CXX=no
29547           else
29548             lt_cv_archive_cmds_need_lc_CXX=yes
29549           fi
29550           allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
29551         else
29552           cat conftest.err 1>&5
29553         fi
29554         $RM conftest*
29555
29556 fi
29557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
29558 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
29559       archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
29560       ;;
29561     esac
29562   fi
29563   ;;
29564 esac
29565
29566
29567
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578
29579
29580
29581
29582
29583
29584
29585
29586
29587
29588
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622
29623
29624
29625
29626
29627
29628
29629     { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
29630 $as_echo_n "checking dynamic linker characteristics... " >&6; }
29631
29632 library_names_spec=
29633 libname_spec='lib$name'
29634 soname_spec=
29635 shrext_cmds=".so"
29636 postinstall_cmds=
29637 postuninstall_cmds=
29638 finish_cmds=
29639 finish_eval=
29640 shlibpath_var=
29641 shlibpath_overrides_runpath=unknown
29642 version_type=none
29643 dynamic_linker="$host_os ld.so"
29644 sys_lib_dlsearch_path_spec="/lib /usr/lib"
29645 need_lib_prefix=unknown
29646 hardcode_into_libs=no
29647
29648 # when you set need_version to no, make sure it does not cause -set_version
29649 # flags to be left without arguments
29650 need_version=unknown
29651
29652 case $host_os in
29653 aix3*)
29654   version_type=linux
29655   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
29656   shlibpath_var=LIBPATH
29657
29658   # AIX 3 has no versioning support, so we append a major version to the name.
29659   soname_spec='${libname}${release}${shared_ext}$major'
29660   ;;
29661
29662 aix[4-9]*)
29663   version_type=linux
29664   need_lib_prefix=no
29665   need_version=no
29666   hardcode_into_libs=yes
29667   if test "$host_cpu" = ia64; then
29668     # AIX 5 supports IA64
29669     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
29670     shlibpath_var=LD_LIBRARY_PATH
29671   else
29672     # With GCC up to 2.95.x, collect2 would create an import file
29673     # for dependence libraries.  The import file would start with
29674     # the line `#! .'.  This would cause the generated library to
29675     # depend on `.', always an invalid library.  This was fixed in
29676     # development snapshots of GCC prior to 3.0.
29677     case $host_os in
29678       aix4 | aix4.[01] | aix4.[01].*)
29679       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
29680            echo ' yes '
29681            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
29682         :
29683       else
29684         can_build_shared=no
29685       fi
29686       ;;
29687     esac
29688     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
29689     # soname into executable. Probably we can add versioning support to
29690     # collect2, so additional links can be useful in future.
29691     if test "$aix_use_runtimelinking" = yes; then
29692       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
29693       # instead of lib<name>.a to let people know that these are not
29694       # typical AIX shared libraries.
29695       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29696     else
29697       # We preserve .a as extension for shared libraries through AIX4.2
29698       # and later when we are not doing run time linking.
29699       library_names_spec='${libname}${release}.a $libname.a'
29700       soname_spec='${libname}${release}${shared_ext}$major'
29701     fi
29702     shlibpath_var=LIBPATH
29703   fi
29704   ;;
29705
29706 amigaos*)
29707   case $host_cpu in
29708   powerpc)
29709     # Since July 2007 AmigaOS4 officially supports .so libraries.
29710     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
29711     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29712     ;;
29713   m68k)
29714     library_names_spec='$libname.ixlibrary $libname.a'
29715     # Create ${libname}_ixlibrary.a entries in /sys/libs.
29716     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $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'
29717     ;;
29718   esac
29719   ;;
29720
29721 beos*)
29722   library_names_spec='${libname}${shared_ext}'
29723   dynamic_linker="$host_os ld.so"
29724   shlibpath_var=LIBRARY_PATH
29725   ;;
29726
29727 bsdi[45]*)
29728   version_type=linux
29729   need_version=no
29730   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29731   soname_spec='${libname}${release}${shared_ext}$major'
29732   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
29733   shlibpath_var=LD_LIBRARY_PATH
29734   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
29735   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
29736   # the default ld.so.conf also contains /usr/contrib/lib and
29737   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
29738   # libtool to hard-code these into programs
29739   ;;
29740
29741 cygwin* | mingw* | pw32* | cegcc*)
29742   version_type=windows
29743   shrext_cmds=".dll"
29744   need_version=no
29745   need_lib_prefix=no
29746
29747   case $GCC,$cc_basename in
29748   yes,*)
29749     # gcc
29750     library_names_spec='$libname.dll.a'
29751     # DLL is installed to $(libdir)/../bin by postinstall_cmds
29752     postinstall_cmds='base_file=`basename \${file}`~
29753       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
29754       dldir=$destdir/`dirname \$dlpath`~
29755       test -d \$dldir || mkdir -p \$dldir~
29756       $install_prog $dir/$dlname \$dldir/$dlname~
29757       chmod a+x \$dldir/$dlname~
29758       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
29759         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
29760       fi'
29761     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
29762       dlpath=$dir/\$dldll~
29763        $RM \$dlpath'
29764     shlibpath_overrides_runpath=yes
29765
29766     case $host_os in
29767     cygwin*)
29768       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
29769       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
29770
29771       ;;
29772     mingw* | cegcc*)
29773       # MinGW DLLs use traditional 'lib' prefix
29774       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
29775       ;;
29776     pw32*)
29777       # pw32 DLLs use 'pw' prefix rather than 'lib'
29778       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
29779       ;;
29780     esac
29781     dynamic_linker='Win32 ld.exe'
29782     ;;
29783
29784   *,cl*)
29785     # Native MSVC
29786     libname_spec='$name'
29787     soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
29788     library_names_spec='${libname}.dll.lib'
29789
29790     case $build_os in
29791     mingw*)
29792       sys_lib_search_path_spec=
29793       lt_save_ifs=$IFS
29794       IFS=';'
29795       for lt_path in $LIB
29796       do
29797         IFS=$lt_save_ifs
29798         # Let DOS variable expansion print the short 8.3 style file name.
29799         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
29800         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
29801       done
29802       IFS=$lt_save_ifs
29803       # Convert to MSYS style.
29804       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
29805       ;;
29806     cygwin*)
29807       # Convert to unix form, then to dos form, then back to unix form
29808       # but this time dos style (no spaces!) so that the unix form looks
29809       # like /cygdrive/c/PROGRA~1:/cygdr...
29810       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
29811       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
29812       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
29813       ;;
29814     *)
29815       sys_lib_search_path_spec="$LIB"
29816       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
29817         # It is most probably a Windows format PATH.
29818         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
29819       else
29820         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
29821       fi
29822       # FIXME: find the short name or the path components, as spaces are
29823       # common. (e.g. "Program Files" -> "PROGRA~1")
29824       ;;
29825     esac
29826
29827     # DLL is installed to $(libdir)/../bin by postinstall_cmds
29828     postinstall_cmds='base_file=`basename \${file}`~
29829       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
29830       dldir=$destdir/`dirname \$dlpath`~
29831       test -d \$dldir || mkdir -p \$dldir~
29832       $install_prog $dir/$dlname \$dldir/$dlname'
29833     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
29834       dlpath=$dir/\$dldll~
29835        $RM \$dlpath'
29836     shlibpath_overrides_runpath=yes
29837     dynamic_linker='Win32 link.exe'
29838     ;;
29839
29840   *)
29841     # Assume MSVC wrapper
29842     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
29843     dynamic_linker='Win32 ld.exe'
29844     ;;
29845   esac
29846   # FIXME: first we should search . and the directory the executable is in
29847   shlibpath_var=PATH
29848   ;;
29849
29850 darwin* | rhapsody*)
29851   dynamic_linker="$host_os dyld"
29852   version_type=darwin
29853   need_lib_prefix=no
29854   need_version=no
29855   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
29856   soname_spec='${libname}${release}${major}$shared_ext'
29857   shlibpath_overrides_runpath=yes
29858   shlibpath_var=DYLD_LIBRARY_PATH
29859   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
29860
29861   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
29862   ;;
29863
29864 dgux*)
29865   version_type=linux
29866   need_lib_prefix=no
29867   need_version=no
29868   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
29869   soname_spec='${libname}${release}${shared_ext}$major'
29870   shlibpath_var=LD_LIBRARY_PATH
29871   ;;
29872
29873 freebsd1*)
29874   dynamic_linker=no
29875   ;;
29876
29877 freebsd* | dragonfly*)
29878   # DragonFly does not have aout.  When/if they implement a new
29879   # versioning mechanism, adjust this.
29880   if test -x /usr/bin/objformat; then
29881     objformat=`/usr/bin/objformat`
29882   else
29883     case $host_os in
29884     freebsd[123]*) objformat=aout ;;
29885     *) objformat=elf ;;
29886     esac
29887   fi
29888   version_type=freebsd-$objformat
29889   case $version_type in
29890     freebsd-elf*)
29891       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
29892       need_version=no
29893       need_lib_prefix=no
29894       ;;
29895     freebsd-*)
29896       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
29897       need_version=yes
29898       ;;
29899   esac
29900   shlibpath_var=LD_LIBRARY_PATH
29901   case $host_os in
29902   freebsd2*)
29903     shlibpath_overrides_runpath=yes
29904     ;;
29905   freebsd3.[01]* | freebsdelf3.[01]*)
29906     shlibpath_overrides_runpath=yes
29907     hardcode_into_libs=yes
29908     ;;
29909   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
29910   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
29911     shlibpath_overrides_runpath=no
29912     hardcode_into_libs=yes
29913     ;;
29914   *) # from 4.6 on, and DragonFly
29915     shlibpath_overrides_runpath=yes
29916     hardcode_into_libs=yes
29917     ;;
29918   esac
29919   ;;
29920
29921 gnu*)
29922   version_type=linux
29923   need_lib_prefix=no
29924   need_version=no
29925   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
29926   soname_spec='${libname}${release}${shared_ext}$major'
29927   shlibpath_var=LD_LIBRARY_PATH
29928   hardcode_into_libs=yes
29929   ;;
29930
29931 haiku*)
29932   version_type=linux
29933   need_lib_prefix=no
29934   need_version=no
29935   dynamic_linker="$host_os runtime_loader"
29936   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
29937   soname_spec='${libname}${release}${shared_ext}$major'
29938   shlibpath_var=LIBRARY_PATH
29939   shlibpath_overrides_runpath=yes
29940   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
29941   hardcode_into_libs=yes
29942   ;;
29943
29944 hpux9* | hpux10* | hpux11*)
29945   # Give a soname corresponding to the major version so that dld.sl refuses to
29946   # link against other versions.
29947   version_type=sunos
29948   need_lib_prefix=no
29949   need_version=no
29950   case $host_cpu in
29951   ia64*)
29952     shrext_cmds='.so'
29953     hardcode_into_libs=yes
29954     dynamic_linker="$host_os dld.so"
29955     shlibpath_var=LD_LIBRARY_PATH
29956     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
29957     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29958     soname_spec='${libname}${release}${shared_ext}$major'
29959     if test "X$HPUX_IA64_MODE" = X32; then
29960       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
29961     else
29962       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
29963     fi
29964     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
29965     ;;
29966   hppa*64*)
29967     shrext_cmds='.sl'
29968     hardcode_into_libs=yes
29969     dynamic_linker="$host_os dld.sl"
29970     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
29971     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
29972     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29973     soname_spec='${libname}${release}${shared_ext}$major'
29974     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
29975     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
29976     ;;
29977   *)
29978     shrext_cmds='.sl'
29979     dynamic_linker="$host_os dld.sl"
29980     shlibpath_var=SHLIB_PATH
29981     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
29982     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29983     soname_spec='${libname}${release}${shared_ext}$major'
29984     ;;
29985   esac
29986   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
29987   postinstall_cmds='chmod 555 $lib'
29988   # or fails outright, so override atomically:
29989   install_override_mode=555
29990   ;;
29991
29992 interix[3-9]*)
29993   version_type=linux
29994   need_lib_prefix=no
29995   need_version=no
29996   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
29997   soname_spec='${libname}${release}${shared_ext}$major'
29998   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
29999   shlibpath_var=LD_LIBRARY_PATH
30000   shlibpath_overrides_runpath=no
30001   hardcode_into_libs=yes
30002   ;;
30003
30004 irix5* | irix6* | nonstopux*)
30005   case $host_os in
30006     nonstopux*) version_type=nonstopux ;;
30007     *)
30008         if test "$lt_cv_prog_gnu_ld" = yes; then
30009                 version_type=linux
30010         else
30011                 version_type=irix
30012         fi ;;
30013   esac
30014   need_lib_prefix=no
30015   need_version=no
30016   soname_spec='${libname}${release}${shared_ext}$major'
30017   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
30018   case $host_os in
30019   irix5* | nonstopux*)
30020     libsuff= shlibsuff=
30021     ;;
30022   *)
30023     case $LD in # libtool.m4 will add one of these switches to LD
30024     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
30025       libsuff= shlibsuff= libmagic=32-bit;;
30026     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
30027       libsuff=32 shlibsuff=N32 libmagic=N32;;
30028     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
30029       libsuff=64 shlibsuff=64 libmagic=64-bit;;
30030     *) libsuff= shlibsuff= libmagic=never-match;;
30031     esac
30032     ;;
30033   esac
30034   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
30035   shlibpath_overrides_runpath=no
30036   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
30037   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
30038   hardcode_into_libs=yes
30039   ;;
30040
30041 # No shared lib support for Linux oldld, aout, or coff.
30042 linux*oldld* | linux*aout* | linux*coff*)
30043   dynamic_linker=no
30044   ;;
30045
30046 # This must be Linux ELF.
30047 linux* | k*bsd*-gnu | kopensolaris*-gnu)
30048   version_type=linux
30049   need_lib_prefix=no
30050   need_version=no
30051   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30052   soname_spec='${libname}${release}${shared_ext}$major'
30053   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
30054   shlibpath_var=LD_LIBRARY_PATH
30055   shlibpath_overrides_runpath=no
30056
30057   # Some binutils ld are patched to set DT_RUNPATH
30058   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
30059   $as_echo_n "(cached) " >&6
30060 else
30061   lt_cv_shlibpath_overrides_runpath=no
30062     save_LDFLAGS=$LDFLAGS
30063     save_libdir=$libdir
30064     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
30065          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
30066     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30067 /* end confdefs.h.  */
30068
30069 int
30070 main ()
30071 {
30072
30073   ;
30074   return 0;
30075 }
30076 _ACEOF
30077 if ac_fn_cxx_try_link "$LINENO"; then :
30078   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
30079   lt_cv_shlibpath_overrides_runpath=yes
30080 fi
30081 fi
30082 rm -f core conftest.err conftest.$ac_objext \
30083     conftest$ac_exeext conftest.$ac_ext
30084     LDFLAGS=$save_LDFLAGS
30085     libdir=$save_libdir
30086
30087 fi
30088
30089   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
30090
30091   # This implies no fast_install, which is unacceptable.
30092   # Some rework will be needed to allow for fast_install
30093   # before this can be enabled.
30094   hardcode_into_libs=yes
30095
30096   # Append ld.so.conf contents to the search path
30097   if test -f /etc/ld.so.conf; then
30098     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' ' '`
30099     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
30100   fi
30101
30102   # We used to test for /lib/ld.so.1 and disable shared libraries on
30103   # powerpc, because MkLinux only supported shared libraries with the
30104   # GNU dynamic linker.  Since this was broken with cross compilers,
30105   # most powerpc-linux boxes support dynamic linking these days and
30106   # people can always --disable-shared, the test was removed, and we
30107   # assume the GNU/Linux dynamic linker is in use.
30108   dynamic_linker='GNU/Linux ld.so'
30109   ;;
30110
30111 netbsd*)
30112   version_type=sunos
30113   need_lib_prefix=no
30114   need_version=no
30115   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
30116     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
30117     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
30118     dynamic_linker='NetBSD (a.out) ld.so'
30119   else
30120     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
30121     soname_spec='${libname}${release}${shared_ext}$major'
30122     dynamic_linker='NetBSD ld.elf_so'
30123   fi
30124   shlibpath_var=LD_LIBRARY_PATH
30125   shlibpath_overrides_runpath=yes
30126   hardcode_into_libs=yes
30127   ;;
30128
30129 newsos6)
30130   version_type=linux
30131   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30132   shlibpath_var=LD_LIBRARY_PATH
30133   shlibpath_overrides_runpath=yes
30134   ;;
30135
30136 *nto* | *qnx*)
30137   version_type=qnx
30138   need_lib_prefix=no
30139   need_version=no
30140   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30141   soname_spec='${libname}${release}${shared_ext}$major'
30142   shlibpath_var=LD_LIBRARY_PATH
30143   shlibpath_overrides_runpath=no
30144   hardcode_into_libs=yes
30145   dynamic_linker='ldqnx.so'
30146   ;;
30147
30148 openbsd*)
30149   version_type=sunos
30150   sys_lib_dlsearch_path_spec="/usr/lib"
30151   need_lib_prefix=no
30152   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
30153   case $host_os in
30154     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
30155     *)                          need_version=no  ;;
30156   esac
30157   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
30158   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
30159   shlibpath_var=LD_LIBRARY_PATH
30160   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
30161     case $host_os in
30162       openbsd2.[89] | openbsd2.[89].*)
30163         shlibpath_overrides_runpath=no
30164         ;;
30165       *)
30166         shlibpath_overrides_runpath=yes
30167         ;;
30168       esac
30169   else
30170     shlibpath_overrides_runpath=yes
30171   fi
30172   ;;
30173
30174 os2*)
30175   libname_spec='$name'
30176   shrext_cmds=".dll"
30177   need_lib_prefix=no
30178   library_names_spec='$libname${shared_ext} $libname.a'
30179   dynamic_linker='OS/2 ld.exe'
30180   shlibpath_var=LIBPATH
30181   ;;
30182
30183 osf3* | osf4* | osf5*)
30184   version_type=osf
30185   need_lib_prefix=no
30186   need_version=no
30187   soname_spec='${libname}${release}${shared_ext}$major'
30188   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30189   shlibpath_var=LD_LIBRARY_PATH
30190   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
30191   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
30192   ;;
30193
30194 rdos*)
30195   dynamic_linker=no
30196   ;;
30197
30198 solaris*)
30199   version_type=linux
30200   need_lib_prefix=no
30201   need_version=no
30202   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30203   soname_spec='${libname}${release}${shared_ext}$major'
30204   shlibpath_var=LD_LIBRARY_PATH
30205   shlibpath_overrides_runpath=yes
30206   hardcode_into_libs=yes
30207   # ldd complains unless libraries are executable
30208   postinstall_cmds='chmod +x $lib'
30209   ;;
30210
30211 sunos4*)
30212   version_type=sunos
30213   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
30214   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
30215   shlibpath_var=LD_LIBRARY_PATH
30216   shlibpath_overrides_runpath=yes
30217   if test "$with_gnu_ld" = yes; then
30218     need_lib_prefix=no
30219   fi
30220   need_version=yes
30221   ;;
30222
30223 sysv4 | sysv4.3*)
30224   version_type=linux
30225   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30226   soname_spec='${libname}${release}${shared_ext}$major'
30227   shlibpath_var=LD_LIBRARY_PATH
30228   case $host_vendor in
30229     sni)
30230       shlibpath_overrides_runpath=no
30231       need_lib_prefix=no
30232       runpath_var=LD_RUN_PATH
30233       ;;
30234     siemens)
30235       need_lib_prefix=no
30236       ;;
30237     motorola)
30238       need_lib_prefix=no
30239       need_version=no
30240       shlibpath_overrides_runpath=no
30241       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
30242       ;;
30243   esac
30244   ;;
30245
30246 sysv4*MP*)
30247   if test -d /usr/nec ;then
30248     version_type=linux
30249     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
30250     soname_spec='$libname${shared_ext}.$major'
30251     shlibpath_var=LD_LIBRARY_PATH
30252   fi
30253   ;;
30254
30255 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
30256   version_type=freebsd-elf
30257   need_lib_prefix=no
30258   need_version=no
30259   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
30260   soname_spec='${libname}${release}${shared_ext}$major'
30261   shlibpath_var=LD_LIBRARY_PATH
30262   shlibpath_overrides_runpath=yes
30263   hardcode_into_libs=yes
30264   if test "$with_gnu_ld" = yes; then
30265     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
30266   else
30267     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
30268     case $host_os in
30269       sco3.2v5*)
30270         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
30271         ;;
30272     esac
30273   fi
30274   sys_lib_dlsearch_path_spec='/usr/lib'
30275   ;;
30276
30277 tpf*)
30278   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
30279   version_type=linux
30280   need_lib_prefix=no
30281   need_version=no
30282   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30283   shlibpath_var=LD_LIBRARY_PATH
30284   shlibpath_overrides_runpath=no
30285   hardcode_into_libs=yes
30286   ;;
30287
30288 uts4*)
30289   version_type=linux
30290   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30291   soname_spec='${libname}${release}${shared_ext}$major'
30292   shlibpath_var=LD_LIBRARY_PATH
30293   ;;
30294
30295 *)
30296   dynamic_linker=no
30297   ;;
30298 esac
30299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
30300 $as_echo "$dynamic_linker" >&6; }
30301 test "$dynamic_linker" = no && can_build_shared=no
30302
30303 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
30304 if test "$GCC" = yes; then
30305   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
30306 fi
30307
30308 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
30309   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
30310 fi
30311 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
30312   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
30313 fi
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
30325
30326
30327
30328
30329
30330
30331
30332
30333
30334
30335
30336
30337
30338
30339
30340
30341
30342
30343
30344
30345
30346
30347
30348
30349
30350
30351
30352     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
30353 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
30354 hardcode_action_CXX=
30355 if test -n "$hardcode_libdir_flag_spec_CXX" ||
30356    test -n "$runpath_var_CXX" ||
30357    test "X$hardcode_automatic_CXX" = "Xyes" ; then
30358
30359   # We can hardcode non-existent directories.
30360   if test "$hardcode_direct_CXX" != no &&
30361      # If the only mechanism to avoid hardcoding is shlibpath_var, we
30362      # have to relink, otherwise we might link with an installed library
30363      # when we should be linking with a yet-to-be-installed one
30364      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
30365      test "$hardcode_minus_L_CXX" != no; then
30366     # Linking always hardcodes the temporary library directory.
30367     hardcode_action_CXX=relink
30368   else
30369     # We can link without hardcoding, and we can hardcode nonexisting dirs.
30370     hardcode_action_CXX=immediate
30371   fi
30372 else
30373   # We cannot hardcode anything, or else we can only hardcode existing
30374   # directories.
30375   hardcode_action_CXX=unsupported
30376 fi
30377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
30378 $as_echo "$hardcode_action_CXX" >&6; }
30379
30380 if test "$hardcode_action_CXX" = relink ||
30381    test "$inherit_rpath_CXX" = yes; then
30382   # Fast installation is not supported
30383   enable_fast_install=no
30384 elif test "$shlibpath_overrides_runpath" = yes ||
30385      test "$enable_shared" = no; then
30386   # Fast installation is not necessary
30387   enable_fast_install=needless
30388 fi
30389
30390
30391
30392
30393
30394
30395
30396   fi # test -n "$compiler"
30397
30398   CC=$lt_save_CC
30399   CFLAGS=$lt_save_CFLAGS
30400   LDCXX=$LD
30401   LD=$lt_save_LD
30402   GCC=$lt_save_GCC
30403   with_gnu_ld=$lt_save_with_gnu_ld
30404   lt_cv_path_LDCXX=$lt_cv_path_LD
30405   lt_cv_path_LD=$lt_save_path_LD
30406   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
30407   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
30408 fi # test "$_lt_caught_CXX_error" != yes
30409
30410 ac_ext=c
30411 ac_cpp='$CPP $CPPFLAGS'
30412 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30413 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30414 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30415
30416
30417
30418 gta=false
30419
30420 # Check whether --with-gtest was given.
30421 if test "${with_gtest+set}" = set; then :
30422   withval=$with_gtest; try_gtest=$withval
30423 else
30424   try_gtest=yes
30425
30426 fi
30427
30428 case "$try_gtest" in
30429  yes)
30430     # Extract the first word of "gtest-config", so it can be a program name with args.
30431 set dummy gtest-config; ac_word=$2
30432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30433 $as_echo_n "checking for $ac_word... " >&6; }
30434 if ${ac_cv_path_GTEST_CONFIG+:} false; then :
30435   $as_echo_n "(cached) " >&6
30436 else
30437   case $GTEST_CONFIG in
30438   [\\/]* | ?:[\\/]*)
30439   ac_cv_path_GTEST_CONFIG="$GTEST_CONFIG" # Let the user override the test with a path.
30440   ;;
30441   *)
30442   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30443 for as_dir in $PATH
30444 do
30445   IFS=$as_save_IFS
30446   test -z "$as_dir" && as_dir=.
30447     for ac_exec_ext in '' $ac_executable_extensions; do
30448   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30449     ac_cv_path_GTEST_CONFIG="$as_dir/$ac_word$ac_exec_ext"
30450     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30451     break 2
30452   fi
30453 done
30454   done
30455 IFS=$as_save_IFS
30456
30457   ;;
30458 esac
30459 fi
30460 GTEST_CONFIG=$ac_cv_path_GTEST_CONFIG
30461 if test -n "$GTEST_CONFIG"; then
30462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTEST_CONFIG" >&5
30463 $as_echo "$GTEST_CONFIG" >&6; }
30464 else
30465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30466 $as_echo "no" >&6; }
30467 fi
30468
30469
30470     { ac_cv_path_GTEST_CONFIG=; unset ac_cv_path_GTEST_CONFIG;}
30471     case x${GTEST_CONFIG} in
30472      x) ;;
30473      *)
30474         { $as_echo "$as_me:${as_lineno-$LINENO}: checking gtest version" >&5
30475 $as_echo_n "checking gtest version... " >&6; }
30476         gtest_version_test=`$GTEST_CONFIG --min-version=1.5 || echo toolow`
30477         case "$gtest_version_test" in
30478          toolow*)
30479             ;;
30480          *)
30481             GTEST_LDFLAGS=`$GTEST_CONFIG --ldflags`
30482             GTEST_LIBS=`$GTEST_CONFIG --libs`
30483             GTEST_CXXFLAGS=`$GTEST_CONFIG --cxxflags`
30484             GTEST_CPPFLAGS=`$GTEST_CONFIG --cppflags`
30485
30486
30487
30488
30489             gta=true
30490             ;;
30491         esac
30492         gtest_version=`$GTEST_CONFIG --version`
30493         case "$gta" in
30494          true)
30495             { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($gtest_version) ok" >&5
30496 $as_echo "($gtest_version) ok" >&6; }
30497             ;;
30498          *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($gtest_version) not ok" >&5
30499 $as_echo "($gtest_version) not ok" >&6; }
30500             ;;
30501         esac
30502         { gtest_version_test=; unset gtest_version_test;}
30503         { gtest_version=; unset gtest_version;}
30504     esac
30505 esac
30506  if $gta; then
30507   GTEST_AVAILABLE_TRUE=
30508   GTEST_AVAILABLE_FALSE='#'
30509 else
30510   GTEST_AVAILABLE_TRUE='#'
30511   GTEST_AVAILABLE_FALSE=
30512 fi
30513
30514
30515
30516
30517
30518 case "$build" in
30519  $host) cross=0 ;;
30520  *)     cross=1 ;;
30521 esac
30522
30523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to enable tests with undiagnosed problems" >&5
30524 $as_echo_n "checking if we want to enable tests with undiagnosed problems... " >&6; }
30525 # Check whether --enable-problem-tests was given.
30526 if test "${enable_problem_tests+set}" = set; then :
30527   enableval=$enable_problem_tests; sntp_ept=$enableval
30528 else
30529   sntp_ept=yes
30530
30531 fi
30532
30533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sntp_ept" >&5
30534 $as_echo "$sntp_ept" >&6; }
30535
30536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-kodDatabase" >&5
30537 $as_echo_n "checking if we can run test-kodDatabase... " >&6; }
30538 sntp_test_kodDatabase="no"
30539 case "$sntp_ept:$cross:$host" in
30540  no:0:*-apple-darwin12.6.0) ;;
30541  *) sntp_test_kodDatabase="yes" ;;
30542 esac
30543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sntp_test_kodDatabase" >&5
30544 $as_echo "$sntp_test_kodDatabase" >&6; }
30545  if test x$sntp_test_kodDatabase = xyes; then
30546   BUILD_TEST_KODDATABASE_TRUE=
30547   BUILD_TEST_KODDATABASE_FALSE='#'
30548 else
30549   BUILD_TEST_KODDATABASE_TRUE='#'
30550   BUILD_TEST_KODDATABASE_FALSE=
30551 fi
30552
30553
30554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-kodFile" >&5
30555 $as_echo_n "checking if we can run test-kodFile... " >&6; }
30556 sntp_test_kodFile="no"
30557 case "$sntp_ept:$cross:$host" in
30558  no:0:*-apple-darwin12.6.0) ;;
30559  *) sntp_test_kodFile="yes" ;;
30560 esac
30561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sntp_test_kodFile" >&5
30562 $as_echo "$sntp_test_kodFile" >&6; }
30563  if test x$sntp_test_kodFile = xyes; then
30564   BUILD_TEST_KODFILE_TRUE=
30565   BUILD_TEST_KODFILE_FALSE='#'
30566 else
30567   BUILD_TEST_KODFILE_TRUE='#'
30568   BUILD_TEST_KODFILE_FALSE=
30569 fi
30570
30571
30572
30573
30574 # All libraries should be in various LIB_* variables now.
30575 #LIBS=
30576 # Sadly not.  There is a gettext() check somewhere, and on Solaris this pulls
30577 # in -lintl -lgen, outside our "scope".
30578
30579 ac_config_files="$ac_config_files Makefile"
30580
30581 ac_config_files="$ac_config_files include/Makefile"
30582
30583 ac_config_files="$ac_config_files scripts/Makefile"
30584
30585 ac_config_files="$ac_config_files tests/Makefile"
30586
30587 ac_config_files="$ac_config_files tests/fileHandlingTest.h"
30588
30589 ac_config_files="$ac_config_files unity/Makefile"
30590
30591
30592 cat >confcache <<\_ACEOF
30593 # This file is a shell script that caches the results of configure
30594 # tests run on this system so they can be shared between configure
30595 # scripts and configure runs, see configure's option --config-cache.
30596 # It is not useful on other systems.  If it contains results you don't
30597 # want to keep, you may remove or edit it.
30598 #
30599 # config.status only pays attention to the cache file if you give it
30600 # the --recheck option to rerun configure.
30601 #
30602 # `ac_cv_env_foo' variables (set or unset) will be overridden when
30603 # loading this file, other *unset* `ac_cv_foo' will be assigned the
30604 # following values.
30605
30606 _ACEOF
30607
30608 # The following way of writing the cache mishandles newlines in values,
30609 # but we know of no workaround that is simple, portable, and efficient.
30610 # So, we kill variables containing newlines.
30611 # Ultrix sh set writes to stderr and can't be redirected directly,
30612 # and sets the high bit in the cache file unless we assign to the vars.
30613 (
30614   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
30615     eval ac_val=\$$ac_var
30616     case $ac_val in #(
30617     *${as_nl}*)
30618       case $ac_var in #(
30619       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
30620 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
30621       esac
30622       case $ac_var in #(
30623       _ | IFS | as_nl) ;; #(
30624       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
30625       *) { eval $ac_var=; unset $ac_var;} ;;
30626       esac ;;
30627     esac
30628   done
30629
30630   (set) 2>&1 |
30631     case $as_nl`(ac_space=' '; set) 2>&1` in #(
30632     *${as_nl}ac_space=\ *)
30633       # `set' does not quote correctly, so add quotes: double-quote
30634       # substitution turns \\\\ into \\, and sed turns \\ into \.
30635       sed -n \
30636         "s/'/'\\\\''/g;
30637           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
30638       ;; #(
30639     *)
30640       # `set' quotes correctly as required by POSIX, so do not add quotes.
30641       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
30642       ;;
30643     esac |
30644     sort
30645 ) |
30646   sed '
30647      /^ac_cv_env_/b end
30648      t clear
30649      :clear
30650      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
30651      t end
30652      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
30653      :end' >>confcache
30654 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
30655   if test -w "$cache_file"; then
30656     if test "x$cache_file" != "x/dev/null"; then
30657       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
30658 $as_echo "$as_me: updating cache $cache_file" >&6;}
30659       if test ! -f "$cache_file" || test -h "$cache_file"; then
30660         cat confcache >"$cache_file"
30661       else
30662         case $cache_file in #(
30663         */* | ?:*)
30664           mv -f confcache "$cache_file"$$ &&
30665           mv -f "$cache_file"$$ "$cache_file" ;; #(
30666         *)
30667           mv -f confcache "$cache_file" ;;
30668         esac
30669       fi
30670     fi
30671   else
30672     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
30673 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
30674   fi
30675 fi
30676 rm -f confcache
30677
30678 test "x$prefix" = xNONE && prefix=$ac_default_prefix
30679 # Let make expand exec_prefix.
30680 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
30681
30682 DEFS=-DHAVE_CONFIG_H
30683
30684 ac_libobjs=
30685 ac_ltlibobjs=
30686 U=
30687 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
30688   # 1. Remove the extension, and $U if already installed.
30689   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
30690   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
30691   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
30692   #    will be set to the directory where LIBOBJS objects are built.
30693   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
30694   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
30695 done
30696 LIBOBJS=$ac_libobjs
30697
30698 LTLIBOBJS=$ac_ltlibobjs
30699
30700
30701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
30702 $as_echo_n "checking that generated files are newer than configure... " >&6; }
30703    if test -n "$am_sleep_pid"; then
30704      # Hide warnings about reused PIDs.
30705      wait $am_sleep_pid 2>/dev/null
30706    fi
30707    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
30708 $as_echo "done" >&6; }
30709  if test -n "$EXEEXT"; then
30710   am__EXEEXT_TRUE=
30711   am__EXEEXT_FALSE='#'
30712 else
30713   am__EXEEXT_TRUE='#'
30714   am__EXEEXT_FALSE=
30715 fi
30716
30717 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
30718   as_fn_error $? "conditional \"AMDEP\" was never defined.
30719 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30720 fi
30721 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
30722   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
30723 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30724 fi
30725 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
30726   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
30727 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30728 fi
30729
30730 if test -z "${WANT_CALC_TICKADJ_MS_TRUE}" && test -z "${WANT_CALC_TICKADJ_MS_FALSE}"; then
30731   as_fn_error $? "conditional \"WANT_CALC_TICKADJ_MS\" was never defined.
30732 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30733 fi
30734 if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; then
30735   as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
30736 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30737 fi
30738 if test -z "${INSTALL_UPDATE_LEAP_TRUE}" && test -z "${INSTALL_UPDATE_LEAP_FALSE}"; then
30739   as_fn_error $? "conditional \"INSTALL_UPDATE_LEAP\" was never defined.
30740 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30741 fi
30742 if test -z "${NTP_CROSSCOMPILE_TRUE}" && test -z "${NTP_CROSSCOMPILE_FALSE}"; then
30743   as_fn_error $? "conditional \"NTP_CROSSCOMPILE\" was never defined.
30744 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30745 fi
30746 if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
30747   as_fn_error $? "conditional \"PTHREADS\" was never defined.
30748 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30749 fi
30750 if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then
30751   as_fn_error $? "conditional \"BUILD_SNTP\" was never defined.
30752 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30753 fi
30754 if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
30755   as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
30756 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30757 fi
30758 if test -z "${INSTALL_LIBOPTS_TRUE}" && test -z "${INSTALL_LIBOPTS_FALSE}"; then
30759   as_fn_error $? "conditional \"INSTALL_LIBOPTS\" was never defined.
30760 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30761 fi
30762 if test -z "${NEED_LIBOPTS_TRUE}" && test -z "${NEED_LIBOPTS_FALSE}"; then
30763   as_fn_error $? "conditional \"NEED_LIBOPTS\" was never defined.
30764 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30765 fi
30766 if test -z "${BUILD_LIBEVENT_TRUE}" && test -z "${BUILD_LIBEVENT_FALSE}"; then
30767   as_fn_error $? "conditional \"BUILD_LIBEVENT\" was never defined.
30768 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30769 fi
30770 if test -z "${UNITYBUILD_AVAILABLE_TRUE}" && test -z "${UNITYBUILD_AVAILABLE_FALSE}"; then
30771   as_fn_error $? "conditional \"UNITYBUILD_AVAILABLE\" was never defined.
30772 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30773 fi
30774 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
30775   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
30776 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30777 fi
30778 if test -z "${GTEST_AVAILABLE_TRUE}" && test -z "${GTEST_AVAILABLE_FALSE}"; then
30779   as_fn_error $? "conditional \"GTEST_AVAILABLE\" was never defined.
30780 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30781 fi
30782 if test -z "${BUILD_TEST_KODDATABASE_TRUE}" && test -z "${BUILD_TEST_KODDATABASE_FALSE}"; then
30783   as_fn_error $? "conditional \"BUILD_TEST_KODDATABASE\" was never defined.
30784 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30785 fi
30786 if test -z "${BUILD_TEST_KODFILE_TRUE}" && test -z "${BUILD_TEST_KODFILE_FALSE}"; then
30787   as_fn_error $? "conditional \"BUILD_TEST_KODFILE\" was never defined.
30788 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30789 fi
30790
30791 : "${CONFIG_STATUS=./config.status}"
30792 ac_write_fail=0
30793 ac_clean_files_save=$ac_clean_files
30794 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
30795 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
30796 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
30797 as_write_fail=0
30798 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
30799 #! $SHELL
30800 # Generated by $as_me.
30801 # Run this file to recreate the current configuration.
30802 # Compiler output produced by configure, useful for debugging
30803 # configure, is in config.log if it exists.
30804
30805 debug=false
30806 ac_cs_recheck=false
30807 ac_cs_silent=false
30808
30809 SHELL=\${CONFIG_SHELL-$SHELL}
30810 export SHELL
30811 _ASEOF
30812 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
30813 ## -------------------- ##
30814 ## M4sh Initialization. ##
30815 ## -------------------- ##
30816
30817 # Be more Bourne compatible
30818 DUALCASE=1; export DUALCASE # for MKS sh
30819 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
30820   emulate sh
30821   NULLCMD=:
30822   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
30823   # is contrary to our usage.  Disable this feature.
30824   alias -g '${1+"$@"}'='"$@"'
30825   setopt NO_GLOB_SUBST
30826 else
30827   case `(set -o) 2>/dev/null` in #(
30828   *posix*) :
30829     set -o posix ;; #(
30830   *) :
30831      ;;
30832 esac
30833 fi
30834
30835
30836 as_nl='
30837 '
30838 export as_nl
30839 # Printing a long string crashes Solaris 7 /usr/bin/printf.
30840 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
30841 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
30842 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
30843 # Prefer a ksh shell builtin over an external printf program on Solaris,
30844 # but without wasting forks for bash or zsh.
30845 if test -z "$BASH_VERSION$ZSH_VERSION" \
30846     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
30847   as_echo='print -r --'
30848   as_echo_n='print -rn --'
30849 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
30850   as_echo='printf %s\n'
30851   as_echo_n='printf %s'
30852 else
30853   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
30854     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
30855     as_echo_n='/usr/ucb/echo -n'
30856   else
30857     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
30858     as_echo_n_body='eval
30859       arg=$1;
30860       case $arg in #(
30861       *"$as_nl"*)
30862         expr "X$arg" : "X\\(.*\\)$as_nl";
30863         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
30864       esac;
30865       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
30866     '
30867     export as_echo_n_body
30868     as_echo_n='sh -c $as_echo_n_body as_echo'
30869   fi
30870   export as_echo_body
30871   as_echo='sh -c $as_echo_body as_echo'
30872 fi
30873
30874 # The user is always right.
30875 if test "${PATH_SEPARATOR+set}" != set; then
30876   PATH_SEPARATOR=:
30877   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
30878     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
30879       PATH_SEPARATOR=';'
30880   }
30881 fi
30882
30883
30884 # IFS
30885 # We need space, tab and new line, in precisely that order.  Quoting is
30886 # there to prevent editors from complaining about space-tab.
30887 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
30888 # splitting by setting IFS to empty value.)
30889 IFS=" ""        $as_nl"
30890
30891 # Find who we are.  Look in the path if we contain no directory separator.
30892 as_myself=
30893 case $0 in #((
30894   *[\\/]* ) as_myself=$0 ;;
30895   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30896 for as_dir in $PATH
30897 do
30898   IFS=$as_save_IFS
30899   test -z "$as_dir" && as_dir=.
30900     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
30901   done
30902 IFS=$as_save_IFS
30903
30904      ;;
30905 esac
30906 # We did not find ourselves, most probably we were run as `sh COMMAND'
30907 # in which case we are not to be found in the path.
30908 if test "x$as_myself" = x; then
30909   as_myself=$0
30910 fi
30911 if test ! -f "$as_myself"; then
30912   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
30913   exit 1
30914 fi
30915
30916 # Unset variables that we do not need and which cause bugs (e.g. in
30917 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
30918 # suppresses any "Segmentation fault" message there.  '((' could
30919 # trigger a bug in pdksh 5.2.14.
30920 for as_var in BASH_ENV ENV MAIL MAILPATH
30921 do eval test x\${$as_var+set} = xset \
30922   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
30923 done
30924 PS1='$ '
30925 PS2='> '
30926 PS4='+ '
30927
30928 # NLS nuisances.
30929 LC_ALL=C
30930 export LC_ALL
30931 LANGUAGE=C
30932 export LANGUAGE
30933
30934 # CDPATH.
30935 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
30936
30937
30938 # as_fn_error STATUS ERROR [LINENO LOG_FD]
30939 # ----------------------------------------
30940 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
30941 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
30942 # script with STATUS, using 1 if that was 0.
30943 as_fn_error ()
30944 {
30945   as_status=$1; test $as_status -eq 0 && as_status=1
30946   if test "$4"; then
30947     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
30948     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
30949   fi
30950   $as_echo "$as_me: error: $2" >&2
30951   as_fn_exit $as_status
30952 } # as_fn_error
30953
30954
30955 # as_fn_set_status STATUS
30956 # -----------------------
30957 # Set $? to STATUS, without forking.
30958 as_fn_set_status ()
30959 {
30960   return $1
30961 } # as_fn_set_status
30962
30963 # as_fn_exit STATUS
30964 # -----------------
30965 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
30966 as_fn_exit ()
30967 {
30968   set +e
30969   as_fn_set_status $1
30970   exit $1
30971 } # as_fn_exit
30972
30973 # as_fn_unset VAR
30974 # ---------------
30975 # Portably unset VAR.
30976 as_fn_unset ()
30977 {
30978   { eval $1=; unset $1;}
30979 }
30980 as_unset=as_fn_unset
30981 # as_fn_append VAR VALUE
30982 # ----------------------
30983 # Append the text in VALUE to the end of the definition contained in VAR. Take
30984 # advantage of any shell optimizations that allow amortized linear growth over
30985 # repeated appends, instead of the typical quadratic growth present in naive
30986 # implementations.
30987 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
30988   eval 'as_fn_append ()
30989   {
30990     eval $1+=\$2
30991   }'
30992 else
30993   as_fn_append ()
30994   {
30995     eval $1=\$$1\$2
30996   }
30997 fi # as_fn_append
30998
30999 # as_fn_arith ARG...
31000 # ------------------
31001 # Perform arithmetic evaluation on the ARGs, and store the result in the
31002 # global $as_val. Take advantage of shells that can avoid forks. The arguments
31003 # must be portable across $(()) and expr.
31004 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
31005   eval 'as_fn_arith ()
31006   {
31007     as_val=$(( $* ))
31008   }'
31009 else
31010   as_fn_arith ()
31011   {
31012     as_val=`expr "$@" || test $? -eq 1`
31013   }
31014 fi # as_fn_arith
31015
31016
31017 if expr a : '\(a\)' >/dev/null 2>&1 &&
31018    test "X`expr 00001 : '.*\(...\)'`" = X001; then
31019   as_expr=expr
31020 else
31021   as_expr=false
31022 fi
31023
31024 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
31025   as_basename=basename
31026 else
31027   as_basename=false
31028 fi
31029
31030 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
31031   as_dirname=dirname
31032 else
31033   as_dirname=false
31034 fi
31035
31036 as_me=`$as_basename -- "$0" ||
31037 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31038          X"$0" : 'X\(//\)$' \| \
31039          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31040 $as_echo X/"$0" |
31041     sed '/^.*\/\([^/][^/]*\)\/*$/{
31042             s//\1/
31043             q
31044           }
31045           /^X\/\(\/\/\)$/{
31046             s//\1/
31047             q
31048           }
31049           /^X\/\(\/\).*/{
31050             s//\1/
31051             q
31052           }
31053           s/.*/./; q'`
31054
31055 # Avoid depending upon Character Ranges.
31056 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
31057 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
31058 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
31059 as_cr_digits='0123456789'
31060 as_cr_alnum=$as_cr_Letters$as_cr_digits
31061
31062 ECHO_C= ECHO_N= ECHO_T=
31063 case `echo -n x` in #(((((
31064 -n*)
31065   case `echo 'xy\c'` in
31066   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
31067   xy)  ECHO_C='\c';;
31068   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
31069        ECHO_T=' ';;
31070   esac;;
31071 *)
31072   ECHO_N='-n';;
31073 esac
31074
31075 rm -f conf$$ conf$$.exe conf$$.file
31076 if test -d conf$$.dir; then
31077   rm -f conf$$.dir/conf$$.file
31078 else
31079   rm -f conf$$.dir
31080   mkdir conf$$.dir 2>/dev/null
31081 fi
31082 if (echo >conf$$.file) 2>/dev/null; then
31083   if ln -s conf$$.file conf$$ 2>/dev/null; then
31084     as_ln_s='ln -s'
31085     # ... but there are two gotchas:
31086     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
31087     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
31088     # In both cases, we have to default to `cp -pR'.
31089     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
31090       as_ln_s='cp -pR'
31091   elif ln conf$$.file conf$$ 2>/dev/null; then
31092     as_ln_s=ln
31093   else
31094     as_ln_s='cp -pR'
31095   fi
31096 else
31097   as_ln_s='cp -pR'
31098 fi
31099 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
31100 rmdir conf$$.dir 2>/dev/null
31101
31102
31103 # as_fn_mkdir_p
31104 # -------------
31105 # Create "$as_dir" as a directory, including parents if necessary.
31106 as_fn_mkdir_p ()
31107 {
31108
31109   case $as_dir in #(
31110   -*) as_dir=./$as_dir;;
31111   esac
31112   test -d "$as_dir" || eval $as_mkdir_p || {
31113     as_dirs=
31114     while :; do
31115       case $as_dir in #(
31116       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
31117       *) as_qdir=$as_dir;;
31118       esac
31119       as_dirs="'$as_qdir' $as_dirs"
31120       as_dir=`$as_dirname -- "$as_dir" ||
31121 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31122          X"$as_dir" : 'X\(//\)[^/]' \| \
31123          X"$as_dir" : 'X\(//\)$' \| \
31124          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31125 $as_echo X"$as_dir" |
31126     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31127             s//\1/
31128             q
31129           }
31130           /^X\(\/\/\)[^/].*/{
31131             s//\1/
31132             q
31133           }
31134           /^X\(\/\/\)$/{
31135             s//\1/
31136             q
31137           }
31138           /^X\(\/\).*/{
31139             s//\1/
31140             q
31141           }
31142           s/.*/./; q'`
31143       test -d "$as_dir" && break
31144     done
31145     test -z "$as_dirs" || eval "mkdir $as_dirs"
31146   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
31147
31148
31149 } # as_fn_mkdir_p
31150 if mkdir -p . 2>/dev/null; then
31151   as_mkdir_p='mkdir -p "$as_dir"'
31152 else
31153   test -d ./-p && rmdir ./-p
31154   as_mkdir_p=false
31155 fi
31156
31157
31158 # as_fn_executable_p FILE
31159 # -----------------------
31160 # Test if FILE is an executable regular file.
31161 as_fn_executable_p ()
31162 {
31163   test -f "$1" && test -x "$1"
31164 } # as_fn_executable_p
31165 as_test_x='test -x'
31166 as_executable_p=as_fn_executable_p
31167
31168 # Sed expression to map a string onto a valid CPP name.
31169 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
31170
31171 # Sed expression to map a string onto a valid variable name.
31172 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
31173
31174
31175 exec 6>&1
31176 ## ----------------------------------- ##
31177 ## Main body of $CONFIG_STATUS script. ##
31178 ## ----------------------------------- ##
31179 _ASEOF
31180 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
31181
31182 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31183 # Save the log message, to keep $0 and so on meaningful, and to
31184 # report actual input values of CONFIG_FILES etc. instead of their
31185 # values after options handling.
31186 ac_log="
31187 This file was extended by sntp $as_me 4.2.8p8, which was
31188 generated by GNU Autoconf 2.69.  Invocation command line was
31189
31190   CONFIG_FILES    = $CONFIG_FILES
31191   CONFIG_HEADERS  = $CONFIG_HEADERS
31192   CONFIG_LINKS    = $CONFIG_LINKS
31193   CONFIG_COMMANDS = $CONFIG_COMMANDS
31194   $ $0 $@
31195
31196 on `(hostname || uname -n) 2>/dev/null | sed 1q`
31197 "
31198
31199 _ACEOF
31200
31201 case $ac_config_files in *"
31202 "*) set x $ac_config_files; shift; ac_config_files=$*;;
31203 esac
31204
31205 case $ac_config_headers in *"
31206 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
31207 esac
31208
31209
31210 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31211 # Files that config.status was made for.
31212 config_files="$ac_config_files"
31213 config_headers="$ac_config_headers"
31214 config_commands="$ac_config_commands"
31215
31216 _ACEOF
31217
31218 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31219 ac_cs_usage="\
31220 \`$as_me' instantiates files and other configuration actions
31221 from templates according to the current configuration.  Unless the files
31222 and actions are specified as TAGs, all are instantiated by default.
31223
31224 Usage: $0 [OPTION]... [TAG]...
31225
31226   -h, --help       print this help, then exit
31227   -V, --version    print version number and configuration settings, then exit
31228       --config     print configuration, then exit
31229   -q, --quiet, --silent
31230                    do not print progress messages
31231   -d, --debug      don't remove temporary files
31232       --recheck    update $as_me by reconfiguring in the same conditions
31233       --file=FILE[:TEMPLATE]
31234                    instantiate the configuration file FILE
31235       --header=FILE[:TEMPLATE]
31236                    instantiate the configuration header FILE
31237
31238 Configuration files:
31239 $config_files
31240
31241 Configuration headers:
31242 $config_headers
31243
31244 Configuration commands:
31245 $config_commands
31246
31247 Report bugs to <http://bugs.ntp.org./>.
31248 sntp home page: <http://www.ntp.org./>."
31249
31250 _ACEOF
31251 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31252 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31253 ac_cs_version="\\
31254 sntp config.status 4.2.8p8
31255 configured by $0, generated by GNU Autoconf 2.69,
31256   with options \\"\$ac_cs_config\\"
31257
31258 Copyright (C) 2012 Free Software Foundation, Inc.
31259 This config.status script is free software; the Free Software Foundation
31260 gives unlimited permission to copy, distribute and modify it."
31261
31262 ac_pwd='$ac_pwd'
31263 srcdir='$srcdir'
31264 INSTALL='$INSTALL'
31265 MKDIR_P='$MKDIR_P'
31266 AWK='$AWK'
31267 test -n "\$AWK" || AWK=awk
31268 _ACEOF
31269
31270 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31271 # The default lists apply if the user does not specify any file.
31272 ac_need_defaults=:
31273 while test $# != 0
31274 do
31275   case $1 in
31276   --*=?*)
31277     ac_option=`expr "X$1" : 'X\([^=]*\)='`
31278     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31279     ac_shift=:
31280     ;;
31281   --*=)
31282     ac_option=`expr "X$1" : 'X\([^=]*\)='`
31283     ac_optarg=
31284     ac_shift=:
31285     ;;
31286   *)
31287     ac_option=$1
31288     ac_optarg=$2
31289     ac_shift=shift
31290     ;;
31291   esac
31292
31293   case $ac_option in
31294   # Handling of the options.
31295   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31296     ac_cs_recheck=: ;;
31297   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31298     $as_echo "$ac_cs_version"; exit ;;
31299   --config | --confi | --conf | --con | --co | --c )
31300     $as_echo "$ac_cs_config"; exit ;;
31301   --debug | --debu | --deb | --de | --d | -d )
31302     debug=: ;;
31303   --file | --fil | --fi | --f )
31304     $ac_shift
31305     case $ac_optarg in
31306     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31307     '') as_fn_error $? "missing file argument" ;;
31308     esac
31309     as_fn_append CONFIG_FILES " '$ac_optarg'"
31310     ac_need_defaults=false;;
31311   --header | --heade | --head | --hea )
31312     $ac_shift
31313     case $ac_optarg in
31314     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31315     esac
31316     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31317     ac_need_defaults=false;;
31318   --he | --h)
31319     # Conflict between --help and --header
31320     as_fn_error $? "ambiguous option: \`$1'
31321 Try \`$0 --help' for more information.";;
31322   --help | --hel | -h )
31323     $as_echo "$ac_cs_usage"; exit ;;
31324   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31325   | -silent | --silent | --silen | --sile | --sil | --si | --s)
31326     ac_cs_silent=: ;;
31327
31328   # This is an error.
31329   -*) as_fn_error $? "unrecognized option: \`$1'
31330 Try \`$0 --help' for more information." ;;
31331
31332   *) as_fn_append ac_config_targets " $1"
31333      ac_need_defaults=false ;;
31334
31335   esac
31336   shift
31337 done
31338
31339 ac_configure_extra_args=
31340
31341 if $ac_cs_silent; then
31342   exec 6>/dev/null
31343   ac_configure_extra_args="$ac_configure_extra_args --silent"
31344 fi
31345
31346 _ACEOF
31347 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31348 if \$ac_cs_recheck; then
31349   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31350   shift
31351   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
31352   CONFIG_SHELL='$SHELL'
31353   export CONFIG_SHELL
31354   exec "\$@"
31355 fi
31356
31357 _ACEOF
31358 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31359 exec 5>>config.log
31360 {
31361   echo
31362   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31363 ## Running $as_me. ##
31364 _ASBOX
31365   $as_echo "$ac_log"
31366 } >&5
31367
31368 _ACEOF
31369 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31370 #
31371 # INIT-COMMANDS
31372 #
31373 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
31374
31375
31376 # The HP-UX ksh and POSIX shell print the target directory to stdout
31377 # if CDPATH is set.
31378 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31379
31380 sed_quote_subst='$sed_quote_subst'
31381 double_quote_subst='$double_quote_subst'
31382 delay_variable_subst='$delay_variable_subst'
31383 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
31384 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
31385 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
31386 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
31387 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
31388 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
31389 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
31390 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
31391 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
31392 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
31393 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
31394 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
31395 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
31396 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
31397 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
31398 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
31399 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
31400 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
31401 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
31402 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
31403 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
31404 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
31405 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
31406 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
31407 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
31408 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
31409 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
31410 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
31411 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
31412 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
31413 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
31414 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
31415 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
31416 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
31417 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
31418 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
31419 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
31420 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
31421 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
31422 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
31423 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
31424 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
31425 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
31426 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
31427 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
31428 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
31429 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
31430 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
31431 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
31432 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
31433 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
31434 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
31435 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
31436 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
31437 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
31438 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"`'
31439 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
31440 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
31441 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
31442 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
31443 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
31444 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
31445 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
31446 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
31447 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
31448 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
31449 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
31450 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
31451 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
31452 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
31453 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
31454 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
31455 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
31456 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
31457 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
31458 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
31459 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
31460 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
31461 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
31462 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
31463 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
31464 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
31465 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
31466 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
31467 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
31468 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
31469 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
31470 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
31471 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
31472 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
31473 hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
31474 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
31475 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
31476 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
31477 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
31478 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
31479 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
31480 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
31481 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
31482 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
31483 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
31484 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
31485 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
31486 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
31487 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
31488 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
31489 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
31490 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
31491 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
31492 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
31493 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
31494 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
31495 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
31496 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
31497 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
31498 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
31499 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
31500 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
31501 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
31502 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
31503 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
31504 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
31505 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
31506 sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
31507 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
31508 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
31509 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
31510 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
31511 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
31512 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
31513 compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
31514 predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
31515 postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
31516 predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
31517 postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
31518 compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
31519 LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
31520 reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
31521 reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31522 old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31523 compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
31524 GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
31525 lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
31526 lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
31527 lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
31528 lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
31529 lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
31530 archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
31531 enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
31532 export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
31533 whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
31534 compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
31535 old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31536 old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31537 archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31538 archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31539 module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31540 module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31541 with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
31542 allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
31543 no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
31544 hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
31545 hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`'
31546 hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
31547 hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
31548 hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
31549 hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
31550 hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
31551 hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
31552 inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
31553 link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
31554 always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
31555 export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31556 exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
31557 include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
31558 prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31559 postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31560 file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
31561 hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
31562 compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
31563 predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
31564 postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
31565 predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
31566 postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
31567 compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
31568
31569 LTCC='$LTCC'
31570 LTCFLAGS='$LTCFLAGS'
31571 compiler='$compiler_DEFAULT'
31572
31573 # A function that is used when there is no print builtin or printf.
31574 func_fallback_echo ()
31575 {
31576   eval 'cat <<_LTECHO_EOF
31577 \$1
31578 _LTECHO_EOF'
31579 }
31580
31581 # Quote evaled strings.
31582 for var in SED \
31583 GREP \
31584 EGREP \
31585 FGREP \
31586 SHELL \
31587 ECHO \
31588 LD \
31589 NM \
31590 LN_S \
31591 lt_SP2NL \
31592 lt_NL2SP \
31593 reload_flag \
31594 OBJDUMP \
31595 deplibs_check_method \
31596 file_magic_cmd \
31597 file_magic_glob \
31598 want_nocaseglob \
31599 DLLTOOL \
31600 sharedlib_from_linklib_cmd \
31601 AR \
31602 AR_FLAGS \
31603 archiver_list_spec \
31604 STRIP \
31605 RANLIB \
31606 CC \
31607 CFLAGS \
31608 compiler \
31609 lt_cv_sys_global_symbol_pipe \
31610 lt_cv_sys_global_symbol_to_cdecl \
31611 lt_cv_sys_global_symbol_to_c_name_address \
31612 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
31613 nm_file_list_spec \
31614 lt_prog_compiler_no_builtin_flag \
31615 lt_prog_compiler_pic \
31616 lt_prog_compiler_wl \
31617 lt_prog_compiler_static \
31618 lt_cv_prog_compiler_c_o \
31619 need_locks \
31620 MANIFEST_TOOL \
31621 DSYMUTIL \
31622 NMEDIT \
31623 LIPO \
31624 OTOOL \
31625 OTOOL64 \
31626 shrext_cmds \
31627 export_dynamic_flag_spec \
31628 whole_archive_flag_spec \
31629 compiler_needs_object \
31630 with_gnu_ld \
31631 allow_undefined_flag \
31632 no_undefined_flag \
31633 hardcode_libdir_flag_spec \
31634 hardcode_libdir_flag_spec_ld \
31635 hardcode_libdir_separator \
31636 exclude_expsyms \
31637 include_expsyms \
31638 file_list_spec \
31639 variables_saved_for_relink \
31640 libname_spec \
31641 library_names_spec \
31642 soname_spec \
31643 install_override_mode \
31644 finish_eval \
31645 old_striplib \
31646 striplib \
31647 compiler_lib_search_dirs \
31648 predep_objects \
31649 postdep_objects \
31650 predeps \
31651 postdeps \
31652 compiler_lib_search_path \
31653 LD_CXX \
31654 reload_flag_CXX \
31655 compiler_CXX \
31656 lt_prog_compiler_no_builtin_flag_CXX \
31657 lt_prog_compiler_pic_CXX \
31658 lt_prog_compiler_wl_CXX \
31659 lt_prog_compiler_static_CXX \
31660 lt_cv_prog_compiler_c_o_CXX \
31661 export_dynamic_flag_spec_CXX \
31662 whole_archive_flag_spec_CXX \
31663 compiler_needs_object_CXX \
31664 with_gnu_ld_CXX \
31665 allow_undefined_flag_CXX \
31666 no_undefined_flag_CXX \
31667 hardcode_libdir_flag_spec_CXX \
31668 hardcode_libdir_flag_spec_ld_CXX \
31669 hardcode_libdir_separator_CXX \
31670 exclude_expsyms_CXX \
31671 include_expsyms_CXX \
31672 file_list_spec_CXX \
31673 compiler_lib_search_dirs_CXX \
31674 predep_objects_CXX \
31675 postdep_objects_CXX \
31676 predeps_CXX \
31677 postdeps_CXX \
31678 compiler_lib_search_path_CXX; do
31679     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
31680     *[\\\\\\\`\\"\\\$]*)
31681       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
31682       ;;
31683     *)
31684       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
31685       ;;
31686     esac
31687 done
31688
31689 # Double-quote double-evaled strings.
31690 for var in reload_cmds \
31691 old_postinstall_cmds \
31692 old_postuninstall_cmds \
31693 old_archive_cmds \
31694 extract_expsyms_cmds \
31695 old_archive_from_new_cmds \
31696 old_archive_from_expsyms_cmds \
31697 archive_cmds \
31698 archive_expsym_cmds \
31699 module_cmds \
31700 module_expsym_cmds \
31701 export_symbols_cmds \
31702 prelink_cmds \
31703 postlink_cmds \
31704 postinstall_cmds \
31705 postuninstall_cmds \
31706 finish_cmds \
31707 sys_lib_search_path_spec \
31708 sys_lib_dlsearch_path_spec \
31709 reload_cmds_CXX \
31710 old_archive_cmds_CXX \
31711 old_archive_from_new_cmds_CXX \
31712 old_archive_from_expsyms_cmds_CXX \
31713 archive_cmds_CXX \
31714 archive_expsym_cmds_CXX \
31715 module_cmds_CXX \
31716 module_expsym_cmds_CXX \
31717 export_symbols_cmds_CXX \
31718 prelink_cmds_CXX \
31719 postlink_cmds_CXX; do
31720     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
31721     *[\\\\\\\`\\"\\\$]*)
31722       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
31723       ;;
31724     *)
31725       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
31726       ;;
31727     esac
31728 done
31729
31730 ac_aux_dir='$ac_aux_dir'
31731 xsi_shell='$xsi_shell'
31732 lt_shell_append='$lt_shell_append'
31733
31734 # See if we are running on zsh, and set the options which allow our
31735 # commands through without removal of \ escapes INIT.
31736 if test -n "\${ZSH_VERSION+set}" ; then
31737    setopt NO_GLOB_SUBST
31738 fi
31739
31740
31741     PACKAGE='$PACKAGE'
31742     VERSION='$VERSION'
31743     TIMESTAMP='$TIMESTAMP'
31744     RM='$RM'
31745     ofile='$ofile'
31746
31747
31748
31749
31750
31751
31752 _ACEOF
31753
31754 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31755
31756 # Handling of arguments.
31757 for ac_config_target in $ac_config_targets
31758 do
31759   case $ac_config_target in
31760     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
31761     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
31762     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
31763     "libopts/Makefile") CONFIG_FILES="$CONFIG_FILES libopts/Makefile" ;;
31764     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
31765     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
31766     "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
31767     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
31768     "tests/fileHandlingTest.h") CONFIG_FILES="$CONFIG_FILES tests/fileHandlingTest.h" ;;
31769     "unity/Makefile") CONFIG_FILES="$CONFIG_FILES unity/Makefile" ;;
31770
31771   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
31772   esac
31773 done
31774
31775
31776 # If the user did not use the arguments to specify the items to instantiate,
31777 # then the envvar interface is used.  Set only those that are not.
31778 # We use the long form for the default assignment because of an extremely
31779 # bizarre bug on SunOS 4.1.3.
31780 if $ac_need_defaults; then
31781   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
31782   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
31783   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
31784 fi
31785
31786 # Have a temporary directory for convenience.  Make it in the build tree
31787 # simply because there is no reason against having it here, and in addition,
31788 # creating and moving files from /tmp can sometimes cause problems.
31789 # Hook for its removal unless debugging.
31790 # Note that there is a small window in which the directory will not be cleaned:
31791 # after its creation but before its name has been assigned to `$tmp'.
31792 $debug ||
31793 {
31794   tmp= ac_tmp=
31795   trap 'exit_status=$?
31796   : "${ac_tmp:=$tmp}"
31797   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
31798 ' 0
31799   trap 'as_fn_exit 1' 1 2 13 15
31800 }
31801 # Create a (secure) tmp directory for tmp files.
31802
31803 {
31804   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31805   test -d "$tmp"
31806 }  ||
31807 {
31808   tmp=./conf$$-$RANDOM
31809   (umask 077 && mkdir "$tmp")
31810 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31811 ac_tmp=$tmp
31812
31813 # Set up the scripts for CONFIG_FILES section.
31814 # No need to generate them if there are no CONFIG_FILES.
31815 # This happens for instance with `./config.status config.h'.
31816 if test -n "$CONFIG_FILES"; then
31817
31818
31819 ac_cr=`echo X | tr X '\015'`
31820 # On cygwin, bash can eat \r inside `` if the user requested igncr.
31821 # But we know of no other shell where ac_cr would be empty at this
31822 # point, so we can use a bashism as a fallback.
31823 if test "x$ac_cr" = x; then
31824   eval ac_cr=\$\'\\r\'
31825 fi
31826 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31827 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31828   ac_cs_awk_cr='\\r'
31829 else
31830   ac_cs_awk_cr=$ac_cr
31831 fi
31832
31833 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
31834 _ACEOF
31835
31836
31837 {
31838   echo "cat >conf$$subs.awk <<_ACEOF" &&
31839   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31840   echo "_ACEOF"
31841 } >conf$$subs.sh ||
31842   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31843 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
31844 ac_delim='%!_!# '
31845 for ac_last_try in false false false false false :; do
31846   . ./conf$$subs.sh ||
31847     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31848
31849   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31850   if test $ac_delim_n = $ac_delim_num; then
31851     break
31852   elif $ac_last_try; then
31853     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31854   else
31855     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31856   fi
31857 done
31858 rm -f conf$$subs.sh
31859
31860 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31861 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
31862 _ACEOF
31863 sed -n '
31864 h
31865 s/^/S["/; s/!.*/"]=/
31866 p
31867 g
31868 s/^[^!]*!//
31869 :repl
31870 t repl
31871 s/'"$ac_delim"'$//
31872 t delim
31873 :nl
31874 h
31875 s/\(.\{148\}\)..*/\1/
31876 t more1
31877 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31878 p
31879 n
31880 b repl
31881 :more1
31882 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31883 p
31884 g
31885 s/.\{148\}//
31886 t nl
31887 :delim
31888 h
31889 s/\(.\{148\}\)..*/\1/
31890 t more2
31891 s/["\\]/\\&/g; s/^/"/; s/$/"/
31892 p
31893 b
31894 :more2
31895 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31896 p
31897 g
31898 s/.\{148\}//
31899 t delim
31900 ' <conf$$subs.awk | sed '
31901 /^[^""]/{
31902   N
31903   s/\n//
31904 }
31905 ' >>$CONFIG_STATUS || ac_write_fail=1
31906 rm -f conf$$subs.awk
31907 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31908 _ACAWK
31909 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
31910   for (key in S) S_is_set[key] = 1
31911   FS = "\a"
31912
31913 }
31914 {
31915   line = $ 0
31916   nfields = split(line, field, "@")
31917   substed = 0
31918   len = length(field[1])
31919   for (i = 2; i < nfields; i++) {
31920     key = field[i]
31921     keylen = length(key)
31922     if (S_is_set[key]) {
31923       value = S[key]
31924       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31925       len += length(value) + length(field[++i])
31926       substed = 1
31927     } else
31928       len += 1 + keylen
31929   }
31930
31931   print line
31932 }
31933
31934 _ACAWK
31935 _ACEOF
31936 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31937 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31938   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31939 else
31940   cat
31941 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
31942   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
31943 _ACEOF
31944
31945 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
31946 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
31947 # trailing colons and then remove the whole line if VPATH becomes empty
31948 # (actually we leave an empty line to preserve line numbers).
31949 if test "x$srcdir" = x.; then
31950   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
31951 h
31952 s///
31953 s/^/:/
31954 s/[      ]*$/:/
31955 s/:\$(srcdir):/:/g
31956 s/:\${srcdir}:/:/g
31957 s/:@srcdir@:/:/g
31958 s/^:*//
31959 s/:*$//
31960 x
31961 s/\(=[   ]*\).*/\1/
31962 G
31963 s/\n//
31964 s/^[^=]*=[       ]*$//
31965 }'
31966 fi
31967
31968 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31969 fi # test -n "$CONFIG_FILES"
31970
31971 # Set up the scripts for CONFIG_HEADERS section.
31972 # No need to generate them if there are no CONFIG_HEADERS.
31973 # This happens for instance with `./config.status Makefile'.
31974 if test -n "$CONFIG_HEADERS"; then
31975 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
31976 BEGIN {
31977 _ACEOF
31978
31979 # Transform confdefs.h into an awk script `defines.awk', embedded as
31980 # here-document in config.status, that substitutes the proper values into
31981 # config.h.in to produce config.h.
31982
31983 # Create a delimiter string that does not exist in confdefs.h, to ease
31984 # handling of long lines.
31985 ac_delim='%!_!# '
31986 for ac_last_try in false false :; do
31987   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
31988   if test -z "$ac_tt"; then
31989     break
31990   elif $ac_last_try; then
31991     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
31992   else
31993     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31994   fi
31995 done
31996
31997 # For the awk script, D is an array of macro values keyed by name,
31998 # likewise P contains macro parameters if any.  Preserve backslash
31999 # newline sequences.
32000
32001 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32002 sed -n '
32003 s/.\{148\}/&'"$ac_delim"'/g
32004 t rset
32005 :rset
32006 s/^[     ]*#[    ]*define[       ][      ]*/ /
32007 t def
32008 d
32009 :def
32010 s/\\$//
32011 t bsnl
32012 s/["\\]/\\&/g
32013 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
32014 D["\1"]=" \3"/p
32015 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
32016 d
32017 :bsnl
32018 s/["\\]/\\&/g
32019 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
32020 D["\1"]=" \3\\\\\\n"\\/p
32021 t cont
32022 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32023 t cont
32024 d
32025 :cont
32026 n
32027 s/.\{148\}/&'"$ac_delim"'/g
32028 t clear
32029 :clear
32030 s/\\$//
32031 t bsnlc
32032 s/["\\]/\\&/g; s/^/"/; s/$/"/p
32033 d
32034 :bsnlc
32035 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32036 b cont
32037 ' <confdefs.h | sed '
32038 s/'"$ac_delim"'/"\\\
32039 "/g' >>$CONFIG_STATUS || ac_write_fail=1
32040
32041 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32042   for (key in D) D_is_set[key] = 1
32043   FS = "\a"
32044 }
32045 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32046   line = \$ 0
32047   split(line, arg, " ")
32048   if (arg[1] == "#") {
32049     defundef = arg[2]
32050     mac1 = arg[3]
32051   } else {
32052     defundef = substr(arg[1], 2)
32053     mac1 = arg[2]
32054   }
32055   split(mac1, mac2, "(") #)
32056   macro = mac2[1]
32057   prefix = substr(line, 1, index(line, defundef) - 1)
32058   if (D_is_set[macro]) {
32059     # Preserve the white space surrounding the "#".
32060     print prefix "define", macro P[macro] D[macro]
32061     next
32062   } else {
32063     # Replace #undef with comments.  This is necessary, for example,
32064     # in the case of _POSIX_SOURCE, which is predefined and required
32065     # on some systems where configure will not decide to define it.
32066     if (defundef == "undef") {
32067       print "/*", prefix defundef, macro, "*/"
32068       next
32069     }
32070   }
32071 }
32072 { print }
32073 _ACAWK
32074 _ACEOF
32075 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32076   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32077 fi # test -n "$CONFIG_HEADERS"
32078
32079
32080 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
32081 shift
32082 for ac_tag
32083 do
32084   case $ac_tag in
32085   :[FHLC]) ac_mode=$ac_tag; continue;;
32086   esac
32087   case $ac_mode$ac_tag in
32088   :[FHL]*:*);;
32089   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
32090   :[FH]-) ac_tag=-:-;;
32091   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32092   esac
32093   ac_save_IFS=$IFS
32094   IFS=:
32095   set x $ac_tag
32096   IFS=$ac_save_IFS
32097   shift
32098   ac_file=$1
32099   shift
32100
32101   case $ac_mode in
32102   :L) ac_source=$1;;
32103   :[FH])
32104     ac_file_inputs=
32105     for ac_f
32106     do
32107       case $ac_f in
32108       -) ac_f="$ac_tmp/stdin";;
32109       *) # Look for the file first in the build tree, then in the source tree
32110          # (if the path is not absolute).  The absolute path cannot be DOS-style,
32111          # because $ac_f cannot contain `:'.
32112          test -f "$ac_f" ||
32113            case $ac_f in
32114            [\\/$]*) false;;
32115            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32116            esac ||
32117            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
32118       esac
32119       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32120       as_fn_append ac_file_inputs " '$ac_f'"
32121     done
32122
32123     # Let's still pretend it is `configure' which instantiates (i.e., don't
32124     # use $as_me), people would be surprised to read:
32125     #    /* config.h.  Generated by config.status.  */
32126     configure_input='Generated from '`
32127           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32128         `' by configure.'
32129     if test x"$ac_file" != x-; then
32130       configure_input="$ac_file.  $configure_input"
32131       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32132 $as_echo "$as_me: creating $ac_file" >&6;}
32133     fi
32134     # Neutralize special characters interpreted by sed in replacement strings.
32135     case $configure_input in #(
32136     *\&* | *\|* | *\\* )
32137        ac_sed_conf_input=`$as_echo "$configure_input" |
32138        sed 's/[\\\\&|]/\\\\&/g'`;; #(
32139     *) ac_sed_conf_input=$configure_input;;
32140     esac
32141
32142     case $ac_tag in
32143     *:-:* | *:-) cat >"$ac_tmp/stdin" \
32144       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
32145     esac
32146     ;;
32147   esac
32148
32149   ac_dir=`$as_dirname -- "$ac_file" ||
32150 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32151          X"$ac_file" : 'X\(//\)[^/]' \| \
32152          X"$ac_file" : 'X\(//\)$' \| \
32153          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32154 $as_echo X"$ac_file" |
32155     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32156             s//\1/
32157             q
32158           }
32159           /^X\(\/\/\)[^/].*/{
32160             s//\1/
32161             q
32162           }
32163           /^X\(\/\/\)$/{
32164             s//\1/
32165             q
32166           }
32167           /^X\(\/\).*/{
32168             s//\1/
32169             q
32170           }
32171           s/.*/./; q'`
32172   as_dir="$ac_dir"; as_fn_mkdir_p
32173   ac_builddir=.
32174
32175 case "$ac_dir" in
32176 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32177 *)
32178   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32179   # A ".." for each directory in $ac_dir_suffix.
32180   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32181   case $ac_top_builddir_sub in
32182   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32183   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32184   esac ;;
32185 esac
32186 ac_abs_top_builddir=$ac_pwd
32187 ac_abs_builddir=$ac_pwd$ac_dir_suffix
32188 # for backward compatibility:
32189 ac_top_builddir=$ac_top_build_prefix
32190
32191 case $srcdir in
32192   .)  # We are building in place.
32193     ac_srcdir=.
32194     ac_top_srcdir=$ac_top_builddir_sub
32195     ac_abs_top_srcdir=$ac_pwd ;;
32196   [\\/]* | ?:[\\/]* )  # Absolute name.
32197     ac_srcdir=$srcdir$ac_dir_suffix;
32198     ac_top_srcdir=$srcdir
32199     ac_abs_top_srcdir=$srcdir ;;
32200   *) # Relative name.
32201     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32202     ac_top_srcdir=$ac_top_build_prefix$srcdir
32203     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32204 esac
32205 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32206
32207
32208   case $ac_mode in
32209   :F)
32210   #
32211   # CONFIG_FILE
32212   #
32213
32214   case $INSTALL in
32215   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
32216   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
32217   esac
32218   ac_MKDIR_P=$MKDIR_P
32219   case $MKDIR_P in
32220   [\\/$]* | ?:[\\/]* ) ;;
32221   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
32222   esac
32223 _ACEOF
32224
32225 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32226 # If the template does not know about datarootdir, expand it.
32227 # FIXME: This hack should be removed a few years after 2.60.
32228 ac_datarootdir_hack=; ac_datarootdir_seen=
32229 ac_sed_dataroot='
32230 /datarootdir/ {
32231   p
32232   q
32233 }
32234 /@datadir@/p
32235 /@docdir@/p
32236 /@infodir@/p
32237 /@localedir@/p
32238 /@mandir@/p'
32239 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32240 *datarootdir*) ac_datarootdir_seen=yes;;
32241 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32242   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32243 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32244 _ACEOF
32245 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32246   ac_datarootdir_hack='
32247   s&@datadir@&$datadir&g
32248   s&@docdir@&$docdir&g
32249   s&@infodir@&$infodir&g
32250   s&@localedir@&$localedir&g
32251   s&@mandir@&$mandir&g
32252   s&\\\${datarootdir}&$datarootdir&g' ;;
32253 esac
32254 _ACEOF
32255
32256 # Neutralize VPATH when `$srcdir' = `.'.
32257 # Shell code in configure.ac might set extrasub.
32258 # FIXME: do we really want to maintain this feature?
32259 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32260 ac_sed_extra="$ac_vpsub
32261 $extrasub
32262 _ACEOF
32263 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32264 :t
32265 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32266 s|@configure_input@|$ac_sed_conf_input|;t t
32267 s&@top_builddir@&$ac_top_builddir_sub&;t t
32268 s&@top_build_prefix@&$ac_top_build_prefix&;t t
32269 s&@srcdir@&$ac_srcdir&;t t
32270 s&@abs_srcdir@&$ac_abs_srcdir&;t t
32271 s&@top_srcdir@&$ac_top_srcdir&;t t
32272 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32273 s&@builddir@&$ac_builddir&;t t
32274 s&@abs_builddir@&$ac_abs_builddir&;t t
32275 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32276 s&@INSTALL@&$ac_INSTALL&;t t
32277 s&@MKDIR_P@&$ac_MKDIR_P&;t t
32278 $ac_datarootdir_hack
32279 "
32280 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
32281   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32282
32283 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32284   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
32285   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
32286       "$ac_tmp/out"`; test -z "$ac_out"; } &&
32287   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32288 which seems to be undefined.  Please make sure it is defined" >&5
32289 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32290 which seems to be undefined.  Please make sure it is defined" >&2;}
32291
32292   rm -f "$ac_tmp/stdin"
32293   case $ac_file in
32294   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
32295   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
32296   esac \
32297   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32298  ;;
32299   :H)
32300   #
32301   # CONFIG_HEADER
32302   #
32303   if test x"$ac_file" != x-; then
32304     {
32305       $as_echo "/* $configure_input  */" \
32306       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
32307     } >"$ac_tmp/config.h" \
32308       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32309     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
32310       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32311 $as_echo "$as_me: $ac_file is unchanged" >&6;}
32312     else
32313       rm -f "$ac_file"
32314       mv "$ac_tmp/config.h" "$ac_file" \
32315         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32316     fi
32317   else
32318     $as_echo "/* $configure_input  */" \
32319       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
32320       || as_fn_error $? "could not create -" "$LINENO" 5
32321   fi
32322 # Compute "$ac_file"'s index in $config_headers.
32323 _am_arg="$ac_file"
32324 _am_stamp_count=1
32325 for _am_header in $config_headers :; do
32326   case $_am_header in
32327     $_am_arg | $_am_arg:* )
32328       break ;;
32329     * )
32330       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
32331   esac
32332 done
32333 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
32334 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32335          X"$_am_arg" : 'X\(//\)[^/]' \| \
32336          X"$_am_arg" : 'X\(//\)$' \| \
32337          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
32338 $as_echo X"$_am_arg" |
32339     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32340             s//\1/
32341             q
32342           }
32343           /^X\(\/\/\)[^/].*/{
32344             s//\1/
32345             q
32346           }
32347           /^X\(\/\/\)$/{
32348             s//\1/
32349             q
32350           }
32351           /^X\(\/\).*/{
32352             s//\1/
32353             q
32354           }
32355           s/.*/./; q'`/stamp-h$_am_stamp_count
32356  ;;
32357
32358   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
32359 $as_echo "$as_me: executing $ac_file commands" >&6;}
32360  ;;
32361   esac
32362
32363
32364   case $ac_file$ac_mode in
32365     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
32366   # Older Autoconf quotes --file arguments for eval, but not when files
32367   # are listed without --file.  Let's play safe and only enable the eval
32368   # if we detect the quoting.
32369   case $CONFIG_FILES in
32370   *\'*) eval set x "$CONFIG_FILES" ;;
32371   *)   set x $CONFIG_FILES ;;
32372   esac
32373   shift
32374   for mf
32375   do
32376     # Strip MF so we end up with the name of the file.
32377     mf=`echo "$mf" | sed -e 's/:.*$//'`
32378     # Check whether this is an Automake generated Makefile or not.
32379     # We used to match only the files named 'Makefile.in', but
32380     # some people rename them; so instead we look at the file content.
32381     # Grep'ing the first line is not enough: some people post-process
32382     # each Makefile.in and add a new line on top of each file to say so.
32383     # Grep'ing the whole file is not good either: AIX grep has a line
32384     # limit of 2048, but all sed's we know have understand at least 4000.
32385     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
32386       dirpart=`$as_dirname -- "$mf" ||
32387 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32388          X"$mf" : 'X\(//\)[^/]' \| \
32389          X"$mf" : 'X\(//\)$' \| \
32390          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
32391 $as_echo X"$mf" |
32392     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32393             s//\1/
32394             q
32395           }
32396           /^X\(\/\/\)[^/].*/{
32397             s//\1/
32398             q
32399           }
32400           /^X\(\/\/\)$/{
32401             s//\1/
32402             q
32403           }
32404           /^X\(\/\).*/{
32405             s//\1/
32406             q
32407           }
32408           s/.*/./; q'`
32409     else
32410       continue
32411     fi
32412     # Extract the definition of DEPDIR, am__include, and am__quote
32413     # from the Makefile without running 'make'.
32414     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
32415     test -z "$DEPDIR" && continue
32416     am__include=`sed -n 's/^am__include = //p' < "$mf"`
32417     test -z "$am__include" && continue
32418     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
32419     # Find all dependency output files, they are included files with
32420     # $(DEPDIR) in their names.  We invoke sed twice because it is the
32421     # simplest approach to changing $(DEPDIR) to its actual value in the
32422     # expansion.
32423     for file in `sed -n "
32424       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
32425          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
32426       # Make sure the directory exists.
32427       test -f "$dirpart/$file" && continue
32428       fdir=`$as_dirname -- "$file" ||
32429 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32430          X"$file" : 'X\(//\)[^/]' \| \
32431          X"$file" : 'X\(//\)$' \| \
32432          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
32433 $as_echo X"$file" |
32434     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32435             s//\1/
32436             q
32437           }
32438           /^X\(\/\/\)[^/].*/{
32439             s//\1/
32440             q
32441           }
32442           /^X\(\/\/\)$/{
32443             s//\1/
32444             q
32445           }
32446           /^X\(\/\).*/{
32447             s//\1/
32448             q
32449           }
32450           s/.*/./; q'`
32451       as_dir=$dirpart/$fdir; as_fn_mkdir_p
32452       # echo "creating $dirpart/$file"
32453       echo '# dummy' > "$dirpart/$file"
32454     done
32455   done
32456 }
32457  ;;
32458     "libtool":C)
32459
32460     # See if we are running on zsh, and set the options which allow our
32461     # commands through without removal of \ escapes.
32462     if test -n "${ZSH_VERSION+set}" ; then
32463       setopt NO_GLOB_SUBST
32464     fi
32465
32466     cfgfile="${ofile}T"
32467     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
32468     $RM "$cfgfile"
32469
32470     cat <<_LT_EOF >> "$cfgfile"
32471 #! $SHELL
32472
32473 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
32474 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
32475 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
32476 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
32477 #
32478 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
32479 #                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
32480 #                 Inc.
32481 #   Written by Gordon Matzigkeit, 1996
32482 #
32483 #   This file is part of GNU Libtool.
32484 #
32485 # GNU Libtool is free software; you can redistribute it and/or
32486 # modify it under the terms of the GNU General Public License as
32487 # published by the Free Software Foundation; either version 2 of
32488 # the License, or (at your option) any later version.
32489 #
32490 # As a special exception to the GNU General Public License,
32491 # if you distribute this file as part of a program or library that
32492 # is built using GNU Libtool, you may include this file under the
32493 # same distribution terms that you use for the rest of that program.
32494 #
32495 # GNU Libtool is distributed in the hope that it will be useful,
32496 # but WITHOUT ANY WARRANTY; without even the implied warranty of
32497 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
32498 # GNU General Public License for more details.
32499 #
32500 # You should have received a copy of the GNU General Public License
32501 # along with GNU Libtool; see the file COPYING.  If not, a copy
32502 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
32503 # obtained by writing to the Free Software Foundation, Inc.,
32504 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
32505
32506
32507 # The names of the tagged configurations supported by this script.
32508 available_tags="CXX "
32509
32510 # ### BEGIN LIBTOOL CONFIG
32511
32512 # A sed program that does not truncate output.
32513 SED=$lt_SED
32514
32515 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
32516 Xsed="\$SED -e 1s/^X//"
32517
32518 # A grep program that handles long lines.
32519 GREP=$lt_GREP
32520
32521 # An ERE matcher.
32522 EGREP=$lt_EGREP
32523
32524 # A literal string matcher.
32525 FGREP=$lt_FGREP
32526
32527 # Shell to use when invoking shell scripts.
32528 SHELL=$lt_SHELL
32529
32530 # An echo program that protects backslashes.
32531 ECHO=$lt_ECHO
32532
32533 # Whether or not to build shared libraries.
32534 build_libtool_libs=$enable_shared
32535
32536 # Which release of libtool.m4 was used?
32537 macro_version=$macro_version
32538 macro_revision=$macro_revision
32539
32540 # Whether or not to build static libraries.
32541 build_old_libs=$enable_static
32542
32543 # What type of objects to build.
32544 pic_mode=$pic_mode
32545
32546 # Whether or not to optimize for fast installation.
32547 fast_install=$enable_fast_install
32548
32549 # The host system.
32550 host_alias=$host_alias
32551 host=$host
32552 host_os=$host_os
32553
32554 # The build system.
32555 build_alias=$build_alias
32556 build=$build
32557 build_os=$build_os
32558
32559 # A BSD- or MS-compatible name lister.
32560 NM=$lt_NM
32561
32562 # Whether we need soft or hard links.
32563 LN_S=$lt_LN_S
32564
32565 # What is the maximum length of a command?
32566 max_cmd_len=$max_cmd_len
32567
32568 # Object file suffix (normally "o").
32569 objext=$ac_objext
32570
32571 # Executable file suffix (normally "").
32572 exeext=$exeext
32573
32574 # whether the shell understands "unset".
32575 lt_unset=$lt_unset
32576
32577 # turn spaces into newlines.
32578 SP2NL=$lt_lt_SP2NL
32579
32580 # turn newlines into spaces.
32581 NL2SP=$lt_lt_NL2SP
32582
32583 # convert \$build file names to \$host format.
32584 to_host_file_cmd=$lt_cv_to_host_file_cmd
32585
32586 # convert \$build files to toolchain format.
32587 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
32588
32589 # An object symbol dumper.
32590 OBJDUMP=$lt_OBJDUMP
32591
32592 # Method to check whether dependent libraries are shared objects.
32593 deplibs_check_method=$lt_deplibs_check_method
32594
32595 # Command to use when deplibs_check_method = "file_magic".
32596 file_magic_cmd=$lt_file_magic_cmd
32597
32598 # How to find potential files when deplibs_check_method = "file_magic".
32599 file_magic_glob=$lt_file_magic_glob
32600
32601 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
32602 want_nocaseglob=$lt_want_nocaseglob
32603
32604 # DLL creation program.
32605 DLLTOOL=$lt_DLLTOOL
32606
32607 # Command to associate shared and link libraries.
32608 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
32609
32610 # The archiver.
32611 AR=$lt_AR
32612
32613 # Flags to create an archive.
32614 AR_FLAGS=$lt_AR_FLAGS
32615
32616 # How to feed a file listing to the archiver.
32617 archiver_list_spec=$lt_archiver_list_spec
32618
32619 # A symbol stripping program.
32620 STRIP=$lt_STRIP
32621
32622 # Commands used to install an old-style archive.
32623 RANLIB=$lt_RANLIB
32624 old_postinstall_cmds=$lt_old_postinstall_cmds
32625 old_postuninstall_cmds=$lt_old_postuninstall_cmds
32626
32627 # Whether to use a lock for old archive extraction.
32628 lock_old_archive_extraction=$lock_old_archive_extraction
32629
32630 # A C compiler.
32631 LTCC=$lt_CC
32632
32633 # LTCC compiler flags.
32634 LTCFLAGS=$lt_CFLAGS
32635
32636 # Take the output of nm and produce a listing of raw symbols and C names.
32637 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
32638
32639 # Transform the output of nm in a proper C declaration.
32640 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
32641
32642 # Transform the output of nm in a C name address pair.
32643 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
32644
32645 # Transform the output of nm in a C name address pair when lib prefix is needed.
32646 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
32647
32648 # Specify filename containing input files for \$NM.
32649 nm_file_list_spec=$lt_nm_file_list_spec
32650
32651 # The root where to search for dependent libraries,and in which our libraries should be installed.
32652 lt_sysroot=$lt_sysroot
32653
32654 # The name of the directory that contains temporary libtool files.
32655 objdir=$objdir
32656
32657 # Used to examine libraries when file_magic_cmd begins with "file".
32658 MAGIC_CMD=$MAGIC_CMD
32659
32660 # Must we lock files when doing compilation?
32661 need_locks=$lt_need_locks
32662
32663 # Manifest tool.
32664 MANIFEST_TOOL=$lt_MANIFEST_TOOL
32665
32666 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
32667 DSYMUTIL=$lt_DSYMUTIL
32668
32669 # Tool to change global to local symbols on Mac OS X.
32670 NMEDIT=$lt_NMEDIT
32671
32672 # Tool to manipulate fat objects and archives on Mac OS X.
32673 LIPO=$lt_LIPO
32674
32675 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
32676 OTOOL=$lt_OTOOL
32677
32678 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
32679 OTOOL64=$lt_OTOOL64
32680
32681 # Old archive suffix (normally "a").
32682 libext=$libext
32683
32684 # Shared library suffix (normally ".so").
32685 shrext_cmds=$lt_shrext_cmds
32686
32687 # The commands to extract the exported symbol list from a shared archive.
32688 extract_expsyms_cmds=$lt_extract_expsyms_cmds
32689
32690 # Variables whose values should be saved in libtool wrapper scripts and
32691 # restored at link time.
32692 variables_saved_for_relink=$lt_variables_saved_for_relink
32693
32694 # Do we need the "lib" prefix for modules?
32695 need_lib_prefix=$need_lib_prefix
32696
32697 # Do we need a version for libraries?
32698 need_version=$need_version
32699
32700 # Library versioning type.
32701 version_type=$version_type
32702
32703 # Shared library runtime path variable.
32704 runpath_var=$runpath_var
32705
32706 # Shared library path variable.
32707 shlibpath_var=$shlibpath_var
32708
32709 # Is shlibpath searched before the hard-coded library search path?
32710 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
32711
32712 # Format of library name prefix.
32713 libname_spec=$lt_libname_spec
32714
32715 # List of archive names.  First name is the real one, the rest are links.
32716 # The last name is the one that the linker finds with -lNAME
32717 library_names_spec=$lt_library_names_spec
32718
32719 # The coded name of the library, if different from the real name.
32720 soname_spec=$lt_soname_spec
32721
32722 # Permission mode override for installation of shared libraries.
32723 install_override_mode=$lt_install_override_mode
32724
32725 # Command to use after installation of a shared archive.
32726 postinstall_cmds=$lt_postinstall_cmds
32727
32728 # Command to use after uninstallation of a shared archive.
32729 postuninstall_cmds=$lt_postuninstall_cmds
32730
32731 # Commands used to finish a libtool library installation in a directory.
32732 finish_cmds=$lt_finish_cmds
32733
32734 # As "finish_cmds", except a single script fragment to be evaled but
32735 # not shown.
32736 finish_eval=$lt_finish_eval
32737
32738 # Whether we should hardcode library paths into libraries.
32739 hardcode_into_libs=$hardcode_into_libs
32740
32741 # Compile-time system search path for libraries.
32742 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
32743
32744 # Run-time system search path for libraries.
32745 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
32746
32747 # Whether dlopen is supported.
32748 dlopen_support=$enable_dlopen
32749
32750 # Whether dlopen of programs is supported.
32751 dlopen_self=$enable_dlopen_self
32752
32753 # Whether dlopen of statically linked programs is supported.
32754 dlopen_self_static=$enable_dlopen_self_static
32755
32756 # Commands to strip libraries.
32757 old_striplib=$lt_old_striplib
32758 striplib=$lt_striplib
32759
32760
32761 # The linker used to build libraries.
32762 LD=$lt_LD
32763
32764 # How to create reloadable object files.
32765 reload_flag=$lt_reload_flag
32766 reload_cmds=$lt_reload_cmds
32767
32768 # Commands used to build an old-style archive.
32769 old_archive_cmds=$lt_old_archive_cmds
32770
32771 # A language specific compiler.
32772 CC=$lt_compiler
32773
32774 # Is the compiler the GNU compiler?
32775 with_gcc=$GCC
32776
32777 # Compiler flag to turn off builtin functions.
32778 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
32779
32780 # Additional compiler flags for building library objects.
32781 pic_flag=$lt_lt_prog_compiler_pic
32782
32783 # How to pass a linker flag through the compiler.
32784 wl=$lt_lt_prog_compiler_wl
32785
32786 # Compiler flag to prevent dynamic linking.
32787 link_static_flag=$lt_lt_prog_compiler_static
32788
32789 # Does compiler simultaneously support -c and -o options?
32790 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
32791
32792 # Whether or not to add -lc for building shared libraries.
32793 build_libtool_need_lc=$archive_cmds_need_lc
32794
32795 # Whether or not to disallow shared libs when runtime libs are static.
32796 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
32797
32798 # Compiler flag to allow reflexive dlopens.
32799 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
32800
32801 # Compiler flag to generate shared objects directly from archives.
32802 whole_archive_flag_spec=$lt_whole_archive_flag_spec
32803
32804 # Whether the compiler copes with passing no objects directly.
32805 compiler_needs_object=$lt_compiler_needs_object
32806
32807 # Create an old-style archive from a shared archive.
32808 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
32809
32810 # Create a temporary old-style archive to link instead of a shared archive.
32811 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
32812
32813 # Commands used to build a shared archive.
32814 archive_cmds=$lt_archive_cmds
32815 archive_expsym_cmds=$lt_archive_expsym_cmds
32816
32817 # Commands used to build a loadable module if different from building
32818 # a shared archive.
32819 module_cmds=$lt_module_cmds
32820 module_expsym_cmds=$lt_module_expsym_cmds
32821
32822 # Whether we are building with GNU ld or not.
32823 with_gnu_ld=$lt_with_gnu_ld
32824
32825 # Flag that allows shared libraries with undefined symbols to be built.
32826 allow_undefined_flag=$lt_allow_undefined_flag
32827
32828 # Flag that enforces no undefined symbols.
32829 no_undefined_flag=$lt_no_undefined_flag
32830
32831 # Flag to hardcode \$libdir into a binary during linking.
32832 # This must work even if \$libdir does not exist
32833 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
32834
32835 # If ld is used when linking, flag to hardcode \$libdir into a binary
32836 # during linking.  This must work even if \$libdir does not exist.
32837 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
32838
32839 # Whether we need a single "-rpath" flag with a separated argument.
32840 hardcode_libdir_separator=$lt_hardcode_libdir_separator
32841
32842 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
32843 # DIR into the resulting binary.
32844 hardcode_direct=$hardcode_direct
32845
32846 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
32847 # DIR into the resulting binary and the resulting library dependency is
32848 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
32849 # library is relocated.
32850 hardcode_direct_absolute=$hardcode_direct_absolute
32851
32852 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
32853 # into the resulting binary.
32854 hardcode_minus_L=$hardcode_minus_L
32855
32856 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
32857 # into the resulting binary.
32858 hardcode_shlibpath_var=$hardcode_shlibpath_var
32859
32860 # Set to "yes" if building a shared library automatically hardcodes DIR
32861 # into the library and all subsequent libraries and executables linked
32862 # against it.
32863 hardcode_automatic=$hardcode_automatic
32864
32865 # Set to yes if linker adds runtime paths of dependent libraries
32866 # to runtime path list.
32867 inherit_rpath=$inherit_rpath
32868
32869 # Whether libtool must link a program against all its dependency libraries.
32870 link_all_deplibs=$link_all_deplibs
32871
32872 # Set to "yes" if exported symbols are required.
32873 always_export_symbols=$always_export_symbols
32874
32875 # The commands to list exported symbols.
32876 export_symbols_cmds=$lt_export_symbols_cmds
32877
32878 # Symbols that should not be listed in the preloaded symbols.
32879 exclude_expsyms=$lt_exclude_expsyms
32880
32881 # Symbols that must always be exported.
32882 include_expsyms=$lt_include_expsyms
32883
32884 # Commands necessary for linking programs (against libraries) with templates.
32885 prelink_cmds=$lt_prelink_cmds
32886
32887 # Commands necessary for finishing linking programs.
32888 postlink_cmds=$lt_postlink_cmds
32889
32890 # Specify filename containing input files.
32891 file_list_spec=$lt_file_list_spec
32892
32893 # How to hardcode a shared library path into an executable.
32894 hardcode_action=$hardcode_action
32895
32896 # The directories searched by this compiler when creating a shared library.
32897 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
32898
32899 # Dependencies to place before and after the objects being linked to
32900 # create a shared library.
32901 predep_objects=$lt_predep_objects
32902 postdep_objects=$lt_postdep_objects
32903 predeps=$lt_predeps
32904 postdeps=$lt_postdeps
32905
32906 # The library search path used internally by the compiler when linking
32907 # a shared library.
32908 compiler_lib_search_path=$lt_compiler_lib_search_path
32909
32910 # ### END LIBTOOL CONFIG
32911
32912 _LT_EOF
32913
32914   case $host_os in
32915   aix3*)
32916     cat <<\_LT_EOF >> "$cfgfile"
32917 # AIX sometimes has problems with the GCC collect2 program.  For some
32918 # reason, if we set the COLLECT_NAMES environment variable, the problems
32919 # vanish in a puff of smoke.
32920 if test "X${COLLECT_NAMES+set}" != Xset; then
32921   COLLECT_NAMES=
32922   export COLLECT_NAMES
32923 fi
32924 _LT_EOF
32925     ;;
32926   esac
32927
32928
32929 ltmain="$ac_aux_dir/ltmain.sh"
32930
32931
32932   # We use sed instead of cat because bash on DJGPP gets confused if
32933   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
32934   # text mode, it properly converts lines to CR/LF.  This bash problem
32935   # is reportedly fixed, but why not run on old versions too?
32936   sed '$q' "$ltmain" >> "$cfgfile" \
32937      || (rm -f "$cfgfile"; exit 1)
32938
32939   if test x"$xsi_shell" = xyes; then
32940   sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
32941 func_dirname ()\
32942 {\
32943 \    case ${1} in\
32944 \      */*) func_dirname_result="${1%/*}${2}" ;;\
32945 \      *  ) func_dirname_result="${3}" ;;\
32946 \    esac\
32947 } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
32948   && mv -f "$cfgfile.tmp" "$cfgfile" \
32949     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32950 test 0 -eq $? || _lt_function_replace_fail=:
32951
32952
32953   sed -e '/^func_basename ()$/,/^} # func_basename /c\
32954 func_basename ()\
32955 {\
32956 \    func_basename_result="${1##*/}"\
32957 } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
32958   && mv -f "$cfgfile.tmp" "$cfgfile" \
32959     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32960 test 0 -eq $? || _lt_function_replace_fail=:
32961
32962
32963   sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
32964 func_dirname_and_basename ()\
32965 {\
32966 \    case ${1} in\
32967 \      */*) func_dirname_result="${1%/*}${2}" ;;\
32968 \      *  ) func_dirname_result="${3}" ;;\
32969 \    esac\
32970 \    func_basename_result="${1##*/}"\
32971 } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
32972   && mv -f "$cfgfile.tmp" "$cfgfile" \
32973     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32974 test 0 -eq $? || _lt_function_replace_fail=:
32975
32976
32977   sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
32978 func_stripname ()\
32979 {\
32980 \    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
32981 \    # positional parameters, so assign one to ordinary parameter first.\
32982 \    func_stripname_result=${3}\
32983 \    func_stripname_result=${func_stripname_result#"${1}"}\
32984 \    func_stripname_result=${func_stripname_result%"${2}"}\
32985 } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
32986   && mv -f "$cfgfile.tmp" "$cfgfile" \
32987     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32988 test 0 -eq $? || _lt_function_replace_fail=:
32989
32990
32991   sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
32992 func_split_long_opt ()\
32993 {\
32994 \    func_split_long_opt_name=${1%%=*}\
32995 \    func_split_long_opt_arg=${1#*=}\
32996 } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
32997   && mv -f "$cfgfile.tmp" "$cfgfile" \
32998     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32999 test 0 -eq $? || _lt_function_replace_fail=:
33000
33001
33002   sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
33003 func_split_short_opt ()\
33004 {\
33005 \    func_split_short_opt_arg=${1#??}\
33006 \    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
33007 } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
33008   && mv -f "$cfgfile.tmp" "$cfgfile" \
33009     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33010 test 0 -eq $? || _lt_function_replace_fail=:
33011
33012
33013   sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
33014 func_lo2o ()\
33015 {\
33016 \    case ${1} in\
33017 \      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
33018 \      *)    func_lo2o_result=${1} ;;\
33019 \    esac\
33020 } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
33021   && mv -f "$cfgfile.tmp" "$cfgfile" \
33022     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33023 test 0 -eq $? || _lt_function_replace_fail=:
33024
33025
33026   sed -e '/^func_xform ()$/,/^} # func_xform /c\
33027 func_xform ()\
33028 {\
33029     func_xform_result=${1%.*}.lo\
33030 } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
33031   && mv -f "$cfgfile.tmp" "$cfgfile" \
33032     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33033 test 0 -eq $? || _lt_function_replace_fail=:
33034
33035
33036   sed -e '/^func_arith ()$/,/^} # func_arith /c\
33037 func_arith ()\
33038 {\
33039     func_arith_result=$(( $* ))\
33040 } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
33041   && mv -f "$cfgfile.tmp" "$cfgfile" \
33042     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33043 test 0 -eq $? || _lt_function_replace_fail=:
33044
33045
33046   sed -e '/^func_len ()$/,/^} # func_len /c\
33047 func_len ()\
33048 {\
33049     func_len_result=${#1}\
33050 } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
33051   && mv -f "$cfgfile.tmp" "$cfgfile" \
33052     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33053 test 0 -eq $? || _lt_function_replace_fail=:
33054
33055 fi
33056
33057 if test x"$lt_shell_append" = xyes; then
33058   sed -e '/^func_append ()$/,/^} # func_append /c\
33059 func_append ()\
33060 {\
33061     eval "${1}+=\\${2}"\
33062 } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
33063   && mv -f "$cfgfile.tmp" "$cfgfile" \
33064     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33065 test 0 -eq $? || _lt_function_replace_fail=:
33066
33067
33068   sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
33069 func_append_quoted ()\
33070 {\
33071 \    func_quote_for_eval "${2}"\
33072 \    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
33073 } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
33074   && mv -f "$cfgfile.tmp" "$cfgfile" \
33075     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33076 test 0 -eq $? || _lt_function_replace_fail=:
33077
33078
33079   # Save a `func_append' function call where possible by direct use of '+='
33080   sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
33081     && mv -f "$cfgfile.tmp" "$cfgfile" \
33082       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33083   test 0 -eq $? || _lt_function_replace_fail=:
33084 else
33085   # Save a `func_append' function call even when '+=' is not available
33086   sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
33087     && mv -f "$cfgfile.tmp" "$cfgfile" \
33088       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33089   test 0 -eq $? || _lt_function_replace_fail=:
33090 fi
33091
33092 if test x"$_lt_function_replace_fail" = x":"; then
33093   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
33094 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
33095 fi
33096
33097
33098    mv -f "$cfgfile" "$ofile" ||
33099     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
33100   chmod +x "$ofile"
33101
33102
33103     cat <<_LT_EOF >> "$ofile"
33104
33105 # ### BEGIN LIBTOOL TAG CONFIG: CXX
33106
33107 # The linker used to build libraries.
33108 LD=$lt_LD_CXX
33109
33110 # How to create reloadable object files.
33111 reload_flag=$lt_reload_flag_CXX
33112 reload_cmds=$lt_reload_cmds_CXX
33113
33114 # Commands used to build an old-style archive.
33115 old_archive_cmds=$lt_old_archive_cmds_CXX
33116
33117 # A language specific compiler.
33118 CC=$lt_compiler_CXX
33119
33120 # Is the compiler the GNU compiler?
33121 with_gcc=$GCC_CXX
33122
33123 # Compiler flag to turn off builtin functions.
33124 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
33125
33126 # Additional compiler flags for building library objects.
33127 pic_flag=$lt_lt_prog_compiler_pic_CXX
33128
33129 # How to pass a linker flag through the compiler.
33130 wl=$lt_lt_prog_compiler_wl_CXX
33131
33132 # Compiler flag to prevent dynamic linking.
33133 link_static_flag=$lt_lt_prog_compiler_static_CXX
33134
33135 # Does compiler simultaneously support -c and -o options?
33136 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
33137
33138 # Whether or not to add -lc for building shared libraries.
33139 build_libtool_need_lc=$archive_cmds_need_lc_CXX
33140
33141 # Whether or not to disallow shared libs when runtime libs are static.
33142 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
33143
33144 # Compiler flag to allow reflexive dlopens.
33145 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
33146
33147 # Compiler flag to generate shared objects directly from archives.
33148 whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
33149
33150 # Whether the compiler copes with passing no objects directly.
33151 compiler_needs_object=$lt_compiler_needs_object_CXX
33152
33153 # Create an old-style archive from a shared archive.
33154 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
33155
33156 # Create a temporary old-style archive to link instead of a shared archive.
33157 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
33158
33159 # Commands used to build a shared archive.
33160 archive_cmds=$lt_archive_cmds_CXX
33161 archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
33162
33163 # Commands used to build a loadable module if different from building
33164 # a shared archive.
33165 module_cmds=$lt_module_cmds_CXX
33166 module_expsym_cmds=$lt_module_expsym_cmds_CXX
33167
33168 # Whether we are building with GNU ld or not.
33169 with_gnu_ld=$lt_with_gnu_ld_CXX
33170
33171 # Flag that allows shared libraries with undefined symbols to be built.
33172 allow_undefined_flag=$lt_allow_undefined_flag_CXX
33173
33174 # Flag that enforces no undefined symbols.
33175 no_undefined_flag=$lt_no_undefined_flag_CXX
33176
33177 # Flag to hardcode \$libdir into a binary during linking.
33178 # This must work even if \$libdir does not exist
33179 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
33180
33181 # If ld is used when linking, flag to hardcode \$libdir into a binary
33182 # during linking.  This must work even if \$libdir does not exist.
33183 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
33184
33185 # Whether we need a single "-rpath" flag with a separated argument.
33186 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
33187
33188 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
33189 # DIR into the resulting binary.
33190 hardcode_direct=$hardcode_direct_CXX
33191
33192 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
33193 # DIR into the resulting binary and the resulting library dependency is
33194 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
33195 # library is relocated.
33196 hardcode_direct_absolute=$hardcode_direct_absolute_CXX
33197
33198 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
33199 # into the resulting binary.
33200 hardcode_minus_L=$hardcode_minus_L_CXX
33201
33202 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
33203 # into the resulting binary.
33204 hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
33205
33206 # Set to "yes" if building a shared library automatically hardcodes DIR
33207 # into the library and all subsequent libraries and executables linked
33208 # against it.
33209 hardcode_automatic=$hardcode_automatic_CXX
33210
33211 # Set to yes if linker adds runtime paths of dependent libraries
33212 # to runtime path list.
33213 inherit_rpath=$inherit_rpath_CXX
33214
33215 # Whether libtool must link a program against all its dependency libraries.
33216 link_all_deplibs=$link_all_deplibs_CXX
33217
33218 # Set to "yes" if exported symbols are required.
33219 always_export_symbols=$always_export_symbols_CXX
33220
33221 # The commands to list exported symbols.
33222 export_symbols_cmds=$lt_export_symbols_cmds_CXX
33223
33224 # Symbols that should not be listed in the preloaded symbols.
33225 exclude_expsyms=$lt_exclude_expsyms_CXX
33226
33227 # Symbols that must always be exported.
33228 include_expsyms=$lt_include_expsyms_CXX
33229
33230 # Commands necessary for linking programs (against libraries) with templates.
33231 prelink_cmds=$lt_prelink_cmds_CXX
33232
33233 # Commands necessary for finishing linking programs.
33234 postlink_cmds=$lt_postlink_cmds_CXX
33235
33236 # Specify filename containing input files.
33237 file_list_spec=$lt_file_list_spec_CXX
33238
33239 # How to hardcode a shared library path into an executable.
33240 hardcode_action=$hardcode_action_CXX
33241
33242 # The directories searched by this compiler when creating a shared library.
33243 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
33244
33245 # Dependencies to place before and after the objects being linked to
33246 # create a shared library.
33247 predep_objects=$lt_predep_objects_CXX
33248 postdep_objects=$lt_postdep_objects_CXX
33249 predeps=$lt_predeps_CXX
33250 postdeps=$lt_postdeps_CXX
33251
33252 # The library search path used internally by the compiler when linking
33253 # a shared library.
33254 compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
33255
33256 # ### END LIBTOOL TAG CONFIG: CXX
33257 _LT_EOF
33258
33259  ;;
33260
33261   esac
33262 done # for ac_tag
33263
33264
33265 as_fn_exit 0
33266 _ACEOF
33267 ac_clean_files=$ac_clean_files_save
33268
33269 test $ac_write_fail = 0 ||
33270   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33271
33272
33273 # configure is writing to config.log, and then calls config.status.
33274 # config.status does its own redirection, appending to config.log.
33275 # Unfortunately, on DOS this fails, as config.log is still kept open
33276 # by configure, so config.status won't be able to write to it; its
33277 # output is simply discarded.  So we exec the FD to /dev/null,
33278 # effectively closing config.log, so it can be properly (re)opened and
33279 # appended to by config.status.  When coming back to configure, we
33280 # need to make the FD available again.
33281 if test "$no_create" != yes; then
33282   ac_cs_success=:
33283   ac_config_status_args=
33284   test "$silent" = yes &&
33285     ac_config_status_args="$ac_config_status_args --quiet"
33286   exec 5>/dev/null
33287   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33288   exec 5>>config.log
33289   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33290   # would make configure fail if this is the last instruction.
33291   $ac_cs_success || as_fn_exit 1
33292 fi
33293
33294 #
33295 # CONFIG_SUBDIRS section.
33296 #
33297 if test "$no_recursion" != yes; then
33298
33299   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
33300   # so they do not pile up.
33301   ac_sub_configure_args=
33302   ac_prev=
33303   eval "set x $ac_configure_args"
33304   shift
33305   for ac_arg
33306   do
33307     if test -n "$ac_prev"; then
33308       ac_prev=
33309       continue
33310     fi
33311     case $ac_arg in
33312     -cache-file | --cache-file | --cache-fil | --cache-fi \
33313     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
33314       ac_prev=cache_file ;;
33315     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
33316     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
33317     | --c=*)
33318       ;;
33319     --config-cache | -C)
33320       ;;
33321     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
33322       ac_prev=srcdir ;;
33323     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
33324       ;;
33325     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
33326       ac_prev=prefix ;;
33327     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
33328       ;;
33329     --disable-option-checking)
33330       ;;
33331     *)
33332       case $ac_arg in
33333       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
33334       esac
33335       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
33336     esac
33337   done
33338
33339   # Always prepend --prefix to ensure using the same prefix
33340   # in subdir configurations.
33341   ac_arg="--prefix=$prefix"
33342   case $ac_arg in
33343   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
33344   esac
33345   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
33346
33347   # Pass --silent
33348   if test "$silent" = yes; then
33349     ac_sub_configure_args="--silent $ac_sub_configure_args"
33350   fi
33351
33352   # Always prepend --disable-option-checking to silence warnings, since
33353   # different subdirs can have different --enable and --with options.
33354   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
33355
33356   ac_popdir=`pwd`
33357   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
33358
33359     # Do not complain, so a configure script can configure whichever
33360     # parts of a large source tree are present.
33361     test -d "$srcdir/$ac_dir" || continue
33362
33363     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
33364     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
33365     $as_echo "$ac_msg" >&6
33366     as_dir="$ac_dir"; as_fn_mkdir_p
33367     ac_builddir=.
33368
33369 case "$ac_dir" in
33370 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33371 *)
33372   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33373   # A ".." for each directory in $ac_dir_suffix.
33374   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33375   case $ac_top_builddir_sub in
33376   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33377   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33378   esac ;;
33379 esac
33380 ac_abs_top_builddir=$ac_pwd
33381 ac_abs_builddir=$ac_pwd$ac_dir_suffix
33382 # for backward compatibility:
33383 ac_top_builddir=$ac_top_build_prefix
33384
33385 case $srcdir in
33386   .)  # We are building in place.
33387     ac_srcdir=.
33388     ac_top_srcdir=$ac_top_builddir_sub
33389     ac_abs_top_srcdir=$ac_pwd ;;
33390   [\\/]* | ?:[\\/]* )  # Absolute name.
33391     ac_srcdir=$srcdir$ac_dir_suffix;
33392     ac_top_srcdir=$srcdir
33393     ac_abs_top_srcdir=$srcdir ;;
33394   *) # Relative name.
33395     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
33396     ac_top_srcdir=$ac_top_build_prefix$srcdir
33397     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
33398 esac
33399 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
33400
33401
33402     cd "$ac_dir"
33403
33404     # Check for guested configure; otherwise get Cygnus style configure.
33405     if test -f "$ac_srcdir/configure.gnu"; then
33406       ac_sub_configure=$ac_srcdir/configure.gnu
33407     elif test -f "$ac_srcdir/configure"; then
33408       ac_sub_configure=$ac_srcdir/configure
33409     elif test -f "$ac_srcdir/configure.in"; then
33410       # This should be Cygnus configure.
33411       ac_sub_configure=$ac_aux_dir/configure
33412     else
33413       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
33414 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
33415       ac_sub_configure=
33416     fi
33417
33418     # The recursion is here.
33419     if test -n "$ac_sub_configure"; then
33420       # Make the cache file name correct relative to the subdirectory.
33421       case $cache_file in
33422       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
33423       *) # Relative name.
33424         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
33425       esac
33426
33427       { $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
33428 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
33429       # The eval makes quoting arguments work.
33430       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
33431            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
33432         as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
33433     fi
33434
33435     cd "$ac_popdir"
33436   done
33437 fi
33438 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33439   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33440 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33441 fi
33442