]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/ntp/sntp/configure
Fix multiple vulnerabilities of ntp. [SA-16:09]
[FreeBSD/releng/10.2.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.8p6.
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.8p6'
594 PACKAGE_STRING='sntp 4.2.8p6'
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 GTEST_AVAILABLE_FALSE
640 GTEST_AVAILABLE_TRUE
641 GTEST_CPPFLAGS
642 GTEST_CXXFLAGS
643 GTEST_LIBS
644 GTEST_LDFLAGS
645 GTEST_CONFIG
646 CXXCPP
647 am__fastdepCXX_FALSE
648 am__fastdepCXX_TRUE
649 CXXDEPMODE
650 ac_ct_CXX
651 CXXFLAGS
652 CXX
653 UNITYBUILD_AVAILABLE_FALSE
654 UNITYBUILD_AVAILABLE_TRUE
655 PATH_RUBY
656 VER_SUFFIX
657 LIB_SYSLOG
658 subdirs
659 BUILD_LIBEVENT_FALSE
660 BUILD_LIBEVENT_TRUE
661 LDADD_LIBEVENT
662 CPPFLAGS_LIBEVENT
663 CFLAGS_LIBEVENT
664 PKG_CONFIG
665 NTP_FORCE_LIBEVENT_DIST
666 LIBOPTS_DIR
667 LIBOPTS_CFLAGS
668 LIBOPTS_LDADD
669 NEED_LIBOPTS_FALSE
670 NEED_LIBOPTS_TRUE
671 INSTALL_LIBOPTS_FALSE
672 INSTALL_LIBOPTS_TRUE
673 POSIX_SHELL
674 GL_GENERATE_STDNORETURN_H_FALSE
675 GL_GENERATE_STDNORETURN_H_TRUE
676 STDNORETURN_H
677 BUILD_SNTP_FALSE
678 BUILD_SNTP_TRUE
679 SNTP
680 LIBTOOL_DEPS
681 OTOOL64
682 OTOOL
683 LIPO
684 NMEDIT
685 DSYMUTIL
686 MANIFEST_TOOL
687 RANLIB
688 DLLTOOL
689 OBJDUMP
690 LN_S
691 NM
692 ac_ct_DUMPBIN
693 DUMPBIN
694 LIBTOOL
695 LIBOBJS
696 PTHREADS_FALSE
697 PTHREADS_TRUE
698 LIBISC_PTHREADS_NOTHREADS
699 PTHREAD_LIBS
700 LTHREAD_LIBS
701 BUILD_THREAD
702 HAVE_INLINE
703 LDADD_LIBUTIL
704 ALLOCA
705 LIBM
706 EDITLINE_LIBS
707 LD
708 FGREP
709 SED
710 LDADD_LIBNTP
711 NTP_CROSSCOMPILE_FALSE
712 NTP_CROSSCOMPILE_TRUE
713 ac_ct_AR
714 AR
715 INSTALL_UPDATE_LEAP_FALSE
716 INSTALL_UPDATE_LEAP_TRUE
717 UPDATE_LEAP_NI
718 UPDATE_LEAP_MS
719 UPDATE_LEAP_DS
720 UPDATE_LEAP_DL
721 UPDATE_LEAP_DB
722 TIMETRIM_NI
723 TIMETRIM_MS
724 TIMETRIM_DS
725 TIMETRIM_DL
726 TIMETRIM_DB
727 TICKADJ_NI
728 TICKADJ_MS
729 TICKADJ_DS
730 TICKADJ_DL
731 TICKADJ_DB
732 SNTP_NI
733 SNTP_MS
734 SNTP_DS
735 SNTP_DL
736 SNTP_DB
737 NTP_WAIT_NI
738 NTP_WAIT_MS
739 NTP_WAIT_DS
740 NTP_WAIT_DL
741 NTP_WAIT_DB
742 NTP_KEYGEN_NI
743 NTP_KEYGEN_MS
744 NTP_KEYGEN_DS
745 NTP_KEYGEN_DL
746 NTP_KEYGEN_DB
747 NTPTRACE_NI
748 NTPTRACE_MS
749 NTPTRACE_DS
750 NTPTRACE_DL
751 NTPTRACE_DB
752 NTPTIME_NI
753 NTPTIME_MS
754 NTPTIME_DS
755 NTPTIME_DL
756 NTPTIME_DB
757 INSTALL_NTPSWEEP_FALSE
758 INSTALL_NTPSWEEP_TRUE
759 NTPSWEEP_NI
760 NTPSWEEP_MS
761 NTPSWEEP_DS
762 NTPSWEEP_DL
763 NTPSWEEP_DB
764 NTPSNMPD_NI
765 NTPSNMPD_MS
766 NTPSNMPD_DS
767 NTPSNMPD_DL
768 NTPSNMPD_DB
769 NTPQ_NI
770 NTPQ_MS
771 NTPQ_DS
772 NTPQ_DL
773 NTPQ_DB
774 NTPD_NI
775 NTPD_MS
776 NTPD_DS
777 NTPD_DL
778 NTPD_DB
779 NTPDSIM_NI
780 NTPDSIM_MS
781 NTPDSIM_DS
782 NTPDSIM_DL
783 NTPDSIM_DB
784 NTPDC_NI
785 NTPDC_MS
786 NTPDC_DS
787 NTPDC_DL
788 NTPDC_DB
789 NTPDATE_NI
790 NTPDATE_MS
791 NTPDATE_DS
792 NTPDATE_DL
793 NTPDATE_DB
794 MANTAGFMT
795 CALC_TICKADJ_NI
796 CALC_TICKADJ_MS
797 CALC_TICKADJ_DS
798 CALC_TICKADJ_DL
799 CALC_TICKADJ_DB
800 WANT_CALC_TICKADJ_MS_FALSE
801 WANT_CALC_TICKADJ_MS_TRUE
802 LDFLAGS_NTP
803 LDADD_NTP
804 CPPFLAGS_NTP
805 CFLAGS_NTP
806 EGREP
807 GREP
808 CPP
809 am__fastdepCC_FALSE
810 am__fastdepCC_TRUE
811 CCDEPMODE
812 am__nodep
813 AMDEPBACKSLASH
814 AMDEP_FALSE
815 AMDEP_TRUE
816 am__quote
817 am__include
818 DEPDIR
819 OBJEXT
820 EXEEXT
821 ac_ct_CC
822 CPPFLAGS
823 LDFLAGS
824 CFLAGS
825 CC
826 host_os
827 host_vendor
828 host_cpu
829 host
830 build_os
831 build_vendor
832 build_cpu
833 build
834 AM_BACKSLASH
835 AM_DEFAULT_VERBOSITY
836 AM_DEFAULT_V
837 AM_V
838 am__untar
839 am__tar
840 AMTAR
841 am__leading_dot
842 SET_MAKE
843 AWK
844 mkdir_p
845 MKDIR_P
846 INSTALL_STRIP_PROGRAM
847 STRIP
848 install_sh
849 MAKEINFO
850 AUTOHEADER
851 AUTOMAKE
852 AUTOCONF
853 ACLOCAL
854 VERSION
855 PACKAGE
856 CYGPATH_W
857 am__isrc
858 INSTALL_DATA
859 INSTALL_SCRIPT
860 INSTALL_PROGRAM
861 target_alias
862 host_alias
863 build_alias
864 LIBS
865 ECHO_T
866 ECHO_N
867 ECHO_C
868 DEFS
869 mandir
870 localedir
871 libdir
872 psdir
873 pdfdir
874 dvidir
875 htmldir
876 infodir
877 docdir
878 oldincludedir
879 includedir
880 localstatedir
881 sharedstatedir
882 sysconfdir
883 datadir
884 datarootdir
885 libexecdir
886 sbindir
887 bindir
888 program_transform_name
889 prefix
890 exec_prefix
891 PACKAGE_URL
892 PACKAGE_BUGREPORT
893 PACKAGE_STRING
894 PACKAGE_VERSION
895 PACKAGE_TARNAME
896 PACKAGE_NAME
897 PATH_SEPARATOR
898 SHELL'
899 ac_subst_files=''
900 ac_user_opts='
901 enable_option_checking
902 enable_silent_rules
903 enable_dependency_tracking
904 with_locfile
905 with_gnu_ld
906 with_lineeditlibs
907 enable_debugging
908 enable_thread_support
909 with_threads
910 with_yielding_select
911 enable_c99_snprintf
912 enable_clockctl
913 enable_linuxcaps
914 enable_solarisprivs
915 enable_shared
916 enable_static
917 with_pic
918 enable_fast_install
919 with_sysroot
920 enable_libtool_lock
921 with_sntp
922 enable_nls
923 enable_local_libopts
924 enable_libopts_install
925 with_autoopts_config
926 with_regex_header
927 with_libregex
928 with_libregex_cflags
929 with_libregex_libs
930 enable_optional_args
931 enable_local_libevent
932 with_crypto
933 with_openssl_libdir
934 with_openssl_incdir
935 with_rpath
936 enable_ipv6
937 with_kame
938 enable_getifaddrs
939 with_gtest
940 '
941       ac_precious_vars='build_alias
942 host_alias
943 target_alias
944 CC
945 CFLAGS
946 LDFLAGS
947 LIBS
948 CPPFLAGS
949 CPP
950 CXX
951 CXXFLAGS
952 CCC
953 CXXCPP'
954 ac_subdirs_all='libevent'
955
956 # Initialize some variables set by options.
957 ac_init_help=
958 ac_init_version=false
959 ac_unrecognized_opts=
960 ac_unrecognized_sep=
961 # The variables have the same names as the options, with
962 # dashes changed to underlines.
963 cache_file=/dev/null
964 exec_prefix=NONE
965 no_create=
966 no_recursion=
967 prefix=NONE
968 program_prefix=NONE
969 program_suffix=NONE
970 program_transform_name=s,x,x,
971 silent=
972 site=
973 srcdir=
974 verbose=
975 x_includes=NONE
976 x_libraries=NONE
977
978 # Installation directory options.
979 # These are left unexpanded so users can "make install exec_prefix=/foo"
980 # and all the variables that are supposed to be based on exec_prefix
981 # by default will actually change.
982 # Use braces instead of parens because sh, perl, etc. also accept them.
983 # (The list follows the same order as the GNU Coding Standards.)
984 bindir='${exec_prefix}/bin'
985 sbindir='${exec_prefix}/sbin'
986 libexecdir='${exec_prefix}/libexec'
987 datarootdir='${prefix}/share'
988 datadir='${datarootdir}'
989 sysconfdir='${prefix}/etc'
990 sharedstatedir='${prefix}/com'
991 localstatedir='${prefix}/var'
992 includedir='${prefix}/include'
993 oldincludedir='/usr/include'
994 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
995 infodir='${datarootdir}/info'
996 htmldir='${docdir}'
997 dvidir='${docdir}'
998 pdfdir='${docdir}'
999 psdir='${docdir}'
1000 libdir='${exec_prefix}/lib'
1001 localedir='${datarootdir}/locale'
1002 mandir='${datarootdir}/man'
1003
1004 ac_prev=
1005 ac_dashdash=
1006 for ac_option
1007 do
1008   # If the previous option needs an argument, assign it.
1009   if test -n "$ac_prev"; then
1010     eval $ac_prev=\$ac_option
1011     ac_prev=
1012     continue
1013   fi
1014
1015   case $ac_option in
1016   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1017   *=)   ac_optarg= ;;
1018   *)    ac_optarg=yes ;;
1019   esac
1020
1021   # Accept the important Cygnus configure options, so we can diagnose typos.
1022
1023   case $ac_dashdash$ac_option in
1024   --)
1025     ac_dashdash=yes ;;
1026
1027   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1028     ac_prev=bindir ;;
1029   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1030     bindir=$ac_optarg ;;
1031
1032   -build | --build | --buil | --bui | --bu)
1033     ac_prev=build_alias ;;
1034   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1035     build_alias=$ac_optarg ;;
1036
1037   -cache-file | --cache-file | --cache-fil | --cache-fi \
1038   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1039     ac_prev=cache_file ;;
1040   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1041   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1042     cache_file=$ac_optarg ;;
1043
1044   --config-cache | -C)
1045     cache_file=config.cache ;;
1046
1047   -datadir | --datadir | --datadi | --datad)
1048     ac_prev=datadir ;;
1049   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1050     datadir=$ac_optarg ;;
1051
1052   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1053   | --dataroo | --dataro | --datar)
1054     ac_prev=datarootdir ;;
1055   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1056   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1057     datarootdir=$ac_optarg ;;
1058
1059   -disable-* | --disable-*)
1060     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1061     # Reject names that are not valid shell variable names.
1062     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1063       as_fn_error $? "invalid feature name: $ac_useropt"
1064     ac_useropt_orig=$ac_useropt
1065     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1066     case $ac_user_opts in
1067       *"
1068 "enable_$ac_useropt"
1069 "*) ;;
1070       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1071          ac_unrecognized_sep=', ';;
1072     esac
1073     eval enable_$ac_useropt=no ;;
1074
1075   -docdir | --docdir | --docdi | --doc | --do)
1076     ac_prev=docdir ;;
1077   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1078     docdir=$ac_optarg ;;
1079
1080   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1081     ac_prev=dvidir ;;
1082   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1083     dvidir=$ac_optarg ;;
1084
1085   -enable-* | --enable-*)
1086     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1087     # Reject names that are not valid shell variable names.
1088     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1089       as_fn_error $? "invalid feature name: $ac_useropt"
1090     ac_useropt_orig=$ac_useropt
1091     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1092     case $ac_user_opts in
1093       *"
1094 "enable_$ac_useropt"
1095 "*) ;;
1096       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1097          ac_unrecognized_sep=', ';;
1098     esac
1099     eval enable_$ac_useropt=\$ac_optarg ;;
1100
1101   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1102   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1103   | --exec | --exe | --ex)
1104     ac_prev=exec_prefix ;;
1105   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1106   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1107   | --exec=* | --exe=* | --ex=*)
1108     exec_prefix=$ac_optarg ;;
1109
1110   -gas | --gas | --ga | --g)
1111     # Obsolete; use --with-gas.
1112     with_gas=yes ;;
1113
1114   -help | --help | --hel | --he | -h)
1115     ac_init_help=long ;;
1116   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1117     ac_init_help=recursive ;;
1118   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1119     ac_init_help=short ;;
1120
1121   -host | --host | --hos | --ho)
1122     ac_prev=host_alias ;;
1123   -host=* | --host=* | --hos=* | --ho=*)
1124     host_alias=$ac_optarg ;;
1125
1126   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1127     ac_prev=htmldir ;;
1128   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1129   | --ht=*)
1130     htmldir=$ac_optarg ;;
1131
1132   -includedir | --includedir | --includedi | --included | --include \
1133   | --includ | --inclu | --incl | --inc)
1134     ac_prev=includedir ;;
1135   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1136   | --includ=* | --inclu=* | --incl=* | --inc=*)
1137     includedir=$ac_optarg ;;
1138
1139   -infodir | --infodir | --infodi | --infod | --info | --inf)
1140     ac_prev=infodir ;;
1141   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1142     infodir=$ac_optarg ;;
1143
1144   -libdir | --libdir | --libdi | --libd)
1145     ac_prev=libdir ;;
1146   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1147     libdir=$ac_optarg ;;
1148
1149   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1150   | --libexe | --libex | --libe)
1151     ac_prev=libexecdir ;;
1152   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1153   | --libexe=* | --libex=* | --libe=*)
1154     libexecdir=$ac_optarg ;;
1155
1156   -localedir | --localedir | --localedi | --localed | --locale)
1157     ac_prev=localedir ;;
1158   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1159     localedir=$ac_optarg ;;
1160
1161   -localstatedir | --localstatedir | --localstatedi | --localstated \
1162   | --localstate | --localstat | --localsta | --localst | --locals)
1163     ac_prev=localstatedir ;;
1164   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1165   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1166     localstatedir=$ac_optarg ;;
1167
1168   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1169     ac_prev=mandir ;;
1170   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1171     mandir=$ac_optarg ;;
1172
1173   -nfp | --nfp | --nf)
1174     # Obsolete; use --without-fp.
1175     with_fp=no ;;
1176
1177   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1178   | --no-cr | --no-c | -n)
1179     no_create=yes ;;
1180
1181   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1182   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1183     no_recursion=yes ;;
1184
1185   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1186   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1187   | --oldin | --oldi | --old | --ol | --o)
1188     ac_prev=oldincludedir ;;
1189   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1190   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1191   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1192     oldincludedir=$ac_optarg ;;
1193
1194   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1195     ac_prev=prefix ;;
1196   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1197     prefix=$ac_optarg ;;
1198
1199   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1200   | --program-pre | --program-pr | --program-p)
1201     ac_prev=program_prefix ;;
1202   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1203   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1204     program_prefix=$ac_optarg ;;
1205
1206   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1207   | --program-suf | --program-su | --program-s)
1208     ac_prev=program_suffix ;;
1209   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1210   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1211     program_suffix=$ac_optarg ;;
1212
1213   -program-transform-name | --program-transform-name \
1214   | --program-transform-nam | --program-transform-na \
1215   | --program-transform-n | --program-transform- \
1216   | --program-transform | --program-transfor \
1217   | --program-transfo | --program-transf \
1218   | --program-trans | --program-tran \
1219   | --progr-tra | --program-tr | --program-t)
1220     ac_prev=program_transform_name ;;
1221   -program-transform-name=* | --program-transform-name=* \
1222   | --program-transform-nam=* | --program-transform-na=* \
1223   | --program-transform-n=* | --program-transform-=* \
1224   | --program-transform=* | --program-transfor=* \
1225   | --program-transfo=* | --program-transf=* \
1226   | --program-trans=* | --program-tran=* \
1227   | --progr-tra=* | --program-tr=* | --program-t=*)
1228     program_transform_name=$ac_optarg ;;
1229
1230   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1231     ac_prev=pdfdir ;;
1232   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1233     pdfdir=$ac_optarg ;;
1234
1235   -psdir | --psdir | --psdi | --psd | --ps)
1236     ac_prev=psdir ;;
1237   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1238     psdir=$ac_optarg ;;
1239
1240   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1241   | -silent | --silent | --silen | --sile | --sil)
1242     silent=yes ;;
1243
1244   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1245     ac_prev=sbindir ;;
1246   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1247   | --sbi=* | --sb=*)
1248     sbindir=$ac_optarg ;;
1249
1250   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1251   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1252   | --sharedst | --shareds | --shared | --share | --shar \
1253   | --sha | --sh)
1254     ac_prev=sharedstatedir ;;
1255   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1256   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1257   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1258   | --sha=* | --sh=*)
1259     sharedstatedir=$ac_optarg ;;
1260
1261   -site | --site | --sit)
1262     ac_prev=site ;;
1263   -site=* | --site=* | --sit=*)
1264     site=$ac_optarg ;;
1265
1266   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1267     ac_prev=srcdir ;;
1268   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1269     srcdir=$ac_optarg ;;
1270
1271   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1272   | --syscon | --sysco | --sysc | --sys | --sy)
1273     ac_prev=sysconfdir ;;
1274   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1275   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1276     sysconfdir=$ac_optarg ;;
1277
1278   -target | --target | --targe | --targ | --tar | --ta | --t)
1279     ac_prev=target_alias ;;
1280   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1281     target_alias=$ac_optarg ;;
1282
1283   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1284     verbose=yes ;;
1285
1286   -version | --version | --versio | --versi | --vers | -V)
1287     ac_init_version=: ;;
1288
1289   -with-* | --with-*)
1290     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1291     # Reject names that are not valid shell variable names.
1292     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1293       as_fn_error $? "invalid package name: $ac_useropt"
1294     ac_useropt_orig=$ac_useropt
1295     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1296     case $ac_user_opts in
1297       *"
1298 "with_$ac_useropt"
1299 "*) ;;
1300       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1301          ac_unrecognized_sep=', ';;
1302     esac
1303     eval with_$ac_useropt=\$ac_optarg ;;
1304
1305   -without-* | --without-*)
1306     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1307     # Reject names that are not valid shell variable names.
1308     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1309       as_fn_error $? "invalid package name: $ac_useropt"
1310     ac_useropt_orig=$ac_useropt
1311     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1312     case $ac_user_opts in
1313       *"
1314 "with_$ac_useropt"
1315 "*) ;;
1316       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1317          ac_unrecognized_sep=', ';;
1318     esac
1319     eval with_$ac_useropt=no ;;
1320
1321   --x)
1322     # Obsolete; use --with-x.
1323     with_x=yes ;;
1324
1325   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1326   | --x-incl | --x-inc | --x-in | --x-i)
1327     ac_prev=x_includes ;;
1328   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1329   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1330     x_includes=$ac_optarg ;;
1331
1332   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1333   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1334     ac_prev=x_libraries ;;
1335   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1336   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1337     x_libraries=$ac_optarg ;;
1338
1339   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1340 Try \`$0 --help' for more information"
1341     ;;
1342
1343   *=*)
1344     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1345     # Reject names that are not valid shell variable names.
1346     case $ac_envvar in #(
1347       '' | [0-9]* | *[!_$as_cr_alnum]* )
1348       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1349     esac
1350     eval $ac_envvar=\$ac_optarg
1351     export $ac_envvar ;;
1352
1353   *)
1354     # FIXME: should be removed in autoconf 3.0.
1355     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1356     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1357       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1358     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1359     ;;
1360
1361   esac
1362 done
1363
1364 if test -n "$ac_prev"; then
1365   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1366   as_fn_error $? "missing argument to $ac_option"
1367 fi
1368
1369 if test -n "$ac_unrecognized_opts"; then
1370   case $enable_option_checking in
1371     no) ;;
1372     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1373     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1374   esac
1375 fi
1376
1377 # Check all directory arguments for consistency.
1378 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1379                 datadir sysconfdir sharedstatedir localstatedir includedir \
1380                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1381                 libdir localedir mandir
1382 do
1383   eval ac_val=\$$ac_var
1384   # Remove trailing slashes.
1385   case $ac_val in
1386     */ )
1387       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1388       eval $ac_var=\$ac_val;;
1389   esac
1390   # Be sure to have absolute directory names.
1391   case $ac_val in
1392     [\\/$]* | ?:[\\/]* )  continue;;
1393     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1394   esac
1395   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1396 done
1397
1398 # There might be people who depend on the old broken behavior: `$host'
1399 # used to hold the argument of --host etc.
1400 # FIXME: To remove some day.
1401 build=$build_alias
1402 host=$host_alias
1403 target=$target_alias
1404
1405 # FIXME: To remove some day.
1406 if test "x$host_alias" != x; then
1407   if test "x$build_alias" = x; then
1408     cross_compiling=maybe
1409   elif test "x$build_alias" != "x$host_alias"; then
1410     cross_compiling=yes
1411   fi
1412 fi
1413
1414 ac_tool_prefix=
1415 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1416
1417 test "$silent" = yes && exec 6>/dev/null
1418
1419
1420 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1421 ac_ls_di=`ls -di .` &&
1422 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1423   as_fn_error $? "working directory cannot be determined"
1424 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1425   as_fn_error $? "pwd does not report name of working directory"
1426
1427
1428 # Find the source files, if location was not specified.
1429 if test -z "$srcdir"; then
1430   ac_srcdir_defaulted=yes
1431   # Try the directory containing this script, then the parent directory.
1432   ac_confdir=`$as_dirname -- "$as_myself" ||
1433 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1434          X"$as_myself" : 'X\(//\)[^/]' \| \
1435          X"$as_myself" : 'X\(//\)$' \| \
1436          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1437 $as_echo X"$as_myself" |
1438     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1439             s//\1/
1440             q
1441           }
1442           /^X\(\/\/\)[^/].*/{
1443             s//\1/
1444             q
1445           }
1446           /^X\(\/\/\)$/{
1447             s//\1/
1448             q
1449           }
1450           /^X\(\/\).*/{
1451             s//\1/
1452             q
1453           }
1454           s/.*/./; q'`
1455   srcdir=$ac_confdir
1456   if test ! -r "$srcdir/$ac_unique_file"; then
1457     srcdir=..
1458   fi
1459 else
1460   ac_srcdir_defaulted=no
1461 fi
1462 if test ! -r "$srcdir/$ac_unique_file"; then
1463   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1464   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1465 fi
1466 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1467 ac_abs_confdir=`(
1468         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1469         pwd)`
1470 # When building in place, set srcdir=.
1471 if test "$ac_abs_confdir" = "$ac_pwd"; then
1472   srcdir=.
1473 fi
1474 # Remove unnecessary trailing slashes from srcdir.
1475 # Double slashes in file names in object file debugging info
1476 # mess up M-x gdb in Emacs.
1477 case $srcdir in
1478 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1479 esac
1480 for ac_var in $ac_precious_vars; do
1481   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1482   eval ac_env_${ac_var}_value=\$${ac_var}
1483   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1484   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1485 done
1486
1487 #
1488 # Report the --help message.
1489 #
1490 if test "$ac_init_help" = "long"; then
1491   # Omit some internal or obsolete options to make the list less imposing.
1492   # This message is too long to be a string in the A/UX 3.1 sh.
1493   cat <<_ACEOF
1494 \`configure' configures sntp 4.2.8p6 to adapt to many kinds of systems.
1495
1496 Usage: $0 [OPTION]... [VAR=VALUE]...
1497
1498 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1499 VAR=VALUE.  See below for descriptions of some of the useful variables.
1500
1501 Defaults for the options are specified in brackets.
1502
1503 Configuration:
1504   -h, --help              display this help and exit
1505       --help=short        display options specific to this package
1506       --help=recursive    display the short help of all the included packages
1507   -V, --version           display version information and exit
1508   -q, --quiet, --silent   do not print \`checking ...' messages
1509       --cache-file=FILE   cache test results in FILE [disabled]
1510   -C, --config-cache      alias for \`--cache-file=config.cache'
1511   -n, --no-create         do not create output files
1512       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1513
1514 Installation directories:
1515   --prefix=PREFIX         install architecture-independent files in PREFIX
1516                           [$ac_default_prefix]
1517   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1518                           [PREFIX]
1519
1520 By default, \`make install' will install all the files in
1521 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1522 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1523 for instance \`--prefix=\$HOME'.
1524
1525 For better control, use the options below.
1526
1527 Fine tuning of the installation directories:
1528   --bindir=DIR            user executables [EPREFIX/bin]
1529   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1530   --libexecdir=DIR        program executables [EPREFIX/libexec]
1531   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1532   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1533   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1534   --libdir=DIR            object code libraries [EPREFIX/lib]
1535   --includedir=DIR        C header files [PREFIX/include]
1536   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1537   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1538   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1539   --infodir=DIR           info documentation [DATAROOTDIR/info]
1540   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1541   --mandir=DIR            man documentation [DATAROOTDIR/man]
1542   --docdir=DIR            documentation root [DATAROOTDIR/doc/sntp]
1543   --htmldir=DIR           html documentation [DOCDIR]
1544   --dvidir=DIR            dvi documentation [DOCDIR]
1545   --pdfdir=DIR            pdf documentation [DOCDIR]
1546   --psdir=DIR             ps documentation [DOCDIR]
1547 _ACEOF
1548
1549   cat <<\_ACEOF
1550
1551 Program names:
1552   --program-prefix=PREFIX            prepend PREFIX to installed program names
1553   --program-suffix=SUFFIX            append SUFFIX to installed program names
1554   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1555
1556 System types:
1557   --build=BUILD     configure for building on BUILD [guessed]
1558   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1559 _ACEOF
1560 fi
1561
1562 if test -n "$ac_init_help"; then
1563   case $ac_init_help in
1564      short | recursive ) echo "Configuration of sntp 4.2.8p6:";;
1565    esac
1566   cat <<\_ACEOF
1567
1568 Optional Features:
1569   --disable-option-checking  ignore unrecognized --enable/--with options
1570   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1571   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1572   --enable-silent-rules   less verbose build output (undo: "make V=1")
1573   --disable-silent-rules  verbose build output (undo: "make V=0")
1574   --enable-dependency-tracking
1575                           do not reject slow dependency extractors
1576   --disable-dependency-tracking
1577                           speeds up one-time build
1578   defaults:               + yes, - no, s system-specific
1579   --enable-debugging      + include ntpd debugging code
1580   --enable-thread-support s use threads (+ if available)
1581   --enable-c99-snprintf   s force replacement
1582   --enable-clockctl       s Use /dev/clockctl for non-root clock control
1583   --enable-linuxcaps      + Use Linux capabilities for non-root clock control
1584   --enable-solarisprivs   + Use Solaris privileges for non-root clock control
1585   --enable-shared[=PKGS]  build shared libraries [default=no]
1586   --enable-static[=PKGS]  build static libraries [default=yes]
1587   --enable-fast-install[=PKGS]
1588                           optimize for fast installation [default=yes]
1589   --disable-libtool-lock  avoid locking (might break parallel builds)
1590   --disable-nls           disable nls support in libopts
1591   --enable-local-libopts  Use the supplied libopts tearoff code
1592   --enable-libopts-install
1593                           Install libopts with client installation
1594   --disable-optional-args not wanting optional option args
1595   --enable-local-libevent Force using the supplied libevent tearoff code
1596   --enable-ipv6           s use IPv6?
1597
1598   --enable-getifaddrs     + Enable the use of getifaddrs() [[yes|no]].
1599
1600 Optional Packages:
1601   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1602   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1603   --with-locfile=XXX      os-specific or "legacy"
1604   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1605   --with-lineeditlibs     edit,editline (readline may be specified if desired)
1606   --with-threads          with threads [auto]
1607   --with-yielding-select  with yielding select [auto]
1608   --with-pic              try to use only PIC/non-PIC objects [default=use
1609                           both]
1610   --with-sysroot=DIR Search for dependent libraries within DIR
1611                         (or the compiler's sysroot if not specified).
1612   --without-sntp          - disable building sntp and sntp/tests
1613   --with-autoopts-config  specify the config-info script
1614   --with-regex-header     a reg expr header is specified
1615   --with-libregex         libregex installation prefix
1616   --with-libregex-cflags  libregex compile flags
1617   --with-libregex-libs    libregex link command arguments
1618   --with-crypto           + =openssl,libcrypto
1619
1620   --with-openssl-libdir   + =/something/reasonable
1621
1622   --with-openssl-incdir   + =/something/reasonable
1623
1624   --without-rpath         s Disable auto-added -R linker paths
1625
1626   --with-kame             - =/usr/local/v6
1627   --with-gtest            Use the gtest framework (Default: if it's available)
1628
1629 Some influential environment variables:
1630   CC          C compiler command
1631   CFLAGS      C compiler flags
1632   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1633               nonstandard directory <lib dir>
1634   LIBS        libraries to pass to the linker, e.g. -l<library>
1635   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1636               you have headers in a nonstandard directory <include dir>
1637   CPP         C preprocessor
1638   CXX         C++ compiler command
1639   CXXFLAGS    C++ compiler flags
1640   CXXCPP      C++ preprocessor
1641
1642 Use these variables to override the choices made by `configure' or to help
1643 it to find libraries and programs with nonstandard names/locations.
1644
1645 Report bugs to <http://bugs.ntp.org./>.
1646 sntp home page: <http://www.ntp.org./>.
1647 _ACEOF
1648 ac_status=$?
1649 fi
1650
1651 if test "$ac_init_help" = "recursive"; then
1652   # If there are subdirs, report their specific --help.
1653   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1654     test -d "$ac_dir" ||
1655       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1656       continue
1657     ac_builddir=.
1658
1659 case "$ac_dir" in
1660 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1661 *)
1662   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1663   # A ".." for each directory in $ac_dir_suffix.
1664   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1665   case $ac_top_builddir_sub in
1666   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1667   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1668   esac ;;
1669 esac
1670 ac_abs_top_builddir=$ac_pwd
1671 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1672 # for backward compatibility:
1673 ac_top_builddir=$ac_top_build_prefix
1674
1675 case $srcdir in
1676   .)  # We are building in place.
1677     ac_srcdir=.
1678     ac_top_srcdir=$ac_top_builddir_sub
1679     ac_abs_top_srcdir=$ac_pwd ;;
1680   [\\/]* | ?:[\\/]* )  # Absolute name.
1681     ac_srcdir=$srcdir$ac_dir_suffix;
1682     ac_top_srcdir=$srcdir
1683     ac_abs_top_srcdir=$srcdir ;;
1684   *) # Relative name.
1685     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1686     ac_top_srcdir=$ac_top_build_prefix$srcdir
1687     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1688 esac
1689 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1690
1691     cd "$ac_dir" || { ac_status=$?; continue; }
1692     # Check for guested configure.
1693     if test -f "$ac_srcdir/configure.gnu"; then
1694       echo &&
1695       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1696     elif test -f "$ac_srcdir/configure"; then
1697       echo &&
1698       $SHELL "$ac_srcdir/configure" --help=recursive
1699     else
1700       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1701     fi || ac_status=$?
1702     cd "$ac_pwd" || { ac_status=$?; break; }
1703   done
1704 fi
1705
1706 test -n "$ac_init_help" && exit $ac_status
1707 if $ac_init_version; then
1708   cat <<\_ACEOF
1709 sntp configure 4.2.8p6
1710 generated by GNU Autoconf 2.69
1711
1712 Copyright (C) 2012 Free Software Foundation, Inc.
1713 This configure script is free software; the Free Software Foundation
1714 gives unlimited permission to copy, distribute and modify it.
1715 _ACEOF
1716   exit
1717 fi
1718
1719 ## ------------------------ ##
1720 ## Autoconf initialization. ##
1721 ## ------------------------ ##
1722
1723 # ac_fn_c_try_compile LINENO
1724 # --------------------------
1725 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1726 ac_fn_c_try_compile ()
1727 {
1728   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729   rm -f conftest.$ac_objext
1730   if { { ac_try="$ac_compile"
1731 case "(($ac_try" in
1732   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733   *) ac_try_echo=$ac_try;;
1734 esac
1735 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736 $as_echo "$ac_try_echo"; } >&5
1737   (eval "$ac_compile") 2>conftest.err
1738   ac_status=$?
1739   if test -s conftest.err; then
1740     grep -v '^ *+' conftest.err >conftest.er1
1741     cat conftest.er1 >&5
1742     mv -f conftest.er1 conftest.err
1743   fi
1744   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745   test $ac_status = 0; } && {
1746          test -z "$ac_c_werror_flag" ||
1747          test ! -s conftest.err
1748        } && test -s conftest.$ac_objext; then :
1749   ac_retval=0
1750 else
1751   $as_echo "$as_me: failed program was:" >&5
1752 sed 's/^/| /' conftest.$ac_ext >&5
1753
1754         ac_retval=1
1755 fi
1756   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1757   as_fn_set_status $ac_retval
1758
1759 } # ac_fn_c_try_compile
1760
1761 # ac_fn_c_try_cpp LINENO
1762 # ----------------------
1763 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1764 ac_fn_c_try_cpp ()
1765 {
1766   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1767   if { { ac_try="$ac_cpp conftest.$ac_ext"
1768 case "(($ac_try" in
1769   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1770   *) ac_try_echo=$ac_try;;
1771 esac
1772 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1773 $as_echo "$ac_try_echo"; } >&5
1774   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1775   ac_status=$?
1776   if test -s conftest.err; then
1777     grep -v '^ *+' conftest.err >conftest.er1
1778     cat conftest.er1 >&5
1779     mv -f conftest.er1 conftest.err
1780   fi
1781   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782   test $ac_status = 0; } > conftest.i && {
1783          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1784          test ! -s conftest.err
1785        }; then :
1786   ac_retval=0
1787 else
1788   $as_echo "$as_me: failed program was:" >&5
1789 sed 's/^/| /' conftest.$ac_ext >&5
1790
1791     ac_retval=1
1792 fi
1793   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1794   as_fn_set_status $ac_retval
1795
1796 } # ac_fn_c_try_cpp
1797
1798 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1799 # -------------------------------------------------------
1800 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1801 # the include files in INCLUDES and setting the cache variable VAR
1802 # accordingly.
1803 ac_fn_c_check_header_mongrel ()
1804 {
1805   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1806   if eval \${$3+:} false; then :
1807   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1808 $as_echo_n "checking for $2... " >&6; }
1809 if eval \${$3+:} false; then :
1810   $as_echo_n "(cached) " >&6
1811 fi
1812 eval ac_res=\$$3
1813                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1814 $as_echo "$ac_res" >&6; }
1815 else
1816   # Is the header compilable?
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1818 $as_echo_n "checking $2 usability... " >&6; }
1819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1820 /* end confdefs.h.  */
1821 $4
1822 #include <$2>
1823 _ACEOF
1824 if ac_fn_c_try_compile "$LINENO"; then :
1825   ac_header_compiler=yes
1826 else
1827   ac_header_compiler=no
1828 fi
1829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1831 $as_echo "$ac_header_compiler" >&6; }
1832
1833 # Is the header present?
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1835 $as_echo_n "checking $2 presence... " >&6; }
1836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1837 /* end confdefs.h.  */
1838 #include <$2>
1839 _ACEOF
1840 if ac_fn_c_try_cpp "$LINENO"; then :
1841   ac_header_preproc=yes
1842 else
1843   ac_header_preproc=no
1844 fi
1845 rm -f conftest.err conftest.i conftest.$ac_ext
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1847 $as_echo "$ac_header_preproc" >&6; }
1848
1849 # So?  What about this header?
1850 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1851   yes:no: )
1852     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1853 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1854     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1855 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1856     ;;
1857   no:yes:* )
1858     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1859 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1860     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1861 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1862     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1863 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1864     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1865 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1866     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1867 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1868 ( $as_echo "## ------------------------------------ ##
1869 ## Report this to http://bugs.ntp.org./ ##
1870 ## ------------------------------------ ##"
1871      ) | sed "s/^/$as_me: WARNING:     /" >&2
1872     ;;
1873 esac
1874   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1875 $as_echo_n "checking for $2... " >&6; }
1876 if eval \${$3+:} false; then :
1877   $as_echo_n "(cached) " >&6
1878 else
1879   eval "$3=\$ac_header_compiler"
1880 fi
1881 eval ac_res=\$$3
1882                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1883 $as_echo "$ac_res" >&6; }
1884 fi
1885   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1886
1887 } # ac_fn_c_check_header_mongrel
1888
1889 # ac_fn_c_try_run LINENO
1890 # ----------------------
1891 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1892 # that executables *can* be run.
1893 ac_fn_c_try_run ()
1894 {
1895   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1896   if { { ac_try="$ac_link"
1897 case "(($ac_try" in
1898   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1899   *) ac_try_echo=$ac_try;;
1900 esac
1901 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1902 $as_echo "$ac_try_echo"; } >&5
1903   (eval "$ac_link") 2>&5
1904   ac_status=$?
1905   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1906   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1907   { { case "(($ac_try" in
1908   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1909   *) ac_try_echo=$ac_try;;
1910 esac
1911 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1912 $as_echo "$ac_try_echo"; } >&5
1913   (eval "$ac_try") 2>&5
1914   ac_status=$?
1915   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1916   test $ac_status = 0; }; }; then :
1917   ac_retval=0
1918 else
1919   $as_echo "$as_me: program exited with status $ac_status" >&5
1920        $as_echo "$as_me: failed program was:" >&5
1921 sed 's/^/| /' conftest.$ac_ext >&5
1922
1923        ac_retval=$ac_status
1924 fi
1925   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1926   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1927   as_fn_set_status $ac_retval
1928
1929 } # ac_fn_c_try_run
1930
1931 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1932 # -------------------------------------------------------
1933 # Tests whether HEADER exists and can be compiled using the include files in
1934 # INCLUDES, setting the cache variable VAR accordingly.
1935 ac_fn_c_check_header_compile ()
1936 {
1937   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1939 $as_echo_n "checking for $2... " >&6; }
1940 if eval \${$3+:} false; then :
1941   $as_echo_n "(cached) " >&6
1942 else
1943   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944 /* end confdefs.h.  */
1945 $4
1946 #include <$2>
1947 _ACEOF
1948 if ac_fn_c_try_compile "$LINENO"; then :
1949   eval "$3=yes"
1950 else
1951   eval "$3=no"
1952 fi
1953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1954 fi
1955 eval ac_res=\$$3
1956                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1957 $as_echo "$ac_res" >&6; }
1958   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1959
1960 } # ac_fn_c_check_header_compile
1961
1962 # ac_fn_c_try_link LINENO
1963 # -----------------------
1964 # Try to link conftest.$ac_ext, and return whether this succeeded.
1965 ac_fn_c_try_link ()
1966 {
1967   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1968   rm -f conftest.$ac_objext conftest$ac_exeext
1969   if { { ac_try="$ac_link"
1970 case "(($ac_try" in
1971   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1972   *) ac_try_echo=$ac_try;;
1973 esac
1974 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1975 $as_echo "$ac_try_echo"; } >&5
1976   (eval "$ac_link") 2>conftest.err
1977   ac_status=$?
1978   if test -s conftest.err; then
1979     grep -v '^ *+' conftest.err >conftest.er1
1980     cat conftest.er1 >&5
1981     mv -f conftest.er1 conftest.err
1982   fi
1983   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1984   test $ac_status = 0; } && {
1985          test -z "$ac_c_werror_flag" ||
1986          test ! -s conftest.err
1987        } && test -s conftest$ac_exeext && {
1988          test "$cross_compiling" = yes ||
1989          test -x conftest$ac_exeext
1990        }; then :
1991   ac_retval=0
1992 else
1993   $as_echo "$as_me: failed program was:" >&5
1994 sed 's/^/| /' conftest.$ac_ext >&5
1995
1996         ac_retval=1
1997 fi
1998   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1999   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2000   # interfere with the next link command; also delete a directory that is
2001   # left behind by Apple's compiler.  We do this before executing the actions.
2002   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2003   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2004   as_fn_set_status $ac_retval
2005
2006 } # ac_fn_c_try_link
2007
2008 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2009 # -------------------------------------------
2010 # Tests whether TYPE exists after having included INCLUDES, setting cache
2011 # variable VAR accordingly.
2012 ac_fn_c_check_type ()
2013 {
2014   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2015   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2016 $as_echo_n "checking for $2... " >&6; }
2017 if eval \${$3+:} false; then :
2018   $as_echo_n "(cached) " >&6
2019 else
2020   eval "$3=no"
2021   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2022 /* end confdefs.h.  */
2023 $4
2024 int
2025 main ()
2026 {
2027 if (sizeof ($2))
2028          return 0;
2029   ;
2030   return 0;
2031 }
2032 _ACEOF
2033 if ac_fn_c_try_compile "$LINENO"; then :
2034   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2035 /* end confdefs.h.  */
2036 $4
2037 int
2038 main ()
2039 {
2040 if (sizeof (($2)))
2041             return 0;
2042   ;
2043   return 0;
2044 }
2045 _ACEOF
2046 if ac_fn_c_try_compile "$LINENO"; then :
2047
2048 else
2049   eval "$3=yes"
2050 fi
2051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2052 fi
2053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2054 fi
2055 eval ac_res=\$$3
2056                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2057 $as_echo "$ac_res" >&6; }
2058   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2059
2060 } # ac_fn_c_check_type
2061
2062 # ac_fn_c_check_func LINENO FUNC VAR
2063 # ----------------------------------
2064 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2065 ac_fn_c_check_func ()
2066 {
2067   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2068   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2069 $as_echo_n "checking for $2... " >&6; }
2070 if eval \${$3+:} false; then :
2071   $as_echo_n "(cached) " >&6
2072 else
2073   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2074 /* end confdefs.h.  */
2075 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2076    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2077 #define $2 innocuous_$2
2078
2079 /* System header to define __stub macros and hopefully few prototypes,
2080     which can conflict with char $2 (); below.
2081     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2082     <limits.h> exists even on freestanding compilers.  */
2083
2084 #ifdef __STDC__
2085 # include <limits.h>
2086 #else
2087 # include <assert.h>
2088 #endif
2089
2090 #undef $2
2091
2092 /* Override any GCC internal prototype to avoid an error.
2093    Use char because int might match the return type of a GCC
2094    builtin and then its argument prototype would still apply.  */
2095 #ifdef __cplusplus
2096 extern "C"
2097 #endif
2098 char $2 ();
2099 /* The GNU C library defines this for functions which it implements
2100     to always fail with ENOSYS.  Some functions are actually named
2101     something starting with __ and the normal name is an alias.  */
2102 #if defined __stub_$2 || defined __stub___$2
2103 choke me
2104 #endif
2105
2106 int
2107 main ()
2108 {
2109 return $2 ();
2110   ;
2111   return 0;
2112 }
2113 _ACEOF
2114 if ac_fn_c_try_link "$LINENO"; then :
2115   eval "$3=yes"
2116 else
2117   eval "$3=no"
2118 fi
2119 rm -f core conftest.err conftest.$ac_objext \
2120     conftest$ac_exeext conftest.$ac_ext
2121 fi
2122 eval ac_res=\$$3
2123                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2124 $as_echo "$ac_res" >&6; }
2125   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2126
2127 } # ac_fn_c_check_func
2128
2129 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2130 # ---------------------------------------------
2131 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2132 # accordingly.
2133 ac_fn_c_check_decl ()
2134 {
2135   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2136   as_decl_name=`echo $2|sed 's/ *(.*//'`
2137   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2138   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2139 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2140 if eval \${$3+:} false; then :
2141   $as_echo_n "(cached) " >&6
2142 else
2143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2144 /* end confdefs.h.  */
2145 $4
2146 int
2147 main ()
2148 {
2149 #ifndef $as_decl_name
2150 #ifdef __cplusplus
2151   (void) $as_decl_use;
2152 #else
2153   (void) $as_decl_name;
2154 #endif
2155 #endif
2156
2157   ;
2158   return 0;
2159 }
2160 _ACEOF
2161 if ac_fn_c_try_compile "$LINENO"; then :
2162   eval "$3=yes"
2163 else
2164   eval "$3=no"
2165 fi
2166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167 fi
2168 eval ac_res=\$$3
2169                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2170 $as_echo "$ac_res" >&6; }
2171   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2172
2173 } # ac_fn_c_check_decl
2174
2175 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2176 # --------------------------------------------
2177 # Tries to find the compile-time value of EXPR in a program that includes
2178 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2179 # computed
2180 ac_fn_c_compute_int ()
2181 {
2182   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2183   if test "$cross_compiling" = yes; then
2184     # Depending upon the size, compute the lo and hi bounds.
2185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2186 /* end confdefs.h.  */
2187 $4
2188 int
2189 main ()
2190 {
2191 static int test_array [1 - 2 * !(($2) >= 0)];
2192 test_array [0] = 0;
2193 return test_array [0];
2194
2195   ;
2196   return 0;
2197 }
2198 _ACEOF
2199 if ac_fn_c_try_compile "$LINENO"; then :
2200   ac_lo=0 ac_mid=0
2201   while :; do
2202     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203 /* end confdefs.h.  */
2204 $4
2205 int
2206 main ()
2207 {
2208 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2209 test_array [0] = 0;
2210 return test_array [0];
2211
2212   ;
2213   return 0;
2214 }
2215 _ACEOF
2216 if ac_fn_c_try_compile "$LINENO"; then :
2217   ac_hi=$ac_mid; break
2218 else
2219   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2220                         if test $ac_lo -le $ac_mid; then
2221                           ac_lo= ac_hi=
2222                           break
2223                         fi
2224                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2225 fi
2226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2227   done
2228 else
2229   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2230 /* end confdefs.h.  */
2231 $4
2232 int
2233 main ()
2234 {
2235 static int test_array [1 - 2 * !(($2) < 0)];
2236 test_array [0] = 0;
2237 return test_array [0];
2238
2239   ;
2240   return 0;
2241 }
2242 _ACEOF
2243 if ac_fn_c_try_compile "$LINENO"; then :
2244   ac_hi=-1 ac_mid=-1
2245   while :; do
2246     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247 /* end confdefs.h.  */
2248 $4
2249 int
2250 main ()
2251 {
2252 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2253 test_array [0] = 0;
2254 return test_array [0];
2255
2256   ;
2257   return 0;
2258 }
2259 _ACEOF
2260 if ac_fn_c_try_compile "$LINENO"; then :
2261   ac_lo=$ac_mid; break
2262 else
2263   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2264                         if test $ac_mid -le $ac_hi; then
2265                           ac_lo= ac_hi=
2266                           break
2267                         fi
2268                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2269 fi
2270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2271   done
2272 else
2273   ac_lo= ac_hi=
2274 fi
2275 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2276 fi
2277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2278 # Binary search between lo and hi bounds.
2279 while test "x$ac_lo" != "x$ac_hi"; do
2280   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2282 /* end confdefs.h.  */
2283 $4
2284 int
2285 main ()
2286 {
2287 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2288 test_array [0] = 0;
2289 return test_array [0];
2290
2291   ;
2292   return 0;
2293 }
2294 _ACEOF
2295 if ac_fn_c_try_compile "$LINENO"; then :
2296   ac_hi=$ac_mid
2297 else
2298   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2299 fi
2300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301 done
2302 case $ac_lo in #((
2303 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2304 '') ac_retval=1 ;;
2305 esac
2306   else
2307     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308 /* end confdefs.h.  */
2309 $4
2310 static long int longval () { return $2; }
2311 static unsigned long int ulongval () { return $2; }
2312 #include <stdio.h>
2313 #include <stdlib.h>
2314 int
2315 main ()
2316 {
2317
2318   FILE *f = fopen ("conftest.val", "w");
2319   if (! f)
2320     return 1;
2321   if (($2) < 0)
2322     {
2323       long int i = longval ();
2324       if (i != ($2))
2325         return 1;
2326       fprintf (f, "%ld", i);
2327     }
2328   else
2329     {
2330       unsigned long int i = ulongval ();
2331       if (i != ($2))
2332         return 1;
2333       fprintf (f, "%lu", i);
2334     }
2335   /* Do not output a trailing newline, as this causes \r\n confusion
2336      on some platforms.  */
2337   return ferror (f) || fclose (f) != 0;
2338
2339   ;
2340   return 0;
2341 }
2342 _ACEOF
2343 if ac_fn_c_try_run "$LINENO"; then :
2344   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2345 else
2346   ac_retval=1
2347 fi
2348 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2349   conftest.$ac_objext conftest.beam conftest.$ac_ext
2350 rm -f conftest.val
2351
2352   fi
2353   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2354   as_fn_set_status $ac_retval
2355
2356 } # ac_fn_c_compute_int
2357
2358 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2359 # ----------------------------------------------------
2360 # Tries to find if the field MEMBER exists in type AGGR, after including
2361 # INCLUDES, setting cache variable VAR accordingly.
2362 ac_fn_c_check_member ()
2363 {
2364   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2365   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2366 $as_echo_n "checking for $2.$3... " >&6; }
2367 if eval \${$4+:} false; then :
2368   $as_echo_n "(cached) " >&6
2369 else
2370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2371 /* end confdefs.h.  */
2372 $5
2373 int
2374 main ()
2375 {
2376 static $2 ac_aggr;
2377 if (ac_aggr.$3)
2378 return 0;
2379   ;
2380   return 0;
2381 }
2382 _ACEOF
2383 if ac_fn_c_try_compile "$LINENO"; then :
2384   eval "$4=yes"
2385 else
2386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2387 /* end confdefs.h.  */
2388 $5
2389 int
2390 main ()
2391 {
2392 static $2 ac_aggr;
2393 if (sizeof ac_aggr.$3)
2394 return 0;
2395   ;
2396   return 0;
2397 }
2398 _ACEOF
2399 if ac_fn_c_try_compile "$LINENO"; then :
2400   eval "$4=yes"
2401 else
2402   eval "$4=no"
2403 fi
2404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405 fi
2406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2407 fi
2408 eval ac_res=\$$4
2409                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2410 $as_echo "$ac_res" >&6; }
2411   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2412
2413 } # ac_fn_c_check_member
2414
2415 # ac_fn_cxx_try_compile LINENO
2416 # ----------------------------
2417 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2418 ac_fn_cxx_try_compile ()
2419 {
2420   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2421   rm -f conftest.$ac_objext
2422   if { { ac_try="$ac_compile"
2423 case "(($ac_try" in
2424   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2425   *) ac_try_echo=$ac_try;;
2426 esac
2427 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2428 $as_echo "$ac_try_echo"; } >&5
2429   (eval "$ac_compile") 2>conftest.err
2430   ac_status=$?
2431   if test -s conftest.err; then
2432     grep -v '^ *+' conftest.err >conftest.er1
2433     cat conftest.er1 >&5
2434     mv -f conftest.er1 conftest.err
2435   fi
2436   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2437   test $ac_status = 0; } && {
2438          test -z "$ac_cxx_werror_flag" ||
2439          test ! -s conftest.err
2440        } && test -s conftest.$ac_objext; then :
2441   ac_retval=0
2442 else
2443   $as_echo "$as_me: failed program was:" >&5
2444 sed 's/^/| /' conftest.$ac_ext >&5
2445
2446         ac_retval=1
2447 fi
2448   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2449   as_fn_set_status $ac_retval
2450
2451 } # ac_fn_cxx_try_compile
2452
2453 # ac_fn_cxx_try_cpp LINENO
2454 # ------------------------
2455 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2456 ac_fn_cxx_try_cpp ()
2457 {
2458   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2459   if { { ac_try="$ac_cpp conftest.$ac_ext"
2460 case "(($ac_try" in
2461   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2462   *) ac_try_echo=$ac_try;;
2463 esac
2464 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2465 $as_echo "$ac_try_echo"; } >&5
2466   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2467   ac_status=$?
2468   if test -s conftest.err; then
2469     grep -v '^ *+' conftest.err >conftest.er1
2470     cat conftest.er1 >&5
2471     mv -f conftest.er1 conftest.err
2472   fi
2473   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2474   test $ac_status = 0; } > conftest.i && {
2475          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2476          test ! -s conftest.err
2477        }; then :
2478   ac_retval=0
2479 else
2480   $as_echo "$as_me: failed program was:" >&5
2481 sed 's/^/| /' conftest.$ac_ext >&5
2482
2483     ac_retval=1
2484 fi
2485   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2486   as_fn_set_status $ac_retval
2487
2488 } # ac_fn_cxx_try_cpp
2489
2490 # ac_fn_cxx_try_link LINENO
2491 # -------------------------
2492 # Try to link conftest.$ac_ext, and return whether this succeeded.
2493 ac_fn_cxx_try_link ()
2494 {
2495   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2496   rm -f conftest.$ac_objext conftest$ac_exeext
2497   if { { ac_try="$ac_link"
2498 case "(($ac_try" in
2499   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2500   *) ac_try_echo=$ac_try;;
2501 esac
2502 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2503 $as_echo "$ac_try_echo"; } >&5
2504   (eval "$ac_link") 2>conftest.err
2505   ac_status=$?
2506   if test -s conftest.err; then
2507     grep -v '^ *+' conftest.err >conftest.er1
2508     cat conftest.er1 >&5
2509     mv -f conftest.er1 conftest.err
2510   fi
2511   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2512   test $ac_status = 0; } && {
2513          test -z "$ac_cxx_werror_flag" ||
2514          test ! -s conftest.err
2515        } && test -s conftest$ac_exeext && {
2516          test "$cross_compiling" = yes ||
2517          test -x conftest$ac_exeext
2518        }; then :
2519   ac_retval=0
2520 else
2521   $as_echo "$as_me: failed program was:" >&5
2522 sed 's/^/| /' conftest.$ac_ext >&5
2523
2524         ac_retval=1
2525 fi
2526   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2527   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2528   # interfere with the next link command; also delete a directory that is
2529   # left behind by Apple's compiler.  We do this before executing the actions.
2530   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2531   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2532   as_fn_set_status $ac_retval
2533
2534 } # ac_fn_cxx_try_link
2535 cat >config.log <<_ACEOF
2536 This file contains any messages produced by compilers while
2537 running configure, to aid debugging if configure makes a mistake.
2538
2539 It was created by sntp $as_me 4.2.8p6, which was
2540 generated by GNU Autoconf 2.69.  Invocation command line was
2541
2542   $ $0 $@
2543
2544 _ACEOF
2545 exec 5>>config.log
2546 {
2547 cat <<_ASUNAME
2548 ## --------- ##
2549 ## Platform. ##
2550 ## --------- ##
2551
2552 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2553 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2554 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2555 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2556 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2557
2558 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2559 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2560
2561 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2562 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2563 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2564 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2565 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2566 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2567 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2568
2569 _ASUNAME
2570
2571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2572 for as_dir in $PATH
2573 do
2574   IFS=$as_save_IFS
2575   test -z "$as_dir" && as_dir=.
2576     $as_echo "PATH: $as_dir"
2577   done
2578 IFS=$as_save_IFS
2579
2580 } >&5
2581
2582 cat >&5 <<_ACEOF
2583
2584
2585 ## ----------- ##
2586 ## Core tests. ##
2587 ## ----------- ##
2588
2589 _ACEOF
2590
2591
2592 # Keep a trace of the command line.
2593 # Strip out --no-create and --no-recursion so they do not pile up.
2594 # Strip out --silent because we don't want to record it for future runs.
2595 # Also quote any args containing shell meta-characters.
2596 # Make two passes to allow for proper duplicate-argument suppression.
2597 ac_configure_args=
2598 ac_configure_args0=
2599 ac_configure_args1=
2600 ac_must_keep_next=false
2601 for ac_pass in 1 2
2602 do
2603   for ac_arg
2604   do
2605     case $ac_arg in
2606     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2607     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2608     | -silent | --silent | --silen | --sile | --sil)
2609       continue ;;
2610     *\'*)
2611       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2612     esac
2613     case $ac_pass in
2614     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2615     2)
2616       as_fn_append ac_configure_args1 " '$ac_arg'"
2617       if test $ac_must_keep_next = true; then
2618         ac_must_keep_next=false # Got value, back to normal.
2619       else
2620         case $ac_arg in
2621           *=* | --config-cache | -C | -disable-* | --disable-* \
2622           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2623           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2624           | -with-* | --with-* | -without-* | --without-* | --x)
2625             case "$ac_configure_args0 " in
2626               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2627             esac
2628             ;;
2629           -* ) ac_must_keep_next=true ;;
2630         esac
2631       fi
2632       as_fn_append ac_configure_args " '$ac_arg'"
2633       ;;
2634     esac
2635   done
2636 done
2637 { ac_configure_args0=; unset ac_configure_args0;}
2638 { ac_configure_args1=; unset ac_configure_args1;}
2639
2640 # When interrupted or exit'd, cleanup temporary files, and complete
2641 # config.log.  We remove comments because anyway the quotes in there
2642 # would cause problems or look ugly.
2643 # WARNING: Use '\'' to represent an apostrophe within the trap.
2644 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2645 trap 'exit_status=$?
2646   # Save into config.log some information that might help in debugging.
2647   {
2648     echo
2649
2650     $as_echo "## ---------------- ##
2651 ## Cache variables. ##
2652 ## ---------------- ##"
2653     echo
2654     # The following way of writing the cache mishandles newlines in values,
2655 (
2656   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2657     eval ac_val=\$$ac_var
2658     case $ac_val in #(
2659     *${as_nl}*)
2660       case $ac_var in #(
2661       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2662 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2663       esac
2664       case $ac_var in #(
2665       _ | IFS | as_nl) ;; #(
2666       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2667       *) { eval $ac_var=; unset $ac_var;} ;;
2668       esac ;;
2669     esac
2670   done
2671   (set) 2>&1 |
2672     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2673     *${as_nl}ac_space=\ *)
2674       sed -n \
2675         "s/'\''/'\''\\\\'\'''\''/g;
2676           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2677       ;; #(
2678     *)
2679       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2680       ;;
2681     esac |
2682     sort
2683 )
2684     echo
2685
2686     $as_echo "## ----------------- ##
2687 ## Output variables. ##
2688 ## ----------------- ##"
2689     echo
2690     for ac_var in $ac_subst_vars
2691     do
2692       eval ac_val=\$$ac_var
2693       case $ac_val in
2694       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2695       esac
2696       $as_echo "$ac_var='\''$ac_val'\''"
2697     done | sort
2698     echo
2699
2700     if test -n "$ac_subst_files"; then
2701       $as_echo "## ------------------- ##
2702 ## File substitutions. ##
2703 ## ------------------- ##"
2704       echo
2705       for ac_var in $ac_subst_files
2706       do
2707         eval ac_val=\$$ac_var
2708         case $ac_val in
2709         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2710         esac
2711         $as_echo "$ac_var='\''$ac_val'\''"
2712       done | sort
2713       echo
2714     fi
2715
2716     if test -s confdefs.h; then
2717       $as_echo "## ----------- ##
2718 ## confdefs.h. ##
2719 ## ----------- ##"
2720       echo
2721       cat confdefs.h
2722       echo
2723     fi
2724     test "$ac_signal" != 0 &&
2725       $as_echo "$as_me: caught signal $ac_signal"
2726     $as_echo "$as_me: exit $exit_status"
2727   } >&5
2728   rm -f core *.core core.conftest.* &&
2729     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2730     exit $exit_status
2731 ' 0
2732 for ac_signal in 1 2 13 15; do
2733   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2734 done
2735 ac_signal=0
2736
2737 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2738 rm -f -r conftest* confdefs.h
2739
2740 $as_echo "/* confdefs.h */" > confdefs.h
2741
2742 # Predefined preprocessor variables.
2743
2744 cat >>confdefs.h <<_ACEOF
2745 #define PACKAGE_NAME "$PACKAGE_NAME"
2746 _ACEOF
2747
2748 cat >>confdefs.h <<_ACEOF
2749 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2750 _ACEOF
2751
2752 cat >>confdefs.h <<_ACEOF
2753 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2754 _ACEOF
2755
2756 cat >>confdefs.h <<_ACEOF
2757 #define PACKAGE_STRING "$PACKAGE_STRING"
2758 _ACEOF
2759
2760 cat >>confdefs.h <<_ACEOF
2761 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2762 _ACEOF
2763
2764 cat >>confdefs.h <<_ACEOF
2765 #define PACKAGE_URL "$PACKAGE_URL"
2766 _ACEOF
2767
2768
2769 # Let the site file select an alternate cache file if it wants to.
2770 # Prefer an explicitly selected file to automatically selected ones.
2771 ac_site_file1=NONE
2772 ac_site_file2=NONE
2773 if test -n "$CONFIG_SITE"; then
2774   # We do not want a PATH search for config.site.
2775   case $CONFIG_SITE in #((
2776     -*)  ac_site_file1=./$CONFIG_SITE;;
2777     */*) ac_site_file1=$CONFIG_SITE;;
2778     *)   ac_site_file1=./$CONFIG_SITE;;
2779   esac
2780 elif test "x$prefix" != xNONE; then
2781   ac_site_file1=$prefix/share/config.site
2782   ac_site_file2=$prefix/etc/config.site
2783 else
2784   ac_site_file1=$ac_default_prefix/share/config.site
2785   ac_site_file2=$ac_default_prefix/etc/config.site
2786 fi
2787 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2788 do
2789   test "x$ac_site_file" = xNONE && continue
2790   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2791     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2792 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2793     sed 's/^/| /' "$ac_site_file" >&5
2794     . "$ac_site_file" \
2795       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2796 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2797 as_fn_error $? "failed to load site script $ac_site_file
2798 See \`config.log' for more details" "$LINENO" 5; }
2799   fi
2800 done
2801
2802 if test -r "$cache_file"; then
2803   # Some versions of bash will fail to source /dev/null (special files
2804   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2805   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2806     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2807 $as_echo "$as_me: loading cache $cache_file" >&6;}
2808     case $cache_file in
2809       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2810       *)                      . "./$cache_file";;
2811     esac
2812   fi
2813 else
2814   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2815 $as_echo "$as_me: creating cache $cache_file" >&6;}
2816   >$cache_file
2817 fi
2818
2819 as_fn_append ac_header_list " stdarg.h"
2820 # Check that the precious variables saved in the cache have kept the same
2821 # value.
2822 ac_cache_corrupted=false
2823 for ac_var in $ac_precious_vars; do
2824   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2825   eval ac_new_set=\$ac_env_${ac_var}_set
2826   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2827   eval ac_new_val=\$ac_env_${ac_var}_value
2828   case $ac_old_set,$ac_new_set in
2829     set,)
2830       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2831 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2832       ac_cache_corrupted=: ;;
2833     ,set)
2834       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2835 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2836       ac_cache_corrupted=: ;;
2837     ,);;
2838     *)
2839       if test "x$ac_old_val" != "x$ac_new_val"; then
2840         # differences in whitespace do not lead to failure.
2841         ac_old_val_w=`echo x $ac_old_val`
2842         ac_new_val_w=`echo x $ac_new_val`
2843         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2844           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2845 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2846           ac_cache_corrupted=:
2847         else
2848           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2849 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2850           eval $ac_var=\$ac_old_val
2851         fi
2852         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2853 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2854         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2855 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2856       fi;;
2857   esac
2858   # Pass precious variables to config.status.
2859   if test "$ac_new_set" = set; then
2860     case $ac_new_val in
2861     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2862     *) ac_arg=$ac_var=$ac_new_val ;;
2863     esac
2864     case " $ac_configure_args " in
2865       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2866       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2867     esac
2868   fi
2869 done
2870 if $ac_cache_corrupted; then
2871   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2872 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2873   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2874 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2875   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2876 fi
2877 ## -------------------- ##
2878 ## Main body of script. ##
2879 ## -------------------- ##
2880
2881 ac_ext=c
2882 ac_cpp='$CPP $CPPFLAGS'
2883 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2884 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2885 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2886
2887
2888
2889 ac_aux_dir=
2890 for ac_dir in libevent/build-aux "$srcdir"/libevent/build-aux; do
2891   if test -f "$ac_dir/install-sh"; then
2892     ac_aux_dir=$ac_dir
2893     ac_install_sh="$ac_aux_dir/install-sh -c"
2894     break
2895   elif test -f "$ac_dir/install.sh"; then
2896     ac_aux_dir=$ac_dir
2897     ac_install_sh="$ac_aux_dir/install.sh -c"
2898     break
2899   elif test -f "$ac_dir/shtool"; then
2900     ac_aux_dir=$ac_dir
2901     ac_install_sh="$ac_aux_dir/shtool install -c"
2902     break
2903   fi
2904 done
2905 if test -z "$ac_aux_dir"; then
2906   as_fn_error $? "cannot find install-sh, install.sh, or shtool in libevent/build-aux \"$srcdir\"/libevent/build-aux" "$LINENO" 5
2907 fi
2908
2909 # These three variables are undocumented and unsupported,
2910 # and are intended to be withdrawn in a future Autoconf release.
2911 # They can cause serious problems if a builder's source tree is in a directory
2912 # whose full name contains unusual characters.
2913 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2914 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2915 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2916
2917
2918 ac_ext=c
2919 ac_cpp='$CPP $CPPFLAGS'
2920 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2921 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2922 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2923
2924
2925 # Bump sntp_configure_cache_version for each change to configure.ac or
2926 # .m4 files which invalidates cached values from previous configure
2927 # runs.
2928 #
2929 # If the change affects cache variables used only by the main NTP
2930 # configure.ac, then only its version number should be bumped, while
2931 # the subdir configure.ac version numbers should be unchanged.  The
2932 # same is true for a test/variable that is used only by one subdir
2933 # being changed incompatibly; only that subdir's cache version needs
2934 # bumping.
2935 #
2936 # If a change affects variables shared by all NTP configure scripts,
2937 # please bump the version numbers of each.  If you are not sure, the
2938 # safe choice is to bump all on any cache-invalidating change.
2939 #
2940 # In order to avoid the risk of version stamp collision between -stable
2941 # and -dev branches, do not simply increment the version, instead use
2942 # the date YYYYMMDD optionally with -HHMM if there is more than one
2943 # bump in a day.
2944
2945 sntp_configure_cache_version=20120806
2946
2947 # When the version of config.cache and configure do not
2948 # match, NTP_CACHEVERSION will flush the cache.
2949
2950
2951
2952     ntp_cache_flush=1
2953
2954     case "$ntp_cv_sntp_cache_version" in
2955      $sntp_configure_cache_version)
2956         # same version, good
2957         ntp_cache_flush=0
2958         ;;
2959      '')
2960         # No cache, predates ntp_cv_sntp_cache_version, or is empty.
2961         case "$cache_file" in
2962          /dev/null)
2963             ntp_cache_flush=0
2964             ;;
2965          *)
2966             case "$NTP_CACHEVERSION_PARENT" in
2967              '')
2968                 # Do not clear the cache immediately after it is created
2969                 # empty as it is noisy.  Differentiate a newly-created
2970                 # config.cache from one predating the cache version
2971                 # mechanism by looking for the first cached variable set
2972                 # by Autoconf
2973                 case "$ac_cv_path_install" in
2974                  '')
2975                     # empty config.cache file
2976                     ntp_cache_flush=0
2977                 esac
2978                 ;;
2979              *)
2980                 # Parent configure just created cache from empty,
2981                 # flushing would be counterproductive.
2982                 ntp_cache_flush=0;
2983                 ;;
2984             esac
2985         esac
2986         ;;
2987      *)
2988         # configure cache version mismatches config.cache version
2989         ;;
2990     esac
2991
2992     case "$ntp_cache_flush" in
2993      1)
2994         c_version="${ntp_cv_sntp_cache_version:-(no version found)}"
2995
2996         # Do we flush all variables or exclude others' version stamps?
2997
2998         case "$NTP_CACHEVERSION_PARENT" in
2999          '')
3000             # Clear all *_cv_* variables including our child subdirs'
3001             # ntp_cv_*_cache_version variables.  This prevents subdir
3002             # configure scripts from noticing a version mismatch just
3003             # after the top configure in the invocation cleared and
3004             # recreated the cache.
3005
3006             c_varname_list=`set |
3007                             sed -n -e 's/=.*$//' \
3008                                    -e '/_cv_/p'
3009                            `
3010             ;;
3011          *)
3012             # This is not the top configure this particular invocation.
3013             # Clear all *_cv_* variables sparing the version stamps
3014             # of other configure scripts, so we don't trigger
3015             # useless repeated clearings.
3016
3017             c_varname_list=`set |
3018                             sed -n -e 's/=.*$//' \
3019                                    -e '/ntp_cv_.*_cache_version/d' \
3020                                    -e '/_cv_/p'
3021                            `
3022         esac
3023
3024         for c_varname in $c_varname_list
3025         do
3026                                                     { eval $c_varname=; unset $c_varname; }
3027         done
3028
3029         { $as_echo "$as_me:${as_lineno-$LINENO}: $cache_file saved by another version, ignored." >&5
3030 $as_echo "$as_me: $cache_file saved by another version, ignored." >&6;}
3031         { $as_echo "$as_me:${as_lineno-$LINENO}: configure script cache version: $sntp_configure_cache_version" >&5
3032 $as_echo "$as_me: configure script cache version: $sntp_configure_cache_version" >&6;}
3033         { $as_echo "$as_me:${as_lineno-$LINENO}: $cache_file version: $c_version" >&5
3034 $as_echo "$as_me: $cache_file version: $c_version" >&6;}
3035         { c_varname=; unset c_varname;}
3036         { c_varname_list=; unset c_varname_list;}
3037         { c_version=; unset c_version;}
3038     esac
3039
3040     { ntp_cache_flush=; unset ntp_cache_flush;}
3041
3042     # save configure version in config.cache for next time
3043     ntp_cv_sntp_cache_version="$sntp_configure_cache_version"
3044
3045     # let any subdir configure.ac NTP_CACHEVERSION invocations
3046     # know they are not the top level.
3047     NTP_CACHEVERSION_PARENT='sntp' ; export NTP_CACHEVERSION_PARENT
3048
3049
3050 am__api_version='1.15'
3051
3052 # Find a good install program.  We prefer a C program (faster),
3053 # so one script is as good as another.  But avoid the broken or
3054 # incompatible versions:
3055 # SysV /etc/install, /usr/sbin/install
3056 # SunOS /usr/etc/install
3057 # IRIX /sbin/install
3058 # AIX /bin/install
3059 # AmigaOS /C/install, which installs bootblocks on floppy discs
3060 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3061 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3062 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3063 # OS/2's system install, which has a completely different semantic
3064 # ./install, which can be erroneously created by make from ./install.sh.
3065 # Reject install programs that cannot install multiple files.
3066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3067 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3068 if test -z "$INSTALL"; then
3069 if ${ac_cv_path_install+:} false; then :
3070   $as_echo_n "(cached) " >&6
3071 else
3072   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3073 for as_dir in $PATH
3074 do
3075   IFS=$as_save_IFS
3076   test -z "$as_dir" && as_dir=.
3077     # Account for people who put trailing slashes in PATH elements.
3078 case $as_dir/ in #((
3079   ./ | .// | /[cC]/* | \
3080   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3081   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3082   /usr/ucb/* ) ;;
3083   *)
3084     # OSF1 and SCO ODT 3.0 have their own names for install.
3085     # Don't use installbsd from OSF since it installs stuff as root
3086     # by default.
3087     for ac_prog in ginstall scoinst install; do
3088       for ac_exec_ext in '' $ac_executable_extensions; do
3089         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3090           if test $ac_prog = install &&
3091             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3092             # AIX install.  It has an incompatible calling convention.
3093             :
3094           elif test $ac_prog = install &&
3095             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3096             # program-specific install script used by HP pwplus--don't use.
3097             :
3098           else
3099             rm -rf conftest.one conftest.two conftest.dir
3100             echo one > conftest.one
3101             echo two > conftest.two
3102             mkdir conftest.dir
3103             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3104               test -s conftest.one && test -s conftest.two &&
3105               test -s conftest.dir/conftest.one &&
3106               test -s conftest.dir/conftest.two
3107             then
3108               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3109               break 3
3110             fi
3111           fi
3112         fi
3113       done
3114     done
3115     ;;
3116 esac
3117
3118   done
3119 IFS=$as_save_IFS
3120
3121 rm -rf conftest.one conftest.two conftest.dir
3122
3123 fi
3124   if test "${ac_cv_path_install+set}" = set; then
3125     INSTALL=$ac_cv_path_install
3126   else
3127     # As a last resort, use the slow shell script.  Don't cache a
3128     # value for INSTALL within a source directory, because that will
3129     # break other packages using the cache if that directory is
3130     # removed, or if the value is a relative name.
3131     INSTALL=$ac_install_sh
3132   fi
3133 fi
3134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3135 $as_echo "$INSTALL" >&6; }
3136
3137 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3138 # It thinks the first close brace ends the variable substitution.
3139 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3140
3141 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3142
3143 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3144
3145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3146 $as_echo_n "checking whether build environment is sane... " >&6; }
3147 # Reject unsafe characters in $srcdir or the absolute working directory
3148 # name.  Accept space and tab only in the latter.
3149 am_lf='
3150 '
3151 case `pwd` in
3152   *[\\\"\#\$\&\'\`$am_lf]*)
3153     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3154 esac
3155 case $srcdir in
3156   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3157     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3158 esac
3159
3160 # Do 'set' in a subshell so we don't clobber the current shell's
3161 # arguments.  Must try -L first in case configure is actually a
3162 # symlink; some systems play weird games with the mod time of symlinks
3163 # (eg FreeBSD returns the mod time of the symlink's containing
3164 # directory).
3165 if (
3166    am_has_slept=no
3167    for am_try in 1 2; do
3168      echo "timestamp, slept: $am_has_slept" > conftest.file
3169      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3170      if test "$*" = "X"; then
3171         # -L didn't work.
3172         set X `ls -t "$srcdir/configure" conftest.file`
3173      fi
3174      if test "$*" != "X $srcdir/configure conftest.file" \
3175         && test "$*" != "X conftest.file $srcdir/configure"; then
3176
3177         # If neither matched, then we have a broken ls.  This can happen
3178         # if, for instance, CONFIG_SHELL is bash and it inherits a
3179         # broken ls alias from the environment.  This has actually
3180         # happened.  Such a system could not be considered "sane".
3181         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3182   alias in your environment" "$LINENO" 5
3183      fi
3184      if test "$2" = conftest.file || test $am_try -eq 2; then
3185        break
3186      fi
3187      # Just in case.
3188      sleep 1
3189      am_has_slept=yes
3190    done
3191    test "$2" = conftest.file
3192    )
3193 then
3194    # Ok.
3195    :
3196 else
3197    as_fn_error $? "newly created file is older than distributed files!
3198 Check your system clock" "$LINENO" 5
3199 fi
3200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3201 $as_echo "yes" >&6; }
3202 # If we didn't sleep, we still need to ensure time stamps of config.status and
3203 # generated files are strictly newer.
3204 am_sleep_pid=
3205 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3206   ( sleep 1 ) &
3207   am_sleep_pid=$!
3208 fi
3209
3210 rm -f conftest.file
3211
3212 test "$program_prefix" != NONE &&
3213   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3214 # Use a double $ so make ignores it.
3215 test "$program_suffix" != NONE &&
3216   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3217 # Double any \ or $.
3218 # By default was `s,x,x', remove it if useless.
3219 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3220 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3221
3222 # Expand $ac_aux_dir to an absolute path.
3223 am_aux_dir=`cd "$ac_aux_dir" && pwd`
3224
3225 if test x"${MISSING+set}" != xset; then
3226   case $am_aux_dir in
3227   *\ * | *\     *)
3228     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3229   *)
3230     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3231   esac
3232 fi
3233 # Use eval to expand $SHELL
3234 if eval "$MISSING --is-lightweight"; then
3235   am_missing_run="$MISSING "
3236 else
3237   am_missing_run=
3238   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3239 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3240 fi
3241
3242 if test x"${install_sh+set}" != xset; then
3243   case $am_aux_dir in
3244   *\ * | *\     *)
3245     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3246   *)
3247     install_sh="\${SHELL} $am_aux_dir/install-sh"
3248   esac
3249 fi
3250
3251 # Installed binaries are usually stripped using 'strip' when the user
3252 # run "make install-strip".  However 'strip' might not be the right
3253 # tool to use in cross-compilation environments, therefore Automake
3254 # will honor the 'STRIP' environment variable to overrule this program.
3255 if test "$cross_compiling" != no; then
3256   if test -n "$ac_tool_prefix"; then
3257   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3258 set dummy ${ac_tool_prefix}strip; ac_word=$2
3259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3260 $as_echo_n "checking for $ac_word... " >&6; }
3261 if ${ac_cv_prog_STRIP+:} false; then :
3262   $as_echo_n "(cached) " >&6
3263 else
3264   if test -n "$STRIP"; then
3265   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3266 else
3267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3268 for as_dir in $PATH
3269 do
3270   IFS=$as_save_IFS
3271   test -z "$as_dir" && as_dir=.
3272     for ac_exec_ext in '' $ac_executable_extensions; do
3273   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3274     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3275     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3276     break 2
3277   fi
3278 done
3279   done
3280 IFS=$as_save_IFS
3281
3282 fi
3283 fi
3284 STRIP=$ac_cv_prog_STRIP
3285 if test -n "$STRIP"; then
3286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3287 $as_echo "$STRIP" >&6; }
3288 else
3289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3290 $as_echo "no" >&6; }
3291 fi
3292
3293
3294 fi
3295 if test -z "$ac_cv_prog_STRIP"; then
3296   ac_ct_STRIP=$STRIP
3297   # Extract the first word of "strip", so it can be a program name with args.
3298 set dummy strip; ac_word=$2
3299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3300 $as_echo_n "checking for $ac_word... " >&6; }
3301 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3302   $as_echo_n "(cached) " >&6
3303 else
3304   if test -n "$ac_ct_STRIP"; then
3305   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3306 else
3307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3308 for as_dir in $PATH
3309 do
3310   IFS=$as_save_IFS
3311   test -z "$as_dir" && as_dir=.
3312     for ac_exec_ext in '' $ac_executable_extensions; do
3313   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3314     ac_cv_prog_ac_ct_STRIP="strip"
3315     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3316     break 2
3317   fi
3318 done
3319   done
3320 IFS=$as_save_IFS
3321
3322 fi
3323 fi
3324 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3325 if test -n "$ac_ct_STRIP"; then
3326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3327 $as_echo "$ac_ct_STRIP" >&6; }
3328 else
3329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3330 $as_echo "no" >&6; }
3331 fi
3332
3333   if test "x$ac_ct_STRIP" = x; then
3334     STRIP=":"
3335   else
3336     case $cross_compiling:$ac_tool_warned in
3337 yes:)
3338 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3339 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3340 ac_tool_warned=yes ;;
3341 esac
3342     STRIP=$ac_ct_STRIP
3343   fi
3344 else
3345   STRIP="$ac_cv_prog_STRIP"
3346 fi
3347
3348 fi
3349 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3350
3351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3352 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3353 if test -z "$MKDIR_P"; then
3354   if ${ac_cv_path_mkdir+:} false; then :
3355   $as_echo_n "(cached) " >&6
3356 else
3357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3358 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3359 do
3360   IFS=$as_save_IFS
3361   test -z "$as_dir" && as_dir=.
3362     for ac_prog in mkdir gmkdir; do
3363          for ac_exec_ext in '' $ac_executable_extensions; do
3364            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3365            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3366              'mkdir (GNU coreutils) '* | \
3367              'mkdir (coreutils) '* | \
3368              'mkdir (fileutils) '4.1*)
3369                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3370                break 3;;
3371            esac
3372          done
3373        done
3374   done
3375 IFS=$as_save_IFS
3376
3377 fi
3378
3379   test -d ./--version && rmdir ./--version
3380   if test "${ac_cv_path_mkdir+set}" = set; then
3381     MKDIR_P="$ac_cv_path_mkdir -p"
3382   else
3383     # As a last resort, use the slow shell script.  Don't cache a
3384     # value for MKDIR_P within a source directory, because that will
3385     # break other packages using the cache if that directory is
3386     # removed, or if the value is a relative name.
3387     MKDIR_P="$ac_install_sh -d"
3388   fi
3389 fi
3390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3391 $as_echo "$MKDIR_P" >&6; }
3392
3393 for ac_prog in gawk mawk nawk awk
3394 do
3395   # Extract the first word of "$ac_prog", so it can be a program name with args.
3396 set dummy $ac_prog; ac_word=$2
3397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3398 $as_echo_n "checking for $ac_word... " >&6; }
3399 if ${ac_cv_prog_AWK+:} false; then :
3400   $as_echo_n "(cached) " >&6
3401 else
3402   if test -n "$AWK"; then
3403   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3404 else
3405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3406 for as_dir in $PATH
3407 do
3408   IFS=$as_save_IFS
3409   test -z "$as_dir" && as_dir=.
3410     for ac_exec_ext in '' $ac_executable_extensions; do
3411   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3412     ac_cv_prog_AWK="$ac_prog"
3413     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3414     break 2
3415   fi
3416 done
3417   done
3418 IFS=$as_save_IFS
3419
3420 fi
3421 fi
3422 AWK=$ac_cv_prog_AWK
3423 if test -n "$AWK"; then
3424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3425 $as_echo "$AWK" >&6; }
3426 else
3427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3428 $as_echo "no" >&6; }
3429 fi
3430
3431
3432   test -n "$AWK" && break
3433 done
3434
3435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3436 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3437 set x ${MAKE-make}
3438 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3439 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3440   $as_echo_n "(cached) " >&6
3441 else
3442   cat >conftest.make <<\_ACEOF
3443 SHELL = /bin/sh
3444 all:
3445         @echo '@@@%%%=$(MAKE)=@@@%%%'
3446 _ACEOF
3447 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3448 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3449   *@@@%%%=?*=@@@%%%*)
3450     eval ac_cv_prog_make_${ac_make}_set=yes;;
3451   *)
3452     eval ac_cv_prog_make_${ac_make}_set=no;;
3453 esac
3454 rm -f conftest.make
3455 fi
3456 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3458 $as_echo "yes" >&6; }
3459   SET_MAKE=
3460 else
3461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3462 $as_echo "no" >&6; }
3463   SET_MAKE="MAKE=${MAKE-make}"
3464 fi
3465
3466 rm -rf .tst 2>/dev/null
3467 mkdir .tst 2>/dev/null
3468 if test -d .tst; then
3469   am__leading_dot=.
3470 else
3471   am__leading_dot=_
3472 fi
3473 rmdir .tst 2>/dev/null
3474
3475 # Check whether --enable-silent-rules was given.
3476 if test "${enable_silent_rules+set}" = set; then :
3477   enableval=$enable_silent_rules;
3478 fi
3479
3480 case $enable_silent_rules in # (((
3481   yes) AM_DEFAULT_VERBOSITY=0;;
3482    no) AM_DEFAULT_VERBOSITY=1;;
3483     *) AM_DEFAULT_VERBOSITY=1;;
3484 esac
3485 am_make=${MAKE-make}
3486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3487 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3488 if ${am_cv_make_support_nested_variables+:} false; then :
3489   $as_echo_n "(cached) " >&6
3490 else
3491   if $as_echo 'TRUE=$(BAR$(V))
3492 BAR0=false
3493 BAR1=true
3494 V=1
3495 am__doit:
3496         @$(TRUE)
3497 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3498   am_cv_make_support_nested_variables=yes
3499 else
3500   am_cv_make_support_nested_variables=no
3501 fi
3502 fi
3503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3504 $as_echo "$am_cv_make_support_nested_variables" >&6; }
3505 if test $am_cv_make_support_nested_variables = yes; then
3506     AM_V='$(V)'
3507   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3508 else
3509   AM_V=$AM_DEFAULT_VERBOSITY
3510   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3511 fi
3512 AM_BACKSLASH='\'
3513
3514 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3515   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3516   # is not polluted with repeated "-I."
3517   am__isrc=' -I$(srcdir)'
3518   # test to see if srcdir already configured
3519   if test -f $srcdir/config.status; then
3520     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3521   fi
3522 fi
3523
3524 # test whether we have cygpath
3525 if test -z "$CYGPATH_W"; then
3526   if (cygpath --version) >/dev/null 2>/dev/null; then
3527     CYGPATH_W='cygpath -w'
3528   else
3529     CYGPATH_W=echo
3530   fi
3531 fi
3532
3533
3534 # Define the identity of the package.
3535  PACKAGE='sntp'
3536  VERSION='4.2.8p6'
3537
3538
3539 cat >>confdefs.h <<_ACEOF
3540 #define PACKAGE "$PACKAGE"
3541 _ACEOF
3542
3543
3544 cat >>confdefs.h <<_ACEOF
3545 #define VERSION "$VERSION"
3546 _ACEOF
3547
3548 # Some tools Automake needs.
3549
3550 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3551
3552
3553 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3554
3555
3556 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3557
3558
3559 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3560
3561
3562 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3563
3564 # For better backward compatibility.  To be removed once Automake 1.9.x
3565 # dies out for good.  For more background, see:
3566 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3567 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3568 mkdir_p='$(MKDIR_P)'
3569
3570 # We need awk for the "check" target (and possibly the TAP driver).  The
3571 # system "awk" is bad on some platforms.
3572 # Always define AMTAR for backward compatibility.  Yes, it's still used
3573 # in the wild :-(  We should find a proper way to deprecate it ...
3574 AMTAR='$${TAR-tar}'
3575
3576
3577 # We'll loop over all known methods to create a tar archive until one works.
3578 _am_tools='gnutar  pax cpio none'
3579
3580 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3581
3582
3583
3584
3585
3586
3587 # POSIX will say in a future version that running "rm -f" with no argument
3588 # is OK; and we want to be able to make that assumption in our Makefile
3589 # recipes.  So use an aggressive probe to check that the usage we want is
3590 # actually supported "in the wild" to an acceptable degree.
3591 # See automake bug#10828.
3592 # To make any issue more visible, cause the running configure to be aborted
3593 # by default if the 'rm' program in use doesn't match our expectations; the
3594 # user can still override this though.
3595 if rm -f && rm -fr && rm -rf; then : OK; else
3596   cat >&2 <<'END'
3597 Oops!
3598
3599 Your 'rm' program seems unable to run without file operands specified
3600 on the command line, even when the '-f' option is present.  This is contrary
3601 to the behaviour of most rm programs out there, and not conforming with
3602 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3603
3604 Please tell bug-automake@gnu.org about your system, including the value
3605 of your $PATH and any error possibly output before this message.  This
3606 can help us improve future automake versions.
3607
3608 END
3609   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3610     echo 'Configuration will proceed anyway, since you have set the' >&2
3611     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3612     echo >&2
3613   else
3614     cat >&2 <<'END'
3615 Aborting the configuration process, to ensure you take notice of the issue.
3616
3617 You can download and install GNU coreutils to get an 'rm' implementation
3618 that behaves properly: <http://www.gnu.org/software/coreutils/>.
3619
3620 If you want to complete the configuration process using your problematic
3621 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3622 to "yes", and re-run configure.
3623
3624 END
3625     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3626   fi
3627 fi
3628
3629 # Check whether --enable-silent-rules was given.
3630 if test "${enable_silent_rules+set}" = set; then :
3631   enableval=$enable_silent_rules;
3632 fi
3633
3634 case $enable_silent_rules in # (((
3635   yes) AM_DEFAULT_VERBOSITY=0;;
3636    no) AM_DEFAULT_VERBOSITY=1;;
3637     *) AM_DEFAULT_VERBOSITY=0;;
3638 esac
3639 am_make=${MAKE-make}
3640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3641 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3642 if ${am_cv_make_support_nested_variables+:} false; then :
3643   $as_echo_n "(cached) " >&6
3644 else
3645   if $as_echo 'TRUE=$(BAR$(V))
3646 BAR0=false
3647 BAR1=true
3648 V=1
3649 am__doit:
3650         @$(TRUE)
3651 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3652   am_cv_make_support_nested_variables=yes
3653 else
3654   am_cv_make_support_nested_variables=no
3655 fi
3656 fi
3657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3658 $as_echo "$am_cv_make_support_nested_variables" >&6; }
3659 if test $am_cv_make_support_nested_variables = yes; then
3660     AM_V='$(V)'
3661   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3662 else
3663   AM_V=$AM_DEFAULT_VERBOSITY
3664   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3665 fi
3666 AM_BACKSLASH='\'
3667
3668
3669 # Make sure we can run config.sub.
3670 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3671   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3672
3673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3674 $as_echo_n "checking build system type... " >&6; }
3675 if ${ac_cv_build+:} false; then :
3676   $as_echo_n "(cached) " >&6
3677 else
3678   ac_build_alias=$build_alias
3679 test "x$ac_build_alias" = x &&
3680   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3681 test "x$ac_build_alias" = x &&
3682   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3683 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3684   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3685
3686 fi
3687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3688 $as_echo "$ac_cv_build" >&6; }
3689 case $ac_cv_build in
3690 *-*-*) ;;
3691 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3692 esac
3693 build=$ac_cv_build
3694 ac_save_IFS=$IFS; IFS='-'
3695 set x $ac_cv_build
3696 shift
3697 build_cpu=$1
3698 build_vendor=$2
3699 shift; shift
3700 # Remember, the first character of IFS is used to create $*,
3701 # except with old shells:
3702 build_os=$*
3703 IFS=$ac_save_IFS
3704 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3705
3706
3707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3708 $as_echo_n "checking host system type... " >&6; }
3709 if ${ac_cv_host+:} false; then :
3710   $as_echo_n "(cached) " >&6
3711 else
3712   if test "x$host_alias" = x; then
3713   ac_cv_host=$ac_cv_build
3714 else
3715   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3716     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3717 fi
3718
3719 fi
3720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3721 $as_echo "$ac_cv_host" >&6; }
3722 case $ac_cv_host in
3723 *-*-*) ;;
3724 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3725 esac
3726 host=$ac_cv_host
3727 ac_save_IFS=$IFS; IFS='-'
3728 set x $ac_cv_host
3729 shift
3730 host_cpu=$1
3731 host_vendor=$2
3732 shift; shift
3733 # Remember, the first character of IFS is used to create $*,
3734 # except with old shells:
3735 host_os=$*
3736 IFS=$ac_save_IFS
3737 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3738
3739
3740
3741 cat >>confdefs.h <<_ACEOF
3742 #define STR_SYSTEM "$host"
3743 _ACEOF
3744
3745 ac_config_headers="$ac_config_headers config.h"
3746
3747
3748 DEPDIR="${am__leading_dot}deps"
3749
3750 ac_config_commands="$ac_config_commands depfiles"
3751
3752
3753 am_make=${MAKE-make}
3754 cat > confinc << 'END'
3755 am__doit:
3756         @echo this is the am__doit target
3757 .PHONY: am__doit
3758 END
3759 # If we don't find an include directive, just comment out the code.
3760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3761 $as_echo_n "checking for style of include used by $am_make... " >&6; }
3762 am__include="#"
3763 am__quote=
3764 _am_result=none
3765 # First try GNU make style include.
3766 echo "include confinc" > confmf
3767 # Ignore all kinds of additional output from 'make'.
3768 case `$am_make -s -f confmf 2> /dev/null` in #(
3769 *the\ am__doit\ target*)
3770   am__include=include
3771   am__quote=
3772   _am_result=GNU
3773   ;;
3774 esac
3775 # Now try BSD make style include.
3776 if test "$am__include" = "#"; then
3777    echo '.include "confinc"' > confmf
3778    case `$am_make -s -f confmf 2> /dev/null` in #(
3779    *the\ am__doit\ target*)
3780      am__include=.include
3781      am__quote="\""
3782      _am_result=BSD
3783      ;;
3784    esac
3785 fi
3786
3787
3788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3789 $as_echo "$_am_result" >&6; }
3790 rm -f confinc confmf
3791
3792 # Check whether --enable-dependency-tracking was given.
3793 if test "${enable_dependency_tracking+set}" = set; then :
3794   enableval=$enable_dependency_tracking;
3795 fi
3796
3797 if test "x$enable_dependency_tracking" != xno; then
3798   am_depcomp="$ac_aux_dir/depcomp"
3799   AMDEPBACKSLASH='\'
3800   am__nodep='_no'
3801 fi
3802  if test "x$enable_dependency_tracking" != xno; then
3803   AMDEP_TRUE=
3804   AMDEP_FALSE='#'
3805 else
3806   AMDEP_TRUE='#'
3807   AMDEP_FALSE=
3808 fi
3809
3810
3811 ac_ext=c
3812 ac_cpp='$CPP $CPPFLAGS'
3813 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3814 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3815 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3816 if test -n "$ac_tool_prefix"; then
3817   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3818 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3820 $as_echo_n "checking for $ac_word... " >&6; }
3821 if ${ac_cv_prog_CC+:} false; then :
3822   $as_echo_n "(cached) " >&6
3823 else
3824   if test -n "$CC"; then
3825   ac_cv_prog_CC="$CC" # Let the user override the test.
3826 else
3827 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3828 for as_dir in $PATH
3829 do
3830   IFS=$as_save_IFS
3831   test -z "$as_dir" && as_dir=.
3832     for ac_exec_ext in '' $ac_executable_extensions; do
3833   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3834     ac_cv_prog_CC="${ac_tool_prefix}gcc"
3835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3836     break 2
3837   fi
3838 done
3839   done
3840 IFS=$as_save_IFS
3841
3842 fi
3843 fi
3844 CC=$ac_cv_prog_CC
3845 if test -n "$CC"; then
3846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3847 $as_echo "$CC" >&6; }
3848 else
3849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3850 $as_echo "no" >&6; }
3851 fi
3852
3853
3854 fi
3855 if test -z "$ac_cv_prog_CC"; then
3856   ac_ct_CC=$CC
3857   # Extract the first word of "gcc", so it can be a program name with args.
3858 set dummy gcc; ac_word=$2
3859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3860 $as_echo_n "checking for $ac_word... " >&6; }
3861 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3862   $as_echo_n "(cached) " >&6
3863 else
3864   if test -n "$ac_ct_CC"; then
3865   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3866 else
3867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3868 for as_dir in $PATH
3869 do
3870   IFS=$as_save_IFS
3871   test -z "$as_dir" && as_dir=.
3872     for ac_exec_ext in '' $ac_executable_extensions; do
3873   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3874     ac_cv_prog_ac_ct_CC="gcc"
3875     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3876     break 2
3877   fi
3878 done
3879   done
3880 IFS=$as_save_IFS
3881
3882 fi
3883 fi
3884 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3885 if test -n "$ac_ct_CC"; then
3886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3887 $as_echo "$ac_ct_CC" >&6; }
3888 else
3889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3890 $as_echo "no" >&6; }
3891 fi
3892
3893   if test "x$ac_ct_CC" = x; then
3894     CC=""
3895   else
3896     case $cross_compiling:$ac_tool_warned in
3897 yes:)
3898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3899 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3900 ac_tool_warned=yes ;;
3901 esac
3902     CC=$ac_ct_CC
3903   fi
3904 else
3905   CC="$ac_cv_prog_CC"
3906 fi
3907
3908 if test -z "$CC"; then
3909           if test -n "$ac_tool_prefix"; then
3910     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3911 set dummy ${ac_tool_prefix}cc; ac_word=$2
3912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3913 $as_echo_n "checking for $ac_word... " >&6; }
3914 if ${ac_cv_prog_CC+:} false; then :
3915   $as_echo_n "(cached) " >&6
3916 else
3917   if test -n "$CC"; then
3918   ac_cv_prog_CC="$CC" # Let the user override the test.
3919 else
3920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3921 for as_dir in $PATH
3922 do
3923   IFS=$as_save_IFS
3924   test -z "$as_dir" && as_dir=.
3925     for ac_exec_ext in '' $ac_executable_extensions; do
3926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3927     ac_cv_prog_CC="${ac_tool_prefix}cc"
3928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3929     break 2
3930   fi
3931 done
3932   done
3933 IFS=$as_save_IFS
3934
3935 fi
3936 fi
3937 CC=$ac_cv_prog_CC
3938 if test -n "$CC"; then
3939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3940 $as_echo "$CC" >&6; }
3941 else
3942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3943 $as_echo "no" >&6; }
3944 fi
3945
3946
3947   fi
3948 fi
3949 if test -z "$CC"; then
3950   # Extract the first word of "cc", so it can be a program name with args.
3951 set dummy cc; ac_word=$2
3952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3953 $as_echo_n "checking for $ac_word... " >&6; }
3954 if ${ac_cv_prog_CC+:} false; then :
3955   $as_echo_n "(cached) " >&6
3956 else
3957   if test -n "$CC"; then
3958   ac_cv_prog_CC="$CC" # Let the user override the test.
3959 else
3960   ac_prog_rejected=no
3961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3962 for as_dir in $PATH
3963 do
3964   IFS=$as_save_IFS
3965   test -z "$as_dir" && as_dir=.
3966     for ac_exec_ext in '' $ac_executable_extensions; do
3967   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3968     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3969        ac_prog_rejected=yes
3970        continue
3971      fi
3972     ac_cv_prog_CC="cc"
3973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3974     break 2
3975   fi
3976 done
3977   done
3978 IFS=$as_save_IFS
3979
3980 if test $ac_prog_rejected = yes; then
3981   # We found a bogon in the path, so make sure we never use it.
3982   set dummy $ac_cv_prog_CC
3983   shift
3984   if test $# != 0; then
3985     # We chose a different compiler from the bogus one.
3986     # However, it has the same basename, so the bogon will be chosen
3987     # first if we set CC to just the basename; use the full file name.
3988     shift
3989     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3990   fi
3991 fi
3992 fi
3993 fi
3994 CC=$ac_cv_prog_CC
3995 if test -n "$CC"; then
3996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3997 $as_echo "$CC" >&6; }
3998 else
3999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4000 $as_echo "no" >&6; }
4001 fi
4002
4003
4004 fi
4005 if test -z "$CC"; then
4006   if test -n "$ac_tool_prefix"; then
4007   for ac_prog in cl.exe
4008   do
4009     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4010 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4012 $as_echo_n "checking for $ac_word... " >&6; }
4013 if ${ac_cv_prog_CC+:} false; then :
4014   $as_echo_n "(cached) " >&6
4015 else
4016   if test -n "$CC"; then
4017   ac_cv_prog_CC="$CC" # Let the user override the test.
4018 else
4019 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4020 for as_dir in $PATH
4021 do
4022   IFS=$as_save_IFS
4023   test -z "$as_dir" && as_dir=.
4024     for ac_exec_ext in '' $ac_executable_extensions; do
4025   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4026     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4027     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4028     break 2
4029   fi
4030 done
4031   done
4032 IFS=$as_save_IFS
4033
4034 fi
4035 fi
4036 CC=$ac_cv_prog_CC
4037 if test -n "$CC"; then
4038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4039 $as_echo "$CC" >&6; }
4040 else
4041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4042 $as_echo "no" >&6; }
4043 fi
4044
4045
4046     test -n "$CC" && break
4047   done
4048 fi
4049 if test -z "$CC"; then
4050   ac_ct_CC=$CC
4051   for ac_prog in cl.exe
4052 do
4053   # Extract the first word of "$ac_prog", so it can be a program name with args.
4054 set dummy $ac_prog; ac_word=$2
4055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4056 $as_echo_n "checking for $ac_word... " >&6; }
4057 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4058   $as_echo_n "(cached) " >&6
4059 else
4060   if test -n "$ac_ct_CC"; then
4061   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4062 else
4063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4064 for as_dir in $PATH
4065 do
4066   IFS=$as_save_IFS
4067   test -z "$as_dir" && as_dir=.
4068     for ac_exec_ext in '' $ac_executable_extensions; do
4069   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4070     ac_cv_prog_ac_ct_CC="$ac_prog"
4071     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4072     break 2
4073   fi
4074 done
4075   done
4076 IFS=$as_save_IFS
4077
4078 fi
4079 fi
4080 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4081 if test -n "$ac_ct_CC"; then
4082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4083 $as_echo "$ac_ct_CC" >&6; }
4084 else
4085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4086 $as_echo "no" >&6; }
4087 fi
4088
4089
4090   test -n "$ac_ct_CC" && break
4091 done
4092
4093   if test "x$ac_ct_CC" = x; then
4094     CC=""
4095   else
4096     case $cross_compiling:$ac_tool_warned in
4097 yes:)
4098 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4099 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4100 ac_tool_warned=yes ;;
4101 esac
4102     CC=$ac_ct_CC
4103   fi
4104 fi
4105
4106 fi
4107
4108
4109 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4110 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4111 as_fn_error $? "no acceptable C compiler found in \$PATH
4112 See \`config.log' for more details" "$LINENO" 5; }
4113
4114 # Provide some information about the compiler.
4115 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4116 set X $ac_compile
4117 ac_compiler=$2
4118 for ac_option in --version -v -V -qversion; do
4119   { { ac_try="$ac_compiler $ac_option >&5"
4120 case "(($ac_try" in
4121   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4122   *) ac_try_echo=$ac_try;;
4123 esac
4124 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4125 $as_echo "$ac_try_echo"; } >&5
4126   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4127   ac_status=$?
4128   if test -s conftest.err; then
4129     sed '10a\
4130 ... rest of stderr output deleted ...
4131          10q' conftest.err >conftest.er1
4132     cat conftest.er1 >&5
4133   fi
4134   rm -f conftest.er1 conftest.err
4135   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4136   test $ac_status = 0; }
4137 done
4138
4139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4140 /* end confdefs.h.  */
4141
4142 int
4143 main ()
4144 {
4145
4146   ;
4147   return 0;
4148 }
4149 _ACEOF
4150 ac_clean_files_save=$ac_clean_files
4151 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4152 # Try to create an executable without -o first, disregard a.out.
4153 # It will help us diagnose broken compilers, and finding out an intuition
4154 # of exeext.
4155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4156 $as_echo_n "checking whether the C compiler works... " >&6; }
4157 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4158
4159 # The possible output files:
4160 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4161
4162 ac_rmfiles=
4163 for ac_file in $ac_files
4164 do
4165   case $ac_file in
4166     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4167     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4168   esac
4169 done
4170 rm -f $ac_rmfiles
4171
4172 if { { ac_try="$ac_link_default"
4173 case "(($ac_try" in
4174   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4175   *) ac_try_echo=$ac_try;;
4176 esac
4177 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4178 $as_echo "$ac_try_echo"; } >&5
4179   (eval "$ac_link_default") 2>&5
4180   ac_status=$?
4181   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4182   test $ac_status = 0; }; then :
4183   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4184 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4185 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4186 # so that the user can short-circuit this test for compilers unknown to
4187 # Autoconf.
4188 for ac_file in $ac_files ''
4189 do
4190   test -f "$ac_file" || continue
4191   case $ac_file in
4192     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4193         ;;
4194     [ab].out )
4195         # We found the default executable, but exeext='' is most
4196         # certainly right.
4197         break;;
4198     *.* )
4199         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4200         then :; else
4201            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4202         fi
4203         # We set ac_cv_exeext here because the later test for it is not
4204         # safe: cross compilers may not add the suffix if given an `-o'
4205         # argument, so we may need to know it at that point already.
4206         # Even if this section looks crufty: it has the advantage of
4207         # actually working.
4208         break;;
4209     * )
4210         break;;
4211   esac
4212 done
4213 test "$ac_cv_exeext" = no && ac_cv_exeext=
4214
4215 else
4216   ac_file=''
4217 fi
4218 if test -z "$ac_file"; then :
4219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4220 $as_echo "no" >&6; }
4221 $as_echo "$as_me: failed program was:" >&5
4222 sed 's/^/| /' conftest.$ac_ext >&5
4223
4224 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4225 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4226 as_fn_error 77 "C compiler cannot create executables
4227 See \`config.log' for more details" "$LINENO" 5; }
4228 else
4229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4230 $as_echo "yes" >&6; }
4231 fi
4232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4233 $as_echo_n "checking for C compiler default output file name... " >&6; }
4234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4235 $as_echo "$ac_file" >&6; }
4236 ac_exeext=$ac_cv_exeext
4237
4238 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4239 ac_clean_files=$ac_clean_files_save
4240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4241 $as_echo_n "checking for suffix of executables... " >&6; }
4242 if { { ac_try="$ac_link"
4243 case "(($ac_try" in
4244   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4245   *) ac_try_echo=$ac_try;;
4246 esac
4247 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4248 $as_echo "$ac_try_echo"; } >&5
4249   (eval "$ac_link") 2>&5
4250   ac_status=$?
4251   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4252   test $ac_status = 0; }; then :
4253   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4254 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4255 # work properly (i.e., refer to `conftest.exe'), while it won't with
4256 # `rm'.
4257 for ac_file in conftest.exe conftest conftest.*; do
4258   test -f "$ac_file" || continue
4259   case $ac_file in
4260     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4261     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4262           break;;
4263     * ) break;;
4264   esac
4265 done
4266 else
4267   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4268 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4269 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4270 See \`config.log' for more details" "$LINENO" 5; }
4271 fi
4272 rm -f conftest conftest$ac_cv_exeext
4273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4274 $as_echo "$ac_cv_exeext" >&6; }
4275
4276 rm -f conftest.$ac_ext
4277 EXEEXT=$ac_cv_exeext
4278 ac_exeext=$EXEEXT
4279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4280 /* end confdefs.h.  */
4281 #include <stdio.h>
4282 int
4283 main ()
4284 {
4285 FILE *f = fopen ("conftest.out", "w");
4286  return ferror (f) || fclose (f) != 0;
4287
4288   ;
4289   return 0;
4290 }
4291 _ACEOF
4292 ac_clean_files="$ac_clean_files conftest.out"
4293 # Check that the compiler produces executables we can run.  If not, either
4294 # the compiler is broken, or we cross compile.
4295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4296 $as_echo_n "checking whether we are cross compiling... " >&6; }
4297 if test "$cross_compiling" != yes; then
4298   { { ac_try="$ac_link"
4299 case "(($ac_try" in
4300   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4301   *) ac_try_echo=$ac_try;;
4302 esac
4303 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4304 $as_echo "$ac_try_echo"; } >&5
4305   (eval "$ac_link") 2>&5
4306   ac_status=$?
4307   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4308   test $ac_status = 0; }
4309   if { ac_try='./conftest$ac_cv_exeext'
4310   { { case "(($ac_try" in
4311   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4312   *) ac_try_echo=$ac_try;;
4313 esac
4314 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4315 $as_echo "$ac_try_echo"; } >&5
4316   (eval "$ac_try") 2>&5
4317   ac_status=$?
4318   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4319   test $ac_status = 0; }; }; then
4320     cross_compiling=no
4321   else
4322     if test "$cross_compiling" = maybe; then
4323         cross_compiling=yes
4324     else
4325         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4326 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4327 as_fn_error $? "cannot run C compiled programs.
4328 If you meant to cross compile, use \`--host'.
4329 See \`config.log' for more details" "$LINENO" 5; }
4330     fi
4331   fi
4332 fi
4333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4334 $as_echo "$cross_compiling" >&6; }
4335
4336 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4337 ac_clean_files=$ac_clean_files_save
4338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4339 $as_echo_n "checking for suffix of object files... " >&6; }
4340 if ${ac_cv_objext+:} false; then :
4341   $as_echo_n "(cached) " >&6
4342 else
4343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4344 /* end confdefs.h.  */
4345
4346 int
4347 main ()
4348 {
4349
4350   ;
4351   return 0;
4352 }
4353 _ACEOF
4354 rm -f conftest.o conftest.obj
4355 if { { ac_try="$ac_compile"
4356 case "(($ac_try" in
4357   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4358   *) ac_try_echo=$ac_try;;
4359 esac
4360 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4361 $as_echo "$ac_try_echo"; } >&5
4362   (eval "$ac_compile") 2>&5
4363   ac_status=$?
4364   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4365   test $ac_status = 0; }; then :
4366   for ac_file in conftest.o conftest.obj conftest.*; do
4367   test -f "$ac_file" || continue;
4368   case $ac_file in
4369     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4370     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4371        break;;
4372   esac
4373 done
4374 else
4375   $as_echo "$as_me: failed program was:" >&5
4376 sed 's/^/| /' conftest.$ac_ext >&5
4377
4378 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4379 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4380 as_fn_error $? "cannot compute suffix of object files: cannot compile
4381 See \`config.log' for more details" "$LINENO" 5; }
4382 fi
4383 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4384 fi
4385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4386 $as_echo "$ac_cv_objext" >&6; }
4387 OBJEXT=$ac_cv_objext
4388 ac_objext=$OBJEXT
4389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4390 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4391 if ${ac_cv_c_compiler_gnu+:} false; then :
4392   $as_echo_n "(cached) " >&6
4393 else
4394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4395 /* end confdefs.h.  */
4396
4397 int
4398 main ()
4399 {
4400 #ifndef __GNUC__
4401        choke me
4402 #endif
4403
4404   ;
4405   return 0;
4406 }
4407 _ACEOF
4408 if ac_fn_c_try_compile "$LINENO"; then :
4409   ac_compiler_gnu=yes
4410 else
4411   ac_compiler_gnu=no
4412 fi
4413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4414 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4415
4416 fi
4417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4418 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4419 if test $ac_compiler_gnu = yes; then
4420   GCC=yes
4421 else
4422   GCC=
4423 fi
4424 ac_test_CFLAGS=${CFLAGS+set}
4425 ac_save_CFLAGS=$CFLAGS
4426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4427 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4428 if ${ac_cv_prog_cc_g+:} false; then :
4429   $as_echo_n "(cached) " >&6
4430 else
4431   ac_save_c_werror_flag=$ac_c_werror_flag
4432    ac_c_werror_flag=yes
4433    ac_cv_prog_cc_g=no
4434    CFLAGS="-g"
4435    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4436 /* end confdefs.h.  */
4437
4438 int
4439 main ()
4440 {
4441
4442   ;
4443   return 0;
4444 }
4445 _ACEOF
4446 if ac_fn_c_try_compile "$LINENO"; then :
4447   ac_cv_prog_cc_g=yes
4448 else
4449   CFLAGS=""
4450       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4451 /* end confdefs.h.  */
4452
4453 int
4454 main ()
4455 {
4456
4457   ;
4458   return 0;
4459 }
4460 _ACEOF
4461 if ac_fn_c_try_compile "$LINENO"; then :
4462
4463 else
4464   ac_c_werror_flag=$ac_save_c_werror_flag
4465          CFLAGS="-g"
4466          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4467 /* end confdefs.h.  */
4468
4469 int
4470 main ()
4471 {
4472
4473   ;
4474   return 0;
4475 }
4476 _ACEOF
4477 if ac_fn_c_try_compile "$LINENO"; then :
4478   ac_cv_prog_cc_g=yes
4479 fi
4480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4481 fi
4482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4483 fi
4484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4485    ac_c_werror_flag=$ac_save_c_werror_flag
4486 fi
4487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4488 $as_echo "$ac_cv_prog_cc_g" >&6; }
4489 if test "$ac_test_CFLAGS" = set; then
4490   CFLAGS=$ac_save_CFLAGS
4491 elif test $ac_cv_prog_cc_g = yes; then
4492   if test "$GCC" = yes; then
4493     CFLAGS="-g -O2"
4494   else
4495     CFLAGS="-g"
4496   fi
4497 else
4498   if test "$GCC" = yes; then
4499     CFLAGS="-O2"
4500   else
4501     CFLAGS=
4502   fi
4503 fi
4504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4505 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4506 if ${ac_cv_prog_cc_c89+:} false; then :
4507   $as_echo_n "(cached) " >&6
4508 else
4509   ac_cv_prog_cc_c89=no
4510 ac_save_CC=$CC
4511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4512 /* end confdefs.h.  */
4513 #include <stdarg.h>
4514 #include <stdio.h>
4515 struct stat;
4516 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4517 struct buf { int x; };
4518 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4519 static char *e (p, i)
4520      char **p;
4521      int i;
4522 {
4523   return p[i];
4524 }
4525 static char *f (char * (*g) (char **, int), char **p, ...)
4526 {
4527   char *s;
4528   va_list v;
4529   va_start (v,p);
4530   s = g (p, va_arg (v,int));
4531   va_end (v);
4532   return s;
4533 }
4534
4535 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4536    function prototypes and stuff, but not '\xHH' hex character constants.
4537    These don't provoke an error unfortunately, instead are silently treated
4538    as 'x'.  The following induces an error, until -std is added to get
4539    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4540    array size at least.  It's necessary to write '\x00'==0 to get something
4541    that's true only with -std.  */
4542 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4543
4544 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4545    inside strings and character constants.  */
4546 #define FOO(x) 'x'
4547 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4548
4549 int test (int i, double x);
4550 struct s1 {int (*f) (int a);};
4551 struct s2 {int (*f) (double a);};
4552 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4553 int argc;
4554 char **argv;
4555 int
4556 main ()
4557 {
4558 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4559   ;
4560   return 0;
4561 }
4562 _ACEOF
4563 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4564         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4565 do
4566   CC="$ac_save_CC $ac_arg"
4567   if ac_fn_c_try_compile "$LINENO"; then :
4568   ac_cv_prog_cc_c89=$ac_arg
4569 fi
4570 rm -f core conftest.err conftest.$ac_objext
4571   test "x$ac_cv_prog_cc_c89" != "xno" && break
4572 done
4573 rm -f conftest.$ac_ext
4574 CC=$ac_save_CC
4575
4576 fi
4577 # AC_CACHE_VAL
4578 case "x$ac_cv_prog_cc_c89" in
4579   x)
4580     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4581 $as_echo "none needed" >&6; } ;;
4582   xno)
4583     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4584 $as_echo "unsupported" >&6; } ;;
4585   *)
4586     CC="$CC $ac_cv_prog_cc_c89"
4587     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4588 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4589 esac
4590 if test "x$ac_cv_prog_cc_c89" != xno; then :
4591
4592 fi
4593
4594 ac_ext=c
4595 ac_cpp='$CPP $CPPFLAGS'
4596 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4597 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4598 ac_compiler_gnu=$ac_cv_c_compiler_gnu
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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4606 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4607 if ${am_cv_prog_cc_c_o+:} false; then :
4608   $as_echo_n "(cached) " >&6
4609 else
4610   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4611 /* end confdefs.h.  */
4612
4613 int
4614 main ()
4615 {
4616
4617   ;
4618   return 0;
4619 }
4620 _ACEOF
4621   # Make sure it works both with $CC and with simple cc.
4622   # Following AC_PROG_CC_C_O, we do the test twice because some
4623   # compilers refuse to overwrite an existing .o file with -o,
4624   # though they will create one.
4625   am_cv_prog_cc_c_o=yes
4626   for am_i in 1 2; do
4627     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4628    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4629    ac_status=$?
4630    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4631    (exit $ac_status); } \
4632          && test -f conftest2.$ac_objext; then
4633       : OK
4634     else
4635       am_cv_prog_cc_c_o=no
4636       break
4637     fi
4638   done
4639   rm -f core conftest*
4640   unset am_i
4641 fi
4642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4643 $as_echo "$am_cv_prog_cc_c_o" >&6; }
4644 if test "$am_cv_prog_cc_c_o" != yes; then
4645    # Losing compiler, so override with the script.
4646    # FIXME: It is wrong to rewrite CC.
4647    # But if we don't then we get into trouble of one sort or another.
4648    # A longer-term fix would be to have automake use am__CC in this case,
4649    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4650    CC="$am_aux_dir/compile $CC"
4651 fi
4652 ac_ext=c
4653 ac_cpp='$CPP $CPPFLAGS'
4654 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4655 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4656 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4657
4658
4659 depcc="$CC"   am_compiler_list=
4660
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4662 $as_echo_n "checking dependency style of $depcc... " >&6; }
4663 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4664   $as_echo_n "(cached) " >&6
4665 else
4666   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4667   # We make a subdir and do the tests there.  Otherwise we can end up
4668   # making bogus files that we don't know about and never remove.  For
4669   # instance it was reported that on HP-UX the gcc test will end up
4670   # making a dummy file named 'D' -- because '-MD' means "put the output
4671   # in D".
4672   rm -rf conftest.dir
4673   mkdir conftest.dir
4674   # Copy depcomp to subdir because otherwise we won't find it if we're
4675   # using a relative directory.
4676   cp "$am_depcomp" conftest.dir
4677   cd conftest.dir
4678   # We will build objects and dependencies in a subdirectory because
4679   # it helps to detect inapplicable dependency modes.  For instance
4680   # both Tru64's cc and ICC support -MD to output dependencies as a
4681   # side effect of compilation, but ICC will put the dependencies in
4682   # the current directory while Tru64 will put them in the object
4683   # directory.
4684   mkdir sub
4685
4686   am_cv_CC_dependencies_compiler_type=none
4687   if test "$am_compiler_list" = ""; then
4688      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4689   fi
4690   am__universal=false
4691   case " $depcc " in #(
4692      *\ -arch\ *\ -arch\ *) am__universal=true ;;
4693      esac
4694
4695   for depmode in $am_compiler_list; do
4696     # Setup a source with many dependencies, because some compilers
4697     # like to wrap large dependency lists on column 80 (with \), and
4698     # we should not choose a depcomp mode which is confused by this.
4699     #
4700     # We need to recreate these files for each test, as the compiler may
4701     # overwrite some of them when testing with obscure command lines.
4702     # This happens at least with the AIX C compiler.
4703     : > sub/conftest.c
4704     for i in 1 2 3 4 5 6; do
4705       echo '#include "conftst'$i'.h"' >> sub/conftest.c
4706       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4707       # Solaris 10 /bin/sh.
4708       echo '/* dummy */' > sub/conftst$i.h
4709     done
4710     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4711
4712     # We check with '-c' and '-o' for the sake of the "dashmstdout"
4713     # mode.  It turns out that the SunPro C++ compiler does not properly
4714     # handle '-M -o', and we need to detect this.  Also, some Intel
4715     # versions had trouble with output in subdirs.
4716     am__obj=sub/conftest.${OBJEXT-o}
4717     am__minus_obj="-o $am__obj"
4718     case $depmode in
4719     gcc)
4720       # This depmode causes a compiler race in universal mode.
4721       test "$am__universal" = false || continue
4722       ;;
4723     nosideeffect)
4724       # After this tag, mechanisms are not by side-effect, so they'll
4725       # only be used when explicitly requested.
4726       if test "x$enable_dependency_tracking" = xyes; then
4727         continue
4728       else
4729         break
4730       fi
4731       ;;
4732     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4733       # This compiler won't grok '-c -o', but also, the minuso test has
4734       # not run yet.  These depmodes are late enough in the game, and
4735       # so weak that their functioning should not be impacted.
4736       am__obj=conftest.${OBJEXT-o}
4737       am__minus_obj=
4738       ;;
4739     none) break ;;
4740     esac
4741     if depmode=$depmode \
4742        source=sub/conftest.c object=$am__obj \
4743        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4744        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4745          >/dev/null 2>conftest.err &&
4746        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4747        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4748        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4749        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4750       # icc doesn't choke on unknown options, it will just issue warnings
4751       # or remarks (even with -Werror).  So we grep stderr for any message
4752       # that says an option was ignored or not supported.
4753       # When given -MP, icc 7.0 and 7.1 complain thusly:
4754       #   icc: Command line warning: ignoring option '-M'; no argument required
4755       # The diagnosis changed in icc 8.0:
4756       #   icc: Command line remark: option '-MP' not supported
4757       if (grep 'ignoring option' conftest.err ||
4758           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4759         am_cv_CC_dependencies_compiler_type=$depmode
4760         break
4761       fi
4762     fi
4763   done
4764
4765   cd ..
4766   rm -rf conftest.dir
4767 else
4768   am_cv_CC_dependencies_compiler_type=none
4769 fi
4770
4771 fi
4772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4773 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4774 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4775
4776  if
4777   test "x$enable_dependency_tracking" != xno \
4778   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4779   am__fastdepCC_TRUE=
4780   am__fastdepCC_FALSE='#'
4781 else
4782   am__fastdepCC_TRUE='#'
4783   am__fastdepCC_FALSE=
4784 fi
4785
4786
4787
4788 ac_ext=c
4789 ac_cpp='$CPP $CPPFLAGS'
4790 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4791 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4792 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4794 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4795 # On Suns, sometimes $CPP names a directory.
4796 if test -n "$CPP" && test -d "$CPP"; then
4797   CPP=
4798 fi
4799 if test -z "$CPP"; then
4800   if ${ac_cv_prog_CPP+:} false; then :
4801   $as_echo_n "(cached) " >&6
4802 else
4803       # Double quotes because CPP needs to be expanded
4804     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4805     do
4806       ac_preproc_ok=false
4807 for ac_c_preproc_warn_flag in '' yes
4808 do
4809   # Use a header file that comes with gcc, so configuring glibc
4810   # with a fresh cross-compiler works.
4811   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4812   # <limits.h> exists even on freestanding compilers.
4813   # On the NeXT, cc -E runs the code through the compiler's parser,
4814   # not just through cpp. "Syntax error" is here to catch this case.
4815   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4816 /* end confdefs.h.  */
4817 #ifdef __STDC__
4818 # include <limits.h>
4819 #else
4820 # include <assert.h>
4821 #endif
4822                      Syntax error
4823 _ACEOF
4824 if ac_fn_c_try_cpp "$LINENO"; then :
4825
4826 else
4827   # Broken: fails on valid input.
4828 continue
4829 fi
4830 rm -f conftest.err conftest.i conftest.$ac_ext
4831
4832   # OK, works on sane cases.  Now check whether nonexistent headers
4833   # can be detected and how.
4834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4835 /* end confdefs.h.  */
4836 #include <ac_nonexistent.h>
4837 _ACEOF
4838 if ac_fn_c_try_cpp "$LINENO"; then :
4839   # Broken: success on invalid input.
4840 continue
4841 else
4842   # Passes both tests.
4843 ac_preproc_ok=:
4844 break
4845 fi
4846 rm -f conftest.err conftest.i conftest.$ac_ext
4847
4848 done
4849 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4850 rm -f conftest.i conftest.err conftest.$ac_ext
4851 if $ac_preproc_ok; then :
4852   break
4853 fi
4854
4855     done
4856     ac_cv_prog_CPP=$CPP
4857
4858 fi
4859   CPP=$ac_cv_prog_CPP
4860 else
4861   ac_cv_prog_CPP=$CPP
4862 fi
4863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4864 $as_echo "$CPP" >&6; }
4865 ac_preproc_ok=false
4866 for ac_c_preproc_warn_flag in '' yes
4867 do
4868   # Use a header file that comes with gcc, so configuring glibc
4869   # with a fresh cross-compiler works.
4870   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4871   # <limits.h> exists even on freestanding compilers.
4872   # On the NeXT, cc -E runs the code through the compiler's parser,
4873   # not just through cpp. "Syntax error" is here to catch this case.
4874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4875 /* end confdefs.h.  */
4876 #ifdef __STDC__
4877 # include <limits.h>
4878 #else
4879 # include <assert.h>
4880 #endif
4881                      Syntax error
4882 _ACEOF
4883 if ac_fn_c_try_cpp "$LINENO"; then :
4884
4885 else
4886   # Broken: fails on valid input.
4887 continue
4888 fi
4889 rm -f conftest.err conftest.i conftest.$ac_ext
4890
4891   # OK, works on sane cases.  Now check whether nonexistent headers
4892   # can be detected and how.
4893   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4894 /* end confdefs.h.  */
4895 #include <ac_nonexistent.h>
4896 _ACEOF
4897 if ac_fn_c_try_cpp "$LINENO"; then :
4898   # Broken: success on invalid input.
4899 continue
4900 else
4901   # Passes both tests.
4902 ac_preproc_ok=:
4903 break
4904 fi
4905 rm -f conftest.err conftest.i conftest.$ac_ext
4906
4907 done
4908 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4909 rm -f conftest.i conftest.err conftest.$ac_ext
4910 if $ac_preproc_ok; then :
4911
4912 else
4913   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4914 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4915 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4916 See \`config.log' for more details" "$LINENO" 5; }
4917 fi
4918
4919 ac_ext=c
4920 ac_cpp='$CPP $CPPFLAGS'
4921 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4922 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4923 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4924
4925
4926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4927 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4928 if ${ac_cv_path_GREP+:} false; then :
4929   $as_echo_n "(cached) " >&6
4930 else
4931   if test -z "$GREP"; then
4932   ac_path_GREP_found=false
4933   # Loop through the user's path and test for each of PROGNAME-LIST
4934   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4935 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4936 do
4937   IFS=$as_save_IFS
4938   test -z "$as_dir" && as_dir=.
4939     for ac_prog in grep ggrep; do
4940     for ac_exec_ext in '' $ac_executable_extensions; do
4941       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4942       as_fn_executable_p "$ac_path_GREP" || continue
4943 # Check for GNU ac_path_GREP and select it if it is found.
4944   # Check for GNU $ac_path_GREP
4945 case `"$ac_path_GREP" --version 2>&1` in
4946 *GNU*)
4947   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4948 *)
4949   ac_count=0
4950   $as_echo_n 0123456789 >"conftest.in"
4951   while :
4952   do
4953     cat "conftest.in" "conftest.in" >"conftest.tmp"
4954     mv "conftest.tmp" "conftest.in"
4955     cp "conftest.in" "conftest.nl"
4956     $as_echo 'GREP' >> "conftest.nl"
4957     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4958     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4959     as_fn_arith $ac_count + 1 && ac_count=$as_val
4960     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4961       # Best one so far, save it but keep looking for a better one
4962       ac_cv_path_GREP="$ac_path_GREP"
4963       ac_path_GREP_max=$ac_count
4964     fi
4965     # 10*(2^10) chars as input seems more than enough
4966     test $ac_count -gt 10 && break
4967   done
4968   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4969 esac
4970
4971       $ac_path_GREP_found && break 3
4972     done
4973   done
4974   done
4975 IFS=$as_save_IFS
4976   if test -z "$ac_cv_path_GREP"; then
4977     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4978   fi
4979 else
4980   ac_cv_path_GREP=$GREP
4981 fi
4982
4983 fi
4984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4985 $as_echo "$ac_cv_path_GREP" >&6; }
4986  GREP="$ac_cv_path_GREP"
4987
4988
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4990 $as_echo_n "checking for egrep... " >&6; }
4991 if ${ac_cv_path_EGREP+:} false; then :
4992   $as_echo_n "(cached) " >&6
4993 else
4994   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4995    then ac_cv_path_EGREP="$GREP -E"
4996    else
4997      if test -z "$EGREP"; then
4998   ac_path_EGREP_found=false
4999   # Loop through the user's path and test for each of PROGNAME-LIST
5000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5001 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5002 do
5003   IFS=$as_save_IFS
5004   test -z "$as_dir" && as_dir=.
5005     for ac_prog in egrep; do
5006     for ac_exec_ext in '' $ac_executable_extensions; do
5007       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5008       as_fn_executable_p "$ac_path_EGREP" || continue
5009 # Check for GNU ac_path_EGREP and select it if it is found.
5010   # Check for GNU $ac_path_EGREP
5011 case `"$ac_path_EGREP" --version 2>&1` in
5012 *GNU*)
5013   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5014 *)
5015   ac_count=0
5016   $as_echo_n 0123456789 >"conftest.in"
5017   while :
5018   do
5019     cat "conftest.in" "conftest.in" >"conftest.tmp"
5020     mv "conftest.tmp" "conftest.in"
5021     cp "conftest.in" "conftest.nl"
5022     $as_echo 'EGREP' >> "conftest.nl"
5023     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5024     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5025     as_fn_arith $ac_count + 1 && ac_count=$as_val
5026     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5027       # Best one so far, save it but keep looking for a better one
5028       ac_cv_path_EGREP="$ac_path_EGREP"
5029       ac_path_EGREP_max=$ac_count
5030     fi
5031     # 10*(2^10) chars as input seems more than enough
5032     test $ac_count -gt 10 && break
5033   done
5034   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5035 esac
5036
5037       $ac_path_EGREP_found && break 3
5038     done
5039   done
5040   done
5041 IFS=$as_save_IFS
5042   if test -z "$ac_cv_path_EGREP"; then
5043     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5044   fi
5045 else
5046   ac_cv_path_EGREP=$EGREP
5047 fi
5048
5049    fi
5050 fi
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5052 $as_echo "$ac_cv_path_EGREP" >&6; }
5053  EGREP="$ac_cv_path_EGREP"
5054
5055
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5057 $as_echo_n "checking for ANSI C header files... " >&6; }
5058 if ${ac_cv_header_stdc+:} false; then :
5059   $as_echo_n "(cached) " >&6
5060 else
5061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5062 /* end confdefs.h.  */
5063 #include <stdlib.h>
5064 #include <stdarg.h>
5065 #include <string.h>
5066 #include <float.h>
5067
5068 int
5069 main ()
5070 {
5071
5072   ;
5073   return 0;
5074 }
5075 _ACEOF
5076 if ac_fn_c_try_compile "$LINENO"; then :
5077   ac_cv_header_stdc=yes
5078 else
5079   ac_cv_header_stdc=no
5080 fi
5081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5082
5083 if test $ac_cv_header_stdc = yes; then
5084   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5085   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5086 /* end confdefs.h.  */
5087 #include <string.h>
5088
5089 _ACEOF
5090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5091   $EGREP "memchr" >/dev/null 2>&1; then :
5092
5093 else
5094   ac_cv_header_stdc=no
5095 fi
5096 rm -f conftest*
5097
5098 fi
5099
5100 if test $ac_cv_header_stdc = yes; then
5101   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5103 /* end confdefs.h.  */
5104 #include <stdlib.h>
5105
5106 _ACEOF
5107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5108   $EGREP "free" >/dev/null 2>&1; then :
5109
5110 else
5111   ac_cv_header_stdc=no
5112 fi
5113 rm -f conftest*
5114
5115 fi
5116
5117 if test $ac_cv_header_stdc = yes; then
5118   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5119   if test "$cross_compiling" = yes; then :
5120   :
5121 else
5122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5123 /* end confdefs.h.  */
5124 #include <ctype.h>
5125 #include <stdlib.h>
5126 #if ((' ' & 0x0FF) == 0x020)
5127 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5128 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5129 #else
5130 # define ISLOWER(c) \
5131                    (('a' <= (c) && (c) <= 'i') \
5132                      || ('j' <= (c) && (c) <= 'r') \
5133                      || ('s' <= (c) && (c) <= 'z'))
5134 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5135 #endif
5136
5137 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5138 int
5139 main ()
5140 {
5141   int i;
5142   for (i = 0; i < 256; i++)
5143     if (XOR (islower (i), ISLOWER (i))
5144         || toupper (i) != TOUPPER (i))
5145       return 2;
5146   return 0;
5147 }
5148 _ACEOF
5149 if ac_fn_c_try_run "$LINENO"; then :
5150
5151 else
5152   ac_cv_header_stdc=no
5153 fi
5154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5155   conftest.$ac_objext conftest.beam conftest.$ac_ext
5156 fi
5157
5158 fi
5159 fi
5160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5161 $as_echo "$ac_cv_header_stdc" >&6; }
5162 if test $ac_cv_header_stdc = yes; then
5163
5164 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5165
5166 fi
5167
5168 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5169 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5170                   inttypes.h stdint.h unistd.h
5171 do :
5172   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5173 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5174 "
5175 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5176   cat >>confdefs.h <<_ACEOF
5177 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5178 _ACEOF
5179
5180 fi
5181
5182 done
5183
5184
5185
5186
5187
5188   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5189 if test "x$ac_cv_header_minix_config_h" = xyes; then :
5190   MINIX=yes
5191 else
5192   MINIX=
5193 fi
5194
5195
5196   if test "$MINIX" = yes; then
5197
5198 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5199
5200
5201 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5202
5203
5204 $as_echo "#define _MINIX 1" >>confdefs.h
5205
5206   fi
5207
5208         case "$host_os" in
5209     hpux*)
5210
5211 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5212
5213       ;;
5214   esac
5215
5216
5217   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5218 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5219 if ${ac_cv_safe_to_define___extensions__+:} false; then :
5220   $as_echo_n "(cached) " >&6
5221 else
5222   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5223 /* end confdefs.h.  */
5224
5225 #         define __EXTENSIONS__ 1
5226           $ac_includes_default
5227 int
5228 main ()
5229 {
5230
5231   ;
5232   return 0;
5233 }
5234 _ACEOF
5235 if ac_fn_c_try_compile "$LINENO"; then :
5236   ac_cv_safe_to_define___extensions__=yes
5237 else
5238   ac_cv_safe_to_define___extensions__=no
5239 fi
5240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5241 fi
5242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5243 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5244   test $ac_cv_safe_to_define___extensions__ = yes &&
5245     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5246
5247   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5248
5249   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5250
5251   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5252
5253   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5254
5255
5256
5257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5258 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5259 if ${ac_cv_prog_cc_c89+:} false; then :
5260   $as_echo_n "(cached) " >&6
5261 else
5262   ac_cv_prog_cc_c89=no
5263 ac_save_CC=$CC
5264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5265 /* end confdefs.h.  */
5266 #include <stdarg.h>
5267 #include <stdio.h>
5268 struct stat;
5269 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5270 struct buf { int x; };
5271 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5272 static char *e (p, i)
5273      char **p;
5274      int i;
5275 {
5276   return p[i];
5277 }
5278 static char *f (char * (*g) (char **, int), char **p, ...)
5279 {
5280   char *s;
5281   va_list v;
5282   va_start (v,p);
5283   s = g (p, va_arg (v,int));
5284   va_end (v);
5285   return s;
5286 }
5287
5288 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5289    function prototypes and stuff, but not '\xHH' hex character constants.
5290    These don't provoke an error unfortunately, instead are silently treated
5291    as 'x'.  The following induces an error, until -std is added to get
5292    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5293    array size at least.  It's necessary to write '\x00'==0 to get something
5294    that's true only with -std.  */
5295 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5296
5297 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5298    inside strings and character constants.  */
5299 #define FOO(x) 'x'
5300 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5301
5302 int test (int i, double x);
5303 struct s1 {int (*f) (int a);};
5304 struct s2 {int (*f) (double a);};
5305 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5306 int argc;
5307 char **argv;
5308 int
5309 main ()
5310 {
5311 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5312   ;
5313   return 0;
5314 }
5315 _ACEOF
5316 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5317         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5318 do
5319   CC="$ac_save_CC $ac_arg"
5320   if ac_fn_c_try_compile "$LINENO"; then :
5321   ac_cv_prog_cc_c89=$ac_arg
5322 fi
5323 rm -f core conftest.err conftest.$ac_objext
5324   test "x$ac_cv_prog_cc_c89" != "xno" && break
5325 done
5326 rm -f conftest.$ac_ext
5327 CC=$ac_save_CC
5328
5329 fi
5330 # AC_CACHE_VAL
5331 case "x$ac_cv_prog_cc_c89" in
5332   x)
5333     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5334 $as_echo "none needed" >&6; } ;;
5335   xno)
5336     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5337 $as_echo "unsupported" >&6; } ;;
5338   *)
5339     CC="$CC $ac_cv_prog_cc_c89"
5340     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5341 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5342 esac
5343 if test "x$ac_cv_prog_cc_c89" != xno; then :
5344
5345 fi
5346
5347
5348    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
5349 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
5350 if ${ac_cv_prog_cc_c99+:} false; then :
5351   $as_echo_n "(cached) " >&6
5352 else
5353   ac_cv_prog_cc_c99=no
5354 ac_save_CC=$CC
5355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5356 /* end confdefs.h.  */
5357 #include <stdarg.h>
5358 #include <stdbool.h>
5359 #include <stdlib.h>
5360 #include <wchar.h>
5361 #include <stdio.h>
5362
5363 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
5364 #define debug(...) fprintf (stderr, __VA_ARGS__)
5365 #define showlist(...) puts (#__VA_ARGS__)
5366 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5367 static void
5368 test_varargs_macros (void)
5369 {
5370   int x = 1234;
5371   int y = 5678;
5372   debug ("Flag");
5373   debug ("X = %d\n", x);
5374   showlist (The first, second, and third items.);
5375   report (x>y, "x is %d but y is %d", x, y);
5376 }
5377
5378 // Check long long types.
5379 #define BIG64 18446744073709551615ull
5380 #define BIG32 4294967295ul
5381 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5382 #if !BIG_OK
5383   your preprocessor is broken;
5384 #endif
5385 #if BIG_OK
5386 #else
5387   your preprocessor is broken;
5388 #endif
5389 static long long int bignum = -9223372036854775807LL;
5390 static unsigned long long int ubignum = BIG64;
5391
5392 struct incomplete_array
5393 {
5394   int datasize;
5395   double data[];
5396 };
5397
5398 struct named_init {
5399   int number;
5400   const wchar_t *name;
5401   double average;
5402 };
5403
5404 typedef const char *ccp;
5405
5406 static inline int
5407 test_restrict (ccp restrict text)
5408 {
5409   // See if C++-style comments work.
5410   // Iterate through items via the restricted pointer.
5411   // Also check for declarations in for loops.
5412   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5413     continue;
5414   return 0;
5415 }
5416
5417 // Check varargs and va_copy.
5418 static void
5419 test_varargs (const char *format, ...)
5420 {
5421   va_list args;
5422   va_start (args, format);
5423   va_list args_copy;
5424   va_copy (args_copy, args);
5425
5426   const char *str;
5427   int number;
5428   float fnumber;
5429
5430   while (*format)
5431     {
5432       switch (*format++)
5433         {
5434         case 's': // string
5435           str = va_arg (args_copy, const char *);
5436           break;
5437         case 'd': // int
5438           number = va_arg (args_copy, int);
5439           break;
5440         case 'f': // float
5441           fnumber = va_arg (args_copy, double);
5442           break;
5443         default:
5444           break;
5445         }
5446     }
5447   va_end (args_copy);
5448   va_end (args);
5449 }
5450
5451 int
5452 main ()
5453 {
5454
5455   // Check bool.
5456   _Bool success = false;
5457
5458   // Check restrict.
5459   if (test_restrict ("String literal") == 0)
5460     success = true;
5461   char *restrict newvar = "Another string";
5462
5463   // Check varargs.
5464   test_varargs ("s, d' f .", "string", 65, 34.234);
5465   test_varargs_macros ();
5466
5467   // Check flexible array members.
5468   struct incomplete_array *ia =
5469     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5470   ia->datasize = 10;
5471   for (int i = 0; i < ia->datasize; ++i)
5472     ia->data[i] = i * 1.234;
5473
5474   // Check named initializers.
5475   struct named_init ni = {
5476     .number = 34,
5477     .name = L"Test wide string",
5478     .average = 543.34343,
5479   };
5480
5481   ni.number = 58;
5482
5483   int dynamic_array[ni.number];
5484   dynamic_array[ni.number - 1] = 543;
5485
5486   // work around unused variable warnings
5487   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5488           || dynamic_array[ni.number - 1] != 543);
5489
5490   ;
5491   return 0;
5492 }
5493 _ACEOF
5494 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
5495 do
5496   CC="$ac_save_CC $ac_arg"
5497   if ac_fn_c_try_compile "$LINENO"; then :
5498   ac_cv_prog_cc_c99=$ac_arg
5499 fi
5500 rm -f core conftest.err conftest.$ac_objext
5501   test "x$ac_cv_prog_cc_c99" != "xno" && break
5502 done
5503 rm -f conftest.$ac_ext
5504 CC=$ac_save_CC
5505
5506 fi
5507 # AC_CACHE_VAL
5508 case "x$ac_cv_prog_cc_c99" in
5509   x)
5510     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5511 $as_echo "none needed" >&6; } ;;
5512   xno)
5513     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5514 $as_echo "unsupported" >&6; } ;;
5515   *)
5516     CC="$CC $ac_cv_prog_cc_c99"
5517     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5518 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5519 esac
5520 if test "x$ac_cv_prog_cc_c99" != xno; then :
5521
5522 fi
5523
5524
5525
5526
5527
5528
5529 ac_ext=c
5530 ac_cpp='$CPP $CPPFLAGS'
5531 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5532 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5533 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5534 if test -n "$ac_tool_prefix"; then
5535   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5536 set dummy ${ac_tool_prefix}gcc; ac_word=$2
5537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5538 $as_echo_n "checking for $ac_word... " >&6; }
5539 if ${ac_cv_prog_CC+:} false; then :
5540   $as_echo_n "(cached) " >&6
5541 else
5542   if test -n "$CC"; then
5543   ac_cv_prog_CC="$CC" # Let the user override the test.
5544 else
5545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5546 for as_dir in $PATH
5547 do
5548   IFS=$as_save_IFS
5549   test -z "$as_dir" && as_dir=.
5550     for ac_exec_ext in '' $ac_executable_extensions; do
5551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5552     ac_cv_prog_CC="${ac_tool_prefix}gcc"
5553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5554     break 2
5555   fi
5556 done
5557   done
5558 IFS=$as_save_IFS
5559
5560 fi
5561 fi
5562 CC=$ac_cv_prog_CC
5563 if test -n "$CC"; then
5564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5565 $as_echo "$CC" >&6; }
5566 else
5567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5568 $as_echo "no" >&6; }
5569 fi
5570
5571
5572 fi
5573 if test -z "$ac_cv_prog_CC"; then
5574   ac_ct_CC=$CC
5575   # Extract the first word of "gcc", so it can be a program name with args.
5576 set dummy gcc; ac_word=$2
5577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5578 $as_echo_n "checking for $ac_word... " >&6; }
5579 if ${ac_cv_prog_ac_ct_CC+:} false; then :
5580   $as_echo_n "(cached) " >&6
5581 else
5582   if test -n "$ac_ct_CC"; then
5583   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5584 else
5585 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5586 for as_dir in $PATH
5587 do
5588   IFS=$as_save_IFS
5589   test -z "$as_dir" && as_dir=.
5590     for ac_exec_ext in '' $ac_executable_extensions; do
5591   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5592     ac_cv_prog_ac_ct_CC="gcc"
5593     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5594     break 2
5595   fi
5596 done
5597   done
5598 IFS=$as_save_IFS
5599
5600 fi
5601 fi
5602 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5603 if test -n "$ac_ct_CC"; then
5604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5605 $as_echo "$ac_ct_CC" >&6; }
5606 else
5607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5608 $as_echo "no" >&6; }
5609 fi
5610
5611   if test "x$ac_ct_CC" = x; then
5612     CC=""
5613   else
5614     case $cross_compiling:$ac_tool_warned in
5615 yes:)
5616 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5617 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5618 ac_tool_warned=yes ;;
5619 esac
5620     CC=$ac_ct_CC
5621   fi
5622 else
5623   CC="$ac_cv_prog_CC"
5624 fi
5625
5626 if test -z "$CC"; then
5627           if test -n "$ac_tool_prefix"; then
5628     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5629 set dummy ${ac_tool_prefix}cc; ac_word=$2
5630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5631 $as_echo_n "checking for $ac_word... " >&6; }
5632 if ${ac_cv_prog_CC+:} false; then :
5633   $as_echo_n "(cached) " >&6
5634 else
5635   if test -n "$CC"; then
5636   ac_cv_prog_CC="$CC" # Let the user override the test.
5637 else
5638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5639 for as_dir in $PATH
5640 do
5641   IFS=$as_save_IFS
5642   test -z "$as_dir" && as_dir=.
5643     for ac_exec_ext in '' $ac_executable_extensions; do
5644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5645     ac_cv_prog_CC="${ac_tool_prefix}cc"
5646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5647     break 2
5648   fi
5649 done
5650   done
5651 IFS=$as_save_IFS
5652
5653 fi
5654 fi
5655 CC=$ac_cv_prog_CC
5656 if test -n "$CC"; then
5657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5658 $as_echo "$CC" >&6; }
5659 else
5660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5661 $as_echo "no" >&6; }
5662 fi
5663
5664
5665   fi
5666 fi
5667 if test -z "$CC"; then
5668   # Extract the first word of "cc", so it can be a program name with args.
5669 set dummy cc; ac_word=$2
5670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5671 $as_echo_n "checking for $ac_word... " >&6; }
5672 if ${ac_cv_prog_CC+:} false; then :
5673   $as_echo_n "(cached) " >&6
5674 else
5675   if test -n "$CC"; then
5676   ac_cv_prog_CC="$CC" # Let the user override the test.
5677 else
5678   ac_prog_rejected=no
5679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5680 for as_dir in $PATH
5681 do
5682   IFS=$as_save_IFS
5683   test -z "$as_dir" && as_dir=.
5684     for ac_exec_ext in '' $ac_executable_extensions; do
5685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5686     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5687        ac_prog_rejected=yes
5688        continue
5689      fi
5690     ac_cv_prog_CC="cc"
5691     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5692     break 2
5693   fi
5694 done
5695   done
5696 IFS=$as_save_IFS
5697
5698 if test $ac_prog_rejected = yes; then
5699   # We found a bogon in the path, so make sure we never use it.
5700   set dummy $ac_cv_prog_CC
5701   shift
5702   if test $# != 0; then
5703     # We chose a different compiler from the bogus one.
5704     # However, it has the same basename, so the bogon will be chosen
5705     # first if we set CC to just the basename; use the full file name.
5706     shift
5707     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5708   fi
5709 fi
5710 fi
5711 fi
5712 CC=$ac_cv_prog_CC
5713 if test -n "$CC"; then
5714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5715 $as_echo "$CC" >&6; }
5716 else
5717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5718 $as_echo "no" >&6; }
5719 fi
5720
5721
5722 fi
5723 if test -z "$CC"; then
5724   if test -n "$ac_tool_prefix"; then
5725   for ac_prog in cl.exe
5726   do
5727     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5728 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5730 $as_echo_n "checking for $ac_word... " >&6; }
5731 if ${ac_cv_prog_CC+:} false; then :
5732   $as_echo_n "(cached) " >&6
5733 else
5734   if test -n "$CC"; then
5735   ac_cv_prog_CC="$CC" # Let the user override the test.
5736 else
5737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5738 for as_dir in $PATH
5739 do
5740   IFS=$as_save_IFS
5741   test -z "$as_dir" && as_dir=.
5742     for ac_exec_ext in '' $ac_executable_extensions; do
5743   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5744     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5746     break 2
5747   fi
5748 done
5749   done
5750 IFS=$as_save_IFS
5751
5752 fi
5753 fi
5754 CC=$ac_cv_prog_CC
5755 if test -n "$CC"; then
5756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5757 $as_echo "$CC" >&6; }
5758 else
5759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5760 $as_echo "no" >&6; }
5761 fi
5762
5763
5764     test -n "$CC" && break
5765   done
5766 fi
5767 if test -z "$CC"; then
5768   ac_ct_CC=$CC
5769   for ac_prog in cl.exe
5770 do
5771   # Extract the first word of "$ac_prog", so it can be a program name with args.
5772 set dummy $ac_prog; ac_word=$2
5773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5774 $as_echo_n "checking for $ac_word... " >&6; }
5775 if ${ac_cv_prog_ac_ct_CC+:} false; then :
5776   $as_echo_n "(cached) " >&6
5777 else
5778   if test -n "$ac_ct_CC"; then
5779   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5780 else
5781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5782 for as_dir in $PATH
5783 do
5784   IFS=$as_save_IFS
5785   test -z "$as_dir" && as_dir=.
5786     for ac_exec_ext in '' $ac_executable_extensions; do
5787   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5788     ac_cv_prog_ac_ct_CC="$ac_prog"
5789     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5790     break 2
5791   fi
5792 done
5793   done
5794 IFS=$as_save_IFS
5795
5796 fi
5797 fi
5798 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5799 if test -n "$ac_ct_CC"; then
5800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5801 $as_echo "$ac_ct_CC" >&6; }
5802 else
5803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5804 $as_echo "no" >&6; }
5805 fi
5806
5807
5808   test -n "$ac_ct_CC" && break
5809 done
5810
5811   if test "x$ac_ct_CC" = x; then
5812     CC=""
5813   else
5814     case $cross_compiling:$ac_tool_warned in
5815 yes:)
5816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5817 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5818 ac_tool_warned=yes ;;
5819 esac
5820     CC=$ac_ct_CC
5821   fi
5822 fi
5823
5824 fi
5825
5826
5827 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5828 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5829 as_fn_error $? "no acceptable C compiler found in \$PATH
5830 See \`config.log' for more details" "$LINENO" 5; }
5831
5832 # Provide some information about the compiler.
5833 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5834 set X $ac_compile
5835 ac_compiler=$2
5836 for ac_option in --version -v -V -qversion; do
5837   { { ac_try="$ac_compiler $ac_option >&5"
5838 case "(($ac_try" in
5839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5840   *) ac_try_echo=$ac_try;;
5841 esac
5842 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5843 $as_echo "$ac_try_echo"; } >&5
5844   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5845   ac_status=$?
5846   if test -s conftest.err; then
5847     sed '10a\
5848 ... rest of stderr output deleted ...
5849          10q' conftest.err >conftest.er1
5850     cat conftest.er1 >&5
5851   fi
5852   rm -f conftest.er1 conftest.err
5853   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5854   test $ac_status = 0; }
5855 done
5856
5857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5858 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5859 if ${ac_cv_c_compiler_gnu+:} false; then :
5860   $as_echo_n "(cached) " >&6
5861 else
5862   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5863 /* end confdefs.h.  */
5864
5865 int
5866 main ()
5867 {
5868 #ifndef __GNUC__
5869        choke me
5870 #endif
5871
5872   ;
5873   return 0;
5874 }
5875 _ACEOF
5876 if ac_fn_c_try_compile "$LINENO"; then :
5877   ac_compiler_gnu=yes
5878 else
5879   ac_compiler_gnu=no
5880 fi
5881 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5882 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5883
5884 fi
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5886 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5887 if test $ac_compiler_gnu = yes; then
5888   GCC=yes
5889 else
5890   GCC=
5891 fi
5892 ac_test_CFLAGS=${CFLAGS+set}
5893 ac_save_CFLAGS=$CFLAGS
5894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5895 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5896 if ${ac_cv_prog_cc_g+:} false; then :
5897   $as_echo_n "(cached) " >&6
5898 else
5899   ac_save_c_werror_flag=$ac_c_werror_flag
5900    ac_c_werror_flag=yes
5901    ac_cv_prog_cc_g=no
5902    CFLAGS="-g"
5903    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5904 /* end confdefs.h.  */
5905
5906 int
5907 main ()
5908 {
5909
5910   ;
5911   return 0;
5912 }
5913 _ACEOF
5914 if ac_fn_c_try_compile "$LINENO"; then :
5915   ac_cv_prog_cc_g=yes
5916 else
5917   CFLAGS=""
5918       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5919 /* end confdefs.h.  */
5920
5921 int
5922 main ()
5923 {
5924
5925   ;
5926   return 0;
5927 }
5928 _ACEOF
5929 if ac_fn_c_try_compile "$LINENO"; then :
5930
5931 else
5932   ac_c_werror_flag=$ac_save_c_werror_flag
5933          CFLAGS="-g"
5934          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5935 /* end confdefs.h.  */
5936
5937 int
5938 main ()
5939 {
5940
5941   ;
5942   return 0;
5943 }
5944 _ACEOF
5945 if ac_fn_c_try_compile "$LINENO"; then :
5946   ac_cv_prog_cc_g=yes
5947 fi
5948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5949 fi
5950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5951 fi
5952 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5953    ac_c_werror_flag=$ac_save_c_werror_flag
5954 fi
5955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5956 $as_echo "$ac_cv_prog_cc_g" >&6; }
5957 if test "$ac_test_CFLAGS" = set; then
5958   CFLAGS=$ac_save_CFLAGS
5959 elif test $ac_cv_prog_cc_g = yes; then
5960   if test "$GCC" = yes; then
5961     CFLAGS="-g -O2"
5962   else
5963     CFLAGS="-g"
5964   fi
5965 else
5966   if test "$GCC" = yes; then
5967     CFLAGS="-O2"
5968   else
5969     CFLAGS=
5970   fi
5971 fi
5972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5973 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5974 if ${ac_cv_prog_cc_c89+:} false; then :
5975   $as_echo_n "(cached) " >&6
5976 else
5977   ac_cv_prog_cc_c89=no
5978 ac_save_CC=$CC
5979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5980 /* end confdefs.h.  */
5981 #include <stdarg.h>
5982 #include <stdio.h>
5983 struct stat;
5984 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5985 struct buf { int x; };
5986 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5987 static char *e (p, i)
5988      char **p;
5989      int i;
5990 {
5991   return p[i];
5992 }
5993 static char *f (char * (*g) (char **, int), char **p, ...)
5994 {
5995   char *s;
5996   va_list v;
5997   va_start (v,p);
5998   s = g (p, va_arg (v,int));
5999   va_end (v);
6000   return s;
6001 }
6002
6003 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6004    function prototypes and stuff, but not '\xHH' hex character constants.
6005    These don't provoke an error unfortunately, instead are silently treated
6006    as 'x'.  The following induces an error, until -std is added to get
6007    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6008    array size at least.  It's necessary to write '\x00'==0 to get something
6009    that's true only with -std.  */
6010 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6011
6012 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6013    inside strings and character constants.  */
6014 #define FOO(x) 'x'
6015 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6016
6017 int test (int i, double x);
6018 struct s1 {int (*f) (int a);};
6019 struct s2 {int (*f) (double a);};
6020 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6021 int argc;
6022 char **argv;
6023 int
6024 main ()
6025 {
6026 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6027   ;
6028   return 0;
6029 }
6030 _ACEOF
6031 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6032         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6033 do
6034   CC="$ac_save_CC $ac_arg"
6035   if ac_fn_c_try_compile "$LINENO"; then :
6036   ac_cv_prog_cc_c89=$ac_arg
6037 fi
6038 rm -f core conftest.err conftest.$ac_objext
6039   test "x$ac_cv_prog_cc_c89" != "xno" && break
6040 done
6041 rm -f conftest.$ac_ext
6042 CC=$ac_save_CC
6043
6044 fi
6045 # AC_CACHE_VAL
6046 case "x$ac_cv_prog_cc_c89" in
6047   x)
6048     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6049 $as_echo "none needed" >&6; } ;;
6050   xno)
6051     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6052 $as_echo "unsupported" >&6; } ;;
6053   *)
6054     CC="$CC $ac_cv_prog_cc_c89"
6055     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6056 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6057 esac
6058 if test "x$ac_cv_prog_cc_c89" != xno; then :
6059
6060 fi
6061
6062 ac_ext=c
6063 ac_cpp='$CPP $CPPFLAGS'
6064 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6065 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6066 ac_compiler_gnu=$ac_cv_c_compiler_gnu
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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6074 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
6075 if ${am_cv_prog_cc_c_o+:} false; then :
6076   $as_echo_n "(cached) " >&6
6077 else
6078   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6079 /* end confdefs.h.  */
6080
6081 int
6082 main ()
6083 {
6084
6085   ;
6086   return 0;
6087 }
6088 _ACEOF
6089   # Make sure it works both with $CC and with simple cc.
6090   # Following AC_PROG_CC_C_O, we do the test twice because some
6091   # compilers refuse to overwrite an existing .o file with -o,
6092   # though they will create one.
6093   am_cv_prog_cc_c_o=yes
6094   for am_i in 1 2; do
6095     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6096    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6097    ac_status=$?
6098    echo "$as_me:$LINENO: \$? = $ac_status" >&5
6099    (exit $ac_status); } \
6100          && test -f conftest2.$ac_objext; then
6101       : OK
6102     else
6103       am_cv_prog_cc_c_o=no
6104       break
6105     fi
6106   done
6107   rm -f core conftest*
6108   unset am_i
6109 fi
6110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6111 $as_echo "$am_cv_prog_cc_c_o" >&6; }
6112 if test "$am_cv_prog_cc_c_o" != yes; then
6113    # Losing compiler, so override with the script.
6114    # FIXME: It is wrong to rewrite CC.
6115    # But if we don't then we get into trouble of one sort or another.
6116    # A longer-term fix would be to have automake use am__CC in this case,
6117    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6118    CC="$am_aux_dir/compile $CC"
6119 fi
6120 ac_ext=c
6121 ac_cpp='$CPP $CPPFLAGS'
6122 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6123 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6124 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6125
6126
6127 depcc="$CC"   am_compiler_list=
6128
6129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6130 $as_echo_n "checking dependency style of $depcc... " >&6; }
6131 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6132   $as_echo_n "(cached) " >&6
6133 else
6134   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6135   # We make a subdir and do the tests there.  Otherwise we can end up
6136   # making bogus files that we don't know about and never remove.  For
6137   # instance it was reported that on HP-UX the gcc test will end up
6138   # making a dummy file named 'D' -- because '-MD' means "put the output
6139   # in D".
6140   rm -rf conftest.dir
6141   mkdir conftest.dir
6142   # Copy depcomp to subdir because otherwise we won't find it if we're
6143   # using a relative directory.
6144   cp "$am_depcomp" conftest.dir
6145   cd conftest.dir
6146   # We will build objects and dependencies in a subdirectory because
6147   # it helps to detect inapplicable dependency modes.  For instance
6148   # both Tru64's cc and ICC support -MD to output dependencies as a
6149   # side effect of compilation, but ICC will put the dependencies in
6150   # the current directory while Tru64 will put them in the object
6151   # directory.
6152   mkdir sub
6153
6154   am_cv_CC_dependencies_compiler_type=none
6155   if test "$am_compiler_list" = ""; then
6156      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6157   fi
6158   am__universal=false
6159   case " $depcc " in #(
6160      *\ -arch\ *\ -arch\ *) am__universal=true ;;
6161      esac
6162
6163   for depmode in $am_compiler_list; do
6164     # Setup a source with many dependencies, because some compilers
6165     # like to wrap large dependency lists on column 80 (with \), and
6166     # we should not choose a depcomp mode which is confused by this.
6167     #
6168     # We need to recreate these files for each test, as the compiler may
6169     # overwrite some of them when testing with obscure command lines.
6170     # This happens at least with the AIX C compiler.
6171     : > sub/conftest.c
6172     for i in 1 2 3 4 5 6; do
6173       echo '#include "conftst'$i'.h"' >> sub/conftest.c
6174       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6175       # Solaris 10 /bin/sh.
6176       echo '/* dummy */' > sub/conftst$i.h
6177     done
6178     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6179
6180     # We check with '-c' and '-o' for the sake of the "dashmstdout"
6181     # mode.  It turns out that the SunPro C++ compiler does not properly
6182     # handle '-M -o', and we need to detect this.  Also, some Intel
6183     # versions had trouble with output in subdirs.
6184     am__obj=sub/conftest.${OBJEXT-o}
6185     am__minus_obj="-o $am__obj"
6186     case $depmode in
6187     gcc)
6188       # This depmode causes a compiler race in universal mode.
6189       test "$am__universal" = false || continue
6190       ;;
6191     nosideeffect)
6192       # After this tag, mechanisms are not by side-effect, so they'll
6193       # only be used when explicitly requested.
6194       if test "x$enable_dependency_tracking" = xyes; then
6195         continue
6196       else
6197         break
6198       fi
6199       ;;
6200     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6201       # This compiler won't grok '-c -o', but also, the minuso test has
6202       # not run yet.  These depmodes are late enough in the game, and
6203       # so weak that their functioning should not be impacted.
6204       am__obj=conftest.${OBJEXT-o}
6205       am__minus_obj=
6206       ;;
6207     none) break ;;
6208     esac
6209     if depmode=$depmode \
6210        source=sub/conftest.c object=$am__obj \
6211        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6212        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6213          >/dev/null 2>conftest.err &&
6214        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6215        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6216        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6217        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6218       # icc doesn't choke on unknown options, it will just issue warnings
6219       # or remarks (even with -Werror).  So we grep stderr for any message
6220       # that says an option was ignored or not supported.
6221       # When given -MP, icc 7.0 and 7.1 complain thusly:
6222       #   icc: Command line warning: ignoring option '-M'; no argument required
6223       # The diagnosis changed in icc 8.0:
6224       #   icc: Command line remark: option '-MP' not supported
6225       if (grep 'ignoring option' conftest.err ||
6226           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6227         am_cv_CC_dependencies_compiler_type=$depmode
6228         break
6229       fi
6230     fi
6231   done
6232
6233   cd ..
6234   rm -rf conftest.dir
6235 else
6236   am_cv_CC_dependencies_compiler_type=none
6237 fi
6238
6239 fi
6240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6241 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6242 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6243
6244  if
6245   test "x$enable_dependency_tracking" != xno \
6246   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6247   am__fastdepCC_TRUE=
6248   am__fastdepCC_FALSE='#'
6249 else
6250   am__fastdepCC_TRUE='#'
6251   am__fastdepCC_FALSE=
6252 fi
6253
6254
6255 # Ralf Wildenhues: With per-target flags we need CC_C_O
6256 # AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
6257
6258 if test $ac_cv_c_compiler_gnu = yes; then
6259     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
6260 $as_echo_n "checking whether $CC needs -traditional... " >&6; }
6261 if ${ac_cv_prog_gcc_traditional+:} false; then :
6262   $as_echo_n "(cached) " >&6
6263 else
6264     ac_pattern="Autoconf.*'x'"
6265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6266 /* end confdefs.h.  */
6267 #include <sgtty.h>
6268 Autoconf TIOCGETP
6269 _ACEOF
6270 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6271   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
6272   ac_cv_prog_gcc_traditional=yes
6273 else
6274   ac_cv_prog_gcc_traditional=no
6275 fi
6276 rm -f conftest*
6277
6278
6279   if test $ac_cv_prog_gcc_traditional = no; then
6280     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6281 /* end confdefs.h.  */
6282 #include <termio.h>
6283 Autoconf TCGETA
6284 _ACEOF
6285 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6286   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
6287   ac_cv_prog_gcc_traditional=yes
6288 fi
6289 rm -f conftest*
6290
6291   fi
6292 fi
6293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
6294 $as_echo "$ac_cv_prog_gcc_traditional" >&6; }
6295   if test $ac_cv_prog_gcc_traditional = yes; then
6296     CC="$CC -traditional"
6297   fi
6298 fi
6299
6300
6301
6302
6303
6304 CFLAGS_NTP=
6305 CPPFLAGS_NTP=
6306 LDADD_NTP=
6307 LDFLAGS_NTP=
6308
6309
6310
6311
6312
6313 case "$ac_cv_prog_cc_c89" in
6314  no)
6315     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
6316                  version 4.2.5 and higher." >&5
6317 $as_echo "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
6318                  version 4.2.5 and higher." >&2;}
6319     ;;
6320 esac
6321
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
6323 $as_echo_n "checking if $CC can handle #warning... " >&6; }
6324 if ${ntp_cv_cpp_warning+:} false; then :
6325   $as_echo_n "(cached) " >&6
6326 else
6327   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6328 /* end confdefs.h.  */
6329
6330 int
6331 main ()
6332 {
6333 #warning foo
6334   ;
6335   return 0;
6336 }
6337 _ACEOF
6338 if ac_fn_c_try_compile "$LINENO"; then :
6339   ntp_cv_cpp_warning=yes
6340 else
6341   ntp_cv_cpp_warning=no
6342
6343 fi
6344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6345
6346 fi
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cpp_warning" >&5
6348 $as_echo "$ntp_cv_cpp_warning" >&6; }
6349 case "$ntp_cv_cpp_warning" in
6350  no)
6351
6352 $as_echo "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
6353
6354 esac
6355
6356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__((...))" >&5
6357 $as_echo_n "checking if $CC supports __attribute__((...))... " >&6; }
6358 if ${ntp_cv_cc_attribute+:} false; then :
6359   $as_echo_n "(cached) " >&6
6360 else
6361   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6362 /* end confdefs.h.  */
6363
6364 int
6365 main ()
6366 {
6367 void foo(void) __attribute__((__noreturn__));
6368
6369   ;
6370   return 0;
6371 }
6372 _ACEOF
6373 if ac_fn_c_try_compile "$LINENO"; then :
6374   ntp_cv_cc_attribute=yes
6375 else
6376   ntp_cv_cc_attribute=no
6377
6378 fi
6379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6380
6381 fi
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cc_attribute" >&5
6383 $as_echo "$ntp_cv_cc_attribute" >&6; }
6384 case "$ntp_cv_cc_attribute" in
6385  yes)
6386
6387 $as_echo "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h
6388
6389 esac
6390
6391
6392 case "$GCC" in
6393  yes)
6394     SAVED_CFLAGS="$CFLAGS"
6395     CFLAGS="$CFLAGS -Wstrict-overflow"
6396     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
6397 $as_echo_n "checking if $CC can handle -Wstrict-overflow... " >&6; }
6398 if ${ntp_cv_gcc_Wstrict_overflow+:} false; then :
6399   $as_echo_n "(cached) " >&6
6400 else
6401   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6402 /* end confdefs.h.  */
6403
6404 int
6405 main ()
6406 {
6407
6408   ;
6409   return 0;
6410 }
6411 _ACEOF
6412 if ac_fn_c_try_compile "$LINENO"; then :
6413   ntp_cv_gcc_Wstrict_overflow=yes
6414 else
6415   ntp_cv_gcc_Wstrict_overflow=no
6416
6417 fi
6418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6419
6420 fi
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wstrict_overflow" >&5
6422 $as_echo "$ntp_cv_gcc_Wstrict_overflow" >&6; }
6423     #
6424     # $ntp_cv_gcc_Wstrict_overflow is tested later to add the
6425     # flag to CFLAGS.
6426     #
6427     CFLAGS="$SAVED_CFLAGS -Winit-self"
6428     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
6429 $as_echo_n "checking if $CC can handle -Winit-self... " >&6; }
6430 if ${ntp_cv_gcc_Winit_self+:} false; then :
6431   $as_echo_n "(cached) " >&6
6432 else
6433
6434             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6435 /* end confdefs.h.  */
6436
6437 int
6438 main ()
6439 {
6440
6441   ;
6442   return 0;
6443 }
6444 _ACEOF
6445 if ac_fn_c_try_compile "$LINENO"; then :
6446   ntp_cv_gcc_Winit_self=yes
6447 else
6448   ntp_cv_gcc_Winit_self=no
6449
6450 fi
6451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6452
6453
6454 fi
6455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
6456 $as_echo "$ntp_cv_gcc_Winit_self" >&6; }
6457     CFLAGS="$SAVED_CFLAGS"
6458     { SAVED_CFLAGS=; unset SAVED_CFLAGS;}
6459     #
6460     # $ntp_cv_gcc_Winit_self is tested later to add the
6461     # flag to CFLAGS_NTP.
6462     #
6463     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
6464 $as_echo_n "checking if linker supports omitting unused code and data... " >&6; }
6465 if ${ntp_cv_gc_sections_runs+:} false; then :
6466   $as_echo_n "(cached) " >&6
6467 else
6468
6469                                                                                             origCFLAGS="$CFLAGS"
6470             CFLAGS="$CFLAGS -Wl,--gc-sections"
6471             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6472 /* end confdefs.h.  */
6473
6474                         #include <stdlib.h>
6475                         #include <stdio.h>
6476
6477 int
6478 main ()
6479 {
6480
6481                         FILE *  fpC;
6482                         char    buf[32];
6483                         size_t  cch;
6484                         int     read_success_once;
6485
6486                         fpC = fopen("conftest.c", "r");
6487                         if (NULL == fpC)
6488                                 exit(1);
6489                         do {
6490                                 cch = fread(buf, sizeof(buf), 1, fpC);
6491                                 read_success_once |= (0 != cch);
6492                         } while (0 != cch);
6493                         if (!read_success_once)
6494                                 exit(2);
6495                         if (!feof(fpC))
6496                                 exit(3);
6497                         if (0 != fclose(fpC))
6498                                 exit(4);
6499
6500                         exit(EXIT_SUCCESS);
6501
6502
6503   ;
6504   return 0;
6505 }
6506 _ACEOF
6507 if ac_fn_c_try_link "$LINENO"; then :
6508
6509                     if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
6510                         ntp_cv_gc_sections_runs=no
6511                     else
6512                         ntp_cv_gc_sections_runs=no
6513                         ./conftest >/dev/null 2>&1 && ntp_cv_gc_sections_runs=yes
6514                     fi
6515
6516 else
6517   ntp_cv_gc_sections_runs=no
6518
6519 fi
6520 rm -f core conftest.err conftest.$ac_objext \
6521     conftest$ac_exeext conftest.$ac_ext
6522             CFLAGS="$origCFLAGS"
6523             { origCFLAGS=; unset origCFLAGS;}
6524
6525
6526 fi
6527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gc_sections_runs" >&5
6528 $as_echo "$ntp_cv_gc_sections_runs" >&6; }
6529     case "$ntp_cv_gc_sections_runs" in
6530      yes)
6531         LDADD_LIBNTP="-Wl,--gc-sections"
6532         CFLAGS_NTP="$CFLAGS_NTP -ffunction-sections -fdata-sections"
6533         ;;
6534      no)
6535         LDADD_LIBNTP=
6536         ;;
6537     esac
6538     CFLAGS_NTP="$CFLAGS_NTP -Wall"
6539     CFLAGS_NTP="$CFLAGS_NTP -Wcast-align"
6540     CFLAGS_NTP="$CFLAGS_NTP -Wcast-qual"
6541     # CFLAGS_NTP="$CFLAGS_NTP -Wconversion"
6542     # CFLAGS_NTP="$CFLAGS_NTP -Werror"
6543     # CFLAGS_NTP="$CFLAGS_NTP -Wextra"
6544     # CFLAGS_NTP="$CFLAGS_NTP -Wfloat-equal"
6545     CFLAGS_NTP="$CFLAGS_NTP -Wmissing-prototypes"
6546     CFLAGS_NTP="$CFLAGS_NTP -Wpointer-arith"
6547     CFLAGS_NTP="$CFLAGS_NTP -Wshadow"
6548     # CFLAGS_NTP="$CFLAGS_NTP -Wtraditional"
6549     # CFLAGS_NTP="$CFLAGS_NTP -Wwrite-strings"
6550     case "$ntp_cv_gcc_Winit_self" in
6551      yes)
6552         CFLAGS_NTP="$CFLAGS_NTP -Winit-self"
6553     esac
6554     case "$ntp_cv_gcc_Wstrict_overflow" in
6555      yes)
6556         CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
6557     esac
6558     # -W[no-]strict-prototypes might be added by NTP_OPENSSL
6559 esac
6560
6561
6562     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
6563 $as_echo_n "checking additional compiler flags... " >&6; }
6564     # allow ntp_os_cflags to be preset to skip this stuff
6565     case "${ntp_os_cflags+set}" in
6566      set)
6567         ;;
6568      *)
6569         ntp_os_cflags=
6570         case "$host_os" in
6571          aix[1-3]*)
6572             ;;
6573          aix4.[0-2]*)
6574             # turn on additional headers
6575             ntp_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
6576             ;;
6577          aix5.3*)
6578             # avoid circular dependencies in yp headers, and more
6579             ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
6580             ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS -D_MSGQSUPPORT"
6581             ;;
6582          aix*)
6583             # XXX Only verified thru AIX6.
6584             # aix7 seems to need a different XOPEN_SOURCE_EXTENDED thing.
6585             # avoid circular dependencies in yp headers
6586             # _XOPEN_SOURCE=500 = X/Open 5: POSIX 1995
6587             # _XOPEN_SOURCE=600 = X/Open 6: POSIX 2004
6588             # _XOPEN_SOURCE=700 = X/Open 7: POSIX 2008
6589             ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_SOURCE=600"
6590             ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS"
6591             ;;
6592          amigaos)
6593             ntp_os_cflags="-DSYS_AMIGA"
6594             ;;
6595          darwin*|macosx*|rhapsody*)
6596             ntp_os_cflags="-D_P1003_1B_VISIBLE"
6597             ;;
6598          hpux10.*)              # at least for hppa2.0-hp-hpux10.20
6599             case "$GCC" in
6600              yes)
6601                 ;;
6602              *)
6603                 # use Ansi compiler on HPUX, and some -Wp magic
6604                 ntp_os_cflags="-Ae -Wp,-H18816"
6605                 ;;
6606             esac
6607             ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
6608             ;;
6609          hpux*)
6610             case "$GCC" in
6611              yes)
6612                 ;;
6613              *)
6614                 # use Ansi compiler on HPUX
6615                 ntp_os_cflags="-Ae"
6616             esac
6617             ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
6618             ;;
6619          irix6*)
6620             case "$CC" in
6621              cc)
6622                 # do not use 64-bit compiler
6623                 ntp_os_cflags="-n32 -mips3 -Wl,-woff,84"
6624             esac
6625             ;;
6626          nextstep3)
6627             ntp_os_cflags="-posix"
6628             ;;
6629          solaris1*|solaris2.[0-5]|solaris2.5.*)
6630             ;;
6631          sunos[34]*|sunos5.[0-5]|sunos5.5.*)
6632             ;;
6633          solaris2*|sunos5*)
6634             # turn on 64-bit file offset interface
6635             ntp_os_cflags="-D_LARGEFILE64_SOURCE"
6636             ;;
6637          vxworks*)
6638             case "$build" in
6639              $host)
6640                 ;;
6641              *)
6642                 # Quick and dirty sanity check
6643                 case "$VX_KERNEL" in
6644                  '')
6645                     as_fn_error $? "See html/build/hints/vxworks.html" "$LINENO" 5
6646                 esac
6647                 ntp_os_cflags="-DSYS_VXWORKS"
6648             esac
6649             ;;
6650         esac
6651     esac
6652     case "$ntp_os_cflags" in
6653      '')
6654         ntp_os_cflags_msg="none needed"
6655         ;;
6656      *)
6657         ntp_os_cflags_msg="$ntp_os_cflags"
6658     esac
6659     CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
6660     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
6661 $as_echo "$ntp_os_cflags_msg" >&6; }
6662     { ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
6663     ###
6664     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5
6665 $as_echo_n "checking additional linker flags... " >&6; }
6666     # HMS: The following might still need tweaking
6667     # allow ntp_os_ldflags to be preset to skip this stuff
6668     case "${ntp_os_ldflags+set}" in
6669      set)
6670         ;;
6671      *)
6672         ntp_os_ldflags=
6673         case "$host_os" in
6674          hpux*)
6675             case "$GCC" in
6676              yes)
6677                 ntp_os_ldflags="-Wl,+allowdups"
6678                 ;;
6679             esac
6680             ;;
6681         esac
6682         ;;
6683     esac
6684     case "$ntp_os_ldflags" in
6685      '')
6686         ntp_os_ldflags_msg="none needed"
6687         ;;
6688      *)
6689         ntp_os_ldflags_msg="$ntp_os_ldflags"
6690     esac
6691     LDFLAGS_NTP="$LDFLAGS_NTP $ntp_os_ldflags"
6692     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_ldflags_msg" >&5
6693 $as_echo "$ntp_os_ldflags_msg" >&6; }
6694     { ntp_os_ldflags_msg=; unset ntp_os_ldflags_msg;}
6695
6696
6697
6698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
6699 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
6700 if ${ac_cv_c_bigendian+:} false; then :
6701   $as_echo_n "(cached) " >&6
6702 else
6703   ac_cv_c_bigendian=unknown
6704     # See if we're dealing with a universal compiler.
6705     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6706 /* end confdefs.h.  */
6707 #ifndef __APPLE_CC__
6708                not a universal capable compiler
6709              #endif
6710              typedef int dummy;
6711
6712 _ACEOF
6713 if ac_fn_c_try_compile "$LINENO"; then :
6714
6715         # Check for potential -arch flags.  It is not universal unless
6716         # there are at least two -arch flags with different values.
6717         ac_arch=
6718         ac_prev=
6719         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
6720          if test -n "$ac_prev"; then
6721            case $ac_word in
6722              i?86 | x86_64 | ppc | ppc64)
6723                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
6724                  ac_arch=$ac_word
6725                else
6726                  ac_cv_c_bigendian=universal
6727                  break
6728                fi
6729                ;;
6730            esac
6731            ac_prev=
6732          elif test "x$ac_word" = "x-arch"; then
6733            ac_prev=arch
6734          fi
6735        done
6736 fi
6737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6738     if test $ac_cv_c_bigendian = unknown; then
6739       # See if sys/param.h defines the BYTE_ORDER macro.
6740       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6741 /* end confdefs.h.  */
6742 #include <sys/types.h>
6743              #include <sys/param.h>
6744
6745 int
6746 main ()
6747 {
6748 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
6749                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
6750                      && LITTLE_ENDIAN)
6751               bogus endian macros
6752              #endif
6753
6754   ;
6755   return 0;
6756 }
6757 _ACEOF
6758 if ac_fn_c_try_compile "$LINENO"; then :
6759   # It does; now see whether it defined to BIG_ENDIAN or not.
6760          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6761 /* end confdefs.h.  */
6762 #include <sys/types.h>
6763                 #include <sys/param.h>
6764
6765 int
6766 main ()
6767 {
6768 #if BYTE_ORDER != BIG_ENDIAN
6769                  not big endian
6770                 #endif
6771
6772   ;
6773   return 0;
6774 }
6775 _ACEOF
6776 if ac_fn_c_try_compile "$LINENO"; then :
6777   ac_cv_c_bigendian=yes
6778 else
6779   ac_cv_c_bigendian=no
6780 fi
6781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6782 fi
6783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6784     fi
6785     if test $ac_cv_c_bigendian = unknown; then
6786       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
6787       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6788 /* end confdefs.h.  */
6789 #include <limits.h>
6790
6791 int
6792 main ()
6793 {
6794 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
6795               bogus endian macros
6796              #endif
6797
6798   ;
6799   return 0;
6800 }
6801 _ACEOF
6802 if ac_fn_c_try_compile "$LINENO"; then :
6803   # It does; now see whether it defined to _BIG_ENDIAN or not.
6804          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6805 /* end confdefs.h.  */
6806 #include <limits.h>
6807
6808 int
6809 main ()
6810 {
6811 #ifndef _BIG_ENDIAN
6812                  not big endian
6813                 #endif
6814
6815   ;
6816   return 0;
6817 }
6818 _ACEOF
6819 if ac_fn_c_try_compile "$LINENO"; then :
6820   ac_cv_c_bigendian=yes
6821 else
6822   ac_cv_c_bigendian=no
6823 fi
6824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6825 fi
6826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6827     fi
6828     if test $ac_cv_c_bigendian = unknown; then
6829       # Compile a test program.
6830       if test "$cross_compiling" = yes; then :
6831   # Try to guess by grepping values from an object file.
6832          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6833 /* end confdefs.h.  */
6834 short int ascii_mm[] =
6835                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
6836                 short int ascii_ii[] =
6837                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
6838                 int use_ascii (int i) {
6839                   return ascii_mm[i] + ascii_ii[i];
6840                 }
6841                 short int ebcdic_ii[] =
6842                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
6843                 short int ebcdic_mm[] =
6844                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
6845                 int use_ebcdic (int i) {
6846                   return ebcdic_mm[i] + ebcdic_ii[i];
6847                 }
6848                 extern int foo;
6849
6850 int
6851 main ()
6852 {
6853 return use_ascii (foo) == use_ebcdic (foo);
6854   ;
6855   return 0;
6856 }
6857 _ACEOF
6858 if ac_fn_c_try_compile "$LINENO"; then :
6859   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
6860               ac_cv_c_bigendian=yes
6861             fi
6862             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
6863               if test "$ac_cv_c_bigendian" = unknown; then
6864                 ac_cv_c_bigendian=no
6865               else
6866                 # finding both strings is unlikely to happen, but who knows?
6867                 ac_cv_c_bigendian=unknown
6868               fi
6869             fi
6870 fi
6871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6872 else
6873   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6874 /* end confdefs.h.  */
6875 $ac_includes_default
6876 int
6877 main ()
6878 {
6879
6880              /* Are we little or big endian?  From Harbison&Steele.  */
6881              union
6882              {
6883                long int l;
6884                char c[sizeof (long int)];
6885              } u;
6886              u.l = 1;
6887              return u.c[sizeof (long int) - 1] == 1;
6888
6889   ;
6890   return 0;
6891 }
6892 _ACEOF
6893 if ac_fn_c_try_run "$LINENO"; then :
6894   ac_cv_c_bigendian=no
6895 else
6896   ac_cv_c_bigendian=yes
6897 fi
6898 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6899   conftest.$ac_objext conftest.beam conftest.$ac_ext
6900 fi
6901
6902     fi
6903 fi
6904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
6905 $as_echo "$ac_cv_c_bigendian" >&6; }
6906  case $ac_cv_c_bigendian in #(
6907    yes)
6908      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
6909 ;; #(
6910    no)
6911       ;; #(
6912    universal)
6913
6914 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
6915
6916      ;; #(
6917    *)
6918      as_fn_error $? "unknown endianness
6919  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
6920  esac
6921
6922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
6923 $as_echo_n "checking for working volatile... " >&6; }
6924 if ${ac_cv_c_volatile+:} false; then :
6925   $as_echo_n "(cached) " >&6
6926 else
6927   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6928 /* end confdefs.h.  */
6929
6930 int
6931 main ()
6932 {
6933
6934 volatile int x;
6935 int * volatile y = (int *) 0;
6936 return !x && !y;
6937   ;
6938   return 0;
6939 }
6940 _ACEOF
6941 if ac_fn_c_try_compile "$LINENO"; then :
6942   ac_cv_c_volatile=yes
6943 else
6944   ac_cv_c_volatile=no
6945 fi
6946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6947 fi
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
6949 $as_echo "$ac_cv_c_volatile" >&6; }
6950 if test $ac_cv_c_volatile = no; then
6951
6952 $as_echo "#define volatile /**/" >>confdefs.h
6953
6954 fi
6955
6956 ac_ext=c
6957 ac_cpp='$CPP $CPPFLAGS'
6958 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6959 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6960 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6962 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6963 # On Suns, sometimes $CPP names a directory.
6964 if test -n "$CPP" && test -d "$CPP"; then
6965   CPP=
6966 fi
6967 if test -z "$CPP"; then
6968   if ${ac_cv_prog_CPP+:} false; then :
6969   $as_echo_n "(cached) " >&6
6970 else
6971       # Double quotes because CPP needs to be expanded
6972     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6973     do
6974       ac_preproc_ok=false
6975 for ac_c_preproc_warn_flag in '' yes
6976 do
6977   # Use a header file that comes with gcc, so configuring glibc
6978   # with a fresh cross-compiler works.
6979   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6980   # <limits.h> exists even on freestanding compilers.
6981   # On the NeXT, cc -E runs the code through the compiler's parser,
6982   # not just through cpp. "Syntax error" is here to catch this case.
6983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6984 /* end confdefs.h.  */
6985 #ifdef __STDC__
6986 # include <limits.h>
6987 #else
6988 # include <assert.h>
6989 #endif
6990                      Syntax error
6991 _ACEOF
6992 if ac_fn_c_try_cpp "$LINENO"; then :
6993
6994 else
6995   # Broken: fails on valid input.
6996 continue
6997 fi
6998 rm -f conftest.err conftest.i conftest.$ac_ext
6999
7000   # OK, works on sane cases.  Now check whether nonexistent headers
7001   # can be detected and how.
7002   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7003 /* end confdefs.h.  */
7004 #include <ac_nonexistent.h>
7005 _ACEOF
7006 if ac_fn_c_try_cpp "$LINENO"; then :
7007   # Broken: success on invalid input.
7008 continue
7009 else
7010   # Passes both tests.
7011 ac_preproc_ok=:
7012 break
7013 fi
7014 rm -f conftest.err conftest.i conftest.$ac_ext
7015
7016 done
7017 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7018 rm -f conftest.i conftest.err conftest.$ac_ext
7019 if $ac_preproc_ok; then :
7020   break
7021 fi
7022
7023     done
7024     ac_cv_prog_CPP=$CPP
7025
7026 fi
7027   CPP=$ac_cv_prog_CPP
7028 else
7029   ac_cv_prog_CPP=$CPP
7030 fi
7031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7032 $as_echo "$CPP" >&6; }
7033 ac_preproc_ok=false
7034 for ac_c_preproc_warn_flag in '' yes
7035 do
7036   # Use a header file that comes with gcc, so configuring glibc
7037   # with a fresh cross-compiler works.
7038   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7039   # <limits.h> exists even on freestanding compilers.
7040   # On the NeXT, cc -E runs the code through the compiler's parser,
7041   # not just through cpp. "Syntax error" is here to catch this case.
7042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7043 /* end confdefs.h.  */
7044 #ifdef __STDC__
7045 # include <limits.h>
7046 #else
7047 # include <assert.h>
7048 #endif
7049                      Syntax error
7050 _ACEOF
7051 if ac_fn_c_try_cpp "$LINENO"; then :
7052
7053 else
7054   # Broken: fails on valid input.
7055 continue
7056 fi
7057 rm -f conftest.err conftest.i conftest.$ac_ext
7058
7059   # OK, works on sane cases.  Now check whether nonexistent headers
7060   # can be detected and how.
7061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7062 /* end confdefs.h.  */
7063 #include <ac_nonexistent.h>
7064 _ACEOF
7065 if ac_fn_c_try_cpp "$LINENO"; then :
7066   # Broken: success on invalid input.
7067 continue
7068 else
7069   # Passes both tests.
7070 ac_preproc_ok=:
7071 break
7072 fi
7073 rm -f conftest.err conftest.i conftest.$ac_ext
7074
7075 done
7076 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7077 rm -f conftest.i conftest.err conftest.$ac_ext
7078 if $ac_preproc_ok; then :
7079
7080 else
7081   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7082 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7083 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7084 See \`config.log' for more details" "$LINENO" 5; }
7085 fi
7086
7087 ac_ext=c
7088 ac_cpp='$CPP $CPPFLAGS'
7089 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7090 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7091 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7092
7093
7094
7095
7096
7097
7098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for install dir and man conventions" >&5
7099 $as_echo_n "checking for install dir and man conventions... " >&6; }
7100
7101
7102 # Check whether --with-locfile was given.
7103 if test "${with_locfile+set}" = set; then :
7104   withval=$with_locfile;
7105 else
7106   with_locfile=no
7107
7108 fi
7109
7110
7111 (                                                                       \
7112     SENTINEL_DIR="$PWD" &&                                              \
7113     cd $srcdir/ &&                                                      \
7114     case "$with_locfile" in                                             \
7115      yes|no|'')                                                         \
7116         scripts/genLocInfo -d "$SENTINEL_DIR"                           \
7117         ;;                                                              \
7118      *)                                                                 \
7119         scripts/genLocInfo -d "$SENTINEL_DIR" -f "$with_locfile"        \
7120         ;;                                                              \
7121     esac                                                                \
7122 ) > genLocInfo.i 2> genLocInfo.err
7123 . ./genLocInfo.i
7124
7125 case "$GENLOCINFO" in
7126  OK)
7127     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENLOCINFOFILE" >&5
7128 $as_echo "in file $GENLOCINFOFILE" >&6; }
7129     rm genLocInfo.err genLocInfo.i
7130     ;;
7131  *)
7132     { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
7133 $as_echo "failed." >&6; }
7134     as_fn_error $? "Problem with genLocInfo!" "$LINENO" 5
7135     ;;
7136 esac
7137
7138  if test "$CALC_TICKADJ_MS" ; then
7139   WANT_CALC_TICKADJ_MS_TRUE=
7140   WANT_CALC_TICKADJ_MS_FALSE='#'
7141 else
7142   WANT_CALC_TICKADJ_MS_TRUE='#'
7143   WANT_CALC_TICKADJ_MS_FALSE=
7144 fi
7145
7146
7147
7148
7149
7150
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  if test -z "$NTPSWEEP_NI" ; then
7189   INSTALL_NTPSWEEP_TRUE=
7190   INSTALL_NTPSWEEP_FALSE='#'
7191 else
7192   INSTALL_NTPSWEEP_TRUE='#'
7193   INSTALL_NTPSWEEP_FALSE=
7194 fi
7195
7196
7197
7198
7199
7200
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  if test -z "$UPDATE_LEAP_NI" ; then
7237   INSTALL_UPDATE_LEAP_TRUE=
7238   INSTALL_UPDATE_LEAP_FALSE='#'
7239 else
7240   INSTALL_UPDATE_LEAP_TRUE='#'
7241   INSTALL_UPDATE_LEAP_FALSE=
7242 fi
7243
7244
7245
7246
7247 if test -n "$ac_tool_prefix"; then
7248   for ac_prog in ar lib "link -lib"
7249   do
7250     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7251 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7253 $as_echo_n "checking for $ac_word... " >&6; }
7254 if ${ac_cv_prog_AR+:} false; then :
7255   $as_echo_n "(cached) " >&6
7256 else
7257   if test -n "$AR"; then
7258   ac_cv_prog_AR="$AR" # Let the user override the test.
7259 else
7260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7261 for as_dir in $PATH
7262 do
7263   IFS=$as_save_IFS
7264   test -z "$as_dir" && as_dir=.
7265     for ac_exec_ext in '' $ac_executable_extensions; do
7266   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7267     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
7268     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7269     break 2
7270   fi
7271 done
7272   done
7273 IFS=$as_save_IFS
7274
7275 fi
7276 fi
7277 AR=$ac_cv_prog_AR
7278 if test -n "$AR"; then
7279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7280 $as_echo "$AR" >&6; }
7281 else
7282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7283 $as_echo "no" >&6; }
7284 fi
7285
7286
7287     test -n "$AR" && break
7288   done
7289 fi
7290 if test -z "$AR"; then
7291   ac_ct_AR=$AR
7292   for ac_prog in ar lib "link -lib"
7293 do
7294   # Extract the first word of "$ac_prog", so it can be a program name with args.
7295 set dummy $ac_prog; ac_word=$2
7296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7297 $as_echo_n "checking for $ac_word... " >&6; }
7298 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7299   $as_echo_n "(cached) " >&6
7300 else
7301   if test -n "$ac_ct_AR"; then
7302   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7303 else
7304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7305 for as_dir in $PATH
7306 do
7307   IFS=$as_save_IFS
7308   test -z "$as_dir" && as_dir=.
7309     for ac_exec_ext in '' $ac_executable_extensions; do
7310   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7311     ac_cv_prog_ac_ct_AR="$ac_prog"
7312     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7313     break 2
7314   fi
7315 done
7316   done
7317 IFS=$as_save_IFS
7318
7319 fi
7320 fi
7321 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7322 if test -n "$ac_ct_AR"; then
7323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7324 $as_echo "$ac_ct_AR" >&6; }
7325 else
7326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7327 $as_echo "no" >&6; }
7328 fi
7329
7330
7331   test -n "$ac_ct_AR" && break
7332 done
7333
7334   if test "x$ac_ct_AR" = x; then
7335     AR="false"
7336   else
7337     case $cross_compiling:$ac_tool_warned in
7338 yes:)
7339 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7340 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7341 ac_tool_warned=yes ;;
7342 esac
7343     AR=$ac_ct_AR
7344   fi
7345 fi
7346
7347 : ${AR=ar}
7348
7349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
7350 $as_echo_n "checking the archiver ($AR) interface... " >&6; }
7351 if ${am_cv_ar_interface+:} false; then :
7352   $as_echo_n "(cached) " >&6
7353 else
7354   ac_ext=c
7355 ac_cpp='$CPP $CPPFLAGS'
7356 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7357 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7358 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7359
7360    am_cv_ar_interface=ar
7361    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7362 /* end confdefs.h.  */
7363 int some_variable = 0;
7364 _ACEOF
7365 if ac_fn_c_try_compile "$LINENO"; then :
7366   am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
7367       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
7368   (eval $am_ar_try) 2>&5
7369   ac_status=$?
7370   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7371   test $ac_status = 0; }
7372       if test "$ac_status" -eq 0; then
7373         am_cv_ar_interface=ar
7374       else
7375         am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
7376         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
7377   (eval $am_ar_try) 2>&5
7378   ac_status=$?
7379   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7380   test $ac_status = 0; }
7381         if test "$ac_status" -eq 0; then
7382           am_cv_ar_interface=lib
7383         else
7384           am_cv_ar_interface=unknown
7385         fi
7386       fi
7387       rm -f conftest.lib libconftest.a
7388
7389 fi
7390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7391    ac_ext=c
7392 ac_cpp='$CPP $CPPFLAGS'
7393 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7394 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7395 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7396
7397 fi
7398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
7399 $as_echo "$am_cv_ar_interface" >&6; }
7400
7401 case $am_cv_ar_interface in
7402 ar)
7403   ;;
7404 lib)
7405   # Microsoft lib, so override with the ar-lib wrapper script.
7406   # FIXME: It is wrong to rewrite AR.
7407   # But if we don't then we get into trouble of one sort or another.
7408   # A longer-term fix would be to have automake use am__AR in this case,
7409   # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
7410   # similar.
7411   AR="$am_aux_dir/ar-lib $AR"
7412   ;;
7413 unknown)
7414   as_fn_error $? "could not determine $AR interface" "$LINENO" 5
7415   ;;
7416 esac
7417
7418
7419
7420
7421
7422 # Expose a cross-compilation indicator to makefiles
7423  if test $build != $host; then
7424   NTP_CROSSCOMPILE_TRUE=
7425   NTP_CROSSCOMPILE_FALSE='#'
7426 else
7427   NTP_CROSSCOMPILE_TRUE='#'
7428   NTP_CROSSCOMPILE_FALSE=
7429 fi
7430
7431
7432
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7434 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
7435 if ${ac_cv_path_SED+:} false; then :
7436   $as_echo_n "(cached) " >&6
7437 else
7438             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7439      for ac_i in 1 2 3 4 5 6 7; do
7440        ac_script="$ac_script$as_nl$ac_script"
7441      done
7442      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7443      { ac_script=; unset ac_script;}
7444      if test -z "$SED"; then
7445   ac_path_SED_found=false
7446   # Loop through the user's path and test for each of PROGNAME-LIST
7447   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7448 for as_dir in $PATH
7449 do
7450   IFS=$as_save_IFS
7451   test -z "$as_dir" && as_dir=.
7452     for ac_prog in sed gsed; do
7453     for ac_exec_ext in '' $ac_executable_extensions; do
7454       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7455       as_fn_executable_p "$ac_path_SED" || continue
7456 # Check for GNU ac_path_SED and select it if it is found.
7457   # Check for GNU $ac_path_SED
7458 case `"$ac_path_SED" --version 2>&1` in
7459 *GNU*)
7460   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7461 *)
7462   ac_count=0
7463   $as_echo_n 0123456789 >"conftest.in"
7464   while :
7465   do
7466     cat "conftest.in" "conftest.in" >"conftest.tmp"
7467     mv "conftest.tmp" "conftest.in"
7468     cp "conftest.in" "conftest.nl"
7469     $as_echo '' >> "conftest.nl"
7470     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7471     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7472     as_fn_arith $ac_count + 1 && ac_count=$as_val
7473     if test $ac_count -gt ${ac_path_SED_max-0}; then
7474       # Best one so far, save it but keep looking for a better one
7475       ac_cv_path_SED="$ac_path_SED"
7476       ac_path_SED_max=$ac_count
7477     fi
7478     # 10*(2^10) chars as input seems more than enough
7479     test $ac_count -gt 10 && break
7480   done
7481   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7482 esac
7483
7484       $ac_path_SED_found && break 3
7485     done
7486   done
7487   done
7488 IFS=$as_save_IFS
7489   if test -z "$ac_cv_path_SED"; then
7490     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7491   fi
7492 else
7493   ac_cv_path_SED=$SED
7494 fi
7495
7496 fi
7497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7498 $as_echo "$ac_cv_path_SED" >&6; }
7499  SED="$ac_cv_path_SED"
7500   rm -f conftest.sed
7501
7502 test -z "$SED" && SED=sed
7503 Xsed="$SED -e 1s/^X//"
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7516 $as_echo_n "checking for fgrep... " >&6; }
7517 if ${ac_cv_path_FGREP+:} false; then :
7518   $as_echo_n "(cached) " >&6
7519 else
7520   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7521    then ac_cv_path_FGREP="$GREP -F"
7522    else
7523      if test -z "$FGREP"; then
7524   ac_path_FGREP_found=false
7525   # Loop through the user's path and test for each of PROGNAME-LIST
7526   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7527 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7528 do
7529   IFS=$as_save_IFS
7530   test -z "$as_dir" && as_dir=.
7531     for ac_prog in fgrep; do
7532     for ac_exec_ext in '' $ac_executable_extensions; do
7533       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
7534       as_fn_executable_p "$ac_path_FGREP" || continue
7535 # Check for GNU ac_path_FGREP and select it if it is found.
7536   # Check for GNU $ac_path_FGREP
7537 case `"$ac_path_FGREP" --version 2>&1` in
7538 *GNU*)
7539   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7540 *)
7541   ac_count=0
7542   $as_echo_n 0123456789 >"conftest.in"
7543   while :
7544   do
7545     cat "conftest.in" "conftest.in" >"conftest.tmp"
7546     mv "conftest.tmp" "conftest.in"
7547     cp "conftest.in" "conftest.nl"
7548     $as_echo 'FGREP' >> "conftest.nl"
7549     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7550     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7551     as_fn_arith $ac_count + 1 && ac_count=$as_val
7552     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7553       # Best one so far, save it but keep looking for a better one
7554       ac_cv_path_FGREP="$ac_path_FGREP"
7555       ac_path_FGREP_max=$ac_count
7556     fi
7557     # 10*(2^10) chars as input seems more than enough
7558     test $ac_count -gt 10 && break
7559   done
7560   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7561 esac
7562
7563       $ac_path_FGREP_found && break 3
7564     done
7565   done
7566   done
7567 IFS=$as_save_IFS
7568   if test -z "$ac_cv_path_FGREP"; then
7569     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7570   fi
7571 else
7572   ac_cv_path_FGREP=$FGREP
7573 fi
7574
7575    fi
7576 fi
7577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7578 $as_echo "$ac_cv_path_FGREP" >&6; }
7579  FGREP="$ac_cv_path_FGREP"
7580
7581
7582 test -z "$GREP" && GREP=grep
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7601 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7602 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7603
7604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7605 $as_echo_n "checking how to print strings... " >&6; }
7606 # Test print first, because it will be a builtin if present.
7607 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7608    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7609   ECHO='print -r --'
7610 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7611   ECHO='printf %s\n'
7612 else
7613   # Use this function as a fallback that always works.
7614   func_fallback_echo ()
7615   {
7616     eval 'cat <<_LTECHO_EOF
7617 $1
7618 _LTECHO_EOF'
7619   }
7620   ECHO='func_fallback_echo'
7621 fi
7622
7623 # func_echo_all arg...
7624 # Invoke $ECHO with all args, space-separated.
7625 func_echo_all ()
7626 {
7627     $ECHO ""
7628 }
7629
7630 case "$ECHO" in
7631   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
7632 $as_echo "printf" >&6; } ;;
7633   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
7634 $as_echo "print -r" >&6; } ;;
7635   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
7636 $as_echo "cat" >&6; } ;;
7637 esac
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7653 if test "x$ac_cv_type_pid_t" = xyes; then :
7654
7655 else
7656
7657 cat >>confdefs.h <<_ACEOF
7658 #define pid_t int
7659 _ACEOF
7660
7661 fi
7662
7663 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7664 if test "x$ac_cv_type_size_t" = xyes; then :
7665
7666 else
7667
7668 cat >>confdefs.h <<_ACEOF
7669 #define size_t unsigned int
7670 _ACEOF
7671
7672 fi
7673
7674
7675             # Check whether --enable-c99-snprintf was given.
7676 if test "${enable_c99_snprintf+set}" = set; then :
7677   enableval=$enable_c99_snprintf; force_c99_snprintf=$enableval
7678 else
7679   force_c99_snprintf=no
7680
7681 fi
7682
7683     case "$force_c99_snprintf" in
7684      yes)
7685         hw_force_rpl_snprintf=yes
7686         hw_force_rpl_vsnprintf=yes
7687     esac
7688
7689
7690
7691
7692
7693
7694   for ac_header in $ac_header_list
7695 do :
7696   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7697 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7698 "
7699 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7700   cat >>confdefs.h <<_ACEOF
7701 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7702 _ACEOF
7703
7704 fi
7705
7706 done
7707
7708
7709
7710
7711
7712
7713
7714   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7715 $as_echo_n "checking for unsigned long long int... " >&6; }
7716 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
7717   $as_echo_n "(cached) " >&6
7718 else
7719   ac_cv_type_unsigned_long_long_int=yes
7720      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7721        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7722 /* end confdefs.h.  */
7723
7724   /* For now, do not test the preprocessor; as of 2007 there are too many
7725          implementations with broken preprocessors.  Perhaps this can
7726          be revisited in 2012.  In the meantime, code should not expect
7727          #if to work with literals wider than 32 bits.  */
7728       /* Test literals.  */
7729       long long int ll = 9223372036854775807ll;
7730       long long int nll = -9223372036854775807LL;
7731       unsigned long long int ull = 18446744073709551615ULL;
7732       /* Test constant expressions.   */
7733       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
7734                      ? 1 : -1)];
7735       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
7736                      ? 1 : -1)];
7737       int i = 63;
7738 int
7739 main ()
7740 {
7741 /* Test availability of runtime routines for shift and division.  */
7742       long long int llmax = 9223372036854775807ll;
7743       unsigned long long int ullmax = 18446744073709551615ull;
7744       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
7745               | (llmax / ll) | (llmax % ll)
7746               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
7747               | (ullmax / ull) | (ullmax % ull));
7748   ;
7749   return 0;
7750 }
7751
7752 _ACEOF
7753 if ac_fn_c_try_link "$LINENO"; then :
7754
7755 else
7756   ac_cv_type_unsigned_long_long_int=no
7757 fi
7758 rm -f core conftest.err conftest.$ac_objext \
7759     conftest$ac_exeext conftest.$ac_ext
7760      fi
7761 fi
7762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
7763 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
7764   if test $ac_cv_type_unsigned_long_long_int = yes; then
7765
7766 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
7767
7768   fi
7769
7770
7771       ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
7772 if test "x$ac_cv_func_vsnprintf" = xyes; then :
7773   hw_cv_func_vsnprintf=yes
7774 else
7775   hw_cv_func_vsnprintf=no
7776 fi
7777
7778   if test "$hw_cv_func_vsnprintf" = yes; then :
7779   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
7780 $as_echo_n "checking whether vsnprintf is C99 compliant... " >&6; }
7781 if ${hw_cv_func_vsnprintf_c99+:} false; then :
7782   $as_echo_n "(cached) " >&6
7783 else
7784   if test "$cross_compiling" = yes; then :
7785   hw_cv_func_vsnprintf_c99=no
7786 else
7787   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7788 /* end confdefs.h.  */
7789 #if HAVE_STDARG_H
7790           #include <stdarg.h>
7791           #endif
7792           #include <stdio.h>
7793           static int testprintf(char *buf, size_t size, const char *format, ...)
7794           {
7795             int result;
7796             va_list ap;
7797             va_start(ap, format);
7798             result = vsnprintf(buf, size, format, ap);
7799             va_end(ap);
7800             return result;
7801           }
7802 int
7803 main ()
7804 {
7805 char buf[43];
7806           if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
7807               testprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
7808               buf[0] != 'T' || buf[3] != '\0')
7809             return 1;
7810   ;
7811   return 0;
7812 }
7813 _ACEOF
7814 if ac_fn_c_try_run "$LINENO"; then :
7815   hw_cv_func_vsnprintf_c99=yes
7816 else
7817   hw_cv_func_vsnprintf_c99=no
7818 fi
7819 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7820   conftest.$ac_objext conftest.beam conftest.$ac_ext
7821 fi
7822
7823 fi
7824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
7825 $as_echo "$hw_cv_func_vsnprintf_c99" >&6; }
7826 else
7827   hw_cv_func_vsnprintf_c99=no
7828 fi
7829
7830 $as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
7831
7832   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement vsnprintf will be used" >&5
7833 $as_echo_n "checking if C99-snprintf replacement vsnprintf will be used... " >&6; }
7834   if test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no; then :
7835   hw_use_rpl_vsnprintf=yes
7836 else
7837   hw_use_rpl_vsnprintf=no
7838 fi
7839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_vsnprintf" >&5
7840 $as_echo "$hw_use_rpl_vsnprintf" >&6; }
7841   if test "$hw_use_rpl_vsnprintf" = yes; then :
7842
7843 $as_echo "#define HW_WANT_RPL_VSNPRINTF 1" >>confdefs.h
7844
7845     if test ${hw_nodef_vsnprintf=no} = no; then :
7846
7847 $as_echo "#define vsnprintf rpl_vsnprintf" >>confdefs.h
7848
7849 fi
7850     for ac_header in inttypes.h locale.h stddef.h stdint.h
7851 do :
7852   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7853 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7854 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7855   cat >>confdefs.h <<_ACEOF
7856 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7857 _ACEOF
7858
7859 fi
7860
7861 done
7862
7863     ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
7864 "
7865 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
7866
7867 cat >>confdefs.h <<_ACEOF
7868 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
7869 _ACEOF
7870
7871
7872 fi
7873 ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include <locale.h>
7874 "
7875 if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes; then :
7876
7877 cat >>confdefs.h <<_ACEOF
7878 #define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1
7879 _ACEOF
7880
7881
7882 fi
7883
7884
7885   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
7886 $as_echo_n "checking for long double... " >&6; }
7887 if ${ac_cv_type_long_double+:} false; then :
7888   $as_echo_n "(cached) " >&6
7889 else
7890   if test "$GCC" = yes; then
7891        ac_cv_type_long_double=yes
7892      else
7893        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7894 /* end confdefs.h.  */
7895 /* The Stardent Vistra knows sizeof (long double), but does
7896                  not support it.  */
7897               long double foo = 0.0L;
7898 int
7899 main ()
7900 {
7901 static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
7902               sizeof (double) <= sizeof (long double))];
7903 test_array [0] = 0;
7904 return test_array [0];
7905
7906   ;
7907   return 0;
7908 }
7909 _ACEOF
7910 if ac_fn_c_try_compile "$LINENO"; then :
7911   ac_cv_type_long_double=yes
7912 else
7913   ac_cv_type_long_double=no
7914 fi
7915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7916      fi
7917 fi
7918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
7919 $as_echo "$ac_cv_type_long_double" >&6; }
7920   if test $ac_cv_type_long_double = yes; then
7921
7922 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
7923
7924   fi
7925
7926
7927
7928   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
7929 $as_echo_n "checking for long long int... " >&6; }
7930 if ${ac_cv_type_long_long_int+:} false; then :
7931   $as_echo_n "(cached) " >&6
7932 else
7933   ac_cv_type_long_long_int=yes
7934       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7935         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
7936         if test $ac_cv_type_long_long_int = yes; then
7937                                   if test "$cross_compiling" = yes; then :
7938   :
7939 else
7940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7941 /* end confdefs.h.  */
7942 #include <limits.h>
7943                  #ifndef LLONG_MAX
7944                  # define HALF \
7945                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
7946                  # define LLONG_MAX (HALF - 1 + HALF)
7947                  #endif
7948 int
7949 main ()
7950 {
7951 long long int n = 1;
7952                  int i;
7953                  for (i = 0; ; i++)
7954                    {
7955                      long long int m = n << i;
7956                      if (m >> i != n)
7957                        return 1;
7958                      if (LLONG_MAX / 2 < m)
7959                        break;
7960                    }
7961                  return 0;
7962   ;
7963   return 0;
7964 }
7965 _ACEOF
7966 if ac_fn_c_try_run "$LINENO"; then :
7967
7968 else
7969   ac_cv_type_long_long_int=no
7970 fi
7971 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7972   conftest.$ac_objext conftest.beam conftest.$ac_ext
7973 fi
7974
7975         fi
7976       fi
7977 fi
7978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
7979 $as_echo "$ac_cv_type_long_long_int" >&6; }
7980   if test $ac_cv_type_long_long_int = yes; then
7981
7982 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
7983
7984   fi
7985
7986
7987   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7988 $as_echo_n "checking for unsigned long long int... " >&6; }
7989 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
7990   $as_echo_n "(cached) " >&6
7991 else
7992   ac_cv_type_unsigned_long_long_int=yes
7993      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7994        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7995 /* end confdefs.h.  */
7996
7997   /* For now, do not test the preprocessor; as of 2007 there are too many
7998          implementations with broken preprocessors.  Perhaps this can
7999          be revisited in 2012.  In the meantime, code should not expect
8000          #if to work with literals wider than 32 bits.  */
8001       /* Test literals.  */
8002       long long int ll = 9223372036854775807ll;
8003       long long int nll = -9223372036854775807LL;
8004       unsigned long long int ull = 18446744073709551615ULL;
8005       /* Test constant expressions.   */
8006       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
8007                      ? 1 : -1)];
8008       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
8009                      ? 1 : -1)];
8010       int i = 63;
8011 int
8012 main ()
8013 {
8014 /* Test availability of runtime routines for shift and division.  */
8015       long long int llmax = 9223372036854775807ll;
8016       unsigned long long int ullmax = 18446744073709551615ull;
8017       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
8018               | (llmax / ll) | (llmax % ll)
8019               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
8020               | (ullmax / ull) | (ullmax % ull));
8021   ;
8022   return 0;
8023 }
8024
8025 _ACEOF
8026 if ac_fn_c_try_link "$LINENO"; then :
8027
8028 else
8029   ac_cv_type_unsigned_long_long_int=no
8030 fi
8031 rm -f core conftest.err conftest.$ac_objext \
8032     conftest$ac_exeext conftest.$ac_ext
8033      fi
8034 fi
8035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
8036 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
8037   if test $ac_cv_type_unsigned_long_long_int = yes; then
8038
8039 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8040
8041   fi
8042
8043     ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
8044 if test "x$ac_cv_type_size_t" = xyes; then :
8045
8046 else
8047
8048 cat >>confdefs.h <<_ACEOF
8049 #define size_t unsigned int
8050 _ACEOF
8051
8052 fi
8053
8054
8055
8056   ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
8057 if test "x$ac_cv_type_intmax_t" = xyes; then :
8058
8059 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
8060
8061 else
8062   test $ac_cv_type_long_long_int = yes \
8063        && ac_type='long long int' \
8064        || ac_type='long int'
8065
8066 cat >>confdefs.h <<_ACEOF
8067 #define intmax_t $ac_type
8068 _ACEOF
8069
8070 fi
8071
8072
8073
8074
8075   ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
8076 if test "x$ac_cv_type_uintmax_t" = xyes; then :
8077
8078 $as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
8079
8080 else
8081   test $ac_cv_type_unsigned_long_long_int = yes \
8082        && ac_type='unsigned long long int' \
8083        || ac_type='unsigned long int'
8084
8085 cat >>confdefs.h <<_ACEOF
8086 #define uintmax_t $ac_type
8087 _ACEOF
8088
8089 fi
8090
8091
8092
8093   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
8094 if test "x$ac_cv_type_uintptr_t" = xyes; then :
8095
8096 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
8097
8098 else
8099   for ac_type in 'unsigned int' 'unsigned long int' \
8100         'unsigned long long int'; do
8101        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8102 /* end confdefs.h.  */
8103 $ac_includes_default
8104 int
8105 main ()
8106 {
8107 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
8108 test_array [0] = 0;
8109 return test_array [0];
8110
8111   ;
8112   return 0;
8113 }
8114 _ACEOF
8115 if ac_fn_c_try_compile "$LINENO"; then :
8116
8117 cat >>confdefs.h <<_ACEOF
8118 #define uintptr_t $ac_type
8119 _ACEOF
8120
8121           ac_type=
8122 fi
8123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8124        test -z "$ac_type" && break
8125      done
8126 fi
8127
8128
8129     ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
8130 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
8131
8132 cat >>confdefs.h <<_ACEOF
8133 #define HAVE_PTRDIFF_T 1
8134 _ACEOF
8135
8136
8137 fi
8138
8139     for ac_func in localeconv
8140 do :
8141   ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
8142 if test "x$ac_cv_func_localeconv" = xyes; then :
8143   cat >>confdefs.h <<_ACEOF
8144 #define HAVE_LOCALECONV 1
8145 _ACEOF
8146
8147 fi
8148 done
8149
8150
8151   if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
8152   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
8153 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
8154 if ${ac_cv_c_const+:} false; then :
8155   $as_echo_n "(cached) " >&6
8156 else
8157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8158 /* end confdefs.h.  */
8159
8160 int
8161 main ()
8162 {
8163
8164 #ifndef __cplusplus
8165   /* Ultrix mips cc rejects this sort of thing.  */
8166   typedef int charset[2];
8167   const charset cs = { 0, 0 };
8168   /* SunOS 4.1.1 cc rejects this.  */
8169   char const *const *pcpcc;
8170   char **ppc;
8171   /* NEC SVR4.0.2 mips cc rejects this.  */
8172   struct point {int x, y;};
8173   static struct point const zero = {0,0};
8174   /* AIX XL C 1.02.0.0 rejects this.
8175      It does not let you subtract one const X* pointer from another in
8176      an arm of an if-expression whose if-part is not a constant
8177      expression */
8178   const char *g = "string";
8179   pcpcc = &g + (g ? g-g : 0);
8180   /* HPUX 7.0 cc rejects these. */
8181   ++pcpcc;
8182   ppc = (char**) pcpcc;
8183   pcpcc = (char const *const *) ppc;
8184   { /* SCO 3.2v4 cc rejects this sort of thing.  */
8185     char tx;
8186     char *t = &tx;
8187     char const *s = 0 ? (char *) 0 : (char const *) 0;
8188
8189     *t++ = 0;
8190     if (s) return 0;
8191   }
8192   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
8193     int x[] = {25, 17};
8194     const int *foo = &x[0];
8195     ++foo;
8196   }
8197   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8198     typedef const int *iptr;
8199     iptr p = 0;
8200     ++p;
8201   }
8202   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
8203        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8204     struct s { int j; const int *ap[3]; } bx;
8205     struct s *b = &bx; b->j = 5;
8206   }
8207   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8208     const int foo = 10;
8209     if (!foo) return 0;
8210   }
8211   return !cs[0] && !zero.x;
8212 #endif
8213
8214   ;
8215   return 0;
8216 }
8217 _ACEOF
8218 if ac_fn_c_try_compile "$LINENO"; then :
8219   ac_cv_c_const=yes
8220 else
8221   ac_cv_c_const=no
8222 fi
8223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8224 fi
8225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
8226 $as_echo "$ac_cv_c_const" >&6; }
8227 if test $ac_cv_c_const = no; then
8228
8229 $as_echo "#define const /**/" >>confdefs.h
8230
8231 fi
8232
8233
8234
8235
8236     case " $LIBOBJS " in
8237   *" snprintf.$ac_objext "* ) ;;
8238   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
8239  ;;
8240 esac
8241
8242     _hw_cv_func_xprintf_replace_done=yes
8243 fi
8244
8245 fi
8246
8247
8248     ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
8249 if test "x$ac_cv_func_snprintf" = xyes; then :
8250   hw_cv_func_snprintf=yes
8251 else
8252   hw_cv_func_snprintf=no
8253 fi
8254
8255   if test "$hw_cv_func_snprintf" = yes; then :
8256   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
8257 $as_echo_n "checking whether snprintf is C99 compliant... " >&6; }
8258 if ${hw_cv_func_snprintf_c99+:} false; then :
8259   $as_echo_n "(cached) " >&6
8260 else
8261   if test "$cross_compiling" = yes; then :
8262   hw_cv_func_snprintf_c99=no
8263 else
8264   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8265 /* end confdefs.h.  */
8266 #include <stdio.h>
8267 int
8268 main ()
8269 {
8270 char buf[43];
8271           if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
8272               snprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
8273               buf[0] != 'T' || buf[3] != '\0')
8274             return 1;
8275   ;
8276   return 0;
8277 }
8278 _ACEOF
8279 if ac_fn_c_try_run "$LINENO"; then :
8280   hw_cv_func_snprintf_c99=yes
8281 else
8282   hw_cv_func_snprintf_c99=no
8283 fi
8284 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8285   conftest.$ac_objext conftest.beam conftest.$ac_ext
8286 fi
8287
8288 fi
8289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
8290 $as_echo "$hw_cv_func_snprintf_c99" >&6; }
8291 else
8292   hw_cv_func_snprintf_c99=no
8293 fi
8294
8295 $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
8296
8297   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement snprintf will be used" >&5
8298 $as_echo_n "checking if C99-snprintf replacement snprintf will be used... " >&6; }
8299   if test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no; then :
8300   hw_use_rpl_snprintf=yes
8301 else
8302   hw_use_rpl_snprintf=no
8303 fi
8304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_snprintf" >&5
8305 $as_echo "$hw_use_rpl_snprintf" >&6; }
8306   if test "$hw_use_rpl_snprintf" = yes; then :
8307
8308 $as_echo "#define HW_WANT_RPL_SNPRINTF 1" >>confdefs.h
8309
8310     if test ${hw_nodef_snprintf=no} = no; then :
8311
8312 $as_echo "#define snprintf rpl_snprintf" >>confdefs.h
8313
8314 fi
8315
8316   if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
8317   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
8318 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
8319 if ${ac_cv_c_const+:} false; then :
8320   $as_echo_n "(cached) " >&6
8321 else
8322   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8323 /* end confdefs.h.  */
8324
8325 int
8326 main ()
8327 {
8328
8329 #ifndef __cplusplus
8330   /* Ultrix mips cc rejects this sort of thing.  */
8331   typedef int charset[2];
8332   const charset cs = { 0, 0 };
8333   /* SunOS 4.1.1 cc rejects this.  */
8334   char const *const *pcpcc;
8335   char **ppc;
8336   /* NEC SVR4.0.2 mips cc rejects this.  */
8337   struct point {int x, y;};
8338   static struct point const zero = {0,0};
8339   /* AIX XL C 1.02.0.0 rejects this.
8340      It does not let you subtract one const X* pointer from another in
8341      an arm of an if-expression whose if-part is not a constant
8342      expression */
8343   const char *g = "string";
8344   pcpcc = &g + (g ? g-g : 0);
8345   /* HPUX 7.0 cc rejects these. */
8346   ++pcpcc;
8347   ppc = (char**) pcpcc;
8348   pcpcc = (char const *const *) ppc;
8349   { /* SCO 3.2v4 cc rejects this sort of thing.  */
8350     char tx;
8351     char *t = &tx;
8352     char const *s = 0 ? (char *) 0 : (char const *) 0;
8353
8354     *t++ = 0;
8355     if (s) return 0;
8356   }
8357   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
8358     int x[] = {25, 17};
8359     const int *foo = &x[0];
8360     ++foo;
8361   }
8362   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8363     typedef const int *iptr;
8364     iptr p = 0;
8365     ++p;
8366   }
8367   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
8368        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8369     struct s { int j; const int *ap[3]; } bx;
8370     struct s *b = &bx; b->j = 5;
8371   }
8372   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8373     const int foo = 10;
8374     if (!foo) return 0;
8375   }
8376   return !cs[0] && !zero.x;
8377 #endif
8378
8379   ;
8380   return 0;
8381 }
8382 _ACEOF
8383 if ac_fn_c_try_compile "$LINENO"; then :
8384   ac_cv_c_const=yes
8385 else
8386   ac_cv_c_const=no
8387 fi
8388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8389 fi
8390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
8391 $as_echo "$ac_cv_c_const" >&6; }
8392 if test $ac_cv_c_const = no; then
8393
8394 $as_echo "#define const /**/" >>confdefs.h
8395
8396 fi
8397
8398
8399
8400
8401     case " $LIBOBJS " in
8402   *" snprintf.$ac_objext "* ) ;;
8403   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
8404  ;;
8405 esac
8406
8407     _hw_cv_func_xprintf_replace_done=yes
8408 fi
8409
8410 fi
8411
8412
8413
8414
8415
8416 # HMS: Save $LIBS and empty it.
8417 # any LIBS we add here should go in to LDADD_LIBNTP
8418
8419 __LIBS=$LIBS
8420 LIBS=
8421
8422
8423
8424 # [Bug 2332] because we need to know if we are using GNU ld...
8425
8426
8427 # Check whether --with-gnu-ld was given.
8428 if test "${with_gnu_ld+set}" = set; then :
8429   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8430 else
8431   with_gnu_ld=no
8432 fi
8433
8434 ac_prog=ld
8435 if test "$GCC" = yes; then
8436   # Check if gcc -print-prog-name=ld gives a path.
8437   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8438 $as_echo_n "checking for ld used by $CC... " >&6; }
8439   case $host in
8440   *-*-mingw*)
8441     # gcc leaves a trailing carriage return which upsets mingw
8442     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8443   *)
8444     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8445   esac
8446   case $ac_prog in
8447     # Accept absolute paths.
8448     [\\/]* | ?:[\\/]*)
8449       re_direlt='/[^/][^/]*/\.\./'
8450       # Canonicalize the pathname of ld
8451       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
8452       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
8453         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
8454       done
8455       test -z "$LD" && LD="$ac_prog"
8456       ;;
8457   "")
8458     # If it fails, then pretend we aren't using GCC.
8459     ac_prog=ld
8460     ;;
8461   *)
8462     # If it is relative, then search for the first ld in PATH.
8463     with_gnu_ld=unknown
8464     ;;
8465   esac
8466 elif test "$with_gnu_ld" = yes; then
8467   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8468 $as_echo_n "checking for GNU ld... " >&6; }
8469 else
8470   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8471 $as_echo_n "checking for non-GNU ld... " >&6; }
8472 fi
8473 if ${lt_cv_path_LD+:} false; then :
8474   $as_echo_n "(cached) " >&6
8475 else
8476   if test -z "$LD"; then
8477   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8478   for ac_dir in $PATH; do
8479     IFS="$lt_save_ifs"
8480     test -z "$ac_dir" && ac_dir=.
8481     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8482       lt_cv_path_LD="$ac_dir/$ac_prog"
8483       # Check to see if the program is GNU ld.  I'd rather use --version,
8484       # but apparently some variants of GNU ld only accept -v.
8485       # Break only if it was the GNU/non-GNU ld that we prefer.
8486       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
8487       *GNU* | *'with BFD'*)
8488         test "$with_gnu_ld" != no && break
8489         ;;
8490       *)
8491         test "$with_gnu_ld" != yes && break
8492         ;;
8493       esac
8494     fi
8495   done
8496   IFS="$lt_save_ifs"
8497 else
8498   lt_cv_path_LD="$LD" # Let the user override the test with a path.
8499 fi
8500 fi
8501
8502 LD="$lt_cv_path_LD"
8503 if test -n "$LD"; then
8504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8505 $as_echo "$LD" >&6; }
8506 else
8507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8508 $as_echo "no" >&6; }
8509 fi
8510 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8512 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8513 if ${lt_cv_prog_gnu_ld+:} false; then :
8514   $as_echo_n "(cached) " >&6
8515 else
8516   # I'd rather use --version here, but apparently some GNU lds only accept -v.
8517 case `$LD -v 2>&1 </dev/null` in
8518 *GNU* | *'with BFD'*)
8519   lt_cv_prog_gnu_ld=yes
8520   ;;
8521 *)
8522   lt_cv_prog_gnu_ld=no
8523   ;;
8524 esac
8525 fi
8526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
8527 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
8528 with_gnu_ld=$lt_cv_prog_gnu_ld
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
8541 $as_echo_n "checking for directory path separator... " >&6; }
8542 if ${ntp_cv_dir_sep+:} false; then :
8543   $as_echo_n "(cached) " >&6
8544 else
8545
8546         case "$ntp_cv_dir_sep" in
8547          '')
8548             case "$host_os" in
8549              *djgpp | *mingw32* | *emx*)
8550                 ntp_cv_dir_sep="'\\'"
8551                 ;;
8552              *)
8553                 ntp_cv_dir_sep="'/'"
8554                 ;;
8555             esac
8556         esac
8557
8558
8559 fi
8560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
8561 $as_echo "$ntp_cv_dir_sep" >&6; }
8562
8563 cat >>confdefs.h <<_ACEOF
8564 #define DIR_SEP $ntp_cv_dir_sep
8565 _ACEOF
8566
8567
8568
8569     NTP_ORIG_LIBS="$LIBS"
8570
8571 # Check whether --with-lineeditlibs was given.
8572 if test "${with_lineeditlibs+set}" = set; then :
8573   withval=$with_lineeditlibs; use_lineeditlibs="$withval"
8574 else
8575   use_lineeditlibs="edit,editline"
8576
8577 fi
8578
8579     { $as_echo "$as_me:${as_lineno-$LINENO}: checking line editing libraries" >&5
8580 $as_echo_n "checking line editing libraries... " >&6; }
8581     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_lineeditlibs" >&5
8582 $as_echo "$use_lineeditlibs" >&6; }
8583     case "$use_lineeditlibs" in
8584      no)
8585         ntp_lib_lineedit=no
8586         ;;
8587      *)
8588         for lineedit_lib in `echo $use_lineeditlibs | sed -e 's/,/ /'`; do
8589             for term_lib in "" termcap curses ncurses; do
8590                 case "$term_lib" in
8591                  '')
8592                     TRY_LIB="-l$lineedit_lib"
8593                     ;;
8594                  *)
8595                     TRY_LIB="-l$lineedit_lib -l$term_lib"
8596                     ;;
8597                 esac
8598                 LIBS="$NTP_ORIG_LIBS $TRY_LIB"
8599                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline() with $TRY_LIB" >&5
8600 $as_echo_n "checking for readline() with $TRY_LIB... " >&6; }
8601                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8602 /* end confdefs.h.  */
8603
8604 /* Override any GCC internal prototype to avoid an error.
8605    Use char because int might match the return type of a GCC
8606    builtin and then its argument prototype would still apply.  */
8607 #ifdef __cplusplus
8608 extern "C"
8609 #endif
8610 char readline ();
8611 int
8612 main ()
8613 {
8614 return readline ();
8615   ;
8616   return 0;
8617 }
8618 _ACEOF
8619 if ac_fn_c_try_link "$LINENO"; then :
8620   ntp_lib_lineedit="$TRY_LIB"
8621 fi
8622 rm -f core conftest.err conftest.$ac_objext \
8623     conftest$ac_exeext conftest.$ac_ext
8624                 case "$ntp_lib_lineedit" in
8625                  '')
8626                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8627 $as_echo "no" >&6; }
8628                     ;;
8629                  *)
8630                     # Use readline()
8631                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8632 $as_echo "yes" >&6; }
8633                     break
8634                 esac
8635                 case "$term_lib" in
8636                  '')
8637                     # do not try el_gets without a terminal library
8638                     ;;
8639                  *)
8640                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_gets() with $TRY_LIB" >&5
8641 $as_echo_n "checking for el_gets() with $TRY_LIB... " >&6; }
8642                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8643 /* end confdefs.h.  */
8644
8645 /* Override any GCC internal prototype to avoid an error.
8646    Use char because int might match the return type of a GCC
8647    builtin and then its argument prototype would still apply.  */
8648 #ifdef __cplusplus
8649 extern "C"
8650 #endif
8651 char el_gets ();
8652 int
8653 main ()
8654 {
8655 return el_gets ();
8656   ;
8657   return 0;
8658 }
8659 _ACEOF
8660 if ac_fn_c_try_link "$LINENO"; then :
8661   ntp_lib_lineedit="$TRY_LIB"
8662 fi
8663 rm -f core conftest.err conftest.$ac_objext \
8664     conftest$ac_exeext conftest.$ac_ext
8665                     case "$ntp_lib_lineedit" in
8666                      '')
8667                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8668 $as_echo "no" >&6; }
8669                         ;;
8670                      *) # Use el_gets()
8671                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8672 $as_echo "yes" >&6; }
8673                         break
8674                         ;;
8675                     esac        # $ntp_lib_lineedit
8676                 esac            # $term_lib
8677             done
8678             case "$ntp_lib_lineedit" in
8679              '')
8680                 ;;
8681              *)
8682                 break
8683                 ;;
8684             esac
8685         done
8686         LIBS="$NTP_ORIG_LIBS"
8687         ;;
8688     esac        # $use_lineeditlibs
8689
8690     case "$ntp_lib_lineedit" in
8691      '')
8692         ntp_lib_lineedit="no"
8693         ;;
8694      no)
8695         ;;
8696      *)
8697         EDITLINE_LIBS="$ntp_lib_lineedit"
8698
8699         ;;
8700     esac        # $ntp_lib_lineedit
8701
8702     case "$ntp_lib_lineedit" in
8703      no)
8704         ;;
8705      *)
8706         for ac_header in readline.h readline/readline.h histedit.h
8707 do :
8708   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8709 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8710 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8711   cat >>confdefs.h <<_ACEOF
8712 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8713 _ACEOF
8714
8715 fi
8716
8717 done
8718
8719         for ac_header in history.h readline/history.h
8720 do :
8721   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8722 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8723 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8724   cat >>confdefs.h <<_ACEOF
8725 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8726 _ACEOF
8727
8728 fi
8729
8730 done
8731
8732
8733         case "$ac_cv_header_histedit_h" in
8734          yes)
8735             { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to el_init()" >&5
8736 $as_echo_n "checking number of arguments to el_init()... " >&6; }
8737 if ${ntp_cv_el_init_args+:} false; then :
8738   $as_echo_n "(cached) " >&6
8739 else
8740   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8741 /* end confdefs.h.  */
8742
8743                             #include <stdio.h>
8744                             #include <histedit.h>
8745
8746 int
8747 main ()
8748 {
8749
8750                             el_init("conftest", stdin, stdout, stderr);
8751
8752
8753   ;
8754   return 0;
8755 }
8756 _ACEOF
8757 if ac_fn_c_try_compile "$LINENO"; then :
8758   ntp_cv_el_init_args=4
8759 else
8760   ntp_cv_el_init_args=3
8761
8762 fi
8763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8764
8765 fi
8766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_el_init_args" >&5
8767 $as_echo "$ntp_cv_el_init_args" >&6; }
8768
8769 cat >>confdefs.h <<_ACEOF
8770 #define EL_INIT_ARGS $ntp_cv_el_init_args
8771 _ACEOF
8772
8773         esac
8774
8775         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
8776 $as_echo_n "checking whether readline supports history... " >&6; }
8777
8778         ntp_lib_lineedit_history="no"
8779         ORIG_LIBS="$LIBS"
8780         LIBS="$ORIG_LIBS $ntp_lib_lineedit"
8781         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8782 /* end confdefs.h.  */
8783
8784 /* Override any GCC internal prototype to avoid an error.
8785    Use char because int might match the return type of a GCC
8786    builtin and then its argument prototype would still apply.  */
8787 #ifdef __cplusplus
8788 extern "C"
8789 #endif
8790 char add_history ();
8791 int
8792 main ()
8793 {
8794 return add_history ();
8795   ;
8796   return 0;
8797 }
8798 _ACEOF
8799 if ac_fn_c_try_link "$LINENO"; then :
8800   ntp_lib_lineedit_history="yes"
8801 fi
8802 rm -f core conftest.err conftest.$ac_objext \
8803     conftest$ac_exeext conftest.$ac_ext
8804         LIBS="$ORIG_LIBS"
8805
8806         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_lib_lineedit_history" >&5
8807 $as_echo "$ntp_lib_lineedit_history" >&6; }
8808
8809         case "$ntp_lib_lineedit_history" in
8810          yes)
8811
8812 $as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
8813
8814         esac
8815     esac        # $ntp_lib_lineedit
8816     { NTP_ORIG_LIBS=; unset NTP_ORIG_LIBS;}
8817     { ORIG_LIBS=; unset ORIG_LIBS;}
8818     { TRY_LIB=; unset TRY_LIB;}
8819     { use_lineeditlibs=; unset use_lineeditlibs;}
8820
8821
8822 LIBM=
8823 case "$host" in
8824  *-*-darwin*)
8825     ;;
8826  *)
8827     _libs=$LIBS
8828     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
8829 $as_echo_n "checking for library containing cos... " >&6; }
8830 if ${ac_cv_search_cos+:} false; then :
8831   $as_echo_n "(cached) " >&6
8832 else
8833   ac_func_search_save_LIBS=$LIBS
8834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8835 /* end confdefs.h.  */
8836
8837 /* Override any GCC internal prototype to avoid an error.
8838    Use char because int might match the return type of a GCC
8839    builtin and then its argument prototype would still apply.  */
8840 #ifdef __cplusplus
8841 extern "C"
8842 #endif
8843 char cos ();
8844 int
8845 main ()
8846 {
8847 return cos ();
8848   ;
8849   return 0;
8850 }
8851 _ACEOF
8852 for ac_lib in '' m; do
8853   if test -z "$ac_lib"; then
8854     ac_res="none required"
8855   else
8856     ac_res=-l$ac_lib
8857     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8858   fi
8859   if ac_fn_c_try_link "$LINENO"; then :
8860   ac_cv_search_cos=$ac_res
8861 fi
8862 rm -f core conftest.err conftest.$ac_objext \
8863     conftest$ac_exeext
8864   if ${ac_cv_search_cos+:} false; then :
8865   break
8866 fi
8867 done
8868 if ${ac_cv_search_cos+:} false; then :
8869
8870 else
8871   ac_cv_search_cos=no
8872 fi
8873 rm conftest.$ac_ext
8874 LIBS=$ac_func_search_save_LIBS
8875 fi
8876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
8877 $as_echo "$ac_cv_search_cos" >&6; }
8878 ac_res=$ac_cv_search_cos
8879 if test "$ac_res" != no; then :
8880   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8881   LIBM="-lm"
8882 fi
8883
8884     LIBS=$_libs
8885     ;;
8886 esac
8887
8888 { _libs=; unset _libs;}
8889
8890
8891 for ac_header in vfork.h
8892 do :
8893   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
8894 if test "x$ac_cv_header_vfork_h" = xyes; then :
8895   cat >>confdefs.h <<_ACEOF
8896 #define HAVE_VFORK_H 1
8897 _ACEOF
8898
8899 fi
8900
8901 done
8902
8903 for ac_func in fork vfork
8904 do :
8905   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8906 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8907 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8908   cat >>confdefs.h <<_ACEOF
8909 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8910 _ACEOF
8911
8912 fi
8913 done
8914
8915 if test "x$ac_cv_func_fork" = xyes; then
8916   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
8917 $as_echo_n "checking for working fork... " >&6; }
8918 if ${ac_cv_func_fork_works+:} false; then :
8919   $as_echo_n "(cached) " >&6
8920 else
8921   if test "$cross_compiling" = yes; then :
8922   ac_cv_func_fork_works=cross
8923 else
8924   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8925 /* end confdefs.h.  */
8926 $ac_includes_default
8927 int
8928 main ()
8929 {
8930
8931           /* By Ruediger Kuhlmann. */
8932           return fork () < 0;
8933
8934   ;
8935   return 0;
8936 }
8937 _ACEOF
8938 if ac_fn_c_try_run "$LINENO"; then :
8939   ac_cv_func_fork_works=yes
8940 else
8941   ac_cv_func_fork_works=no
8942 fi
8943 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8944   conftest.$ac_objext conftest.beam conftest.$ac_ext
8945 fi
8946
8947 fi
8948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
8949 $as_echo "$ac_cv_func_fork_works" >&6; }
8950
8951 else
8952   ac_cv_func_fork_works=$ac_cv_func_fork
8953 fi
8954 if test "x$ac_cv_func_fork_works" = xcross; then
8955   case $host in
8956     *-*-amigaos* | *-*-msdosdjgpp*)
8957       # Override, as these systems have only a dummy fork() stub
8958       ac_cv_func_fork_works=no
8959       ;;
8960     *)
8961       ac_cv_func_fork_works=yes
8962       ;;
8963   esac
8964   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
8965 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
8966 fi
8967 ac_cv_func_vfork_works=$ac_cv_func_vfork
8968 if test "x$ac_cv_func_vfork" = xyes; then
8969   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
8970 $as_echo_n "checking for working vfork... " >&6; }
8971 if ${ac_cv_func_vfork_works+:} false; then :
8972   $as_echo_n "(cached) " >&6
8973 else
8974   if test "$cross_compiling" = yes; then :
8975   ac_cv_func_vfork_works=cross
8976 else
8977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8978 /* end confdefs.h.  */
8979 /* Thanks to Paul Eggert for this test.  */
8980 $ac_includes_default
8981 #include <sys/wait.h>
8982 #ifdef HAVE_VFORK_H
8983 # include <vfork.h>
8984 #endif
8985 /* On some sparc systems, changes by the child to local and incoming
8986    argument registers are propagated back to the parent.  The compiler
8987    is told about this with #include <vfork.h>, but some compilers
8988    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
8989    static variable whose address is put into a register that is
8990    clobbered by the vfork.  */
8991 static void
8992 #ifdef __cplusplus
8993 sparc_address_test (int arg)
8994 # else
8995 sparc_address_test (arg) int arg;
8996 #endif
8997 {
8998   static pid_t child;
8999   if (!child) {
9000     child = vfork ();
9001     if (child < 0) {
9002       perror ("vfork");
9003       _exit(2);
9004     }
9005     if (!child) {
9006       arg = getpid();
9007       write(-1, "", 0);
9008       _exit (arg);
9009     }
9010   }
9011 }
9012
9013 int
9014 main ()
9015 {
9016   pid_t parent = getpid ();
9017   pid_t child;
9018
9019   sparc_address_test (0);
9020
9021   child = vfork ();
9022
9023   if (child == 0) {
9024     /* Here is another test for sparc vfork register problems.  This
9025        test uses lots of local variables, at least as many local
9026        variables as main has allocated so far including compiler
9027        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
9028        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
9029        reuse the register of parent for one of the local variables,
9030        since it will think that parent can't possibly be used any more
9031        in this routine.  Assigning to the local variable will thus
9032        munge parent in the parent process.  */
9033     pid_t
9034       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9035       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9036     /* Convince the compiler that p..p7 are live; otherwise, it might
9037        use the same hardware register for all 8 local variables.  */
9038     if (p != p1 || p != p2 || p != p3 || p != p4
9039         || p != p5 || p != p6 || p != p7)
9040       _exit(1);
9041
9042     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
9043        from child file descriptors.  If the child closes a descriptor
9044        before it execs or exits, this munges the parent's descriptor
9045        as well.  Test for this by closing stdout in the child.  */
9046     _exit(close(fileno(stdout)) != 0);
9047   } else {
9048     int status;
9049     struct stat st;
9050
9051     while (wait(&status) != child)
9052       ;
9053     return (
9054          /* Was there some problem with vforking?  */
9055          child < 0
9056
9057          /* Did the child fail?  (This shouldn't happen.)  */
9058          || status
9059
9060          /* Did the vfork/compiler bug occur?  */
9061          || parent != getpid()
9062
9063          /* Did the file descriptor bug occur?  */
9064          || fstat(fileno(stdout), &st) != 0
9065          );
9066   }
9067 }
9068 _ACEOF
9069 if ac_fn_c_try_run "$LINENO"; then :
9070   ac_cv_func_vfork_works=yes
9071 else
9072   ac_cv_func_vfork_works=no
9073 fi
9074 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9075   conftest.$ac_objext conftest.beam conftest.$ac_ext
9076 fi
9077
9078 fi
9079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
9080 $as_echo "$ac_cv_func_vfork_works" >&6; }
9081
9082 fi;
9083 if test "x$ac_cv_func_fork_works" = xcross; then
9084   ac_cv_func_vfork_works=$ac_cv_func_vfork
9085   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
9086 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
9087 fi
9088
9089 if test "x$ac_cv_func_vfork_works" = xyes; then
9090
9091 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
9092
9093 else
9094
9095 $as_echo "#define vfork fork" >>confdefs.h
9096
9097 fi
9098 if test "x$ac_cv_func_fork_works" = xyes; then
9099
9100 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
9101
9102 fi
9103
9104 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9105 # for constant arguments.  Useless!
9106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9107 $as_echo_n "checking for working alloca.h... " >&6; }
9108 if ${ac_cv_working_alloca_h+:} false; then :
9109   $as_echo_n "(cached) " >&6
9110 else
9111   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9112 /* end confdefs.h.  */
9113 #include <alloca.h>
9114 int
9115 main ()
9116 {
9117 char *p = (char *) alloca (2 * sizeof (int));
9118                           if (p) return 0;
9119   ;
9120   return 0;
9121 }
9122 _ACEOF
9123 if ac_fn_c_try_link "$LINENO"; then :
9124   ac_cv_working_alloca_h=yes
9125 else
9126   ac_cv_working_alloca_h=no
9127 fi
9128 rm -f core conftest.err conftest.$ac_objext \
9129     conftest$ac_exeext conftest.$ac_ext
9130 fi
9131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9132 $as_echo "$ac_cv_working_alloca_h" >&6; }
9133 if test $ac_cv_working_alloca_h = yes; then
9134
9135 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
9136
9137 fi
9138
9139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9140 $as_echo_n "checking for alloca... " >&6; }
9141 if ${ac_cv_func_alloca_works+:} false; then :
9142   $as_echo_n "(cached) " >&6
9143 else
9144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9145 /* end confdefs.h.  */
9146 #ifdef __GNUC__
9147 # define alloca __builtin_alloca
9148 #else
9149 # ifdef _MSC_VER
9150 #  include <malloc.h>
9151 #  define alloca _alloca
9152 # else
9153 #  ifdef HAVE_ALLOCA_H
9154 #   include <alloca.h>
9155 #  else
9156 #   ifdef _AIX
9157  #pragma alloca
9158 #   else
9159 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9160 void *alloca (size_t);
9161 #    endif
9162 #   endif
9163 #  endif
9164 # endif
9165 #endif
9166
9167 int
9168 main ()
9169 {
9170 char *p = (char *) alloca (1);
9171                                     if (p) return 0;
9172   ;
9173   return 0;
9174 }
9175 _ACEOF
9176 if ac_fn_c_try_link "$LINENO"; then :
9177   ac_cv_func_alloca_works=yes
9178 else
9179   ac_cv_func_alloca_works=no
9180 fi
9181 rm -f core conftest.err conftest.$ac_objext \
9182     conftest$ac_exeext conftest.$ac_ext
9183 fi
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9185 $as_echo "$ac_cv_func_alloca_works" >&6; }
9186
9187 if test $ac_cv_func_alloca_works = yes; then
9188
9189 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
9190
9191 else
9192   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9193 # that cause trouble.  Some versions do not even contain alloca or
9194 # contain a buggy version.  If you still want to use their alloca,
9195 # use ar to extract alloca.o from them instead of compiling alloca.c.
9196
9197 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
9198
9199 $as_echo "#define C_ALLOCA 1" >>confdefs.h
9200
9201
9202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9203 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9204 if ${ac_cv_os_cray+:} false; then :
9205   $as_echo_n "(cached) " >&6
9206 else
9207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9208 /* end confdefs.h.  */
9209 #if defined CRAY && ! defined CRAY2
9210 webecray
9211 #else
9212 wenotbecray
9213 #endif
9214
9215 _ACEOF
9216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9217   $EGREP "webecray" >/dev/null 2>&1; then :
9218   ac_cv_os_cray=yes
9219 else
9220   ac_cv_os_cray=no
9221 fi
9222 rm -f conftest*
9223
9224 fi
9225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9226 $as_echo "$ac_cv_os_cray" >&6; }
9227 if test $ac_cv_os_cray = yes; then
9228   for ac_func in _getb67 GETB67 getb67; do
9229     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9230 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9231 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9232
9233 cat >>confdefs.h <<_ACEOF
9234 #define CRAY_STACKSEG_END $ac_func
9235 _ACEOF
9236
9237     break
9238 fi
9239
9240   done
9241 fi
9242
9243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9244 $as_echo_n "checking stack direction for C alloca... " >&6; }
9245 if ${ac_cv_c_stack_direction+:} false; then :
9246   $as_echo_n "(cached) " >&6
9247 else
9248   if test "$cross_compiling" = yes; then :
9249   ac_cv_c_stack_direction=0
9250 else
9251   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9252 /* end confdefs.h.  */
9253 $ac_includes_default
9254 int
9255 find_stack_direction (int *addr, int depth)
9256 {
9257   int dir, dummy = 0;
9258   if (! addr)
9259     addr = &dummy;
9260   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
9261   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
9262   return dir + dummy;
9263 }
9264
9265 int
9266 main (int argc, char **argv)
9267 {
9268   return find_stack_direction (0, argc + !argv + 20) < 0;
9269 }
9270 _ACEOF
9271 if ac_fn_c_try_run "$LINENO"; then :
9272   ac_cv_c_stack_direction=1
9273 else
9274   ac_cv_c_stack_direction=-1
9275 fi
9276 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9277   conftest.$ac_objext conftest.beam conftest.$ac_ext
9278 fi
9279
9280 fi
9281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9282 $as_echo "$ac_cv_c_stack_direction" >&6; }
9283 cat >>confdefs.h <<_ACEOF
9284 #define STACK_DIRECTION $ac_cv_c_stack_direction
9285 _ACEOF
9286
9287
9288 fi
9289
9290 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
9291 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
9292   ac_have_decl=1
9293 else
9294   ac_have_decl=0
9295 fi
9296
9297 cat >>confdefs.h <<_ACEOF
9298 #define HAVE_DECL_STRERROR_R $ac_have_decl
9299 _ACEOF
9300
9301 for ac_func in strerror_r
9302 do :
9303   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
9304 if test "x$ac_cv_func_strerror_r" = xyes; then :
9305   cat >>confdefs.h <<_ACEOF
9306 #define HAVE_STRERROR_R 1
9307 _ACEOF
9308
9309 fi
9310 done
9311
9312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
9313 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
9314 if ${ac_cv_func_strerror_r_char_p+:} false; then :
9315   $as_echo_n "(cached) " >&6
9316 else
9317
9318     ac_cv_func_strerror_r_char_p=no
9319     if test $ac_cv_have_decl_strerror_r = yes; then
9320       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9321 /* end confdefs.h.  */
9322 $ac_includes_default
9323 int
9324 main ()
9325 {
9326
9327           char buf[100];
9328           char x = *strerror_r (0, buf, sizeof buf);
9329           char *p = strerror_r (0, buf, sizeof buf);
9330           return !p || x;
9331
9332   ;
9333   return 0;
9334 }
9335 _ACEOF
9336 if ac_fn_c_try_compile "$LINENO"; then :
9337   ac_cv_func_strerror_r_char_p=yes
9338 fi
9339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9340     else
9341       # strerror_r is not declared.  Choose between
9342       # systems that have relatively inaccessible declarations for the
9343       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
9344       # former has a strerror_r that returns char*, while the latter
9345       # has a strerror_r that returns `int'.
9346       # This test should segfault on the DEC system.
9347       if test "$cross_compiling" = yes; then :
9348   :
9349 else
9350   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9351 /* end confdefs.h.  */
9352 $ac_includes_default
9353         extern char *strerror_r ();
9354 int
9355 main ()
9356 {
9357 char buf[100];
9358           char x = *strerror_r (0, buf, sizeof buf);
9359           return ! isalpha (x);
9360   ;
9361   return 0;
9362 }
9363 _ACEOF
9364 if ac_fn_c_try_run "$LINENO"; then :
9365   ac_cv_func_strerror_r_char_p=yes
9366 fi
9367 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9368   conftest.$ac_objext conftest.beam conftest.$ac_ext
9369 fi
9370
9371     fi
9372
9373 fi
9374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
9375 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
9376 if test $ac_cv_func_strerror_r_char_p = yes; then
9377
9378 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
9379
9380 fi
9381
9382
9383 ac_busted_vpath_in_make=no
9384 case "$build" in
9385  *-*-irix6.1*)  # 64 bit only
9386     # busted vpath?
9387     ;;
9388  *-*-irix6*)    # 6.2 (and later?)
9389     ac_busted_vpath_in_make=yes
9390     ;;
9391  *-*-solaris2.5.1)
9392     ac_busted_vpath_in_make=yes
9393     ;;
9394  *-*-unicosmp*)
9395     ac_busted_vpath_in_make=yes
9396     ;;
9397 esac
9398
9399 case "$ac_busted_vpath_in_make$srcdir" in
9400  yes.|no*)
9401     ;;
9402  *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
9403      '')
9404         as_fn_error $? "building outside of the main directory requires GNU make" "$LINENO" 5
9405     esac
9406     ;;
9407 esac
9408
9409 case "$host" in
9410  *-*-aix4*)
9411         # Bug 2516:
9412         # Was *-*-aix[[4-9]]*
9413         # XXX only verified thru AIX6.  But...
9414         # Ken Link says this is fine for AIX 5.3 and 7.1, and sees no reason
9415         # that this support would be in 5.3, removed in 6, and added back.
9416         #
9417         # (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
9418         # (returning ENOSYS).  I didn't check 4.2.  If, in the future,
9419         # IBM pulls its thumbs out long enough to implement clock_settime,
9420         # this conditional will need to change.  Maybe use AC_TRY_RUN
9421         # instead to try to set the time to itself and check errno.
9422     ;;
9423  *)
9424     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
9425 $as_echo_n "checking for library containing clock_gettime... " >&6; }
9426 if ${ac_cv_search_clock_gettime+:} false; then :
9427   $as_echo_n "(cached) " >&6
9428 else
9429   ac_func_search_save_LIBS=$LIBS
9430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9431 /* end confdefs.h.  */
9432
9433 /* Override any GCC internal prototype to avoid an error.
9434    Use char because int might match the return type of a GCC
9435    builtin and then its argument prototype would still apply.  */
9436 #ifdef __cplusplus
9437 extern "C"
9438 #endif
9439 char clock_gettime ();
9440 int
9441 main ()
9442 {
9443 return clock_gettime ();
9444   ;
9445   return 0;
9446 }
9447 _ACEOF
9448 for ac_lib in '' rt; do
9449   if test -z "$ac_lib"; then
9450     ac_res="none required"
9451   else
9452     ac_res=-l$ac_lib
9453     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9454   fi
9455   if ac_fn_c_try_link "$LINENO"; then :
9456   ac_cv_search_clock_gettime=$ac_res
9457 fi
9458 rm -f core conftest.err conftest.$ac_objext \
9459     conftest$ac_exeext
9460   if ${ac_cv_search_clock_gettime+:} false; then :
9461   break
9462 fi
9463 done
9464 if ${ac_cv_search_clock_gettime+:} false; then :
9465
9466 else
9467   ac_cv_search_clock_gettime=no
9468 fi
9469 rm conftest.$ac_ext
9470 LIBS=$ac_func_search_save_LIBS
9471 fi
9472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
9473 $as_echo "$ac_cv_search_clock_gettime" >&6; }
9474 ac_res=$ac_cv_search_clock_gettime
9475 if test "$ac_res" != no; then :
9476   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9477   case "$ac_cv_search_clock_gettime" in
9478  'none required') ;;
9479  no) ;;
9480  *) LDADD_LIBNTP="$ac_cv_search_clock_gettime $LDADD_LIBNTP" ;;
9481  esac
9482
9483 fi
9484
9485     for ac_func in clock_getres clock_gettime clock_settime
9486 do :
9487   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9488 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9489 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9490   cat >>confdefs.h <<_ACEOF
9491 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9492 _ACEOF
9493
9494 fi
9495 done
9496
9497     ;;
9498 esac
9499
9500 for ac_func in getclock stime timegm strlcpy strlcat
9501 do :
9502   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9503 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9504 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9505   cat >>confdefs.h <<_ACEOF
9506 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9507 _ACEOF
9508
9509 fi
9510 done
9511
9512
9513 # Bug 2713
9514 LDADD_LIBUTIL=
9515
9516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing snprintb" >&5
9517 $as_echo_n "checking for library containing snprintb... " >&6; }
9518 if ${ac_cv_search_snprintb+:} false; then :
9519   $as_echo_n "(cached) " >&6
9520 else
9521   ac_func_search_save_LIBS=$LIBS
9522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9523 /* end confdefs.h.  */
9524
9525 /* Override any GCC internal prototype to avoid an error.
9526    Use char because int might match the return type of a GCC
9527    builtin and then its argument prototype would still apply.  */
9528 #ifdef __cplusplus
9529 extern "C"
9530 #endif
9531 char snprintb ();
9532 int
9533 main ()
9534 {
9535 return snprintb ();
9536   ;
9537   return 0;
9538 }
9539 _ACEOF
9540 for ac_lib in '' util; do
9541   if test -z "$ac_lib"; then
9542     ac_res="none required"
9543   else
9544     ac_res=-l$ac_lib
9545     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9546   fi
9547   if ac_fn_c_try_link "$LINENO"; then :
9548   ac_cv_search_snprintb=$ac_res
9549 fi
9550 rm -f core conftest.err conftest.$ac_objext \
9551     conftest$ac_exeext
9552   if ${ac_cv_search_snprintb+:} false; then :
9553   break
9554 fi
9555 done
9556 if ${ac_cv_search_snprintb+:} false; then :
9557
9558 else
9559   ac_cv_search_snprintb=no
9560 fi
9561 rm conftest.$ac_ext
9562 LIBS=$ac_func_search_save_LIBS
9563 fi
9564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_snprintb" >&5
9565 $as_echo "$ac_cv_search_snprintb" >&6; }
9566 ac_res=$ac_cv_search_snprintb
9567 if test "$ac_res" != no; then :
9568   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9569   case "$ac_cv_search_snprintb" in
9570  'none required') ;;
9571  no) ;;
9572  *) LDADD_LIBUTIL="$ac_cv_search_snprintb $LDADD_LIBUTIL" ;;
9573  esac
9574
9575 $as_echo "#define USE_SNPRINTB 1" >>confdefs.h
9576
9577 fi
9578
9579
9580 #
9581 for ac_header in errno.h sys/socket.h sys/types.h time.h
9582 do :
9583   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9584 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9585 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9586   cat >>confdefs.h <<_ACEOF
9587 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9588 _ACEOF
9589
9590 fi
9591
9592 done
9593
9594 for ac_header in net/if.h
9595 do :
9596   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
9597     #ifdef HAVE_SYS_SOCKET_H
9598     # include <sys/socket.h>
9599     #endif
9600
9601 "
9602 if test "x$ac_cv_header_net_if_h" = xyes; then :
9603   cat >>confdefs.h <<_ACEOF
9604 #define HAVE_NET_IF_H 1
9605 _ACEOF
9606
9607 fi
9608
9609 done
9610
9611 case "$host" in
9612  *-hp-hpux*)
9613     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/if.h requires mpinfou predeclaration" >&5
9614 $as_echo_n "checking if net/if.h requires mpinfou predeclaration... " >&6; }
9615 if ${ntp_cv_predecl_mpinfou+:} false; then :
9616   $as_echo_n "(cached) " >&6
9617 else
9618
9619             np_cv_predecl_mpinfou=no
9620             case "$ac_cv_header_net_if_h" in
9621              no)
9622                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9623 /* end confdefs.h.  */
9624
9625                             typedef union mpinfou {
9626                                     struct pdk_mpinfo *pdkptr;
9627                                     struct mpinfo *pikptr;
9628                             } mpinfou_t;
9629                             #ifdef HAVE_SYS_SOCKET_H
9630                             # include <sys/socket.h>
9631                             #endif
9632                             #include <net/if.h>
9633
9634 int
9635 main ()
9636 {
9637
9638
9639
9640   ;
9641   return 0;
9642 }
9643 _ACEOF
9644 if ac_fn_c_try_compile "$LINENO"; then :
9645
9646                         ntp_cv_predecl_mpinfou=yes
9647                         ac_cv_header_net_if_h=yes
9648
9649
9650 fi
9651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9652             esac
9653
9654
9655 fi
9656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_predecl_mpinfou" >&5
9657 $as_echo "$ntp_cv_predecl_mpinfou" >&6; }
9658     case "$ntp_cv_predecl_mpinfou" in
9659      yes)
9660         cat >>confdefs.h <<_ACEOF
9661 #ifndef MPINFOU_PREDECLARED
9662 # define MPINFOU_PREDECLARED
9663 typedef union mpinfou {
9664         struct pdk_mpinfo *pdkptr;
9665         struct mpinfo *pikptr;
9666 } mpinfou_t;
9667 #endif
9668 _ACEOF
9669
9670     esac
9671 esac
9672
9673 case "$host" in
9674  *-linux*)
9675     for ac_header in linux/if_addr.h
9676 do :
9677   ac_fn_c_check_header_compile "$LINENO" "linux/if_addr.h" "ac_cv_header_linux_if_addr_h" "
9678         #ifdef HAVE_SYS_SOCKET_H
9679         # include <sys/socket.h>
9680         #endif
9681
9682 "
9683 if test "x$ac_cv_header_linux_if_addr_h" = xyes; then :
9684   cat >>confdefs.h <<_ACEOF
9685 #define HAVE_LINUX_IF_ADDR_H 1
9686 _ACEOF
9687
9688 fi
9689
9690 done
9691
9692 esac
9693
9694 for ac_header in arpa/nameser.h sys/param.h sys/time.h sys/timers.h
9695 do :
9696   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9697 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9698 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9699   cat >>confdefs.h <<_ACEOF
9700 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9701 _ACEOF
9702
9703 fi
9704
9705 done
9706
9707 # sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
9708 for ac_header in sys/sysctl.h
9709 do :
9710   ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
9711     #if defined HAVE_SYS_PARAM_H
9712     # include <sys/param.h>
9713     #endif
9714
9715 "
9716 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
9717   cat >>confdefs.h <<_ACEOF
9718 #define HAVE_SYS_SYSCTL_H 1
9719 _ACEOF
9720
9721 fi
9722
9723 done
9724
9725 for ac_header in netinet/in_system.h netinet/in_systm.h netinet/in.h
9726 do :
9727   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9728 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9729 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9730   cat >>confdefs.h <<_ACEOF
9731 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9732 _ACEOF
9733
9734 fi
9735
9736 done
9737
9738
9739 for ac_header in resolv.h
9740 do :
9741   ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
9742     #ifdef HAVE_SYS_TYPES_H
9743     # include <sys/types.h>
9744     #endif
9745     #ifdef HAVE_NETINET_IN_H
9746     # include <netinet/in.h>
9747     #endif
9748     #ifdef HAVE_ARPA_NAMESER_H
9749     # include <arpa/nameser.h>
9750     #endif
9751
9752 "
9753 if test "x$ac_cv_header_resolv_h" = xyes; then :
9754   cat >>confdefs.h <<_ACEOF
9755 #define HAVE_RESOLV_H 1
9756 _ACEOF
9757
9758 fi
9759
9760 done
9761
9762
9763 for ac_header in net/if_var.h
9764 do :
9765   ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
9766     #if HAVE_SYS_TYPES_H
9767     # include <sys/types.h>
9768     #endif
9769     #ifdef HAVE_SYS_SOCKET_H
9770     # include <sys/socket.h>
9771     #endif
9772     #ifdef HAVE_NETINET_IN_H
9773     # include <netinet/in.h>
9774     #endif
9775     #ifdef HAVE_NET_IF_H
9776     # include <net/if.h>
9777     #endif
9778
9779 "
9780 if test "x$ac_cv_header_net_if_var_h" = xyes; then :
9781   cat >>confdefs.h <<_ACEOF
9782 #define HAVE_NET_IF_VAR_H 1
9783 _ACEOF
9784
9785 fi
9786
9787 done
9788
9789
9790 for ac_header in netinet/ip.h netinet/in_var.h
9791 do :
9792   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9793 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
9794     #ifdef HAVE_SYS_TYPES_H
9795     # include <sys/types.h>
9796     #endif
9797     #ifdef HAVE_SYS_SOCKET_H
9798     # include <sys/socket.h>
9799     #endif
9800     #ifdef HAVE_NET_IF_H
9801     # include <net/if.h>
9802     #endif
9803     #ifdef HAVE_NETINET_IN_H
9804     # include <netinet/in.h>
9805     #endif
9806     #ifdef HAVE_NET_IF_VAR_H
9807     # include <net/if_var.h>
9808     #endif
9809     #ifdef HAVE_NETINET_IN_SYSTM_H
9810     # include <netinet/in_systm.h>
9811     #endif
9812
9813 "
9814 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9815   cat >>confdefs.h <<_ACEOF
9816 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9817 _ACEOF
9818
9819 fi
9820
9821 done
9822
9823
9824 # HMS: Do we need to check for -lsocket before or after these tests?
9825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
9826 $as_echo_n "checking for library containing inet_pton... " >&6; }
9827 if ${ac_cv_search_inet_pton+:} false; then :
9828   $as_echo_n "(cached) " >&6
9829 else
9830   ac_func_search_save_LIBS=$LIBS
9831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9832 /* end confdefs.h.  */
9833
9834 /* Override any GCC internal prototype to avoid an error.
9835    Use char because int might match the return type of a GCC
9836    builtin and then its argument prototype would still apply.  */
9837 #ifdef __cplusplus
9838 extern "C"
9839 #endif
9840 char inet_pton ();
9841 int
9842 main ()
9843 {
9844 return inet_pton ();
9845   ;
9846   return 0;
9847 }
9848 _ACEOF
9849 for ac_lib in '' nsl; do
9850   if test -z "$ac_lib"; then
9851     ac_res="none required"
9852   else
9853     ac_res=-l$ac_lib
9854     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9855   fi
9856   if ac_fn_c_try_link "$LINENO"; then :
9857   ac_cv_search_inet_pton=$ac_res
9858 fi
9859 rm -f core conftest.err conftest.$ac_objext \
9860     conftest$ac_exeext
9861   if ${ac_cv_search_inet_pton+:} false; then :
9862   break
9863 fi
9864 done
9865 if ${ac_cv_search_inet_pton+:} false; then :
9866
9867 else
9868   ac_cv_search_inet_pton=no
9869 fi
9870 rm conftest.$ac_ext
9871 LIBS=$ac_func_search_save_LIBS
9872 fi
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
9874 $as_echo "$ac_cv_search_inet_pton" >&6; }
9875 ac_res=$ac_cv_search_inet_pton
9876 if test "$ac_res" != no; then :
9877   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9878   case "$ac_cv_search_inet_pton" in
9879  'none required') ;;
9880  no) ;;
9881  *) LDADD_LIBNTP="$ac_cv_search_inet_pton $LDADD_LIBNTP" ;;
9882  esac
9883
9884 fi
9885
9886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
9887 $as_echo_n "checking for library containing inet_ntop... " >&6; }
9888 if ${ac_cv_search_inet_ntop+:} false; then :
9889   $as_echo_n "(cached) " >&6
9890 else
9891   ac_func_search_save_LIBS=$LIBS
9892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9893 /* end confdefs.h.  */
9894
9895 /* Override any GCC internal prototype to avoid an error.
9896    Use char because int might match the return type of a GCC
9897    builtin and then its argument prototype would still apply.  */
9898 #ifdef __cplusplus
9899 extern "C"
9900 #endif
9901 char inet_ntop ();
9902 int
9903 main ()
9904 {
9905 return inet_ntop ();
9906   ;
9907   return 0;
9908 }
9909 _ACEOF
9910 for ac_lib in '' resolv; do
9911   if test -z "$ac_lib"; then
9912     ac_res="none required"
9913   else
9914     ac_res=-l$ac_lib
9915     LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
9916   fi
9917   if ac_fn_c_try_link "$LINENO"; then :
9918   ac_cv_search_inet_ntop=$ac_res
9919 fi
9920 rm -f core conftest.err conftest.$ac_objext \
9921     conftest$ac_exeext
9922   if ${ac_cv_search_inet_ntop+:} false; then :
9923   break
9924 fi
9925 done
9926 if ${ac_cv_search_inet_ntop+:} false; then :
9927
9928 else
9929   ac_cv_search_inet_ntop=no
9930 fi
9931 rm conftest.$ac_ext
9932 LIBS=$ac_func_search_save_LIBS
9933 fi
9934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
9935 $as_echo "$ac_cv_search_inet_ntop" >&6; }
9936 ac_res=$ac_cv_search_inet_ntop
9937 if test "$ac_res" != no; then :
9938   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9939   case "$ac_cv_search_inet_ntop" in
9940  'none required') ;;
9941  no) ;;
9942  *) LDADD_LIBNTP="$ac_cv_search_inet_ntop $LDADD_LIBNTP" ;;
9943  esac
9944
9945 fi
9946
9947
9948 # [Bug 1628] On Solaris, we need -lxnet -lsocket.  Generalize this to
9949 # avoid keying on the OS name:  If we find socket functions in
9950 # libsocket, next try for them in libxnet without libsocket, if found,
9951 # list both.  If we simply tested libxnet first, we would find the
9952 # functions there and never add libsocket.  See also [Bug 660]
9953 # http://bugs.ntp.org/show_bug.cgi?id=660#c9
9954 saved_LIBS=$LIBS
9955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
9956 $as_echo_n "checking for library containing setsockopt... " >&6; }
9957 if ${ac_cv_search_setsockopt+:} false; then :
9958   $as_echo_n "(cached) " >&6
9959 else
9960   ac_func_search_save_LIBS=$LIBS
9961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9962 /* end confdefs.h.  */
9963
9964 /* Override any GCC internal prototype to avoid an error.
9965    Use char because int might match the return type of a GCC
9966    builtin and then its argument prototype would still apply.  */
9967 #ifdef __cplusplus
9968 extern "C"
9969 #endif
9970 char setsockopt ();
9971 int
9972 main ()
9973 {
9974 return setsockopt ();
9975   ;
9976   return 0;
9977 }
9978 _ACEOF
9979 for ac_lib in '' socket; do
9980   if test -z "$ac_lib"; then
9981     ac_res="none required"
9982   else
9983     ac_res=-l$ac_lib
9984     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9985   fi
9986   if ac_fn_c_try_link "$LINENO"; then :
9987   ac_cv_search_setsockopt=$ac_res
9988 fi
9989 rm -f core conftest.err conftest.$ac_objext \
9990     conftest$ac_exeext
9991   if ${ac_cv_search_setsockopt+:} false; then :
9992   break
9993 fi
9994 done
9995 if ${ac_cv_search_setsockopt+:} false; then :
9996
9997 else
9998   ac_cv_search_setsockopt=no
9999 fi
10000 rm conftest.$ac_ext
10001 LIBS=$ac_func_search_save_LIBS
10002 fi
10003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
10004 $as_echo "$ac_cv_search_setsockopt" >&6; }
10005 ac_res=$ac_cv_search_setsockopt
10006 if test "$ac_res" != no; then :
10007   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10008   case "$ac_cv_search_setsockopt" in
10009  'none required') ;;
10010  no) ;;
10011  *) LDADD_LIBNTP="$ac_cv_search_setsockopt $LDADD_LIBNTP" ;;
10012  esac
10013
10014 fi
10015
10016 case "$ac_cv_search_setsockopt" in
10017  -lsocket)
10018     LIBS="$saved_LIBS"
10019     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
10020 $as_echo_n "checking for library containing getsockopt... " >&6; }
10021 if ${ac_cv_search_getsockopt+:} false; then :
10022   $as_echo_n "(cached) " >&6
10023 else
10024   ac_func_search_save_LIBS=$LIBS
10025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10026 /* end confdefs.h.  */
10027
10028 /* Override any GCC internal prototype to avoid an error.
10029    Use char because int might match the return type of a GCC
10030    builtin and then its argument prototype would still apply.  */
10031 #ifdef __cplusplus
10032 extern "C"
10033 #endif
10034 char getsockopt ();
10035 int
10036 main ()
10037 {
10038 return getsockopt ();
10039   ;
10040   return 0;
10041 }
10042 _ACEOF
10043 for ac_lib in '' xnet; do
10044   if test -z "$ac_lib"; then
10045     ac_res="none required"
10046   else
10047     ac_res=-l$ac_lib
10048     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10049   fi
10050   if ac_fn_c_try_link "$LINENO"; then :
10051   ac_cv_search_getsockopt=$ac_res
10052 fi
10053 rm -f core conftest.err conftest.$ac_objext \
10054     conftest$ac_exeext
10055   if ${ac_cv_search_getsockopt+:} false; then :
10056   break
10057 fi
10058 done
10059 if ${ac_cv_search_getsockopt+:} false; then :
10060
10061 else
10062   ac_cv_search_getsockopt=no
10063 fi
10064 rm conftest.$ac_ext
10065 LIBS=$ac_func_search_save_LIBS
10066 fi
10067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
10068 $as_echo "$ac_cv_search_getsockopt" >&6; }
10069 ac_res=$ac_cv_search_getsockopt
10070 if test "$ac_res" != no; then :
10071   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10072   case "$ac_cv_search_getsockopt" in
10073  'none required') ;;
10074  no) ;;
10075  *) LDADD_LIBNTP="$ac_cv_search_getsockopt $LDADD_LIBNTP" ;;
10076  esac
10077
10078 fi
10079
10080     # XXX Possible trouble here - reading the comments above and looking at the
10081     # code below I wonder if we'll add -lxnet when we don't need it.
10082     # Also, do we need to add -lxnet to LDADD_LIBNTP, or perhaps see if it's
10083     # there when it is not needed?
10084     case "$ac_cv_search_getsockopt" in
10085      -lxnet)
10086         LIBS="-lxnet -lsocket $saved_LIBS"
10087         ;;
10088      *) LIBS="-lsocket $saved_LIBS"
10089         ;;
10090     esac
10091     ;;
10092 esac
10093 { saved_LIBS=; unset saved_LIBS;}
10094
10095 # Bug 2427 - look for recvmsg here.
10096 for ac_func in recvmsg
10097 do :
10098   ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
10099 if test "x$ac_cv_func_recvmsg" = xyes; then :
10100   cat >>confdefs.h <<_ACEOF
10101 #define HAVE_RECVMSG 1
10102 _ACEOF
10103
10104 fi
10105 done
10106
10107
10108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10109 $as_echo_n "checking for inline... " >&6; }
10110 if ${ac_cv_c_inline+:} false; then :
10111   $as_echo_n "(cached) " >&6
10112 else
10113   ac_cv_c_inline=no
10114 for ac_kw in inline __inline__ __inline; do
10115   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10116 /* end confdefs.h.  */
10117 #ifndef __cplusplus
10118 typedef int foo_t;
10119 static $ac_kw foo_t static_foo () {return 0; }
10120 $ac_kw foo_t foo () {return 0; }
10121 #endif
10122
10123 _ACEOF
10124 if ac_fn_c_try_compile "$LINENO"; then :
10125   ac_cv_c_inline=$ac_kw
10126 fi
10127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10128   test "$ac_cv_c_inline" != no && break
10129 done
10130
10131 fi
10132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10133 $as_echo "$ac_cv_c_inline" >&6; }
10134
10135 case $ac_cv_c_inline in
10136   inline | yes) ;;
10137   *)
10138     case $ac_cv_c_inline in
10139       no) ac_val=;;
10140       *) ac_val=$ac_cv_c_inline;;
10141     esac
10142     cat >>confdefs.h <<_ACEOF
10143 #ifndef __cplusplus
10144 #define inline $ac_val
10145 #endif
10146 _ACEOF
10147     ;;
10148 esac
10149
10150
10151 case "$ac_cv_c_inline" in
10152  '')
10153     ;;
10154  *)
10155
10156 $as_echo "#define HAVE_INLINE 1" >>confdefs.h
10157
10158
10159 esac
10160
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10162 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10163 if ${ac_cv_header_time+:} false; then :
10164   $as_echo_n "(cached) " >&6
10165 else
10166   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10167 /* end confdefs.h.  */
10168 #include <sys/types.h>
10169 #include <sys/time.h>
10170 #include <time.h>
10171
10172 int
10173 main ()
10174 {
10175 if ((struct tm *) 0)
10176 return 0;
10177   ;
10178   return 0;
10179 }
10180 _ACEOF
10181 if ac_fn_c_try_compile "$LINENO"; then :
10182   ac_cv_header_time=yes
10183 else
10184   ac_cv_header_time=no
10185 fi
10186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10187 fi
10188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10189 $as_echo "$ac_cv_header_time" >&6; }
10190 if test $ac_cv_header_time = yes; then
10191
10192 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
10193
10194 fi
10195
10196 # The cast to long int works around a bug in the HP C Compiler
10197 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10198 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10199 # This bug is HP SR number 8606223364.
10200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
10201 $as_echo_n "checking size of time_t... " >&6; }
10202 if ${ac_cv_sizeof_time_t+:} false; then :
10203   $as_echo_n "(cached) " >&6
10204 else
10205   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
10206
10207 else
10208   if test "$ac_cv_type_time_t" = yes; then
10209      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10210 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10211 as_fn_error 77 "cannot compute sizeof (time_t)
10212 See \`config.log' for more details" "$LINENO" 5; }
10213    else
10214      ac_cv_sizeof_time_t=0
10215    fi
10216 fi
10217
10218 fi
10219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
10220 $as_echo "$ac_cv_sizeof_time_t" >&6; }
10221
10222
10223
10224 cat >>confdefs.h <<_ACEOF
10225 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
10226 _ACEOF
10227
10228
10229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10230 $as_echo_n "checking whether char is unsigned... " >&6; }
10231 if ${ac_cv_c_char_unsigned+:} false; then :
10232   $as_echo_n "(cached) " >&6
10233 else
10234   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10235 /* end confdefs.h.  */
10236 $ac_includes_default
10237 int
10238 main ()
10239 {
10240 static int test_array [1 - 2 * !(((char) -1) < 0)];
10241 test_array [0] = 0;
10242 return test_array [0];
10243
10244   ;
10245   return 0;
10246 }
10247 _ACEOF
10248 if ac_fn_c_try_compile "$LINENO"; then :
10249   ac_cv_c_char_unsigned=no
10250 else
10251   ac_cv_c_char_unsigned=yes
10252 fi
10253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10254 fi
10255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10256 $as_echo "$ac_cv_c_char_unsigned" >&6; }
10257 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
10258   $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
10259
10260 fi
10261                 # The cast to long int works around a bug in the HP C Compiler
10262 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10263 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10264 # This bug is HP SR number 8606223364.
10265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
10266 $as_echo_n "checking size of signed char... " >&6; }
10267 if ${ac_cv_sizeof_signed_char+:} false; then :
10268   $as_echo_n "(cached) " >&6
10269 else
10270   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char"        "$ac_includes_default"; then :
10271
10272 else
10273   if test "$ac_cv_type_signed_char" = yes; then
10274      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10275 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10276 as_fn_error 77 "cannot compute sizeof (signed char)
10277 See \`config.log' for more details" "$LINENO" 5; }
10278    else
10279      ac_cv_sizeof_signed_char=0
10280    fi
10281 fi
10282
10283 fi
10284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
10285 $as_echo "$ac_cv_sizeof_signed_char" >&6; }
10286
10287
10288
10289 cat >>confdefs.h <<_ACEOF
10290 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10291 _ACEOF
10292
10293
10294 ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
10295 if test "x$ac_cv_type_s_char" = xyes; then :
10296
10297 cat >>confdefs.h <<_ACEOF
10298 #define HAVE_S_CHAR 1
10299 _ACEOF
10300
10301
10302 fi
10303 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
10304 if test "x$ac_cv_type_long_long" = xyes; then :
10305
10306 cat >>confdefs.h <<_ACEOF
10307 #define HAVE_LONG_LONG 1
10308 _ACEOF
10309
10310
10311 fi
10312
10313 # The cast to long int works around a bug in the HP C Compiler
10314 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10315 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10316 # This bug is HP SR number 8606223364.
10317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
10318 $as_echo_n "checking size of short... " >&6; }
10319 if ${ac_cv_sizeof_short+:} false; then :
10320   $as_echo_n "(cached) " >&6
10321 else
10322   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
10323
10324 else
10325   if test "$ac_cv_type_short" = yes; then
10326      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10327 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10328 as_fn_error 77 "cannot compute sizeof (short)
10329 See \`config.log' for more details" "$LINENO" 5; }
10330    else
10331      ac_cv_sizeof_short=0
10332    fi
10333 fi
10334
10335 fi
10336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
10337 $as_echo "$ac_cv_sizeof_short" >&6; }
10338
10339
10340
10341 cat >>confdefs.h <<_ACEOF
10342 #define SIZEOF_SHORT $ac_cv_sizeof_short
10343 _ACEOF
10344
10345
10346 # The cast to long int works around a bug in the HP C Compiler
10347 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10348 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10349 # This bug is HP SR number 8606223364.
10350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
10351 $as_echo_n "checking size of int... " >&6; }
10352 if ${ac_cv_sizeof_int+:} false; then :
10353   $as_echo_n "(cached) " >&6
10354 else
10355   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
10356
10357 else
10358   if test "$ac_cv_type_int" = yes; then
10359      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10360 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10361 as_fn_error 77 "cannot compute sizeof (int)
10362 See \`config.log' for more details" "$LINENO" 5; }
10363    else
10364      ac_cv_sizeof_int=0
10365    fi
10366 fi
10367
10368 fi
10369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
10370 $as_echo "$ac_cv_sizeof_int" >&6; }
10371
10372
10373
10374 cat >>confdefs.h <<_ACEOF
10375 #define SIZEOF_INT $ac_cv_sizeof_int
10376 _ACEOF
10377
10378
10379 # The cast to long int works around a bug in the HP C Compiler
10380 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10381 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10382 # This bug is HP SR number 8606223364.
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
10384 $as_echo_n "checking size of long... " >&6; }
10385 if ${ac_cv_sizeof_long+:} false; then :
10386   $as_echo_n "(cached) " >&6
10387 else
10388   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
10389
10390 else
10391   if test "$ac_cv_type_long" = yes; then
10392      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10393 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10394 as_fn_error 77 "cannot compute sizeof (long)
10395 See \`config.log' for more details" "$LINENO" 5; }
10396    else
10397      ac_cv_sizeof_long=0
10398    fi
10399 fi
10400
10401 fi
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
10403 $as_echo "$ac_cv_sizeof_long" >&6; }
10404
10405
10406
10407 cat >>confdefs.h <<_ACEOF
10408 #define SIZEOF_LONG $ac_cv_sizeof_long
10409 _ACEOF
10410
10411
10412
10413 case "$ac_cv_type_long_long" in
10414  no)
10415     ;;
10416  *)
10417     # The cast to long int works around a bug in the HP C Compiler
10418 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10419 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10420 # This bug is HP SR number 8606223364.
10421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
10422 $as_echo_n "checking size of long long... " >&6; }
10423 if ${ac_cv_sizeof_long_long+:} false; then :
10424   $as_echo_n "(cached) " >&6
10425 else
10426   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
10427
10428 else
10429   if test "$ac_cv_type_long_long" = yes; then
10430      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10431 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10432 as_fn_error 77 "cannot compute sizeof (long long)
10433 See \`config.log' for more details" "$LINENO" 5; }
10434    else
10435      ac_cv_sizeof_long_long=0
10436    fi
10437 fi
10438
10439 fi
10440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10441 $as_echo "$ac_cv_sizeof_long_long" >&6; }
10442
10443
10444
10445 cat >>confdefs.h <<_ACEOF
10446 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10447 _ACEOF
10448
10449
10450     ;;
10451 esac
10452
10453 case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
10454  *yes)
10455     # We have a typedef for s_char.  Might as well believe it...
10456     ;;
10457  no0no)
10458     # We have signed chars, can't say 'signed char', no s_char typedef.
10459
10460 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
10461
10462     ;;
10463  no1no)
10464     # We have signed chars, can say 'signed char', no s_char typedef.
10465
10466 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
10467
10468     ;;
10469  yes0no)
10470     # We have unsigned chars, can't say 'signed char', no s_char typedef.
10471     as_fn_error $? "No way to specify a signed character!" "$LINENO" 5
10472     ;;
10473  yes1no)
10474     # We have unsigned chars, can say 'signed char', no s_char typedef.
10475
10476 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
10477
10478     ;;
10479 esac
10480
10481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
10482 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
10483 if ${ac_cv_type_uid_t+:} false; then :
10484   $as_echo_n "(cached) " >&6
10485 else
10486   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10487 /* end confdefs.h.  */
10488 #include <sys/types.h>
10489
10490 _ACEOF
10491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10492   $EGREP "uid_t" >/dev/null 2>&1; then :
10493   ac_cv_type_uid_t=yes
10494 else
10495   ac_cv_type_uid_t=no
10496 fi
10497 rm -f conftest*
10498
10499 fi
10500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
10501 $as_echo "$ac_cv_type_uid_t" >&6; }
10502 if test $ac_cv_type_uid_t = no; then
10503
10504 $as_echo "#define uid_t int" >>confdefs.h
10505
10506
10507 $as_echo "#define gid_t int" >>confdefs.h
10508
10509 fi
10510
10511
10512
10513
10514
10515
10516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
10517 $as_echo_n "checking if we're including debugging code... " >&6; }
10518 # Check whether --enable-debugging was given.
10519 if test "${enable_debugging+set}" = set; then :
10520   enableval=$enable_debugging; ntp_ok=$enableval
10521 else
10522   ntp_ok=yes
10523
10524 fi
10525
10526 case "$ntp_ok" in
10527  yes)
10528
10529 $as_echo "#define DEBUG 1" >>confdefs.h
10530
10531 esac
10532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
10533 $as_echo "$ntp_ok" >&6; }
10534
10535
10536
10537 # check if we can compile with pthreads
10538 for ac_header in semaphore.h
10539 do :
10540   ac_fn_c_check_header_mongrel "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
10541 if test "x$ac_cv_header_semaphore_h" = xyes; then :
10542   cat >>confdefs.h <<_ACEOF
10543 #define HAVE_SEMAPHORE_H 1
10544 _ACEOF
10545
10546 fi
10547
10548 done
10549
10550 for ac_func in socketpair
10551 do :
10552   ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
10553 if test "x$ac_cv_func_socketpair" = xyes; then :
10554   cat >>confdefs.h <<_ACEOF
10555 #define HAVE_SOCKETPAIR 1
10556 _ACEOF
10557
10558 fi
10559 done
10560
10561 # Check whether --enable-thread-support was given.
10562 if test "${enable_thread_support+set}" = set; then :
10563   enableval=$enable_thread_support;
10564 else
10565   enable_thread_support=yes
10566
10567 fi
10568
10569 have_pthreads=no
10570 case "$enable_thread_support" in
10571  no) ;;
10572  *)
10573     ol_found_pthreads=no
10574
10575
10576
10577 ac_ext=c
10578 ac_cpp='$CPP $CPPFLAGS'
10579 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10580 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10581 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10582
10583 # OpenLDAP --with-threads
10584
10585 # Check whether --with-threads was given.
10586 if test "${with_threads+set}" = set; then :
10587   withval=$with_threads;
10588         ol_arg=invalid
10589         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
10590                 if test "$withval" = "$ol_val" ; then
10591                         ol_arg="$ol_val"
10592                 fi
10593         done
10594         if test "$ol_arg" = "invalid" ; then
10595                 as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
10596         fi
10597         ol_with_threads="$ol_arg"
10598
10599 else
10600         ol_with_threads="auto"
10601 fi
10602 # end --with-threads
10603
10604
10605 case "$ol_with_threads$host" in
10606  auto*-*-solaris2.[0-6])
10607         ol_with_threads=no
10608     ;;
10609 esac
10610
10611
10612 ol_aix_threads=no
10613 case "$host" in
10614 *-*-aix*)       if test -z "$CC" ; then
10615                 case "$ol_with_threads" in
10616                 auto | yes |  posix) ol_aix_threads=yes ;;
10617                 esac
10618         fi
10619 ;;
10620 esac
10621
10622 if test $ol_aix_threads = yes ; then
10623         if test -z "${CC}" ; then
10624                 for ac_prog in cc_r xlc_r cc
10625 do
10626   # Extract the first word of "$ac_prog", so it can be a program name with args.
10627 set dummy $ac_prog; ac_word=$2
10628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10629 $as_echo_n "checking for $ac_word... " >&6; }
10630 if ${ac_cv_prog_CC+:} false; then :
10631   $as_echo_n "(cached) " >&6
10632 else
10633   if test -n "$CC"; then
10634   ac_cv_prog_CC="$CC" # Let the user override the test.
10635 else
10636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10637 for as_dir in $PATH
10638 do
10639   IFS=$as_save_IFS
10640   test -z "$as_dir" && as_dir=.
10641     for ac_exec_ext in '' $ac_executable_extensions; do
10642   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10643     ac_cv_prog_CC="$ac_prog"
10644     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10645     break 2
10646   fi
10647 done
10648   done
10649 IFS=$as_save_IFS
10650
10651 fi
10652 fi
10653 CC=$ac_cv_prog_CC
10654 if test -n "$CC"; then
10655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
10656 $as_echo "$CC" >&6; }
10657 else
10658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10659 $as_echo "no" >&6; }
10660 fi
10661
10662
10663   test -n "$CC" && break
10664 done
10665
10666
10667                 if test "$CC" = cc ; then
10668                                                 if test $ol_with_threads != auto ; then
10669                                 as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
10670                         else
10671                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
10672 $as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
10673                         fi
10674                         ol_with_threads=no
10675                 fi
10676         fi
10677
10678         case ${CC} in cc_r | xlc_r)
10679                 ol_with_threads=posix
10680                 ol_cv_pthread_create=yes
10681                 ;;
10682         esac
10683 fi
10684
10685 ol_link_threads=no
10686 # OpenLDAP --with-yielding_select
10687
10688 # Check whether --with-yielding_select was given.
10689 if test "${with_yielding_select+set}" = set; then :
10690   withval=$with_yielding_select;
10691         ol_arg=invalid
10692         for ol_val in auto yes no manual  ; do
10693                 if test "$withval" = "$ol_val" ; then
10694                         ol_arg="$ol_val"
10695                 fi
10696         done
10697         if test "$ol_arg" = "invalid" ; then
10698                 as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
10699         fi
10700         ol_with_yielding_select="$ol_arg"
10701
10702 else
10703         ol_with_yielding_select="auto"
10704 fi
10705 # end --with-yielding_select
10706
10707
10708 case $ol_with_threads in auto | yes | nt)
10709
10710
10711         ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
10712 if test "x$ac_cv_func__beginthread" = xyes; then :
10713
10714 fi
10715
10716
10717         if test $ac_cv_func__beginthread = yes ; then
10718
10719 $as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
10720
10721                 ol_cv_nt_threads=yes
10722         fi
10723
10724
10725         if test "$ol_cv_nt_threads" = yes ; then
10726                 ol_link_threads=nt
10727                 ol_with_threads=found
10728                 ol_with_yielding_select=yes
10729
10730
10731 $as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
10732
10733
10734 $as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
10735
10736         fi
10737
10738         if test $ol_with_threads = nt ; then
10739                 as_fn_error $? "could not locate NT Threads" "$LINENO" 5
10740         fi
10741         ;;
10742 esac
10743
10744 case $ol_with_threads in auto | yes | posix)
10745
10746         for ac_header in pthread.h
10747 do :
10748   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10749 if test "x$ac_cv_header_pthread_h" = xyes; then :
10750   cat >>confdefs.h <<_ACEOF
10751 #define HAVE_PTHREAD_H 1
10752 _ACEOF
10753
10754 fi
10755
10756 done
10757
10758
10759         if test $ac_cv_header_pthread_h = yes ; then
10760                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
10761 $as_echo_n "checking POSIX thread version... " >&6; }
10762 if ${ol_cv_pthread_version+:} false; then :
10763   $as_echo_n "(cached) " >&6
10764 else
10765
10766         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10767 /* end confdefs.h.  */
10768
10769 #               include <pthread.h>
10770
10771 int
10772 main ()
10773 {
10774
10775                 int i = PTHREAD_CREATE_JOINABLE;
10776
10777   ;
10778   return 0;
10779 }
10780 _ACEOF
10781 if ac_fn_c_try_compile "$LINENO"; then :
10782
10783         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10784 /* end confdefs.h.  */
10785 #include <pthread.h>
10786
10787 _ACEOF
10788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10789   $EGREP "pthread_detach" >/dev/null 2>&1; then :
10790   ol_cv_pthread_version=10
10791 else
10792   ol_cv_pthread_version=8
10793 fi
10794 rm -f conftest*
10795
10796 else
10797
10798         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10799 /* end confdefs.h.  */
10800
10801 #               include <pthread.h>
10802 #               ifdef PTHREAD_CREATE_UNDETACHED
10803                 draft7
10804 #               endif
10805
10806 _ACEOF
10807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10808   $EGREP "draft7" >/dev/null 2>&1; then :
10809   ol_cv_pthread_version=7
10810 else
10811
10812         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10813 /* end confdefs.h.  */
10814 #include <pthread.h>
10815
10816 _ACEOF
10817 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10818   $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
10819   ol_cv_pthread_version=6
10820 else
10821
10822         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10823 /* end confdefs.h.  */
10824
10825 #               include <pthread.h>
10826 #ifdef          PTHREAD_MUTEX_INITIALIZER
10827                 draft5
10828 #endif
10829
10830 _ACEOF
10831 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10832   $EGREP "draft5" >/dev/null 2>&1; then :
10833   ol_cv_pthread_version=5
10834 else
10835   ol_cv_pthread_version=4
10836 fi
10837 rm -f conftest*
10838
10839 fi
10840 rm -f conftest*
10841
10842 fi
10843 rm -f conftest*
10844
10845 fi
10846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10847
10848 fi
10849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
10850 $as_echo "$ol_cv_pthread_version" >&6; }
10851
10852
10853                 if test $ol_cv_pthread_version != 0 ; then
10854
10855 cat >>confdefs.h <<_ACEOF
10856 #define HAVE_PTHREADS $ol_cv_pthread_version
10857 _ACEOF
10858
10859                 else
10860                         as_fn_error $? "unknown pthread version" "$LINENO" 5
10861                 fi
10862
10863                 # consider threads found
10864                 ol_with_threads=found
10865
10866
10867         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
10868 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
10869 if ${ol_cv_header_linux_threads+:} false; then :
10870   $as_echo_n "(cached) " >&6
10871 else
10872   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10873 /* end confdefs.h.  */
10874 #include <pthread.h>
10875 _ACEOF
10876 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10877   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
10878   ol_cv_header_linux_threads=yes
10879 else
10880   ol_cv_header_linux_threads=no
10881 fi
10882 rm -f conftest*
10883
10884
10885 fi
10886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
10887 $as_echo "$ol_cv_header_linux_threads" >&6; }
10888         if test $ol_cv_header_linux_threads = yes; then
10889
10890 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
10891
10892         fi
10893
10894
10895         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
10896 $as_echo_n "checking for GNU Pth pthread.h... " >&6; }
10897 if ${ol_cv_header_gnu_pth_pthread_h+:} false; then :
10898   $as_echo_n "(cached) " >&6
10899 else
10900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10901 /* end confdefs.h.  */
10902 #include <pthread.h>
10903 #ifdef _POSIX_THREAD_IS_GNU_PTH
10904         __gnu_pth__;
10905 #endif
10906
10907 _ACEOF
10908 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10909   $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
10910   ol_cv_header_gnu_pth_pthread_h=yes
10911 else
10912   ol_cv_header_gnu_pth_pthread_h=no
10913 fi
10914 rm -f conftest*
10915
10916
10917 fi
10918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
10919 $as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
10920
10921
10922                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
10923                         for ac_header in sched.h
10924 do :
10925   ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
10926 if test "x$ac_cv_header_sched_h" = xyes; then :
10927   cat >>confdefs.h <<_ACEOF
10928 #define HAVE_SCHED_H 1
10929 _ACEOF
10930
10931 fi
10932
10933 done
10934
10935                 fi
10936
10937
10938                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
10939 $as_echo_n "checking for pthread_create in default libraries... " >&6; }
10940 if ${ol_cv_pthread_create+:} false; then :
10941   $as_echo_n "(cached) " >&6
10942 else
10943
10944                         if test "$cross_compiling" = yes; then :
10945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10946 /* end confdefs.h.  */
10947
10948 /* pthread test headers */
10949 #include <pthread.h>
10950 #if HAVE_PTHREADS < 7
10951 #include <errno.h>
10952 #endif
10953 #ifndef NULL
10954 #define NULL (void*)0
10955 #endif
10956
10957 static void *task(p)
10958         void *p;
10959 {
10960         return (void *) (p == NULL);
10961 }
10962
10963 int
10964 main ()
10965 {
10966
10967         /* pthread test function */
10968 #ifndef PTHREAD_CREATE_DETACHED
10969 #define PTHREAD_CREATE_DETACHED 1
10970 #endif
10971         pthread_t t;
10972         int status;
10973         int detach = PTHREAD_CREATE_DETACHED;
10974
10975 #if HAVE_PTHREADS > 4
10976         /* Final pthreads */
10977         pthread_attr_t attr;
10978
10979         status = pthread_attr_init(&attr);
10980         if( status ) return status;
10981
10982 #if HAVE_PTHREADS < 7
10983         status = pthread_attr_setdetachstate(&attr, &detach);
10984         if( status < 0 ) status = errno;
10985 #else
10986         status = pthread_attr_setdetachstate(&attr, detach);
10987 #endif
10988         if( status ) return status;
10989         status = pthread_create( &t, &attr, task, NULL );
10990 #if HAVE_PTHREADS < 7
10991         if( status < 0 ) status = errno;
10992 #endif
10993         if( status ) return status;
10994 #else
10995         /* Draft 4 pthreads */
10996         status = pthread_create( &t, pthread_attr_default, task, NULL );
10997         if( status ) return errno;
10998
10999         /* give thread a chance to complete */
11000         /* it should remain joinable and hence detachable */
11001         sleep( 1 );
11002
11003         status = pthread_detach( &t );
11004         if( status ) return errno;
11005 #endif
11006
11007 #ifdef HAVE_LINUX_THREADS
11008         pthread_kill_other_threads_np();
11009 #endif
11010
11011         return 0;
11012
11013   ;
11014   return 0;
11015 }
11016 _ACEOF
11017 if ac_fn_c_try_link "$LINENO"; then :
11018   ol_cv_pthread_create=yes
11019 else
11020   ol_cv_pthread_create=no
11021 fi
11022 rm -f core conftest.err conftest.$ac_objext \
11023     conftest$ac_exeext conftest.$ac_ext
11024 else
11025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11026 /* end confdefs.h.  */
11027
11028
11029 /* pthread test headers */
11030 #include <pthread.h>
11031 #if HAVE_PTHREADS < 7
11032 #include <errno.h>
11033 #endif
11034 #ifndef NULL
11035 #define NULL (void*)0
11036 #endif
11037
11038 static void *task(p)
11039         void *p;
11040 {
11041         return (void *) (p == NULL);
11042 }
11043
11044
11045 int main(argc, argv)
11046         int argc;
11047         char **argv;
11048 {
11049
11050         /* pthread test function */
11051 #ifndef PTHREAD_CREATE_DETACHED
11052 #define PTHREAD_CREATE_DETACHED 1
11053 #endif
11054         pthread_t t;
11055         int status;
11056         int detach = PTHREAD_CREATE_DETACHED;
11057
11058 #if HAVE_PTHREADS > 4
11059         /* Final pthreads */
11060         pthread_attr_t attr;
11061
11062         status = pthread_attr_init(&attr);
11063         if( status ) return status;
11064
11065 #if HAVE_PTHREADS < 7
11066         status = pthread_attr_setdetachstate(&attr, &detach);
11067         if( status < 0 ) status = errno;
11068 #else
11069         status = pthread_attr_setdetachstate(&attr, detach);
11070 #endif
11071         if( status ) return status;
11072         status = pthread_create( &t, &attr, task, NULL );
11073 #if HAVE_PTHREADS < 7
11074         if( status < 0 ) status = errno;
11075 #endif
11076         if( status ) return status;
11077 #else
11078         /* Draft 4 pthreads */
11079         status = pthread_create( &t, pthread_attr_default, task, NULL );
11080         if( status ) return errno;
11081
11082         /* give thread a chance to complete */
11083         /* it should remain joinable and hence detachable */
11084         sleep( 1 );
11085
11086         status = pthread_detach( &t );
11087         if( status ) return errno;
11088 #endif
11089
11090 #ifdef HAVE_LINUX_THREADS
11091         pthread_kill_other_threads_np();
11092 #endif
11093
11094         return 0;
11095
11096 }
11097
11098 _ACEOF
11099 if ac_fn_c_try_run "$LINENO"; then :
11100   ol_cv_pthread_create=yes
11101 else
11102   ol_cv_pthread_create=no
11103 fi
11104 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11105   conftest.$ac_objext conftest.beam conftest.$ac_ext
11106 fi
11107
11108 fi
11109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
11110 $as_echo "$ol_cv_pthread_create" >&6; }
11111
11112                 if test $ol_cv_pthread_create != no ; then
11113                         ol_link_threads=posix
11114                         ol_link_pthreads=""
11115                 fi
11116
11117                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11118 if test "$ol_link_threads" = no ; then
11119         # try -kthread
11120         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
11121 $as_echo_n "checking for pthread link with -kthread... " >&6; }
11122 if ${ol_cv_pthread_kthread+:} false; then :
11123   $as_echo_n "(cached) " >&6
11124 else
11125
11126                 # save the flags
11127                 ol_LIBS="$LIBS"
11128                 LIBS="-kthread $LIBS"
11129
11130                 if test "$cross_compiling" = yes; then :
11131   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11132 /* end confdefs.h.  */
11133
11134 /* pthread test headers */
11135 #include <pthread.h>
11136 #if HAVE_PTHREADS < 7
11137 #include <errno.h>
11138 #endif
11139 #ifndef NULL
11140 #define NULL (void*)0
11141 #endif
11142
11143 static void *task(p)
11144         void *p;
11145 {
11146         return (void *) (p == NULL);
11147 }
11148
11149 int
11150 main ()
11151 {
11152
11153         /* pthread test function */
11154 #ifndef PTHREAD_CREATE_DETACHED
11155 #define PTHREAD_CREATE_DETACHED 1
11156 #endif
11157         pthread_t t;
11158         int status;
11159         int detach = PTHREAD_CREATE_DETACHED;
11160
11161 #if HAVE_PTHREADS > 4
11162         /* Final pthreads */
11163         pthread_attr_t attr;
11164
11165         status = pthread_attr_init(&attr);
11166         if( status ) return status;
11167
11168 #if HAVE_PTHREADS < 7
11169         status = pthread_attr_setdetachstate(&attr, &detach);
11170         if( status < 0 ) status = errno;
11171 #else
11172         status = pthread_attr_setdetachstate(&attr, detach);
11173 #endif
11174         if( status ) return status;
11175         status = pthread_create( &t, &attr, task, NULL );
11176 #if HAVE_PTHREADS < 7
11177         if( status < 0 ) status = errno;
11178 #endif
11179         if( status ) return status;
11180 #else
11181         /* Draft 4 pthreads */
11182         status = pthread_create( &t, pthread_attr_default, task, NULL );
11183         if( status ) return errno;
11184
11185         /* give thread a chance to complete */
11186         /* it should remain joinable and hence detachable */
11187         sleep( 1 );
11188
11189         status = pthread_detach( &t );
11190         if( status ) return errno;
11191 #endif
11192
11193 #ifdef HAVE_LINUX_THREADS
11194         pthread_kill_other_threads_np();
11195 #endif
11196
11197         return 0;
11198
11199   ;
11200   return 0;
11201 }
11202 _ACEOF
11203 if ac_fn_c_try_link "$LINENO"; then :
11204   ol_cv_pthread_kthread=yes
11205 else
11206   ol_cv_pthread_kthread=no
11207 fi
11208 rm -f core conftest.err conftest.$ac_objext \
11209     conftest$ac_exeext conftest.$ac_ext
11210 else
11211   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11212 /* end confdefs.h.  */
11213
11214
11215 /* pthread test headers */
11216 #include <pthread.h>
11217 #if HAVE_PTHREADS < 7
11218 #include <errno.h>
11219 #endif
11220 #ifndef NULL
11221 #define NULL (void*)0
11222 #endif
11223
11224 static void *task(p)
11225         void *p;
11226 {
11227         return (void *) (p == NULL);
11228 }
11229
11230
11231 int main(argc, argv)
11232         int argc;
11233         char **argv;
11234 {
11235
11236         /* pthread test function */
11237 #ifndef PTHREAD_CREATE_DETACHED
11238 #define PTHREAD_CREATE_DETACHED 1
11239 #endif
11240         pthread_t t;
11241         int status;
11242         int detach = PTHREAD_CREATE_DETACHED;
11243
11244 #if HAVE_PTHREADS > 4
11245         /* Final pthreads */
11246         pthread_attr_t attr;
11247
11248         status = pthread_attr_init(&attr);
11249         if( status ) return status;
11250
11251 #if HAVE_PTHREADS < 7
11252         status = pthread_attr_setdetachstate(&attr, &detach);
11253         if( status < 0 ) status = errno;
11254 #else
11255         status = pthread_attr_setdetachstate(&attr, detach);
11256 #endif
11257         if( status ) return status;
11258         status = pthread_create( &t, &attr, task, NULL );
11259 #if HAVE_PTHREADS < 7
11260         if( status < 0 ) status = errno;
11261 #endif
11262         if( status ) return status;
11263 #else
11264         /* Draft 4 pthreads */
11265         status = pthread_create( &t, pthread_attr_default, task, NULL );
11266         if( status ) return errno;
11267
11268         /* give thread a chance to complete */
11269         /* it should remain joinable and hence detachable */
11270         sleep( 1 );
11271
11272         status = pthread_detach( &t );
11273         if( status ) return errno;
11274 #endif
11275
11276 #ifdef HAVE_LINUX_THREADS
11277         pthread_kill_other_threads_np();
11278 #endif
11279
11280         return 0;
11281
11282 }
11283
11284 _ACEOF
11285 if ac_fn_c_try_run "$LINENO"; then :
11286   ol_cv_pthread_kthread=yes
11287 else
11288   ol_cv_pthread_kthread=no
11289 fi
11290 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11291   conftest.$ac_objext conftest.beam conftest.$ac_ext
11292 fi
11293
11294
11295                 # restore the LIBS
11296                 LIBS="$ol_LIBS"
11297
11298 fi
11299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
11300 $as_echo "$ol_cv_pthread_kthread" >&6; }
11301
11302         if test $ol_cv_pthread_kthread = yes ; then
11303                 ol_link_pthreads="-kthread"
11304                 ol_link_threads=posix
11305         fi
11306 fi
11307
11308                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11309 if test "$ol_link_threads" = no ; then
11310         # try -pthread
11311         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
11312 $as_echo_n "checking for pthread link with -pthread... " >&6; }
11313 if ${ol_cv_pthread_pthread+:} false; then :
11314   $as_echo_n "(cached) " >&6
11315 else
11316
11317                 # save the flags
11318                 ol_LIBS="$LIBS"
11319                 LIBS="-pthread $LIBS"
11320
11321                 if test "$cross_compiling" = yes; then :
11322   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11323 /* end confdefs.h.  */
11324
11325 /* pthread test headers */
11326 #include <pthread.h>
11327 #if HAVE_PTHREADS < 7
11328 #include <errno.h>
11329 #endif
11330 #ifndef NULL
11331 #define NULL (void*)0
11332 #endif
11333
11334 static void *task(p)
11335         void *p;
11336 {
11337         return (void *) (p == NULL);
11338 }
11339
11340 int
11341 main ()
11342 {
11343
11344         /* pthread test function */
11345 #ifndef PTHREAD_CREATE_DETACHED
11346 #define PTHREAD_CREATE_DETACHED 1
11347 #endif
11348         pthread_t t;
11349         int status;
11350         int detach = PTHREAD_CREATE_DETACHED;
11351
11352 #if HAVE_PTHREADS > 4
11353         /* Final pthreads */
11354         pthread_attr_t attr;
11355
11356         status = pthread_attr_init(&attr);
11357         if( status ) return status;
11358
11359 #if HAVE_PTHREADS < 7
11360         status = pthread_attr_setdetachstate(&attr, &detach);
11361         if( status < 0 ) status = errno;
11362 #else
11363         status = pthread_attr_setdetachstate(&attr, detach);
11364 #endif
11365         if( status ) return status;
11366         status = pthread_create( &t, &attr, task, NULL );
11367 #if HAVE_PTHREADS < 7
11368         if( status < 0 ) status = errno;
11369 #endif
11370         if( status ) return status;
11371 #else
11372         /* Draft 4 pthreads */
11373         status = pthread_create( &t, pthread_attr_default, task, NULL );
11374         if( status ) return errno;
11375
11376         /* give thread a chance to complete */
11377         /* it should remain joinable and hence detachable */
11378         sleep( 1 );
11379
11380         status = pthread_detach( &t );
11381         if( status ) return errno;
11382 #endif
11383
11384 #ifdef HAVE_LINUX_THREADS
11385         pthread_kill_other_threads_np();
11386 #endif
11387
11388         return 0;
11389
11390   ;
11391   return 0;
11392 }
11393 _ACEOF
11394 if ac_fn_c_try_link "$LINENO"; then :
11395   ol_cv_pthread_pthread=yes
11396 else
11397   ol_cv_pthread_pthread=no
11398 fi
11399 rm -f core conftest.err conftest.$ac_objext \
11400     conftest$ac_exeext conftest.$ac_ext
11401 else
11402   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11403 /* end confdefs.h.  */
11404
11405
11406 /* pthread test headers */
11407 #include <pthread.h>
11408 #if HAVE_PTHREADS < 7
11409 #include <errno.h>
11410 #endif
11411 #ifndef NULL
11412 #define NULL (void*)0
11413 #endif
11414
11415 static void *task(p)
11416         void *p;
11417 {
11418         return (void *) (p == NULL);
11419 }
11420
11421
11422 int main(argc, argv)
11423         int argc;
11424         char **argv;
11425 {
11426
11427         /* pthread test function */
11428 #ifndef PTHREAD_CREATE_DETACHED
11429 #define PTHREAD_CREATE_DETACHED 1
11430 #endif
11431         pthread_t t;
11432         int status;
11433         int detach = PTHREAD_CREATE_DETACHED;
11434
11435 #if HAVE_PTHREADS > 4
11436         /* Final pthreads */
11437         pthread_attr_t attr;
11438
11439         status = pthread_attr_init(&attr);
11440         if( status ) return status;
11441
11442 #if HAVE_PTHREADS < 7
11443         status = pthread_attr_setdetachstate(&attr, &detach);
11444         if( status < 0 ) status = errno;
11445 #else
11446         status = pthread_attr_setdetachstate(&attr, detach);
11447 #endif
11448         if( status ) return status;
11449         status = pthread_create( &t, &attr, task, NULL );
11450 #if HAVE_PTHREADS < 7
11451         if( status < 0 ) status = errno;
11452 #endif
11453         if( status ) return status;
11454 #else
11455         /* Draft 4 pthreads */
11456         status = pthread_create( &t, pthread_attr_default, task, NULL );
11457         if( status ) return errno;
11458
11459         /* give thread a chance to complete */
11460         /* it should remain joinable and hence detachable */
11461         sleep( 1 );
11462
11463         status = pthread_detach( &t );
11464         if( status ) return errno;
11465 #endif
11466
11467 #ifdef HAVE_LINUX_THREADS
11468         pthread_kill_other_threads_np();
11469 #endif
11470
11471         return 0;
11472
11473 }
11474
11475 _ACEOF
11476 if ac_fn_c_try_run "$LINENO"; then :
11477   ol_cv_pthread_pthread=yes
11478 else
11479   ol_cv_pthread_pthread=no
11480 fi
11481 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11482   conftest.$ac_objext conftest.beam conftest.$ac_ext
11483 fi
11484
11485
11486                 # restore the LIBS
11487                 LIBS="$ol_LIBS"
11488
11489 fi
11490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
11491 $as_echo "$ol_cv_pthread_pthread" >&6; }
11492
11493         if test $ol_cv_pthread_pthread = yes ; then
11494                 ol_link_pthreads="-pthread"
11495                 ol_link_threads=posix
11496         fi
11497 fi
11498
11499                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
11500 if test "$ol_link_threads" = no ; then
11501         # try -pthreads
11502         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
11503 $as_echo_n "checking for pthread link with -pthreads... " >&6; }
11504 if ${ol_cv_pthread_pthreads+:} false; then :
11505   $as_echo_n "(cached) " >&6
11506 else
11507
11508                 # save the flags
11509                 ol_LIBS="$LIBS"
11510                 LIBS="-pthreads $LIBS"
11511
11512                 if test "$cross_compiling" = yes; then :
11513   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11514 /* end confdefs.h.  */
11515
11516 /* pthread test headers */
11517 #include <pthread.h>
11518 #if HAVE_PTHREADS < 7
11519 #include <errno.h>
11520 #endif
11521 #ifndef NULL
11522 #define NULL (void*)0
11523 #endif
11524
11525 static void *task(p)
11526         void *p;
11527 {
11528         return (void *) (p == NULL);
11529 }
11530
11531 int
11532 main ()
11533 {
11534
11535         /* pthread test function */
11536 #ifndef PTHREAD_CREATE_DETACHED
11537 #define PTHREAD_CREATE_DETACHED 1
11538 #endif
11539         pthread_t t;
11540         int status;
11541         int detach = PTHREAD_CREATE_DETACHED;
11542
11543 #if HAVE_PTHREADS > 4
11544         /* Final pthreads */
11545         pthread_attr_t attr;
11546
11547         status = pthread_attr_init(&attr);
11548         if( status ) return status;
11549
11550 #if HAVE_PTHREADS < 7
11551         status = pthread_attr_setdetachstate(&attr, &detach);
11552         if( status < 0 ) status = errno;
11553 #else
11554         status = pthread_attr_setdetachstate(&attr, detach);
11555 #endif
11556         if( status ) return status;
11557         status = pthread_create( &t, &attr, task, NULL );
11558 #if HAVE_PTHREADS < 7
11559         if( status < 0 ) status = errno;
11560 #endif
11561         if( status ) return status;
11562 #else
11563         /* Draft 4 pthreads */
11564         status = pthread_create( &t, pthread_attr_default, task, NULL );
11565         if( status ) return errno;
11566
11567         /* give thread a chance to complete */
11568         /* it should remain joinable and hence detachable */
11569         sleep( 1 );
11570
11571         status = pthread_detach( &t );
11572         if( status ) return errno;
11573 #endif
11574
11575 #ifdef HAVE_LINUX_THREADS
11576         pthread_kill_other_threads_np();
11577 #endif
11578
11579         return 0;
11580
11581   ;
11582   return 0;
11583 }
11584 _ACEOF
11585 if ac_fn_c_try_link "$LINENO"; then :
11586   ol_cv_pthread_pthreads=yes
11587 else
11588   ol_cv_pthread_pthreads=no
11589 fi
11590 rm -f core conftest.err conftest.$ac_objext \
11591     conftest$ac_exeext conftest.$ac_ext
11592 else
11593   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11594 /* end confdefs.h.  */
11595
11596
11597 /* pthread test headers */
11598 #include <pthread.h>
11599 #if HAVE_PTHREADS < 7
11600 #include <errno.h>
11601 #endif
11602 #ifndef NULL
11603 #define NULL (void*)0
11604 #endif
11605
11606 static void *task(p)
11607         void *p;
11608 {
11609         return (void *) (p == NULL);
11610 }
11611
11612
11613 int main(argc, argv)
11614         int argc;
11615         char **argv;
11616 {
11617
11618         /* pthread test function */
11619 #ifndef PTHREAD_CREATE_DETACHED
11620 #define PTHREAD_CREATE_DETACHED 1
11621 #endif
11622         pthread_t t;
11623         int status;
11624         int detach = PTHREAD_CREATE_DETACHED;
11625
11626 #if HAVE_PTHREADS > 4
11627         /* Final pthreads */
11628         pthread_attr_t attr;
11629
11630         status = pthread_attr_init(&attr);
11631         if( status ) return status;
11632
11633 #if HAVE_PTHREADS < 7
11634         status = pthread_attr_setdetachstate(&attr, &detach);
11635         if( status < 0 ) status = errno;
11636 #else
11637         status = pthread_attr_setdetachstate(&attr, detach);
11638 #endif
11639         if( status ) return status;
11640         status = pthread_create( &t, &attr, task, NULL );
11641 #if HAVE_PTHREADS < 7
11642         if( status < 0 ) status = errno;
11643 #endif
11644         if( status ) return status;
11645 #else
11646         /* Draft 4 pthreads */
11647         status = pthread_create( &t, pthread_attr_default, task, NULL );
11648         if( status ) return errno;
11649
11650         /* give thread a chance to complete */
11651         /* it should remain joinable and hence detachable */
11652         sleep( 1 );
11653
11654         status = pthread_detach( &t );
11655         if( status ) return errno;
11656 #endif
11657
11658 #ifdef HAVE_LINUX_THREADS
11659         pthread_kill_other_threads_np();
11660 #endif
11661
11662         return 0;
11663
11664 }
11665
11666 _ACEOF
11667 if ac_fn_c_try_run "$LINENO"; then :
11668   ol_cv_pthread_pthreads=yes
11669 else
11670   ol_cv_pthread_pthreads=no
11671 fi
11672 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11673   conftest.$ac_objext conftest.beam conftest.$ac_ext
11674 fi
11675
11676
11677                 # restore the LIBS
11678                 LIBS="$ol_LIBS"
11679
11680 fi
11681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
11682 $as_echo "$ol_cv_pthread_pthreads" >&6; }
11683
11684         if test $ol_cv_pthread_pthreads = yes ; then
11685                 ol_link_pthreads="-pthreads"
11686                 ol_link_threads=posix
11687         fi
11688 fi
11689
11690                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
11691 if test "$ol_link_threads" = no ; then
11692         # try -mthreads
11693         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
11694 $as_echo_n "checking for pthread link with -mthreads... " >&6; }
11695 if ${ol_cv_pthread_mthreads+:} false; then :
11696   $as_echo_n "(cached) " >&6
11697 else
11698
11699                 # save the flags
11700                 ol_LIBS="$LIBS"
11701                 LIBS="-mthreads $LIBS"
11702
11703                 if test "$cross_compiling" = yes; then :
11704   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11705 /* end confdefs.h.  */
11706
11707 /* pthread test headers */
11708 #include <pthread.h>
11709 #if HAVE_PTHREADS < 7
11710 #include <errno.h>
11711 #endif
11712 #ifndef NULL
11713 #define NULL (void*)0
11714 #endif
11715
11716 static void *task(p)
11717         void *p;
11718 {
11719         return (void *) (p == NULL);
11720 }
11721
11722 int
11723 main ()
11724 {
11725
11726         /* pthread test function */
11727 #ifndef PTHREAD_CREATE_DETACHED
11728 #define PTHREAD_CREATE_DETACHED 1
11729 #endif
11730         pthread_t t;
11731         int status;
11732         int detach = PTHREAD_CREATE_DETACHED;
11733
11734 #if HAVE_PTHREADS > 4
11735         /* Final pthreads */
11736         pthread_attr_t attr;
11737
11738         status = pthread_attr_init(&attr);
11739         if( status ) return status;
11740
11741 #if HAVE_PTHREADS < 7
11742         status = pthread_attr_setdetachstate(&attr, &detach);
11743         if( status < 0 ) status = errno;
11744 #else
11745         status = pthread_attr_setdetachstate(&attr, detach);
11746 #endif
11747         if( status ) return status;
11748         status = pthread_create( &t, &attr, task, NULL );
11749 #if HAVE_PTHREADS < 7
11750         if( status < 0 ) status = errno;
11751 #endif
11752         if( status ) return status;
11753 #else
11754         /* Draft 4 pthreads */
11755         status = pthread_create( &t, pthread_attr_default, task, NULL );
11756         if( status ) return errno;
11757
11758         /* give thread a chance to complete */
11759         /* it should remain joinable and hence detachable */
11760         sleep( 1 );
11761
11762         status = pthread_detach( &t );
11763         if( status ) return errno;
11764 #endif
11765
11766 #ifdef HAVE_LINUX_THREADS
11767         pthread_kill_other_threads_np();
11768 #endif
11769
11770         return 0;
11771
11772   ;
11773   return 0;
11774 }
11775 _ACEOF
11776 if ac_fn_c_try_link "$LINENO"; then :
11777   ol_cv_pthread_mthreads=yes
11778 else
11779   ol_cv_pthread_mthreads=no
11780 fi
11781 rm -f core conftest.err conftest.$ac_objext \
11782     conftest$ac_exeext conftest.$ac_ext
11783 else
11784   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11785 /* end confdefs.h.  */
11786
11787
11788 /* pthread test headers */
11789 #include <pthread.h>
11790 #if HAVE_PTHREADS < 7
11791 #include <errno.h>
11792 #endif
11793 #ifndef NULL
11794 #define NULL (void*)0
11795 #endif
11796
11797 static void *task(p)
11798         void *p;
11799 {
11800         return (void *) (p == NULL);
11801 }
11802
11803
11804 int main(argc, argv)
11805         int argc;
11806         char **argv;
11807 {
11808
11809         /* pthread test function */
11810 #ifndef PTHREAD_CREATE_DETACHED
11811 #define PTHREAD_CREATE_DETACHED 1
11812 #endif
11813         pthread_t t;
11814         int status;
11815         int detach = PTHREAD_CREATE_DETACHED;
11816
11817 #if HAVE_PTHREADS > 4
11818         /* Final pthreads */
11819         pthread_attr_t attr;
11820
11821         status = pthread_attr_init(&attr);
11822         if( status ) return status;
11823
11824 #if HAVE_PTHREADS < 7
11825         status = pthread_attr_setdetachstate(&attr, &detach);
11826         if( status < 0 ) status = errno;
11827 #else
11828         status = pthread_attr_setdetachstate(&attr, detach);
11829 #endif
11830         if( status ) return status;
11831         status = pthread_create( &t, &attr, task, NULL );
11832 #if HAVE_PTHREADS < 7
11833         if( status < 0 ) status = errno;
11834 #endif
11835         if( status ) return status;
11836 #else
11837         /* Draft 4 pthreads */
11838         status = pthread_create( &t, pthread_attr_default, task, NULL );
11839         if( status ) return errno;
11840
11841         /* give thread a chance to complete */
11842         /* it should remain joinable and hence detachable */
11843         sleep( 1 );
11844
11845         status = pthread_detach( &t );
11846         if( status ) return errno;
11847 #endif
11848
11849 #ifdef HAVE_LINUX_THREADS
11850         pthread_kill_other_threads_np();
11851 #endif
11852
11853         return 0;
11854
11855 }
11856
11857 _ACEOF
11858 if ac_fn_c_try_run "$LINENO"; then :
11859   ol_cv_pthread_mthreads=yes
11860 else
11861   ol_cv_pthread_mthreads=no
11862 fi
11863 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11864   conftest.$ac_objext conftest.beam conftest.$ac_ext
11865 fi
11866
11867
11868                 # restore the LIBS
11869                 LIBS="$ol_LIBS"
11870
11871 fi
11872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
11873 $as_echo "$ol_cv_pthread_mthreads" >&6; }
11874
11875         if test $ol_cv_pthread_mthreads = yes ; then
11876                 ol_link_pthreads="-mthreads"
11877                 ol_link_threads=posix
11878         fi
11879 fi
11880
11881                 # Pthread try link: -thread (ol_cv_pthread_thread)
11882 if test "$ol_link_threads" = no ; then
11883         # try -thread
11884         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
11885 $as_echo_n "checking for pthread link with -thread... " >&6; }
11886 if ${ol_cv_pthread_thread+:} false; then :
11887   $as_echo_n "(cached) " >&6
11888 else
11889
11890                 # save the flags
11891                 ol_LIBS="$LIBS"
11892                 LIBS="-thread $LIBS"
11893
11894                 if test "$cross_compiling" = yes; then :
11895   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11896 /* end confdefs.h.  */
11897
11898 /* pthread test headers */
11899 #include <pthread.h>
11900 #if HAVE_PTHREADS < 7
11901 #include <errno.h>
11902 #endif
11903 #ifndef NULL
11904 #define NULL (void*)0
11905 #endif
11906
11907 static void *task(p)
11908         void *p;
11909 {
11910         return (void *) (p == NULL);
11911 }
11912
11913 int
11914 main ()
11915 {
11916
11917         /* pthread test function */
11918 #ifndef PTHREAD_CREATE_DETACHED
11919 #define PTHREAD_CREATE_DETACHED 1
11920 #endif
11921         pthread_t t;
11922         int status;
11923         int detach = PTHREAD_CREATE_DETACHED;
11924
11925 #if HAVE_PTHREADS > 4
11926         /* Final pthreads */
11927         pthread_attr_t attr;
11928
11929         status = pthread_attr_init(&attr);
11930         if( status ) return status;
11931
11932 #if HAVE_PTHREADS < 7
11933         status = pthread_attr_setdetachstate(&attr, &detach);
11934         if( status < 0 ) status = errno;
11935 #else
11936         status = pthread_attr_setdetachstate(&attr, detach);
11937 #endif
11938         if( status ) return status;
11939         status = pthread_create( &t, &attr, task, NULL );
11940 #if HAVE_PTHREADS < 7
11941         if( status < 0 ) status = errno;
11942 #endif
11943         if( status ) return status;
11944 #else
11945         /* Draft 4 pthreads */
11946         status = pthread_create( &t, pthread_attr_default, task, NULL );
11947         if( status ) return errno;
11948
11949         /* give thread a chance to complete */
11950         /* it should remain joinable and hence detachable */
11951         sleep( 1 );
11952
11953         status = pthread_detach( &t );
11954         if( status ) return errno;
11955 #endif
11956
11957 #ifdef HAVE_LINUX_THREADS
11958         pthread_kill_other_threads_np();
11959 #endif
11960
11961         return 0;
11962
11963   ;
11964   return 0;
11965 }
11966 _ACEOF
11967 if ac_fn_c_try_link "$LINENO"; then :
11968   ol_cv_pthread_thread=yes
11969 else
11970   ol_cv_pthread_thread=no
11971 fi
11972 rm -f core conftest.err conftest.$ac_objext \
11973     conftest$ac_exeext conftest.$ac_ext
11974 else
11975   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11976 /* end confdefs.h.  */
11977
11978
11979 /* pthread test headers */
11980 #include <pthread.h>
11981 #if HAVE_PTHREADS < 7
11982 #include <errno.h>
11983 #endif
11984 #ifndef NULL
11985 #define NULL (void*)0
11986 #endif
11987
11988 static void *task(p)
11989         void *p;
11990 {
11991         return (void *) (p == NULL);
11992 }
11993
11994
11995 int main(argc, argv)
11996         int argc;
11997         char **argv;
11998 {
11999
12000         /* pthread test function */
12001 #ifndef PTHREAD_CREATE_DETACHED
12002 #define PTHREAD_CREATE_DETACHED 1
12003 #endif
12004         pthread_t t;
12005         int status;
12006         int detach = PTHREAD_CREATE_DETACHED;
12007
12008 #if HAVE_PTHREADS > 4
12009         /* Final pthreads */
12010         pthread_attr_t attr;
12011
12012         status = pthread_attr_init(&attr);
12013         if( status ) return status;
12014
12015 #if HAVE_PTHREADS < 7
12016         status = pthread_attr_setdetachstate(&attr, &detach);
12017         if( status < 0 ) status = errno;
12018 #else
12019         status = pthread_attr_setdetachstate(&attr, detach);
12020 #endif
12021         if( status ) return status;
12022         status = pthread_create( &t, &attr, task, NULL );
12023 #if HAVE_PTHREADS < 7
12024         if( status < 0 ) status = errno;
12025 #endif
12026         if( status ) return status;
12027 #else
12028         /* Draft 4 pthreads */
12029         status = pthread_create( &t, pthread_attr_default, task, NULL );
12030         if( status ) return errno;
12031
12032         /* give thread a chance to complete */
12033         /* it should remain joinable and hence detachable */
12034         sleep( 1 );
12035
12036         status = pthread_detach( &t );
12037         if( status ) return errno;
12038 #endif
12039
12040 #ifdef HAVE_LINUX_THREADS
12041         pthread_kill_other_threads_np();
12042 #endif
12043
12044         return 0;
12045
12046 }
12047
12048 _ACEOF
12049 if ac_fn_c_try_run "$LINENO"; then :
12050   ol_cv_pthread_thread=yes
12051 else
12052   ol_cv_pthread_thread=no
12053 fi
12054 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12055   conftest.$ac_objext conftest.beam conftest.$ac_ext
12056 fi
12057
12058
12059                 # restore the LIBS
12060                 LIBS="$ol_LIBS"
12061
12062 fi
12063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
12064 $as_echo "$ol_cv_pthread_thread" >&6; }
12065
12066         if test $ol_cv_pthread_thread = yes ; then
12067                 ol_link_pthreads="-thread"
12068                 ol_link_threads=posix
12069         fi
12070 fi
12071
12072
12073                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12074 if test "$ol_link_threads" = no ; then
12075         # try -lpthread -lmach -lexc -lc_r
12076         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12077 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
12078 if ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+:} false; then :
12079   $as_echo_n "(cached) " >&6
12080 else
12081
12082                 # save the flags
12083                 ol_LIBS="$LIBS"
12084                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12085
12086                 if test "$cross_compiling" = yes; then :
12087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12088 /* end confdefs.h.  */
12089
12090 /* pthread test headers */
12091 #include <pthread.h>
12092 #if HAVE_PTHREADS < 7
12093 #include <errno.h>
12094 #endif
12095 #ifndef NULL
12096 #define NULL (void*)0
12097 #endif
12098
12099 static void *task(p)
12100         void *p;
12101 {
12102         return (void *) (p == NULL);
12103 }
12104
12105 int
12106 main ()
12107 {
12108
12109         /* pthread test function */
12110 #ifndef PTHREAD_CREATE_DETACHED
12111 #define PTHREAD_CREATE_DETACHED 1
12112 #endif
12113         pthread_t t;
12114         int status;
12115         int detach = PTHREAD_CREATE_DETACHED;
12116
12117 #if HAVE_PTHREADS > 4
12118         /* Final pthreads */
12119         pthread_attr_t attr;
12120
12121         status = pthread_attr_init(&attr);
12122         if( status ) return status;
12123
12124 #if HAVE_PTHREADS < 7
12125         status = pthread_attr_setdetachstate(&attr, &detach);
12126         if( status < 0 ) status = errno;
12127 #else
12128         status = pthread_attr_setdetachstate(&attr, detach);
12129 #endif
12130         if( status ) return status;
12131         status = pthread_create( &t, &attr, task, NULL );
12132 #if HAVE_PTHREADS < 7
12133         if( status < 0 ) status = errno;
12134 #endif
12135         if( status ) return status;
12136 #else
12137         /* Draft 4 pthreads */
12138         status = pthread_create( &t, pthread_attr_default, task, NULL );
12139         if( status ) return errno;
12140
12141         /* give thread a chance to complete */
12142         /* it should remain joinable and hence detachable */
12143         sleep( 1 );
12144
12145         status = pthread_detach( &t );
12146         if( status ) return errno;
12147 #endif
12148
12149 #ifdef HAVE_LINUX_THREADS
12150         pthread_kill_other_threads_np();
12151 #endif
12152
12153         return 0;
12154
12155   ;
12156   return 0;
12157 }
12158 _ACEOF
12159 if ac_fn_c_try_link "$LINENO"; then :
12160   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12161 else
12162   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12163 fi
12164 rm -f core conftest.err conftest.$ac_objext \
12165     conftest$ac_exeext conftest.$ac_ext
12166 else
12167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12168 /* end confdefs.h.  */
12169
12170
12171 /* pthread test headers */
12172 #include <pthread.h>
12173 #if HAVE_PTHREADS < 7
12174 #include <errno.h>
12175 #endif
12176 #ifndef NULL
12177 #define NULL (void*)0
12178 #endif
12179
12180 static void *task(p)
12181         void *p;
12182 {
12183         return (void *) (p == NULL);
12184 }
12185
12186
12187 int main(argc, argv)
12188         int argc;
12189         char **argv;
12190 {
12191
12192         /* pthread test function */
12193 #ifndef PTHREAD_CREATE_DETACHED
12194 #define PTHREAD_CREATE_DETACHED 1
12195 #endif
12196         pthread_t t;
12197         int status;
12198         int detach = PTHREAD_CREATE_DETACHED;
12199
12200 #if HAVE_PTHREADS > 4
12201         /* Final pthreads */
12202         pthread_attr_t attr;
12203
12204         status = pthread_attr_init(&attr);
12205         if( status ) return status;
12206
12207 #if HAVE_PTHREADS < 7
12208         status = pthread_attr_setdetachstate(&attr, &detach);
12209         if( status < 0 ) status = errno;
12210 #else
12211         status = pthread_attr_setdetachstate(&attr, detach);
12212 #endif
12213         if( status ) return status;
12214         status = pthread_create( &t, &attr, task, NULL );
12215 #if HAVE_PTHREADS < 7
12216         if( status < 0 ) status = errno;
12217 #endif
12218         if( status ) return status;
12219 #else
12220         /* Draft 4 pthreads */
12221         status = pthread_create( &t, pthread_attr_default, task, NULL );
12222         if( status ) return errno;
12223
12224         /* give thread a chance to complete */
12225         /* it should remain joinable and hence detachable */
12226         sleep( 1 );
12227
12228         status = pthread_detach( &t );
12229         if( status ) return errno;
12230 #endif
12231
12232 #ifdef HAVE_LINUX_THREADS
12233         pthread_kill_other_threads_np();
12234 #endif
12235
12236         return 0;
12237
12238 }
12239
12240 _ACEOF
12241 if ac_fn_c_try_run "$LINENO"; then :
12242   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12243 else
12244   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12245 fi
12246 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12247   conftest.$ac_objext conftest.beam conftest.$ac_ext
12248 fi
12249
12250
12251                 # restore the LIBS
12252                 LIBS="$ol_LIBS"
12253
12254 fi
12255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
12256 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
12257
12258         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12259                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12260                 ol_link_threads=posix
12261         fi
12262 fi
12263
12264                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12265 if test "$ol_link_threads" = no ; then
12266         # try -lpthread -lmach -lexc
12267         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
12268 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
12269 if ${ol_cv_pthread_lpthread_lmach_lexc+:} false; then :
12270   $as_echo_n "(cached) " >&6
12271 else
12272
12273                 # save the flags
12274                 ol_LIBS="$LIBS"
12275                 LIBS="-lpthread -lmach -lexc $LIBS"
12276
12277                 if test "$cross_compiling" = yes; then :
12278   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12279 /* end confdefs.h.  */
12280
12281 /* pthread test headers */
12282 #include <pthread.h>
12283 #if HAVE_PTHREADS < 7
12284 #include <errno.h>
12285 #endif
12286 #ifndef NULL
12287 #define NULL (void*)0
12288 #endif
12289
12290 static void *task(p)
12291         void *p;
12292 {
12293         return (void *) (p == NULL);
12294 }
12295
12296 int
12297 main ()
12298 {
12299
12300         /* pthread test function */
12301 #ifndef PTHREAD_CREATE_DETACHED
12302 #define PTHREAD_CREATE_DETACHED 1
12303 #endif
12304         pthread_t t;
12305         int status;
12306         int detach = PTHREAD_CREATE_DETACHED;
12307
12308 #if HAVE_PTHREADS > 4
12309         /* Final pthreads */
12310         pthread_attr_t attr;
12311
12312         status = pthread_attr_init(&attr);
12313         if( status ) return status;
12314
12315 #if HAVE_PTHREADS < 7
12316         status = pthread_attr_setdetachstate(&attr, &detach);
12317         if( status < 0 ) status = errno;
12318 #else
12319         status = pthread_attr_setdetachstate(&attr, detach);
12320 #endif
12321         if( status ) return status;
12322         status = pthread_create( &t, &attr, task, NULL );
12323 #if HAVE_PTHREADS < 7
12324         if( status < 0 ) status = errno;
12325 #endif
12326         if( status ) return status;
12327 #else
12328         /* Draft 4 pthreads */
12329         status = pthread_create( &t, pthread_attr_default, task, NULL );
12330         if( status ) return errno;
12331
12332         /* give thread a chance to complete */
12333         /* it should remain joinable and hence detachable */
12334         sleep( 1 );
12335
12336         status = pthread_detach( &t );
12337         if( status ) return errno;
12338 #endif
12339
12340 #ifdef HAVE_LINUX_THREADS
12341         pthread_kill_other_threads_np();
12342 #endif
12343
12344         return 0;
12345
12346   ;
12347   return 0;
12348 }
12349 _ACEOF
12350 if ac_fn_c_try_link "$LINENO"; then :
12351   ol_cv_pthread_lpthread_lmach_lexc=yes
12352 else
12353   ol_cv_pthread_lpthread_lmach_lexc=no
12354 fi
12355 rm -f core conftest.err conftest.$ac_objext \
12356     conftest$ac_exeext conftest.$ac_ext
12357 else
12358   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12359 /* end confdefs.h.  */
12360
12361
12362 /* pthread test headers */
12363 #include <pthread.h>
12364 #if HAVE_PTHREADS < 7
12365 #include <errno.h>
12366 #endif
12367 #ifndef NULL
12368 #define NULL (void*)0
12369 #endif
12370
12371 static void *task(p)
12372         void *p;
12373 {
12374         return (void *) (p == NULL);
12375 }
12376
12377
12378 int main(argc, argv)
12379         int argc;
12380         char **argv;
12381 {
12382
12383         /* pthread test function */
12384 #ifndef PTHREAD_CREATE_DETACHED
12385 #define PTHREAD_CREATE_DETACHED 1
12386 #endif
12387         pthread_t t;
12388         int status;
12389         int detach = PTHREAD_CREATE_DETACHED;
12390
12391 #if HAVE_PTHREADS > 4
12392         /* Final pthreads */
12393         pthread_attr_t attr;
12394
12395         status = pthread_attr_init(&attr);
12396         if( status ) return status;
12397
12398 #if HAVE_PTHREADS < 7
12399         status = pthread_attr_setdetachstate(&attr, &detach);
12400         if( status < 0 ) status = errno;
12401 #else
12402         status = pthread_attr_setdetachstate(&attr, detach);
12403 #endif
12404         if( status ) return status;
12405         status = pthread_create( &t, &attr, task, NULL );
12406 #if HAVE_PTHREADS < 7
12407         if( status < 0 ) status = errno;
12408 #endif
12409         if( status ) return status;
12410 #else
12411         /* Draft 4 pthreads */
12412         status = pthread_create( &t, pthread_attr_default, task, NULL );
12413         if( status ) return errno;
12414
12415         /* give thread a chance to complete */
12416         /* it should remain joinable and hence detachable */
12417         sleep( 1 );
12418
12419         status = pthread_detach( &t );
12420         if( status ) return errno;
12421 #endif
12422
12423 #ifdef HAVE_LINUX_THREADS
12424         pthread_kill_other_threads_np();
12425 #endif
12426
12427         return 0;
12428
12429 }
12430
12431 _ACEOF
12432 if ac_fn_c_try_run "$LINENO"; then :
12433   ol_cv_pthread_lpthread_lmach_lexc=yes
12434 else
12435   ol_cv_pthread_lpthread_lmach_lexc=no
12436 fi
12437 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12438   conftest.$ac_objext conftest.beam conftest.$ac_ext
12439 fi
12440
12441
12442                 # restore the LIBS
12443                 LIBS="$ol_LIBS"
12444
12445 fi
12446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
12447 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
12448
12449         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
12450                 ol_link_pthreads="-lpthread -lmach -lexc"
12451                 ol_link_threads=posix
12452         fi
12453 fi
12454
12455
12456                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
12457 if test "$ol_link_threads" = no ; then
12458         # try -lpthread -Wl,-woff,85
12459         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
12460 $as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
12461 if ${ol_cv_pthread_lib_lpthread_woff+:} false; then :
12462   $as_echo_n "(cached) " >&6
12463 else
12464
12465                 # save the flags
12466                 ol_LIBS="$LIBS"
12467                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
12468
12469                 if test "$cross_compiling" = yes; then :
12470   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12471 /* end confdefs.h.  */
12472
12473 /* pthread test headers */
12474 #include <pthread.h>
12475 #if HAVE_PTHREADS < 7
12476 #include <errno.h>
12477 #endif
12478 #ifndef NULL
12479 #define NULL (void*)0
12480 #endif
12481
12482 static void *task(p)
12483         void *p;
12484 {
12485         return (void *) (p == NULL);
12486 }
12487
12488 int
12489 main ()
12490 {
12491
12492         /* pthread test function */
12493 #ifndef PTHREAD_CREATE_DETACHED
12494 #define PTHREAD_CREATE_DETACHED 1
12495 #endif
12496         pthread_t t;
12497         int status;
12498         int detach = PTHREAD_CREATE_DETACHED;
12499
12500 #if HAVE_PTHREADS > 4
12501         /* Final pthreads */
12502         pthread_attr_t attr;
12503
12504         status = pthread_attr_init(&attr);
12505         if( status ) return status;
12506
12507 #if HAVE_PTHREADS < 7
12508         status = pthread_attr_setdetachstate(&attr, &detach);
12509         if( status < 0 ) status = errno;
12510 #else
12511         status = pthread_attr_setdetachstate(&attr, detach);
12512 #endif
12513         if( status ) return status;
12514         status = pthread_create( &t, &attr, task, NULL );
12515 #if HAVE_PTHREADS < 7
12516         if( status < 0 ) status = errno;
12517 #endif
12518         if( status ) return status;
12519 #else
12520         /* Draft 4 pthreads */
12521         status = pthread_create( &t, pthread_attr_default, task, NULL );
12522         if( status ) return errno;
12523
12524         /* give thread a chance to complete */
12525         /* it should remain joinable and hence detachable */
12526         sleep( 1 );
12527
12528         status = pthread_detach( &t );
12529         if( status ) return errno;
12530 #endif
12531
12532 #ifdef HAVE_LINUX_THREADS
12533         pthread_kill_other_threads_np();
12534 #endif
12535
12536         return 0;
12537
12538   ;
12539   return 0;
12540 }
12541 _ACEOF
12542 if ac_fn_c_try_link "$LINENO"; then :
12543   ol_cv_pthread_lib_lpthread_woff=yes
12544 else
12545   ol_cv_pthread_lib_lpthread_woff=no
12546 fi
12547 rm -f core conftest.err conftest.$ac_objext \
12548     conftest$ac_exeext conftest.$ac_ext
12549 else
12550   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12551 /* end confdefs.h.  */
12552
12553
12554 /* pthread test headers */
12555 #include <pthread.h>
12556 #if HAVE_PTHREADS < 7
12557 #include <errno.h>
12558 #endif
12559 #ifndef NULL
12560 #define NULL (void*)0
12561 #endif
12562
12563 static void *task(p)
12564         void *p;
12565 {
12566         return (void *) (p == NULL);
12567 }
12568
12569
12570 int main(argc, argv)
12571         int argc;
12572         char **argv;
12573 {
12574
12575         /* pthread test function */
12576 #ifndef PTHREAD_CREATE_DETACHED
12577 #define PTHREAD_CREATE_DETACHED 1
12578 #endif
12579         pthread_t t;
12580         int status;
12581         int detach = PTHREAD_CREATE_DETACHED;
12582
12583 #if HAVE_PTHREADS > 4
12584         /* Final pthreads */
12585         pthread_attr_t attr;
12586
12587         status = pthread_attr_init(&attr);
12588         if( status ) return status;
12589
12590 #if HAVE_PTHREADS < 7
12591         status = pthread_attr_setdetachstate(&attr, &detach);
12592         if( status < 0 ) status = errno;
12593 #else
12594         status = pthread_attr_setdetachstate(&attr, detach);
12595 #endif
12596         if( status ) return status;
12597         status = pthread_create( &t, &attr, task, NULL );
12598 #if HAVE_PTHREADS < 7
12599         if( status < 0 ) status = errno;
12600 #endif
12601         if( status ) return status;
12602 #else
12603         /* Draft 4 pthreads */
12604         status = pthread_create( &t, pthread_attr_default, task, NULL );
12605         if( status ) return errno;
12606
12607         /* give thread a chance to complete */
12608         /* it should remain joinable and hence detachable */
12609         sleep( 1 );
12610
12611         status = pthread_detach( &t );
12612         if( status ) return errno;
12613 #endif
12614
12615 #ifdef HAVE_LINUX_THREADS
12616         pthread_kill_other_threads_np();
12617 #endif
12618
12619         return 0;
12620
12621 }
12622
12623 _ACEOF
12624 if ac_fn_c_try_run "$LINENO"; then :
12625   ol_cv_pthread_lib_lpthread_woff=yes
12626 else
12627   ol_cv_pthread_lib_lpthread_woff=no
12628 fi
12629 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12630   conftest.$ac_objext conftest.beam conftest.$ac_ext
12631 fi
12632
12633
12634                 # restore the LIBS
12635                 LIBS="$ol_LIBS"
12636
12637 fi
12638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
12639 $as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
12640
12641         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
12642                 ol_link_pthreads="-lpthread -Wl,-woff,85"
12643                 ol_link_threads=posix
12644         fi
12645 fi
12646
12647
12648                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
12649 if test "$ol_link_threads" = no ; then
12650         # try -lpthread
12651         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
12652 $as_echo_n "checking for pthread link with -lpthread... " >&6; }
12653 if ${ol_cv_pthread_lpthread+:} false; then :
12654   $as_echo_n "(cached) " >&6
12655 else
12656
12657                 # save the flags
12658                 ol_LIBS="$LIBS"
12659                 LIBS="-lpthread $LIBS"
12660
12661                 if test "$cross_compiling" = yes; then :
12662   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12663 /* end confdefs.h.  */
12664
12665 /* pthread test headers */
12666 #include <pthread.h>
12667 #if HAVE_PTHREADS < 7
12668 #include <errno.h>
12669 #endif
12670 #ifndef NULL
12671 #define NULL (void*)0
12672 #endif
12673
12674 static void *task(p)
12675         void *p;
12676 {
12677         return (void *) (p == NULL);
12678 }
12679
12680 int
12681 main ()
12682 {
12683
12684         /* pthread test function */
12685 #ifndef PTHREAD_CREATE_DETACHED
12686 #define PTHREAD_CREATE_DETACHED 1
12687 #endif
12688         pthread_t t;
12689         int status;
12690         int detach = PTHREAD_CREATE_DETACHED;
12691
12692 #if HAVE_PTHREADS > 4
12693         /* Final pthreads */
12694         pthread_attr_t attr;
12695
12696         status = pthread_attr_init(&attr);
12697         if( status ) return status;
12698
12699 #if HAVE_PTHREADS < 7
12700         status = pthread_attr_setdetachstate(&attr, &detach);
12701         if( status < 0 ) status = errno;
12702 #else
12703         status = pthread_attr_setdetachstate(&attr, detach);
12704 #endif
12705         if( status ) return status;
12706         status = pthread_create( &t, &attr, task, NULL );
12707 #if HAVE_PTHREADS < 7
12708         if( status < 0 ) status = errno;
12709 #endif
12710         if( status ) return status;
12711 #else
12712         /* Draft 4 pthreads */
12713         status = pthread_create( &t, pthread_attr_default, task, NULL );
12714         if( status ) return errno;
12715
12716         /* give thread a chance to complete */
12717         /* it should remain joinable and hence detachable */
12718         sleep( 1 );
12719
12720         status = pthread_detach( &t );
12721         if( status ) return errno;
12722 #endif
12723
12724 #ifdef HAVE_LINUX_THREADS
12725         pthread_kill_other_threads_np();
12726 #endif
12727
12728         return 0;
12729
12730   ;
12731   return 0;
12732 }
12733 _ACEOF
12734 if ac_fn_c_try_link "$LINENO"; then :
12735   ol_cv_pthread_lpthread=yes
12736 else
12737   ol_cv_pthread_lpthread=no
12738 fi
12739 rm -f core conftest.err conftest.$ac_objext \
12740     conftest$ac_exeext conftest.$ac_ext
12741 else
12742   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12743 /* end confdefs.h.  */
12744
12745
12746 /* pthread test headers */
12747 #include <pthread.h>
12748 #if HAVE_PTHREADS < 7
12749 #include <errno.h>
12750 #endif
12751 #ifndef NULL
12752 #define NULL (void*)0
12753 #endif
12754
12755 static void *task(p)
12756         void *p;
12757 {
12758         return (void *) (p == NULL);
12759 }
12760
12761
12762 int main(argc, argv)
12763         int argc;
12764         char **argv;
12765 {
12766
12767         /* pthread test function */
12768 #ifndef PTHREAD_CREATE_DETACHED
12769 #define PTHREAD_CREATE_DETACHED 1
12770 #endif
12771         pthread_t t;
12772         int status;
12773         int detach = PTHREAD_CREATE_DETACHED;
12774
12775 #if HAVE_PTHREADS > 4
12776         /* Final pthreads */
12777         pthread_attr_t attr;
12778
12779         status = pthread_attr_init(&attr);
12780         if( status ) return status;
12781
12782 #if HAVE_PTHREADS < 7
12783         status = pthread_attr_setdetachstate(&attr, &detach);
12784         if( status < 0 ) status = errno;
12785 #else
12786         status = pthread_attr_setdetachstate(&attr, detach);
12787 #endif
12788         if( status ) return status;
12789         status = pthread_create( &t, &attr, task, NULL );
12790 #if HAVE_PTHREADS < 7
12791         if( status < 0 ) status = errno;
12792 #endif
12793         if( status ) return status;
12794 #else
12795         /* Draft 4 pthreads */
12796         status = pthread_create( &t, pthread_attr_default, task, NULL );
12797         if( status ) return errno;
12798
12799         /* give thread a chance to complete */
12800         /* it should remain joinable and hence detachable */
12801         sleep( 1 );
12802
12803         status = pthread_detach( &t );
12804         if( status ) return errno;
12805 #endif
12806
12807 #ifdef HAVE_LINUX_THREADS
12808         pthread_kill_other_threads_np();
12809 #endif
12810
12811         return 0;
12812
12813 }
12814
12815 _ACEOF
12816 if ac_fn_c_try_run "$LINENO"; then :
12817   ol_cv_pthread_lpthread=yes
12818 else
12819   ol_cv_pthread_lpthread=no
12820 fi
12821 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12822   conftest.$ac_objext conftest.beam conftest.$ac_ext
12823 fi
12824
12825
12826                 # restore the LIBS
12827                 LIBS="$ol_LIBS"
12828
12829 fi
12830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
12831 $as_echo "$ol_cv_pthread_lpthread" >&6; }
12832
12833         if test $ol_cv_pthread_lpthread = yes ; then
12834                 ol_link_pthreads="-lpthread"
12835                 ol_link_threads=posix
12836         fi
12837 fi
12838
12839                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
12840 if test "$ol_link_threads" = no ; then
12841         # try -lc_r
12842         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
12843 $as_echo_n "checking for pthread link with -lc_r... " >&6; }
12844 if ${ol_cv_pthread_lc_r+:} false; then :
12845   $as_echo_n "(cached) " >&6
12846 else
12847
12848                 # save the flags
12849                 ol_LIBS="$LIBS"
12850                 LIBS="-lc_r $LIBS"
12851
12852                 if test "$cross_compiling" = yes; then :
12853   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12854 /* end confdefs.h.  */
12855
12856 /* pthread test headers */
12857 #include <pthread.h>
12858 #if HAVE_PTHREADS < 7
12859 #include <errno.h>
12860 #endif
12861 #ifndef NULL
12862 #define NULL (void*)0
12863 #endif
12864
12865 static void *task(p)
12866         void *p;
12867 {
12868         return (void *) (p == NULL);
12869 }
12870
12871 int
12872 main ()
12873 {
12874
12875         /* pthread test function */
12876 #ifndef PTHREAD_CREATE_DETACHED
12877 #define PTHREAD_CREATE_DETACHED 1
12878 #endif
12879         pthread_t t;
12880         int status;
12881         int detach = PTHREAD_CREATE_DETACHED;
12882
12883 #if HAVE_PTHREADS > 4
12884         /* Final pthreads */
12885         pthread_attr_t attr;
12886
12887         status = pthread_attr_init(&attr);
12888         if( status ) return status;
12889
12890 #if HAVE_PTHREADS < 7
12891         status = pthread_attr_setdetachstate(&attr, &detach);
12892         if( status < 0 ) status = errno;
12893 #else
12894         status = pthread_attr_setdetachstate(&attr, detach);
12895 #endif
12896         if( status ) return status;
12897         status = pthread_create( &t, &attr, task, NULL );
12898 #if HAVE_PTHREADS < 7
12899         if( status < 0 ) status = errno;
12900 #endif
12901         if( status ) return status;
12902 #else
12903         /* Draft 4 pthreads */
12904         status = pthread_create( &t, pthread_attr_default, task, NULL );
12905         if( status ) return errno;
12906
12907         /* give thread a chance to complete */
12908         /* it should remain joinable and hence detachable */
12909         sleep( 1 );
12910
12911         status = pthread_detach( &t );
12912         if( status ) return errno;
12913 #endif
12914
12915 #ifdef HAVE_LINUX_THREADS
12916         pthread_kill_other_threads_np();
12917 #endif
12918
12919         return 0;
12920
12921   ;
12922   return 0;
12923 }
12924 _ACEOF
12925 if ac_fn_c_try_link "$LINENO"; then :
12926   ol_cv_pthread_lc_r=yes
12927 else
12928   ol_cv_pthread_lc_r=no
12929 fi
12930 rm -f core conftest.err conftest.$ac_objext \
12931     conftest$ac_exeext conftest.$ac_ext
12932 else
12933   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12934 /* end confdefs.h.  */
12935
12936
12937 /* pthread test headers */
12938 #include <pthread.h>
12939 #if HAVE_PTHREADS < 7
12940 #include <errno.h>
12941 #endif
12942 #ifndef NULL
12943 #define NULL (void*)0
12944 #endif
12945
12946 static void *task(p)
12947         void *p;
12948 {
12949         return (void *) (p == NULL);
12950 }
12951
12952
12953 int main(argc, argv)
12954         int argc;
12955         char **argv;
12956 {
12957
12958         /* pthread test function */
12959 #ifndef PTHREAD_CREATE_DETACHED
12960 #define PTHREAD_CREATE_DETACHED 1
12961 #endif
12962         pthread_t t;
12963         int status;
12964         int detach = PTHREAD_CREATE_DETACHED;
12965
12966 #if HAVE_PTHREADS > 4
12967         /* Final pthreads */
12968         pthread_attr_t attr;
12969
12970         status = pthread_attr_init(&attr);
12971         if( status ) return status;
12972
12973 #if HAVE_PTHREADS < 7
12974         status = pthread_attr_setdetachstate(&attr, &detach);
12975         if( status < 0 ) status = errno;
12976 #else
12977         status = pthread_attr_setdetachstate(&attr, detach);
12978 #endif
12979         if( status ) return status;
12980         status = pthread_create( &t, &attr, task, NULL );
12981 #if HAVE_PTHREADS < 7
12982         if( status < 0 ) status = errno;
12983 #endif
12984         if( status ) return status;
12985 #else
12986         /* Draft 4 pthreads */
12987         status = pthread_create( &t, pthread_attr_default, task, NULL );
12988         if( status ) return errno;
12989
12990         /* give thread a chance to complete */
12991         /* it should remain joinable and hence detachable */
12992         sleep( 1 );
12993
12994         status = pthread_detach( &t );
12995         if( status ) return errno;
12996 #endif
12997
12998 #ifdef HAVE_LINUX_THREADS
12999         pthread_kill_other_threads_np();
13000 #endif
13001
13002         return 0;
13003
13004 }
13005
13006 _ACEOF
13007 if ac_fn_c_try_run "$LINENO"; then :
13008   ol_cv_pthread_lc_r=yes
13009 else
13010   ol_cv_pthread_lc_r=no
13011 fi
13012 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13013   conftest.$ac_objext conftest.beam conftest.$ac_ext
13014 fi
13015
13016
13017                 # restore the LIBS
13018                 LIBS="$ol_LIBS"
13019
13020 fi
13021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
13022 $as_echo "$ol_cv_pthread_lc_r" >&6; }
13023
13024         if test $ol_cv_pthread_lc_r = yes ; then
13025                 ol_link_pthreads="-lc_r"
13026                 ol_link_threads=posix
13027         fi
13028 fi
13029
13030
13031                 # Pthread try link: -threads (ol_cv_pthread_threads)
13032 if test "$ol_link_threads" = no ; then
13033         # try -threads
13034         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
13035 $as_echo_n "checking for pthread link with -threads... " >&6; }
13036 if ${ol_cv_pthread_threads+:} false; then :
13037   $as_echo_n "(cached) " >&6
13038 else
13039
13040                 # save the flags
13041                 ol_LIBS="$LIBS"
13042                 LIBS="-threads $LIBS"
13043
13044                 if test "$cross_compiling" = yes; then :
13045   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13046 /* end confdefs.h.  */
13047
13048 /* pthread test headers */
13049 #include <pthread.h>
13050 #if HAVE_PTHREADS < 7
13051 #include <errno.h>
13052 #endif
13053 #ifndef NULL
13054 #define NULL (void*)0
13055 #endif
13056
13057 static void *task(p)
13058         void *p;
13059 {
13060         return (void *) (p == NULL);
13061 }
13062
13063 int
13064 main ()
13065 {
13066
13067         /* pthread test function */
13068 #ifndef PTHREAD_CREATE_DETACHED
13069 #define PTHREAD_CREATE_DETACHED 1
13070 #endif
13071         pthread_t t;
13072         int status;
13073         int detach = PTHREAD_CREATE_DETACHED;
13074
13075 #if HAVE_PTHREADS > 4
13076         /* Final pthreads */
13077         pthread_attr_t attr;
13078
13079         status = pthread_attr_init(&attr);
13080         if( status ) return status;
13081
13082 #if HAVE_PTHREADS < 7
13083         status = pthread_attr_setdetachstate(&attr, &detach);
13084         if( status < 0 ) status = errno;
13085 #else
13086         status = pthread_attr_setdetachstate(&attr, detach);
13087 #endif
13088         if( status ) return status;
13089         status = pthread_create( &t, &attr, task, NULL );
13090 #if HAVE_PTHREADS < 7
13091         if( status < 0 ) status = errno;
13092 #endif
13093         if( status ) return status;
13094 #else
13095         /* Draft 4 pthreads */
13096         status = pthread_create( &t, pthread_attr_default, task, NULL );
13097         if( status ) return errno;
13098
13099         /* give thread a chance to complete */
13100         /* it should remain joinable and hence detachable */
13101         sleep( 1 );
13102
13103         status = pthread_detach( &t );
13104         if( status ) return errno;
13105 #endif
13106
13107 #ifdef HAVE_LINUX_THREADS
13108         pthread_kill_other_threads_np();
13109 #endif
13110
13111         return 0;
13112
13113   ;
13114   return 0;
13115 }
13116 _ACEOF
13117 if ac_fn_c_try_link "$LINENO"; then :
13118   ol_cv_pthread_threads=yes
13119 else
13120   ol_cv_pthread_threads=no
13121 fi
13122 rm -f core conftest.err conftest.$ac_objext \
13123     conftest$ac_exeext conftest.$ac_ext
13124 else
13125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13126 /* end confdefs.h.  */
13127
13128
13129 /* pthread test headers */
13130 #include <pthread.h>
13131 #if HAVE_PTHREADS < 7
13132 #include <errno.h>
13133 #endif
13134 #ifndef NULL
13135 #define NULL (void*)0
13136 #endif
13137
13138 static void *task(p)
13139         void *p;
13140 {
13141         return (void *) (p == NULL);
13142 }
13143
13144
13145 int main(argc, argv)
13146         int argc;
13147         char **argv;
13148 {
13149
13150         /* pthread test function */
13151 #ifndef PTHREAD_CREATE_DETACHED
13152 #define PTHREAD_CREATE_DETACHED 1
13153 #endif
13154         pthread_t t;
13155         int status;
13156         int detach = PTHREAD_CREATE_DETACHED;
13157
13158 #if HAVE_PTHREADS > 4
13159         /* Final pthreads */
13160         pthread_attr_t attr;
13161
13162         status = pthread_attr_init(&attr);
13163         if( status ) return status;
13164
13165 #if HAVE_PTHREADS < 7
13166         status = pthread_attr_setdetachstate(&attr, &detach);
13167         if( status < 0 ) status = errno;
13168 #else
13169         status = pthread_attr_setdetachstate(&attr, detach);
13170 #endif
13171         if( status ) return status;
13172         status = pthread_create( &t, &attr, task, NULL );
13173 #if HAVE_PTHREADS < 7
13174         if( status < 0 ) status = errno;
13175 #endif
13176         if( status ) return status;
13177 #else
13178         /* Draft 4 pthreads */
13179         status = pthread_create( &t, pthread_attr_default, task, NULL );
13180         if( status ) return errno;
13181
13182         /* give thread a chance to complete */
13183         /* it should remain joinable and hence detachable */
13184         sleep( 1 );
13185
13186         status = pthread_detach( &t );
13187         if( status ) return errno;
13188 #endif
13189
13190 #ifdef HAVE_LINUX_THREADS
13191         pthread_kill_other_threads_np();
13192 #endif
13193
13194         return 0;
13195
13196 }
13197
13198 _ACEOF
13199 if ac_fn_c_try_run "$LINENO"; then :
13200   ol_cv_pthread_threads=yes
13201 else
13202   ol_cv_pthread_threads=no
13203 fi
13204 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13205   conftest.$ac_objext conftest.beam conftest.$ac_ext
13206 fi
13207
13208
13209                 # restore the LIBS
13210                 LIBS="$ol_LIBS"
13211
13212 fi
13213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
13214 $as_echo "$ol_cv_pthread_threads" >&6; }
13215
13216         if test $ol_cv_pthread_threads = yes ; then
13217                 ol_link_pthreads="-threads"
13218                 ol_link_threads=posix
13219         fi
13220 fi
13221
13222
13223                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13224 if test "$ol_link_threads" = no ; then
13225         # try -lpthreads -lmach -lexc -lc_r
13226         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13227 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
13228 if ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+:} false; then :
13229   $as_echo_n "(cached) " >&6
13230 else
13231
13232                 # save the flags
13233                 ol_LIBS="$LIBS"
13234                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13235
13236                 if test "$cross_compiling" = yes; then :
13237   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13238 /* end confdefs.h.  */
13239
13240 /* pthread test headers */
13241 #include <pthread.h>
13242 #if HAVE_PTHREADS < 7
13243 #include <errno.h>
13244 #endif
13245 #ifndef NULL
13246 #define NULL (void*)0
13247 #endif
13248
13249 static void *task(p)
13250         void *p;
13251 {
13252         return (void *) (p == NULL);
13253 }
13254
13255 int
13256 main ()
13257 {
13258
13259         /* pthread test function */
13260 #ifndef PTHREAD_CREATE_DETACHED
13261 #define PTHREAD_CREATE_DETACHED 1
13262 #endif
13263         pthread_t t;
13264         int status;
13265         int detach = PTHREAD_CREATE_DETACHED;
13266
13267 #if HAVE_PTHREADS > 4
13268         /* Final pthreads */
13269         pthread_attr_t attr;
13270
13271         status = pthread_attr_init(&attr);
13272         if( status ) return status;
13273
13274 #if HAVE_PTHREADS < 7
13275         status = pthread_attr_setdetachstate(&attr, &detach);
13276         if( status < 0 ) status = errno;
13277 #else
13278         status = pthread_attr_setdetachstate(&attr, detach);
13279 #endif
13280         if( status ) return status;
13281         status = pthread_create( &t, &attr, task, NULL );
13282 #if HAVE_PTHREADS < 7
13283         if( status < 0 ) status = errno;
13284 #endif
13285         if( status ) return status;
13286 #else
13287         /* Draft 4 pthreads */
13288         status = pthread_create( &t, pthread_attr_default, task, NULL );
13289         if( status ) return errno;
13290
13291         /* give thread a chance to complete */
13292         /* it should remain joinable and hence detachable */
13293         sleep( 1 );
13294
13295         status = pthread_detach( &t );
13296         if( status ) return errno;
13297 #endif
13298
13299 #ifdef HAVE_LINUX_THREADS
13300         pthread_kill_other_threads_np();
13301 #endif
13302
13303         return 0;
13304
13305   ;
13306   return 0;
13307 }
13308 _ACEOF
13309 if ac_fn_c_try_link "$LINENO"; then :
13310   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13311 else
13312   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13313 fi
13314 rm -f core conftest.err conftest.$ac_objext \
13315     conftest$ac_exeext conftest.$ac_ext
13316 else
13317   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13318 /* end confdefs.h.  */
13319
13320
13321 /* pthread test headers */
13322 #include <pthread.h>
13323 #if HAVE_PTHREADS < 7
13324 #include <errno.h>
13325 #endif
13326 #ifndef NULL
13327 #define NULL (void*)0
13328 #endif
13329
13330 static void *task(p)
13331         void *p;
13332 {
13333         return (void *) (p == NULL);
13334 }
13335
13336
13337 int main(argc, argv)
13338         int argc;
13339         char **argv;
13340 {
13341
13342         /* pthread test function */
13343 #ifndef PTHREAD_CREATE_DETACHED
13344 #define PTHREAD_CREATE_DETACHED 1
13345 #endif
13346         pthread_t t;
13347         int status;
13348         int detach = PTHREAD_CREATE_DETACHED;
13349
13350 #if HAVE_PTHREADS > 4
13351         /* Final pthreads */
13352         pthread_attr_t attr;
13353
13354         status = pthread_attr_init(&attr);
13355         if( status ) return status;
13356
13357 #if HAVE_PTHREADS < 7
13358         status = pthread_attr_setdetachstate(&attr, &detach);
13359         if( status < 0 ) status = errno;
13360 #else
13361         status = pthread_attr_setdetachstate(&attr, detach);
13362 #endif
13363         if( status ) return status;
13364         status = pthread_create( &t, &attr, task, NULL );
13365 #if HAVE_PTHREADS < 7
13366         if( status < 0 ) status = errno;
13367 #endif
13368         if( status ) return status;
13369 #else
13370         /* Draft 4 pthreads */
13371         status = pthread_create( &t, pthread_attr_default, task, NULL );
13372         if( status ) return errno;
13373
13374         /* give thread a chance to complete */
13375         /* it should remain joinable and hence detachable */
13376         sleep( 1 );
13377
13378         status = pthread_detach( &t );
13379         if( status ) return errno;
13380 #endif
13381
13382 #ifdef HAVE_LINUX_THREADS
13383         pthread_kill_other_threads_np();
13384 #endif
13385
13386         return 0;
13387
13388 }
13389
13390 _ACEOF
13391 if ac_fn_c_try_run "$LINENO"; then :
13392   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13393 else
13394   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13395 fi
13396 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13397   conftest.$ac_objext conftest.beam conftest.$ac_ext
13398 fi
13399
13400
13401                 # restore the LIBS
13402                 LIBS="$ol_LIBS"
13403
13404 fi
13405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
13406 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
13407
13408         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
13409                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
13410                 ol_link_threads=posix
13411         fi
13412 fi
13413
13414                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
13415 if test "$ol_link_threads" = no ; then
13416         # try -lpthreads -lmach -lexc
13417         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
13418 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
13419 if ${ol_cv_pthread_lpthreads_lmach_lexc+:} false; then :
13420   $as_echo_n "(cached) " >&6
13421 else
13422
13423                 # save the flags
13424                 ol_LIBS="$LIBS"
13425                 LIBS="-lpthreads -lmach -lexc $LIBS"
13426
13427                 if test "$cross_compiling" = yes; then :
13428   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13429 /* end confdefs.h.  */
13430
13431 /* pthread test headers */
13432 #include <pthread.h>
13433 #if HAVE_PTHREADS < 7
13434 #include <errno.h>
13435 #endif
13436 #ifndef NULL
13437 #define NULL (void*)0
13438 #endif
13439
13440 static void *task(p)
13441         void *p;
13442 {
13443         return (void *) (p == NULL);
13444 }
13445
13446 int
13447 main ()
13448 {
13449
13450         /* pthread test function */
13451 #ifndef PTHREAD_CREATE_DETACHED
13452 #define PTHREAD_CREATE_DETACHED 1
13453 #endif
13454         pthread_t t;
13455         int status;
13456         int detach = PTHREAD_CREATE_DETACHED;
13457
13458 #if HAVE_PTHREADS > 4
13459         /* Final pthreads */
13460         pthread_attr_t attr;
13461
13462         status = pthread_attr_init(&attr);
13463         if( status ) return status;
13464
13465 #if HAVE_PTHREADS < 7
13466         status = pthread_attr_setdetachstate(&attr, &detach);
13467         if( status < 0 ) status = errno;
13468 #else
13469         status = pthread_attr_setdetachstate(&attr, detach);
13470 #endif
13471         if( status ) return status;
13472         status = pthread_create( &t, &attr, task, NULL );
13473 #if HAVE_PTHREADS < 7
13474         if( status < 0 ) status = errno;
13475 #endif
13476         if( status ) return status;
13477 #else
13478         /* Draft 4 pthreads */
13479         status = pthread_create( &t, pthread_attr_default, task, NULL );
13480         if( status ) return errno;
13481
13482         /* give thread a chance to complete */
13483         /* it should remain joinable and hence detachable */
13484         sleep( 1 );
13485
13486         status = pthread_detach( &t );
13487         if( status ) return errno;
13488 #endif
13489
13490 #ifdef HAVE_LINUX_THREADS
13491         pthread_kill_other_threads_np();
13492 #endif
13493
13494         return 0;
13495
13496   ;
13497   return 0;
13498 }
13499 _ACEOF
13500 if ac_fn_c_try_link "$LINENO"; then :
13501   ol_cv_pthread_lpthreads_lmach_lexc=yes
13502 else
13503   ol_cv_pthread_lpthreads_lmach_lexc=no
13504 fi
13505 rm -f core conftest.err conftest.$ac_objext \
13506     conftest$ac_exeext conftest.$ac_ext
13507 else
13508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13509 /* end confdefs.h.  */
13510
13511
13512 /* pthread test headers */
13513 #include <pthread.h>
13514 #if HAVE_PTHREADS < 7
13515 #include <errno.h>
13516 #endif
13517 #ifndef NULL
13518 #define NULL (void*)0
13519 #endif
13520
13521 static void *task(p)
13522         void *p;
13523 {
13524         return (void *) (p == NULL);
13525 }
13526
13527
13528 int main(argc, argv)
13529         int argc;
13530         char **argv;
13531 {
13532
13533         /* pthread test function */
13534 #ifndef PTHREAD_CREATE_DETACHED
13535 #define PTHREAD_CREATE_DETACHED 1
13536 #endif
13537         pthread_t t;
13538         int status;
13539         int detach = PTHREAD_CREATE_DETACHED;
13540
13541 #if HAVE_PTHREADS > 4
13542         /* Final pthreads */
13543         pthread_attr_t attr;
13544
13545         status = pthread_attr_init(&attr);
13546         if( status ) return status;
13547
13548 #if HAVE_PTHREADS < 7
13549         status = pthread_attr_setdetachstate(&attr, &detach);
13550         if( status < 0 ) status = errno;
13551 #else
13552         status = pthread_attr_setdetachstate(&attr, detach);
13553 #endif
13554         if( status ) return status;
13555         status = pthread_create( &t, &attr, task, NULL );
13556 #if HAVE_PTHREADS < 7
13557         if( status < 0 ) status = errno;
13558 #endif
13559         if( status ) return status;
13560 #else
13561         /* Draft 4 pthreads */
13562         status = pthread_create( &t, pthread_attr_default, task, NULL );
13563         if( status ) return errno;
13564
13565         /* give thread a chance to complete */
13566         /* it should remain joinable and hence detachable */
13567         sleep( 1 );
13568
13569         status = pthread_detach( &t );
13570         if( status ) return errno;
13571 #endif
13572
13573 #ifdef HAVE_LINUX_THREADS
13574         pthread_kill_other_threads_np();
13575 #endif
13576
13577         return 0;
13578
13579 }
13580
13581 _ACEOF
13582 if ac_fn_c_try_run "$LINENO"; then :
13583   ol_cv_pthread_lpthreads_lmach_lexc=yes
13584 else
13585   ol_cv_pthread_lpthreads_lmach_lexc=no
13586 fi
13587 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13588   conftest.$ac_objext conftest.beam conftest.$ac_ext
13589 fi
13590
13591
13592                 # restore the LIBS
13593                 LIBS="$ol_LIBS"
13594
13595 fi
13596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
13597 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
13598
13599         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
13600                 ol_link_pthreads="-lpthreads -lmach -lexc"
13601                 ol_link_threads=posix
13602         fi
13603 fi
13604
13605                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
13606 if test "$ol_link_threads" = no ; then
13607         # try -lpthreads -lexc
13608         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
13609 $as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
13610 if ${ol_cv_pthread_lpthreads_lexc+:} false; then :
13611   $as_echo_n "(cached) " >&6
13612 else
13613
13614                 # save the flags
13615                 ol_LIBS="$LIBS"
13616                 LIBS="-lpthreads -lexc $LIBS"
13617
13618                 if test "$cross_compiling" = yes; then :
13619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13620 /* end confdefs.h.  */
13621
13622 /* pthread test headers */
13623 #include <pthread.h>
13624 #if HAVE_PTHREADS < 7
13625 #include <errno.h>
13626 #endif
13627 #ifndef NULL
13628 #define NULL (void*)0
13629 #endif
13630
13631 static void *task(p)
13632         void *p;
13633 {
13634         return (void *) (p == NULL);
13635 }
13636
13637 int
13638 main ()
13639 {
13640
13641         /* pthread test function */
13642 #ifndef PTHREAD_CREATE_DETACHED
13643 #define PTHREAD_CREATE_DETACHED 1
13644 #endif
13645         pthread_t t;
13646         int status;
13647         int detach = PTHREAD_CREATE_DETACHED;
13648
13649 #if HAVE_PTHREADS > 4
13650         /* Final pthreads */
13651         pthread_attr_t attr;
13652
13653         status = pthread_attr_init(&attr);
13654         if( status ) return status;
13655
13656 #if HAVE_PTHREADS < 7
13657         status = pthread_attr_setdetachstate(&attr, &detach);
13658         if( status < 0 ) status = errno;
13659 #else
13660         status = pthread_attr_setdetachstate(&attr, detach);
13661 #endif
13662         if( status ) return status;
13663         status = pthread_create( &t, &attr, task, NULL );
13664 #if HAVE_PTHREADS < 7
13665         if( status < 0 ) status = errno;
13666 #endif
13667         if( status ) return status;
13668 #else
13669         /* Draft 4 pthreads */
13670         status = pthread_create( &t, pthread_attr_default, task, NULL );
13671         if( status ) return errno;
13672
13673         /* give thread a chance to complete */
13674         /* it should remain joinable and hence detachable */
13675         sleep( 1 );
13676
13677         status = pthread_detach( &t );
13678         if( status ) return errno;
13679 #endif
13680
13681 #ifdef HAVE_LINUX_THREADS
13682         pthread_kill_other_threads_np();
13683 #endif
13684
13685         return 0;
13686
13687   ;
13688   return 0;
13689 }
13690 _ACEOF
13691 if ac_fn_c_try_link "$LINENO"; then :
13692   ol_cv_pthread_lpthreads_lexc=yes
13693 else
13694   ol_cv_pthread_lpthreads_lexc=no
13695 fi
13696 rm -f core conftest.err conftest.$ac_objext \
13697     conftest$ac_exeext conftest.$ac_ext
13698 else
13699   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13700 /* end confdefs.h.  */
13701
13702
13703 /* pthread test headers */
13704 #include <pthread.h>
13705 #if HAVE_PTHREADS < 7
13706 #include <errno.h>
13707 #endif
13708 #ifndef NULL
13709 #define NULL (void*)0
13710 #endif
13711
13712 static void *task(p)
13713         void *p;
13714 {
13715         return (void *) (p == NULL);
13716 }
13717
13718
13719 int main(argc, argv)
13720         int argc;
13721         char **argv;
13722 {
13723
13724         /* pthread test function */
13725 #ifndef PTHREAD_CREATE_DETACHED
13726 #define PTHREAD_CREATE_DETACHED 1
13727 #endif
13728         pthread_t t;
13729         int status;
13730         int detach = PTHREAD_CREATE_DETACHED;
13731
13732 #if HAVE_PTHREADS > 4
13733         /* Final pthreads */
13734         pthread_attr_t attr;
13735
13736         status = pthread_attr_init(&attr);
13737         if( status ) return status;
13738
13739 #if HAVE_PTHREADS < 7
13740         status = pthread_attr_setdetachstate(&attr, &detach);
13741         if( status < 0 ) status = errno;
13742 #else
13743         status = pthread_attr_setdetachstate(&attr, detach);
13744 #endif
13745         if( status ) return status;
13746         status = pthread_create( &t, &attr, task, NULL );
13747 #if HAVE_PTHREADS < 7
13748         if( status < 0 ) status = errno;
13749 #endif
13750         if( status ) return status;
13751 #else
13752         /* Draft 4 pthreads */
13753         status = pthread_create( &t, pthread_attr_default, task, NULL );
13754         if( status ) return errno;
13755
13756         /* give thread a chance to complete */
13757         /* it should remain joinable and hence detachable */
13758         sleep( 1 );
13759
13760         status = pthread_detach( &t );
13761         if( status ) return errno;
13762 #endif
13763
13764 #ifdef HAVE_LINUX_THREADS
13765         pthread_kill_other_threads_np();
13766 #endif
13767
13768         return 0;
13769
13770 }
13771
13772 _ACEOF
13773 if ac_fn_c_try_run "$LINENO"; then :
13774   ol_cv_pthread_lpthreads_lexc=yes
13775 else
13776   ol_cv_pthread_lpthreads_lexc=no
13777 fi
13778 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13779   conftest.$ac_objext conftest.beam conftest.$ac_ext
13780 fi
13781
13782
13783                 # restore the LIBS
13784                 LIBS="$ol_LIBS"
13785
13786 fi
13787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
13788 $as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
13789
13790         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
13791                 ol_link_pthreads="-lpthreads -lexc"
13792                 ol_link_threads=posix
13793         fi
13794 fi
13795
13796
13797                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
13798 if test "$ol_link_threads" = no ; then
13799         # try -lpthreads
13800         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
13801 $as_echo_n "checking for pthread link with -lpthreads... " >&6; }
13802 if ${ol_cv_pthread_lib_lpthreads+:} false; then :
13803   $as_echo_n "(cached) " >&6
13804 else
13805
13806                 # save the flags
13807                 ol_LIBS="$LIBS"
13808                 LIBS="-lpthreads $LIBS"
13809
13810                 if test "$cross_compiling" = yes; then :
13811   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13812 /* end confdefs.h.  */
13813
13814 /* pthread test headers */
13815 #include <pthread.h>
13816 #if HAVE_PTHREADS < 7
13817 #include <errno.h>
13818 #endif
13819 #ifndef NULL
13820 #define NULL (void*)0
13821 #endif
13822
13823 static void *task(p)
13824         void *p;
13825 {
13826         return (void *) (p == NULL);
13827 }
13828
13829 int
13830 main ()
13831 {
13832
13833         /* pthread test function */
13834 #ifndef PTHREAD_CREATE_DETACHED
13835 #define PTHREAD_CREATE_DETACHED 1
13836 #endif
13837         pthread_t t;
13838         int status;
13839         int detach = PTHREAD_CREATE_DETACHED;
13840
13841 #if HAVE_PTHREADS > 4
13842         /* Final pthreads */
13843         pthread_attr_t attr;
13844
13845         status = pthread_attr_init(&attr);
13846         if( status ) return status;
13847
13848 #if HAVE_PTHREADS < 7
13849         status = pthread_attr_setdetachstate(&attr, &detach);
13850         if( status < 0 ) status = errno;
13851 #else
13852         status = pthread_attr_setdetachstate(&attr, detach);
13853 #endif
13854         if( status ) return status;
13855         status = pthread_create( &t, &attr, task, NULL );
13856 #if HAVE_PTHREADS < 7
13857         if( status < 0 ) status = errno;
13858 #endif
13859         if( status ) return status;
13860 #else
13861         /* Draft 4 pthreads */
13862         status = pthread_create( &t, pthread_attr_default, task, NULL );
13863         if( status ) return errno;
13864
13865         /* give thread a chance to complete */
13866         /* it should remain joinable and hence detachable */
13867         sleep( 1 );
13868
13869         status = pthread_detach( &t );
13870         if( status ) return errno;
13871 #endif
13872
13873 #ifdef HAVE_LINUX_THREADS
13874         pthread_kill_other_threads_np();
13875 #endif
13876
13877         return 0;
13878
13879   ;
13880   return 0;
13881 }
13882 _ACEOF
13883 if ac_fn_c_try_link "$LINENO"; then :
13884   ol_cv_pthread_lib_lpthreads=yes
13885 else
13886   ol_cv_pthread_lib_lpthreads=no
13887 fi
13888 rm -f core conftest.err conftest.$ac_objext \
13889     conftest$ac_exeext conftest.$ac_ext
13890 else
13891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13892 /* end confdefs.h.  */
13893
13894
13895 /* pthread test headers */
13896 #include <pthread.h>
13897 #if HAVE_PTHREADS < 7
13898 #include <errno.h>
13899 #endif
13900 #ifndef NULL
13901 #define NULL (void*)0
13902 #endif
13903
13904 static void *task(p)
13905         void *p;
13906 {
13907         return (void *) (p == NULL);
13908 }
13909
13910
13911 int main(argc, argv)
13912         int argc;
13913         char **argv;
13914 {
13915
13916         /* pthread test function */
13917 #ifndef PTHREAD_CREATE_DETACHED
13918 #define PTHREAD_CREATE_DETACHED 1
13919 #endif
13920         pthread_t t;
13921         int status;
13922         int detach = PTHREAD_CREATE_DETACHED;
13923
13924 #if HAVE_PTHREADS > 4
13925         /* Final pthreads */
13926         pthread_attr_t attr;
13927
13928         status = pthread_attr_init(&attr);
13929         if( status ) return status;
13930
13931 #if HAVE_PTHREADS < 7
13932         status = pthread_attr_setdetachstate(&attr, &detach);
13933         if( status < 0 ) status = errno;
13934 #else
13935         status = pthread_attr_setdetachstate(&attr, detach);
13936 #endif
13937         if( status ) return status;
13938         status = pthread_create( &t, &attr, task, NULL );
13939 #if HAVE_PTHREADS < 7
13940         if( status < 0 ) status = errno;
13941 #endif
13942         if( status ) return status;
13943 #else
13944         /* Draft 4 pthreads */
13945         status = pthread_create( &t, pthread_attr_default, task, NULL );
13946         if( status ) return errno;
13947
13948         /* give thread a chance to complete */
13949         /* it should remain joinable and hence detachable */
13950         sleep( 1 );
13951
13952         status = pthread_detach( &t );
13953         if( status ) return errno;
13954 #endif
13955
13956 #ifdef HAVE_LINUX_THREADS
13957         pthread_kill_other_threads_np();
13958 #endif
13959
13960         return 0;
13961
13962 }
13963
13964 _ACEOF
13965 if ac_fn_c_try_run "$LINENO"; then :
13966   ol_cv_pthread_lib_lpthreads=yes
13967 else
13968   ol_cv_pthread_lib_lpthreads=no
13969 fi
13970 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13971   conftest.$ac_objext conftest.beam conftest.$ac_ext
13972 fi
13973
13974
13975                 # restore the LIBS
13976                 LIBS="$ol_LIBS"
13977
13978 fi
13979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
13980 $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
13981
13982         if test $ol_cv_pthread_lib_lpthreads = yes ; then
13983                 ol_link_pthreads="-lpthreads"
13984                 ol_link_threads=posix
13985         fi
13986 fi
13987
13988
13989 { $as_echo "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
13990 $as_echo "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
13991
13992                 if test $ol_link_threads != no ; then
13993                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
13994
13995                                                 save_CPPFLAGS="$CPPFLAGS"
13996                         save_LIBS="$LIBS"
13997                         LIBS="$LTHREAD_LIBS $LIBS"
13998
13999                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14000 do :
14001   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14002 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14003 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14004   cat >>confdefs.h <<_ACEOF
14005 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14006 _ACEOF
14007
14008 fi
14009 done
14010
14011
14012                         if test $ac_cv_func_sched_yield = no &&
14013                            test $ac_cv_func_pthread_yield = no &&
14014                            test $ac_cv_func_thr_yield = no ; then
14015                                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
14016 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
14017 if ${ac_cv_lib_rt_sched_yield+:} false; then :
14018   $as_echo_n "(cached) " >&6
14019 else
14020   ac_check_lib_save_LIBS=$LIBS
14021 LIBS="-lrt  $LIBS"
14022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14023 /* end confdefs.h.  */
14024
14025 /* Override any GCC internal prototype to avoid an error.
14026    Use char because int might match the return type of a GCC
14027    builtin and then its argument prototype would still apply.  */
14028 #ifdef __cplusplus
14029 extern "C"
14030 #endif
14031 char sched_yield ();
14032 int
14033 main ()
14034 {
14035 return sched_yield ();
14036   ;
14037   return 0;
14038 }
14039 _ACEOF
14040 if ac_fn_c_try_link "$LINENO"; then :
14041   ac_cv_lib_rt_sched_yield=yes
14042 else
14043   ac_cv_lib_rt_sched_yield=no
14044 fi
14045 rm -f core conftest.err conftest.$ac_objext \
14046     conftest$ac_exeext conftest.$ac_ext
14047 LIBS=$ac_check_lib_save_LIBS
14048 fi
14049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
14050 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
14051 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
14052   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14053
14054 $as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
14055
14056                                         ac_cv_func_sched_yield=yes
14057 else
14058   ac_cv_func_sched_yield=no
14059 fi
14060
14061                         fi
14062                         if test $ac_cv_func_sched_yield = no &&
14063                            test $ac_cv_func_pthread_yield = no &&
14064                            test "$ac_cv_func_thr_yield" = no ; then
14065                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
14066 $as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
14067                         fi
14068
14069                                                 for ac_func in pthread_kill
14070 do :
14071   ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
14072 if test "x$ac_cv_func_pthread_kill" = xyes; then :
14073   cat >>confdefs.h <<_ACEOF
14074 #define HAVE_PTHREAD_KILL 1
14075 _ACEOF
14076
14077 fi
14078 done
14079
14080
14081                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
14082 $as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
14083 if ${ol_cv_func_pthread_rwlock_destroy+:} false; then :
14084   $as_echo_n "(cached) " >&6
14085 else
14086
14087                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14088 /* end confdefs.h.  */
14089
14090 #include <pthread.h>
14091 pthread_rwlock_t rwlock;
14092
14093 int
14094 main ()
14095 {
14096 pthread_rwlock_destroy(&rwlock);
14097   ;
14098   return 0;
14099 }
14100 _ACEOF
14101 if ac_fn_c_try_link "$LINENO"; then :
14102   ol_cv_func_pthread_rwlock_destroy=yes
14103 else
14104   ol_cv_func_pthread_rwlock_destroy=no
14105 fi
14106 rm -f core conftest.err conftest.$ac_objext \
14107     conftest$ac_exeext conftest.$ac_ext
14108
14109 fi
14110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
14111 $as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
14112                         if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
14113
14114 $as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
14115
14116                         fi
14117
14118                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
14119 $as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
14120 if ${ol_cv_func_pthread_detach+:} false; then :
14121   $as_echo_n "(cached) " >&6
14122 else
14123
14124                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14125 /* end confdefs.h.  */
14126
14127 #include <pthread.h>
14128 #ifndef NULL
14129 #define NULL (void*)0
14130 #endif
14131
14132 int
14133 main ()
14134 {
14135 pthread_detach(NULL);
14136   ;
14137   return 0;
14138 }
14139 _ACEOF
14140 if ac_fn_c_try_link "$LINENO"; then :
14141   ol_cv_func_pthread_detach=yes
14142 else
14143   ol_cv_func_pthread_detach=no
14144 fi
14145 rm -f core conftest.err conftest.$ac_objext \
14146     conftest$ac_exeext conftest.$ac_ext
14147
14148 fi
14149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
14150 $as_echo "$ol_cv_func_pthread_detach" >&6; }
14151
14152                         if test $ol_cv_func_pthread_detach = no ; then
14153                                 as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
14154                         fi
14155
14156
14157 $as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
14158
14159
14160                                                 for ac_func in \
14161                                 pthread_setconcurrency \
14162                                 pthread_getconcurrency \
14163                                 thr_setconcurrency \
14164                                 thr_getconcurrency \
14165
14166 do :
14167   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14168 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14169 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14170   cat >>confdefs.h <<_ACEOF
14171 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14172 _ACEOF
14173
14174 fi
14175 done
14176
14177
14178
14179         for ac_func in pthread_kill_other_threads_np
14180 do :
14181   ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
14182 if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes; then :
14183   cat >>confdefs.h <<_ACEOF
14184 #define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
14185 _ACEOF
14186
14187 fi
14188 done
14189
14190         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
14191 $as_echo_n "checking for LinuxThreads implementation... " >&6; }
14192 if ${ol_cv_sys_linux_threads+:} false; then :
14193   $as_echo_n "(cached) " >&6
14194 else
14195   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14196 fi
14197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
14198 $as_echo "$ol_cv_sys_linux_threads" >&6; }
14199
14200
14201
14202
14203         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
14204 $as_echo_n "checking for LinuxThreads consistency... " >&6; }
14205 if ${ol_cv_linux_threads+:} false; then :
14206   $as_echo_n "(cached) " >&6
14207 else
14208
14209                 if test $ol_cv_header_linux_threads = yes &&
14210                    test $ol_cv_sys_linux_threads = yes; then
14211                         ol_cv_linux_threads=yes
14212                 elif test $ol_cv_header_linux_threads = no &&
14213                      test $ol_cv_sys_linux_threads = no; then
14214                         ol_cv_linux_threads=no
14215                 else
14216                         ol_cv_linux_threads=error
14217                 fi
14218
14219 fi
14220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
14221 $as_echo "$ol_cv_linux_threads" >&6; }
14222
14223
14224                         if test $ol_cv_linux_threads = error; then
14225                                 as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
14226                         fi
14227
14228                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
14229 $as_echo_n "checking if pthread_create() works... " >&6; }
14230 if ${ol_cv_pthread_create_works+:} false; then :
14231   $as_echo_n "(cached) " >&6
14232 else
14233
14234                         if test "$cross_compiling" = yes; then :
14235                                 ol_cv_pthread_create_works=yes
14236 else
14237   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14238 /* end confdefs.h.  */
14239
14240
14241 /* pthread test headers */
14242 #include <pthread.h>
14243 #if HAVE_PTHREADS < 7
14244 #include <errno.h>
14245 #endif
14246 #ifndef NULL
14247 #define NULL (void*)0
14248 #endif
14249
14250 static void *task(p)
14251         void *p;
14252 {
14253         return (void *) (p == NULL);
14254 }
14255
14256
14257 int main(argc, argv)
14258         int argc;
14259         char **argv;
14260 {
14261
14262         /* pthread test function */
14263 #ifndef PTHREAD_CREATE_DETACHED
14264 #define PTHREAD_CREATE_DETACHED 1
14265 #endif
14266         pthread_t t;
14267         int status;
14268         int detach = PTHREAD_CREATE_DETACHED;
14269
14270 #if HAVE_PTHREADS > 4
14271         /* Final pthreads */
14272         pthread_attr_t attr;
14273
14274         status = pthread_attr_init(&attr);
14275         if( status ) return status;
14276
14277 #if HAVE_PTHREADS < 7
14278         status = pthread_attr_setdetachstate(&attr, &detach);
14279         if( status < 0 ) status = errno;
14280 #else
14281         status = pthread_attr_setdetachstate(&attr, detach);
14282 #endif
14283         if( status ) return status;
14284         status = pthread_create( &t, &attr, task, NULL );
14285 #if HAVE_PTHREADS < 7
14286         if( status < 0 ) status = errno;
14287 #endif
14288         if( status ) return status;
14289 #else
14290         /* Draft 4 pthreads */
14291         status = pthread_create( &t, pthread_attr_default, task, NULL );
14292         if( status ) return errno;
14293
14294         /* give thread a chance to complete */
14295         /* it should remain joinable and hence detachable */
14296         sleep( 1 );
14297
14298         status = pthread_detach( &t );
14299         if( status ) return errno;
14300 #endif
14301
14302 #ifdef HAVE_LINUX_THREADS
14303         pthread_kill_other_threads_np();
14304 #endif
14305
14306         return 0;
14307
14308 }
14309
14310 _ACEOF
14311 if ac_fn_c_try_run "$LINENO"; then :
14312   ol_cv_pthread_create_works=yes
14313 else
14314   ol_cv_pthread_create_works=no
14315 fi
14316 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14317   conftest.$ac_objext conftest.beam conftest.$ac_ext
14318 fi
14319
14320 fi
14321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
14322 $as_echo "$ol_cv_pthread_create_works" >&6; }
14323
14324                         if test $ol_cv_pthread_create_works = no ; then
14325                                 as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
14326                         fi
14327
14328                         ol_replace_broken_yield=no
14329
14330                         if test $ol_replace_broken_yield = yes ; then
14331
14332 $as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
14333
14334                         fi
14335
14336                                                 if test x$ol_with_yielding_select = xauto ; then
14337                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
14338 $as_echo_n "checking if select yields when using pthreads... " >&6; }
14339 if ${ol_cv_pthread_select_yields+:} false; then :
14340   $as_echo_n "(cached) " >&6
14341 else
14342
14343                                 if test "$cross_compiling" = yes; then :
14344   ol_cv_pthread_select_yields=cross
14345 else
14346   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14347 /* end confdefs.h.  */
14348
14349 #include <sys/types.h>
14350 #include <sys/time.h>
14351 #include <unistd.h>
14352 #include <pthread.h>
14353 #ifndef NULL
14354 #define NULL (void*) 0
14355 #endif
14356
14357 static int fildes[2];
14358
14359 static void *task(p)
14360         void *p;
14361 {
14362         int i;
14363         struct timeval tv;
14364
14365         fd_set rfds;
14366
14367         tv.tv_sec=10;
14368         tv.tv_usec=0;
14369
14370         FD_ZERO(&rfds);
14371         FD_SET(fildes[0], &rfds);
14372
14373         /* we're not interested in any fds */
14374         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
14375
14376         if(i < 0) {
14377                 perror("select");
14378                 exit(10);
14379         }
14380
14381         exit(0); /* if we exit here, the select blocked the whole process */
14382 }
14383
14384 int main(argc, argv)
14385         int argc;
14386         char **argv;
14387 {
14388         pthread_t t;
14389
14390         /* create a pipe to select */
14391         if(pipe(&fildes[0])) {
14392                 perror("select");
14393                 exit(1);
14394         }
14395
14396 #ifdef HAVE_PTHREAD_SETCONCURRENCY
14397         (void) pthread_setconcurrency(2);
14398 #else
14399 #ifdef HAVE_THR_SETCONCURRENCY
14400         /* Set Solaris LWP concurrency to 2 */
14401         thr_setconcurrency(2);
14402 #endif
14403 #endif
14404
14405 #if HAVE_PTHREADS < 6
14406         pthread_create(&t, pthread_attr_default, task, NULL);
14407 #else
14408         pthread_create(&t, NULL, task, NULL);
14409 #endif
14410
14411         /* make sure task runs first */
14412 #ifdef HAVE_THR_YIELD
14413         thr_yield();
14414 #elif defined( HAVE_SCHED_YIELD )
14415         sched_yield();
14416 #elif defined( HAVE_PTHREAD_YIELD )
14417         pthread_yield();
14418 #endif
14419
14420         exit(2);
14421 }
14422 _ACEOF
14423 if ac_fn_c_try_run "$LINENO"; then :
14424   ol_cv_pthread_select_yields=no
14425 else
14426   ol_cv_pthread_select_yields=yes
14427 fi
14428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14429   conftest.$ac_objext conftest.beam conftest.$ac_ext
14430 fi
14431
14432 fi
14433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
14434 $as_echo "$ol_cv_pthread_select_yields" >&6; }
14435
14436                                 if test $ol_cv_pthread_select_yields = cross ; then
14437                                         as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
14438                                 fi
14439
14440                                 if test $ol_cv_pthread_select_yields = yes ; then
14441                                         ol_with_yielding_select=yes
14442                                 fi
14443                         fi
14444
14445                                                 CPPFLAGS="$save_CPPFLAGS"
14446                         LIBS="$save_LIBS"
14447                 else
14448                         as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
14449                 fi
14450         fi
14451
14452         if test $ol_with_threads = posix ; then
14453                 as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
14454         fi
14455         ;;
14456 esac
14457
14458 case $ol_with_threads in auto | yes | mach)
14459
14460                 for ac_header in mach/cthreads.h cthreads.h
14461 do :
14462   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14463 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14464 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14465   cat >>confdefs.h <<_ACEOF
14466 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14467 _ACEOF
14468
14469 fi
14470
14471 done
14472
14473         if test $ac_cv_header_mach_cthreads_h = yes ; then
14474                 ol_with_threads=found
14475
14476                                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
14477 if test "x$ac_cv_func_cthread_fork" = xyes; then :
14478   ol_link_threads=yes
14479 fi
14480
14481
14482                 if test $ol_link_threads = no ; then
14483                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
14484 $as_echo_n "checking for cthread_fork with -all_load... " >&6; }
14485 if ${ol_cv_cthread_all_load+:} false; then :
14486   $as_echo_n "(cached) " >&6
14487 else
14488
14489                                                                 save_LIBS="$LIBS"
14490                                 LIBS="-all_load $LIBS"
14491                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14492 /* end confdefs.h.  */
14493 #include <mach/cthreads.h>
14494 int
14495 main ()
14496 {
14497
14498                                         cthread_fork((void *)0, (void *)0);
14499
14500   ;
14501   return 0;
14502 }
14503 _ACEOF
14504 if ac_fn_c_try_link "$LINENO"; then :
14505   ol_cv_cthread_all_load=yes
14506 else
14507   ol_cv_cthread_all_load=no
14508 fi
14509 rm -f core conftest.err conftest.$ac_objext \
14510     conftest$ac_exeext conftest.$ac_ext
14511                                                                 LIBS="$save_LIBS"
14512
14513 fi
14514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
14515 $as_echo "$ol_cv_cthread_all_load" >&6; }
14516
14517                         if test $ol_cv_cthread_all_load = yes ; then
14518                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
14519                                 ol_link_threads=mach
14520                                 ol_with_threads=found
14521                         fi
14522                 fi
14523
14524         elif test $ac_cv_header_cthreads_h = yes ; then
14525
14526                 ol_with_threads=found
14527
14528                                 save_LIBS="$LIBS"
14529                 LIBS="$LIBS -lthreads"
14530                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
14531 if test "x$ac_cv_func_cthread_fork" = xyes; then :
14532   ol_link_threads=yes
14533 fi
14534
14535                 LIBS="$save_LIBS"
14536
14537                 if test $ol_link_threads = yes ; then
14538                         LTHREAD_LIBS="-lthreads"
14539                         ol_link_threads=mach
14540                         ol_with_threads=found
14541                 else
14542                         as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
14543                 fi
14544
14545         elif test $ol_with_threads = mach ; then
14546                 as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
14547         fi
14548
14549         if test $ol_link_threads = mach ; then
14550
14551 $as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
14552
14553         elif test $ol_with_threads = found ; then
14554                 as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
14555         fi
14556         ;;
14557 esac
14558
14559 case $ol_with_threads in auto | yes | pth)
14560
14561         for ac_header in pth.h
14562 do :
14563   ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
14564 if test "x$ac_cv_header_pth_h" = xyes; then :
14565   cat >>confdefs.h <<_ACEOF
14566 #define HAVE_PTH_H 1
14567 _ACEOF
14568
14569 fi
14570
14571 done
14572
14573
14574         if test $ac_cv_header_pth_h = yes ; then
14575                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
14576 $as_echo_n "checking for pth_version in -lpth... " >&6; }
14577 if ${ac_cv_lib_pth_pth_version+:} false; then :
14578   $as_echo_n "(cached) " >&6
14579 else
14580   ac_check_lib_save_LIBS=$LIBS
14581 LIBS="-lpth  $LIBS"
14582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14583 /* end confdefs.h.  */
14584
14585 /* Override any GCC internal prototype to avoid an error.
14586    Use char because int might match the return type of a GCC
14587    builtin and then its argument prototype would still apply.  */
14588 #ifdef __cplusplus
14589 extern "C"
14590 #endif
14591 char pth_version ();
14592 int
14593 main ()
14594 {
14595 return pth_version ();
14596   ;
14597   return 0;
14598 }
14599 _ACEOF
14600 if ac_fn_c_try_link "$LINENO"; then :
14601   ac_cv_lib_pth_pth_version=yes
14602 else
14603   ac_cv_lib_pth_pth_version=no
14604 fi
14605 rm -f core conftest.err conftest.$ac_objext \
14606     conftest$ac_exeext conftest.$ac_ext
14607 LIBS=$ac_check_lib_save_LIBS
14608 fi
14609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
14610 $as_echo "$ac_cv_lib_pth_pth_version" >&6; }
14611 if test "x$ac_cv_lib_pth_pth_version" = xyes; then :
14612   have_pth=yes
14613 else
14614   have_pth=no
14615 fi
14616
14617
14618                 if test $have_pth = yes ; then
14619
14620 $as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
14621
14622                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
14623                         ol_link_threads=pth
14624                         ol_with_threads=found
14625
14626                         if test x$ol_with_yielding_select = xauto ; then
14627                                 ol_with_yielding_select=yes
14628                         fi
14629                 fi
14630         fi
14631         ;;
14632 esac
14633
14634 case $ol_with_threads in auto | yes | lwp)
14635
14636                 for ac_header in thread.h synch.h
14637 do :
14638   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14639 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14640 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14641   cat >>confdefs.h <<_ACEOF
14642 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14643 _ACEOF
14644
14645 fi
14646
14647 done
14648
14649         if test $ac_cv_header_thread_h = yes &&
14650            test $ac_cv_header_synch_h = yes ; then
14651                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
14652 $as_echo_n "checking for thr_create in -lthread... " >&6; }
14653 if ${ac_cv_lib_thread_thr_create+:} false; then :
14654   $as_echo_n "(cached) " >&6
14655 else
14656   ac_check_lib_save_LIBS=$LIBS
14657 LIBS="-lthread  $LIBS"
14658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14659 /* end confdefs.h.  */
14660
14661 /* Override any GCC internal prototype to avoid an error.
14662    Use char because int might match the return type of a GCC
14663    builtin and then its argument prototype would still apply.  */
14664 #ifdef __cplusplus
14665 extern "C"
14666 #endif
14667 char thr_create ();
14668 int
14669 main ()
14670 {
14671 return thr_create ();
14672   ;
14673   return 0;
14674 }
14675 _ACEOF
14676 if ac_fn_c_try_link "$LINENO"; then :
14677   ac_cv_lib_thread_thr_create=yes
14678 else
14679   ac_cv_lib_thread_thr_create=no
14680 fi
14681 rm -f core conftest.err conftest.$ac_objext \
14682     conftest$ac_exeext conftest.$ac_ext
14683 LIBS=$ac_check_lib_save_LIBS
14684 fi
14685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
14686 $as_echo "$ac_cv_lib_thread_thr_create" >&6; }
14687 if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
14688   have_thr=yes
14689 else
14690   have_thr=no
14691 fi
14692
14693
14694                 if test $have_thr = yes ; then
14695
14696 $as_echo "#define HAVE_THR 1" >>confdefs.h
14697
14698                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
14699                         ol_link_threads=thr
14700
14701                         if test x$ol_with_yielding_select = xauto ; then
14702                                 ol_with_yielding_select=yes
14703                         fi
14704
14705                                                 for ac_func in \
14706                                 thr_setconcurrency \
14707                                 thr_getconcurrency \
14708
14709 do :
14710   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14711 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14712 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14713   cat >>confdefs.h <<_ACEOF
14714 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14715 _ACEOF
14716
14717 fi
14718 done
14719
14720                 fi
14721         fi
14722
14723                 for ac_header in lwp/lwp.h
14724 do :
14725   ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
14726 if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
14727   cat >>confdefs.h <<_ACEOF
14728 #define HAVE_LWP_LWP_H 1
14729 _ACEOF
14730
14731 fi
14732
14733 done
14734
14735         if test $ac_cv_header_lwp_lwp_h = yes ; then
14736                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
14737 $as_echo_n "checking for lwp_create in -llwp... " >&6; }
14738 if ${ac_cv_lib_lwp_lwp_create+:} false; then :
14739   $as_echo_n "(cached) " >&6
14740 else
14741   ac_check_lib_save_LIBS=$LIBS
14742 LIBS="-llwp  $LIBS"
14743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14744 /* end confdefs.h.  */
14745
14746 /* Override any GCC internal prototype to avoid an error.
14747    Use char because int might match the return type of a GCC
14748    builtin and then its argument prototype would still apply.  */
14749 #ifdef __cplusplus
14750 extern "C"
14751 #endif
14752 char lwp_create ();
14753 int
14754 main ()
14755 {
14756 return lwp_create ();
14757   ;
14758   return 0;
14759 }
14760 _ACEOF
14761 if ac_fn_c_try_link "$LINENO"; then :
14762   ac_cv_lib_lwp_lwp_create=yes
14763 else
14764   ac_cv_lib_lwp_lwp_create=no
14765 fi
14766 rm -f core conftest.err conftest.$ac_objext \
14767     conftest$ac_exeext conftest.$ac_ext
14768 LIBS=$ac_check_lib_save_LIBS
14769 fi
14770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
14771 $as_echo "$ac_cv_lib_lwp_lwp_create" >&6; }
14772 if test "x$ac_cv_lib_lwp_lwp_create" = xyes; then :
14773   have_lwp=yes
14774 else
14775   have_lwp=no
14776 fi
14777
14778
14779                 if test $have_lwp = yes ; then
14780
14781 $as_echo "#define HAVE_LWP 1" >>confdefs.h
14782
14783                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
14784                         ol_link_threads=lwp
14785
14786                         if test x$ol_with_yielding_select = xauto ; then
14787                                 ol_with_yielding_select=no
14788                         fi
14789                 fi
14790         fi
14791         ;;
14792 esac
14793
14794 if test $ol_with_yielding_select = yes ; then
14795
14796 $as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
14797
14798 fi
14799
14800 if test $ol_with_threads = manual ; then
14801                 ol_link_threads=yes
14802
14803         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
14804 $as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
14805
14806         for ac_header in pthread.h sched.h
14807 do :
14808   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14809 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14810 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14811   cat >>confdefs.h <<_ACEOF
14812 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14813 _ACEOF
14814
14815 fi
14816
14817 done
14818
14819         for ac_func in sched_yield pthread_yield
14820 do :
14821   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14822 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14823 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14824   cat >>confdefs.h <<_ACEOF
14825 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14826 _ACEOF
14827
14828 fi
14829 done
14830
14831
14832         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
14833 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
14834 if ${ol_cv_header_linux_threads+:} false; then :
14835   $as_echo_n "(cached) " >&6
14836 else
14837   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14838 /* end confdefs.h.  */
14839 #include <pthread.h>
14840 _ACEOF
14841 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14842   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
14843   ol_cv_header_linux_threads=yes
14844 else
14845   ol_cv_header_linux_threads=no
14846 fi
14847 rm -f conftest*
14848
14849
14850 fi
14851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
14852 $as_echo "$ol_cv_header_linux_threads" >&6; }
14853         if test $ol_cv_header_linux_threads = yes; then
14854
14855 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
14856
14857         fi
14858
14859
14860         for ac_header in mach/cthreads.h
14861 do :
14862   ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
14863 if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
14864   cat >>confdefs.h <<_ACEOF
14865 #define HAVE_MACH_CTHREADS_H 1
14866 _ACEOF
14867
14868 fi
14869
14870 done
14871
14872         for ac_header in lwp/lwp.h
14873 do :
14874   ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
14875 if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
14876   cat >>confdefs.h <<_ACEOF
14877 #define HAVE_LWP_LWP_H 1
14878 _ACEOF
14879
14880 fi
14881
14882 done
14883
14884         for ac_header in thread.h synch.h
14885 do :
14886   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14887 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14888 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14889   cat >>confdefs.h <<_ACEOF
14890 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14891 _ACEOF
14892
14893 fi
14894
14895 done
14896
14897 fi
14898
14899 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
14900
14901 $as_echo "#define REENTRANT 1" >>confdefs.h
14902
14903
14904 $as_echo "#define _REENTRANT 1" >>confdefs.h
14905
14906
14907 $as_echo "#define THREAD_SAFE 1" >>confdefs.h
14908
14909
14910 $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
14911
14912
14913 $as_echo "#define THREADSAFE 1" >>confdefs.h
14914
14915
14916 $as_echo "#define _THREADSAFE 1" >>confdefs.h
14917
14918
14919 $as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
14920
14921
14922                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
14923 $as_echo_n "checking for thread specific errno... " >&6; }
14924 if ${ol_cv_errno_thread_specific+:} false; then :
14925   $as_echo_n "(cached) " >&6
14926 else
14927
14928                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14929 /* end confdefs.h.  */
14930 #include <errno.h>
14931 int
14932 main ()
14933 {
14934 errno = 0;
14935   ;
14936   return 0;
14937 }
14938 _ACEOF
14939 if ac_fn_c_try_link "$LINENO"; then :
14940   ol_cv_errno_thread_specific=yes
14941 else
14942   ol_cv_errno_thread_specific=no
14943 fi
14944 rm -f core conftest.err conftest.$ac_objext \
14945     conftest$ac_exeext conftest.$ac_ext
14946
14947 fi
14948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
14949 $as_echo "$ol_cv_errno_thread_specific" >&6; }
14950
14951                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
14952 $as_echo_n "checking for thread specific h_errno... " >&6; }
14953 if ${ol_cv_h_errno_thread_specific+:} false; then :
14954   $as_echo_n "(cached) " >&6
14955 else
14956
14957                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14958 /* end confdefs.h.  */
14959 #include <netdb.h>
14960 int
14961 main ()
14962 {
14963 h_errno = 0;
14964   ;
14965   return 0;
14966 }
14967 _ACEOF
14968 if ac_fn_c_try_link "$LINENO"; then :
14969   ol_cv_h_errno_thread_specific=yes
14970 else
14971   ol_cv_h_errno_thread_specific=no
14972 fi
14973 rm -f core conftest.err conftest.$ac_objext \
14974     conftest$ac_exeext conftest.$ac_ext
14975
14976 fi
14977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
14978 $as_echo "$ol_cv_h_errno_thread_specific" >&6; }
14979
14980         if test $ol_cv_errno_thread_specific != yes ||
14981            test $ol_cv_h_errno_thread_specific != yes ; then
14982                 LIBS="$LTHREAD_LIBS $LIBS"
14983                 LTHREAD_LIBS=""
14984         fi
14985
14986 fi
14987
14988 if test $ol_link_threads = no ; then
14989         if test $ol_with_threads = yes ; then
14990                 as_fn_error $? "no suitable thread support" "$LINENO" 5
14991         fi
14992
14993         if test $ol_with_threads = auto ; then
14994                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
14995 $as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
14996                 ol_with_threads=no
14997         fi
14998
14999
15000 $as_echo "#define NO_THREADS 1" >>confdefs.h
15001
15002         LTHREAD_LIBS=""
15003         BUILD_THREAD=no
15004 else
15005         BUILD_THREAD=yes
15006 fi
15007
15008 if test $ol_link_threads != no ; then
15009
15010 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
15011
15012 fi
15013
15014 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
15015 case "$ol_with_threads" in
15016  no)
15017     ol_pthread_ok=no
15018
15019     ;;
15020  *)
15021     ol_found_pthreads=yes
15022     ;;
15023 esac
15024
15025 ac_ext=c
15026 ac_cpp='$CPP $CPPFLAGS'
15027 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15028 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15029 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15030
15031
15032
15033
15034
15035
15036     case "$ol_found_pthreads" in
15037      yes)
15038         saved_LIBS="$LIBS"
15039         LIBS="$LTHREAD_LIBS $LIBS"
15040         saved_CFLAGS="$CFLAGS"
15041         CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
15042         for ac_func in sem_timedwait
15043 do :
15044   ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
15045 if test "x$ac_cv_func_sem_timedwait" = xyes; then :
15046   cat >>confdefs.h <<_ACEOF
15047 #define HAVE_SEM_TIMEDWAIT 1
15048 _ACEOF
15049
15050 fi
15051 done
15052
15053         LIBS="$saved_LIBS"
15054         { saved_LIBS=; unset saved_LIBS;}
15055         CFLAGS="$saved_CFLAGS"
15056         { saved_CFLAGS=; unset saved_CFLAGS;}
15057         case "$ac_cv_func_sem_timedwait" in
15058          yes)
15059             PTHREAD_LIBS="$LTHREAD_LIBS"
15060             have_pthreads=yes
15061         esac
15062     esac
15063 esac
15064
15065 case "$have_pthreads" in
15066  yes)
15067     CFLAGS_NTP="$CFLAGS_NTP $PTHREAD_CFLAGS"
15068     saved_LIBS="$LIBS"
15069     LIBS="$LTHREAD_LIBS $LIBS"
15070     saved_CFLAGS="$CFLAGS"
15071     CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
15072     # The cast to long int works around a bug in the HP C Compiler
15073 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15074 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15075 # This bug is HP SR number 8606223364.
15076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
15077 $as_echo_n "checking size of pthread_t... " >&6; }
15078 if ${ac_cv_sizeof_pthread_t+:} false; then :
15079   $as_echo_n "(cached) " >&6
15080 else
15081   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "
15082             $ac_includes_default
15083             #include <pthread.h>
15084
15085
15086 "; then :
15087
15088 else
15089   if test "$ac_cv_type_pthread_t" = yes; then
15090      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15091 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15092 as_fn_error 77 "cannot compute sizeof (pthread_t)
15093 See \`config.log' for more details" "$LINENO" 5; }
15094    else
15095      ac_cv_sizeof_pthread_t=0
15096    fi
15097 fi
15098
15099 fi
15100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
15101 $as_echo "$ac_cv_sizeof_pthread_t" >&6; }
15102
15103
15104
15105 cat >>confdefs.h <<_ACEOF
15106 #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
15107 _ACEOF
15108
15109
15110     LIBISC_PTHREADS_NOTHREADS=pthreads
15111
15112 $as_echo "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
15113
15114     #
15115     # We'd like to use sigwait() too
15116     #
15117     ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
15118 if test "x$ac_cv_func_sigwait" = xyes; then :
15119   have_sigwait=yes
15120 else
15121   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
15122 $as_echo_n "checking for sigwait in -lc... " >&6; }
15123 if ${ac_cv_lib_c_sigwait+:} false; then :
15124   $as_echo_n "(cached) " >&6
15125 else
15126   ac_check_lib_save_LIBS=$LIBS
15127 LIBS="-lc  $LIBS"
15128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15129 /* end confdefs.h.  */
15130
15131 /* Override any GCC internal prototype to avoid an error.
15132    Use char because int might match the return type of a GCC
15133    builtin and then its argument prototype would still apply.  */
15134 #ifdef __cplusplus
15135 extern "C"
15136 #endif
15137 char sigwait ();
15138 int
15139 main ()
15140 {
15141 return sigwait ();
15142   ;
15143   return 0;
15144 }
15145 _ACEOF
15146 if ac_fn_c_try_link "$LINENO"; then :
15147   ac_cv_lib_c_sigwait=yes
15148 else
15149   ac_cv_lib_c_sigwait=no
15150 fi
15151 rm -f core conftest.err conftest.$ac_objext \
15152     conftest$ac_exeext conftest.$ac_ext
15153 LIBS=$ac_check_lib_save_LIBS
15154 fi
15155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
15156 $as_echo "$ac_cv_lib_c_sigwait" >&6; }
15157 if test "x$ac_cv_lib_c_sigwait" = xyes; then :
15158   have_sigwait=yes
15159 else
15160   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
15161 $as_echo_n "checking for sigwait in -lpthread... " >&6; }
15162 if ${ac_cv_lib_pthread_sigwait+:} false; then :
15163   $as_echo_n "(cached) " >&6
15164 else
15165   ac_check_lib_save_LIBS=$LIBS
15166 LIBS="-lpthread  $LIBS"
15167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15168 /* end confdefs.h.  */
15169
15170 /* Override any GCC internal prototype to avoid an error.
15171    Use char because int might match the return type of a GCC
15172    builtin and then its argument prototype would still apply.  */
15173 #ifdef __cplusplus
15174 extern "C"
15175 #endif
15176 char sigwait ();
15177 int
15178 main ()
15179 {
15180 return sigwait ();
15181   ;
15182   return 0;
15183 }
15184 _ACEOF
15185 if ac_fn_c_try_link "$LINENO"; then :
15186   ac_cv_lib_pthread_sigwait=yes
15187 else
15188   ac_cv_lib_pthread_sigwait=no
15189 fi
15190 rm -f core conftest.err conftest.$ac_objext \
15191     conftest$ac_exeext conftest.$ac_ext
15192 LIBS=$ac_check_lib_save_LIBS
15193 fi
15194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
15195 $as_echo "$ac_cv_lib_pthread_sigwait" >&6; }
15196 if test "x$ac_cv_lib_pthread_sigwait" = xyes; then :
15197   have_sigwait=yes
15198 else
15199   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
15200 $as_echo_n "checking for _Psigwait in -lpthread... " >&6; }
15201 if ${ac_cv_lib_pthread__Psigwait+:} false; then :
15202   $as_echo_n "(cached) " >&6
15203 else
15204   ac_check_lib_save_LIBS=$LIBS
15205 LIBS="-lpthread  $LIBS"
15206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15207 /* end confdefs.h.  */
15208
15209 /* Override any GCC internal prototype to avoid an error.
15210    Use char because int might match the return type of a GCC
15211    builtin and then its argument prototype would still apply.  */
15212 #ifdef __cplusplus
15213 extern "C"
15214 #endif
15215 char _Psigwait ();
15216 int
15217 main ()
15218 {
15219 return _Psigwait ();
15220   ;
15221   return 0;
15222 }
15223 _ACEOF
15224 if ac_fn_c_try_link "$LINENO"; then :
15225   ac_cv_lib_pthread__Psigwait=yes
15226 else
15227   ac_cv_lib_pthread__Psigwait=no
15228 fi
15229 rm -f core conftest.err conftest.$ac_objext \
15230     conftest$ac_exeext conftest.$ac_ext
15231 LIBS=$ac_check_lib_save_LIBS
15232 fi
15233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
15234 $as_echo "$ac_cv_lib_pthread__Psigwait" >&6; }
15235 if test "x$ac_cv_lib_pthread__Psigwait" = xyes; then :
15236   have_sigwait=yes
15237 else
15238   have_sigwait=no
15239
15240 fi
15241
15242
15243 fi
15244
15245
15246 fi
15247
15248
15249 fi
15250
15251     case "$host:$have_sigwait" in
15252      *-freebsd*:no)
15253         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
15254 $as_echo_n "checking for sigwait in -lc_r... " >&6; }
15255 if ${ac_cv_lib_c_r_sigwait+:} false; then :
15256   $as_echo_n "(cached) " >&6
15257 else
15258   ac_check_lib_save_LIBS=$LIBS
15259 LIBS="-lc_r  $LIBS"
15260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15261 /* end confdefs.h.  */
15262
15263 /* Override any GCC internal prototype to avoid an error.
15264    Use char because int might match the return type of a GCC
15265    builtin and then its argument prototype would still apply.  */
15266 #ifdef __cplusplus
15267 extern "C"
15268 #endif
15269 char sigwait ();
15270 int
15271 main ()
15272 {
15273 return sigwait ();
15274   ;
15275   return 0;
15276 }
15277 _ACEOF
15278 if ac_fn_c_try_link "$LINENO"; then :
15279   ac_cv_lib_c_r_sigwait=yes
15280 else
15281   ac_cv_lib_c_r_sigwait=no
15282 fi
15283 rm -f core conftest.err conftest.$ac_objext \
15284     conftest$ac_exeext conftest.$ac_ext
15285 LIBS=$ac_check_lib_save_LIBS
15286 fi
15287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
15288 $as_echo "$ac_cv_lib_c_r_sigwait" >&6; }
15289 if test "x$ac_cv_lib_c_r_sigwait" = xyes; then :
15290   have_sigwait=yes
15291
15292 fi
15293
15294     esac
15295     case "$have_sigwait" in
15296      yes)
15297         ac_cv_func_sigwait=yes
15298
15299 $as_echo "#define HAVE_SIGWAIT 1" >>confdefs.h
15300
15301     esac
15302
15303     for ac_func in pthread_attr_getstacksize
15304 do :
15305   ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
15306 if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes; then :
15307   cat >>confdefs.h <<_ACEOF
15308 #define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
15309 _ACEOF
15310
15311 fi
15312 done
15313
15314     for ac_func in pthread_attr_setstacksize sysconf
15315 do :
15316   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15317 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15318 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15319   cat >>confdefs.h <<_ACEOF
15320 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15321 _ACEOF
15322
15323 fi
15324 done
15325
15326
15327     case "$host" in
15328      *-freebsd5.[012]|*-freebsd5.[012].*)
15329         ;;
15330      *-freebsd5.[3456789]|*-freebsd5.[3456789].*|*-freebsd6.*)
15331
15332 $as_echo "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
15333
15334         ;;
15335      *-bsdi3.*|*-bsdi4.0*)
15336
15337 $as_echo "#define NEED_PTHREAD_INIT 1" >>confdefs.h
15338
15339         ;;
15340      *-linux*)
15341
15342 $as_echo "#define HAVE_LINUXTHREADS 1" >>confdefs.h
15343
15344         ;;
15345      *-solaris*)
15346         $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
15347
15348         for ac_func in pthread_setconcurrency
15349 do :
15350   ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
15351 if test "x$ac_cv_func_pthread_setconcurrency" = xyes; then :
15352   cat >>confdefs.h <<_ACEOF
15353 #define HAVE_PTHREAD_SETCONCURRENCY 1
15354 _ACEOF
15355
15356 fi
15357 done
15358
15359         case "$ac_cv_func_pthread_setconcurrency" in
15360          yes)
15361
15362 $as_echo "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
15363
15364         esac
15365         ;;
15366      *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
15367
15368 $as_echo "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
15369
15370         ;;
15371     esac
15372     hack_shutup_pthreadonceinit=no
15373     case "$host" in
15374      *-aix5.[123].*)
15375         hack_shutup_pthreadonceinit=yes
15376         ;;
15377      *-solaris2.[89])
15378         hack_shutup_pthreadonceinit=yes
15379         ;;
15380      *-solaris2.1[0-9])
15381         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
15382 $as_echo_n "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
15383 if ${ntp_cv_braces_around_pthread_once_init+:} false; then :
15384   $as_echo_n "(cached) " >&6
15385 else
15386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15387 /* end confdefs.h.  */
15388
15389                         #include <pthread.h>
15390
15391 int
15392 main ()
15393 {
15394
15395                         static pthread_once_t once_test =
15396                                                 PTHREAD_ONCE_INIT;
15397
15398
15399   ;
15400   return 0;
15401 }
15402 _ACEOF
15403 if ac_fn_c_try_compile "$LINENO"; then :
15404   ntp_cv_braces_around_pthread_once_init=no
15405 else
15406   ntp_cv_braces_around_pthread_once_init=yes
15407
15408 fi
15409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15410
15411 fi
15412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
15413 $as_echo "$ntp_cv_braces_around_pthread_once_init" >&6; }
15414         case "$ntp_cv_braces_around_pthread_once_init" in
15415          yes)
15416             hack_shutup_pthreadonceinit=yes
15417         esac
15418         ;;
15419     esac
15420     case "$hack_shutup_pthreadonceinit" in
15421      yes)
15422
15423 $as_echo "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
15424
15425     esac
15426     LIBS="$saved_LIBS"
15427     { saved_LIBS=; unset saved_LIBS;}
15428     CFLAGS="$saved_CFLAGS"
15429     { saved_CFLAGS=; unset saved_CFLAGS;}
15430     ;;
15431  *)
15432     LIBISC_PTHREADS_NOTHREADS=nothreads
15433     ;;
15434 esac
15435
15436  if test "$have_pthreads" != "no"; then
15437   PTHREADS_TRUE=
15438   PTHREADS_FALSE='#'
15439 else
15440   PTHREADS_TRUE='#'
15441   PTHREADS_FALSE=
15442 fi
15443
15444
15445
15446
15447
15448
15449
15450 case "$hw_use_rpl_vsnprintf:$hw_cv_func_vsnprintf" in
15451  no:yes)
15452     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
15453 $as_echo_n "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
15454 if ${ntp_cv_vsnprintf_percent_m+:} false; then :
15455   $as_echo_n "(cached) " >&6
15456 else
15457   if test "$cross_compiling" = yes; then :
15458   ntp_cv_vsnprintf_percent_m=no
15459
15460 else
15461   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15462 /* end confdefs.h.  */
15463
15464                     #include <stdarg.h>
15465                     #include <errno.h>
15466                     #include <stdio.h>
15467                     #include <string.h>
15468
15469                     int call_vsnprintf(
15470                             char *      dst,
15471                             size_t      sz,
15472                             const char *fmt,
15473                             ...
15474                             );
15475
15476                     int call_vsnprintf(
15477                             char *      dst,
15478                             size_t      sz,
15479                             const char *fmt,
15480                             ...
15481                             )
15482                     {
15483                             va_list     ap;
15484                             int         rc;
15485
15486                             va_start(ap, fmt);
15487                             rc = vsnprintf(dst, sz, fmt, ap);
15488                             va_end(ap);
15489
15490                             return rc;
15491                     }
15492
15493 int
15494 main ()
15495 {
15496
15497                     char        sbuf[512];
15498                     char        pbuf[512];
15499                     int         slen;
15500
15501                     strcpy(sbuf, strerror(ENOENT));
15502                     errno = ENOENT;
15503                     slen = call_vsnprintf(pbuf, sizeof(pbuf), "%m",
15504                                           "wrong");
15505                     return strcmp(sbuf, pbuf);
15506
15507
15508   ;
15509   return 0;
15510 }
15511 _ACEOF
15512 if ac_fn_c_try_run "$LINENO"; then :
15513   ntp_cv_vsnprintf_percent_m=yes
15514 else
15515   ntp_cv_vsnprintf_percent_m=no
15516 fi
15517 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15518   conftest.$ac_objext conftest.beam conftest.$ac_ext
15519 fi
15520
15521
15522 fi
15523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
15524 $as_echo "$ntp_cv_vsnprintf_percent_m" >&6; }
15525     case "$ntp_cv_vsnprintf_percent_m" in
15526      yes)
15527
15528 $as_echo "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
15529
15530     esac
15531 esac
15532
15533 for ac_header in sys/clockctl.h
15534 do :
15535   ac_fn_c_check_header_mongrel "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
15536 if test "x$ac_cv_header_sys_clockctl_h" = xyes; then :
15537   cat >>confdefs.h <<_ACEOF
15538 #define HAVE_SYS_CLOCKCTL_H 1
15539 _ACEOF
15540
15541 fi
15542
15543 done
15544
15545
15546 # Check whether --enable-clockctl was given.
15547 if test "${enable_clockctl+set}" = set; then :
15548   enableval=$enable_clockctl; ntp_use_dev_clockctl=$enableval
15549 else
15550   ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h
15551
15552 fi
15553
15554
15555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
15556 $as_echo_n "checking if we should use /dev/clockctl... " >&6; }
15557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
15558 $as_echo "$ntp_use_dev_clockctl" >&6; }
15559
15560
15561 for ac_header in sys/capability.h sys/prctl.h
15562 do :
15563   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15564 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15565 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15566   cat >>confdefs.h <<_ACEOF
15567 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15568 _ACEOF
15569
15570 fi
15571
15572 done
15573
15574
15575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
15576 $as_echo_n "checking if we have linux capabilities (libcap)... " >&6; }
15577
15578 case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
15579  yesyes)
15580     case "$host" in
15581      mips-sgi-irix*)
15582         ntp_have_linuxcaps=no
15583         ;;
15584      *) ntp_have_linuxcaps=yes
15585         ;;
15586     esac
15587     ;;
15588  *)
15589     ntp_have_linuxcaps=no
15590     ;;
15591 esac
15592
15593 # Check whether --enable-linuxcaps was given.
15594 if test "${enable_linuxcaps+set}" = set; then :
15595   enableval=$enable_linuxcaps; ntp_have_linuxcaps=$enableval
15596
15597 fi
15598
15599
15600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
15601 $as_echo "$ntp_have_linuxcaps" >&6; }
15602
15603 case "$ntp_have_linuxcaps" in
15604  yes)
15605
15606 $as_echo "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
15607
15608     LIBS="$LIBS -lcap"
15609     ;;
15610 esac
15611
15612
15613 for ac_header in priv.h
15614 do :
15615   ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
15616 if test "x$ac_cv_header_priv_h" = xyes; then :
15617   cat >>confdefs.h <<_ACEOF
15618 #define HAVE_PRIV_H 1
15619 _ACEOF
15620
15621 fi
15622
15623 done
15624
15625
15626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
15627 $as_echo_n "checking if we have solaris privileges... " >&6; }
15628
15629 case "$ac_cv_header_priv_h" in
15630  yes)
15631     case "$host" in
15632      *-solaris*)
15633         ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
15634 if test "x$ac_cv_func_setppriv" = xyes; then :
15635   ntp_have_solarisprivs=yes
15636 else
15637   ntp_have_solarisprivs=no
15638
15639 fi
15640
15641         ;;
15642     esac
15643 esac
15644
15645 # Check whether --enable-solarisprivs was given.
15646 if test "${enable_solarisprivs+set}" = set; then :
15647   enableval=$enable_solarisprivs; ntp_have_solarisprivs=$enableval
15648
15649 fi
15650
15651
15652
15653 case "$ntp_have_solarisprivs" in
15654  yes)
15655
15656 $as_echo "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
15657
15658 esac
15659
15660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
15661 $as_echo "$ntp_have_solarisprivs" >&6; }
15662
15663 case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs" in
15664  *yes*)
15665
15666 $as_echo "#define HAVE_DROPROOT 1" >>confdefs.h
15667
15668 esac
15669
15670 case "$host" in
15671  *-*-darwin*)
15672     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
15673 $as_echo_n "checking for library containing res_9_init... " >&6; }
15674 if ${ac_cv_search_res_9_init+:} false; then :
15675   $as_echo_n "(cached) " >&6
15676 else
15677   ac_func_search_save_LIBS=$LIBS
15678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15679 /* end confdefs.h.  */
15680
15681 /* Override any GCC internal prototype to avoid an error.
15682    Use char because int might match the return type of a GCC
15683    builtin and then its argument prototype would still apply.  */
15684 #ifdef __cplusplus
15685 extern "C"
15686 #endif
15687 char res_9_init ();
15688 int
15689 main ()
15690 {
15691 return res_9_init ();
15692   ;
15693   return 0;
15694 }
15695 _ACEOF
15696 for ac_lib in '' resolv; do
15697   if test -z "$ac_lib"; then
15698     ac_res="none required"
15699   else
15700     ac_res=-l$ac_lib
15701     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15702   fi
15703   if ac_fn_c_try_link "$LINENO"; then :
15704   ac_cv_search_res_9_init=$ac_res
15705 fi
15706 rm -f core conftest.err conftest.$ac_objext \
15707     conftest$ac_exeext
15708   if ${ac_cv_search_res_9_init+:} false; then :
15709   break
15710 fi
15711 done
15712 if ${ac_cv_search_res_9_init+:} false; then :
15713
15714 else
15715   ac_cv_search_res_9_init=no
15716 fi
15717 rm conftest.$ac_ext
15718 LIBS=$ac_func_search_save_LIBS
15719 fi
15720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
15721 $as_echo "$ac_cv_search_res_9_init" >&6; }
15722 ac_res=$ac_cv_search_res_9_init
15723 if test "$ac_res" != no; then :
15724   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15725
15726 fi
15727
15728     ;;
15729  *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
15730 $as_echo_n "checking for library containing res_init... " >&6; }
15731 if ${ac_cv_search_res_init+:} false; then :
15732   $as_echo_n "(cached) " >&6
15733 else
15734   ac_func_search_save_LIBS=$LIBS
15735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15736 /* end confdefs.h.  */
15737
15738 /* Override any GCC internal prototype to avoid an error.
15739    Use char because int might match the return type of a GCC
15740    builtin and then its argument prototype would still apply.  */
15741 #ifdef __cplusplus
15742 extern "C"
15743 #endif
15744 char res_init ();
15745 int
15746 main ()
15747 {
15748 return res_init ();
15749   ;
15750   return 0;
15751 }
15752 _ACEOF
15753 for ac_lib in '' resolv; do
15754   if test -z "$ac_lib"; then
15755     ac_res="none required"
15756   else
15757     ac_res=-l$ac_lib
15758     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15759   fi
15760   if ac_fn_c_try_link "$LINENO"; then :
15761   ac_cv_search_res_init=$ac_res
15762 fi
15763 rm -f core conftest.err conftest.$ac_objext \
15764     conftest$ac_exeext
15765   if ${ac_cv_search_res_init+:} false; then :
15766   break
15767 fi
15768 done
15769 if ${ac_cv_search_res_init+:} false; then :
15770
15771 else
15772   ac_cv_search_res_init=no
15773 fi
15774 rm conftest.$ac_ext
15775 LIBS=$ac_func_search_save_LIBS
15776 fi
15777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
15778 $as_echo "$ac_cv_search_res_init" >&6; }
15779 ac_res=$ac_cv_search_res_init
15780 if test "$ac_res" != no; then :
15781   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15782
15783 fi
15784
15785     ;;
15786 esac
15787 for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
15788 do :
15789   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15790 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
15791 #  include <sys/types.h>
15792 #endif
15793 #ifdef HAVE_NETINET_IN_H
15794 #  include <netinet/in.h>   /* inet_ functions / structs */
15795 #endif
15796 #ifdef HAVE_ARPA_NAMESER_H
15797 #  include <arpa/nameser.h> /* DNS HEADER struct */
15798 #endif
15799 #ifdef HAVE_NETDB_H
15800 #  include <netdb.h>
15801 #endif
15802 "
15803 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15804   cat >>confdefs.h <<_ACEOF
15805 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15806 _ACEOF
15807
15808 fi
15809
15810 done
15811
15812
15813 #HMS: Why do we do this check so "early"?
15814 for ac_func in res_init
15815 do :
15816   ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
15817 if test "x$ac_cv_func_res_init" = xyes; then :
15818   cat >>confdefs.h <<_ACEOF
15819 #define HAVE_RES_INIT 1
15820 _ACEOF
15821
15822 else
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 fi
15832 done
15833
15834 fi
15835 done
15836
15837
15838 # We also need -lsocket, but we have tested for that already.
15839 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
15840 if test "x$ac_cv_func_inet_ntop" = xyes; then :
15841
15842 else
15843
15844 $as_echo "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
15845
15846 fi
15847
15848 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
15849 if test "x$ac_cv_func_inet_pton" = xyes; then :
15850
15851 else
15852
15853 $as_echo "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
15854
15855 fi
15856
15857
15858 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
15859 if test "x$ac_cv_type_uintptr_t" = xyes; then :
15860
15861 cat >>confdefs.h <<_ACEOF
15862 #define HAVE_UINTPTR_T 1
15863 _ACEOF
15864
15865
15866 fi
15867 ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" "$ac_includes_default"
15868 if test "x$ac_cv_type_int32" = xyes; then :
15869
15870 cat >>confdefs.h <<_ACEOF
15871 #define HAVE_INT32 1
15872 _ACEOF
15873
15874
15875 fi
15876 ac_fn_c_check_type "$LINENO" "u_int32" "ac_cv_type_u_int32" "$ac_includes_default"
15877 if test "x$ac_cv_type_u_int32" = xyes; then :
15878
15879 cat >>confdefs.h <<_ACEOF
15880 #define HAVE_U_INT32 1
15881 _ACEOF
15882
15883
15884 fi
15885
15886
15887
15888
15889 case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
15890  no::yes)
15891     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
15892 $as_echo_n "checking for int32 with DNS headers included... " >&6; }
15893 if ${ntp_cv_type_int32_with_dns+:} false; then :
15894   $as_echo_n "(cached) " >&6
15895 else
15896   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15897 /* end confdefs.h.  */
15898
15899                     #ifdef HAVE_ARPA_NAMESER_H
15900                     # include <arpa/nameser.h>
15901                     #endif
15902                     #include <resolv.h>
15903
15904 int
15905 main ()
15906 {
15907
15908                     size_t cb = sizeof(int32);
15909
15910
15911   ;
15912   return 0;
15913 }
15914 _ACEOF
15915 if ac_fn_c_try_compile "$LINENO"; then :
15916   ntp_cv_type_int32_with_dns=yes
15917 else
15918   ntp_cv_type_int32_with_dns=no
15919
15920 fi
15921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15922
15923 fi
15924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
15925 $as_echo "$ntp_cv_type_int32_with_dns" >&6; }
15926     case "$ntp_cv_type_int32_with_dns" in
15927      yes)
15928
15929 $as_echo "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
15930
15931     esac
15932 esac
15933
15934 case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
15935  no::yes)
15936     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
15937 $as_echo_n "checking for u_int32 with DNS headers included... " >&6; }
15938 if ${ntp_cv_type_u_int32_with_dns+:} false; then :
15939   $as_echo_n "(cached) " >&6
15940 else
15941   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15942 /* end confdefs.h.  */
15943
15944                     #ifdef HAVE_ARPA_NAMESER_H
15945                     # include <arpa/nameser.h>
15946                     #endif
15947                     #include <resolv.h>
15948
15949 int
15950 main ()
15951 {
15952
15953                     size_t cb = sizeof(u_int32);
15954
15955
15956   ;
15957   return 0;
15958 }
15959 _ACEOF
15960 if ac_fn_c_try_compile "$LINENO"; then :
15961   ntp_cv_type_u_int32_with_dns=yes
15962 else
15963   ntp_cv_type_u_int32_with_dns=no
15964
15965 fi
15966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15967
15968 fi
15969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
15970 $as_echo "$ntp_cv_type_u_int32_with_dns" >&6; }
15971     case "$ntp_cv_type_u_int32_with_dns" in
15972      yes)
15973
15974 $as_echo "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
15975
15976     esac
15977 esac
15978
15979 for ac_header in sys/timepps.h
15980 do :
15981   ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
15982         #ifdef HAVE_SYS_TIME_H
15983         # include <sys/time.h>
15984         #endif
15985         #ifdef HAVE_ERRNO_H
15986         # include <errno.h>
15987         #endif
15988
15989
15990 "
15991 if test "x$ac_cv_header_sys_timepps_h" = xyes; then :
15992   cat >>confdefs.h <<_ACEOF
15993 #define HAVE_SYS_TIMEPPS_H 1
15994 _ACEOF
15995
15996 fi
15997
15998 done
15999
16000
16001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
16002 $as_echo_n "checking for struct timespec... " >&6; }
16003 if ${ntp_cv_struct_timespec+:} false; then :
16004   $as_echo_n "(cached) " >&6
16005 else
16006   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16007 /* end confdefs.h.  */
16008
16009                 #include <sys/time.h>
16010                 /* Under SunOS, timespec is in sys/timepps.h,
16011                    which needs errno.h and FRAC */
16012                 #ifdef HAVE_ERRNO_H
16013                 # include <errno.h>
16014                 #endif
16015                 #ifdef HAVE_SYS_TIMEPPS_H
16016                 # define FRAC 4294967296
16017                 # include <sys/timepps.h>
16018                 #endif
16019
16020 int
16021 main ()
16022 {
16023
16024                 struct timespec n;
16025
16026
16027   ;
16028   return 0;
16029 }
16030 _ACEOF
16031 if ac_fn_c_try_compile "$LINENO"; then :
16032   ntp_cv_struct_timespec=yes
16033 else
16034   ntp_cv_struct_timespec=no
16035
16036 fi
16037 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16038
16039 fi
16040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_timespec" >&5
16041 $as_echo "$ntp_cv_struct_timespec" >&6; }
16042 case "$ntp_cv_struct_timespec" in
16043  yes)
16044
16045 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
16046
16047 esac
16048
16049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ntptimeval" >&5
16050 $as_echo_n "checking for struct ntptimeval... " >&6; }
16051 if ${ntp_cv_struct_ntptimeval+:} false; then :
16052   $as_echo_n "(cached) " >&6
16053 else
16054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16055 /* end confdefs.h.  */
16056
16057                 #include <sys/time.h>
16058                 #include <sys/timex.h>
16059
16060 int
16061 main ()
16062 {
16063
16064                 struct ntptimeval n;
16065
16066
16067   ;
16068   return 0;
16069 }
16070 _ACEOF
16071 if ac_fn_c_try_compile "$LINENO"; then :
16072   ntp_cv_struct_ntptimeval=yes
16073 else
16074   ntp_cv_struct_ntptimeval=no
16075
16076 fi
16077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16078
16079 fi
16080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ntptimeval" >&5
16081 $as_echo "$ntp_cv_struct_ntptimeval" >&6; }
16082 case "$ntp_cv_struct_ntptimeval" in
16083  yes)
16084
16085 $as_echo "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
16086
16087 esac
16088
16089 for ac_header in md5.h
16090 do :
16091   ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
16092         #ifdef HAVE_SYS_TYPES_H
16093         # include <sys/types.h>
16094         #endif
16095
16096
16097 "
16098 if test "x$ac_cv_header_md5_h" = xyes; then :
16099   cat >>confdefs.h <<_ACEOF
16100 #define HAVE_MD5_H 1
16101 _ACEOF
16102
16103 fi
16104
16105 done
16106
16107
16108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
16109 $as_echo_n "checking for library containing MD5Init... " >&6; }
16110 if ${ac_cv_search_MD5Init+:} false; then :
16111   $as_echo_n "(cached) " >&6
16112 else
16113   ac_func_search_save_LIBS=$LIBS
16114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16115 /* end confdefs.h.  */
16116
16117 /* Override any GCC internal prototype to avoid an error.
16118    Use char because int might match the return type of a GCC
16119    builtin and then its argument prototype would still apply.  */
16120 #ifdef __cplusplus
16121 extern "C"
16122 #endif
16123 char MD5Init ();
16124 int
16125 main ()
16126 {
16127 return MD5Init ();
16128   ;
16129   return 0;
16130 }
16131 _ACEOF
16132 for ac_lib in '' md5 md; do
16133   if test -z "$ac_lib"; then
16134     ac_res="none required"
16135   else
16136     ac_res=-l$ac_lib
16137     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16138   fi
16139   if ac_fn_c_try_link "$LINENO"; then :
16140   ac_cv_search_MD5Init=$ac_res
16141 fi
16142 rm -f core conftest.err conftest.$ac_objext \
16143     conftest$ac_exeext
16144   if ${ac_cv_search_MD5Init+:} false; then :
16145   break
16146 fi
16147 done
16148 if ${ac_cv_search_MD5Init+:} false; then :
16149
16150 else
16151   ac_cv_search_MD5Init=no
16152 fi
16153 rm conftest.$ac_ext
16154 LIBS=$ac_func_search_save_LIBS
16155 fi
16156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
16157 $as_echo "$ac_cv_search_MD5Init" >&6; }
16158 ac_res=$ac_cv_search_MD5Init
16159 if test "$ac_res" != no; then :
16160   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16161
16162 fi
16163
16164 for ac_func in MD5Init sysconf getdtablesize sigaction sigset sigvec
16165 do :
16166   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16167 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16168 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16169   cat >>confdefs.h <<_ACEOF
16170 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16171 _ACEOF
16172
16173 fi
16174 done
16175
16176
16177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
16178 $as_echo_n "checking for SIGIO... " >&6; }
16179 if ${ntp_cv_hdr_def_sigio+:} false; then :
16180   $as_echo_n "(cached) " >&6
16181 else
16182   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16183 /* end confdefs.h.  */
16184
16185             #include <signal.h>
16186
16187             #ifndef SIGIO
16188             # error
16189             #endif
16190
16191 _ACEOF
16192 if ac_fn_c_try_cpp "$LINENO"; then :
16193   ntp_cv_hdr_def_sigio=yes
16194 else
16195   ntp_cv_hdr_def_sigio=no
16196
16197 fi
16198 rm -f conftest.err conftest.i conftest.$ac_ext
16199
16200 fi
16201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
16202 $as_echo "$ntp_cv_hdr_def_sigio" >&6; }
16203
16204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
16205 $as_echo_n "checking if we want to use SIGIO... " >&6; }
16206 ans=no
16207 case "$ntp_cv_hdr_def_sigio" in
16208  yes)
16209     ans=yes
16210     case "$host" in
16211      alpha*-dec-osf4*|alpha*-dec-osf5*)
16212         ans=no
16213         ;;
16214      *-convex-*)
16215         ans=no
16216         ;;
16217      *-dec-*)
16218         ans=no
16219         ;;
16220      *-pc-cygwin*)
16221         ans=no
16222         ;;
16223      *-sni-sysv*)
16224         ans=no
16225         ;;
16226      *-stratus-vos)
16227         ans=no
16228         ;;
16229      *-univel-sysv*)
16230         ans=no
16231         ;;
16232      *-*-irix6*)
16233         ans=no
16234         ;;
16235      *-*-freebsd*)
16236         ans=no
16237         ;;
16238      *-*-*linux*)
16239         ans=no
16240         ;;
16241      *-*-unicosmp*)
16242         ans=no
16243         ;;
16244      *-*-kfreebsd*)
16245         ans=no
16246         ;;
16247      m68k-*-mint*)
16248         ans=no
16249         ;;
16250     esac
16251     ;;
16252 esac
16253 case "$ans" in
16254  yes)
16255
16256 $as_echo "#define HAVE_SIGNALED_IO 1" >>confdefs.h
16257
16258 esac
16259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16260 $as_echo "$ans" >&6; }
16261
16262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
16263 $as_echo_n "checking for SIGPOLL... " >&6; }
16264 if ${ntp_cv_hdr_def_sigpoll+:} false; then :
16265   $as_echo_n "(cached) " >&6
16266 else
16267   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16268 /* end confdefs.h.  */
16269
16270             #include <signal.h>
16271
16272             #ifndef SIGPOLL
16273             # error
16274             #endif
16275
16276 _ACEOF
16277 if ac_fn_c_try_cpp "$LINENO"; then :
16278   ntp_cv_hdr_def_sigpoll=yes
16279 else
16280   ntp_cv_hdr_def_sigpoll=no
16281
16282 fi
16283 rm -f conftest.err conftest.i conftest.$ac_ext
16284
16285 fi
16286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
16287 $as_echo "$ntp_cv_hdr_def_sigpoll" >&6; }
16288
16289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
16290 $as_echo_n "checking if we can use SIGPOLL for UDP I/O... " >&6; }
16291 ans=no
16292 case "$ntp_cv_hdr_def_sigpoll" in
16293  yes)
16294     case "$host" in
16295      mips-sgi-irix*)
16296         ans=no
16297         ;;
16298      vax-dec-bsd)
16299         ans=no
16300         ;;
16301      *-pc-cygwin*)
16302         ans=no
16303         ;;
16304      *-sni-sysv*)
16305         ans=no
16306         ;;
16307      *-stratus-vos)
16308         ans=no
16309         ;;
16310      *-*-aix[4-9]*)
16311         # XXX Only verified thru AIX6
16312         ans=no
16313         ;;
16314      *-*-hpux*)
16315         ans=no
16316         ;;
16317      *-*-*linux*)
16318         ans=no
16319         ;;
16320      *-*-osf*)
16321         ans=no
16322         ;;
16323      *-*-qnx*)
16324         ans=no
16325         ;;
16326      *-*-sunos*)
16327         ans=no
16328         ;;
16329      *-*-solaris*)
16330         ans=no
16331         ;;
16332      *-*-ultrix*)
16333         ans=no
16334         ;;
16335      *-*-unicosmp*)
16336         ans=no
16337         ;;
16338      *-*-kfreebsd*)
16339         ans=no
16340         ;;
16341      *) ans=yes
16342         ;;
16343     esac
16344     ;;
16345 esac
16346 case "$ans" in
16347  yes)
16348
16349 $as_echo "#define USE_UDP_SIGPOLL 1" >>confdefs.h
16350
16351 esac
16352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16353 $as_echo "$ans" >&6; }
16354
16355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
16356 $as_echo_n "checking if we can use SIGPOLL for TTY I/O... " >&6; }
16357 ans=no
16358 case "$ntp_cv_hdr_def_sigpoll" in
16359  yes)
16360     case "$host" in
16361      mips-sgi-irix*)
16362         ans=no
16363         ;;
16364      vax-dec-bsd)
16365         ans=no
16366         ;;
16367      *-pc-cygwin*)
16368         ans=no
16369         ;;
16370      *-sni-sysv*)
16371         ans=no
16372         ;;
16373      *-stratus-vos)
16374         ans=no
16375         ;;
16376      *-*-aix[4-9]*)
16377         # XXX Only verified thru AIX6
16378         ans=no
16379         ;;
16380      *-*-hpux*)
16381         ans=no
16382         ;;
16383      *-*-*linux*)
16384         ans=no
16385         ;;
16386      *-*-osf*)
16387         ans=no
16388         ;;
16389      *-*-sunos*)
16390         ans=no
16391         ;;
16392      *-*-ultrix*)
16393         ans=no
16394         ;;
16395      *-*-qnx*)
16396         ans=no
16397         ;;
16398      *-*-unicosmp*)
16399         ans=no
16400         ;;
16401      *-*-kfreebsd*)
16402         ans=no
16403         ;;
16404      *) ans=yes
16405         ;;
16406     esac
16407     ;;
16408 esac
16409 case "$ans" in
16410  yes)
16411
16412 $as_echo "#define USE_TTY_SIGPOLL 1" >>confdefs.h
16413
16414 esac
16415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16416 $as_echo "$ans" >&6; }
16417
16418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
16419 $as_echo_n "checking number of arguments to gettimeofday()... " >&6; }
16420 if ${ntp_cv_func_Xettimeofday_nargs+:} false; then :
16421   $as_echo_n "(cached) " >&6
16422 else
16423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16424 /* end confdefs.h.  */
16425
16426                 #include <sys/time.h>
16427
16428 int
16429 main ()
16430 {
16431
16432                 gettimeofday(0, 0);
16433                 settimeofday(0, 0);
16434
16435
16436   ;
16437   return 0;
16438 }
16439 _ACEOF
16440 if ac_fn_c_try_compile "$LINENO"; then :
16441   ntp_cv_func_Xettimeofday_nargs=2
16442 else
16443   ntp_cv_func_Xettimeofday_nargs=1
16444
16445 fi
16446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16447
16448 fi
16449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
16450 $as_echo "$ntp_cv_func_Xettimeofday_nargs" >&6; }
16451 case "$ntp_cv_func_Xettimeofday_nargs" in
16452  1)
16453
16454 $as_echo "#define SYSV_TIMEOFDAY 1" >>confdefs.h
16455
16456 esac
16457
16458 for ac_func in settimeofday
16459 do :
16460   ac_fn_c_check_func "$LINENO" "settimeofday" "ac_cv_func_settimeofday"
16461 if test "x$ac_cv_func_settimeofday" = xyes; then :
16462   cat >>confdefs.h <<_ACEOF
16463 #define HAVE_SETTIMEOFDAY 1
16464 _ACEOF
16465
16466 else
16467
16468     case "$host" in
16469      *-*-mpeix*) ac_cv_func_settimeofday=yes
16470     esac
16471
16472 fi
16473 done
16474
16475
16476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
16477 $as_echo_n "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
16478 ntp_warning='GRONK'
16479 ans=none
16480 case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
16481  yes*)
16482     ntp_warning=''
16483     ans='clock_settime()'
16484     ;;
16485  noyes*)
16486     ntp_warning='But clock_settime() would be better (if we had it)'
16487     ans='settimeofday()'
16488     ;;
16489  nonoyes)
16490     ntp_warning='Which is the worst of the three'
16491     ans='stime()'
16492     ;;
16493  *)
16494     case "$build" in
16495      $host)
16496         ntp_warning='Which leaves us with nothing to use!'
16497     esac
16498 esac
16499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16500 $as_echo "$ans" >&6; }
16501 case "$ntp_warning" in
16502  '')
16503     ;;
16504  *)
16505     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
16506 $as_echo "$as_me: WARNING: *** $ntp_warning ***" >&2;}
16507     ;;
16508 esac
16509
16510
16511 LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
16512 LIBS=$__LIBS
16513 { __LIBS=; unset __LIBS;}
16514
16515
16516
16517 # Check whether --enable-shared was given.
16518 if test "${enable_shared+set}" = set; then :
16519   enableval=$enable_shared; p=${PACKAGE-default}
16520     case $enableval in
16521     yes) enable_shared=yes ;;
16522     no) enable_shared=no ;;
16523     *)
16524       enable_shared=no
16525       # Look at the argument we got.  We use all the common list separators.
16526       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
16527       for pkg in $enableval; do
16528         IFS="$lt_save_ifs"
16529         if test "X$pkg" = "X$p"; then
16530           enable_shared=yes
16531         fi
16532       done
16533       IFS="$lt_save_ifs"
16534       ;;
16535     esac
16536 else
16537   enable_shared=no
16538 fi
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548 case `pwd` in
16549   *\ * | *\     *)
16550     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
16551 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
16552 esac
16553
16554
16555
16556 macro_version='2.4.2'
16557 macro_revision='1.3337'
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571 ltmain="$ac_aux_dir/ltmain.sh"
16572
16573 # Backslashify metacharacters that are still active within
16574 # double-quoted strings.
16575 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
16576
16577 # Same as above, but do not quote variable references.
16578 double_quote_subst='s/\(["`\\]\)/\\\1/g'
16579
16580 # Sed substitution to delay expansion of an escaped shell variable in a
16581 # double_quote_subst'ed string.
16582 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
16583
16584 # Sed substitution to delay expansion of an escaped single quote.
16585 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
16586
16587 # Sed substitution to avoid accidental globbing in evaled expressions
16588 no_glob_subst='s/\*/\\\*/g'
16589
16590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
16591 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
16592 if ${lt_cv_path_NM+:} false; then :
16593   $as_echo_n "(cached) " >&6
16594 else
16595   if test -n "$NM"; then
16596   # Let the user override the test.
16597   lt_cv_path_NM="$NM"
16598 else
16599   lt_nm_to_check="${ac_tool_prefix}nm"
16600   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
16601     lt_nm_to_check="$lt_nm_to_check nm"
16602   fi
16603   for lt_tmp_nm in $lt_nm_to_check; do
16604     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
16605     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
16606       IFS="$lt_save_ifs"
16607       test -z "$ac_dir" && ac_dir=.
16608       tmp_nm="$ac_dir/$lt_tmp_nm"
16609       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
16610         # Check to see if the nm accepts a BSD-compat flag.
16611         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
16612         #   nm: unknown option "B" ignored
16613         # Tru64's nm complains that /dev/null is an invalid object file
16614         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
16615         */dev/null* | *'Invalid file or object type'*)
16616           lt_cv_path_NM="$tmp_nm -B"
16617           break
16618           ;;
16619         *)
16620           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
16621           */dev/null*)
16622             lt_cv_path_NM="$tmp_nm -p"
16623             break
16624             ;;
16625           *)
16626             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
16627             continue # so that we can try to find one that supports BSD flags
16628             ;;
16629           esac
16630           ;;
16631         esac
16632       fi
16633     done
16634     IFS="$lt_save_ifs"
16635   done
16636   : ${lt_cv_path_NM=no}
16637 fi
16638 fi
16639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
16640 $as_echo "$lt_cv_path_NM" >&6; }
16641 if test "$lt_cv_path_NM" != "no"; then
16642   NM="$lt_cv_path_NM"
16643 else
16644   # Didn't find any BSD compatible name lister, look for dumpbin.
16645   if test -n "$DUMPBIN"; then :
16646     # Let the user override the test.
16647   else
16648     if test -n "$ac_tool_prefix"; then
16649   for ac_prog in dumpbin "link -dump"
16650   do
16651     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16652 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16654 $as_echo_n "checking for $ac_word... " >&6; }
16655 if ${ac_cv_prog_DUMPBIN+:} false; then :
16656   $as_echo_n "(cached) " >&6
16657 else
16658   if test -n "$DUMPBIN"; then
16659   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
16660 else
16661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16662 for as_dir in $PATH
16663 do
16664   IFS=$as_save_IFS
16665   test -z "$as_dir" && as_dir=.
16666     for ac_exec_ext in '' $ac_executable_extensions; do
16667   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16668     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
16669     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16670     break 2
16671   fi
16672 done
16673   done
16674 IFS=$as_save_IFS
16675
16676 fi
16677 fi
16678 DUMPBIN=$ac_cv_prog_DUMPBIN
16679 if test -n "$DUMPBIN"; then
16680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
16681 $as_echo "$DUMPBIN" >&6; }
16682 else
16683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16684 $as_echo "no" >&6; }
16685 fi
16686
16687
16688     test -n "$DUMPBIN" && break
16689   done
16690 fi
16691 if test -z "$DUMPBIN"; then
16692   ac_ct_DUMPBIN=$DUMPBIN
16693   for ac_prog in dumpbin "link -dump"
16694 do
16695   # Extract the first word of "$ac_prog", so it can be a program name with args.
16696 set dummy $ac_prog; ac_word=$2
16697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16698 $as_echo_n "checking for $ac_word... " >&6; }
16699 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
16700   $as_echo_n "(cached) " >&6
16701 else
16702   if test -n "$ac_ct_DUMPBIN"; then
16703   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
16704 else
16705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16706 for as_dir in $PATH
16707 do
16708   IFS=$as_save_IFS
16709   test -z "$as_dir" && as_dir=.
16710     for ac_exec_ext in '' $ac_executable_extensions; do
16711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16712     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
16713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16714     break 2
16715   fi
16716 done
16717   done
16718 IFS=$as_save_IFS
16719
16720 fi
16721 fi
16722 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
16723 if test -n "$ac_ct_DUMPBIN"; then
16724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
16725 $as_echo "$ac_ct_DUMPBIN" >&6; }
16726 else
16727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16728 $as_echo "no" >&6; }
16729 fi
16730
16731
16732   test -n "$ac_ct_DUMPBIN" && break
16733 done
16734
16735   if test "x$ac_ct_DUMPBIN" = x; then
16736     DUMPBIN=":"
16737   else
16738     case $cross_compiling:$ac_tool_warned in
16739 yes:)
16740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16741 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16742 ac_tool_warned=yes ;;
16743 esac
16744     DUMPBIN=$ac_ct_DUMPBIN
16745   fi
16746 fi
16747
16748     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
16749     *COFF*)
16750       DUMPBIN="$DUMPBIN -symbols"
16751       ;;
16752     *)
16753       DUMPBIN=:
16754       ;;
16755     esac
16756   fi
16757
16758   if test "$DUMPBIN" != ":"; then
16759     NM="$DUMPBIN"
16760   fi
16761 fi
16762 test -z "$NM" && NM=nm
16763
16764
16765
16766
16767
16768
16769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
16770 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
16771 if ${lt_cv_nm_interface+:} false; then :
16772   $as_echo_n "(cached) " >&6
16773 else
16774   lt_cv_nm_interface="BSD nm"
16775   echo "int some_variable = 0;" > conftest.$ac_ext
16776   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
16777   (eval "$ac_compile" 2>conftest.err)
16778   cat conftest.err >&5
16779   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
16780   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
16781   cat conftest.err >&5
16782   (eval echo "\"\$as_me:$LINENO: output\"" >&5)
16783   cat conftest.out >&5
16784   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
16785     lt_cv_nm_interface="MS dumpbin"
16786   fi
16787   rm -f conftest*
16788 fi
16789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
16790 $as_echo "$lt_cv_nm_interface" >&6; }
16791
16792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
16793 $as_echo_n "checking whether ln -s works... " >&6; }
16794 LN_S=$as_ln_s
16795 if test "$LN_S" = "ln -s"; then
16796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16797 $as_echo "yes" >&6; }
16798 else
16799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
16800 $as_echo "no, using $LN_S" >&6; }
16801 fi
16802
16803 # find the maximum length of command line arguments
16804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
16805 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
16806 if ${lt_cv_sys_max_cmd_len+:} false; then :
16807   $as_echo_n "(cached) " >&6
16808 else
16809     i=0
16810   teststring="ABCD"
16811
16812   case $build_os in
16813   msdosdjgpp*)
16814     # On DJGPP, this test can blow up pretty badly due to problems in libc
16815     # (any single argument exceeding 2000 bytes causes a buffer overrun
16816     # during glob expansion).  Even if it were fixed, the result of this
16817     # check would be larger than it should be.
16818     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
16819     ;;
16820
16821   gnu*)
16822     # Under GNU Hurd, this test is not required because there is
16823     # no limit to the length of command line arguments.
16824     # Libtool will interpret -1 as no limit whatsoever
16825     lt_cv_sys_max_cmd_len=-1;
16826     ;;
16827
16828   cygwin* | mingw* | cegcc*)
16829     # On Win9x/ME, this test blows up -- it succeeds, but takes
16830     # about 5 minutes as the teststring grows exponentially.
16831     # Worse, since 9x/ME are not pre-emptively multitasking,
16832     # you end up with a "frozen" computer, even though with patience
16833     # the test eventually succeeds (with a max line length of 256k).
16834     # Instead, let's just punt: use the minimum linelength reported by
16835     # all of the supported platforms: 8192 (on NT/2K/XP).
16836     lt_cv_sys_max_cmd_len=8192;
16837     ;;
16838
16839   mint*)
16840     # On MiNT this can take a long time and run out of memory.
16841     lt_cv_sys_max_cmd_len=8192;
16842     ;;
16843
16844   amigaos*)
16845     # On AmigaOS with pdksh, this test takes hours, literally.
16846     # So we just punt and use a minimum line length of 8192.
16847     lt_cv_sys_max_cmd_len=8192;
16848     ;;
16849
16850   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
16851     # This has been around since 386BSD, at least.  Likely further.
16852     if test -x /sbin/sysctl; then
16853       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
16854     elif test -x /usr/sbin/sysctl; then
16855       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
16856     else
16857       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
16858     fi
16859     # And add a safety zone
16860     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
16861     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
16862     ;;
16863
16864   interix*)
16865     # We know the value 262144 and hardcode it with a safety zone (like BSD)
16866     lt_cv_sys_max_cmd_len=196608
16867     ;;
16868
16869   osf*)
16870     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
16871     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
16872     # nice to cause kernel panics so lets avoid the loop below.
16873     # First set a reasonable default.
16874     lt_cv_sys_max_cmd_len=16384
16875     #
16876     if test -x /sbin/sysconfig; then
16877       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
16878         *1*) lt_cv_sys_max_cmd_len=-1 ;;
16879       esac
16880     fi
16881     ;;
16882   sco3.2v5*)
16883     lt_cv_sys_max_cmd_len=102400
16884     ;;
16885   sysv5* | sco5v6* | sysv4.2uw2*)
16886     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
16887     if test -n "$kargmax"; then
16888       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
16889     else
16890       lt_cv_sys_max_cmd_len=32768
16891     fi
16892     ;;
16893   *)
16894     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
16895     if test -n "$lt_cv_sys_max_cmd_len"; then
16896       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
16897       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
16898     else
16899       # Make teststring a little bigger before we do anything with it.
16900       # a 1K string should be a reasonable start.
16901       for i in 1 2 3 4 5 6 7 8 ; do
16902         teststring=$teststring$teststring
16903       done
16904       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
16905       # If test is not a shell built-in, we'll probably end up computing a
16906       # maximum length that is only half of the actual maximum length, but
16907       # we can't tell.
16908       while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
16909                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
16910               test $i != 17 # 1/2 MB should be enough
16911       do
16912         i=`expr $i + 1`
16913         teststring=$teststring$teststring
16914       done
16915       # Only check the string length outside the loop.
16916       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
16917       teststring=
16918       # Add a significant safety factor because C++ compilers can tack on
16919       # massive amounts of additional arguments before passing them to the
16920       # linker.  It appears as though 1/2 is a usable value.
16921       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
16922     fi
16923     ;;
16924   esac
16925
16926 fi
16927
16928 if test -n $lt_cv_sys_max_cmd_len ; then
16929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
16930 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
16931 else
16932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
16933 $as_echo "none" >&6; }
16934 fi
16935 max_cmd_len=$lt_cv_sys_max_cmd_len
16936
16937
16938
16939
16940
16941
16942 : ${CP="cp -f"}
16943 : ${MV="mv -f"}
16944 : ${RM="rm -f"}
16945
16946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
16947 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
16948 # Try some XSI features
16949 xsi_shell=no
16950 ( _lt_dummy="a/b/c"
16951   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
16952       = c,a/b,b/c, \
16953     && eval 'test $(( 1 + 1 )) -eq 2 \
16954     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
16955   && xsi_shell=yes
16956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
16957 $as_echo "$xsi_shell" >&6; }
16958
16959
16960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
16961 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
16962 lt_shell_append=no
16963 ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
16964     >/dev/null 2>&1 \
16965   && lt_shell_append=yes
16966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
16967 $as_echo "$lt_shell_append" >&6; }
16968
16969
16970 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
16971   lt_unset=unset
16972 else
16973   lt_unset=false
16974 fi
16975
16976
16977
16978
16979
16980 # test EBCDIC or ASCII
16981 case `echo X|tr X '\101'` in
16982  A) # ASCII based system
16983     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
16984   lt_SP2NL='tr \040 \012'
16985   lt_NL2SP='tr \015\012 \040\040'
16986   ;;
16987  *) # EBCDIC based system
16988   lt_SP2NL='tr \100 \n'
16989   lt_NL2SP='tr \r\n \100\100'
16990   ;;
16991 esac
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
17002 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
17003 if ${lt_cv_to_host_file_cmd+:} false; then :
17004   $as_echo_n "(cached) " >&6
17005 else
17006   case $host in
17007   *-*-mingw* )
17008     case $build in
17009       *-*-mingw* ) # actually msys
17010         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
17011         ;;
17012       *-*-cygwin* )
17013         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
17014         ;;
17015       * ) # otherwise, assume *nix
17016         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
17017         ;;
17018     esac
17019     ;;
17020   *-*-cygwin* )
17021     case $build in
17022       *-*-mingw* ) # actually msys
17023         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
17024         ;;
17025       *-*-cygwin* )
17026         lt_cv_to_host_file_cmd=func_convert_file_noop
17027         ;;
17028       * ) # otherwise, assume *nix
17029         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
17030         ;;
17031     esac
17032     ;;
17033   * ) # unhandled hosts (and "normal" native builds)
17034     lt_cv_to_host_file_cmd=func_convert_file_noop
17035     ;;
17036 esac
17037
17038 fi
17039
17040 to_host_file_cmd=$lt_cv_to_host_file_cmd
17041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
17042 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
17043
17044
17045
17046
17047
17048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
17049 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
17050 if ${lt_cv_to_tool_file_cmd+:} false; then :
17051   $as_echo_n "(cached) " >&6
17052 else
17053   #assume ordinary cross tools, or native build.
17054 lt_cv_to_tool_file_cmd=func_convert_file_noop
17055 case $host in
17056   *-*-mingw* )
17057     case $build in
17058       *-*-mingw* ) # actually msys
17059         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
17060         ;;
17061     esac
17062     ;;
17063 esac
17064
17065 fi
17066
17067 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
17068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
17069 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
17070
17071
17072
17073
17074
17075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
17076 $as_echo_n "checking for $LD option to reload object files... " >&6; }
17077 if ${lt_cv_ld_reload_flag+:} false; then :
17078   $as_echo_n "(cached) " >&6
17079 else
17080   lt_cv_ld_reload_flag='-r'
17081 fi
17082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
17083 $as_echo "$lt_cv_ld_reload_flag" >&6; }
17084 reload_flag=$lt_cv_ld_reload_flag
17085 case $reload_flag in
17086 "" | " "*) ;;
17087 *) reload_flag=" $reload_flag" ;;
17088 esac
17089 reload_cmds='$LD$reload_flag -o $output$reload_objs'
17090 case $host_os in
17091   cygwin* | mingw* | pw32* | cegcc*)
17092     if test "$GCC" != yes; then
17093       reload_cmds=false
17094     fi
17095     ;;
17096   darwin*)
17097     if test "$GCC" = yes; then
17098       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
17099     else
17100       reload_cmds='$LD$reload_flag -o $output$reload_objs'
17101     fi
17102     ;;
17103 esac
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113 if test -n "$ac_tool_prefix"; then
17114   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
17115 set dummy ${ac_tool_prefix}objdump; ac_word=$2
17116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17117 $as_echo_n "checking for $ac_word... " >&6; }
17118 if ${ac_cv_prog_OBJDUMP+:} false; then :
17119   $as_echo_n "(cached) " >&6
17120 else
17121   if test -n "$OBJDUMP"; then
17122   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
17123 else
17124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17125 for as_dir in $PATH
17126 do
17127   IFS=$as_save_IFS
17128   test -z "$as_dir" && as_dir=.
17129     for ac_exec_ext in '' $ac_executable_extensions; do
17130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17131     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
17132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17133     break 2
17134   fi
17135 done
17136   done
17137 IFS=$as_save_IFS
17138
17139 fi
17140 fi
17141 OBJDUMP=$ac_cv_prog_OBJDUMP
17142 if test -n "$OBJDUMP"; then
17143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
17144 $as_echo "$OBJDUMP" >&6; }
17145 else
17146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17147 $as_echo "no" >&6; }
17148 fi
17149
17150
17151 fi
17152 if test -z "$ac_cv_prog_OBJDUMP"; then
17153   ac_ct_OBJDUMP=$OBJDUMP
17154   # Extract the first word of "objdump", so it can be a program name with args.
17155 set dummy objdump; ac_word=$2
17156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17157 $as_echo_n "checking for $ac_word... " >&6; }
17158 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
17159   $as_echo_n "(cached) " >&6
17160 else
17161   if test -n "$ac_ct_OBJDUMP"; then
17162   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
17163 else
17164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17165 for as_dir in $PATH
17166 do
17167   IFS=$as_save_IFS
17168   test -z "$as_dir" && as_dir=.
17169     for ac_exec_ext in '' $ac_executable_extensions; do
17170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17171     ac_cv_prog_ac_ct_OBJDUMP="objdump"
17172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17173     break 2
17174   fi
17175 done
17176   done
17177 IFS=$as_save_IFS
17178
17179 fi
17180 fi
17181 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
17182 if test -n "$ac_ct_OBJDUMP"; then
17183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
17184 $as_echo "$ac_ct_OBJDUMP" >&6; }
17185 else
17186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17187 $as_echo "no" >&6; }
17188 fi
17189
17190   if test "x$ac_ct_OBJDUMP" = x; then
17191     OBJDUMP="false"
17192   else
17193     case $cross_compiling:$ac_tool_warned in
17194 yes:)
17195 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17196 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17197 ac_tool_warned=yes ;;
17198 esac
17199     OBJDUMP=$ac_ct_OBJDUMP
17200   fi
17201 else
17202   OBJDUMP="$ac_cv_prog_OBJDUMP"
17203 fi
17204
17205 test -z "$OBJDUMP" && OBJDUMP=objdump
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
17216 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
17217 if ${lt_cv_deplibs_check_method+:} false; then :
17218   $as_echo_n "(cached) " >&6
17219 else
17220   lt_cv_file_magic_cmd='$MAGIC_CMD'
17221 lt_cv_file_magic_test_file=
17222 lt_cv_deplibs_check_method='unknown'
17223 # Need to set the preceding variable on all platforms that support
17224 # interlibrary dependencies.
17225 # 'none' -- dependencies not supported.
17226 # `unknown' -- same as none, but documents that we really don't know.
17227 # 'pass_all' -- all dependencies passed with no checks.
17228 # 'test_compile' -- check by making test program.
17229 # 'file_magic [[regex]]' -- check by looking for files in library path
17230 # which responds to the $file_magic_cmd with a given extended regex.
17231 # If you have `file' or equivalent on your system and you're not sure
17232 # whether `pass_all' will *always* work, you probably want this one.
17233
17234 case $host_os in
17235 aix[4-9]*)
17236   lt_cv_deplibs_check_method=pass_all
17237   ;;
17238
17239 beos*)
17240   lt_cv_deplibs_check_method=pass_all
17241   ;;
17242
17243 bsdi[45]*)
17244   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
17245   lt_cv_file_magic_cmd='/usr/bin/file -L'
17246   lt_cv_file_magic_test_file=/shlib/libc.so
17247   ;;
17248
17249 cygwin*)
17250   # func_win32_libid is a shell function defined in ltmain.sh
17251   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
17252   lt_cv_file_magic_cmd='func_win32_libid'
17253   ;;
17254
17255 mingw* | pw32*)
17256   # Base MSYS/MinGW do not provide the 'file' command needed by
17257   # func_win32_libid shell function, so use a weaker test based on 'objdump',
17258   # unless we find 'file', for example because we are cross-compiling.
17259   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
17260   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
17261     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
17262     lt_cv_file_magic_cmd='func_win32_libid'
17263   else
17264     # Keep this pattern in sync with the one in func_win32_libid.
17265     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
17266     lt_cv_file_magic_cmd='$OBJDUMP -f'
17267   fi
17268   ;;
17269
17270 cegcc*)
17271   # use the weaker test based on 'objdump'. See mingw*.
17272   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
17273   lt_cv_file_magic_cmd='$OBJDUMP -f'
17274   ;;
17275
17276 darwin* | rhapsody*)
17277   lt_cv_deplibs_check_method=pass_all
17278   ;;
17279
17280 freebsd* | dragonfly*)
17281   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
17282     case $host_cpu in
17283     i*86 )
17284       # Not sure whether the presence of OpenBSD here was a mistake.
17285       # Let's accept both of them until this is cleared up.
17286       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
17287       lt_cv_file_magic_cmd=/usr/bin/file
17288       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
17289       ;;
17290     esac
17291   else
17292     lt_cv_deplibs_check_method=pass_all
17293   fi
17294   ;;
17295
17296 gnu*)
17297   lt_cv_deplibs_check_method=pass_all
17298   ;;
17299
17300 haiku*)
17301   lt_cv_deplibs_check_method=pass_all
17302   ;;
17303
17304 hpux10.20* | hpux11*)
17305   lt_cv_file_magic_cmd=/usr/bin/file
17306   case $host_cpu in
17307   ia64*)
17308     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
17309     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
17310     ;;
17311   hppa*64*)
17312     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]'
17313     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
17314     ;;
17315   *)
17316     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
17317     lt_cv_file_magic_test_file=/usr/lib/libc.sl
17318     ;;
17319   esac
17320   ;;
17321
17322 interix[3-9]*)
17323   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
17324   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
17325   ;;
17326
17327 irix5* | irix6* | nonstopux*)
17328   case $LD in
17329   *-32|*"-32 ") libmagic=32-bit;;
17330   *-n32|*"-n32 ") libmagic=N32;;
17331   *-64|*"-64 ") libmagic=64-bit;;
17332   *) libmagic=never-match;;
17333   esac
17334   lt_cv_deplibs_check_method=pass_all
17335   ;;
17336
17337 # This must be Linux ELF.
17338 linux* | k*bsd*-gnu | kopensolaris*-gnu)
17339   lt_cv_deplibs_check_method=pass_all
17340   ;;
17341
17342 netbsd*)
17343   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
17344     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
17345   else
17346     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
17347   fi
17348   ;;
17349
17350 newos6*)
17351   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
17352   lt_cv_file_magic_cmd=/usr/bin/file
17353   lt_cv_file_magic_test_file=/usr/lib/libnls.so
17354   ;;
17355
17356 *nto* | *qnx*)
17357   lt_cv_deplibs_check_method=pass_all
17358   ;;
17359
17360 openbsd*)
17361   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
17362     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
17363   else
17364     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
17365   fi
17366   ;;
17367
17368 osf3* | osf4* | osf5*)
17369   lt_cv_deplibs_check_method=pass_all
17370   ;;
17371
17372 rdos*)
17373   lt_cv_deplibs_check_method=pass_all
17374   ;;
17375
17376 solaris*)
17377   lt_cv_deplibs_check_method=pass_all
17378   ;;
17379
17380 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
17381   lt_cv_deplibs_check_method=pass_all
17382   ;;
17383
17384 sysv4 | sysv4.3*)
17385   case $host_vendor in
17386   motorola)
17387     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]'
17388     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
17389     ;;
17390   ncr)
17391     lt_cv_deplibs_check_method=pass_all
17392     ;;
17393   sequent)
17394     lt_cv_file_magic_cmd='/bin/file'
17395     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
17396     ;;
17397   sni)
17398     lt_cv_file_magic_cmd='/bin/file'
17399     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
17400     lt_cv_file_magic_test_file=/lib/libc.so
17401     ;;
17402   siemens)
17403     lt_cv_deplibs_check_method=pass_all
17404     ;;
17405   pc)
17406     lt_cv_deplibs_check_method=pass_all
17407     ;;
17408   esac
17409   ;;
17410
17411 tpf*)
17412   lt_cv_deplibs_check_method=pass_all
17413   ;;
17414 esac
17415
17416 fi
17417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
17418 $as_echo "$lt_cv_deplibs_check_method" >&6; }
17419
17420 file_magic_glob=
17421 want_nocaseglob=no
17422 if test "$build" = "$host"; then
17423   case $host_os in
17424   mingw* | pw32*)
17425     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
17426       want_nocaseglob=yes
17427     else
17428       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
17429     fi
17430     ;;
17431   esac
17432 fi
17433
17434 file_magic_cmd=$lt_cv_file_magic_cmd
17435 deplibs_check_method=$lt_cv_deplibs_check_method
17436 test -z "$deplibs_check_method" && deplibs_check_method=unknown
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459 if test -n "$ac_tool_prefix"; then
17460   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
17461 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
17462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17463 $as_echo_n "checking for $ac_word... " >&6; }
17464 if ${ac_cv_prog_DLLTOOL+:} false; then :
17465   $as_echo_n "(cached) " >&6
17466 else
17467   if test -n "$DLLTOOL"; then
17468   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
17469 else
17470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17471 for as_dir in $PATH
17472 do
17473   IFS=$as_save_IFS
17474   test -z "$as_dir" && as_dir=.
17475     for ac_exec_ext in '' $ac_executable_extensions; do
17476   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17477     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
17478     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17479     break 2
17480   fi
17481 done
17482   done
17483 IFS=$as_save_IFS
17484
17485 fi
17486 fi
17487 DLLTOOL=$ac_cv_prog_DLLTOOL
17488 if test -n "$DLLTOOL"; then
17489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
17490 $as_echo "$DLLTOOL" >&6; }
17491 else
17492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17493 $as_echo "no" >&6; }
17494 fi
17495
17496
17497 fi
17498 if test -z "$ac_cv_prog_DLLTOOL"; then
17499   ac_ct_DLLTOOL=$DLLTOOL
17500   # Extract the first word of "dlltool", so it can be a program name with args.
17501 set dummy dlltool; ac_word=$2
17502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17503 $as_echo_n "checking for $ac_word... " >&6; }
17504 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
17505   $as_echo_n "(cached) " >&6
17506 else
17507   if test -n "$ac_ct_DLLTOOL"; then
17508   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
17509 else
17510 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17511 for as_dir in $PATH
17512 do
17513   IFS=$as_save_IFS
17514   test -z "$as_dir" && as_dir=.
17515     for ac_exec_ext in '' $ac_executable_extensions; do
17516   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17517     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
17518     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17519     break 2
17520   fi
17521 done
17522   done
17523 IFS=$as_save_IFS
17524
17525 fi
17526 fi
17527 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
17528 if test -n "$ac_ct_DLLTOOL"; then
17529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
17530 $as_echo "$ac_ct_DLLTOOL" >&6; }
17531 else
17532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17533 $as_echo "no" >&6; }
17534 fi
17535
17536   if test "x$ac_ct_DLLTOOL" = x; then
17537     DLLTOOL="false"
17538   else
17539     case $cross_compiling:$ac_tool_warned in
17540 yes:)
17541 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17542 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17543 ac_tool_warned=yes ;;
17544 esac
17545     DLLTOOL=$ac_ct_DLLTOOL
17546   fi
17547 else
17548   DLLTOOL="$ac_cv_prog_DLLTOOL"
17549 fi
17550
17551 test -z "$DLLTOOL" && DLLTOOL=dlltool
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
17563 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
17564 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
17565   $as_echo_n "(cached) " >&6
17566 else
17567   lt_cv_sharedlib_from_linklib_cmd='unknown'
17568
17569 case $host_os in
17570 cygwin* | mingw* | pw32* | cegcc*)
17571   # two different shell functions defined in ltmain.sh
17572   # decide which to use based on capabilities of $DLLTOOL
17573   case `$DLLTOOL --help 2>&1` in
17574   *--identify-strict*)
17575     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
17576     ;;
17577   *)
17578     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
17579     ;;
17580   esac
17581   ;;
17582 *)
17583   # fallback: assume linklib IS sharedlib
17584   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
17585   ;;
17586 esac
17587
17588 fi
17589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
17590 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
17591 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
17592 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
17593
17594
17595
17596
17597
17598
17599
17600 if test -n "$ac_tool_prefix"; then
17601   for ac_prog in ar
17602   do
17603     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
17604 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
17605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17606 $as_echo_n "checking for $ac_word... " >&6; }
17607 if ${ac_cv_prog_AR+:} false; then :
17608   $as_echo_n "(cached) " >&6
17609 else
17610   if test -n "$AR"; then
17611   ac_cv_prog_AR="$AR" # Let the user override the test.
17612 else
17613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17614 for as_dir in $PATH
17615 do
17616   IFS=$as_save_IFS
17617   test -z "$as_dir" && as_dir=.
17618     for ac_exec_ext in '' $ac_executable_extensions; do
17619   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17620     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
17621     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17622     break 2
17623   fi
17624 done
17625   done
17626 IFS=$as_save_IFS
17627
17628 fi
17629 fi
17630 AR=$ac_cv_prog_AR
17631 if test -n "$AR"; then
17632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
17633 $as_echo "$AR" >&6; }
17634 else
17635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17636 $as_echo "no" >&6; }
17637 fi
17638
17639
17640     test -n "$AR" && break
17641   done
17642 fi
17643 if test -z "$AR"; then
17644   ac_ct_AR=$AR
17645   for ac_prog in ar
17646 do
17647   # Extract the first word of "$ac_prog", so it can be a program name with args.
17648 set dummy $ac_prog; ac_word=$2
17649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17650 $as_echo_n "checking for $ac_word... " >&6; }
17651 if ${ac_cv_prog_ac_ct_AR+:} false; then :
17652   $as_echo_n "(cached) " >&6
17653 else
17654   if test -n "$ac_ct_AR"; then
17655   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
17656 else
17657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17658 for as_dir in $PATH
17659 do
17660   IFS=$as_save_IFS
17661   test -z "$as_dir" && as_dir=.
17662     for ac_exec_ext in '' $ac_executable_extensions; do
17663   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17664     ac_cv_prog_ac_ct_AR="$ac_prog"
17665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17666     break 2
17667   fi
17668 done
17669   done
17670 IFS=$as_save_IFS
17671
17672 fi
17673 fi
17674 ac_ct_AR=$ac_cv_prog_ac_ct_AR
17675 if test -n "$ac_ct_AR"; then
17676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
17677 $as_echo "$ac_ct_AR" >&6; }
17678 else
17679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17680 $as_echo "no" >&6; }
17681 fi
17682
17683
17684   test -n "$ac_ct_AR" && break
17685 done
17686
17687   if test "x$ac_ct_AR" = x; then
17688     AR="false"
17689   else
17690     case $cross_compiling:$ac_tool_warned in
17691 yes:)
17692 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17693 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17694 ac_tool_warned=yes ;;
17695 esac
17696     AR=$ac_ct_AR
17697   fi
17698 fi
17699
17700 : ${AR=ar}
17701 : ${AR_FLAGS=cru}
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
17714 $as_echo_n "checking for archiver @FILE support... " >&6; }
17715 if ${lt_cv_ar_at_file+:} false; then :
17716   $as_echo_n "(cached) " >&6
17717 else
17718   lt_cv_ar_at_file=no
17719    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17720 /* end confdefs.h.  */
17721
17722 int
17723 main ()
17724 {
17725
17726   ;
17727   return 0;
17728 }
17729 _ACEOF
17730 if ac_fn_c_try_compile "$LINENO"; then :
17731   echo conftest.$ac_objext > conftest.lst
17732       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
17733       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
17734   (eval $lt_ar_try) 2>&5
17735   ac_status=$?
17736   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17737   test $ac_status = 0; }
17738       if test "$ac_status" -eq 0; then
17739         # Ensure the archiver fails upon bogus file names.
17740         rm -f conftest.$ac_objext libconftest.a
17741         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
17742   (eval $lt_ar_try) 2>&5
17743   ac_status=$?
17744   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17745   test $ac_status = 0; }
17746         if test "$ac_status" -ne 0; then
17747           lt_cv_ar_at_file=@
17748         fi
17749       fi
17750       rm -f conftest.* libconftest.a
17751
17752 fi
17753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17754
17755 fi
17756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
17757 $as_echo "$lt_cv_ar_at_file" >&6; }
17758
17759 if test "x$lt_cv_ar_at_file" = xno; then
17760   archiver_list_spec=
17761 else
17762   archiver_list_spec=$lt_cv_ar_at_file
17763 fi
17764
17765
17766
17767
17768
17769
17770
17771 if test -n "$ac_tool_prefix"; then
17772   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
17773 set dummy ${ac_tool_prefix}strip; ac_word=$2
17774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17775 $as_echo_n "checking for $ac_word... " >&6; }
17776 if ${ac_cv_prog_STRIP+:} false; then :
17777   $as_echo_n "(cached) " >&6
17778 else
17779   if test -n "$STRIP"; then
17780   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
17781 else
17782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17783 for as_dir in $PATH
17784 do
17785   IFS=$as_save_IFS
17786   test -z "$as_dir" && as_dir=.
17787     for ac_exec_ext in '' $ac_executable_extensions; do
17788   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17789     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
17790     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17791     break 2
17792   fi
17793 done
17794   done
17795 IFS=$as_save_IFS
17796
17797 fi
17798 fi
17799 STRIP=$ac_cv_prog_STRIP
17800 if test -n "$STRIP"; then
17801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
17802 $as_echo "$STRIP" >&6; }
17803 else
17804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17805 $as_echo "no" >&6; }
17806 fi
17807
17808
17809 fi
17810 if test -z "$ac_cv_prog_STRIP"; then
17811   ac_ct_STRIP=$STRIP
17812   # Extract the first word of "strip", so it can be a program name with args.
17813 set dummy strip; ac_word=$2
17814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17815 $as_echo_n "checking for $ac_word... " >&6; }
17816 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
17817   $as_echo_n "(cached) " >&6
17818 else
17819   if test -n "$ac_ct_STRIP"; then
17820   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
17821 else
17822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17823 for as_dir in $PATH
17824 do
17825   IFS=$as_save_IFS
17826   test -z "$as_dir" && as_dir=.
17827     for ac_exec_ext in '' $ac_executable_extensions; do
17828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17829     ac_cv_prog_ac_ct_STRIP="strip"
17830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17831     break 2
17832   fi
17833 done
17834   done
17835 IFS=$as_save_IFS
17836
17837 fi
17838 fi
17839 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
17840 if test -n "$ac_ct_STRIP"; then
17841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
17842 $as_echo "$ac_ct_STRIP" >&6; }
17843 else
17844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17845 $as_echo "no" >&6; }
17846 fi
17847
17848   if test "x$ac_ct_STRIP" = x; then
17849     STRIP=":"
17850   else
17851     case $cross_compiling:$ac_tool_warned in
17852 yes:)
17853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17854 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17855 ac_tool_warned=yes ;;
17856 esac
17857     STRIP=$ac_ct_STRIP
17858   fi
17859 else
17860   STRIP="$ac_cv_prog_STRIP"
17861 fi
17862
17863 test -z "$STRIP" && STRIP=:
17864
17865
17866
17867
17868
17869
17870 if test -n "$ac_tool_prefix"; then
17871   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
17872 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
17873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17874 $as_echo_n "checking for $ac_word... " >&6; }
17875 if ${ac_cv_prog_RANLIB+:} false; then :
17876   $as_echo_n "(cached) " >&6
17877 else
17878   if test -n "$RANLIB"; then
17879   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
17880 else
17881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17882 for as_dir in $PATH
17883 do
17884   IFS=$as_save_IFS
17885   test -z "$as_dir" && as_dir=.
17886     for ac_exec_ext in '' $ac_executable_extensions; do
17887   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17888     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
17889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17890     break 2
17891   fi
17892 done
17893   done
17894 IFS=$as_save_IFS
17895
17896 fi
17897 fi
17898 RANLIB=$ac_cv_prog_RANLIB
17899 if test -n "$RANLIB"; then
17900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
17901 $as_echo "$RANLIB" >&6; }
17902 else
17903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17904 $as_echo "no" >&6; }
17905 fi
17906
17907
17908 fi
17909 if test -z "$ac_cv_prog_RANLIB"; then
17910   ac_ct_RANLIB=$RANLIB
17911   # Extract the first word of "ranlib", so it can be a program name with args.
17912 set dummy ranlib; ac_word=$2
17913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17914 $as_echo_n "checking for $ac_word... " >&6; }
17915 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
17916   $as_echo_n "(cached) " >&6
17917 else
17918   if test -n "$ac_ct_RANLIB"; then
17919   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
17920 else
17921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17922 for as_dir in $PATH
17923 do
17924   IFS=$as_save_IFS
17925   test -z "$as_dir" && as_dir=.
17926     for ac_exec_ext in '' $ac_executable_extensions; do
17927   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17928     ac_cv_prog_ac_ct_RANLIB="ranlib"
17929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17930     break 2
17931   fi
17932 done
17933   done
17934 IFS=$as_save_IFS
17935
17936 fi
17937 fi
17938 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
17939 if test -n "$ac_ct_RANLIB"; then
17940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
17941 $as_echo "$ac_ct_RANLIB" >&6; }
17942 else
17943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17944 $as_echo "no" >&6; }
17945 fi
17946
17947   if test "x$ac_ct_RANLIB" = x; then
17948     RANLIB=":"
17949   else
17950     case $cross_compiling:$ac_tool_warned in
17951 yes:)
17952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17953 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17954 ac_tool_warned=yes ;;
17955 esac
17956     RANLIB=$ac_ct_RANLIB
17957   fi
17958 else
17959   RANLIB="$ac_cv_prog_RANLIB"
17960 fi
17961
17962 test -z "$RANLIB" && RANLIB=:
17963
17964
17965
17966
17967
17968
17969 # Determine commands to create old-style static archives.
17970 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
17971 old_postinstall_cmds='chmod 644 $oldlib'
17972 old_postuninstall_cmds=
17973
17974 if test -n "$RANLIB"; then
17975   case $host_os in
17976   openbsd*)
17977     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
17978     ;;
17979   *)
17980     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
17981     ;;
17982   esac
17983   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
17984 fi
17985
17986 case $host_os in
17987   darwin*)
17988     lock_old_archive_extraction=yes ;;
17989   *)
17990     lock_old_archive_extraction=no ;;
17991 esac
17992
17993
17994
17995
17996
17997
17998
17999
18000
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 # If no C compiler was specified, use CC.
18032 LTCC=${LTCC-"$CC"}
18033
18034 # If no C compiler flags were specified, use CFLAGS.
18035 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
18036
18037 # Allow CC to be a program name with arguments.
18038 compiler=$CC
18039
18040
18041 # Check for command to grab the raw symbol name followed by C symbol from nm.
18042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
18043 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
18044 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
18045   $as_echo_n "(cached) " >&6
18046 else
18047
18048 # These are sane defaults that work on at least a few old systems.
18049 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
18050
18051 # Character class describing NM global symbol codes.
18052 symcode='[BCDEGRST]'
18053
18054 # Regexp to match symbols that can be accessed directly from C.
18055 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
18056
18057 # Define system-specific variables.
18058 case $host_os in
18059 aix*)
18060   symcode='[BCDT]'
18061   ;;
18062 cygwin* | mingw* | pw32* | cegcc*)
18063   symcode='[ABCDGISTW]'
18064   ;;
18065 hpux*)
18066   if test "$host_cpu" = ia64; then
18067     symcode='[ABCDEGRST]'
18068   fi
18069   ;;
18070 irix* | nonstopux*)
18071   symcode='[BCDEGRST]'
18072   ;;
18073 osf*)
18074   symcode='[BCDEGQRST]'
18075   ;;
18076 solaris*)
18077   symcode='[BDRT]'
18078   ;;
18079 sco3.2v5*)
18080   symcode='[DT]'
18081   ;;
18082 sysv4.2uw2*)
18083   symcode='[DT]'
18084   ;;
18085 sysv5* | sco5v6* | unixware* | OpenUNIX*)
18086   symcode='[ABDT]'
18087   ;;
18088 sysv4)
18089   symcode='[DFNSTU]'
18090   ;;
18091 esac
18092
18093 # If we're using GNU nm, then use its standard symbol codes.
18094 case `$NM -V 2>&1` in
18095 *GNU* | *'with BFD'*)
18096   symcode='[ABCDGIRSTW]' ;;
18097 esac
18098
18099 # Transform an extracted symbol line into a proper C declaration.
18100 # Some systems (esp. on ia64) link data and code symbols differently,
18101 # so use this general approach.
18102 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
18103
18104 # Transform an extracted symbol line into symbol name and symbol address
18105 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
18106 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'"
18107
18108 # Handle CRLF in mingw tool chain
18109 opt_cr=
18110 case $build_os in
18111 mingw*)
18112   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
18113   ;;
18114 esac
18115
18116 # Try without a prefix underscore, then with it.
18117 for ac_symprfx in "" "_"; do
18118
18119   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
18120   symxfrm="\\1 $ac_symprfx\\2 \\2"
18121
18122   # Write the raw and C identifiers.
18123   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
18124     # Fake it for dumpbin and say T for any non-static function
18125     # and D for any global variable.
18126     # Also find C++ and __fastcall symbols from MSVC++,
18127     # which start with @ or ?.
18128     lt_cv_sys_global_symbol_pipe="$AWK '"\
18129 "     {last_section=section; section=\$ 3};"\
18130 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
18131 "     \$ 0!~/External *\|/{next};"\
18132 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
18133 "     {if(hide[section]) next};"\
18134 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
18135 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
18136 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
18137 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
18138 "     ' prfx=^$ac_symprfx"
18139   else
18140     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
18141   fi
18142   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
18143
18144   # Check to see that the pipe works correctly.
18145   pipe_works=no
18146
18147   rm -f conftest*
18148   cat > conftest.$ac_ext <<_LT_EOF
18149 #ifdef __cplusplus
18150 extern "C" {
18151 #endif
18152 char nm_test_var;
18153 void nm_test_func(void);
18154 void nm_test_func(void){}
18155 #ifdef __cplusplus
18156 }
18157 #endif
18158 int main(){nm_test_var='a';nm_test_func();return(0);}
18159 _LT_EOF
18160
18161   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18162   (eval $ac_compile) 2>&5
18163   ac_status=$?
18164   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18165   test $ac_status = 0; }; then
18166     # Now try to grab the symbols.
18167     nlist=conftest.nm
18168     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
18169   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
18170   ac_status=$?
18171   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18172   test $ac_status = 0; } && test -s "$nlist"; then
18173       # Try sorting and uniquifying the output.
18174       if sort "$nlist" | uniq > "$nlist"T; then
18175         mv -f "$nlist"T "$nlist"
18176       else
18177         rm -f "$nlist"T
18178       fi
18179
18180       # Make sure that we snagged all the symbols we need.
18181       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
18182         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
18183           cat <<_LT_EOF > conftest.$ac_ext
18184 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
18185 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
18186 /* DATA imports from DLLs on WIN32 con't be const, because runtime
18187    relocations are performed -- see ld's documentation on pseudo-relocs.  */
18188 # define LT_DLSYM_CONST
18189 #elif defined(__osf__)
18190 /* This system does not cope well with relocations in const data.  */
18191 # define LT_DLSYM_CONST
18192 #else
18193 # define LT_DLSYM_CONST const
18194 #endif
18195
18196 #ifdef __cplusplus
18197 extern "C" {
18198 #endif
18199
18200 _LT_EOF
18201           # Now generate the symbol file.
18202           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
18203
18204           cat <<_LT_EOF >> conftest.$ac_ext
18205
18206 /* The mapping between symbol names and symbols.  */
18207 LT_DLSYM_CONST struct {
18208   const char *name;
18209   void       *address;
18210 }
18211 lt__PROGRAM__LTX_preloaded_symbols[] =
18212 {
18213   { "@PROGRAM@", (void *) 0 },
18214 _LT_EOF
18215           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
18216           cat <<\_LT_EOF >> conftest.$ac_ext
18217   {0, (void *) 0}
18218 };
18219
18220 /* This works around a problem in FreeBSD linker */
18221 #ifdef FREEBSD_WORKAROUND
18222 static const void *lt_preloaded_setup() {
18223   return lt__PROGRAM__LTX_preloaded_symbols;
18224 }
18225 #endif
18226
18227 #ifdef __cplusplus
18228 }
18229 #endif
18230 _LT_EOF
18231           # Now try linking the two files.
18232           mv conftest.$ac_objext conftstm.$ac_objext
18233           lt_globsym_save_LIBS=$LIBS
18234           lt_globsym_save_CFLAGS=$CFLAGS
18235           LIBS="conftstm.$ac_objext"
18236           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
18237           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
18238   (eval $ac_link) 2>&5
18239   ac_status=$?
18240   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18241   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
18242             pipe_works=yes
18243           fi
18244           LIBS=$lt_globsym_save_LIBS
18245           CFLAGS=$lt_globsym_save_CFLAGS
18246         else
18247           echo "cannot find nm_test_func in $nlist" >&5
18248         fi
18249       else
18250         echo "cannot find nm_test_var in $nlist" >&5
18251       fi
18252     else
18253       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
18254     fi
18255   else
18256     echo "$progname: failed program was:" >&5
18257     cat conftest.$ac_ext >&5
18258   fi
18259   rm -rf conftest* conftst*
18260
18261   # Do not use the global_symbol_pipe unless it works.
18262   if test "$pipe_works" = yes; then
18263     break
18264   else
18265     lt_cv_sys_global_symbol_pipe=
18266   fi
18267 done
18268
18269 fi
18270
18271 if test -z "$lt_cv_sys_global_symbol_pipe"; then
18272   lt_cv_sys_global_symbol_to_cdecl=
18273 fi
18274 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
18275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
18276 $as_echo "failed" >&6; }
18277 else
18278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18279 $as_echo "ok" >&6; }
18280 fi
18281
18282 # Response file support.
18283 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
18284   nm_file_list_spec='@'
18285 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
18286   nm_file_list_spec='@'
18287 fi
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
18316 $as_echo_n "checking for sysroot... " >&6; }
18317
18318 # Check whether --with-sysroot was given.
18319 if test "${with_sysroot+set}" = set; then :
18320   withval=$with_sysroot;
18321 else
18322   with_sysroot=no
18323 fi
18324
18325
18326 lt_sysroot=
18327 case ${with_sysroot} in #(
18328  yes)
18329    if test "$GCC" = yes; then
18330      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
18331    fi
18332    ;; #(
18333  /*)
18334    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
18335    ;; #(
18336  no|'')
18337    ;; #(
18338  *)
18339    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
18340 $as_echo "${with_sysroot}" >&6; }
18341    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
18342    ;;
18343 esac
18344
18345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
18346 $as_echo "${lt_sysroot:-no}" >&6; }
18347
18348
18349
18350
18351
18352 # Check whether --enable-libtool-lock was given.
18353 if test "${enable_libtool_lock+set}" = set; then :
18354   enableval=$enable_libtool_lock;
18355 fi
18356
18357 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
18358
18359 # Some flags need to be propagated to the compiler or linker for good
18360 # libtool support.
18361 case $host in
18362 ia64-*-hpux*)
18363   # Find out which ABI we are using.
18364   echo 'int i;' > conftest.$ac_ext
18365   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18366   (eval $ac_compile) 2>&5
18367   ac_status=$?
18368   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18369   test $ac_status = 0; }; then
18370     case `/usr/bin/file conftest.$ac_objext` in
18371       *ELF-32*)
18372         HPUX_IA64_MODE="32"
18373         ;;
18374       *ELF-64*)
18375         HPUX_IA64_MODE="64"
18376         ;;
18377     esac
18378   fi
18379   rm -rf conftest*
18380   ;;
18381 *-*-irix6*)
18382   # Find out which ABI we are using.
18383   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
18384   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18385   (eval $ac_compile) 2>&5
18386   ac_status=$?
18387   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18388   test $ac_status = 0; }; then
18389     if test "$lt_cv_prog_gnu_ld" = yes; then
18390       case `/usr/bin/file conftest.$ac_objext` in
18391         *32-bit*)
18392           LD="${LD-ld} -melf32bsmip"
18393           ;;
18394         *N32*)
18395           LD="${LD-ld} -melf32bmipn32"
18396           ;;
18397         *64-bit*)
18398           LD="${LD-ld} -melf64bmip"
18399         ;;
18400       esac
18401     else
18402       case `/usr/bin/file conftest.$ac_objext` in
18403         *32-bit*)
18404           LD="${LD-ld} -32"
18405           ;;
18406         *N32*)
18407           LD="${LD-ld} -n32"
18408           ;;
18409         *64-bit*)
18410           LD="${LD-ld} -64"
18411           ;;
18412       esac
18413     fi
18414   fi
18415   rm -rf conftest*
18416   ;;
18417
18418 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
18419 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
18420   # Find out which ABI we are using.
18421   echo 'int i;' > conftest.$ac_ext
18422   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18423   (eval $ac_compile) 2>&5
18424   ac_status=$?
18425   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18426   test $ac_status = 0; }; then
18427     case `/usr/bin/file conftest.o` in
18428       *32-bit*)
18429         case $host in
18430           x86_64-*kfreebsd*-gnu)
18431             LD="${LD-ld} -m elf_i386_fbsd"
18432             ;;
18433           x86_64-*linux*)
18434             LD="${LD-ld} -m elf_i386"
18435             ;;
18436           ppc64-*linux*|powerpc64-*linux*)
18437             LD="${LD-ld} -m elf32ppclinux"
18438             ;;
18439           s390x-*linux*)
18440             LD="${LD-ld} -m elf_s390"
18441             ;;
18442           sparc64-*linux*)
18443             LD="${LD-ld} -m elf32_sparc"
18444             ;;
18445         esac
18446         ;;
18447       *64-bit*)
18448         case $host in
18449           x86_64-*kfreebsd*-gnu)
18450             LD="${LD-ld} -m elf_x86_64_fbsd"
18451             ;;
18452           x86_64-*linux*)
18453             LD="${LD-ld} -m elf_x86_64"
18454             ;;
18455           ppc*-*linux*|powerpc*-*linux*)
18456             LD="${LD-ld} -m elf64ppc"
18457             ;;
18458           s390*-*linux*|s390*-*tpf*)
18459             LD="${LD-ld} -m elf64_s390"
18460             ;;
18461           sparc*-*linux*)
18462             LD="${LD-ld} -m elf64_sparc"
18463             ;;
18464         esac
18465         ;;
18466     esac
18467   fi
18468   rm -rf conftest*
18469   ;;
18470
18471 *-*-sco3.2v5*)
18472   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
18473   SAVE_CFLAGS="$CFLAGS"
18474   CFLAGS="$CFLAGS -belf"
18475   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
18476 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
18477 if ${lt_cv_cc_needs_belf+:} false; then :
18478   $as_echo_n "(cached) " >&6
18479 else
18480   ac_ext=c
18481 ac_cpp='$CPP $CPPFLAGS'
18482 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18483 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18484 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18485
18486      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18487 /* end confdefs.h.  */
18488
18489 int
18490 main ()
18491 {
18492
18493   ;
18494   return 0;
18495 }
18496 _ACEOF
18497 if ac_fn_c_try_link "$LINENO"; then :
18498   lt_cv_cc_needs_belf=yes
18499 else
18500   lt_cv_cc_needs_belf=no
18501 fi
18502 rm -f core conftest.err conftest.$ac_objext \
18503     conftest$ac_exeext conftest.$ac_ext
18504      ac_ext=c
18505 ac_cpp='$CPP $CPPFLAGS'
18506 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18507 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18508 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18509
18510 fi
18511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
18512 $as_echo "$lt_cv_cc_needs_belf" >&6; }
18513   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
18514     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
18515     CFLAGS="$SAVE_CFLAGS"
18516   fi
18517   ;;
18518 sparc*-*solaris*)
18519   # Find out which ABI we are using.
18520   echo 'int i;' > conftest.$ac_ext
18521   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18522   (eval $ac_compile) 2>&5
18523   ac_status=$?
18524   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18525   test $ac_status = 0; }; then
18526     case `/usr/bin/file conftest.o` in
18527     *64-bit*)
18528       case $lt_cv_prog_gnu_ld in
18529       yes*) LD="${LD-ld} -m elf64_sparc" ;;
18530       *)
18531         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
18532           LD="${LD-ld} -64"
18533         fi
18534         ;;
18535       esac
18536       ;;
18537     esac
18538   fi
18539   rm -rf conftest*
18540   ;;
18541 esac
18542
18543 need_locks="$enable_libtool_lock"
18544
18545 if test -n "$ac_tool_prefix"; then
18546   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
18547 set dummy ${ac_tool_prefix}mt; ac_word=$2
18548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18549 $as_echo_n "checking for $ac_word... " >&6; }
18550 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
18551   $as_echo_n "(cached) " >&6
18552 else
18553   if test -n "$MANIFEST_TOOL"; then
18554   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
18555 else
18556 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18557 for as_dir in $PATH
18558 do
18559   IFS=$as_save_IFS
18560   test -z "$as_dir" && as_dir=.
18561     for ac_exec_ext in '' $ac_executable_extensions; do
18562   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18563     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
18564     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18565     break 2
18566   fi
18567 done
18568   done
18569 IFS=$as_save_IFS
18570
18571 fi
18572 fi
18573 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
18574 if test -n "$MANIFEST_TOOL"; then
18575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
18576 $as_echo "$MANIFEST_TOOL" >&6; }
18577 else
18578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18579 $as_echo "no" >&6; }
18580 fi
18581
18582
18583 fi
18584 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
18585   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
18586   # Extract the first word of "mt", so it can be a program name with args.
18587 set dummy mt; ac_word=$2
18588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18589 $as_echo_n "checking for $ac_word... " >&6; }
18590 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
18591   $as_echo_n "(cached) " >&6
18592 else
18593   if test -n "$ac_ct_MANIFEST_TOOL"; then
18594   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
18595 else
18596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18597 for as_dir in $PATH
18598 do
18599   IFS=$as_save_IFS
18600   test -z "$as_dir" && as_dir=.
18601     for ac_exec_ext in '' $ac_executable_extensions; do
18602   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18603     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
18604     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18605     break 2
18606   fi
18607 done
18608   done
18609 IFS=$as_save_IFS
18610
18611 fi
18612 fi
18613 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
18614 if test -n "$ac_ct_MANIFEST_TOOL"; then
18615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
18616 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
18617 else
18618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18619 $as_echo "no" >&6; }
18620 fi
18621
18622   if test "x$ac_ct_MANIFEST_TOOL" = x; then
18623     MANIFEST_TOOL=":"
18624   else
18625     case $cross_compiling:$ac_tool_warned in
18626 yes:)
18627 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18628 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18629 ac_tool_warned=yes ;;
18630 esac
18631     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
18632   fi
18633 else
18634   MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
18635 fi
18636
18637 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
18638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
18639 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
18640 if ${lt_cv_path_mainfest_tool+:} false; then :
18641   $as_echo_n "(cached) " >&6
18642 else
18643   lt_cv_path_mainfest_tool=no
18644   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
18645   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
18646   cat conftest.err >&5
18647   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
18648     lt_cv_path_mainfest_tool=yes
18649   fi
18650   rm -f conftest*
18651 fi
18652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
18653 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
18654 if test "x$lt_cv_path_mainfest_tool" != xyes; then
18655   MANIFEST_TOOL=:
18656 fi
18657
18658
18659
18660
18661
18662
18663   case $host_os in
18664     rhapsody* | darwin*)
18665     if test -n "$ac_tool_prefix"; then
18666   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
18667 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
18668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18669 $as_echo_n "checking for $ac_word... " >&6; }
18670 if ${ac_cv_prog_DSYMUTIL+:} false; then :
18671   $as_echo_n "(cached) " >&6
18672 else
18673   if test -n "$DSYMUTIL"; then
18674   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
18675 else
18676 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18677 for as_dir in $PATH
18678 do
18679   IFS=$as_save_IFS
18680   test -z "$as_dir" && as_dir=.
18681     for ac_exec_ext in '' $ac_executable_extensions; do
18682   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18683     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
18684     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18685     break 2
18686   fi
18687 done
18688   done
18689 IFS=$as_save_IFS
18690
18691 fi
18692 fi
18693 DSYMUTIL=$ac_cv_prog_DSYMUTIL
18694 if test -n "$DSYMUTIL"; then
18695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18696 $as_echo "$DSYMUTIL" >&6; }
18697 else
18698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18699 $as_echo "no" >&6; }
18700 fi
18701
18702
18703 fi
18704 if test -z "$ac_cv_prog_DSYMUTIL"; then
18705   ac_ct_DSYMUTIL=$DSYMUTIL
18706   # Extract the first word of "dsymutil", so it can be a program name with args.
18707 set dummy dsymutil; ac_word=$2
18708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18709 $as_echo_n "checking for $ac_word... " >&6; }
18710 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
18711   $as_echo_n "(cached) " >&6
18712 else
18713   if test -n "$ac_ct_DSYMUTIL"; then
18714   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
18715 else
18716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18717 for as_dir in $PATH
18718 do
18719   IFS=$as_save_IFS
18720   test -z "$as_dir" && as_dir=.
18721     for ac_exec_ext in '' $ac_executable_extensions; do
18722   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18723     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
18724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18725     break 2
18726   fi
18727 done
18728   done
18729 IFS=$as_save_IFS
18730
18731 fi
18732 fi
18733 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
18734 if test -n "$ac_ct_DSYMUTIL"; then
18735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
18736 $as_echo "$ac_ct_DSYMUTIL" >&6; }
18737 else
18738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18739 $as_echo "no" >&6; }
18740 fi
18741
18742   if test "x$ac_ct_DSYMUTIL" = x; then
18743     DSYMUTIL=":"
18744   else
18745     case $cross_compiling:$ac_tool_warned in
18746 yes:)
18747 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18748 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18749 ac_tool_warned=yes ;;
18750 esac
18751     DSYMUTIL=$ac_ct_DSYMUTIL
18752   fi
18753 else
18754   DSYMUTIL="$ac_cv_prog_DSYMUTIL"
18755 fi
18756
18757     if test -n "$ac_tool_prefix"; then
18758   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
18759 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
18760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18761 $as_echo_n "checking for $ac_word... " >&6; }
18762 if ${ac_cv_prog_NMEDIT+:} false; then :
18763   $as_echo_n "(cached) " >&6
18764 else
18765   if test -n "$NMEDIT"; then
18766   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
18767 else
18768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18769 for as_dir in $PATH
18770 do
18771   IFS=$as_save_IFS
18772   test -z "$as_dir" && as_dir=.
18773     for ac_exec_ext in '' $ac_executable_extensions; do
18774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18775     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
18776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18777     break 2
18778   fi
18779 done
18780   done
18781 IFS=$as_save_IFS
18782
18783 fi
18784 fi
18785 NMEDIT=$ac_cv_prog_NMEDIT
18786 if test -n "$NMEDIT"; then
18787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
18788 $as_echo "$NMEDIT" >&6; }
18789 else
18790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18791 $as_echo "no" >&6; }
18792 fi
18793
18794
18795 fi
18796 if test -z "$ac_cv_prog_NMEDIT"; then
18797   ac_ct_NMEDIT=$NMEDIT
18798   # Extract the first word of "nmedit", so it can be a program name with args.
18799 set dummy nmedit; ac_word=$2
18800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18801 $as_echo_n "checking for $ac_word... " >&6; }
18802 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
18803   $as_echo_n "(cached) " >&6
18804 else
18805   if test -n "$ac_ct_NMEDIT"; then
18806   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
18807 else
18808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18809 for as_dir in $PATH
18810 do
18811   IFS=$as_save_IFS
18812   test -z "$as_dir" && as_dir=.
18813     for ac_exec_ext in '' $ac_executable_extensions; do
18814   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18815     ac_cv_prog_ac_ct_NMEDIT="nmedit"
18816     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18817     break 2
18818   fi
18819 done
18820   done
18821 IFS=$as_save_IFS
18822
18823 fi
18824 fi
18825 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
18826 if test -n "$ac_ct_NMEDIT"; then
18827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
18828 $as_echo "$ac_ct_NMEDIT" >&6; }
18829 else
18830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18831 $as_echo "no" >&6; }
18832 fi
18833
18834   if test "x$ac_ct_NMEDIT" = x; then
18835     NMEDIT=":"
18836   else
18837     case $cross_compiling:$ac_tool_warned in
18838 yes:)
18839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18840 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18841 ac_tool_warned=yes ;;
18842 esac
18843     NMEDIT=$ac_ct_NMEDIT
18844   fi
18845 else
18846   NMEDIT="$ac_cv_prog_NMEDIT"
18847 fi
18848
18849     if test -n "$ac_tool_prefix"; then
18850   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
18851 set dummy ${ac_tool_prefix}lipo; ac_word=$2
18852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18853 $as_echo_n "checking for $ac_word... " >&6; }
18854 if ${ac_cv_prog_LIPO+:} false; then :
18855   $as_echo_n "(cached) " >&6
18856 else
18857   if test -n "$LIPO"; then
18858   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
18859 else
18860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18861 for as_dir in $PATH
18862 do
18863   IFS=$as_save_IFS
18864   test -z "$as_dir" && as_dir=.
18865     for ac_exec_ext in '' $ac_executable_extensions; do
18866   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18867     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
18868     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18869     break 2
18870   fi
18871 done
18872   done
18873 IFS=$as_save_IFS
18874
18875 fi
18876 fi
18877 LIPO=$ac_cv_prog_LIPO
18878 if test -n "$LIPO"; then
18879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
18880 $as_echo "$LIPO" >&6; }
18881 else
18882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18883 $as_echo "no" >&6; }
18884 fi
18885
18886
18887 fi
18888 if test -z "$ac_cv_prog_LIPO"; then
18889   ac_ct_LIPO=$LIPO
18890   # Extract the first word of "lipo", so it can be a program name with args.
18891 set dummy lipo; ac_word=$2
18892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18893 $as_echo_n "checking for $ac_word... " >&6; }
18894 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
18895   $as_echo_n "(cached) " >&6
18896 else
18897   if test -n "$ac_ct_LIPO"; then
18898   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
18899 else
18900 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18901 for as_dir in $PATH
18902 do
18903   IFS=$as_save_IFS
18904   test -z "$as_dir" && as_dir=.
18905     for ac_exec_ext in '' $ac_executable_extensions; do
18906   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18907     ac_cv_prog_ac_ct_LIPO="lipo"
18908     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18909     break 2
18910   fi
18911 done
18912   done
18913 IFS=$as_save_IFS
18914
18915 fi
18916 fi
18917 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
18918 if test -n "$ac_ct_LIPO"; then
18919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
18920 $as_echo "$ac_ct_LIPO" >&6; }
18921 else
18922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18923 $as_echo "no" >&6; }
18924 fi
18925
18926   if test "x$ac_ct_LIPO" = x; then
18927     LIPO=":"
18928   else
18929     case $cross_compiling:$ac_tool_warned in
18930 yes:)
18931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18932 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18933 ac_tool_warned=yes ;;
18934 esac
18935     LIPO=$ac_ct_LIPO
18936   fi
18937 else
18938   LIPO="$ac_cv_prog_LIPO"
18939 fi
18940
18941     if test -n "$ac_tool_prefix"; then
18942   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
18943 set dummy ${ac_tool_prefix}otool; ac_word=$2
18944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18945 $as_echo_n "checking for $ac_word... " >&6; }
18946 if ${ac_cv_prog_OTOOL+:} false; then :
18947   $as_echo_n "(cached) " >&6
18948 else
18949   if test -n "$OTOOL"; then
18950   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
18951 else
18952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18953 for as_dir in $PATH
18954 do
18955   IFS=$as_save_IFS
18956   test -z "$as_dir" && as_dir=.
18957     for ac_exec_ext in '' $ac_executable_extensions; do
18958   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18959     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
18960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18961     break 2
18962   fi
18963 done
18964   done
18965 IFS=$as_save_IFS
18966
18967 fi
18968 fi
18969 OTOOL=$ac_cv_prog_OTOOL
18970 if test -n "$OTOOL"; then
18971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18972 $as_echo "$OTOOL" >&6; }
18973 else
18974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18975 $as_echo "no" >&6; }
18976 fi
18977
18978
18979 fi
18980 if test -z "$ac_cv_prog_OTOOL"; then
18981   ac_ct_OTOOL=$OTOOL
18982   # Extract the first word of "otool", so it can be a program name with args.
18983 set dummy otool; ac_word=$2
18984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18985 $as_echo_n "checking for $ac_word... " >&6; }
18986 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
18987   $as_echo_n "(cached) " >&6
18988 else
18989   if test -n "$ac_ct_OTOOL"; then
18990   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
18991 else
18992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18993 for as_dir in $PATH
18994 do
18995   IFS=$as_save_IFS
18996   test -z "$as_dir" && as_dir=.
18997     for ac_exec_ext in '' $ac_executable_extensions; do
18998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18999     ac_cv_prog_ac_ct_OTOOL="otool"
19000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19001     break 2
19002   fi
19003 done
19004   done
19005 IFS=$as_save_IFS
19006
19007 fi
19008 fi
19009 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
19010 if test -n "$ac_ct_OTOOL"; then
19011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
19012 $as_echo "$ac_ct_OTOOL" >&6; }
19013 else
19014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19015 $as_echo "no" >&6; }
19016 fi
19017
19018   if test "x$ac_ct_OTOOL" = x; then
19019     OTOOL=":"
19020   else
19021     case $cross_compiling:$ac_tool_warned in
19022 yes:)
19023 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19024 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19025 ac_tool_warned=yes ;;
19026 esac
19027     OTOOL=$ac_ct_OTOOL
19028   fi
19029 else
19030   OTOOL="$ac_cv_prog_OTOOL"
19031 fi
19032
19033     if test -n "$ac_tool_prefix"; then
19034   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
19035 set dummy ${ac_tool_prefix}otool64; ac_word=$2
19036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19037 $as_echo_n "checking for $ac_word... " >&6; }
19038 if ${ac_cv_prog_OTOOL64+:} false; then :
19039   $as_echo_n "(cached) " >&6
19040 else
19041   if test -n "$OTOOL64"; then
19042   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
19043 else
19044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19045 for as_dir in $PATH
19046 do
19047   IFS=$as_save_IFS
19048   test -z "$as_dir" && as_dir=.
19049     for ac_exec_ext in '' $ac_executable_extensions; do
19050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19051     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
19052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19053     break 2
19054   fi
19055 done
19056   done
19057 IFS=$as_save_IFS
19058
19059 fi
19060 fi
19061 OTOOL64=$ac_cv_prog_OTOOL64
19062 if test -n "$OTOOL64"; then
19063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
19064 $as_echo "$OTOOL64" >&6; }
19065 else
19066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19067 $as_echo "no" >&6; }
19068 fi
19069
19070
19071 fi
19072 if test -z "$ac_cv_prog_OTOOL64"; then
19073   ac_ct_OTOOL64=$OTOOL64
19074   # Extract the first word of "otool64", so it can be a program name with args.
19075 set dummy otool64; ac_word=$2
19076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19077 $as_echo_n "checking for $ac_word... " >&6; }
19078 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
19079   $as_echo_n "(cached) " >&6
19080 else
19081   if test -n "$ac_ct_OTOOL64"; then
19082   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
19083 else
19084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19085 for as_dir in $PATH
19086 do
19087   IFS=$as_save_IFS
19088   test -z "$as_dir" && as_dir=.
19089     for ac_exec_ext in '' $ac_executable_extensions; do
19090   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19091     ac_cv_prog_ac_ct_OTOOL64="otool64"
19092     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19093     break 2
19094   fi
19095 done
19096   done
19097 IFS=$as_save_IFS
19098
19099 fi
19100 fi
19101 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
19102 if test -n "$ac_ct_OTOOL64"; then
19103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
19104 $as_echo "$ac_ct_OTOOL64" >&6; }
19105 else
19106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19107 $as_echo "no" >&6; }
19108 fi
19109
19110   if test "x$ac_ct_OTOOL64" = x; then
19111     OTOOL64=":"
19112   else
19113     case $cross_compiling:$ac_tool_warned in
19114 yes:)
19115 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19116 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19117 ac_tool_warned=yes ;;
19118 esac
19119     OTOOL64=$ac_ct_OTOOL64
19120   fi
19121 else
19122   OTOOL64="$ac_cv_prog_OTOOL64"
19123 fi
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
19152 $as_echo_n "checking for -single_module linker flag... " >&6; }
19153 if ${lt_cv_apple_cc_single_mod+:} false; then :
19154   $as_echo_n "(cached) " >&6
19155 else
19156   lt_cv_apple_cc_single_mod=no
19157       if test -z "${LT_MULTI_MODULE}"; then
19158         # By default we will add the -single_module flag. You can override
19159         # by either setting the environment variable LT_MULTI_MODULE
19160         # non-empty at configure time, or by adding -multi_module to the
19161         # link flags.
19162         rm -rf libconftest.dylib*
19163         echo "int foo(void){return 1;}" > conftest.c
19164         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
19165 -dynamiclib -Wl,-single_module conftest.c" >&5
19166         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
19167           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
19168         _lt_result=$?
19169         if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
19170           lt_cv_apple_cc_single_mod=yes
19171         else
19172           cat conftest.err >&5
19173         fi
19174         rm -rf libconftest.dylib*
19175         rm -f conftest.*
19176       fi
19177 fi
19178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
19179 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
19180     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
19181 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
19182 if ${lt_cv_ld_exported_symbols_list+:} false; then :
19183   $as_echo_n "(cached) " >&6
19184 else
19185   lt_cv_ld_exported_symbols_list=no
19186       save_LDFLAGS=$LDFLAGS
19187       echo "_main" > conftest.sym
19188       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
19189       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19190 /* end confdefs.h.  */
19191
19192 int
19193 main ()
19194 {
19195
19196   ;
19197   return 0;
19198 }
19199 _ACEOF
19200 if ac_fn_c_try_link "$LINENO"; then :
19201   lt_cv_ld_exported_symbols_list=yes
19202 else
19203   lt_cv_ld_exported_symbols_list=no
19204 fi
19205 rm -f core conftest.err conftest.$ac_objext \
19206     conftest$ac_exeext conftest.$ac_ext
19207         LDFLAGS="$save_LDFLAGS"
19208
19209 fi
19210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
19211 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
19212     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
19213 $as_echo_n "checking for -force_load linker flag... " >&6; }
19214 if ${lt_cv_ld_force_load+:} false; then :
19215   $as_echo_n "(cached) " >&6
19216 else
19217   lt_cv_ld_force_load=no
19218       cat > conftest.c << _LT_EOF
19219 int forced_loaded() { return 2;}
19220 _LT_EOF
19221       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
19222       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
19223       echo "$AR cru libconftest.a conftest.o" >&5
19224       $AR cru libconftest.a conftest.o 2>&5
19225       echo "$RANLIB libconftest.a" >&5
19226       $RANLIB libconftest.a 2>&5
19227       cat > conftest.c << _LT_EOF
19228 int main() { return 0;}
19229 _LT_EOF
19230       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
19231       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
19232       _lt_result=$?
19233       if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
19234         lt_cv_ld_force_load=yes
19235       else
19236         cat conftest.err >&5
19237       fi
19238         rm -f conftest.err libconftest.a conftest conftest.c
19239         rm -rf conftest.dSYM
19240
19241 fi
19242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
19243 $as_echo "$lt_cv_ld_force_load" >&6; }
19244     case $host_os in
19245     rhapsody* | darwin1.[012])
19246       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
19247     darwin1.*)
19248       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
19249     darwin*) # darwin 5.x on
19250       # if running on 10.5 or later, the deployment target defaults
19251       # to the OS version, if on x86, and 10.4, the deployment
19252       # target defaults to 10.4. Don't you love it?
19253       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
19254         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
19255           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
19256         10.[012]*)
19257           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
19258         10.*)
19259           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
19260       esac
19261     ;;
19262   esac
19263     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
19264       _lt_dar_single_mod='$single_module'
19265     fi
19266     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
19267       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
19268     else
19269       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
19270     fi
19271     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
19272       _lt_dsymutil='~$DSYMUTIL $lib || :'
19273     else
19274       _lt_dsymutil=
19275     fi
19276     ;;
19277   esac
19278
19279 for ac_header in dlfcn.h
19280 do :
19281   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
19282 "
19283 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
19284   cat >>confdefs.h <<_ACEOF
19285 #define HAVE_DLFCN_H 1
19286 _ACEOF
19287
19288 fi
19289
19290 done
19291
19292
19293
19294
19295
19296 # Set options
19297
19298
19299
19300         enable_dlopen=no
19301
19302
19303   enable_win32_dll=no
19304
19305
19306
19307   # Check whether --enable-static was given.
19308 if test "${enable_static+set}" = set; then :
19309   enableval=$enable_static; p=${PACKAGE-default}
19310     case $enableval in
19311     yes) enable_static=yes ;;
19312     no) enable_static=no ;;
19313     *)
19314      enable_static=no
19315       # Look at the argument we got.  We use all the common list separators.
19316       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
19317       for pkg in $enableval; do
19318         IFS="$lt_save_ifs"
19319         if test "X$pkg" = "X$p"; then
19320           enable_static=yes
19321         fi
19322       done
19323       IFS="$lt_save_ifs"
19324       ;;
19325     esac
19326 else
19327   enable_static=yes
19328 fi
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339 # Check whether --with-pic was given.
19340 if test "${with_pic+set}" = set; then :
19341   withval=$with_pic; pic_mode="$withval"
19342 else
19343   pic_mode=default
19344 fi
19345
19346
19347 test -z "$pic_mode" && pic_mode=default
19348
19349
19350
19351
19352
19353
19354
19355   # Check whether --enable-fast-install was given.
19356 if test "${enable_fast_install+set}" = set; then :
19357   enableval=$enable_fast_install; p=${PACKAGE-default}
19358     case $enableval in
19359     yes) enable_fast_install=yes ;;
19360     no) enable_fast_install=no ;;
19361     *)
19362       enable_fast_install=no
19363       # Look at the argument we got.  We use all the common list separators.
19364       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
19365       for pkg in $enableval; do
19366         IFS="$lt_save_ifs"
19367         if test "X$pkg" = "X$p"; then
19368           enable_fast_install=yes
19369         fi
19370       done
19371       IFS="$lt_save_ifs"
19372       ;;
19373     esac
19374 else
19375   enable_fast_install=yes
19376 fi
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388 # This can be used to rebuild libtool when needed
19389 LIBTOOL_DEPS="$ltmain"
19390
19391 # Always use our own libtool.
19392 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419 test -z "$LN_S" && LN_S="ln -s"
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434 if test -n "${ZSH_VERSION+set}" ; then
19435    setopt NO_GLOB_SUBST
19436 fi
19437
19438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
19439 $as_echo_n "checking for objdir... " >&6; }
19440 if ${lt_cv_objdir+:} false; then :
19441   $as_echo_n "(cached) " >&6
19442 else
19443   rm -f .libs 2>/dev/null
19444 mkdir .libs 2>/dev/null
19445 if test -d .libs; then
19446   lt_cv_objdir=.libs
19447 else
19448   # MS-DOS does not allow filenames that begin with a dot.
19449   lt_cv_objdir=_libs
19450 fi
19451 rmdir .libs 2>/dev/null
19452 fi
19453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
19454 $as_echo "$lt_cv_objdir" >&6; }
19455 objdir=$lt_cv_objdir
19456
19457
19458
19459
19460
19461 cat >>confdefs.h <<_ACEOF
19462 #define LT_OBJDIR "$lt_cv_objdir/"
19463 _ACEOF
19464
19465
19466
19467
19468 case $host_os in
19469 aix3*)
19470   # AIX sometimes has problems with the GCC collect2 program.  For some
19471   # reason, if we set the COLLECT_NAMES environment variable, the problems
19472   # vanish in a puff of smoke.
19473   if test "X${COLLECT_NAMES+set}" != Xset; then
19474     COLLECT_NAMES=
19475     export COLLECT_NAMES
19476   fi
19477   ;;
19478 esac
19479
19480 # Global variables:
19481 ofile=libtool
19482 can_build_shared=yes
19483
19484 # All known linkers require a `.a' archive for static linking (except MSVC,
19485 # which needs '.lib').
19486 libext=a
19487
19488 with_gnu_ld="$lt_cv_prog_gnu_ld"
19489
19490 old_CC="$CC"
19491 old_CFLAGS="$CFLAGS"
19492
19493 # Set sane defaults for various variables
19494 test -z "$CC" && CC=cc
19495 test -z "$LTCC" && LTCC=$CC
19496 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
19497 test -z "$LD" && LD=ld
19498 test -z "$ac_objext" && ac_objext=o
19499
19500 for cc_temp in $compiler""; do
19501   case $cc_temp in
19502     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
19503     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
19504     \-*) ;;
19505     *) break;;
19506   esac
19507 done
19508 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
19509
19510
19511 # Only perform the check for file, if the check method requires it
19512 test -z "$MAGIC_CMD" && MAGIC_CMD=file
19513 case $deplibs_check_method in
19514 file_magic*)
19515   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
19516     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
19517 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
19518 if ${lt_cv_path_MAGIC_CMD+:} false; then :
19519   $as_echo_n "(cached) " >&6
19520 else
19521   case $MAGIC_CMD in
19522 [\\/*] |  ?:[\\/]*)
19523   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
19524   ;;
19525 *)
19526   lt_save_MAGIC_CMD="$MAGIC_CMD"
19527   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
19528   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
19529   for ac_dir in $ac_dummy; do
19530     IFS="$lt_save_ifs"
19531     test -z "$ac_dir" && ac_dir=.
19532     if test -f $ac_dir/${ac_tool_prefix}file; then
19533       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
19534       if test -n "$file_magic_test_file"; then
19535         case $deplibs_check_method in
19536         "file_magic "*)
19537           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
19538           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19539           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
19540             $EGREP "$file_magic_regex" > /dev/null; then
19541             :
19542           else
19543             cat <<_LT_EOF 1>&2
19544
19545 *** Warning: the command libtool uses to detect shared libraries,
19546 *** $file_magic_cmd, produces output that libtool cannot recognize.
19547 *** The result is that libtool may fail to recognize shared libraries
19548 *** as such.  This will affect the creation of libtool libraries that
19549 *** depend on shared libraries, but programs linked with such libtool
19550 *** libraries will work regardless of this problem.  Nevertheless, you
19551 *** may want to report the problem to your system manager and/or to
19552 *** bug-libtool@gnu.org
19553
19554 _LT_EOF
19555           fi ;;
19556         esac
19557       fi
19558       break
19559     fi
19560   done
19561   IFS="$lt_save_ifs"
19562   MAGIC_CMD="$lt_save_MAGIC_CMD"
19563   ;;
19564 esac
19565 fi
19566
19567 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19568 if test -n "$MAGIC_CMD"; then
19569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
19570 $as_echo "$MAGIC_CMD" >&6; }
19571 else
19572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19573 $as_echo "no" >&6; }
19574 fi
19575
19576
19577
19578
19579
19580 if test -z "$lt_cv_path_MAGIC_CMD"; then
19581   if test -n "$ac_tool_prefix"; then
19582     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
19583 $as_echo_n "checking for file... " >&6; }
19584 if ${lt_cv_path_MAGIC_CMD+:} false; then :
19585   $as_echo_n "(cached) " >&6
19586 else
19587   case $MAGIC_CMD in
19588 [\\/*] |  ?:[\\/]*)
19589   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
19590   ;;
19591 *)
19592   lt_save_MAGIC_CMD="$MAGIC_CMD"
19593   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
19594   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
19595   for ac_dir in $ac_dummy; do
19596     IFS="$lt_save_ifs"
19597     test -z "$ac_dir" && ac_dir=.
19598     if test -f $ac_dir/file; then
19599       lt_cv_path_MAGIC_CMD="$ac_dir/file"
19600       if test -n "$file_magic_test_file"; then
19601         case $deplibs_check_method in
19602         "file_magic "*)
19603           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
19604           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19605           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
19606             $EGREP "$file_magic_regex" > /dev/null; then
19607             :
19608           else
19609             cat <<_LT_EOF 1>&2
19610
19611 *** Warning: the command libtool uses to detect shared libraries,
19612 *** $file_magic_cmd, produces output that libtool cannot recognize.
19613 *** The result is that libtool may fail to recognize shared libraries
19614 *** as such.  This will affect the creation of libtool libraries that
19615 *** depend on shared libraries, but programs linked with such libtool
19616 *** libraries will work regardless of this problem.  Nevertheless, you
19617 *** may want to report the problem to your system manager and/or to
19618 *** bug-libtool@gnu.org
19619
19620 _LT_EOF
19621           fi ;;
19622         esac
19623       fi
19624       break
19625     fi
19626   done
19627   IFS="$lt_save_ifs"
19628   MAGIC_CMD="$lt_save_MAGIC_CMD"
19629   ;;
19630 esac
19631 fi
19632
19633 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19634 if test -n "$MAGIC_CMD"; then
19635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
19636 $as_echo "$MAGIC_CMD" >&6; }
19637 else
19638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19639 $as_echo "no" >&6; }
19640 fi
19641
19642
19643   else
19644     MAGIC_CMD=:
19645   fi
19646 fi
19647
19648   fi
19649   ;;
19650 esac
19651
19652 # Use C for the default configuration in the libtool script
19653
19654 lt_save_CC="$CC"
19655 ac_ext=c
19656 ac_cpp='$CPP $CPPFLAGS'
19657 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19658 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19659 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19660
19661
19662 # Source file extension for C test sources.
19663 ac_ext=c
19664
19665 # Object file extension for compiled C test sources.
19666 objext=o
19667 objext=$objext
19668
19669 # Code to be used in simple compile tests
19670 lt_simple_compile_test_code="int some_variable = 0;"
19671
19672 # Code to be used in simple link tests
19673 lt_simple_link_test_code='int main(){return(0);}'
19674
19675
19676
19677
19678
19679
19680
19681 # If no C compiler was specified, use CC.
19682 LTCC=${LTCC-"$CC"}
19683
19684 # If no C compiler flags were specified, use CFLAGS.
19685 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
19686
19687 # Allow CC to be a program name with arguments.
19688 compiler=$CC
19689
19690 # Save the default compiler, since it gets overwritten when the other
19691 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
19692 compiler_DEFAULT=$CC
19693
19694 # save warnings/boilerplate of simple test code
19695 ac_outfile=conftest.$ac_objext
19696 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
19697 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19698 _lt_compiler_boilerplate=`cat conftest.err`
19699 $RM conftest*
19700
19701 ac_outfile=conftest.$ac_objext
19702 echo "$lt_simple_link_test_code" >conftest.$ac_ext
19703 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19704 _lt_linker_boilerplate=`cat conftest.err`
19705 $RM -r conftest*
19706
19707
19708 ## CAVEAT EMPTOR:
19709 ## There is no encapsulation within the following macros, do not change
19710 ## the running order or otherwise move them around unless you know exactly
19711 ## what you are doing...
19712 if test -n "$compiler"; then
19713
19714 lt_prog_compiler_no_builtin_flag=
19715
19716 if test "$GCC" = yes; then
19717   case $cc_basename in
19718   nvcc*)
19719     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
19720   *)
19721     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
19722   esac
19723
19724   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
19725 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
19726 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
19727   $as_echo_n "(cached) " >&6
19728 else
19729   lt_cv_prog_compiler_rtti_exceptions=no
19730    ac_outfile=conftest.$ac_objext
19731    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19732    lt_compiler_flag="-fno-rtti -fno-exceptions"
19733    # Insert the option either (1) after the last *FLAGS variable, or
19734    # (2) before a word containing "conftest.", or (3) at the end.
19735    # Note that $ac_compile itself does not contain backslashes and begins
19736    # with a dollar sign (not a hyphen), so the echo should work correctly.
19737    # The option is referenced via a variable to avoid confusing sed.
19738    lt_compile=`echo "$ac_compile" | $SED \
19739    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19740    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19741    -e 's:$: $lt_compiler_flag:'`
19742    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19743    (eval "$lt_compile" 2>conftest.err)
19744    ac_status=$?
19745    cat conftest.err >&5
19746    echo "$as_me:$LINENO: \$? = $ac_status" >&5
19747    if (exit $ac_status) && test -s "$ac_outfile"; then
19748      # The compiler can only warn and ignore the option if not recognized
19749      # So say no if there are warnings other than the usual output.
19750      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
19751      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19752      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
19753        lt_cv_prog_compiler_rtti_exceptions=yes
19754      fi
19755    fi
19756    $RM conftest*
19757
19758 fi
19759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
19760 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
19761
19762 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
19763     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
19764 else
19765     :
19766 fi
19767
19768 fi
19769
19770
19771
19772
19773
19774
19775   lt_prog_compiler_wl=
19776 lt_prog_compiler_pic=
19777 lt_prog_compiler_static=
19778
19779
19780   if test "$GCC" = yes; then
19781     lt_prog_compiler_wl='-Wl,'
19782     lt_prog_compiler_static='-static'
19783
19784     case $host_os in
19785       aix*)
19786       # All AIX code is PIC.
19787       if test "$host_cpu" = ia64; then
19788         # AIX 5 now supports IA64 processor
19789         lt_prog_compiler_static='-Bstatic'
19790       fi
19791       ;;
19792
19793     amigaos*)
19794       case $host_cpu in
19795       powerpc)
19796             # see comment about AmigaOS4 .so support
19797             lt_prog_compiler_pic='-fPIC'
19798         ;;
19799       m68k)
19800             # FIXME: we need at least 68020 code to build shared libraries, but
19801             # adding the `-m68020' flag to GCC prevents building anything better,
19802             # like `-m68040'.
19803             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
19804         ;;
19805       esac
19806       ;;
19807
19808     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
19809       # PIC is the default for these OSes.
19810       ;;
19811
19812     mingw* | cygwin* | pw32* | os2* | cegcc*)
19813       # This hack is so that the source file can tell whether it is being
19814       # built for inclusion in a dll (and should export symbols for example).
19815       # Although the cygwin gcc ignores -fPIC, still need this for old-style
19816       # (--disable-auto-import) libraries
19817       lt_prog_compiler_pic='-DDLL_EXPORT'
19818       ;;
19819
19820     darwin* | rhapsody*)
19821       # PIC is the default on this platform
19822       # Common symbols not allowed in MH_DYLIB files
19823       lt_prog_compiler_pic='-fno-common'
19824       ;;
19825
19826     haiku*)
19827       # PIC is the default for Haiku.
19828       # The "-static" flag exists, but is broken.
19829       lt_prog_compiler_static=
19830       ;;
19831
19832     hpux*)
19833       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
19834       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
19835       # sets the default TLS model and affects inlining.
19836       case $host_cpu in
19837       hppa*64*)
19838         # +Z the default
19839         ;;
19840       *)
19841         lt_prog_compiler_pic='-fPIC'
19842         ;;
19843       esac
19844       ;;
19845
19846     interix[3-9]*)
19847       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
19848       # Instead, we relocate shared libraries at runtime.
19849       ;;
19850
19851     msdosdjgpp*)
19852       # Just because we use GCC doesn't mean we suddenly get shared libraries
19853       # on systems that don't support them.
19854       lt_prog_compiler_can_build_shared=no
19855       enable_shared=no
19856       ;;
19857
19858     *nto* | *qnx*)
19859       # QNX uses GNU C++, but need to define -shared option too, otherwise
19860       # it will coredump.
19861       lt_prog_compiler_pic='-fPIC -shared'
19862       ;;
19863
19864     sysv4*MP*)
19865       if test -d /usr/nec; then
19866         lt_prog_compiler_pic=-Kconform_pic
19867       fi
19868       ;;
19869
19870     *)
19871       lt_prog_compiler_pic='-fPIC'
19872       ;;
19873     esac
19874
19875     case $cc_basename in
19876     nvcc*) # Cuda Compiler Driver 2.2
19877       lt_prog_compiler_wl='-Xlinker '
19878       lt_prog_compiler_pic='-Xcompiler -fPIC'
19879       ;;
19880     esac
19881   else
19882     # PORTME Check for flag to pass linker flags through the system compiler.
19883     case $host_os in
19884     aix*)
19885       lt_prog_compiler_wl='-Wl,'
19886       if test "$host_cpu" = ia64; then
19887         # AIX 5 now supports IA64 processor
19888         lt_prog_compiler_static='-Bstatic'
19889       else
19890         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
19891       fi
19892       ;;
19893
19894     mingw* | cygwin* | pw32* | os2* | cegcc*)
19895       # This hack is so that the source file can tell whether it is being
19896       # built for inclusion in a dll (and should export symbols for example).
19897       lt_prog_compiler_pic='-DDLL_EXPORT'
19898       ;;
19899
19900     hpux9* | hpux10* | hpux11*)
19901       lt_prog_compiler_wl='-Wl,'
19902       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
19903       # not for PA HP-UX.
19904       case $host_cpu in
19905       hppa*64*|ia64*)
19906         # +Z the default
19907         ;;
19908       *)
19909         lt_prog_compiler_pic='+Z'
19910         ;;
19911       esac
19912       # Is there a better lt_prog_compiler_static that works with the bundled CC?
19913       lt_prog_compiler_static='${wl}-a ${wl}archive'
19914       ;;
19915
19916     irix5* | irix6* | nonstopux*)
19917       lt_prog_compiler_wl='-Wl,'
19918       # PIC (with -KPIC) is the default.
19919       lt_prog_compiler_static='-non_shared'
19920       ;;
19921
19922     linux* | k*bsd*-gnu | kopensolaris*-gnu)
19923       case $cc_basename in
19924       # old Intel for x86_64 which still supported -KPIC.
19925       ecc*)
19926         lt_prog_compiler_wl='-Wl,'
19927         lt_prog_compiler_pic='-KPIC'
19928         lt_prog_compiler_static='-static'
19929         ;;
19930       # icc used to be incompatible with GCC.
19931       # ICC 10 doesn't accept -KPIC any more.
19932       icc* | ifort*)
19933         lt_prog_compiler_wl='-Wl,'
19934         lt_prog_compiler_pic='-fPIC'
19935         lt_prog_compiler_static='-static'
19936         ;;
19937       # Lahey Fortran 8.1.
19938       lf95*)
19939         lt_prog_compiler_wl='-Wl,'
19940         lt_prog_compiler_pic='--shared'
19941         lt_prog_compiler_static='--static'
19942         ;;
19943       nagfor*)
19944         # NAG Fortran compiler
19945         lt_prog_compiler_wl='-Wl,-Wl,,'
19946         lt_prog_compiler_pic='-PIC'
19947         lt_prog_compiler_static='-Bstatic'
19948         ;;
19949       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
19950         # Portland Group compilers (*not* the Pentium gcc compiler,
19951         # which looks to be a dead project)
19952         lt_prog_compiler_wl='-Wl,'
19953         lt_prog_compiler_pic='-fpic'
19954         lt_prog_compiler_static='-Bstatic'
19955         ;;
19956       ccc*)
19957         lt_prog_compiler_wl='-Wl,'
19958         # All Alpha code is PIC.
19959         lt_prog_compiler_static='-non_shared'
19960         ;;
19961       xl* | bgxl* | bgf* | mpixl*)
19962         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
19963         lt_prog_compiler_wl='-Wl,'
19964         lt_prog_compiler_pic='-qpic'
19965         lt_prog_compiler_static='-qstaticlink'
19966         ;;
19967       *)
19968         case `$CC -V 2>&1 | sed 5q` in
19969         *Sun\ F* | *Sun*Fortran*)
19970           # Sun Fortran 8.3 passes all unrecognized flags to the linker
19971           lt_prog_compiler_pic='-KPIC'
19972           lt_prog_compiler_static='-Bstatic'
19973           lt_prog_compiler_wl=''
19974           ;;
19975         *Sun\ C*)
19976           # Sun C 5.9
19977           lt_prog_compiler_pic='-KPIC'
19978           lt_prog_compiler_static='-Bstatic'
19979           lt_prog_compiler_wl='-Wl,'
19980           ;;
19981         esac
19982         ;;
19983       esac
19984       ;;
19985
19986     newsos6)
19987       lt_prog_compiler_pic='-KPIC'
19988       lt_prog_compiler_static='-Bstatic'
19989       ;;
19990
19991     *nto* | *qnx*)
19992       # QNX uses GNU C++, but need to define -shared option too, otherwise
19993       # it will coredump.
19994       lt_prog_compiler_pic='-fPIC -shared'
19995       ;;
19996
19997     osf3* | osf4* | osf5*)
19998       lt_prog_compiler_wl='-Wl,'
19999       # All OSF/1 code is PIC.
20000       lt_prog_compiler_static='-non_shared'
20001       ;;
20002
20003     rdos*)
20004       lt_prog_compiler_static='-non_shared'
20005       ;;
20006
20007     solaris*)
20008       lt_prog_compiler_pic='-KPIC'
20009       lt_prog_compiler_static='-Bstatic'
20010       case $cc_basename in
20011       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
20012         lt_prog_compiler_wl='-Qoption ld ';;
20013       *)
20014         lt_prog_compiler_wl='-Wl,';;
20015       esac
20016       ;;
20017
20018     sunos4*)
20019       lt_prog_compiler_wl='-Qoption ld '
20020       lt_prog_compiler_pic='-PIC'
20021       lt_prog_compiler_static='-Bstatic'
20022       ;;
20023
20024     sysv4 | sysv4.2uw2* | sysv4.3*)
20025       lt_prog_compiler_wl='-Wl,'
20026       lt_prog_compiler_pic='-KPIC'
20027       lt_prog_compiler_static='-Bstatic'
20028       ;;
20029
20030     sysv4*MP*)
20031       if test -d /usr/nec ;then
20032         lt_prog_compiler_pic='-Kconform_pic'
20033         lt_prog_compiler_static='-Bstatic'
20034       fi
20035       ;;
20036
20037     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
20038       lt_prog_compiler_wl='-Wl,'
20039       lt_prog_compiler_pic='-KPIC'
20040       lt_prog_compiler_static='-Bstatic'
20041       ;;
20042
20043     unicos*)
20044       lt_prog_compiler_wl='-Wl,'
20045       lt_prog_compiler_can_build_shared=no
20046       ;;
20047
20048     uts4*)
20049       lt_prog_compiler_pic='-pic'
20050       lt_prog_compiler_static='-Bstatic'
20051       ;;
20052
20053     *)
20054       lt_prog_compiler_can_build_shared=no
20055       ;;
20056     esac
20057   fi
20058
20059 case $host_os in
20060   # For platforms which do not support PIC, -DPIC is meaningless:
20061   *djgpp*)
20062     lt_prog_compiler_pic=
20063     ;;
20064   *)
20065     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
20066     ;;
20067 esac
20068
20069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
20070 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
20071 if ${lt_cv_prog_compiler_pic+:} false; then :
20072   $as_echo_n "(cached) " >&6
20073 else
20074   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
20075 fi
20076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
20077 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
20078 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
20079
20080 #
20081 # Check to make sure the PIC flag actually works.
20082 #
20083 if test -n "$lt_prog_compiler_pic"; then
20084   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
20085 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
20086 if ${lt_cv_prog_compiler_pic_works+:} false; then :
20087   $as_echo_n "(cached) " >&6
20088 else
20089   lt_cv_prog_compiler_pic_works=no
20090    ac_outfile=conftest.$ac_objext
20091    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20092    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
20093    # Insert the option either (1) after the last *FLAGS variable, or
20094    # (2) before a word containing "conftest.", or (3) at the end.
20095    # Note that $ac_compile itself does not contain backslashes and begins
20096    # with a dollar sign (not a hyphen), so the echo should work correctly.
20097    # The option is referenced via a variable to avoid confusing sed.
20098    lt_compile=`echo "$ac_compile" | $SED \
20099    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20100    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
20101    -e 's:$: $lt_compiler_flag:'`
20102    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
20103    (eval "$lt_compile" 2>conftest.err)
20104    ac_status=$?
20105    cat conftest.err >&5
20106    echo "$as_me:$LINENO: \$? = $ac_status" >&5
20107    if (exit $ac_status) && test -s "$ac_outfile"; then
20108      # The compiler can only warn and ignore the option if not recognized
20109      # So say no if there are warnings other than the usual output.
20110      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
20111      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
20112      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
20113        lt_cv_prog_compiler_pic_works=yes
20114      fi
20115    fi
20116    $RM conftest*
20117
20118 fi
20119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
20120 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
20121
20122 if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
20123     case $lt_prog_compiler_pic in
20124      "" | " "*) ;;
20125      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
20126      esac
20127 else
20128     lt_prog_compiler_pic=
20129      lt_prog_compiler_can_build_shared=no
20130 fi
20131
20132 fi
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144 #
20145 # Check to make sure the static flag actually works.
20146 #
20147 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
20148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
20149 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
20150 if ${lt_cv_prog_compiler_static_works+:} false; then :
20151   $as_echo_n "(cached) " >&6
20152 else
20153   lt_cv_prog_compiler_static_works=no
20154    save_LDFLAGS="$LDFLAGS"
20155    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
20156    echo "$lt_simple_link_test_code" > conftest.$ac_ext
20157    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
20158      # The linker can only warn and ignore the option if not recognized
20159      # So say no if there are warnings
20160      if test -s conftest.err; then
20161        # Append any errors to the config.log.
20162        cat conftest.err 1>&5
20163        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
20164        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
20165        if diff conftest.exp conftest.er2 >/dev/null; then
20166          lt_cv_prog_compiler_static_works=yes
20167        fi
20168      else
20169        lt_cv_prog_compiler_static_works=yes
20170      fi
20171    fi
20172    $RM -r conftest*
20173    LDFLAGS="$save_LDFLAGS"
20174
20175 fi
20176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
20177 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
20178
20179 if test x"$lt_cv_prog_compiler_static_works" = xyes; then
20180     :
20181 else
20182     lt_prog_compiler_static=
20183 fi
20184
20185
20186
20187
20188
20189
20190
20191   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
20192 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
20193 if ${lt_cv_prog_compiler_c_o+:} false; then :
20194   $as_echo_n "(cached) " >&6
20195 else
20196   lt_cv_prog_compiler_c_o=no
20197    $RM -r conftest 2>/dev/null
20198    mkdir conftest
20199    cd conftest
20200    mkdir out
20201    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20202
20203    lt_compiler_flag="-o out/conftest2.$ac_objext"
20204    # Insert the option either (1) after the last *FLAGS variable, or
20205    # (2) before a word containing "conftest.", or (3) at the end.
20206    # Note that $ac_compile itself does not contain backslashes and begins
20207    # with a dollar sign (not a hyphen), so the echo should work correctly.
20208    lt_compile=`echo "$ac_compile" | $SED \
20209    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20210    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
20211    -e 's:$: $lt_compiler_flag:'`
20212    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
20213    (eval "$lt_compile" 2>out/conftest.err)
20214    ac_status=$?
20215    cat out/conftest.err >&5
20216    echo "$as_me:$LINENO: \$? = $ac_status" >&5
20217    if (exit $ac_status) && test -s out/conftest2.$ac_objext
20218    then
20219      # The compiler can only warn and ignore the option if not recognized
20220      # So say no if there are warnings
20221      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
20222      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
20223      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
20224        lt_cv_prog_compiler_c_o=yes
20225      fi
20226    fi
20227    chmod u+w . 2>&5
20228    $RM conftest*
20229    # SGI C++ compiler will create directory out/ii_files/ for
20230    # template instantiation
20231    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
20232    $RM out/* && rmdir out
20233    cd ..
20234    $RM -r conftest
20235    $RM conftest*
20236
20237 fi
20238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
20239 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
20240
20241
20242
20243
20244
20245
20246   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
20247 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
20248 if ${lt_cv_prog_compiler_c_o+:} false; then :
20249   $as_echo_n "(cached) " >&6
20250 else
20251   lt_cv_prog_compiler_c_o=no
20252    $RM -r conftest 2>/dev/null
20253    mkdir conftest
20254    cd conftest
20255    mkdir out
20256    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20257
20258    lt_compiler_flag="-o out/conftest2.$ac_objext"
20259    # Insert the option either (1) after the last *FLAGS variable, or
20260    # (2) before a word containing "conftest.", or (3) at the end.
20261    # Note that $ac_compile itself does not contain backslashes and begins
20262    # with a dollar sign (not a hyphen), so the echo should work correctly.
20263    lt_compile=`echo "$ac_compile" | $SED \
20264    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20265    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
20266    -e 's:$: $lt_compiler_flag:'`
20267    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
20268    (eval "$lt_compile" 2>out/conftest.err)
20269    ac_status=$?
20270    cat out/conftest.err >&5
20271    echo "$as_me:$LINENO: \$? = $ac_status" >&5
20272    if (exit $ac_status) && test -s out/conftest2.$ac_objext
20273    then
20274      # The compiler can only warn and ignore the option if not recognized
20275      # So say no if there are warnings
20276      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
20277      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
20278      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
20279        lt_cv_prog_compiler_c_o=yes
20280      fi
20281    fi
20282    chmod u+w . 2>&5
20283    $RM conftest*
20284    # SGI C++ compiler will create directory out/ii_files/ for
20285    # template instantiation
20286    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
20287    $RM out/* && rmdir out
20288    cd ..
20289    $RM -r conftest
20290    $RM conftest*
20291
20292 fi
20293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
20294 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
20295
20296
20297
20298
20299 hard_links="nottested"
20300 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
20301   # do not overwrite the value of need_locks provided by the user
20302   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
20303 $as_echo_n "checking if we can lock with hard links... " >&6; }
20304   hard_links=yes
20305   $RM conftest*
20306   ln conftest.a conftest.b 2>/dev/null && hard_links=no
20307   touch conftest.a
20308   ln conftest.a conftest.b 2>&5 || hard_links=no
20309   ln conftest.a conftest.b 2>/dev/null && hard_links=no
20310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
20311 $as_echo "$hard_links" >&6; }
20312   if test "$hard_links" = no; then
20313     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
20314 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
20315     need_locks=warn
20316   fi
20317 else
20318   need_locks=no
20319 fi
20320
20321
20322
20323
20324
20325
20326   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
20327 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
20328
20329   runpath_var=
20330   allow_undefined_flag=
20331   always_export_symbols=no
20332   archive_cmds=
20333   archive_expsym_cmds=
20334   compiler_needs_object=no
20335   enable_shared_with_static_runtimes=no
20336   export_dynamic_flag_spec=
20337   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
20338   hardcode_automatic=no
20339   hardcode_direct=no
20340   hardcode_direct_absolute=no
20341   hardcode_libdir_flag_spec=
20342   hardcode_libdir_flag_spec_ld=
20343   hardcode_libdir_separator=
20344   hardcode_minus_L=no
20345   hardcode_shlibpath_var=unsupported
20346   inherit_rpath=no
20347   link_all_deplibs=unknown
20348   module_cmds=
20349   module_expsym_cmds=
20350   old_archive_from_new_cmds=
20351   old_archive_from_expsyms_cmds=
20352   thread_safe_flag_spec=
20353   whole_archive_flag_spec=
20354   # include_expsyms should be a list of space-separated symbols to be *always*
20355   # included in the symbol list
20356   include_expsyms=
20357   # exclude_expsyms can be an extended regexp of symbols to exclude
20358   # it will be wrapped by ` (' and `)$', so one must not match beginning or
20359   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
20360   # as well as any symbol that contains `d'.
20361   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
20362   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
20363   # platforms (ab)use it in PIC code, but their linkers get confused if
20364   # the symbol is explicitly referenced.  Since portable code cannot
20365   # rely on this symbol name, it's probably fine to never include it in
20366   # preloaded symbol tables.
20367   # Exclude shared library initialization/finalization symbols.
20368   extract_expsyms_cmds=
20369
20370   case $host_os in
20371   cygwin* | mingw* | pw32* | cegcc*)
20372     # FIXME: the MSVC++ port hasn't been tested in a loooong time
20373     # When not using gcc, we currently assume that we are using
20374     # Microsoft Visual C++.
20375     if test "$GCC" != yes; then
20376       with_gnu_ld=no
20377     fi
20378     ;;
20379   interix*)
20380     # we just hope/assume this is gcc and not c89 (= MSVC++)
20381     with_gnu_ld=yes
20382     ;;
20383   openbsd*)
20384     with_gnu_ld=no
20385     ;;
20386   esac
20387
20388   ld_shlibs=yes
20389
20390   # On some targets, GNU ld is compatible enough with the native linker
20391   # that we're better off using the native interface for both.
20392   lt_use_gnu_ld_interface=no
20393   if test "$with_gnu_ld" = yes; then
20394     case $host_os in
20395       aix*)
20396         # The AIX port of GNU ld has always aspired to compatibility
20397         # with the native linker.  However, as the warning in the GNU ld
20398         # block says, versions before 2.19.5* couldn't really create working
20399         # shared libraries, regardless of the interface used.
20400         case `$LD -v 2>&1` in
20401           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
20402           *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
20403           *\ \(GNU\ Binutils\)\ [3-9]*) ;;
20404           *)
20405             lt_use_gnu_ld_interface=yes
20406             ;;
20407         esac
20408         ;;
20409       *)
20410         lt_use_gnu_ld_interface=yes
20411         ;;
20412     esac
20413   fi
20414
20415   if test "$lt_use_gnu_ld_interface" = yes; then
20416     # If archive_cmds runs LD, not CC, wlarc should be empty
20417     wlarc='${wl}'
20418
20419     # Set some defaults for GNU ld with shared library support. These
20420     # are reset later if shared libraries are not supported. Putting them
20421     # here allows them to be overridden if necessary.
20422     runpath_var=LD_RUN_PATH
20423     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
20424     export_dynamic_flag_spec='${wl}--export-dynamic'
20425     # ancient GNU ld didn't support --whole-archive et. al.
20426     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
20427       whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
20428     else
20429       whole_archive_flag_spec=
20430     fi
20431     supports_anon_versioning=no
20432     case `$LD -v 2>&1` in
20433       *GNU\ gold*) supports_anon_versioning=yes ;;
20434       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
20435       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
20436       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
20437       *\ 2.11.*) ;; # other 2.11 versions
20438       *) supports_anon_versioning=yes ;;
20439     esac
20440
20441     # See if GNU ld supports shared libraries.
20442     case $host_os in
20443     aix[3-9]*)
20444       # On AIX/PPC, the GNU linker is very broken
20445       if test "$host_cpu" != ia64; then
20446         ld_shlibs=no
20447         cat <<_LT_EOF 1>&2
20448
20449 *** Warning: the GNU linker, at least up to release 2.19, is reported
20450 *** to be unable to reliably create shared libraries on AIX.
20451 *** Therefore, libtool is disabling shared libraries support.  If you
20452 *** really care for shared libraries, you may want to install binutils
20453 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
20454 *** You will then need to restart the configuration process.
20455
20456 _LT_EOF
20457       fi
20458       ;;
20459
20460     amigaos*)
20461       case $host_cpu in
20462       powerpc)
20463             # see comment about AmigaOS4 .so support
20464             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20465             archive_expsym_cmds=''
20466         ;;
20467       m68k)
20468             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)'
20469             hardcode_libdir_flag_spec='-L$libdir'
20470             hardcode_minus_L=yes
20471         ;;
20472       esac
20473       ;;
20474
20475     beos*)
20476       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20477         allow_undefined_flag=unsupported
20478         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
20479         # support --undefined.  This deserves some investigation.  FIXME
20480         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20481       else
20482         ld_shlibs=no
20483       fi
20484       ;;
20485
20486     cygwin* | mingw* | pw32* | cegcc*)
20487       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
20488       # as there is no search path for DLLs.
20489       hardcode_libdir_flag_spec='-L$libdir'
20490       export_dynamic_flag_spec='${wl}--export-all-symbols'
20491       allow_undefined_flag=unsupported
20492       always_export_symbols=no
20493       enable_shared_with_static_runtimes=yes
20494       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'
20495       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
20496
20497       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
20498         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
20499         # If the export-symbols file already is a .def file (1st line
20500         # is EXPORTS), use it as is; otherwise, prepend...
20501         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
20502           cp $export_symbols $output_objdir/$soname.def;
20503         else
20504           echo EXPORTS > $output_objdir/$soname.def;
20505           cat $export_symbols >> $output_objdir/$soname.def;
20506         fi~
20507         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
20508       else
20509         ld_shlibs=no
20510       fi
20511       ;;
20512
20513     haiku*)
20514       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20515       link_all_deplibs=yes
20516       ;;
20517
20518     interix[3-9]*)
20519       hardcode_direct=no
20520       hardcode_shlibpath_var=no
20521       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
20522       export_dynamic_flag_spec='${wl}-E'
20523       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
20524       # Instead, shared libraries are loaded at an image base (0x10000000 by
20525       # default) and relocated if they conflict, which is a slow very memory
20526       # consuming and fragmenting process.  To avoid this, we pick a random,
20527       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
20528       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
20529       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
20530       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'
20531       ;;
20532
20533     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
20534       tmp_diet=no
20535       if test "$host_os" = linux-dietlibc; then
20536         case $cc_basename in
20537           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
20538         esac
20539       fi
20540       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
20541          && test "$tmp_diet" = no
20542       then
20543         tmp_addflag=' $pic_flag'
20544         tmp_sharedflag='-shared'
20545         case $cc_basename,$host_cpu in
20546         pgcc*)                          # Portland Group C compiler
20547           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'
20548           tmp_addflag=' $pic_flag'
20549           ;;
20550         pgf77* | pgf90* | pgf95* | pgfortran*)
20551                                         # Portland Group f77 and f90 compilers
20552           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'
20553           tmp_addflag=' $pic_flag -Mnomain' ;;
20554         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
20555           tmp_addflag=' -i_dynamic' ;;
20556         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
20557           tmp_addflag=' -i_dynamic -nofor_main' ;;
20558         ifc* | ifort*)                  # Intel Fortran compiler
20559           tmp_addflag=' -nofor_main' ;;
20560         lf95*)                          # Lahey Fortran 8.1
20561           whole_archive_flag_spec=
20562           tmp_sharedflag='--shared' ;;
20563         xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
20564           tmp_sharedflag='-qmkshrobj'
20565           tmp_addflag= ;;
20566         nvcc*)  # Cuda Compiler Driver 2.2
20567           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'
20568           compiler_needs_object=yes
20569           ;;
20570         esac
20571         case `$CC -V 2>&1 | sed 5q` in
20572         *Sun\ C*)                       # Sun C 5.9
20573           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'
20574           compiler_needs_object=yes
20575           tmp_sharedflag='-G' ;;
20576         *Sun\ F*)                       # Sun Fortran 8.3
20577           tmp_sharedflag='-G' ;;
20578         esac
20579         archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20580
20581         if test "x$supports_anon_versioning" = xyes; then
20582           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
20583             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
20584             echo "local: *; };" >> $output_objdir/$libname.ver~
20585             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
20586         fi
20587
20588         case $cc_basename in
20589         xlf* | bgf* | bgxlf* | mpixlf*)
20590           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
20591           whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
20592           hardcode_libdir_flag_spec=
20593           hardcode_libdir_flag_spec_ld='-rpath $libdir'
20594           archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
20595           if test "x$supports_anon_versioning" = xyes; then
20596             archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
20597               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
20598               echo "local: *; };" >> $output_objdir/$libname.ver~
20599               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
20600           fi
20601           ;;
20602         esac
20603       else
20604         ld_shlibs=no
20605       fi
20606       ;;
20607
20608     netbsd*)
20609       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
20610         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
20611         wlarc=
20612       else
20613         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20614         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20615       fi
20616       ;;
20617
20618     solaris*)
20619       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
20620         ld_shlibs=no
20621         cat <<_LT_EOF 1>&2
20622
20623 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
20624 *** create shared libraries on Solaris systems.  Therefore, libtool
20625 *** is disabling shared libraries support.  We urge you to upgrade GNU
20626 *** binutils to release 2.9.1 or newer.  Another option is to modify
20627 *** your PATH or compiler configuration so that the native linker is
20628 *** used, and then restart.
20629
20630 _LT_EOF
20631       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20632         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20633         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20634       else
20635         ld_shlibs=no
20636       fi
20637       ;;
20638
20639     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
20640       case `$LD -v 2>&1` in
20641         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
20642         ld_shlibs=no
20643         cat <<_LT_EOF 1>&2
20644
20645 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
20646 *** reliably create shared libraries on SCO systems.  Therefore, libtool
20647 *** is disabling shared libraries support.  We urge you to upgrade GNU
20648 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
20649 *** your PATH or compiler configuration so that the native linker is
20650 *** used, and then restart.
20651
20652 _LT_EOF
20653         ;;
20654         *)
20655           # For security reasons, it is highly recommended that you always
20656           # use absolute paths for naming shared libraries, and exclude the
20657           # DT_RUNPATH tag from executables and libraries.  But doing so
20658           # requires that you compile everything twice, which is a pain.
20659           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20660             hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
20661             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20662             archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20663           else
20664             ld_shlibs=no
20665           fi
20666         ;;
20667       esac
20668       ;;
20669
20670     sunos4*)
20671       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
20672       wlarc=
20673       hardcode_direct=yes
20674       hardcode_shlibpath_var=no
20675       ;;
20676
20677     *)
20678       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20679         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20680         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20681       else
20682         ld_shlibs=no
20683       fi
20684       ;;
20685     esac
20686
20687     if test "$ld_shlibs" = no; then
20688       runpath_var=
20689       hardcode_libdir_flag_spec=
20690       export_dynamic_flag_spec=
20691       whole_archive_flag_spec=
20692     fi
20693   else
20694     # PORTME fill in a description of your system's linker (not GNU ld)
20695     case $host_os in
20696     aix3*)
20697       allow_undefined_flag=unsupported
20698       always_export_symbols=yes
20699       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'
20700       # Note: this linker hardcodes the directories in LIBPATH if there
20701       # are no directories specified by -L.
20702       hardcode_minus_L=yes
20703       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
20704         # Neither direct hardcoding nor static linking is supported with a
20705         # broken collect2.
20706         hardcode_direct=unsupported
20707       fi
20708       ;;
20709
20710     aix[4-9]*)
20711       if test "$host_cpu" = ia64; then
20712         # On IA64, the linker does run time linking by default, so we don't
20713         # have to do anything special.
20714         aix_use_runtimelinking=no
20715         exp_sym_flag='-Bexport'
20716         no_entry_flag=""
20717       else
20718         # If we're using GNU nm, then we don't want the "-C" option.
20719         # -C means demangle to AIX nm, but means don't demangle with GNU nm
20720         # Also, AIX nm treats weak defined symbols like other global
20721         # defined symbols, whereas GNU nm marks them as "W".
20722         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
20723           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'
20724         else
20725           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'
20726         fi
20727         aix_use_runtimelinking=no
20728
20729         # Test if we are trying to use run time linking or normal
20730         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
20731         # need to do runtime linking.
20732         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
20733           for ld_flag in $LDFLAGS; do
20734           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
20735             aix_use_runtimelinking=yes
20736             break
20737           fi
20738           done
20739           ;;
20740         esac
20741
20742         exp_sym_flag='-bexport'
20743         no_entry_flag='-bnoentry'
20744       fi
20745
20746       # When large executables or shared objects are built, AIX ld can
20747       # have problems creating the table of contents.  If linking a library
20748       # or program results in "error TOC overflow" add -mminimal-toc to
20749       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
20750       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
20751
20752       archive_cmds=''
20753       hardcode_direct=yes
20754       hardcode_direct_absolute=yes
20755       hardcode_libdir_separator=':'
20756       link_all_deplibs=yes
20757       file_list_spec='${wl}-f,'
20758
20759       if test "$GCC" = yes; then
20760         case $host_os in aix4.[012]|aix4.[012].*)
20761         # We only want to do this on AIX 4.2 and lower, the check
20762         # below for broken collect2 doesn't work under 4.3+
20763           collect2name=`${CC} -print-prog-name=collect2`
20764           if test -f "$collect2name" &&
20765            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
20766           then
20767           # We have reworked collect2
20768           :
20769           else
20770           # We have old collect2
20771           hardcode_direct=unsupported
20772           # It fails to find uninstalled libraries when the uninstalled
20773           # path is not listed in the libpath.  Setting hardcode_minus_L
20774           # to unsupported forces relinking
20775           hardcode_minus_L=yes
20776           hardcode_libdir_flag_spec='-L$libdir'
20777           hardcode_libdir_separator=
20778           fi
20779           ;;
20780         esac
20781         shared_flag='-shared'
20782         if test "$aix_use_runtimelinking" = yes; then
20783           shared_flag="$shared_flag "'${wl}-G'
20784         fi
20785       else
20786         # not using gcc
20787         if test "$host_cpu" = ia64; then
20788         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
20789         # chokes on -Wl,-G. The following line is correct:
20790           shared_flag='-G'
20791         else
20792           if test "$aix_use_runtimelinking" = yes; then
20793             shared_flag='${wl}-G'
20794           else
20795             shared_flag='${wl}-bM:SRE'
20796           fi
20797         fi
20798       fi
20799
20800       export_dynamic_flag_spec='${wl}-bexpall'
20801       # It seems that -bexpall does not export symbols beginning with
20802       # underscore (_), so it is better to generate a list of symbols to export.
20803       always_export_symbols=yes
20804       if test "$aix_use_runtimelinking" = yes; then
20805         # Warning - without using the other runtime loading flags (-brtl),
20806         # -berok will link without error, but may produce a broken library.
20807         allow_undefined_flag='-berok'
20808         # Determine the default libpath from the value encoded in an
20809         # empty executable.
20810         if test "${lt_cv_aix_libpath+set}" = set; then
20811   aix_libpath=$lt_cv_aix_libpath
20812 else
20813   if ${lt_cv_aix_libpath_+:} false; then :
20814   $as_echo_n "(cached) " >&6
20815 else
20816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20817 /* end confdefs.h.  */
20818
20819 int
20820 main ()
20821 {
20822
20823   ;
20824   return 0;
20825 }
20826 _ACEOF
20827 if ac_fn_c_try_link "$LINENO"; then :
20828
20829   lt_aix_libpath_sed='
20830       /Import File Strings/,/^$/ {
20831           /^0/ {
20832               s/^0  *\([^ ]*\) *$/\1/
20833               p
20834           }
20835       }'
20836   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20837   # Check for a 64-bit object if we didn't find anything.
20838   if test -z "$lt_cv_aix_libpath_"; then
20839     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20840   fi
20841 fi
20842 rm -f core conftest.err conftest.$ac_objext \
20843     conftest$ac_exeext conftest.$ac_ext
20844   if test -z "$lt_cv_aix_libpath_"; then
20845     lt_cv_aix_libpath_="/usr/lib:/lib"
20846   fi
20847
20848 fi
20849
20850   aix_libpath=$lt_cv_aix_libpath_
20851 fi
20852
20853         hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
20854         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"
20855       else
20856         if test "$host_cpu" = ia64; then
20857           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
20858           allow_undefined_flag="-z nodefs"
20859           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"
20860         else
20861          # Determine the default libpath from the value encoded in an
20862          # empty executable.
20863          if test "${lt_cv_aix_libpath+set}" = set; then
20864   aix_libpath=$lt_cv_aix_libpath
20865 else
20866   if ${lt_cv_aix_libpath_+:} false; then :
20867   $as_echo_n "(cached) " >&6
20868 else
20869   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20870 /* end confdefs.h.  */
20871
20872 int
20873 main ()
20874 {
20875
20876   ;
20877   return 0;
20878 }
20879 _ACEOF
20880 if ac_fn_c_try_link "$LINENO"; then :
20881
20882   lt_aix_libpath_sed='
20883       /Import File Strings/,/^$/ {
20884           /^0/ {
20885               s/^0  *\([^ ]*\) *$/\1/
20886               p
20887           }
20888       }'
20889   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20890   # Check for a 64-bit object if we didn't find anything.
20891   if test -z "$lt_cv_aix_libpath_"; then
20892     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20893   fi
20894 fi
20895 rm -f core conftest.err conftest.$ac_objext \
20896     conftest$ac_exeext conftest.$ac_ext
20897   if test -z "$lt_cv_aix_libpath_"; then
20898     lt_cv_aix_libpath_="/usr/lib:/lib"
20899   fi
20900
20901 fi
20902
20903   aix_libpath=$lt_cv_aix_libpath_
20904 fi
20905
20906          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
20907           # Warning - without using the other run time loading flags,
20908           # -berok will link without error, but may produce a broken library.
20909           no_undefined_flag=' ${wl}-bernotok'
20910           allow_undefined_flag=' ${wl}-berok'
20911           if test "$with_gnu_ld" = yes; then
20912             # We only use this code for GNU lds that support --whole-archive.
20913             whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
20914           else
20915             # Exported symbols can be pulled into shared objects from archives
20916             whole_archive_flag_spec='$convenience'
20917           fi
20918           archive_cmds_need_lc=yes
20919           # This is similar to how AIX traditionally builds its shared libraries.
20920           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'
20921         fi
20922       fi
20923       ;;
20924
20925     amigaos*)
20926       case $host_cpu in
20927       powerpc)
20928             # see comment about AmigaOS4 .so support
20929             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20930             archive_expsym_cmds=''
20931         ;;
20932       m68k)
20933             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)'
20934             hardcode_libdir_flag_spec='-L$libdir'
20935             hardcode_minus_L=yes
20936         ;;
20937       esac
20938       ;;
20939
20940     bsdi[45]*)
20941       export_dynamic_flag_spec=-rdynamic
20942       ;;
20943
20944     cygwin* | mingw* | pw32* | cegcc*)
20945       # When not using gcc, we currently assume that we are using
20946       # Microsoft Visual C++.
20947       # hardcode_libdir_flag_spec is actually meaningless, as there is
20948       # no search path for DLLs.
20949       case $cc_basename in
20950       cl*)
20951         # Native MSVC
20952         hardcode_libdir_flag_spec=' '
20953         allow_undefined_flag=unsupported
20954         always_export_symbols=yes
20955         file_list_spec='@'
20956         # Tell ltmain to make .lib files, not .a files.
20957         libext=lib
20958         # Tell ltmain to make .dll files, not .so files.
20959         shrext_cmds=".dll"
20960         # FIXME: Setting linknames here is a bad hack.
20961         archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
20962         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
20963             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
20964           else
20965             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
20966           fi~
20967           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
20968           linknames='
20969         # The linker will not automatically build a static lib if we build a DLL.
20970         # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
20971         enable_shared_with_static_runtimes=yes
20972         export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
20973         # Don't use ranlib
20974         old_postinstall_cmds='chmod 644 $oldlib'
20975         postlink_cmds='lt_outputfile="@OUTPUT@"~
20976           lt_tool_outputfile="@TOOL_OUTPUT@"~
20977           case $lt_outputfile in
20978             *.exe|*.EXE) ;;
20979             *)
20980               lt_outputfile="$lt_outputfile.exe"
20981               lt_tool_outputfile="$lt_tool_outputfile.exe"
20982               ;;
20983           esac~
20984           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
20985             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
20986             $RM "$lt_outputfile.manifest";
20987           fi'
20988         ;;
20989       *)
20990         # Assume MSVC wrapper
20991         hardcode_libdir_flag_spec=' '
20992         allow_undefined_flag=unsupported
20993         # Tell ltmain to make .lib files, not .a files.
20994         libext=lib
20995         # Tell ltmain to make .dll files, not .so files.
20996         shrext_cmds=".dll"
20997         # FIXME: Setting linknames here is a bad hack.
20998         archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
20999         # The linker will automatically build a .lib file if we build a DLL.
21000         old_archive_from_new_cmds='true'
21001         # FIXME: Should let the user specify the lib program.
21002         old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
21003         enable_shared_with_static_runtimes=yes
21004         ;;
21005       esac
21006       ;;
21007
21008     darwin* | rhapsody*)
21009
21010
21011   archive_cmds_need_lc=no
21012   hardcode_direct=no
21013   hardcode_automatic=yes
21014   hardcode_shlibpath_var=unsupported
21015   if test "$lt_cv_ld_force_load" = "yes"; then
21016     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\"`'
21017   else
21018     whole_archive_flag_spec=''
21019   fi
21020   link_all_deplibs=yes
21021   allow_undefined_flag="$_lt_dar_allow_undefined"
21022   case $cc_basename in
21023      ifort*) _lt_dar_can_shared=yes ;;
21024      *) _lt_dar_can_shared=$GCC ;;
21025   esac
21026   if test "$_lt_dar_can_shared" = "yes"; then
21027     output_verbose_link_cmd=func_echo_all
21028     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
21029     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
21030     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}"
21031     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}"
21032
21033   else
21034   ld_shlibs=no
21035   fi
21036
21037       ;;
21038
21039     dgux*)
21040       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21041       hardcode_libdir_flag_spec='-L$libdir'
21042       hardcode_shlibpath_var=no
21043       ;;
21044
21045     freebsd1*)
21046       ld_shlibs=no
21047       ;;
21048
21049     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
21050     # support.  Future versions do this automatically, but an explicit c++rt0.o
21051     # does not break anything, and helps significantly (at the cost of a little
21052     # extra space).
21053     freebsd2.2*)
21054       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
21055       hardcode_libdir_flag_spec='-R$libdir'
21056       hardcode_direct=yes
21057       hardcode_shlibpath_var=no
21058       ;;
21059
21060     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
21061     freebsd2*)
21062       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
21063       hardcode_direct=yes
21064       hardcode_minus_L=yes
21065       hardcode_shlibpath_var=no
21066       ;;
21067
21068     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
21069     freebsd* | dragonfly*)
21070       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
21071       hardcode_libdir_flag_spec='-R$libdir'
21072       hardcode_direct=yes
21073       hardcode_shlibpath_var=no
21074       ;;
21075
21076     hpux9*)
21077       if test "$GCC" = yes; then
21078         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'
21079       else
21080         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'
21081       fi
21082       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
21083       hardcode_libdir_separator=:
21084       hardcode_direct=yes
21085
21086       # hardcode_minus_L: Not really in the search PATH,
21087       # but as the default location of the library.
21088       hardcode_minus_L=yes
21089       export_dynamic_flag_spec='${wl}-E'
21090       ;;
21091
21092     hpux10*)
21093       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
21094         archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
21095       else
21096         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
21097       fi
21098       if test "$with_gnu_ld" = no; then
21099         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
21100         hardcode_libdir_flag_spec_ld='+b $libdir'
21101         hardcode_libdir_separator=:
21102         hardcode_direct=yes
21103         hardcode_direct_absolute=yes
21104         export_dynamic_flag_spec='${wl}-E'
21105         # hardcode_minus_L: Not really in the search PATH,
21106         # but as the default location of the library.
21107         hardcode_minus_L=yes
21108       fi
21109       ;;
21110
21111     hpux11*)
21112       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
21113         case $host_cpu in
21114         hppa*64*)
21115           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
21116           ;;
21117         ia64*)
21118           archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
21119           ;;
21120         *)
21121           archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
21122           ;;
21123         esac
21124       else
21125         case $host_cpu in
21126         hppa*64*)
21127           archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
21128           ;;
21129         ia64*)
21130           archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
21131           ;;
21132         *)
21133
21134           # Older versions of the 11.00 compiler do not understand -b yet
21135           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
21136           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
21137 $as_echo_n "checking if $CC understands -b... " >&6; }
21138 if ${lt_cv_prog_compiler__b+:} false; then :
21139   $as_echo_n "(cached) " >&6
21140 else
21141   lt_cv_prog_compiler__b=no
21142    save_LDFLAGS="$LDFLAGS"
21143    LDFLAGS="$LDFLAGS -b"
21144    echo "$lt_simple_link_test_code" > conftest.$ac_ext
21145    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
21146      # The linker can only warn and ignore the option if not recognized
21147      # So say no if there are warnings
21148      if test -s conftest.err; then
21149        # Append any errors to the config.log.
21150        cat conftest.err 1>&5
21151        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
21152        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
21153        if diff conftest.exp conftest.er2 >/dev/null; then
21154          lt_cv_prog_compiler__b=yes
21155        fi
21156      else
21157        lt_cv_prog_compiler__b=yes
21158      fi
21159    fi
21160    $RM -r conftest*
21161    LDFLAGS="$save_LDFLAGS"
21162
21163 fi
21164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
21165 $as_echo "$lt_cv_prog_compiler__b" >&6; }
21166
21167 if test x"$lt_cv_prog_compiler__b" = xyes; then
21168     archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
21169 else
21170     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
21171 fi
21172
21173           ;;
21174         esac
21175       fi
21176       if test "$with_gnu_ld" = no; then
21177         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
21178         hardcode_libdir_separator=:
21179
21180         case $host_cpu in
21181         hppa*64*|ia64*)
21182           hardcode_direct=no
21183           hardcode_shlibpath_var=no
21184           ;;
21185         *)
21186           hardcode_direct=yes
21187           hardcode_direct_absolute=yes
21188           export_dynamic_flag_spec='${wl}-E'
21189
21190           # hardcode_minus_L: Not really in the search PATH,
21191           # but as the default location of the library.
21192           hardcode_minus_L=yes
21193           ;;
21194         esac
21195       fi
21196       ;;
21197
21198     irix5* | irix6* | nonstopux*)
21199       if test "$GCC" = yes; then
21200         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'
21201         # Try to use the -exported_symbol ld option, if it does not
21202         # work, assume that -exports_file does not work either and
21203         # implicitly export all symbols.
21204         # This should be the same for all languages, so no per-tag cache variable.
21205         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
21206 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
21207 if ${lt_cv_irix_exported_symbol+:} false; then :
21208   $as_echo_n "(cached) " >&6
21209 else
21210   save_LDFLAGS="$LDFLAGS"
21211            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
21212            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21213 /* end confdefs.h.  */
21214 int foo (void) { return 0; }
21215 _ACEOF
21216 if ac_fn_c_try_link "$LINENO"; then :
21217   lt_cv_irix_exported_symbol=yes
21218 else
21219   lt_cv_irix_exported_symbol=no
21220 fi
21221 rm -f core conftest.err conftest.$ac_objext \
21222     conftest$ac_exeext conftest.$ac_ext
21223            LDFLAGS="$save_LDFLAGS"
21224 fi
21225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
21226 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
21227         if test "$lt_cv_irix_exported_symbol" = yes; then
21228           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'
21229         fi
21230       else
21231         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'
21232         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'
21233       fi
21234       archive_cmds_need_lc='no'
21235       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
21236       hardcode_libdir_separator=:
21237       inherit_rpath=yes
21238       link_all_deplibs=yes
21239       ;;
21240
21241     netbsd*)
21242       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
21243         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
21244       else
21245         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
21246       fi
21247       hardcode_libdir_flag_spec='-R$libdir'
21248       hardcode_direct=yes
21249       hardcode_shlibpath_var=no
21250       ;;
21251
21252     newsos6)
21253       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21254       hardcode_direct=yes
21255       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
21256       hardcode_libdir_separator=:
21257       hardcode_shlibpath_var=no
21258       ;;
21259
21260     *nto* | *qnx*)
21261       ;;
21262
21263     openbsd*)
21264       if test -f /usr/libexec/ld.so; then
21265         hardcode_direct=yes
21266         hardcode_shlibpath_var=no
21267         hardcode_direct_absolute=yes
21268         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
21269           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
21270           archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
21271           hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
21272           export_dynamic_flag_spec='${wl}-E'
21273         else
21274           case $host_os in
21275            openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
21276              archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
21277              hardcode_libdir_flag_spec='-R$libdir'
21278              ;;
21279            *)
21280              archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
21281              hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
21282              ;;
21283           esac
21284         fi
21285       else
21286         ld_shlibs=no
21287       fi
21288       ;;
21289
21290     os2*)
21291       hardcode_libdir_flag_spec='-L$libdir'
21292       hardcode_minus_L=yes
21293       allow_undefined_flag=unsupported
21294       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'
21295       old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
21296       ;;
21297
21298     osf3*)
21299       if test "$GCC" = yes; then
21300         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
21301         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'
21302       else
21303         allow_undefined_flag=' -expect_unresolved \*'
21304         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'
21305       fi
21306       archive_cmds_need_lc='no'
21307       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
21308       hardcode_libdir_separator=:
21309       ;;
21310
21311     osf4* | osf5*)      # as osf3* with the addition of -msym flag
21312       if test "$GCC" = yes; then
21313         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
21314         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'
21315         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
21316       else
21317         allow_undefined_flag=' -expect_unresolved \*'
21318         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'
21319         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~
21320         $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'
21321
21322         # Both c and cxx compiler support -rpath directly
21323         hardcode_libdir_flag_spec='-rpath $libdir'
21324       fi
21325       archive_cmds_need_lc='no'
21326       hardcode_libdir_separator=:
21327       ;;
21328
21329     solaris*)
21330       no_undefined_flag=' -z defs'
21331       if test "$GCC" = yes; then
21332         wlarc='${wl}'
21333         archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
21334         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
21335           $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'
21336       else
21337         case `$CC -V 2>&1` in
21338         *"Compilers 5.0"*)
21339           wlarc=''
21340           archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
21341           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
21342           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
21343           ;;
21344         *)
21345           wlarc='${wl}'
21346           archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
21347           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
21348           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
21349           ;;
21350         esac
21351       fi
21352       hardcode_libdir_flag_spec='-R$libdir'
21353       hardcode_shlibpath_var=no
21354       case $host_os in
21355       solaris2.[0-5] | solaris2.[0-5].*) ;;
21356       *)
21357         # The compiler driver will combine and reorder linker options,
21358         # but understands `-z linker_flag'.  GCC discards it without `$wl',
21359         # but is careful enough not to reorder.
21360         # Supported since Solaris 2.6 (maybe 2.5.1?)
21361         if test "$GCC" = yes; then
21362           whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
21363         else
21364           whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
21365         fi
21366         ;;
21367       esac
21368       link_all_deplibs=yes
21369       ;;
21370
21371     sunos4*)
21372       if test "x$host_vendor" = xsequent; then
21373         # Use $CC to link under sequent, because it throws in some extra .o
21374         # files that make .init and .fini sections work.
21375         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
21376       else
21377         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
21378       fi
21379       hardcode_libdir_flag_spec='-L$libdir'
21380       hardcode_direct=yes
21381       hardcode_minus_L=yes
21382       hardcode_shlibpath_var=no
21383       ;;
21384
21385     sysv4)
21386       case $host_vendor in
21387         sni)
21388           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21389           hardcode_direct=yes # is this really true???
21390         ;;
21391         siemens)
21392           ## LD is ld it makes a PLAMLIB
21393           ## CC just makes a GrossModule.
21394           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
21395           reload_cmds='$CC -r -o $output$reload_objs'
21396           hardcode_direct=no
21397         ;;
21398         motorola)
21399           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21400           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
21401         ;;
21402       esac
21403       runpath_var='LD_RUN_PATH'
21404       hardcode_shlibpath_var=no
21405       ;;
21406
21407     sysv4.3*)
21408       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21409       hardcode_shlibpath_var=no
21410       export_dynamic_flag_spec='-Bexport'
21411       ;;
21412
21413     sysv4*MP*)
21414       if test -d /usr/nec; then
21415         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21416         hardcode_shlibpath_var=no
21417         runpath_var=LD_RUN_PATH
21418         hardcode_runpath_var=yes
21419         ld_shlibs=yes
21420       fi
21421       ;;
21422
21423     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
21424       no_undefined_flag='${wl}-z,text'
21425       archive_cmds_need_lc=no
21426       hardcode_shlibpath_var=no
21427       runpath_var='LD_RUN_PATH'
21428
21429       if test "$GCC" = yes; then
21430         archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21431         archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21432       else
21433         archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21434         archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21435       fi
21436       ;;
21437
21438     sysv5* | sco3.2v5* | sco5v6*)
21439       # Note: We can NOT use -z defs as we might desire, because we do not
21440       # link with -lc, and that would cause any symbols used from libc to
21441       # always be unresolved, which means just about no library would
21442       # ever link correctly.  If we're not using GNU ld we use -z text
21443       # though, which does catch some bad symbols but isn't as heavy-handed
21444       # as -z defs.
21445       no_undefined_flag='${wl}-z,text'
21446       allow_undefined_flag='${wl}-z,nodefs'
21447       archive_cmds_need_lc=no
21448       hardcode_shlibpath_var=no
21449       hardcode_libdir_flag_spec='${wl}-R,$libdir'
21450       hardcode_libdir_separator=':'
21451       link_all_deplibs=yes
21452       export_dynamic_flag_spec='${wl}-Bexport'
21453       runpath_var='LD_RUN_PATH'
21454
21455       if test "$GCC" = yes; then
21456         archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21457         archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21458       else
21459         archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21460         archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21461       fi
21462       ;;
21463
21464     uts4*)
21465       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21466       hardcode_libdir_flag_spec='-L$libdir'
21467       hardcode_shlibpath_var=no
21468       ;;
21469
21470     *)
21471       ld_shlibs=no
21472       ;;
21473     esac
21474
21475     if test x$host_vendor = xsni; then
21476       case $host in
21477       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
21478         export_dynamic_flag_spec='${wl}-Blargedynsym'
21479         ;;
21480       esac
21481     fi
21482   fi
21483
21484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
21485 $as_echo "$ld_shlibs" >&6; }
21486 test "$ld_shlibs" = no && can_build_shared=no
21487
21488 with_gnu_ld=$with_gnu_ld
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504 #
21505 # Do we need to explicitly link libc?
21506 #
21507 case "x$archive_cmds_need_lc" in
21508 x|xyes)
21509   # Assume -lc should be added
21510   archive_cmds_need_lc=yes
21511
21512   if test "$enable_shared" = yes && test "$GCC" = yes; then
21513     case $archive_cmds in
21514     *'~'*)
21515       # FIXME: we may have to deal with multi-command sequences.
21516       ;;
21517     '$CC '*)
21518       # Test whether the compiler implicitly links with -lc since on some
21519       # systems, -lgcc has to come before -lc. If gcc already passes -lc
21520       # to ld, don't add -lc before -lgcc.
21521       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
21522 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
21523 if ${lt_cv_archive_cmds_need_lc+:} false; then :
21524   $as_echo_n "(cached) " >&6
21525 else
21526   $RM conftest*
21527         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
21528
21529         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
21530   (eval $ac_compile) 2>&5
21531   ac_status=$?
21532   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21533   test $ac_status = 0; } 2>conftest.err; then
21534           soname=conftest
21535           lib=conftest
21536           libobjs=conftest.$ac_objext
21537           deplibs=
21538           wl=$lt_prog_compiler_wl
21539           pic_flag=$lt_prog_compiler_pic
21540           compiler_flags=-v
21541           linker_flags=-v
21542           verstring=
21543           output_objdir=.
21544           libname=conftest
21545           lt_save_allow_undefined_flag=$allow_undefined_flag
21546           allow_undefined_flag=
21547           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
21548   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
21549   ac_status=$?
21550   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21551   test $ac_status = 0; }
21552           then
21553             lt_cv_archive_cmds_need_lc=no
21554           else
21555             lt_cv_archive_cmds_need_lc=yes
21556           fi
21557           allow_undefined_flag=$lt_save_allow_undefined_flag
21558         else
21559           cat conftest.err 1>&5
21560         fi
21561         $RM conftest*
21562
21563 fi
21564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
21565 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
21566       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
21567       ;;
21568     esac
21569   fi
21570   ;;
21571 esac
21572
21573
21574
21575
21576
21577
21578
21579
21580
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   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
21730 $as_echo_n "checking dynamic linker characteristics... " >&6; }
21731
21732 if test "$GCC" = yes; then
21733   case $host_os in
21734     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
21735     *) lt_awk_arg="/^libraries:/" ;;
21736   esac
21737   case $host_os in
21738     mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
21739     *) lt_sed_strip_eq="s,=/,/,g" ;;
21740   esac
21741   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
21742   case $lt_search_path_spec in
21743   *\;*)
21744     # if the path contains ";" then we assume it to be the separator
21745     # otherwise default to the standard path separator (i.e. ":") - it is
21746     # assumed that no part of a normal pathname contains ";" but that should
21747     # okay in the real world where ";" in dirpaths is itself problematic.
21748     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
21749     ;;
21750   *)
21751     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
21752     ;;
21753   esac
21754   # Ok, now we have the path, separated by spaces, we can step through it
21755   # and add multilib dir if necessary.
21756   lt_tmp_lt_search_path_spec=
21757   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
21758   for lt_sys_path in $lt_search_path_spec; do
21759     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
21760       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
21761     else
21762       test -d "$lt_sys_path" && \
21763         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
21764     fi
21765   done
21766   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
21767 BEGIN {RS=" "; FS="/|\n";} {
21768   lt_foo="";
21769   lt_count=0;
21770   for (lt_i = NF; lt_i > 0; lt_i--) {
21771     if ($lt_i != "" && $lt_i != ".") {
21772       if ($lt_i == "..") {
21773         lt_count++;
21774       } else {
21775         if (lt_count == 0) {
21776           lt_foo="/" $lt_i lt_foo;
21777         } else {
21778           lt_count--;
21779         }
21780       }
21781     }
21782   }
21783   if (lt_foo != "") { lt_freq[lt_foo]++; }
21784   if (lt_freq[lt_foo] == 1) { print lt_foo; }
21785 }'`
21786   # AWK program above erroneously prepends '/' to C:/dos/paths
21787   # for these hosts.
21788   case $host_os in
21789     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
21790       $SED 's,/\([A-Za-z]:\),\1,g'` ;;
21791   esac
21792   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
21793 else
21794   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
21795 fi
21796 library_names_spec=
21797 libname_spec='lib$name'
21798 soname_spec=
21799 shrext_cmds=".so"
21800 postinstall_cmds=
21801 postuninstall_cmds=
21802 finish_cmds=
21803 finish_eval=
21804 shlibpath_var=
21805 shlibpath_overrides_runpath=unknown
21806 version_type=none
21807 dynamic_linker="$host_os ld.so"
21808 sys_lib_dlsearch_path_spec="/lib /usr/lib"
21809 need_lib_prefix=unknown
21810 hardcode_into_libs=no
21811
21812 # when you set need_version to no, make sure it does not cause -set_version
21813 # flags to be left without arguments
21814 need_version=unknown
21815
21816 case $host_os in
21817 aix3*)
21818   version_type=linux
21819   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
21820   shlibpath_var=LIBPATH
21821
21822   # AIX 3 has no versioning support, so we append a major version to the name.
21823   soname_spec='${libname}${release}${shared_ext}$major'
21824   ;;
21825
21826 aix[4-9]*)
21827   version_type=linux
21828   need_lib_prefix=no
21829   need_version=no
21830   hardcode_into_libs=yes
21831   if test "$host_cpu" = ia64; then
21832     # AIX 5 supports IA64
21833     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
21834     shlibpath_var=LD_LIBRARY_PATH
21835   else
21836     # With GCC up to 2.95.x, collect2 would create an import file
21837     # for dependence libraries.  The import file would start with
21838     # the line `#! .'.  This would cause the generated library to
21839     # depend on `.', always an invalid library.  This was fixed in
21840     # development snapshots of GCC prior to 3.0.
21841     case $host_os in
21842       aix4 | aix4.[01] | aix4.[01].*)
21843       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
21844            echo ' yes '
21845            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
21846         :
21847       else
21848         can_build_shared=no
21849       fi
21850       ;;
21851     esac
21852     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
21853     # soname into executable. Probably we can add versioning support to
21854     # collect2, so additional links can be useful in future.
21855     if test "$aix_use_runtimelinking" = yes; then
21856       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
21857       # instead of lib<name>.a to let people know that these are not
21858       # typical AIX shared libraries.
21859       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
21860     else
21861       # We preserve .a as extension for shared libraries through AIX4.2
21862       # and later when we are not doing run time linking.
21863       library_names_spec='${libname}${release}.a $libname.a'
21864       soname_spec='${libname}${release}${shared_ext}$major'
21865     fi
21866     shlibpath_var=LIBPATH
21867   fi
21868   ;;
21869
21870 amigaos*)
21871   case $host_cpu in
21872   powerpc)
21873     # Since July 2007 AmigaOS4 officially supports .so libraries.
21874     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
21875     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
21876     ;;
21877   m68k)
21878     library_names_spec='$libname.ixlibrary $libname.a'
21879     # Create ${libname}_ixlibrary.a entries in /sys/libs.
21880     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'
21881     ;;
21882   esac
21883   ;;
21884
21885 beos*)
21886   library_names_spec='${libname}${shared_ext}'
21887   dynamic_linker="$host_os ld.so"
21888   shlibpath_var=LIBRARY_PATH
21889   ;;
21890
21891 bsdi[45]*)
21892   version_type=linux
21893   need_version=no
21894   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
21895   soname_spec='${libname}${release}${shared_ext}$major'
21896   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
21897   shlibpath_var=LD_LIBRARY_PATH
21898   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
21899   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
21900   # the default ld.so.conf also contains /usr/contrib/lib and
21901   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
21902   # libtool to hard-code these into programs
21903   ;;
21904
21905 cygwin* | mingw* | pw32* | cegcc*)
21906   version_type=windows
21907   shrext_cmds=".dll"
21908   need_version=no
21909   need_lib_prefix=no
21910
21911   case $GCC,$cc_basename in
21912   yes,*)
21913     # gcc
21914     library_names_spec='$libname.dll.a'
21915     # DLL is installed to $(libdir)/../bin by postinstall_cmds
21916     postinstall_cmds='base_file=`basename \${file}`~
21917       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
21918       dldir=$destdir/`dirname \$dlpath`~
21919       test -d \$dldir || mkdir -p \$dldir~
21920       $install_prog $dir/$dlname \$dldir/$dlname~
21921       chmod a+x \$dldir/$dlname~
21922       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
21923         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
21924       fi'
21925     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
21926       dlpath=$dir/\$dldll~
21927        $RM \$dlpath'
21928     shlibpath_overrides_runpath=yes
21929
21930     case $host_os in
21931     cygwin*)
21932       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
21933       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
21934
21935       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
21936       ;;
21937     mingw* | cegcc*)
21938       # MinGW DLLs use traditional 'lib' prefix
21939       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
21940       ;;
21941     pw32*)
21942       # pw32 DLLs use 'pw' prefix rather than 'lib'
21943       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
21944       ;;
21945     esac
21946     dynamic_linker='Win32 ld.exe'
21947     ;;
21948
21949   *,cl*)
21950     # Native MSVC
21951     libname_spec='$name'
21952     soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
21953     library_names_spec='${libname}.dll.lib'
21954
21955     case $build_os in
21956     mingw*)
21957       sys_lib_search_path_spec=
21958       lt_save_ifs=$IFS
21959       IFS=';'
21960       for lt_path in $LIB
21961       do
21962         IFS=$lt_save_ifs
21963         # Let DOS variable expansion print the short 8.3 style file name.
21964         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
21965         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
21966       done
21967       IFS=$lt_save_ifs
21968       # Convert to MSYS style.
21969       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
21970       ;;
21971     cygwin*)
21972       # Convert to unix form, then to dos form, then back to unix form
21973       # but this time dos style (no spaces!) so that the unix form looks
21974       # like /cygdrive/c/PROGRA~1:/cygdr...
21975       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
21976       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
21977       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
21978       ;;
21979     *)
21980       sys_lib_search_path_spec="$LIB"
21981       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
21982         # It is most probably a Windows format PATH.
21983         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
21984       else
21985         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
21986       fi
21987       # FIXME: find the short name or the path components, as spaces are
21988       # common. (e.g. "Program Files" -> "PROGRA~1")
21989       ;;
21990     esac
21991
21992     # DLL is installed to $(libdir)/../bin by postinstall_cmds
21993     postinstall_cmds='base_file=`basename \${file}`~
21994       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
21995       dldir=$destdir/`dirname \$dlpath`~
21996       test -d \$dldir || mkdir -p \$dldir~
21997       $install_prog $dir/$dlname \$dldir/$dlname'
21998     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
21999       dlpath=$dir/\$dldll~
22000        $RM \$dlpath'
22001     shlibpath_overrides_runpath=yes
22002     dynamic_linker='Win32 link.exe'
22003     ;;
22004
22005   *)
22006     # Assume MSVC wrapper
22007     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
22008     dynamic_linker='Win32 ld.exe'
22009     ;;
22010   esac
22011   # FIXME: first we should search . and the directory the executable is in
22012   shlibpath_var=PATH
22013   ;;
22014
22015 darwin* | rhapsody*)
22016   dynamic_linker="$host_os dyld"
22017   version_type=darwin
22018   need_lib_prefix=no
22019   need_version=no
22020   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
22021   soname_spec='${libname}${release}${major}$shared_ext'
22022   shlibpath_overrides_runpath=yes
22023   shlibpath_var=DYLD_LIBRARY_PATH
22024   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
22025
22026   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
22027   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
22028   ;;
22029
22030 dgux*)
22031   version_type=linux
22032   need_lib_prefix=no
22033   need_version=no
22034   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
22035   soname_spec='${libname}${release}${shared_ext}$major'
22036   shlibpath_var=LD_LIBRARY_PATH
22037   ;;
22038
22039 freebsd1*)
22040   dynamic_linker=no
22041   ;;
22042
22043 freebsd* | dragonfly*)
22044   # DragonFly does not have aout.  When/if they implement a new
22045   # versioning mechanism, adjust this.
22046   if test -x /usr/bin/objformat; then
22047     objformat=`/usr/bin/objformat`
22048   else
22049     case $host_os in
22050     freebsd[123]*) objformat=aout ;;
22051     *) objformat=elf ;;
22052     esac
22053   fi
22054   version_type=freebsd-$objformat
22055   case $version_type in
22056     freebsd-elf*)
22057       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
22058       need_version=no
22059       need_lib_prefix=no
22060       ;;
22061     freebsd-*)
22062       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
22063       need_version=yes
22064       ;;
22065   esac
22066   shlibpath_var=LD_LIBRARY_PATH
22067   case $host_os in
22068   freebsd2*)
22069     shlibpath_overrides_runpath=yes
22070     ;;
22071   freebsd3.[01]* | freebsdelf3.[01]*)
22072     shlibpath_overrides_runpath=yes
22073     hardcode_into_libs=yes
22074     ;;
22075   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
22076   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
22077     shlibpath_overrides_runpath=no
22078     hardcode_into_libs=yes
22079     ;;
22080   *) # from 4.6 on, and DragonFly
22081     shlibpath_overrides_runpath=yes
22082     hardcode_into_libs=yes
22083     ;;
22084   esac
22085   ;;
22086
22087 gnu*)
22088   version_type=linux
22089   need_lib_prefix=no
22090   need_version=no
22091   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
22092   soname_spec='${libname}${release}${shared_ext}$major'
22093   shlibpath_var=LD_LIBRARY_PATH
22094   hardcode_into_libs=yes
22095   ;;
22096
22097 haiku*)
22098   version_type=linux
22099   need_lib_prefix=no
22100   need_version=no
22101   dynamic_linker="$host_os runtime_loader"
22102   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
22103   soname_spec='${libname}${release}${shared_ext}$major'
22104   shlibpath_var=LIBRARY_PATH
22105   shlibpath_overrides_runpath=yes
22106   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
22107   hardcode_into_libs=yes
22108   ;;
22109
22110 hpux9* | hpux10* | hpux11*)
22111   # Give a soname corresponding to the major version so that dld.sl refuses to
22112   # link against other versions.
22113   version_type=sunos
22114   need_lib_prefix=no
22115   need_version=no
22116   case $host_cpu in
22117   ia64*)
22118     shrext_cmds='.so'
22119     hardcode_into_libs=yes
22120     dynamic_linker="$host_os dld.so"
22121     shlibpath_var=LD_LIBRARY_PATH
22122     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
22123     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22124     soname_spec='${libname}${release}${shared_ext}$major'
22125     if test "X$HPUX_IA64_MODE" = X32; then
22126       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
22127     else
22128       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
22129     fi
22130     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
22131     ;;
22132   hppa*64*)
22133     shrext_cmds='.sl'
22134     hardcode_into_libs=yes
22135     dynamic_linker="$host_os dld.sl"
22136     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
22137     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
22138     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22139     soname_spec='${libname}${release}${shared_ext}$major'
22140     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
22141     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
22142     ;;
22143   *)
22144     shrext_cmds='.sl'
22145     dynamic_linker="$host_os dld.sl"
22146     shlibpath_var=SHLIB_PATH
22147     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
22148     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22149     soname_spec='${libname}${release}${shared_ext}$major'
22150     ;;
22151   esac
22152   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
22153   postinstall_cmds='chmod 555 $lib'
22154   # or fails outright, so override atomically:
22155   install_override_mode=555
22156   ;;
22157
22158 interix[3-9]*)
22159   version_type=linux
22160   need_lib_prefix=no
22161   need_version=no
22162   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
22163   soname_spec='${libname}${release}${shared_ext}$major'
22164   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
22165   shlibpath_var=LD_LIBRARY_PATH
22166   shlibpath_overrides_runpath=no
22167   hardcode_into_libs=yes
22168   ;;
22169
22170 irix5* | irix6* | nonstopux*)
22171   case $host_os in
22172     nonstopux*) version_type=nonstopux ;;
22173     *)
22174         if test "$lt_cv_prog_gnu_ld" = yes; then
22175                 version_type=linux
22176         else
22177                 version_type=irix
22178         fi ;;
22179   esac
22180   need_lib_prefix=no
22181   need_version=no
22182   soname_spec='${libname}${release}${shared_ext}$major'
22183   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
22184   case $host_os in
22185   irix5* | nonstopux*)
22186     libsuff= shlibsuff=
22187     ;;
22188   *)
22189     case $LD in # libtool.m4 will add one of these switches to LD
22190     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
22191       libsuff= shlibsuff= libmagic=32-bit;;
22192     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
22193       libsuff=32 shlibsuff=N32 libmagic=N32;;
22194     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
22195       libsuff=64 shlibsuff=64 libmagic=64-bit;;
22196     *) libsuff= shlibsuff= libmagic=never-match;;
22197     esac
22198     ;;
22199   esac
22200   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
22201   shlibpath_overrides_runpath=no
22202   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
22203   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
22204   hardcode_into_libs=yes
22205   ;;
22206
22207 # No shared lib support for Linux oldld, aout, or coff.
22208 linux*oldld* | linux*aout* | linux*coff*)
22209   dynamic_linker=no
22210   ;;
22211
22212 # This must be Linux ELF.
22213 linux* | k*bsd*-gnu | kopensolaris*-gnu)
22214   version_type=linux
22215   need_lib_prefix=no
22216   need_version=no
22217   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22218   soname_spec='${libname}${release}${shared_ext}$major'
22219   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
22220   shlibpath_var=LD_LIBRARY_PATH
22221   shlibpath_overrides_runpath=no
22222
22223   # Some binutils ld are patched to set DT_RUNPATH
22224   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
22225   $as_echo_n "(cached) " >&6
22226 else
22227   lt_cv_shlibpath_overrides_runpath=no
22228     save_LDFLAGS=$LDFLAGS
22229     save_libdir=$libdir
22230     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
22231          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
22232     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22233 /* end confdefs.h.  */
22234
22235 int
22236 main ()
22237 {
22238
22239   ;
22240   return 0;
22241 }
22242 _ACEOF
22243 if ac_fn_c_try_link "$LINENO"; then :
22244   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
22245   lt_cv_shlibpath_overrides_runpath=yes
22246 fi
22247 fi
22248 rm -f core conftest.err conftest.$ac_objext \
22249     conftest$ac_exeext conftest.$ac_ext
22250     LDFLAGS=$save_LDFLAGS
22251     libdir=$save_libdir
22252
22253 fi
22254
22255   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
22256
22257   # This implies no fast_install, which is unacceptable.
22258   # Some rework will be needed to allow for fast_install
22259   # before this can be enabled.
22260   hardcode_into_libs=yes
22261
22262   # Append ld.so.conf contents to the search path
22263   if test -f /etc/ld.so.conf; then
22264     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' ' '`
22265     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
22266   fi
22267
22268   # We used to test for /lib/ld.so.1 and disable shared libraries on
22269   # powerpc, because MkLinux only supported shared libraries with the
22270   # GNU dynamic linker.  Since this was broken with cross compilers,
22271   # most powerpc-linux boxes support dynamic linking these days and
22272   # people can always --disable-shared, the test was removed, and we
22273   # assume the GNU/Linux dynamic linker is in use.
22274   dynamic_linker='GNU/Linux ld.so'
22275   ;;
22276
22277 netbsd*)
22278   version_type=sunos
22279   need_lib_prefix=no
22280   need_version=no
22281   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
22282     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
22283     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
22284     dynamic_linker='NetBSD (a.out) ld.so'
22285   else
22286     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
22287     soname_spec='${libname}${release}${shared_ext}$major'
22288     dynamic_linker='NetBSD ld.elf_so'
22289   fi
22290   shlibpath_var=LD_LIBRARY_PATH
22291   shlibpath_overrides_runpath=yes
22292   hardcode_into_libs=yes
22293   ;;
22294
22295 newsos6)
22296   version_type=linux
22297   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22298   shlibpath_var=LD_LIBRARY_PATH
22299   shlibpath_overrides_runpath=yes
22300   ;;
22301
22302 *nto* | *qnx*)
22303   version_type=qnx
22304   need_lib_prefix=no
22305   need_version=no
22306   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22307   soname_spec='${libname}${release}${shared_ext}$major'
22308   shlibpath_var=LD_LIBRARY_PATH
22309   shlibpath_overrides_runpath=no
22310   hardcode_into_libs=yes
22311   dynamic_linker='ldqnx.so'
22312   ;;
22313
22314 openbsd*)
22315   version_type=sunos
22316   sys_lib_dlsearch_path_spec="/usr/lib"
22317   need_lib_prefix=no
22318   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
22319   case $host_os in
22320     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
22321     *)                          need_version=no  ;;
22322   esac
22323   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
22324   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
22325   shlibpath_var=LD_LIBRARY_PATH
22326   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
22327     case $host_os in
22328       openbsd2.[89] | openbsd2.[89].*)
22329         shlibpath_overrides_runpath=no
22330         ;;
22331       *)
22332         shlibpath_overrides_runpath=yes
22333         ;;
22334       esac
22335   else
22336     shlibpath_overrides_runpath=yes
22337   fi
22338   ;;
22339
22340 os2*)
22341   libname_spec='$name'
22342   shrext_cmds=".dll"
22343   need_lib_prefix=no
22344   library_names_spec='$libname${shared_ext} $libname.a'
22345   dynamic_linker='OS/2 ld.exe'
22346   shlibpath_var=LIBPATH
22347   ;;
22348
22349 osf3* | osf4* | osf5*)
22350   version_type=osf
22351   need_lib_prefix=no
22352   need_version=no
22353   soname_spec='${libname}${release}${shared_ext}$major'
22354   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22355   shlibpath_var=LD_LIBRARY_PATH
22356   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
22357   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
22358   ;;
22359
22360 rdos*)
22361   dynamic_linker=no
22362   ;;
22363
22364 solaris*)
22365   version_type=linux
22366   need_lib_prefix=no
22367   need_version=no
22368   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22369   soname_spec='${libname}${release}${shared_ext}$major'
22370   shlibpath_var=LD_LIBRARY_PATH
22371   shlibpath_overrides_runpath=yes
22372   hardcode_into_libs=yes
22373   # ldd complains unless libraries are executable
22374   postinstall_cmds='chmod +x $lib'
22375   ;;
22376
22377 sunos4*)
22378   version_type=sunos
22379   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
22380   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
22381   shlibpath_var=LD_LIBRARY_PATH
22382   shlibpath_overrides_runpath=yes
22383   if test "$with_gnu_ld" = yes; then
22384     need_lib_prefix=no
22385   fi
22386   need_version=yes
22387   ;;
22388
22389 sysv4 | sysv4.3*)
22390   version_type=linux
22391   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22392   soname_spec='${libname}${release}${shared_ext}$major'
22393   shlibpath_var=LD_LIBRARY_PATH
22394   case $host_vendor in
22395     sni)
22396       shlibpath_overrides_runpath=no
22397       need_lib_prefix=no
22398       runpath_var=LD_RUN_PATH
22399       ;;
22400     siemens)
22401       need_lib_prefix=no
22402       ;;
22403     motorola)
22404       need_lib_prefix=no
22405       need_version=no
22406       shlibpath_overrides_runpath=no
22407       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
22408       ;;
22409   esac
22410   ;;
22411
22412 sysv4*MP*)
22413   if test -d /usr/nec ;then
22414     version_type=linux
22415     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
22416     soname_spec='$libname${shared_ext}.$major'
22417     shlibpath_var=LD_LIBRARY_PATH
22418   fi
22419   ;;
22420
22421 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
22422   version_type=freebsd-elf
22423   need_lib_prefix=no
22424   need_version=no
22425   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
22426   soname_spec='${libname}${release}${shared_ext}$major'
22427   shlibpath_var=LD_LIBRARY_PATH
22428   shlibpath_overrides_runpath=yes
22429   hardcode_into_libs=yes
22430   if test "$with_gnu_ld" = yes; then
22431     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
22432   else
22433     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
22434     case $host_os in
22435       sco3.2v5*)
22436         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
22437         ;;
22438     esac
22439   fi
22440   sys_lib_dlsearch_path_spec='/usr/lib'
22441   ;;
22442
22443 tpf*)
22444   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
22445   version_type=linux
22446   need_lib_prefix=no
22447   need_version=no
22448   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22449   shlibpath_var=LD_LIBRARY_PATH
22450   shlibpath_overrides_runpath=no
22451   hardcode_into_libs=yes
22452   ;;
22453
22454 uts4*)
22455   version_type=linux
22456   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22457   soname_spec='${libname}${release}${shared_ext}$major'
22458   shlibpath_var=LD_LIBRARY_PATH
22459   ;;
22460
22461 *)
22462   dynamic_linker=no
22463   ;;
22464 esac
22465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
22466 $as_echo "$dynamic_linker" >&6; }
22467 test "$dynamic_linker" = no && can_build_shared=no
22468
22469 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
22470 if test "$GCC" = yes; then
22471   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
22472 fi
22473
22474 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
22475   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
22476 fi
22477 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
22478   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
22479 fi
22480
22481
22482
22483
22484
22485
22486
22487
22488
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   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
22573 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
22574 hardcode_action=
22575 if test -n "$hardcode_libdir_flag_spec" ||
22576    test -n "$runpath_var" ||
22577    test "X$hardcode_automatic" = "Xyes" ; then
22578
22579   # We can hardcode non-existent directories.
22580   if test "$hardcode_direct" != no &&
22581      # If the only mechanism to avoid hardcoding is shlibpath_var, we
22582      # have to relink, otherwise we might link with an installed library
22583      # when we should be linking with a yet-to-be-installed one
22584      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
22585      test "$hardcode_minus_L" != no; then
22586     # Linking always hardcodes the temporary library directory.
22587     hardcode_action=relink
22588   else
22589     # We can link without hardcoding, and we can hardcode nonexisting dirs.
22590     hardcode_action=immediate
22591   fi
22592 else
22593   # We cannot hardcode anything, or else we can only hardcode existing
22594   # directories.
22595   hardcode_action=unsupported
22596 fi
22597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
22598 $as_echo "$hardcode_action" >&6; }
22599
22600 if test "$hardcode_action" = relink ||
22601    test "$inherit_rpath" = yes; then
22602   # Fast installation is not supported
22603   enable_fast_install=no
22604 elif test "$shlibpath_overrides_runpath" = yes ||
22605      test "$enable_shared" = no; then
22606   # Fast installation is not necessary
22607   enable_fast_install=needless
22608 fi
22609
22610
22611
22612
22613
22614
22615   if test "x$enable_dlopen" != xyes; then
22616   enable_dlopen=unknown
22617   enable_dlopen_self=unknown
22618   enable_dlopen_self_static=unknown
22619 else
22620   lt_cv_dlopen=no
22621   lt_cv_dlopen_libs=
22622
22623   case $host_os in
22624   beos*)
22625     lt_cv_dlopen="load_add_on"
22626     lt_cv_dlopen_libs=
22627     lt_cv_dlopen_self=yes
22628     ;;
22629
22630   mingw* | pw32* | cegcc*)
22631     lt_cv_dlopen="LoadLibrary"
22632     lt_cv_dlopen_libs=
22633     ;;
22634
22635   cygwin*)
22636     lt_cv_dlopen="dlopen"
22637     lt_cv_dlopen_libs=
22638     ;;
22639
22640   darwin*)
22641   # if libdl is installed we need to link against it
22642     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
22643 $as_echo_n "checking for dlopen in -ldl... " >&6; }
22644 if ${ac_cv_lib_dl_dlopen+:} false; then :
22645   $as_echo_n "(cached) " >&6
22646 else
22647   ac_check_lib_save_LIBS=$LIBS
22648 LIBS="-ldl  $LIBS"
22649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22650 /* end confdefs.h.  */
22651
22652 /* Override any GCC internal prototype to avoid an error.
22653    Use char because int might match the return type of a GCC
22654    builtin and then its argument prototype would still apply.  */
22655 #ifdef __cplusplus
22656 extern "C"
22657 #endif
22658 char dlopen ();
22659 int
22660 main ()
22661 {
22662 return dlopen ();
22663   ;
22664   return 0;
22665 }
22666 _ACEOF
22667 if ac_fn_c_try_link "$LINENO"; then :
22668   ac_cv_lib_dl_dlopen=yes
22669 else
22670   ac_cv_lib_dl_dlopen=no
22671 fi
22672 rm -f core conftest.err conftest.$ac_objext \
22673     conftest$ac_exeext conftest.$ac_ext
22674 LIBS=$ac_check_lib_save_LIBS
22675 fi
22676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
22677 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
22678 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
22679   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
22680 else
22681
22682     lt_cv_dlopen="dyld"
22683     lt_cv_dlopen_libs=
22684     lt_cv_dlopen_self=yes
22685
22686 fi
22687
22688     ;;
22689
22690   *)
22691     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
22692 if test "x$ac_cv_func_shl_load" = xyes; then :
22693   lt_cv_dlopen="shl_load"
22694 else
22695   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
22696 $as_echo_n "checking for shl_load in -ldld... " >&6; }
22697 if ${ac_cv_lib_dld_shl_load+:} false; then :
22698   $as_echo_n "(cached) " >&6
22699 else
22700   ac_check_lib_save_LIBS=$LIBS
22701 LIBS="-ldld  $LIBS"
22702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22703 /* end confdefs.h.  */
22704
22705 /* Override any GCC internal prototype to avoid an error.
22706    Use char because int might match the return type of a GCC
22707    builtin and then its argument prototype would still apply.  */
22708 #ifdef __cplusplus
22709 extern "C"
22710 #endif
22711 char shl_load ();
22712 int
22713 main ()
22714 {
22715 return shl_load ();
22716   ;
22717   return 0;
22718 }
22719 _ACEOF
22720 if ac_fn_c_try_link "$LINENO"; then :
22721   ac_cv_lib_dld_shl_load=yes
22722 else
22723   ac_cv_lib_dld_shl_load=no
22724 fi
22725 rm -f core conftest.err conftest.$ac_objext \
22726     conftest$ac_exeext conftest.$ac_ext
22727 LIBS=$ac_check_lib_save_LIBS
22728 fi
22729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
22730 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
22731 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
22732   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
22733 else
22734   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
22735 if test "x$ac_cv_func_dlopen" = xyes; then :
22736   lt_cv_dlopen="dlopen"
22737 else
22738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
22739 $as_echo_n "checking for dlopen in -ldl... " >&6; }
22740 if ${ac_cv_lib_dl_dlopen+:} false; then :
22741   $as_echo_n "(cached) " >&6
22742 else
22743   ac_check_lib_save_LIBS=$LIBS
22744 LIBS="-ldl  $LIBS"
22745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22746 /* end confdefs.h.  */
22747
22748 /* Override any GCC internal prototype to avoid an error.
22749    Use char because int might match the return type of a GCC
22750    builtin and then its argument prototype would still apply.  */
22751 #ifdef __cplusplus
22752 extern "C"
22753 #endif
22754 char dlopen ();
22755 int
22756 main ()
22757 {
22758 return dlopen ();
22759   ;
22760   return 0;
22761 }
22762 _ACEOF
22763 if ac_fn_c_try_link "$LINENO"; then :
22764   ac_cv_lib_dl_dlopen=yes
22765 else
22766   ac_cv_lib_dl_dlopen=no
22767 fi
22768 rm -f core conftest.err conftest.$ac_objext \
22769     conftest$ac_exeext conftest.$ac_ext
22770 LIBS=$ac_check_lib_save_LIBS
22771 fi
22772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
22773 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
22774 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
22775   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
22776 else
22777   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
22778 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
22779 if ${ac_cv_lib_svld_dlopen+:} false; then :
22780   $as_echo_n "(cached) " >&6
22781 else
22782   ac_check_lib_save_LIBS=$LIBS
22783 LIBS="-lsvld  $LIBS"
22784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22785 /* end confdefs.h.  */
22786
22787 /* Override any GCC internal prototype to avoid an error.
22788    Use char because int might match the return type of a GCC
22789    builtin and then its argument prototype would still apply.  */
22790 #ifdef __cplusplus
22791 extern "C"
22792 #endif
22793 char dlopen ();
22794 int
22795 main ()
22796 {
22797 return dlopen ();
22798   ;
22799   return 0;
22800 }
22801 _ACEOF
22802 if ac_fn_c_try_link "$LINENO"; then :
22803   ac_cv_lib_svld_dlopen=yes
22804 else
22805   ac_cv_lib_svld_dlopen=no
22806 fi
22807 rm -f core conftest.err conftest.$ac_objext \
22808     conftest$ac_exeext conftest.$ac_ext
22809 LIBS=$ac_check_lib_save_LIBS
22810 fi
22811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
22812 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
22813 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
22814   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
22815 else
22816   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
22817 $as_echo_n "checking for dld_link in -ldld... " >&6; }
22818 if ${ac_cv_lib_dld_dld_link+:} false; then :
22819   $as_echo_n "(cached) " >&6
22820 else
22821   ac_check_lib_save_LIBS=$LIBS
22822 LIBS="-ldld  $LIBS"
22823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22824 /* end confdefs.h.  */
22825
22826 /* Override any GCC internal prototype to avoid an error.
22827    Use char because int might match the return type of a GCC
22828    builtin and then its argument prototype would still apply.  */
22829 #ifdef __cplusplus
22830 extern "C"
22831 #endif
22832 char dld_link ();
22833 int
22834 main ()
22835 {
22836 return dld_link ();
22837   ;
22838   return 0;
22839 }
22840 _ACEOF
22841 if ac_fn_c_try_link "$LINENO"; then :
22842   ac_cv_lib_dld_dld_link=yes
22843 else
22844   ac_cv_lib_dld_dld_link=no
22845 fi
22846 rm -f core conftest.err conftest.$ac_objext \
22847     conftest$ac_exeext conftest.$ac_ext
22848 LIBS=$ac_check_lib_save_LIBS
22849 fi
22850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
22851 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
22852 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
22853   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
22854 fi
22855
22856
22857 fi
22858
22859
22860 fi
22861
22862
22863 fi
22864
22865
22866 fi
22867
22868
22869 fi
22870
22871     ;;
22872   esac
22873
22874   if test "x$lt_cv_dlopen" != xno; then
22875     enable_dlopen=yes
22876   else
22877     enable_dlopen=no
22878   fi
22879
22880   case $lt_cv_dlopen in
22881   dlopen)
22882     save_CPPFLAGS="$CPPFLAGS"
22883     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
22884
22885     save_LDFLAGS="$LDFLAGS"
22886     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
22887
22888     save_LIBS="$LIBS"
22889     LIBS="$lt_cv_dlopen_libs $LIBS"
22890
22891     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
22892 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
22893 if ${lt_cv_dlopen_self+:} false; then :
22894   $as_echo_n "(cached) " >&6
22895 else
22896           if test "$cross_compiling" = yes; then :
22897   lt_cv_dlopen_self=cross
22898 else
22899   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
22900   lt_status=$lt_dlunknown
22901   cat > conftest.$ac_ext <<_LT_EOF
22902 #line $LINENO "configure"
22903 #include "confdefs.h"
22904
22905 #if HAVE_DLFCN_H
22906 #include <dlfcn.h>
22907 #endif
22908
22909 #include <stdio.h>
22910
22911 #ifdef RTLD_GLOBAL
22912 #  define LT_DLGLOBAL           RTLD_GLOBAL
22913 #else
22914 #  ifdef DL_GLOBAL
22915 #    define LT_DLGLOBAL         DL_GLOBAL
22916 #  else
22917 #    define LT_DLGLOBAL         0
22918 #  endif
22919 #endif
22920
22921 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
22922    find out it does not work in some platform. */
22923 #ifndef LT_DLLAZY_OR_NOW
22924 #  ifdef RTLD_LAZY
22925 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
22926 #  else
22927 #    ifdef DL_LAZY
22928 #      define LT_DLLAZY_OR_NOW          DL_LAZY
22929 #    else
22930 #      ifdef RTLD_NOW
22931 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
22932 #      else
22933 #        ifdef DL_NOW
22934 #          define LT_DLLAZY_OR_NOW      DL_NOW
22935 #        else
22936 #          define LT_DLLAZY_OR_NOW      0
22937 #        endif
22938 #      endif
22939 #    endif
22940 #  endif
22941 #endif
22942
22943 /* When -fvisbility=hidden is used, assume the code has been annotated
22944    correspondingly for the symbols needed.  */
22945 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
22946 int fnord () __attribute__((visibility("default")));
22947 #endif
22948
22949 int fnord () { return 42; }
22950 int main ()
22951 {
22952   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
22953   int status = $lt_dlunknown;
22954
22955   if (self)
22956     {
22957       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
22958       else
22959         {
22960           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
22961           else puts (dlerror ());
22962         }
22963       /* dlclose (self); */
22964     }
22965   else
22966     puts (dlerror ());
22967
22968   return status;
22969 }
22970 _LT_EOF
22971   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
22972   (eval $ac_link) 2>&5
22973   ac_status=$?
22974   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22975   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
22976     (./conftest; exit; ) >&5 2>/dev/null
22977     lt_status=$?
22978     case x$lt_status in
22979       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
22980       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
22981       x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
22982     esac
22983   else :
22984     # compilation failed
22985     lt_cv_dlopen_self=no
22986   fi
22987 fi
22988 rm -fr conftest*
22989
22990
22991 fi
22992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
22993 $as_echo "$lt_cv_dlopen_self" >&6; }
22994
22995     if test "x$lt_cv_dlopen_self" = xyes; then
22996       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
22997       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
22998 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
22999 if ${lt_cv_dlopen_self_static+:} false; then :
23000   $as_echo_n "(cached) " >&6
23001 else
23002           if test "$cross_compiling" = yes; then :
23003   lt_cv_dlopen_self_static=cross
23004 else
23005   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
23006   lt_status=$lt_dlunknown
23007   cat > conftest.$ac_ext <<_LT_EOF
23008 #line $LINENO "configure"
23009 #include "confdefs.h"
23010
23011 #if HAVE_DLFCN_H
23012 #include <dlfcn.h>
23013 #endif
23014
23015 #include <stdio.h>
23016
23017 #ifdef RTLD_GLOBAL
23018 #  define LT_DLGLOBAL           RTLD_GLOBAL
23019 #else
23020 #  ifdef DL_GLOBAL
23021 #    define LT_DLGLOBAL         DL_GLOBAL
23022 #  else
23023 #    define LT_DLGLOBAL         0
23024 #  endif
23025 #endif
23026
23027 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
23028    find out it does not work in some platform. */
23029 #ifndef LT_DLLAZY_OR_NOW
23030 #  ifdef RTLD_LAZY
23031 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
23032 #  else
23033 #    ifdef DL_LAZY
23034 #      define LT_DLLAZY_OR_NOW          DL_LAZY
23035 #    else
23036 #      ifdef RTLD_NOW
23037 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
23038 #      else
23039 #        ifdef DL_NOW
23040 #          define LT_DLLAZY_OR_NOW      DL_NOW
23041 #        else
23042 #          define LT_DLLAZY_OR_NOW      0
23043 #        endif
23044 #      endif
23045 #    endif
23046 #  endif
23047 #endif
23048
23049 /* When -fvisbility=hidden is used, assume the code has been annotated
23050    correspondingly for the symbols needed.  */
23051 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
23052 int fnord () __attribute__((visibility("default")));
23053 #endif
23054
23055 int fnord () { return 42; }
23056 int main ()
23057 {
23058   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
23059   int status = $lt_dlunknown;
23060
23061   if (self)
23062     {
23063       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
23064       else
23065         {
23066           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
23067           else puts (dlerror ());
23068         }
23069       /* dlclose (self); */
23070     }
23071   else
23072     puts (dlerror ());
23073
23074   return status;
23075 }
23076 _LT_EOF
23077   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
23078   (eval $ac_link) 2>&5
23079   ac_status=$?
23080   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23081   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
23082     (./conftest; exit; ) >&5 2>/dev/null
23083     lt_status=$?
23084     case x$lt_status in
23085       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
23086       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
23087       x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
23088     esac
23089   else :
23090     # compilation failed
23091     lt_cv_dlopen_self_static=no
23092   fi
23093 fi
23094 rm -fr conftest*
23095
23096
23097 fi
23098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
23099 $as_echo "$lt_cv_dlopen_self_static" >&6; }
23100     fi
23101
23102     CPPFLAGS="$save_CPPFLAGS"
23103     LDFLAGS="$save_LDFLAGS"
23104     LIBS="$save_LIBS"
23105     ;;
23106   esac
23107
23108   case $lt_cv_dlopen_self in
23109   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
23110   *) enable_dlopen_self=unknown ;;
23111   esac
23112
23113   case $lt_cv_dlopen_self_static in
23114   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
23115   *) enable_dlopen_self_static=unknown ;;
23116   esac
23117 fi
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135 striplib=
23136 old_striplib=
23137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
23138 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
23139 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
23140   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
23141   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
23142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23143 $as_echo "yes" >&6; }
23144 else
23145 # FIXME - insert some real tests, host_os isn't really good enough
23146   case $host_os in
23147   darwin*)
23148     if test -n "$STRIP" ; then
23149       striplib="$STRIP -x"
23150       old_striplib="$STRIP -S"
23151       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23152 $as_echo "yes" >&6; }
23153     else
23154       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23155 $as_echo "no" >&6; }
23156     fi
23157     ;;
23158   *)
23159     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23160 $as_echo "no" >&6; }
23161     ;;
23162   esac
23163 fi
23164
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176   # Report which library types will actually be built
23177   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
23178 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
23179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
23180 $as_echo "$can_build_shared" >&6; }
23181
23182   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
23183 $as_echo_n "checking whether to build shared libraries... " >&6; }
23184   test "$can_build_shared" = "no" && enable_shared=no
23185
23186   # On AIX, shared libraries and static libraries use the same namespace, and
23187   # are all built from PIC.
23188   case $host_os in
23189   aix3*)
23190     test "$enable_shared" = yes && enable_static=no
23191     if test -n "$RANLIB"; then
23192       archive_cmds="$archive_cmds~\$RANLIB \$lib"
23193       postinstall_cmds='$RANLIB $lib'
23194     fi
23195     ;;
23196
23197   aix[4-9]*)
23198     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
23199       test "$enable_shared" = yes && enable_static=no
23200     fi
23201     ;;
23202   esac
23203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
23204 $as_echo "$enable_shared" >&6; }
23205
23206   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
23207 $as_echo_n "checking whether to build static libraries... " >&6; }
23208   # Make sure either enable_shared or enable_static is yes.
23209   test "$enable_shared" = yes || enable_static=yes
23210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
23211 $as_echo "$enable_static" >&6; }
23212
23213
23214
23215
23216 fi
23217 ac_ext=c
23218 ac_cpp='$CPP $CPPFLAGS'
23219 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23220 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23221 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23222
23223 CC="$lt_save_CC"
23224
23225
23226
23227
23228
23229
23230
23231
23232
23233
23234
23235
23236
23237         ac_config_commands="$ac_config_commands libtool"
23238
23239
23240
23241
23242 # Only expand once:
23243
23244
23245
23246
23247
23248
23249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
23250 $as_echo_n "checking if sntp will be built... " >&6; }
23251
23252 # Check whether --with-sntp was given.
23253 if test "${with_sntp+set}" = set; then :
23254   withval=$with_sntp;
23255 else
23256   with_sntp="${withsntp=yes}"
23257
23258 fi
23259
23260 case "$with_sntp" in
23261  no)
23262     SNTP=
23263     ;;
23264  *)
23265     SNTP=sntp
23266     ;;
23267 esac
23268
23269  if test -n "$SNTP"; then
23270   BUILD_SNTP_TRUE=
23271   BUILD_SNTP_FALSE='#'
23272 else
23273   BUILD_SNTP_TRUE='#'
23274   BUILD_SNTP_FALSE=
23275 fi
23276
23277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
23278 $as_echo "$with_sntp" >&6; }
23279
23280
23281
23282 case "$SNTP" in
23283  '')
23284     SNTP_DB=
23285     SNTP_DL=
23286     SNTP_DS=
23287     ;;
23288 esac
23289
23290 ###
23291
23292 # NTP has (so far) been relying on leading-edge autogen.
23293 # Therefore, by default:
23294 # - use the version we ship with
23295 # - do not install it
23296 # - build a static copy (AC_DISABLE_SHARED - done earlier)
23297 case "${enable_local_libopts+set}" in
23298  set) ;;
23299  *) enable_local_libopts=yes ;;
23300 esac
23301 case "${enable_libopts_install+set}" in
23302  set) ;;
23303  *) enable_libopts_install=no ;;
23304 esac
23305 enable_nls=no
23306
23307
23308   ac_header_dirent=no
23309 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
23310   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
23311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
23312 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
23313 if eval \${$as_ac_Header+:} false; then :
23314   $as_echo_n "(cached) " >&6
23315 else
23316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23317 /* end confdefs.h.  */
23318 #include <sys/types.h>
23319 #include <$ac_hdr>
23320
23321 int
23322 main ()
23323 {
23324 if ((DIR *) 0)
23325 return 0;
23326   ;
23327   return 0;
23328 }
23329 _ACEOF
23330 if ac_fn_c_try_compile "$LINENO"; then :
23331   eval "$as_ac_Header=yes"
23332 else
23333   eval "$as_ac_Header=no"
23334 fi
23335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23336 fi
23337 eval ac_res=\$$as_ac_Header
23338                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23339 $as_echo "$ac_res" >&6; }
23340 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23341   cat >>confdefs.h <<_ACEOF
23342 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
23343 _ACEOF
23344
23345 ac_header_dirent=$ac_hdr; break
23346 fi
23347
23348 done
23349 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
23350 if test $ac_header_dirent = dirent.h; then
23351   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
23352 $as_echo_n "checking for library containing opendir... " >&6; }
23353 if ${ac_cv_search_opendir+:} false; then :
23354   $as_echo_n "(cached) " >&6
23355 else
23356   ac_func_search_save_LIBS=$LIBS
23357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23358 /* end confdefs.h.  */
23359
23360 /* Override any GCC internal prototype to avoid an error.
23361    Use char because int might match the return type of a GCC
23362    builtin and then its argument prototype would still apply.  */
23363 #ifdef __cplusplus
23364 extern "C"
23365 #endif
23366 char opendir ();
23367 int
23368 main ()
23369 {
23370 return opendir ();
23371   ;
23372   return 0;
23373 }
23374 _ACEOF
23375 for ac_lib in '' dir; do
23376   if test -z "$ac_lib"; then
23377     ac_res="none required"
23378   else
23379     ac_res=-l$ac_lib
23380     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23381   fi
23382   if ac_fn_c_try_link "$LINENO"; then :
23383   ac_cv_search_opendir=$ac_res
23384 fi
23385 rm -f core conftest.err conftest.$ac_objext \
23386     conftest$ac_exeext
23387   if ${ac_cv_search_opendir+:} false; then :
23388   break
23389 fi
23390 done
23391 if ${ac_cv_search_opendir+:} false; then :
23392
23393 else
23394   ac_cv_search_opendir=no
23395 fi
23396 rm conftest.$ac_ext
23397 LIBS=$ac_func_search_save_LIBS
23398 fi
23399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
23400 $as_echo "$ac_cv_search_opendir" >&6; }
23401 ac_res=$ac_cv_search_opendir
23402 if test "$ac_res" != no; then :
23403   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23404
23405 fi
23406
23407 else
23408   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
23409 $as_echo_n "checking for library containing opendir... " >&6; }
23410 if ${ac_cv_search_opendir+:} false; then :
23411   $as_echo_n "(cached) " >&6
23412 else
23413   ac_func_search_save_LIBS=$LIBS
23414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23415 /* end confdefs.h.  */
23416
23417 /* Override any GCC internal prototype to avoid an error.
23418    Use char because int might match the return type of a GCC
23419    builtin and then its argument prototype would still apply.  */
23420 #ifdef __cplusplus
23421 extern "C"
23422 #endif
23423 char opendir ();
23424 int
23425 main ()
23426 {
23427 return opendir ();
23428   ;
23429   return 0;
23430 }
23431 _ACEOF
23432 for ac_lib in '' x; do
23433   if test -z "$ac_lib"; then
23434     ac_res="none required"
23435   else
23436     ac_res=-l$ac_lib
23437     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23438   fi
23439   if ac_fn_c_try_link "$LINENO"; then :
23440   ac_cv_search_opendir=$ac_res
23441 fi
23442 rm -f core conftest.err conftest.$ac_objext \
23443     conftest$ac_exeext
23444   if ${ac_cv_search_opendir+:} false; then :
23445   break
23446 fi
23447 done
23448 if ${ac_cv_search_opendir+:} false; then :
23449
23450 else
23451   ac_cv_search_opendir=no
23452 fi
23453 rm conftest.$ac_ext
23454 LIBS=$ac_func_search_save_LIBS
23455 fi
23456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
23457 $as_echo "$ac_cv_search_opendir" >&6; }
23458 ac_res=$ac_cv_search_opendir
23459 if test "$ac_res" != no; then :
23460   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23461
23462 fi
23463
23464 fi
23465
23466
23467   # =================
23468   # AC_CHECK_HEADERS
23469   # =================
23470   for ac_header in  \
23471       sys/mman.h    sys/param.h   sys/poll.h    sys/procset.h \
23472       sys/select.h  sys/socket.h  sys/stropts.h sys/time.h \
23473       sys/un.h      sys/wait.h    dlfcn.h       errno.h \
23474       fcntl.h       libgen.h      libintl.h     memory.h \
23475       netinet/in.h  setjmp.h      stdbool.h     sysexits.h \
23476       unistd.h      utime.h
23477 do :
23478   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23479 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23480 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23481   cat >>confdefs.h <<_ACEOF
23482 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23483 _ACEOF
23484
23485 fi
23486
23487 done
23488
23489
23490   for ac_header in stdarg.h     varargs.h
23491 do :
23492   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23493 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23494 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23495   cat >>confdefs.h <<_ACEOF
23496 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23497 _ACEOF
23498  lo_have_arg_hdr=true;break
23499 else
23500   lo_have_arg_hdr=false
23501 fi
23502
23503 done
23504
23505
23506   for ac_header in string.h     strings.h
23507 do :
23508   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23509 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23510 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23511   cat >>confdefs.h <<_ACEOF
23512 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23513 _ACEOF
23514  lo_have_str_hdr=true;break
23515 else
23516   lo_have_str_hdr=false
23517 fi
23518
23519 done
23520
23521
23522   for ac_header in limits.h     sys/limits.h  values.h
23523 do :
23524   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23525 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23526 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23527   cat >>confdefs.h <<_ACEOF
23528 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23529 _ACEOF
23530  lo_have_lim_hdr=true;break
23531 else
23532   lo_have_lim_hdr=false
23533 fi
23534
23535 done
23536
23537
23538   for ac_header in inttypes.h   stdint.h
23539 do :
23540   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23541 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23542 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23543   cat >>confdefs.h <<_ACEOF
23544 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23545 _ACEOF
23546  lo_have_typ_hdr=true;break
23547 else
23548   lo_have_typ_hdr=false
23549 fi
23550
23551 done
23552
23553
23554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
23555 $as_echo_n "checking for working stdnoreturn.h... " >&6; }
23556 if ${gl_cv_header_working_stdnoreturn_h+:} false; then :
23557   $as_echo_n "(cached) " >&6
23558 else
23559   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23560 /* end confdefs.h.  */
23561 #include <stdlib.h>
23562             #include <stdnoreturn.h>
23563             /* Do not check for 'noreturn' after the return type.
23564                C11 allows it, but it's rarely done that way
23565                and circa-2012 bleeding-edge GCC rejects it when given
23566                -Werror=old-style-declaration.  */
23567             noreturn void foo1 (void) { exit (0); }
23568             _Noreturn void foo2 (void) { exit (0); }
23569             int testit (int argc, char **argv) {
23570               if (argc & 1)
23571                 return 0;
23572               (argv[0][0] ? foo1 : foo2) ();
23573             }
23574
23575 int
23576 main ()
23577 {
23578
23579   ;
23580   return 0;
23581 }
23582 _ACEOF
23583 if ac_fn_c_try_compile "$LINENO"; then :
23584   gl_cv_header_working_stdnoreturn_h=yes
23585 else
23586   gl_cv_header_working_stdnoreturn_h=no
23587 fi
23588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23589 fi
23590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
23591 $as_echo "$gl_cv_header_working_stdnoreturn_h" >&6; }
23592
23593   if test $gl_cv_header_working_stdnoreturn_h = yes; then
23594     STDNORETURN_H=''
23595   else
23596     STDNORETURN_H='stdnoreturn.h'
23597   fi
23598
23599
23600    if test -n "$STDNORETURN_H"; then
23601   GL_GENERATE_STDNORETURN_H_TRUE=
23602   GL_GENERATE_STDNORETURN_H_FALSE='#'
23603 else
23604   GL_GENERATE_STDNORETURN_H_TRUE='#'
23605   GL_GENERATE_STDNORETURN_H_FALSE=
23606 fi
23607
23608
23609
23610   # ----------------------------------------------------------------------
23611   # check for various programs used during the build.
23612   # On OS/X, "wchar.h" needs "runetype.h" to work properly.
23613   # ----------------------------------------------------------------------
23614   for ac_header in runetype.h wchar.h
23615 do :
23616   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23617 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
23618   $ac_includes_default
23619   #if HAVE_RUNETYPE_H
23620   # include <runetype.h>
23621   #endif
23622
23623 "
23624 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23625   cat >>confdefs.h <<_ACEOF
23626 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23627 _ACEOF
23628
23629 fi
23630
23631 done
23632
23633
23634   # Check whether --enable-nls was given.
23635 if test "${enable_nls+set}" = set; then :
23636   enableval=$enable_nls;
23637 fi
23638
23639   if test "x$enable_nls" != "xno" && \
23640   test "X${ac_cv_header_libintl_h}" = Xyes; then :
23641
23642
23643 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
23644
23645 fi
23646
23647   # --------------------------------------------
23648   # Verify certain entries from AC_CHECK_HEADERS
23649   # --------------------------------------------
23650   ${lo_have_arg_hdr} || \
23651     as_fn_error $? "you must have stdarg.h or varargs.h on your system" "$LINENO" 5
23652
23653   ${lo_have_str_hdr} || \
23654     as_fn_error $? "you must have string.h or strings.h on your system" "$LINENO" 5
23655
23656   ${lo_have_lim_hdr} || \
23657     as_fn_error $? "you must have one of limits.h, sys/limits.h or values.h" "$LINENO" 5
23658
23659   ${lo_have_typ_hdr} || \
23660     as_fn_error $? "you must have inttypes.h or stdint.h on your system" "$LINENO" 5
23661
23662   for f in sys_types sys_param sys_stat string errno stdlib memory setjmp
23663   do eval as_ac_var=\${ac_cv_header_${f}_h}
23664      test "X${as_ac_var}" = Xyes || {
23665        as_fn_error $? "you must have ${f}.h on your system" "$LINENO" 5
23666      }
23667   done
23668   test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
23669     echo '#include <stdint.h>' > inttypes.h
23670
23671   # ----------------------------------------------------------------------
23672   # Checks for typedefs
23673   # ----------------------------------------------------------------------
23674   ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
23675 if test "x$ac_cv_type_wchar_t" = xyes; then :
23676
23677 cat >>confdefs.h <<_ACEOF
23678 #define HAVE_WCHAR_T 1
23679 _ACEOF
23680
23681
23682 fi
23683
23684   ac_fn_c_check_type "$LINENO" "wint_t" "ac_cv_type_wint_t" "
23685     $ac_includes_default
23686     #if HAVE_RUNETYPE_H
23687     # include <runetype.h>
23688     #endif
23689     #if HAVE_WCHAR_H
23690     # include <wchar.h>
23691     #endif
23692
23693 "
23694 if test "x$ac_cv_type_wint_t" = xyes; then :
23695
23696 cat >>confdefs.h <<_ACEOF
23697 #define HAVE_WINT_T 1
23698 _ACEOF
23699
23700
23701 fi
23702
23703   ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
23704 if test "x$ac_cv_type_int8_t" = xyes; then :
23705
23706 cat >>confdefs.h <<_ACEOF
23707 #define HAVE_INT8_T 1
23708 _ACEOF
23709
23710
23711 fi
23712 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
23713 if test "x$ac_cv_type_uint8_t" = xyes; then :
23714
23715 cat >>confdefs.h <<_ACEOF
23716 #define HAVE_UINT8_T 1
23717 _ACEOF
23718
23719
23720 fi
23721 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
23722 if test "x$ac_cv_type_int16_t" = xyes; then :
23723
23724 cat >>confdefs.h <<_ACEOF
23725 #define HAVE_INT16_T 1
23726 _ACEOF
23727
23728
23729 fi
23730 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
23731 if test "x$ac_cv_type_uint16_t" = xyes; then :
23732
23733 cat >>confdefs.h <<_ACEOF
23734 #define HAVE_UINT16_T 1
23735 _ACEOF
23736
23737
23738 fi
23739 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
23740 if test "x$ac_cv_type_int32_t" = xyes; then :
23741
23742 cat >>confdefs.h <<_ACEOF
23743 #define HAVE_INT32_T 1
23744 _ACEOF
23745
23746
23747 fi
23748 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
23749 if test "x$ac_cv_type_uint32_t" = xyes; then :
23750
23751 cat >>confdefs.h <<_ACEOF
23752 #define HAVE_UINT32_T 1
23753 _ACEOF
23754
23755
23756 fi
23757 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
23758 if test "x$ac_cv_type_intptr_t" = xyes; then :
23759
23760 cat >>confdefs.h <<_ACEOF
23761 #define HAVE_INTPTR_T 1
23762 _ACEOF
23763
23764
23765 fi
23766 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
23767 if test "x$ac_cv_type_uintptr_t" = xyes; then :
23768
23769 cat >>confdefs.h <<_ACEOF
23770 #define HAVE_UINTPTR_T 1
23771 _ACEOF
23772
23773
23774 fi
23775 ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
23776 if test "x$ac_cv_type_uint_t" = xyes; then :
23777
23778 cat >>confdefs.h <<_ACEOF
23779 #define HAVE_UINT_T 1
23780 _ACEOF
23781
23782
23783 fi
23784 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
23785 if test "x$ac_cv_type_pid_t" = xyes; then :
23786
23787 cat >>confdefs.h <<_ACEOF
23788 #define HAVE_PID_T 1
23789 _ACEOF
23790
23791
23792 fi
23793 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
23794 if test "x$ac_cv_type_size_t" = xyes; then :
23795
23796 cat >>confdefs.h <<_ACEOF
23797 #define HAVE_SIZE_T 1
23798 _ACEOF
23799
23800
23801 fi
23802 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
23803 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
23804
23805 cat >>confdefs.h <<_ACEOF
23806 #define HAVE_PTRDIFF_T 1
23807 _ACEOF
23808
23809
23810 fi
23811
23812   # The cast to long int works around a bug in the HP C Compiler
23813 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23814 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23815 # This bug is HP SR number 8606223364.
23816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
23817 $as_echo_n "checking size of char *... " >&6; }
23818 if ${ac_cv_sizeof_char_p+:} false; then :
23819   $as_echo_n "(cached) " >&6
23820 else
23821   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p"        "$ac_includes_default"; then :
23822
23823 else
23824   if test "$ac_cv_type_char_p" = yes; then
23825      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23826 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23827 as_fn_error 77 "cannot compute sizeof (char *)
23828 See \`config.log' for more details" "$LINENO" 5; }
23829    else
23830      ac_cv_sizeof_char_p=0
23831    fi
23832 fi
23833
23834 fi
23835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
23836 $as_echo "$ac_cv_sizeof_char_p" >&6; }
23837
23838
23839
23840 cat >>confdefs.h <<_ACEOF
23841 #define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
23842 _ACEOF
23843
23844
23845   # The cast to long int works around a bug in the HP C Compiler
23846 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23847 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23848 # This bug is HP SR number 8606223364.
23849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
23850 $as_echo_n "checking size of int... " >&6; }
23851 if ${ac_cv_sizeof_int+:} false; then :
23852   $as_echo_n "(cached) " >&6
23853 else
23854   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
23855
23856 else
23857   if test "$ac_cv_type_int" = yes; then
23858      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23859 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23860 as_fn_error 77 "cannot compute sizeof (int)
23861 See \`config.log' for more details" "$LINENO" 5; }
23862    else
23863      ac_cv_sizeof_int=0
23864    fi
23865 fi
23866
23867 fi
23868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
23869 $as_echo "$ac_cv_sizeof_int" >&6; }
23870
23871
23872
23873 cat >>confdefs.h <<_ACEOF
23874 #define SIZEOF_INT $ac_cv_sizeof_int
23875 _ACEOF
23876
23877
23878   # The cast to long int works around a bug in the HP C Compiler
23879 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23880 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23881 # This bug is HP SR number 8606223364.
23882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
23883 $as_echo_n "checking size of long... " >&6; }
23884 if ${ac_cv_sizeof_long+:} false; then :
23885   $as_echo_n "(cached) " >&6
23886 else
23887   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
23888
23889 else
23890   if test "$ac_cv_type_long" = yes; then
23891      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23892 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23893 as_fn_error 77 "cannot compute sizeof (long)
23894 See \`config.log' for more details" "$LINENO" 5; }
23895    else
23896      ac_cv_sizeof_long=0
23897    fi
23898 fi
23899
23900 fi
23901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
23902 $as_echo "$ac_cv_sizeof_long" >&6; }
23903
23904
23905
23906 cat >>confdefs.h <<_ACEOF
23907 #define SIZEOF_LONG $ac_cv_sizeof_long
23908 _ACEOF
23909
23910
23911   # The cast to long int works around a bug in the HP C Compiler
23912 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23913 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23914 # This bug is HP SR number 8606223364.
23915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
23916 $as_echo_n "checking size of short... " >&6; }
23917 if ${ac_cv_sizeof_short+:} false; then :
23918   $as_echo_n "(cached) " >&6
23919 else
23920   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
23921
23922 else
23923   if test "$ac_cv_type_short" = yes; then
23924      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23925 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23926 as_fn_error 77 "cannot compute sizeof (short)
23927 See \`config.log' for more details" "$LINENO" 5; }
23928    else
23929      ac_cv_sizeof_short=0
23930    fi
23931 fi
23932
23933 fi
23934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
23935 $as_echo "$ac_cv_sizeof_short" >&6; }
23936
23937
23938
23939 cat >>confdefs.h <<_ACEOF
23940 #define SIZEOF_SHORT $ac_cv_sizeof_short
23941 _ACEOF
23942
23943
23944
23945   # ------------
23946   # AC_CHECK_LIB
23947   # ------------
23948   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
23949 $as_echo_n "checking for pathfind in -lgen... " >&6; }
23950 if ${ac_cv_lib_gen_pathfind+:} false; then :
23951   $as_echo_n "(cached) " >&6
23952 else
23953   ac_check_lib_save_LIBS=$LIBS
23954 LIBS="-lgen  $LIBS"
23955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23956 /* end confdefs.h.  */
23957
23958 /* Override any GCC internal prototype to avoid an error.
23959    Use char because int might match the return type of a GCC
23960    builtin and then its argument prototype would still apply.  */
23961 #ifdef __cplusplus
23962 extern "C"
23963 #endif
23964 char pathfind ();
23965 int
23966 main ()
23967 {
23968 return pathfind ();
23969   ;
23970   return 0;
23971 }
23972 _ACEOF
23973 if ac_fn_c_try_link "$LINENO"; then :
23974   ac_cv_lib_gen_pathfind=yes
23975 else
23976   ac_cv_lib_gen_pathfind=no
23977 fi
23978 rm -f core conftest.err conftest.$ac_objext \
23979     conftest$ac_exeext conftest.$ac_ext
23980 LIBS=$ac_check_lib_save_LIBS
23981 fi
23982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
23983 $as_echo "$ac_cv_lib_gen_pathfind" >&6; }
23984 if test "x$ac_cv_lib_gen_pathfind" = xyes; then :
23985   cat >>confdefs.h <<_ACEOF
23986 #define HAVE_LIBGEN 1
23987 _ACEOF
23988
23989   LIBS="-lgen $LIBS"
23990
23991 fi
23992
23993   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
23994 $as_echo_n "checking for gettext in -lintl... " >&6; }
23995 if ${ac_cv_lib_intl_gettext+:} false; then :
23996   $as_echo_n "(cached) " >&6
23997 else
23998   ac_check_lib_save_LIBS=$LIBS
23999 LIBS="-lintl  $LIBS"
24000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24001 /* end confdefs.h.  */
24002
24003 /* Override any GCC internal prototype to avoid an error.
24004    Use char because int might match the return type of a GCC
24005    builtin and then its argument prototype would still apply.  */
24006 #ifdef __cplusplus
24007 extern "C"
24008 #endif
24009 char gettext ();
24010 int
24011 main ()
24012 {
24013 return gettext ();
24014   ;
24015   return 0;
24016 }
24017 _ACEOF
24018 if ac_fn_c_try_link "$LINENO"; then :
24019   ac_cv_lib_intl_gettext=yes
24020 else
24021   ac_cv_lib_intl_gettext=no
24022 fi
24023 rm -f core conftest.err conftest.$ac_objext \
24024     conftest$ac_exeext conftest.$ac_ext
24025 LIBS=$ac_check_lib_save_LIBS
24026 fi
24027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
24028 $as_echo "$ac_cv_lib_intl_gettext" >&6; }
24029 if test "x$ac_cv_lib_intl_gettext" = xyes; then :
24030   cat >>confdefs.h <<_ACEOF
24031 #define HAVE_LIBINTL 1
24032 _ACEOF
24033
24034   LIBS="-lintl $LIBS"
24035
24036 fi
24037
24038   for ac_func in vprintf
24039 do :
24040   ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
24041 if test "x$ac_cv_func_vprintf" = xyes; then :
24042   cat >>confdefs.h <<_ACEOF
24043 #define HAVE_VPRINTF 1
24044 _ACEOF
24045
24046 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
24047 if test "x$ac_cv_func__doprnt" = xyes; then :
24048
24049 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
24050
24051 fi
24052
24053 fi
24054 done
24055
24056
24057   for ac_header in vfork.h
24058 do :
24059   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
24060 if test "x$ac_cv_header_vfork_h" = xyes; then :
24061   cat >>confdefs.h <<_ACEOF
24062 #define HAVE_VFORK_H 1
24063 _ACEOF
24064
24065 fi
24066
24067 done
24068
24069 for ac_func in fork vfork
24070 do :
24071   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24072 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24073 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
24074   cat >>confdefs.h <<_ACEOF
24075 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24076 _ACEOF
24077
24078 fi
24079 done
24080
24081 if test "x$ac_cv_func_fork" = xyes; then
24082   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
24083 $as_echo_n "checking for working fork... " >&6; }
24084 if ${ac_cv_func_fork_works+:} false; then :
24085   $as_echo_n "(cached) " >&6
24086 else
24087   if test "$cross_compiling" = yes; then :
24088   ac_cv_func_fork_works=cross
24089 else
24090   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24091 /* end confdefs.h.  */
24092 $ac_includes_default
24093 int
24094 main ()
24095 {
24096
24097           /* By Ruediger Kuhlmann. */
24098           return fork () < 0;
24099
24100   ;
24101   return 0;
24102 }
24103 _ACEOF
24104 if ac_fn_c_try_run "$LINENO"; then :
24105   ac_cv_func_fork_works=yes
24106 else
24107   ac_cv_func_fork_works=no
24108 fi
24109 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24110   conftest.$ac_objext conftest.beam conftest.$ac_ext
24111 fi
24112
24113 fi
24114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
24115 $as_echo "$ac_cv_func_fork_works" >&6; }
24116
24117 else
24118   ac_cv_func_fork_works=$ac_cv_func_fork
24119 fi
24120 if test "x$ac_cv_func_fork_works" = xcross; then
24121   case $host in
24122     *-*-amigaos* | *-*-msdosdjgpp*)
24123       # Override, as these systems have only a dummy fork() stub
24124       ac_cv_func_fork_works=no
24125       ;;
24126     *)
24127       ac_cv_func_fork_works=yes
24128       ;;
24129   esac
24130   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
24131 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
24132 fi
24133 ac_cv_func_vfork_works=$ac_cv_func_vfork
24134 if test "x$ac_cv_func_vfork" = xyes; then
24135   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
24136 $as_echo_n "checking for working vfork... " >&6; }
24137 if ${ac_cv_func_vfork_works+:} false; then :
24138   $as_echo_n "(cached) " >&6
24139 else
24140   if test "$cross_compiling" = yes; then :
24141   ac_cv_func_vfork_works=cross
24142 else
24143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24144 /* end confdefs.h.  */
24145 /* Thanks to Paul Eggert for this test.  */
24146 $ac_includes_default
24147 #include <sys/wait.h>
24148 #ifdef HAVE_VFORK_H
24149 # include <vfork.h>
24150 #endif
24151 /* On some sparc systems, changes by the child to local and incoming
24152    argument registers are propagated back to the parent.  The compiler
24153    is told about this with #include <vfork.h>, but some compilers
24154    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24155    static variable whose address is put into a register that is
24156    clobbered by the vfork.  */
24157 static void
24158 #ifdef __cplusplus
24159 sparc_address_test (int arg)
24160 # else
24161 sparc_address_test (arg) int arg;
24162 #endif
24163 {
24164   static pid_t child;
24165   if (!child) {
24166     child = vfork ();
24167     if (child < 0) {
24168       perror ("vfork");
24169       _exit(2);
24170     }
24171     if (!child) {
24172       arg = getpid();
24173       write(-1, "", 0);
24174       _exit (arg);
24175     }
24176   }
24177 }
24178
24179 int
24180 main ()
24181 {
24182   pid_t parent = getpid ();
24183   pid_t child;
24184
24185   sparc_address_test (0);
24186
24187   child = vfork ();
24188
24189   if (child == 0) {
24190     /* Here is another test for sparc vfork register problems.  This
24191        test uses lots of local variables, at least as many local
24192        variables as main has allocated so far including compiler
24193        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24194        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24195        reuse the register of parent for one of the local variables,
24196        since it will think that parent can't possibly be used any more
24197        in this routine.  Assigning to the local variable will thus
24198        munge parent in the parent process.  */
24199     pid_t
24200       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24201       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24202     /* Convince the compiler that p..p7 are live; otherwise, it might
24203        use the same hardware register for all 8 local variables.  */
24204     if (p != p1 || p != p2 || p != p3 || p != p4
24205         || p != p5 || p != p6 || p != p7)
24206       _exit(1);
24207
24208     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24209        from child file descriptors.  If the child closes a descriptor
24210        before it execs or exits, this munges the parent's descriptor
24211        as well.  Test for this by closing stdout in the child.  */
24212     _exit(close(fileno(stdout)) != 0);
24213   } else {
24214     int status;
24215     struct stat st;
24216
24217     while (wait(&status) != child)
24218       ;
24219     return (
24220          /* Was there some problem with vforking?  */
24221          child < 0
24222
24223          /* Did the child fail?  (This shouldn't happen.)  */
24224          || status
24225
24226          /* Did the vfork/compiler bug occur?  */
24227          || parent != getpid()
24228
24229          /* Did the file descriptor bug occur?  */
24230          || fstat(fileno(stdout), &st) != 0
24231          );
24232   }
24233 }
24234 _ACEOF
24235 if ac_fn_c_try_run "$LINENO"; then :
24236   ac_cv_func_vfork_works=yes
24237 else
24238   ac_cv_func_vfork_works=no
24239 fi
24240 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24241   conftest.$ac_objext conftest.beam conftest.$ac_ext
24242 fi
24243
24244 fi
24245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
24246 $as_echo "$ac_cv_func_vfork_works" >&6; }
24247
24248 fi;
24249 if test "x$ac_cv_func_fork_works" = xcross; then
24250   ac_cv_func_vfork_works=$ac_cv_func_vfork
24251   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
24252 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
24253 fi
24254
24255 if test "x$ac_cv_func_vfork_works" = xyes; then
24256
24257 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
24258
24259 else
24260
24261 $as_echo "#define vfork fork" >>confdefs.h
24262
24263 fi
24264 if test "x$ac_cv_func_fork_works" = xyes; then
24265
24266 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
24267
24268 fi
24269
24270   for ac_func in mmap canonicalize_file_name snprintf strdup strchr \
24271                  strrchr strsignal fchmod fstat chmod
24272 do :
24273   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24274 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24275 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
24276   cat >>confdefs.h <<_ACEOF
24277 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24278 _ACEOF
24279
24280 fi
24281 done
24282
24283   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
24284 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
24285 if ${ac_cv_path_SED+:} false; then :
24286   $as_echo_n "(cached) " >&6
24287 else
24288             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
24289      for ac_i in 1 2 3 4 5 6 7; do
24290        ac_script="$ac_script$as_nl$ac_script"
24291      done
24292      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
24293      { ac_script=; unset ac_script;}
24294      if test -z "$SED"; then
24295   ac_path_SED_found=false
24296   # Loop through the user's path and test for each of PROGNAME-LIST
24297   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24298 for as_dir in $PATH
24299 do
24300   IFS=$as_save_IFS
24301   test -z "$as_dir" && as_dir=.
24302     for ac_prog in sed gsed; do
24303     for ac_exec_ext in '' $ac_executable_extensions; do
24304       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
24305       as_fn_executable_p "$ac_path_SED" || continue
24306 # Check for GNU ac_path_SED and select it if it is found.
24307   # Check for GNU $ac_path_SED
24308 case `"$ac_path_SED" --version 2>&1` in
24309 *GNU*)
24310   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
24311 *)
24312   ac_count=0
24313   $as_echo_n 0123456789 >"conftest.in"
24314   while :
24315   do
24316     cat "conftest.in" "conftest.in" >"conftest.tmp"
24317     mv "conftest.tmp" "conftest.in"
24318     cp "conftest.in" "conftest.nl"
24319     $as_echo '' >> "conftest.nl"
24320     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
24321     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
24322     as_fn_arith $ac_count + 1 && ac_count=$as_val
24323     if test $ac_count -gt ${ac_path_SED_max-0}; then
24324       # Best one so far, save it but keep looking for a better one
24325       ac_cv_path_SED="$ac_path_SED"
24326       ac_path_SED_max=$ac_count
24327     fi
24328     # 10*(2^10) chars as input seems more than enough
24329     test $ac_count -gt 10 && break
24330   done
24331   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
24332 esac
24333
24334       $ac_path_SED_found && break 3
24335     done
24336   done
24337   done
24338 IFS=$as_save_IFS
24339   if test -z "$ac_cv_path_SED"; then
24340     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
24341   fi
24342 else
24343   ac_cv_path_SED=$SED
24344 fi
24345
24346 fi
24347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
24348 $as_echo "$ac_cv_path_SED" >&6; }
24349  SED="$ac_cv_path_SED"
24350   rm -f conftest.sed
24351
24352   while :
24353   do
24354       POSIX_SHELL=`which bash`
24355       test -x "$POSIX_SHELL" && break
24356       POSIX_SHELL=`which dash`
24357       test -x "$POSIX_SHELL" && break
24358       POSIX_SHELL=/usr/xpg4/bin/sh
24359       test -x "$POSIX_SHELL" && break
24360       POSIX_SHELL=`/bin/sh -c '
24361           exec 2>/dev/null
24362           if ! true ; then exit 1 ; fi
24363           echo /bin/sh'`
24364       test -x "$POSIX_SHELL" && break
24365       as_fn_error $? "cannot locate a working POSIX shell" "$LINENO" 5
24366   done
24367
24368 cat >>confdefs.h <<_ACEOF
24369 #define POSIX_SHELL "${POSIX_SHELL}"
24370 _ACEOF
24371
24372
24373
24374
24375
24376   LIBOPTS_BUILD_BLOCKED=''
24377
24378
24379   NEED_LIBOPTS_DIR=''
24380
24381   # Check whether --enable-local-libopts was given.
24382 if test "${enable_local_libopts+set}" = set; then :
24383   enableval=$enable_local_libopts;
24384     if test x$enableval = xyes ; then
24385        { $as_echo "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
24386 $as_echo "$as_me: Using supplied libopts tearoff" >&6;}
24387        LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
24388        NEED_LIBOPTS_DIR=true
24389        LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
24390     fi
24391 fi
24392
24393
24394   # Check whether --enable-libopts-install was given.
24395 if test "${enable_libopts_install+set}" = set; then :
24396   enableval=$enable_libopts_install;
24397 fi
24398
24399    if test "X${enable_libopts_install}" = Xyes; then
24400   INSTALL_LIBOPTS_TRUE=
24401   INSTALL_LIBOPTS_FALSE='#'
24402 else
24403   INSTALL_LIBOPTS_TRUE='#'
24404   INSTALL_LIBOPTS_FALSE=
24405 fi
24406
24407
24408   if test -z "${NEED_LIBOPTS_DIR}" ; then
24409      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
24410 $as_echo_n "checking whether autoopts-config can be found... " >&6; }
24411
24412 # Check whether --with-autoopts-config was given.
24413 if test "${with_autoopts_config+set}" = set; then :
24414   withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
24415 else
24416   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
24417 $as_echo_n "checking whether autoopts-config is specified... " >&6; }
24418 if ${lo_cv_with_autoopts_config+:} false; then :
24419   $as_echo_n "(cached) " >&6
24420 else
24421   if autoopts-config --help 2>/dev/null 1>&2
24422         then lo_cv_with_autoopts_config=autoopts-config
24423         elif libopts-config --help 2>/dev/null 1>&2
24424         then lo_cv_with_autoopts_config=libopts-config
24425         else lo_cv_with_autoopts_config=no ; fi
24426 fi
24427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
24428 $as_echo "$lo_cv_with_autoopts_config" >&6; }
24429
24430 fi
24431  # end of AC_ARG_WITH
24432
24433      if ${lo_cv_test_autoopts+:} false; then :
24434   $as_echo_n "(cached) " >&6
24435 else
24436
24437         if test -z "${lo_cv_with_autoopts_config}" \
24438                 -o X"${lo_cv_with_autoopts_config}" = Xno
24439         then
24440            if autoopts-config --help 2>/dev/null 1>&2
24441            then lo_cv_with_autoopts_config=autoopts-config
24442            elif libopts-config --help 2>/dev/null 1>&2
24443            then lo_cv_with_autoopts_config=libopts-config
24444            else lo_cv_with_autoopts_config=false ; fi
24445         fi
24446         lo_cv_test_autoopts=`
24447             ${lo_cv_with_autoopts_config} --libs` 2> /dev/null
24448         if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"
24449         then lo_cv_test_autoopts=no ; fi
24450
24451 fi
24452  # end of CACHE_VAL
24453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
24454 $as_echo "${lo_cv_test_autoopts}" >&6; }
24455
24456      if test "X${lo_cv_test_autoopts}" != Xno
24457      then
24458         LIBOPTS_LDADD="${lo_cv_test_autoopts}"
24459         LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
24460      else
24461         LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
24462         LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
24463         NEED_LIBOPTS_DIR=true
24464      fi
24465   fi # end of if test -z "${NEED_LIBOPTS_DIR}"
24466   if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
24467     NEED_LIBOPTS_DIR=''
24468   fi
24469    if test -n "${NEED_LIBOPTS_DIR}"; then
24470   NEED_LIBOPTS_TRUE=
24471   NEED_LIBOPTS_FALSE='#'
24472 else
24473   NEED_LIBOPTS_TRUE='#'
24474   NEED_LIBOPTS_FALSE=
24475 fi
24476
24477
24478
24479   LIBOPTS_DIR=libopts
24480
24481
24482 # end of AC_DEFUN of LIBOPTS_CHECK_COMMON
24483
24484
24485     if test -z "$NEED_LIBOPTS_TRUE"; then :
24486
24487
24488
24489   # Check to see if a reg expr header is specified.
24490
24491
24492 # Check whether --with-regex-header was given.
24493 if test "${with_regex_header+set}" = set; then :
24494   withval=$with_regex_header; libopts_cv_with_regex_header=${with_regex_header}
24495 else
24496   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a reg expr header is specified" >&5
24497 $as_echo_n "checking whether a reg expr header is specified... " >&6; }
24498 if ${libopts_cv_with_regex_header+:} false; then :
24499   $as_echo_n "(cached) " >&6
24500 else
24501   libopts_cv_with_regex_header=no
24502 fi
24503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_regex_header" >&5
24504 $as_echo "$libopts_cv_with_regex_header" >&6; }
24505
24506 fi
24507  # end of AC_ARG_WITH
24508   if test "X${libopts_cv_with_regex_header}" != Xno
24509   then
24510     cat >>confdefs.h <<_ACEOF
24511 #define REGEX_HEADER <${libopts_cv_with_regex_header}>
24512 _ACEOF
24513
24514   else
24515
24516 $as_echo "#define REGEX_HEADER <regex.h>" >>confdefs.h
24517
24518   fi
24519
24520
24521
24522   # Check to see if a working libregex can be found.
24523
24524
24525 # Check whether --with-libregex was given.
24526 if test "${with_libregex+set}" = set; then :
24527   withval=$with_libregex; libopts_cv_with_libregex_root=${with_libregex}
24528 else
24529   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex was specified" >&5
24530 $as_echo_n "checking whether with-libregex was specified... " >&6; }
24531 if ${libopts_cv_with_libregex_root+:} false; then :
24532   $as_echo_n "(cached) " >&6
24533 else
24534   libopts_cv_with_libregex_root=no
24535 fi
24536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_root" >&5
24537 $as_echo "$libopts_cv_with_libregex_root" >&6; }
24538
24539 fi
24540  # end of AC_ARG_WITH libregex
24541
24542   if test "${with_libregex+set}" = set && \
24543      test "X${withval}" = Xno
24544   then ## disabled by request
24545     libopts_cv_with_libregex_root=no
24546     libopts_cv_with_libregex_cflags=no
24547     libopts_cv_with_libregex_libs=no
24548   else
24549
24550
24551 # Check whether --with-libregex-cflags was given.
24552 if test "${with_libregex_cflags+set}" = set; then :
24553   withval=$with_libregex_cflags; libopts_cv_with_libregex_cflags=${with_libregex_cflags}
24554 else
24555   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-cflags was specified" >&5
24556 $as_echo_n "checking whether with-libregex-cflags was specified... " >&6; }
24557 if ${libopts_cv_with_libregex_cflags+:} false; then :
24558   $as_echo_n "(cached) " >&6
24559 else
24560   libopts_cv_with_libregex_cflags=no
24561 fi
24562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_cflags" >&5
24563 $as_echo "$libopts_cv_with_libregex_cflags" >&6; }
24564
24565 fi
24566  # end of AC_ARG_WITH libregex-cflags
24567
24568
24569 # Check whether --with-libregex-libs was given.
24570 if test "${with_libregex_libs+set}" = set; then :
24571   withval=$with_libregex_libs; libopts_cv_with_libregex_libs=${with_libregex_libs}
24572 else
24573   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-libs was specified" >&5
24574 $as_echo_n "checking whether with-libregex-libs was specified... " >&6; }
24575 if ${libopts_cv_with_libregex_libs+:} false; then :
24576   $as_echo_n "(cached) " >&6
24577 else
24578   libopts_cv_with_libregex_libs=no
24579 fi
24580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_libs" >&5
24581 $as_echo "$libopts_cv_with_libregex_libs" >&6; }
24582
24583 fi
24584  # end of AC_ARG_WITH libregex-libs
24585
24586   case "X${libopts_cv_with_libregex_cflags}" in
24587   Xyes|Xno|X )
24588     case "X${libopts_cv_with_libregex_root}" in
24589     Xyes|Xno|X ) libopts_cv_with_libregex_cflags=no ;;
24590     * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;;
24591     esac
24592   esac
24593   case "X${libopts_cv_with_libregex_libs}" in
24594   Xyes|Xno|X )
24595     case "X${libopts_cv_with_libregex_root}" in
24596     Xyes|Xno|X ) libopts_cv_with_libregex_libs=no ;;
24597     * )        libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex" ;;
24598     esac
24599   esac
24600   libopts_save_CPPFLAGS="${CPPFLAGS}"
24601   libopts_save_LIBS="${LIBS}"
24602   case "X${libopts_cv_with_libregex_cflags}" in
24603   Xyes|Xno|X )
24604     libopts_cv_with_libregex_cflags="" ;;
24605   * ) CPPFLAGS="${CPPFLAGS} ${libopts_cv_with_libregex_cflags}" ;;
24606   esac
24607   case "X${libopts_cv_with_libregex_libs}" in
24608   Xyes|Xno|X )
24609     libopts_cv_with_libregex_libs="" ;;
24610   * )
24611     LIBS="${LIBS} ${libopts_cv_with_libregex_libs}" ;;
24612   esac
24613   LIBREGEX_CFLAGS=""
24614   LIBREGEX_LIBS=""
24615   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libregex functions properly" >&5
24616 $as_echo_n "checking whether libregex functions properly... " >&6; }
24617   if ${libopts_cv_with_libregex+:} false; then :
24618   $as_echo_n "(cached) " >&6
24619 else
24620
24621   if test "$cross_compiling" = yes; then :
24622   libopts_cv_with_libregex=no
24623 else
24624   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24625 /* end confdefs.h.  */
24626 #include <stdio.h>
24627 #include <stdlib.h>
24628 #include <sys/types.h>
24629 #include REGEX_HEADER
24630 static regex_t re;
24631 void comp_re(char const * pzPat) {
24632   int res = regcomp( &re, pzPat, REG_EXTENDED|REG_ICASE|REG_NEWLINE );
24633   if (res == 0) return;
24634   exit( res ); }
24635 int main() {
24636   regmatch_t m[2];
24637   comp_re( "^.*\$"   );
24638   comp_re( "()|no.*" );
24639   comp_re( "."       );
24640   if (regexec( &re, "X", 2, m, 0 ) != 0)  return 1;
24641   if ((m[0].rm_so != 0) || (m[0].rm_eo != 1)) {
24642     fputs( "error: regex -->.<-- did not match\n", stderr );
24643     return 1;
24644   }
24645   return 0; }
24646 _ACEOF
24647 if ac_fn_c_try_run "$LINENO"; then :
24648   libopts_cv_with_libregex=yes
24649 else
24650   libopts_cv_with_libregex=no
24651 fi
24652 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24653   conftest.$ac_objext conftest.beam conftest.$ac_ext
24654 fi
24655  # end of AC_RUN_IFELSE
24656
24657 fi
24658  # end of AC_CACHE_VAL for libopts_cv_with_libregex
24659   fi ## disabled by request
24660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_with_libregex}" >&5
24661 $as_echo "${libopts_cv_with_libregex}" >&6; }
24662   if test "X${libopts_cv_with_libregex}" != Xno
24663   then
24664
24665 $as_echo "#define WITH_LIBREGEX 1" >>confdefs.h
24666
24667   else
24668     CPPFLAGS="${libopts_save_CPPFLAGS}"
24669     LIBS="${libopts_save_LIBS}"
24670     libopts_cv_with_libregex_root=no
24671 libopts_cv_with_libregex_cflags=no
24672 libopts_cv_with_libregex_libs=no
24673 libopts_cv_with_libregex=no
24674   fi
24675
24676
24677
24678   # Check to see if pathfind(3) works.
24679
24680   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pathfind(3) works" >&5
24681 $as_echo_n "checking whether pathfind(3) works... " >&6; }
24682   if ${libopts_cv_run_pathfind+:} false; then :
24683   $as_echo_n "(cached) " >&6
24684 else
24685
24686   if test "$cross_compiling" = yes; then :
24687   libopts_cv_run_pathfind=no
24688
24689 else
24690   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24691 /* end confdefs.h.  */
24692 #include <string.h>
24693 #include <stdlib.h>
24694 int main (int argc, char ** argv) {
24695    char * pz = pathfind( getenv( "PATH" ), "sh", "x" );
24696    return (pz == 0) ? 1 : 0;
24697 }
24698 _ACEOF
24699 if ac_fn_c_try_run "$LINENO"; then :
24700   libopts_cv_run_pathfind=yes
24701 else
24702   libopts_cv_run_pathfind=no
24703 fi
24704 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24705   conftest.$ac_objext conftest.beam conftest.$ac_ext
24706 fi
24707  # end of RUN_IFELSE
24708
24709 fi
24710  # end of AC_CACHE_VAL for libopts_cv_run_pathfind
24711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_pathfind}" >&5
24712 $as_echo "${libopts_cv_run_pathfind}" >&6; }
24713   if test "X${libopts_cv_run_pathfind}" != Xno
24714   then
24715
24716 $as_echo "#define HAVE_PATHFIND 1" >>confdefs.h
24717
24718   fi
24719
24720
24721
24722   # Check to see if /dev/zero is readable device.
24723
24724   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/zero is readable device" >&5
24725 $as_echo_n "checking whether /dev/zero is readable device... " >&6; }
24726   if ${libopts_cv_test_dev_zero+:} false; then :
24727   $as_echo_n "(cached) " >&6
24728 else
24729
24730     libopts_cv_test_dev_zero=`exec 2> /dev/null
24731 dzero=\`ls -lL /dev/zero | egrep ^c......r\`
24732 test -z "${dzero}" && exit 1
24733 echo ${dzero}`
24734     if test $? -ne 0 || test -z "$libopts_cv_test_dev_zero"
24735     then libopts_cv_test_dev_zero=no
24736     fi
24737
24738 fi
24739  # end of CACHE_VAL of libopts_cv_test_dev_zero
24740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_test_dev_zero}" >&5
24741 $as_echo "${libopts_cv_test_dev_zero}" >&6; }
24742   if test "X${libopts_cv_test_dev_zero}" != Xno
24743   then
24744
24745 $as_echo "#define HAVE_DEV_ZERO 1" >>confdefs.h
24746
24747   fi
24748
24749
24750
24751   # Check to see if we have a functional realpath(3C).
24752
24753   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a functional realpath(3C)" >&5
24754 $as_echo_n "checking whether we have a functional realpath(3C)... " >&6; }
24755   if ${libopts_cv_run_realpath+:} false; then :
24756   $as_echo_n "(cached) " >&6
24757 else
24758
24759   if test "$cross_compiling" = yes; then :
24760   libopts_cv_run_realpath=no
24761
24762 else
24763   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24764 /* end confdefs.h.  */
24765 #include <limits.h>
24766 #include <stdlib.h>
24767 int main (int argc, char ** argv) {
24768 #ifndef PATH_MAX
24769 choke me!!
24770 #else
24771    char zPath[PATH_MAX+1];
24772 #endif
24773    char *pz = realpath(argv[0], zPath);
24774    return (pz == zPath) ? 0 : 1;
24775 }
24776 _ACEOF
24777 if ac_fn_c_try_run "$LINENO"; then :
24778   libopts_cv_run_realpath=yes
24779 else
24780   libopts_cv_run_realpath=no
24781 fi
24782 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24783   conftest.$ac_objext conftest.beam conftest.$ac_ext
24784 fi
24785  # end of RUN_IFELSE
24786
24787 fi
24788  # end of AC_CACHE_VAL for libopts_cv_run_realpath
24789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_realpath}" >&5
24790 $as_echo "${libopts_cv_run_realpath}" >&6; }
24791   if test "X${libopts_cv_run_realpath}" != Xno
24792   then
24793
24794 $as_echo "#define HAVE_REALPATH 1" >>confdefs.h
24795
24796   fi
24797
24798
24799
24800   # Check to see if strftime() works.
24801
24802   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strftime() works" >&5
24803 $as_echo_n "checking whether strftime() works... " >&6; }
24804   if ${libopts_cv_run_strftime+:} false; then :
24805   $as_echo_n "(cached) " >&6
24806 else
24807
24808   if test "$cross_compiling" = yes; then :
24809   libopts_cv_run_strftime=no
24810
24811 else
24812   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24813 /* end confdefs.h.  */
24814 #include <time.h>
24815 #include <string.h>
24816 char t_buf[ 64 ];
24817 int main() {
24818   static char const z[] = "Thursday Aug 28 240";
24819   struct tm tm;
24820   tm.tm_sec   = 36;  /* seconds after the minute [0, 61]  */
24821   tm.tm_min   = 44;  /* minutes after the hour [0, 59] */
24822   tm.tm_hour  = 12;  /* hour since midnight [0, 23] */
24823   tm.tm_mday  = 28;  /* day of the month [1, 31] */
24824   tm.tm_mon   =  7;  /* months since January [0, 11] */
24825   tm.tm_year  = 86;  /* years since 1900 */
24826   tm.tm_wday  =  4;  /* days since Sunday [0, 6] */
24827   tm.tm_yday  = 239; /* days since January 1 [0, 365] */
24828   tm.tm_isdst =  1;  /* flag for daylight savings time */
24829   strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
24830   return (strcmp( t_buf, z ) != 0); }
24831 _ACEOF
24832 if ac_fn_c_try_run "$LINENO"; then :
24833   libopts_cv_run_strftime=yes
24834 else
24835   libopts_cv_run_strftime=no
24836 fi
24837 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24838   conftest.$ac_objext conftest.beam conftest.$ac_ext
24839 fi
24840  # end of RUN_IFELSE
24841
24842 fi
24843  # end of AC_CACHE_VAL for libopts_cv_run_strftime
24844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_strftime}" >&5
24845 $as_echo "${libopts_cv_run_strftime}" >&6; }
24846   if test "X${libopts_cv_run_strftime}" != Xno
24847   then
24848
24849 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
24850
24851   fi
24852
24853
24854
24855   # Check to see if fopen accepts "b" mode.
24856
24857   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"b\" mode" >&5
24858 $as_echo_n "checking whether fopen accepts \"b\" mode... " >&6; }
24859   if ${libopts_cv_run_fopen_binary+:} false; then :
24860   $as_echo_n "(cached) " >&6
24861 else
24862
24863   if test "$cross_compiling" = yes; then :
24864   libopts_cv_run_fopen_binary=no
24865
24866 else
24867   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24868 /* end confdefs.h.  */
24869 #include <stdio.h>
24870 int main (int argc, char ** argv) {
24871 FILE * fp = fopen("conftest.$ac_ext", "rb");
24872 return (fp == NULL) ? 1 : fclose(fp); }
24873 _ACEOF
24874 if ac_fn_c_try_run "$LINENO"; then :
24875   libopts_cv_run_fopen_binary=yes
24876 else
24877   libopts_cv_run_fopen_binary=no
24878 fi
24879 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24880   conftest.$ac_objext conftest.beam conftest.$ac_ext
24881 fi
24882  # end of RUN_IFELSE
24883
24884 fi
24885  # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
24886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_binary}" >&5
24887 $as_echo "${libopts_cv_run_fopen_binary}" >&6; }
24888   if test "X${libopts_cv_run_fopen_binary}" != Xno
24889   then
24890
24891 $as_echo "#define FOPEN_BINARY_FLAG \"b\"" >>confdefs.h
24892
24893   else
24894
24895 $as_echo "#define FOPEN_BINARY_FLAG \"\"" >>confdefs.h
24896
24897   fi
24898
24899
24900
24901   # Check to see if fopen accepts "t" mode.
24902
24903   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"t\" mode" >&5
24904 $as_echo_n "checking whether fopen accepts \"t\" mode... " >&6; }
24905   if ${libopts_cv_run_fopen_text+:} false; then :
24906   $as_echo_n "(cached) " >&6
24907 else
24908
24909   if test "$cross_compiling" = yes; then :
24910   libopts_cv_run_fopen_text=no
24911
24912 else
24913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24914 /* end confdefs.h.  */
24915 #include <stdio.h>
24916 int main (int argc, char ** argv) {
24917 FILE * fp = fopen("conftest.$ac_ext", "rt");
24918 return (fp == NULL) ? 1 : fclose(fp); }
24919 _ACEOF
24920 if ac_fn_c_try_run "$LINENO"; then :
24921   libopts_cv_run_fopen_text=yes
24922 else
24923   libopts_cv_run_fopen_text=no
24924 fi
24925 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24926   conftest.$ac_objext conftest.beam conftest.$ac_ext
24927 fi
24928  # end of RUN_IFELSE
24929
24930 fi
24931  # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
24932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_text}" >&5
24933 $as_echo "${libopts_cv_run_fopen_text}" >&6; }
24934   if test "X${libopts_cv_run_fopen_text}" != Xno
24935   then
24936
24937 $as_echo "#define FOPEN_TEXT_FLAG \"t\"" >>confdefs.h
24938
24939   else
24940
24941 $as_echo "#define FOPEN_TEXT_FLAG \"\"" >>confdefs.h
24942
24943   fi
24944
24945
24946
24947   # Check to see if not wanting optional option args.
24948
24949   # Check whether --enable-optional-args was given.
24950 if test "${enable_optional_args+set}" = set; then :
24951   enableval=$enable_optional_args; libopts_cv_enable_optional_args=${enable_optional_args}
24952 else
24953   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether not wanting optional option args" >&5
24954 $as_echo_n "checking whether not wanting optional option args... " >&6; }
24955 if ${libopts_cv_enable_optional_args+:} false; then :
24956   $as_echo_n "(cached) " >&6
24957 else
24958   libopts_cv_enable_optional_args=yes
24959 fi
24960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_enable_optional_args" >&5
24961 $as_echo "$libopts_cv_enable_optional_args" >&6; }
24962
24963 fi
24964  # end of AC_ARG_ENABLE
24965   if test "X${libopts_cv_enable_optional_args}" = Xno
24966   then
24967
24968 $as_echo "#define NO_OPTIONAL_OPT_ARGS 1" >>confdefs.h
24969
24970   fi
24971
24972
24973
24974
24975
24976           fi
24977   ac_config_files="$ac_config_files libopts/Makefile"
24978
24979   # end of AC_DEFUN of LIBOPTS_CHECK
24980
24981
24982 # From when we only used libevent for sntp:
24983 #AM_COND_IF(
24984 #    [BUILD_SNTP],
24985 #    [NTP_LIBEVENT_CHECK],
24986 #    [NTP_LIBEVENT_CHECK_NOBUILD]
24987 #)
24988
24989
24990
24991 ntp_pkgconfig_min_version='0.15.0'
24992 if test -n "$ac_tool_prefix"; then
24993   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24994 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24996 $as_echo_n "checking for $ac_word... " >&6; }
24997 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24998   $as_echo_n "(cached) " >&6
24999 else
25000   case $PKG_CONFIG in
25001   [\\/]* | ?:[\\/]*)
25002   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
25003   ;;
25004   *)
25005   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25006 for as_dir in $PATH
25007 do
25008   IFS=$as_save_IFS
25009   test -z "$as_dir" && as_dir=.
25010     for ac_exec_ext in '' $ac_executable_extensions; do
25011   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25012     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
25013     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25014     break 2
25015   fi
25016 done
25017   done
25018 IFS=$as_save_IFS
25019
25020   ;;
25021 esac
25022 fi
25023 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
25024 if test -n "$PKG_CONFIG"; then
25025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
25026 $as_echo "$PKG_CONFIG" >&6; }
25027 else
25028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25029 $as_echo "no" >&6; }
25030 fi
25031
25032
25033 fi
25034 if test -z "$ac_cv_path_PKG_CONFIG"; then
25035   ac_pt_PKG_CONFIG=$PKG_CONFIG
25036   # Extract the first word of "pkg-config", so it can be a program name with args.
25037 set dummy pkg-config; ac_word=$2
25038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25039 $as_echo_n "checking for $ac_word... " >&6; }
25040 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
25041   $as_echo_n "(cached) " >&6
25042 else
25043   case $ac_pt_PKG_CONFIG in
25044   [\\/]* | ?:[\\/]*)
25045   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
25046   ;;
25047   *)
25048   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25049 for as_dir in $PATH
25050 do
25051   IFS=$as_save_IFS
25052   test -z "$as_dir" && as_dir=.
25053     for ac_exec_ext in '' $ac_executable_extensions; do
25054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25055     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
25056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25057     break 2
25058   fi
25059 done
25060   done
25061 IFS=$as_save_IFS
25062
25063   ;;
25064 esac
25065 fi
25066 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
25067 if test -n "$ac_pt_PKG_CONFIG"; then
25068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
25069 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
25070 else
25071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25072 $as_echo "no" >&6; }
25073 fi
25074
25075   if test "x$ac_pt_PKG_CONFIG" = x; then
25076     PKG_CONFIG=""
25077   else
25078     case $cross_compiling:$ac_tool_warned in
25079 yes:)
25080 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25081 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25082 ac_tool_warned=yes ;;
25083 esac
25084     PKG_CONFIG=$ac_pt_PKG_CONFIG
25085   fi
25086 else
25087   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
25088 fi
25089
25090 { ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
25091 { ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
25092
25093 case "$PKG_CONFIG" in
25094  /*)
25095     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
25096 $as_echo_n "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
25097     if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
25098         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25099 $as_echo "yes" >&6; }
25100     else
25101         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25102 $as_echo "no" >&6; }
25103         PKG_CONFIG=""
25104     fi
25105     ;;
25106 esac
25107
25108
25109
25110
25111 # Check whether --enable-local-libevent was given.
25112 if test "${enable_local_libevent+set}" = set; then :
25113   enableval=$enable_local_libevent; ntp_use_local_libevent=$enableval
25114 else
25115   ntp_use_local_libevent=${ntp_use_local_libevent-detect}
25116
25117 fi
25118
25119
25120
25121
25122
25123
25124
25125
25126
25127
25128 ntp_libevent_min_version=2
25129 ntp_libevent_tearoff=libevent
25130
25131
25132
25133
25134
25135 case "$ntp_use_local_libevent" in
25136  yes)
25137     ;;
25138  *) # If we have (a good enough) pkg-config, see if it can find libevent
25139     case "$PKG_CONFIG" in
25140      /*)
25141         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
25142 $as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
25143         if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
25144         then
25145             ntp_use_local_libevent=no
25146             { $as_echo "$as_me:${as_lineno-$LINENO}: Using the installed libevent" >&5
25147 $as_echo "$as_me: Using the installed libevent" >&6;}
25148             CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
25149             CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
25150             # HMS: I hope the following is accurate.
25151             # We don't need -levent, we only need  -levent_core.
25152             # While we could grab only the -L stuff, there *might* be
25153             # other flags there we want.  Originally we just removed -levent
25154             # but then somebody decided to install -levent-2.0
25155             # LDADD_LIBEVENT=`$PKG_CONFIG --libs libevent | sed 's:-levent::'`
25156             # So now we dance...
25157             LDADD_LIBEVENT=
25158             for i in `$PKG_CONFIG --libs libevent` `$PKG_CONFIG --cflags-only-other libevent_pthreads`
25159             do
25160                 case "$i" in
25161                  -D*) ;;
25162                  -levent*) ;;
25163                  *) case "$LDADD_LIBEVENT" in
25164                      '') LDADD_LIBEVENT="$i" ;;
25165                      *) LDADD_LIBEVENT="$LDADD_LIBEVENT $i" ;;
25166                     esac
25167                     ;;
25168                 esac
25169             done
25170             case "$LIBISC_PTHREADS_NOTHREADS" in
25171              pthreads)
25172                 LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads"
25173             esac
25174             LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core"
25175             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25176 $as_echo "yes" >&6; }
25177         else
25178             ntp_use_local_libevent=yes
25179             # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
25180             # is "pthreads"?
25181             CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
25182             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25183 $as_echo "no" >&6; }
25184         fi
25185         ;;
25186      *)
25187         ntp_use_local_libevent=yes
25188         ;;
25189     esac
25190     ;;
25191 esac
25192
25193 case "$ntp_use_local_libevent" in
25194  yes)
25195     { $as_echo "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
25196 $as_echo "$as_me: Using libevent tearoff" >&6;}
25197     CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
25198     case "$LIBISC_PTHREADS_NOTHREADS" in
25199      pthreads)
25200         LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_pthreads.la \$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
25201         ;;
25202      *)
25203         LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
25204     esac
25205 esac
25206
25207
25208  if test "x$ntp_use_local_libevent" = "xyes"; then
25209   BUILD_LIBEVENT_TRUE=
25210   BUILD_LIBEVENT_FALSE='#'
25211 else
25212   BUILD_LIBEVENT_TRUE='#'
25213   BUILD_LIBEVENT_FALSE=
25214 fi
25215
25216
25217
25218
25219 case "$ntp_libevent_tearoff" in
25220  libevent)
25221     ;;
25222  *)
25223     as_fn_error $? "ntp_libevent.m4 dir must be libevent, not $ntp_libevent_tearoff" "$LINENO" 5
25224     ;;
25225 esac
25226
25227 case "$ntp_use_local_libevent" in
25228  yes)
25229                         ac_configure_args=" --disable-openssl${ac_configure_args}"
25230     ac_configure_args=" --disable-shared${ac_configure_args}"
25231     ac_configure_args=" --disable-libevent-regress${ac_configure_args}"
25232     ac_configure_args=" --disable-libevent-install${ac_configure_args}"
25233     ac_configure_args=" --enable-silent-rules${ac_configure_args}"
25234     ac_configure_args=" --enable-function-sections${ac_configure_args}"
25235     subdirs="$subdirs libevent"
25236
25237     ;;
25238  *)
25239     NTP_FORCE_LIBEVENT_DIST=libevent
25240     ;;
25241 esac
25242
25243
25244
25245 # Checks for libraries.
25246
25247
25248 LIB_SYSLOG=''
25249
25250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
25251 $as_echo_n "checking for library containing openlog... " >&6; }
25252 if ${ac_cv_search_openlog+:} false; then :
25253   $as_echo_n "(cached) " >&6
25254 else
25255   ac_func_search_save_LIBS=$LIBS
25256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25257 /* end confdefs.h.  */
25258
25259 /* Override any GCC internal prototype to avoid an error.
25260    Use char because int might match the return type of a GCC
25261    builtin and then its argument prototype would still apply.  */
25262 #ifdef __cplusplus
25263 extern "C"
25264 #endif
25265 char openlog ();
25266 int
25267 main ()
25268 {
25269 return openlog ();
25270   ;
25271   return 0;
25272 }
25273 _ACEOF
25274 for ac_lib in '' gen syslog; do
25275   if test -z "$ac_lib"; then
25276     ac_res="none required"
25277   else
25278     ac_res=-l$ac_lib
25279     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25280   fi
25281   if ac_fn_c_try_link "$LINENO"; then :
25282   ac_cv_search_openlog=$ac_res
25283 fi
25284 rm -f core conftest.err conftest.$ac_objext \
25285     conftest$ac_exeext
25286   if ${ac_cv_search_openlog+:} false; then :
25287   break
25288 fi
25289 done
25290 if ${ac_cv_search_openlog+:} false; then :
25291
25292 else
25293   ac_cv_search_openlog=no
25294 fi
25295 rm conftest.$ac_ext
25296 LIBS=$ac_func_search_save_LIBS
25297 fi
25298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
25299 $as_echo "$ac_cv_search_openlog" >&6; }
25300 ac_res=$ac_cv_search_openlog
25301 if test "$ac_res" != no; then :
25302   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25303   case "$ac_cv_search_openlog" in
25304  'none required') ;;
25305  no) ;;
25306  *) LIB_SYSLOG="$ac_cv_search_openlog $LIB_SYSLOG" ;;
25307  esac
25308
25309 fi
25310
25311
25312 # Checks for header files.
25313 for ac_header in netdb.h string.h strings.h syslog.h
25314 do :
25315   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25316 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25317 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25318   cat >>confdefs.h <<_ACEOF
25319 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25320 _ACEOF
25321
25322 fi
25323
25324 done
25325
25326
25327
25328 for ac_header in sysexits.h
25329 do :
25330   ac_fn_c_check_header_mongrel "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
25331 if test "x$ac_cv_header_sysexits_h" = xyes; then :
25332   cat >>confdefs.h <<_ACEOF
25333 #define HAVE_SYSEXITS_H 1
25334 _ACEOF
25335
25336 else
25337
25338
25339 $as_echo "#define EX_OK 0" >>confdefs.h
25340
25341
25342 $as_echo "#define EX_SOFTWARE 70" >>confdefs.h
25343
25344
25345 fi
25346
25347 done
25348
25349
25350
25351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
25352 $as_echo_n "checking for facilitynames in syslog.h... " >&6; }
25353 if ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+:} false; then :
25354   $as_echo_n "(cached) " >&6
25355 else
25356
25357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25358 /* end confdefs.h.  */
25359
25360 #define SYSLOG_NAMES
25361 #include <stdlib.h>
25362 #include <syslog.h>
25363
25364 int
25365 main ()
25366 {
25367  void *fnames; fnames = facilitynames;
25368   ;
25369   return 0;
25370 }
25371 _ACEOF
25372 if ac_fn_c_try_compile "$LINENO"; then :
25373   ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
25374 else
25375   ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
25376 fi
25377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25378 fi
25379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
25380 $as_echo "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
25381 case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
25382  yes)
25383
25384 $as_echo "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
25385
25386     ;;
25387  no)
25388     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
25389 $as_echo "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
25390     ;;
25391  cross)
25392     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
25393 $as_echo "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
25394     ;;
25395 esac
25396
25397
25398 # Checks for typedefs, structures, and compiler characteristics.
25399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
25400 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
25401 if ${ac_cv_header_stdbool_h+:} false; then :
25402   $as_echo_n "(cached) " >&6
25403 else
25404   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25405 /* end confdefs.h.  */
25406
25407              #include <stdbool.h>
25408              #ifndef bool
25409               "error: bool is not defined"
25410              #endif
25411              #ifndef false
25412               "error: false is not defined"
25413              #endif
25414              #if false
25415               "error: false is not 0"
25416              #endif
25417              #ifndef true
25418               "error: true is not defined"
25419              #endif
25420              #if true != 1
25421               "error: true is not 1"
25422              #endif
25423              #ifndef __bool_true_false_are_defined
25424               "error: __bool_true_false_are_defined is not defined"
25425              #endif
25426
25427              struct s { _Bool s: 1; _Bool t; } s;
25428
25429              char a[true == 1 ? 1 : -1];
25430              char b[false == 0 ? 1 : -1];
25431              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
25432              char d[(bool) 0.5 == true ? 1 : -1];
25433              /* See body of main program for 'e'.  */
25434              char f[(_Bool) 0.0 == false ? 1 : -1];
25435              char g[true];
25436              char h[sizeof (_Bool)];
25437              char i[sizeof s.t];
25438              enum { j = false, k = true, l = false * true, m = true * 256 };
25439              /* The following fails for
25440                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
25441              _Bool n[m];
25442              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
25443              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
25444              /* Catch a bug in an HP-UX C compiler.  See
25445                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
25446                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
25447               */
25448              _Bool q = true;
25449              _Bool *pq = &q;
25450
25451 int
25452 main ()
25453 {
25454
25455              bool e = &s;
25456              *pq |= q;
25457              *pq |= ! q;
25458              /* Refer to every declared value, to avoid compiler optimizations.  */
25459              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
25460                      + !m + !n + !o + !p + !q + !pq);
25461
25462   ;
25463   return 0;
25464 }
25465 _ACEOF
25466 if ac_fn_c_try_compile "$LINENO"; then :
25467   ac_cv_header_stdbool_h=yes
25468 else
25469   ac_cv_header_stdbool_h=no
25470 fi
25471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25472 fi
25473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
25474 $as_echo "$ac_cv_header_stdbool_h" >&6; }
25475    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
25476 if test "x$ac_cv_type__Bool" = xyes; then :
25477
25478 cat >>confdefs.h <<_ACEOF
25479 #define HAVE__BOOL 1
25480 _ACEOF
25481
25482
25483 fi
25484
25485
25486 if test $ac_cv_header_stdbool_h = yes; then
25487
25488 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
25489
25490 fi
25491
25492
25493
25494
25495
25496 VER_SUFFIX=
25497
25498
25499
25500
25501 # Check whether --with-crypto was given.
25502 if test "${with_crypto+set}" = set; then :
25503   withval=$with_crypto;
25504 fi
25505
25506
25507 # Check whether --with-openssl-libdir was given.
25508 if test "${with_openssl_libdir+set}" = set; then :
25509   withval=$with_openssl_libdir;
25510 fi
25511
25512
25513 # Check whether --with-openssl-incdir was given.
25514 if test "${with_openssl_incdir+set}" = set; then :
25515   withval=$with_openssl_incdir;
25516 fi
25517
25518
25519 # Check whether --with-rpath was given.
25520 if test "${with_rpath+set}" = set; then :
25521   withval=$with_rpath;
25522 fi
25523
25524 ntp_openssl=no
25525 ntp_openssl_from_pkg_config=no
25526 with_crypto=${with_crypto:-openssl,libcrypto}
25527 case "$with_crypto" in
25528  yes)
25529     with_crypto=openssl,libcrypto
25530 esac
25531 case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
25532  no:*) ;;
25533  *:notempty:notgiven:notgiven)
25534     for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
25535         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
25536 $as_echo_n "checking pkg-config for $pkg... " >&6; }
25537         if $PKG_CONFIG --exists $pkg ; then
25538             CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
25539             CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
25540             LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`"
25541             LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l $pkg`"
25542             LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`"
25543             VER_SUFFIX=o
25544             ntp_openssl=yes
25545             ntp_openssl_from_pkg_config=yes
25546             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25547 $as_echo "yes" >&6; }
25548
25549             break
25550         fi
25551         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25552 $as_echo "no" >&6; }
25553     done
25554 esac
25555 case "$with_crypto:$ntp_openssl" in
25556  no:*) ;;
25557  *:no)
25558     need_dash_r=
25559     need_dash_Wlrpath=
25560     case "${with_rpath-notgiven}" in
25561      yes)
25562         # Lame - what to do if we need -Wl... but not -R?
25563         need_dash_r=1
25564         ;;
25565      notgiven)
25566         case "$host" in
25567          *-*-linux*)
25568             # This may really only be true for gcc
25569             need_dash_Wlrpath=1
25570             ;;
25571          *-*-netbsd*)
25572             need_dash_r=1
25573             ;;
25574          *-*-solaris*)
25575             need_dash_r=1
25576             ;;
25577         esac
25578         ;;
25579     esac
25580
25581     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
25582 $as_echo_n "checking for openssl library directory... " >&6; }
25583     with_openssl_libdir=${with_openssl_libdir-notgiven}
25584     case "$with_openssl_libdir" in
25585      notgiven)
25586         case "$build" in
25587          $host)
25588             with_openssl_libdir=default
25589             ;;
25590          *)
25591             with_openssl_libdir=no
25592             ;;
25593         esac
25594     esac
25595     case "$with_openssl_libdir" in
25596      default)
25597         # Look in:
25598         with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib"
25599         with_openssl_libdir="$with_openssl_libdir /usr/local/lib"
25600         with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib"
25601     esac
25602     case "$with_openssl_libdir" in
25603      no)
25604         ;;
25605      *) # Look for libcrypto.a and libssl.a:
25606         for i in $with_openssl_libdir no
25607         do
25608             case "$host" in
25609              *-*-darwin*)
25610                 test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
25611                 ;;
25612              *)
25613                 test -f $i/libcrypto.so -a -f $i/libssl.so && break
25614                 test -f $i/libcrypto.a -a -f $i/libssl.a && break
25615                 ;;
25616             esac
25617         done
25618         openssl_libdir=$i
25619         ;;
25620     esac
25621     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
25622 $as_echo "$openssl_libdir" >&6; }
25623     case "$openssl_libdir" in
25624      no)
25625         openssl_libdir=
25626         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
25627 $as_echo "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
25628     esac
25629
25630     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
25631 $as_echo_n "checking for openssl include directory... " >&6; }
25632     with_openssl_incdir=${with_openssl_incdir-notgiven}
25633     case "$with_openssl_incdir" in
25634      notgiven)
25635         # Look in:
25636         with_openssl_incdir="/usr/include /usr/sfw/include"
25637         with_openssl_incdir="$with_openssl_incdir /usr/local/include"
25638         with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include"
25639     esac
25640     case "$with_openssl_incdir" in
25641      no)
25642         ;;
25643      *) # look for openssl/evp.h:
25644         for i in $with_openssl_incdir no
25645         do
25646             test -f $i/openssl/evp.h && break
25647         done
25648         openssl_incdir=$i
25649         ;;
25650     esac
25651     { i=; unset i;}
25652     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
25653 $as_echo "$openssl_incdir" >&6; }
25654     case "$openssl_incdir" in
25655      no)
25656         openssl_incdir=
25657         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
25658 $as_echo "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
25659     esac
25660     if test -z "$openssl_libdir" -o -z "$openssl_incdir"
25661     then
25662         ntp_openssl=no
25663     else
25664         ntp_openssl=yes
25665         VER_SUFFIX=o
25666     fi
25667     case "$ntp_openssl" in
25668      yes)
25669         # We have OpenSSL inc/lib dirs - use them.
25670         case "$openssl_incdir" in
25671          /usr/include)
25672             ;;
25673          *)
25674             CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir"
25675             ;;
25676         esac
25677         case "$openssl_libdir" in
25678          /usr/lib)
25679             ;;
25680          *)
25681             LDADD_NTP="$LDADD_NTP -L$openssl_libdir"
25682             case "$need_dash_r" in
25683              1)
25684                 LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir"
25685             esac
25686             case "$need_dash_Wlrpath" in
25687              1)
25688                 LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir"
25689             esac
25690             ;;
25691         esac
25692         LDADD_NTP="$LDADD_NTP -lcrypto"
25693     esac
25694 esac
25695
25696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
25697 $as_echo_n "checking if we will use crypto... " >&6; }
25698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
25699 $as_echo "$ntp_openssl" >&6; }
25700
25701 case "$ntp_openssl" in
25702  yes)
25703
25704 $as_echo "#define OPENSSL /**/" >>confdefs.h
25705
25706     case "$VER_SUFFIX" in
25707      *o*) ;;
25708      *) as_fn_error $? "OPENSSL set but no 'o' in VER_SUFFIX!" "$LINENO" 5 ;;
25709     esac
25710     ;;
25711 esac
25712
25713 NTPO_SAVED_CPPFLAGS="$CPPFLAGS"
25714 CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP"
25715 NTPO_SAVED_LIBS="$LIBS"
25716
25717 #
25718 # check for linking with -lcrypto failure, and try -lcrypto -lz.
25719 # Helps m68k-atari-mint
25720 #
25721 case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
25722  yes:no)
25723     LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
25724     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
25725 $as_echo_n "checking if linking with -lcrypto alone works... " >&6; }
25726 if ${ntp_cv_bare_lcrypto+:} false; then :
25727   $as_echo_n "(cached) " >&6
25728 else
25729   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25730 /* end confdefs.h.  */
25731
25732                     #include "openssl/err.h"
25733                     #include "openssl/evp.h"
25734
25735 int
25736 main ()
25737 {
25738
25739                     ERR_load_crypto_strings();
25740                     OpenSSL_add_all_algorithms();
25741
25742
25743   ;
25744   return 0;
25745 }
25746 _ACEOF
25747 if ac_fn_c_try_link "$LINENO"; then :
25748   ntp_cv_bare_lcrypto=yes
25749 else
25750   ntp_cv_bare_lcrypto=no
25751
25752 fi
25753 rm -f core conftest.err conftest.$ac_objext \
25754     conftest$ac_exeext conftest.$ac_ext
25755
25756 fi
25757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
25758 $as_echo "$ntp_cv_bare_lcrypto" >&6; }
25759     case "$ntp_cv_bare_lcrypto" in
25760      no)
25761         LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
25762         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
25763 $as_echo_n "checking if linking with -lcrypto -lz works... " >&6; }
25764 if ${ntp_cv_lcrypto_lz+:} false; then :
25765   $as_echo_n "(cached) " >&6
25766 else
25767   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25768 /* end confdefs.h.  */
25769
25770                         #include "openssl/err.h"
25771                         #include "openssl/evp.h"
25772
25773 int
25774 main ()
25775 {
25776
25777                         ERR_load_crypto_strings();
25778                         OpenSSL_add_all_algorithms();
25779
25780
25781   ;
25782   return 0;
25783 }
25784 _ACEOF
25785 if ac_fn_c_try_link "$LINENO"; then :
25786   ntp_cv_lcrypto_lz=yes
25787 else
25788   ntp_cv_lcrypto_lz=no
25789
25790 fi
25791 rm -f core conftest.err conftest.$ac_objext \
25792     conftest$ac_exeext conftest.$ac_ext
25793
25794 fi
25795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
25796 $as_echo "$ntp_cv_lcrypto_lz" >&6; }
25797         case "$ntp_cv_lcrypto_lz" in
25798          yes)
25799              LDADD_NTP="$LDADD_NTP -lz"
25800         esac
25801     esac
25802 esac
25803
25804 #
25805 # Older OpenSSL headers have a number of callback prototypes inside
25806 # other function prototypes which trigger copious warnings with gcc's
25807 # -Wstrict-prototypes, which is included in -Wall.
25808 #
25809 # An example:
25810 #
25811 # int i2d_RSA_NET(const RSA *a, unsigned char **pp,
25812 #                 int (*cb)(), int sgckey);
25813 #                 ^^^^^^^^^^^
25814 #
25815 #
25816 #
25817 openssl_triggers_warnings=unknown
25818 NTPO_SAVED_CFLAGS="$CFLAGS"
25819
25820 case "$ntp_openssl:$GCC" in
25821  yes:yes)
25822     CFLAGS="$CFLAGS -Werror"
25823     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25824 /* end confdefs.h.  */
25825
25826
25827 int
25828 main ()
25829 {
25830
25831                 /* see if -Werror breaks gcc */
25832
25833
25834   ;
25835   return 0;
25836 }
25837 _ACEOF
25838 if ac_fn_c_try_compile "$LINENO"; then :
25839   gcc_handles_Werror=yes
25840 else
25841   gcc_handles_Werror=no
25842
25843 fi
25844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25845     case "$gcc_handles_Werror" in
25846      no)
25847         # if this gcc doesn't do -Werror go ahead and use
25848         # -Wstrict-prototypes.
25849         openssl_triggers_warnings=yes
25850         ;;
25851      yes)
25852         CFLAGS="$CFLAGS -Wstrict-prototypes"
25853         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25854 /* end confdefs.h.  */
25855
25856                     #include "openssl/asn1_mac.h"
25857                     #include "openssl/bn.h"
25858                     #include "openssl/err.h"
25859                     #include "openssl/evp.h"
25860                     #include "openssl/pem.h"
25861                     #include "openssl/rand.h"
25862                     #include "openssl/x509v3.h"
25863
25864 int
25865 main ()
25866 {
25867
25868                     /* empty body */
25869
25870
25871   ;
25872   return 0;
25873 }
25874 _ACEOF
25875 if ac_fn_c_try_compile "$LINENO"; then :
25876   openssl_triggers_warnings=no
25877 else
25878   openssl_triggers_warnings=yes
25879
25880 fi
25881 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25882     esac
25883     case "$openssl_triggers_warnings" in
25884      yes)
25885         CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes"
25886         ;;
25887      *)
25888         CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
25889     esac
25890     ;;
25891  no:yes)
25892     # gcc without OpenSSL
25893     CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
25894 esac
25895
25896 # Because we don't want -Werror for the EVP_MD_do_all_sorted check
25897 CFLAGS="$NTPO_SAVED_CFLAGS"
25898
25899 case "$ntp_openssl" in
25900  yes)
25901     LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
25902     for ac_func in EVP_MD_do_all_sorted
25903 do :
25904   ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
25905 if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes; then :
25906   cat >>confdefs.h <<_ACEOF
25907 #define HAVE_EVP_MD_DO_ALL_SORTED 1
25908 _ACEOF
25909
25910 fi
25911 done
25912
25913     ;;
25914 esac
25915
25916 CPPFLAGS="$NTPO_SAVED_CPPFLAGS"
25917 LIBS="$NTPO_SAVED_LIBS"
25918 { NTPO_SAVED_CFLAGS=; unset NTPO_SAVED_CFLAGS;}
25919 { NTPO_SAVED_CPPFLAGS=; unset NTPO_SAVED_CPPFLAGS;}
25920 { NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;}
25921 { openssl_triggers_warnings=; unset openssl_triggers_warnings;}
25922 { ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
25923
25924
25925
25926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
25927 $as_echo_n "checking for struct sockaddr_storage... " >&6; }
25928 if ${ntp_cv_sockaddr_storage+:} false; then :
25929   $as_echo_n "(cached) " >&6
25930 else
25931   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25932 /* end confdefs.h.  */
25933
25934                 #ifdef HAVE_SYS_TYPES_H
25935                 # include <sys/types.h>
25936                 #endif
25937                 #ifdef HAVE_SYS_SOCKET_H
25938                 # include <sys/socket.h>
25939                 #endif
25940                 #ifdef HAVE_NETINET_IN_H
25941                 # include <netinet/in.h>
25942                 #endif
25943
25944 int
25945 main ()
25946 {
25947
25948                 struct sockaddr_storage n;
25949
25950
25951   ;
25952   return 0;
25953 }
25954 _ACEOF
25955 if ac_fn_c_try_compile "$LINENO"; then :
25956   ntp_cv_sockaddr_storage=yes
25957 else
25958   ntp_cv_sockaddr_storage=no
25959
25960 fi
25961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25962
25963 fi
25964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
25965 $as_echo "$ntp_cv_sockaddr_storage" >&6; }
25966 case "$ntp_cv_sockaddr_storage" in
25967  yes)
25968
25969 $as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
25970
25971     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
25972 $as_echo_n "checking for sockaddr_storage.__ss_family... " >&6; }
25973 if ${ntp_cv_have___ss_family+:} false; then :
25974   $as_echo_n "(cached) " >&6
25975 else
25976   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25977 /* end confdefs.h.  */
25978
25979                     #ifdef HAVE_SYS_TYPES_H
25980                     # include <sys/types.h>
25981                     #endif
25982                     #ifdef HAVE_SYS_SOCKET_H
25983                     # include <sys/socket.h>
25984                     #endif
25985                     #ifdef HAVE_NETINET_IN_H
25986                     # include <netinet/in.h>
25987                     #endif
25988
25989 int
25990 main ()
25991 {
25992
25993                     struct sockaddr_storage s;
25994                     s.__ss_family = 1;
25995
25996
25997   ;
25998   return 0;
25999 }
26000 _ACEOF
26001 if ac_fn_c_try_compile "$LINENO"; then :
26002   ntp_cv_have___ss_family=yes
26003 else
26004   ntp_cv_have___ss_family=no
26005
26006 fi
26007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26008
26009 fi
26010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
26011 $as_echo "$ntp_cv_have___ss_family" >&6; }
26012     case "$ntp_cv_have___ss_family" in
26013      yes)
26014
26015 $as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
26016
26017     esac
26018
26019 esac
26020
26021
26022 #
26023 # Look for in_port_t.
26024 #
26025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
26026 $as_echo_n "checking for in_port_t... " >&6; }
26027 if ${isc_cv_have_in_port_t+:} false; then :
26028   $as_echo_n "(cached) " >&6
26029 else
26030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26031 /* end confdefs.h.  */
26032
26033                 #include <sys/types.h>
26034                 #include <netinet/in.h>
26035
26036 int
26037 main ()
26038 {
26039
26040                 in_port_t port = 25;
26041                 return (0);
26042
26043
26044   ;
26045   return 0;
26046 }
26047 _ACEOF
26048 if ac_fn_c_try_compile "$LINENO"; then :
26049   isc_cv_have_in_port_t=yes
26050 else
26051   isc_cv_have_in_port_t=no
26052
26053 fi
26054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26055
26056 fi
26057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
26058 $as_echo "$isc_cv_have_in_port_t" >&6; }
26059 case "$isc_cv_have_in_port_t" in
26060  no)
26061
26062 $as_echo "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
26063
26064 esac
26065
26066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
26067 $as_echo_n "checking type of socklen arg for getsockname()... " >&6; }
26068 if ${ntp_cv_getsockname_socklen_type+:} false; then :
26069   $as_echo_n "(cached) " >&6
26070 else
26071
26072     getsockname_socklen_type_found=no
26073     for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
26074         for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
26075             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26076 /* end confdefs.h.  */
26077
26078                         #ifdef HAVE_SYS_TYPES_H
26079                         # include <sys/types.h>
26080                         #endif
26081                         #ifdef HAVE_SYS_SOCKET_H
26082                         # include <sys/socket.h>
26083                         #endif
26084
26085 int
26086 main ()
26087 {
26088
26089                         extern
26090                         getsockname(int, $getsockname_arg2,
26091                                 $ntp_cv_getsockname_socklen_type *);
26092
26093
26094   ;
26095   return 0;
26096 }
26097 _ACEOF
26098 if ac_fn_c_try_compile "$LINENO"; then :
26099   getsockname_socklen_type_found=yes ; break 2
26100 fi
26101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26102         done
26103     done
26104     case "$getsockname_socklen_type_found" in
26105      no)
26106         ntp_cv_getsockname_socklen_type='socklen_t'
26107     esac
26108     { getsockname_arg2=; unset getsockname_arg2;}
26109     { getsockname_socklen_type_found=; unset getsockname_socklen_type_found;}
26110
26111
26112 fi
26113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
26114 $as_echo "$ntp_cv_getsockname_socklen_type" >&6; }
26115
26116 cat >>confdefs.h <<_ACEOF
26117 #define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type
26118 _ACEOF
26119
26120
26121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
26122 $as_echo_n "checking struct sockaddr for sa_len... " >&6; }
26123 if ${isc_cv_platform_havesalen+:} false; then :
26124   $as_echo_n "(cached) " >&6
26125 else
26126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26127 /* end confdefs.h.  */
26128
26129                 #include <sys/types.h>
26130                 #include <sys/socket.h>
26131
26132 int
26133 main ()
26134 {
26135
26136                 extern struct sockaddr *ps;
26137                 return ps->sa_len;
26138
26139
26140   ;
26141   return 0;
26142 }
26143 _ACEOF
26144 if ac_fn_c_try_compile "$LINENO"; then :
26145   isc_cv_platform_havesalen=yes
26146 else
26147   isc_cv_platform_havesalen=no
26148
26149 fi
26150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26151
26152 fi
26153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_platform_havesalen" >&5
26154 $as_echo "$isc_cv_platform_havesalen" >&6; }
26155 case "$isc_cv_platform_havesalen" in
26156  yes)
26157
26158 $as_echo "#define ISC_PLATFORM_HAVESALEN 1" >>confdefs.h
26159
26160 esac
26161
26162 # Check whether --enable-ipv6 was given.
26163 if test "${enable_ipv6+set}" = set; then :
26164   enableval=$enable_ipv6;
26165 fi
26166
26167
26168 case "$enable_ipv6" in
26169  yes|''|autodetect)
26170     case "$host" in
26171      powerpc-ibm-aix4*)
26172         ;;
26173      *)
26174
26175 $as_echo "#define WANT_IPV6 1" >>confdefs.h
26176
26177         ;;
26178     esac
26179     ;;
26180  no)
26181     ;;
26182 esac
26183
26184
26185 case "$host" in
26186  *-*-darwin*)
26187
26188 $as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
26189
26190 esac
26191
26192
26193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5
26194 $as_echo_n "checking for IPv6 structures... " >&6; }
26195 if ${isc_cv_found_ipv6+:} false; then :
26196   $as_echo_n "(cached) " >&6
26197 else
26198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26199 /* end confdefs.h.  */
26200
26201                 #include <sys/types.h>
26202                 #include <sys/socket.h>
26203                 #include <netinet/in.h>
26204
26205 int
26206 main ()
26207 {
26208
26209                 struct sockaddr_in6 sin6;
26210
26211
26212   ;
26213   return 0;
26214 }
26215 _ACEOF
26216 if ac_fn_c_try_compile "$LINENO"; then :
26217   isc_cv_found_ipv6=yes
26218 else
26219   isc_cv_found_ipv6=no
26220
26221 fi
26222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26223
26224 fi
26225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_found_ipv6" >&5
26226 $as_echo "$isc_cv_found_ipv6" >&6; }
26227
26228 #
26229 # See whether IPv6 support is provided via a Kame add-on.
26230 # This is done before other IPv6 linking tests so LIBS is properly set.
26231 #
26232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kame IPv6 support" >&5
26233 $as_echo_n "checking for Kame IPv6 support... " >&6; }
26234
26235 # Check whether --with-kame was given.
26236 if test "${with_kame+set}" = set; then :
26237   withval=$with_kame; use_kame="$withval"
26238 else
26239   use_kame="no"
26240
26241 fi
26242
26243 case "$use_kame" in
26244  no)
26245     ;;
26246  yes)
26247     kame_path=/usr/local/v6
26248     ;;
26249  *)
26250     kame_path="$use_kame"
26251     ;;
26252 esac
26253 case "$use_kame" in
26254  no)
26255     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26256 $as_echo "no" >&6; }
26257     ;;
26258  *)
26259     if test -f $kame_path/lib/libinet6.a; then
26260         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kame_path/lib/libinet6.a" >&5
26261 $as_echo "$kame_path/lib/libinet6.a" >&6; }
26262         LIBS="-L$kame_path/lib -linet6 $LIBS"
26263     else
26264         as_fn_error $? "$kame_path/lib/libinet6.a not found.
26265
26266 Please choose the proper path with the following command:
26267
26268     configure --with-kame=PATH
26269 " "$LINENO" 5
26270     fi
26271     ;;
26272 esac
26273
26274 #
26275 # Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
26276 # Including it on Kame-using platforms is very bad, though, because
26277 # Kame uses #error against direct inclusion.   So include it on only
26278 # the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
26279 # This is done before the in6_pktinfo check because that's what
26280 # netinet6/in6.h is needed for.
26281 #
26282 case "$host" in
26283  *-bsdi4.[01]*)
26284
26285 $as_echo "#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >>confdefs.h
26286
26287     isc_netinet6in6_hack="#include <netinet6/in6.h>"
26288     ;;
26289  *)
26290     isc_netinet6in6_hack=""
26291     ;;
26292 esac
26293
26294 #
26295 # This is similar to the netinet6/in6.h issue.
26296 #
26297 case "$host" in
26298  *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
26299
26300 $as_echo "#define ISC_PLATFORM_FIXIN6ISADDR 1" >>confdefs.h
26301
26302     isc_netinetin6_hack="#include <netinet/in6.h>"
26303     ;;
26304  *)
26305     isc_netinetin6_hack=""
26306     ;;
26307 esac
26308
26309
26310 case "$isc_cv_found_ipv6" in
26311  yes)
26312
26313 $as_echo "#define ISC_PLATFORM_HAVEIPV6 1" >>confdefs.h
26314
26315     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
26316 $as_echo_n "checking for in6_pktinfo... " >&6; }
26317 if ${isc_cv_have_in6_pktinfo+:} false; then :
26318   $as_echo_n "(cached) " >&6
26319 else
26320   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26321 /* end confdefs.h.  */
26322
26323                     #include <sys/types.h>
26324                     #include <sys/socket.h>
26325                     #include <netinet/in.h>
26326                     $isc_netinetin6_hack
26327                     $isc_netinet6in6_hack
26328
26329 int
26330 main ()
26331 {
26332
26333                     struct in6_pktinfo xyzzy;
26334
26335
26336   ;
26337   return 0;
26338 }
26339 _ACEOF
26340 if ac_fn_c_try_compile "$LINENO"; then :
26341   isc_cv_have_in6_pktinfo=yes
26342 else
26343   isc_cv_have_in6_pktinfo=no
26344
26345 fi
26346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26347
26348 fi
26349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6_pktinfo" >&5
26350 $as_echo "$isc_cv_have_in6_pktinfo" >&6; }
26351     case "$isc_cv_have_in6_pktinfo" in
26352      yes)
26353
26354 $as_echo "#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >>confdefs.h
26355
26356     esac
26357
26358
26359     # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
26360     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_in6.sin6_scope_id" >&5
26361 $as_echo_n "checking for sockaddr_in6.sin6_scope_id... " >&6; }
26362 if ${isc_cv_have_sin6_scope_id+:} false; then :
26363   $as_echo_n "(cached) " >&6
26364 else
26365   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26366 /* end confdefs.h.  */
26367
26368                     #include <sys/types.h>
26369                     #include <sys/socket.h>
26370                     #include <netinet/in.h>
26371                     $isc_netinetin6_hack
26372                     $isc_netinet6in6_hack
26373
26374 int
26375 main ()
26376 {
26377
26378                     struct sockaddr_in6 xyzzy;
26379                     xyzzy.sin6_scope_id = 0;
26380
26381
26382   ;
26383   return 0;
26384 }
26385 _ACEOF
26386 if ac_fn_c_try_compile "$LINENO"; then :
26387   isc_cv_have_sin6_scope_id=yes
26388 else
26389   isc_cv_have_sin6_scope_id=no
26390
26391 fi
26392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26393
26394 fi
26395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_sin6_scope_id" >&5
26396 $as_echo "$isc_cv_have_sin6_scope_id" >&6; }
26397
26398     case "$isc_cv_have_sin6_scope_id" in
26399      yes)
26400
26401 $as_echo "#define ISC_PLATFORM_HAVESCOPEID 1" >>confdefs.h
26402
26403     esac
26404 esac
26405
26406
26407 # We need this check run even without isc_cv_found_ipv6=yes
26408
26409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
26410 $as_echo_n "checking for in6addr_any... " >&6; }
26411 if ${isc_cv_in6addr_any_links+:} false; then :
26412   $as_echo_n "(cached) " >&6
26413 else
26414
26415         SAVED_LIBS="$LIBS"
26416         LIBS="$LDADD_LIBNTP $LIBS"
26417         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26418 /* end confdefs.h.  */
26419 $ac_includes_default
26420                     #include <sys/socket.h>
26421                     #include <netinet/in.h>
26422                     $isc_netinetin6_hack
26423                     $isc_netinet6in6_hack
26424
26425 int
26426 main ()
26427 {
26428
26429                     printf("%x", in6addr_any.s6_addr[15]);
26430
26431
26432   ;
26433   return 0;
26434 }
26435 _ACEOF
26436 if ac_fn_c_try_link "$LINENO"; then :
26437   isc_cv_in6addr_any_links=yes
26438 else
26439   isc_cv_in6addr_any_links=no
26440
26441 fi
26442 rm -f core conftest.err conftest.$ac_objext \
26443     conftest$ac_exeext conftest.$ac_ext
26444         LIBS="$SAVED_LIBS"
26445         { SAVED_LIBS=; unset SAVED_LIBS;}
26446
26447
26448 fi
26449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
26450 $as_echo "$isc_cv_in6addr_any_links" >&6; }
26451
26452 case "$isc_cv_in6addr_any_links" in
26453  no)
26454
26455 $as_echo "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
26456
26457 esac
26458
26459
26460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5
26461 $as_echo_n "checking for struct if_laddrconf... " >&6; }
26462 if ${isc_cv_struct_if_laddrconf+:} false; then :
26463   $as_echo_n "(cached) " >&6
26464 else
26465   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26466 /* end confdefs.h.  */
26467
26468                 #include <sys/types.h>
26469                 #include <net/if6.h>
26470
26471 int
26472 main ()
26473 {
26474
26475                 struct if_laddrconf a;
26476
26477
26478   ;
26479   return 0;
26480 }
26481 _ACEOF
26482 if ac_fn_c_try_compile "$LINENO"; then :
26483   isc_cv_struct_if_laddrconf=yes
26484 else
26485   isc_cv_struct_if_laddrconf=no
26486
26487 fi
26488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26489
26490 fi
26491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrconf" >&5
26492 $as_echo "$isc_cv_struct_if_laddrconf" >&6; }
26493
26494 case "$isc_cv_struct_if_laddrconf" in
26495  yes)
26496
26497 $as_echo "#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" >>confdefs.h
26498
26499 esac
26500
26501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
26502 $as_echo_n "checking for struct if_laddrreq... " >&6; }
26503 if ${isc_cv_struct_if_laddrreq+:} false; then :
26504   $as_echo_n "(cached) " >&6
26505 else
26506   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26507 /* end confdefs.h.  */
26508
26509                 #include <sys/types.h>
26510                 #include <net/if6.h>
26511
26512 int
26513 main ()
26514 {
26515
26516                 struct if_laddrreq a;
26517
26518
26519   ;
26520   return 0;
26521 }
26522 _ACEOF
26523 if ac_fn_c_try_compile "$LINENO"; then :
26524   isc_cv_struct_if_laddrreq=yes
26525 else
26526   isc_cv_struct_if_laddrreq=no
26527
26528 fi
26529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26530
26531 fi
26532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrreq" >&5
26533 $as_echo "$isc_cv_struct_if_laddrreq" >&6; }
26534
26535 case "$isc_cv_struct_if_laddrreq" in
26536  yes)
26537
26538 $as_echo "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
26539
26540 esac
26541
26542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
26543 $as_echo_n "checking for multicast IP support... " >&6; }
26544 if ${ntp_cv_multicast+:} false; then :
26545   $as_echo_n "(cached) " >&6
26546 else
26547
26548         ntp_cv_multicast=no
26549         case "$host" in
26550          i386-sequent-sysv4)
26551             ;;
26552          *)
26553             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26554 /* end confdefs.h.  */
26555
26556                         #ifdef HAVE_NETINET_IN_H
26557                         # include <netinet/in.h>
26558                         #endif
26559
26560 int
26561 main ()
26562 {
26563
26564                         struct ip_mreq ipmr;
26565                         ipmr.imr_interface.s_addr = 0;
26566
26567
26568   ;
26569   return 0;
26570 }
26571 _ACEOF
26572 if ac_fn_c_try_compile "$LINENO"; then :
26573   ntp_cv_multicast=yes
26574 fi
26575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26576             ;;
26577         esac
26578
26579
26580 fi
26581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
26582 $as_echo "$ntp_cv_multicast" >&6; }
26583 case "$ntp_cv_multicast" in
26584  yes)
26585
26586 $as_echo "#define MCAST 1" >>confdefs.h
26587
26588     { $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
26589 $as_echo_n "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
26590 if ${ntp_cv_typeof_ip_multicast_loop+:} false; then :
26591   $as_echo_n "(cached) " >&6
26592 else
26593
26594             case "$host" in
26595              *-*-netbsd*|*-*-*linux*)
26596                 ntp_cv_typeof_ip_multicast_loop=u_int
26597                 ;;
26598              *)
26599                 ntp_cv_typeof_ip_multicast_loop=u_char
26600                 ;;
26601             esac
26602
26603
26604 fi
26605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
26606 $as_echo "$ntp_cv_typeof_ip_multicast_loop" >&6; }
26607
26608 cat >>confdefs.h <<_ACEOF
26609 #define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop
26610 _ACEOF
26611
26612 esac
26613
26614 # Check whether --enable-getifaddrs was given.
26615 if test "${enable_getifaddrs+set}" = set; then :
26616   enableval=$enable_getifaddrs; want_getifaddrs="$enableval"
26617 else
26618   want_getifaddrs="yes"
26619
26620 fi
26621
26622
26623 case $want_getifaddrs in
26624  glibc)
26625     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
26626 $as_echo "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
26627 esac
26628 case $want_getifaddrs in
26629  no)
26630     ;;
26631  *)
26632     SAVED_LIBS="$LIBS"
26633     LIBS="$LDADD_LIBNTP $LIBS"
26634     for ac_func in getifaddrs
26635 do :
26636   ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
26637 if test "x$ac_cv_func_getifaddrs" = xyes; then :
26638   cat >>confdefs.h <<_ACEOF
26639 #define HAVE_GETIFADDRS 1
26640 _ACEOF
26641
26642 fi
26643 done
26644
26645     LIBS="$SAVED_LIBS"
26646     { SAVED_LIBS=; unset SAVED_LIBS;}
26647     ;;
26648 esac
26649
26650 #
26651 # Check for if_nametoindex() for IPv6 scoped addresses support
26652 #
26653 case "$host" in
26654  *-hp-hpux*)
26655     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
26656 $as_echo_n "checking for library containing if_nametoindex... " >&6; }
26657 if ${ac_cv_search_if_nametoindex+:} false; then :
26658   $as_echo_n "(cached) " >&6
26659 else
26660   ac_func_search_save_LIBS=$LIBS
26661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26662 /* end confdefs.h.  */
26663
26664 /* Override any GCC internal prototype to avoid an error.
26665    Use char because int might match the return type of a GCC
26666    builtin and then its argument prototype would still apply.  */
26667 #ifdef __cplusplus
26668 extern "C"
26669 #endif
26670 char if_nametoindex ();
26671 int
26672 main ()
26673 {
26674 return if_nametoindex ();
26675   ;
26676   return 0;
26677 }
26678 _ACEOF
26679 for ac_lib in '' ipv6; do
26680   if test -z "$ac_lib"; then
26681     ac_res="none required"
26682   else
26683     ac_res=-l$ac_lib
26684     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26685   fi
26686   if ac_fn_c_try_link "$LINENO"; then :
26687   ac_cv_search_if_nametoindex=$ac_res
26688 fi
26689 rm -f core conftest.err conftest.$ac_objext \
26690     conftest$ac_exeext
26691   if ${ac_cv_search_if_nametoindex+:} false; then :
26692   break
26693 fi
26694 done
26695 if ${ac_cv_search_if_nametoindex+:} false; then :
26696
26697 else
26698   ac_cv_search_if_nametoindex=no
26699 fi
26700 rm conftest.$ac_ext
26701 LIBS=$ac_func_search_save_LIBS
26702 fi
26703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
26704 $as_echo "$ac_cv_search_if_nametoindex" >&6; }
26705 ac_res=$ac_cv_search_if_nametoindex
26706 if test "$ac_res" != no; then :
26707   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26708
26709 fi
26710
26711 esac
26712 SAVED_LIBS="$LIBS"
26713 LIBS="$LDADD_LIBNTP $LIBS"
26714 for ac_func in if_nametoindex
26715 do :
26716   ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
26717 if test "x$ac_cv_func_if_nametoindex" = xyes; then :
26718   cat >>confdefs.h <<_ACEOF
26719 #define HAVE_IF_NAMETOINDEX 1
26720 _ACEOF
26721
26722 fi
26723 done
26724
26725 LIBS="$SAVED_LIBS"
26726 { SAVED_LIBS=; unset SAVED_LIBS;}
26727 case "$ac_cv_func_if_nametoindex" in
26728  yes)
26729
26730 $as_echo "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
26731
26732 esac
26733
26734
26735
26736 ###
26737
26738 # Hacks
26739 # these need work if we're to move libntp under sntp
26740
26741 $as_echo "#define HAVE_NO_NICE 1" >>confdefs.h
26742
26743
26744 $as_echo "#define HAVE_TERMIOS 1" >>confdefs.h
26745
26746
26747 # Checks for library functions.
26748 for ac_func in socket
26749 do :
26750   ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
26751 if test "x$ac_cv_func_socket" = xyes; then :
26752   cat >>confdefs.h <<_ACEOF
26753 #define HAVE_SOCKET 1
26754 _ACEOF
26755
26756 fi
26757 done
26758
26759
26760
26761 # We may not need have_unity
26762 have_unity=false
26763 # Extract the first word of "ruby", so it can be a program name with args.
26764 set dummy ruby; ac_word=$2
26765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26766 $as_echo_n "checking for $ac_word... " >&6; }
26767 if ${ac_cv_path_PATH_RUBY+:} false; then :
26768   $as_echo_n "(cached) " >&6
26769 else
26770   case $PATH_RUBY in
26771   [\\/]* | ?:[\\/]*)
26772   ac_cv_path_PATH_RUBY="$PATH_RUBY" # Let the user override the test with a path.
26773   ;;
26774   *)
26775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26776 for as_dir in $PATH
26777 do
26778   IFS=$as_save_IFS
26779   test -z "$as_dir" && as_dir=.
26780     for ac_exec_ext in '' $ac_executable_extensions; do
26781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26782     ac_cv_path_PATH_RUBY="$as_dir/$ac_word$ac_exec_ext"
26783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26784     break 2
26785   fi
26786 done
26787   done
26788 IFS=$as_save_IFS
26789
26790   ;;
26791 esac
26792 fi
26793 PATH_RUBY=$ac_cv_path_PATH_RUBY
26794 if test -n "$PATH_RUBY"; then
26795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_RUBY" >&5
26796 $as_echo "$PATH_RUBY" >&6; }
26797 else
26798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26799 $as_echo "no" >&6; }
26800 fi
26801
26802
26803 case "$PATH_RUBY" in
26804  /*)
26805     have_unity=true
26806     ;;
26807  *) PATH_RUBY="false"
26808     ;;
26809 esac
26810 # We may not need UNITYBUILD_AVAILABLE
26811  if $have_unity; then
26812   UNITYBUILD_AVAILABLE_TRUE=
26813   UNITYBUILD_AVAILABLE_FALSE='#'
26814 else
26815   UNITYBUILD_AVAILABLE_TRUE='#'
26816   UNITYBUILD_AVAILABLE_FALSE=
26817 fi
26818
26819
26820
26821 # HMS: if we don't find c++ we should not look for gtest.
26822 ac_ext=cpp
26823 ac_cpp='$CXXCPP $CPPFLAGS'
26824 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26825 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26826 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26827 if test -z "$CXX"; then
26828   if test -n "$CCC"; then
26829     CXX=$CCC
26830   else
26831     if test -n "$ac_tool_prefix"; then
26832   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
26833   do
26834     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26835 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26837 $as_echo_n "checking for $ac_word... " >&6; }
26838 if ${ac_cv_prog_CXX+:} false; then :
26839   $as_echo_n "(cached) " >&6
26840 else
26841   if test -n "$CXX"; then
26842   ac_cv_prog_CXX="$CXX" # Let the user override the test.
26843 else
26844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26845 for as_dir in $PATH
26846 do
26847   IFS=$as_save_IFS
26848   test -z "$as_dir" && as_dir=.
26849     for ac_exec_ext in '' $ac_executable_extensions; do
26850   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26851     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
26852     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26853     break 2
26854   fi
26855 done
26856   done
26857 IFS=$as_save_IFS
26858
26859 fi
26860 fi
26861 CXX=$ac_cv_prog_CXX
26862 if test -n "$CXX"; then
26863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
26864 $as_echo "$CXX" >&6; }
26865 else
26866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26867 $as_echo "no" >&6; }
26868 fi
26869
26870
26871     test -n "$CXX" && break
26872   done
26873 fi
26874 if test -z "$CXX"; then
26875   ac_ct_CXX=$CXX
26876   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
26877 do
26878   # Extract the first word of "$ac_prog", so it can be a program name with args.
26879 set dummy $ac_prog; ac_word=$2
26880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26881 $as_echo_n "checking for $ac_word... " >&6; }
26882 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
26883   $as_echo_n "(cached) " >&6
26884 else
26885   if test -n "$ac_ct_CXX"; then
26886   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
26887 else
26888 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26889 for as_dir in $PATH
26890 do
26891   IFS=$as_save_IFS
26892   test -z "$as_dir" && as_dir=.
26893     for ac_exec_ext in '' $ac_executable_extensions; do
26894   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26895     ac_cv_prog_ac_ct_CXX="$ac_prog"
26896     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26897     break 2
26898   fi
26899 done
26900   done
26901 IFS=$as_save_IFS
26902
26903 fi
26904 fi
26905 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
26906 if test -n "$ac_ct_CXX"; then
26907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
26908 $as_echo "$ac_ct_CXX" >&6; }
26909 else
26910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26911 $as_echo "no" >&6; }
26912 fi
26913
26914
26915   test -n "$ac_ct_CXX" && break
26916 done
26917
26918   if test "x$ac_ct_CXX" = x; then
26919     CXX="g++"
26920   else
26921     case $cross_compiling:$ac_tool_warned in
26922 yes:)
26923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26924 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26925 ac_tool_warned=yes ;;
26926 esac
26927     CXX=$ac_ct_CXX
26928   fi
26929 fi
26930
26931   fi
26932 fi
26933 # Provide some information about the compiler.
26934 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
26935 set X $ac_compile
26936 ac_compiler=$2
26937 for ac_option in --version -v -V -qversion; do
26938   { { ac_try="$ac_compiler $ac_option >&5"
26939 case "(($ac_try" in
26940   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26941   *) ac_try_echo=$ac_try;;
26942 esac
26943 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
26944 $as_echo "$ac_try_echo"; } >&5
26945   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
26946   ac_status=$?
26947   if test -s conftest.err; then
26948     sed '10a\
26949 ... rest of stderr output deleted ...
26950          10q' conftest.err >conftest.er1
26951     cat conftest.er1 >&5
26952   fi
26953   rm -f conftest.er1 conftest.err
26954   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26955   test $ac_status = 0; }
26956 done
26957
26958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
26959 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
26960 if ${ac_cv_cxx_compiler_gnu+:} false; then :
26961   $as_echo_n "(cached) " >&6
26962 else
26963   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26964 /* end confdefs.h.  */
26965
26966 int
26967 main ()
26968 {
26969 #ifndef __GNUC__
26970        choke me
26971 #endif
26972
26973   ;
26974   return 0;
26975 }
26976 _ACEOF
26977 if ac_fn_cxx_try_compile "$LINENO"; then :
26978   ac_compiler_gnu=yes
26979 else
26980   ac_compiler_gnu=no
26981 fi
26982 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26983 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
26984
26985 fi
26986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
26987 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
26988 if test $ac_compiler_gnu = yes; then
26989   GXX=yes
26990 else
26991   GXX=
26992 fi
26993 ac_test_CXXFLAGS=${CXXFLAGS+set}
26994 ac_save_CXXFLAGS=$CXXFLAGS
26995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
26996 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
26997 if ${ac_cv_prog_cxx_g+:} false; then :
26998   $as_echo_n "(cached) " >&6
26999 else
27000   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
27001    ac_cxx_werror_flag=yes
27002    ac_cv_prog_cxx_g=no
27003    CXXFLAGS="-g"
27004    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27005 /* end confdefs.h.  */
27006
27007 int
27008 main ()
27009 {
27010
27011   ;
27012   return 0;
27013 }
27014 _ACEOF
27015 if ac_fn_cxx_try_compile "$LINENO"; then :
27016   ac_cv_prog_cxx_g=yes
27017 else
27018   CXXFLAGS=""
27019       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27020 /* end confdefs.h.  */
27021
27022 int
27023 main ()
27024 {
27025
27026   ;
27027   return 0;
27028 }
27029 _ACEOF
27030 if ac_fn_cxx_try_compile "$LINENO"; then :
27031
27032 else
27033   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
27034          CXXFLAGS="-g"
27035          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27036 /* end confdefs.h.  */
27037
27038 int
27039 main ()
27040 {
27041
27042   ;
27043   return 0;
27044 }
27045 _ACEOF
27046 if ac_fn_cxx_try_compile "$LINENO"; then :
27047   ac_cv_prog_cxx_g=yes
27048 fi
27049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27050 fi
27051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27052 fi
27053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27054    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
27055 fi
27056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
27057 $as_echo "$ac_cv_prog_cxx_g" >&6; }
27058 if test "$ac_test_CXXFLAGS" = set; then
27059   CXXFLAGS=$ac_save_CXXFLAGS
27060 elif test $ac_cv_prog_cxx_g = yes; then
27061   if test "$GXX" = yes; then
27062     CXXFLAGS="-g -O2"
27063   else
27064     CXXFLAGS="-g"
27065   fi
27066 else
27067   if test "$GXX" = yes; then
27068     CXXFLAGS="-O2"
27069   else
27070     CXXFLAGS=
27071   fi
27072 fi
27073 ac_ext=c
27074 ac_cpp='$CPP $CPPFLAGS'
27075 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27076 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27077 ac_compiler_gnu=$ac_cv_c_compiler_gnu
27078
27079 depcc="$CXX"  am_compiler_list=
27080
27081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
27082 $as_echo_n "checking dependency style of $depcc... " >&6; }
27083 if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
27084   $as_echo_n "(cached) " >&6
27085 else
27086   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
27087   # We make a subdir and do the tests there.  Otherwise we can end up
27088   # making bogus files that we don't know about and never remove.  For
27089   # instance it was reported that on HP-UX the gcc test will end up
27090   # making a dummy file named 'D' -- because '-MD' means "put the output
27091   # in D".
27092   rm -rf conftest.dir
27093   mkdir conftest.dir
27094   # Copy depcomp to subdir because otherwise we won't find it if we're
27095   # using a relative directory.
27096   cp "$am_depcomp" conftest.dir
27097   cd conftest.dir
27098   # We will build objects and dependencies in a subdirectory because
27099   # it helps to detect inapplicable dependency modes.  For instance
27100   # both Tru64's cc and ICC support -MD to output dependencies as a
27101   # side effect of compilation, but ICC will put the dependencies in
27102   # the current directory while Tru64 will put them in the object
27103   # directory.
27104   mkdir sub
27105
27106   am_cv_CXX_dependencies_compiler_type=none
27107   if test "$am_compiler_list" = ""; then
27108      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
27109   fi
27110   am__universal=false
27111   case " $depcc " in #(
27112      *\ -arch\ *\ -arch\ *) am__universal=true ;;
27113      esac
27114
27115   for depmode in $am_compiler_list; do
27116     # Setup a source with many dependencies, because some compilers
27117     # like to wrap large dependency lists on column 80 (with \), and
27118     # we should not choose a depcomp mode which is confused by this.
27119     #
27120     # We need to recreate these files for each test, as the compiler may
27121     # overwrite some of them when testing with obscure command lines.
27122     # This happens at least with the AIX C compiler.
27123     : > sub/conftest.c
27124     for i in 1 2 3 4 5 6; do
27125       echo '#include "conftst'$i'.h"' >> sub/conftest.c
27126       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
27127       # Solaris 10 /bin/sh.
27128       echo '/* dummy */' > sub/conftst$i.h
27129     done
27130     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
27131
27132     # We check with '-c' and '-o' for the sake of the "dashmstdout"
27133     # mode.  It turns out that the SunPro C++ compiler does not properly
27134     # handle '-M -o', and we need to detect this.  Also, some Intel
27135     # versions had trouble with output in subdirs.
27136     am__obj=sub/conftest.${OBJEXT-o}
27137     am__minus_obj="-o $am__obj"
27138     case $depmode in
27139     gcc)
27140       # This depmode causes a compiler race in universal mode.
27141       test "$am__universal" = false || continue
27142       ;;
27143     nosideeffect)
27144       # After this tag, mechanisms are not by side-effect, so they'll
27145       # only be used when explicitly requested.
27146       if test "x$enable_dependency_tracking" = xyes; then
27147         continue
27148       else
27149         break
27150       fi
27151       ;;
27152     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
27153       # This compiler won't grok '-c -o', but also, the minuso test has
27154       # not run yet.  These depmodes are late enough in the game, and
27155       # so weak that their functioning should not be impacted.
27156       am__obj=conftest.${OBJEXT-o}
27157       am__minus_obj=
27158       ;;
27159     none) break ;;
27160     esac
27161     if depmode=$depmode \
27162        source=sub/conftest.c object=$am__obj \
27163        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
27164        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
27165          >/dev/null 2>conftest.err &&
27166        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
27167        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
27168        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
27169        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
27170       # icc doesn't choke on unknown options, it will just issue warnings
27171       # or remarks (even with -Werror).  So we grep stderr for any message
27172       # that says an option was ignored or not supported.
27173       # When given -MP, icc 7.0 and 7.1 complain thusly:
27174       #   icc: Command line warning: ignoring option '-M'; no argument required
27175       # The diagnosis changed in icc 8.0:
27176       #   icc: Command line remark: option '-MP' not supported
27177       if (grep 'ignoring option' conftest.err ||
27178           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
27179         am_cv_CXX_dependencies_compiler_type=$depmode
27180         break
27181       fi
27182     fi
27183   done
27184
27185   cd ..
27186   rm -rf conftest.dir
27187 else
27188   am_cv_CXX_dependencies_compiler_type=none
27189 fi
27190
27191 fi
27192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
27193 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
27194 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
27195
27196  if
27197   test "x$enable_dependency_tracking" != xno \
27198   && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
27199   am__fastdepCXX_TRUE=
27200   am__fastdepCXX_FALSE='#'
27201 else
27202   am__fastdepCXX_TRUE='#'
27203   am__fastdepCXX_FALSE=
27204 fi
27205
27206
27207
27208
27209 func_stripname_cnf ()
27210 {
27211   case ${2} in
27212   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
27213   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
27214   esac
27215 } # func_stripname_cnf
27216
27217       if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
27218     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
27219     (test "X$CXX" != "Xg++"))) ; then
27220   ac_ext=cpp
27221 ac_cpp='$CXXCPP $CPPFLAGS'
27222 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27223 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27224 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
27226 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
27227 if test -z "$CXXCPP"; then
27228   if ${ac_cv_prog_CXXCPP+:} false; then :
27229   $as_echo_n "(cached) " >&6
27230 else
27231       # Double quotes because CXXCPP needs to be expanded
27232     for CXXCPP in "$CXX -E" "/lib/cpp"
27233     do
27234       ac_preproc_ok=false
27235 for ac_cxx_preproc_warn_flag in '' yes
27236 do
27237   # Use a header file that comes with gcc, so configuring glibc
27238   # with a fresh cross-compiler works.
27239   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27240   # <limits.h> exists even on freestanding compilers.
27241   # On the NeXT, cc -E runs the code through the compiler's parser,
27242   # not just through cpp. "Syntax error" is here to catch this case.
27243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27244 /* end confdefs.h.  */
27245 #ifdef __STDC__
27246 # include <limits.h>
27247 #else
27248 # include <assert.h>
27249 #endif
27250                      Syntax error
27251 _ACEOF
27252 if ac_fn_cxx_try_cpp "$LINENO"; then :
27253
27254 else
27255   # Broken: fails on valid input.
27256 continue
27257 fi
27258 rm -f conftest.err conftest.i conftest.$ac_ext
27259
27260   # OK, works on sane cases.  Now check whether nonexistent headers
27261   # can be detected and how.
27262   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27263 /* end confdefs.h.  */
27264 #include <ac_nonexistent.h>
27265 _ACEOF
27266 if ac_fn_cxx_try_cpp "$LINENO"; then :
27267   # Broken: success on invalid input.
27268 continue
27269 else
27270   # Passes both tests.
27271 ac_preproc_ok=:
27272 break
27273 fi
27274 rm -f conftest.err conftest.i conftest.$ac_ext
27275
27276 done
27277 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
27278 rm -f conftest.i conftest.err conftest.$ac_ext
27279 if $ac_preproc_ok; then :
27280   break
27281 fi
27282
27283     done
27284     ac_cv_prog_CXXCPP=$CXXCPP
27285
27286 fi
27287   CXXCPP=$ac_cv_prog_CXXCPP
27288 else
27289   ac_cv_prog_CXXCPP=$CXXCPP
27290 fi
27291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
27292 $as_echo "$CXXCPP" >&6; }
27293 ac_preproc_ok=false
27294 for ac_cxx_preproc_warn_flag in '' yes
27295 do
27296   # Use a header file that comes with gcc, so configuring glibc
27297   # with a fresh cross-compiler works.
27298   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27299   # <limits.h> exists even on freestanding compilers.
27300   # On the NeXT, cc -E runs the code through the compiler's parser,
27301   # not just through cpp. "Syntax error" is here to catch this case.
27302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27303 /* end confdefs.h.  */
27304 #ifdef __STDC__
27305 # include <limits.h>
27306 #else
27307 # include <assert.h>
27308 #endif
27309                      Syntax error
27310 _ACEOF
27311 if ac_fn_cxx_try_cpp "$LINENO"; then :
27312
27313 else
27314   # Broken: fails on valid input.
27315 continue
27316 fi
27317 rm -f conftest.err conftest.i conftest.$ac_ext
27318
27319   # OK, works on sane cases.  Now check whether nonexistent headers
27320   # can be detected and how.
27321   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27322 /* end confdefs.h.  */
27323 #include <ac_nonexistent.h>
27324 _ACEOF
27325 if ac_fn_cxx_try_cpp "$LINENO"; then :
27326   # Broken: success on invalid input.
27327 continue
27328 else
27329   # Passes both tests.
27330 ac_preproc_ok=:
27331 break
27332 fi
27333 rm -f conftest.err conftest.i conftest.$ac_ext
27334
27335 done
27336 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
27337 rm -f conftest.i conftest.err conftest.$ac_ext
27338 if $ac_preproc_ok; then :
27339
27340 else
27341   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27342 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27343 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
27344 See \`config.log' for more details" "$LINENO" 5; }
27345 fi
27346
27347 ac_ext=c
27348 ac_cpp='$CPP $CPPFLAGS'
27349 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27350 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27351 ac_compiler_gnu=$ac_cv_c_compiler_gnu
27352
27353 else
27354   _lt_caught_CXX_error=yes
27355 fi
27356
27357 ac_ext=cpp
27358 ac_cpp='$CXXCPP $CPPFLAGS'
27359 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27360 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27361 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27362
27363 archive_cmds_need_lc_CXX=no
27364 allow_undefined_flag_CXX=
27365 always_export_symbols_CXX=no
27366 archive_expsym_cmds_CXX=
27367 compiler_needs_object_CXX=no
27368 export_dynamic_flag_spec_CXX=
27369 hardcode_direct_CXX=no
27370 hardcode_direct_absolute_CXX=no
27371 hardcode_libdir_flag_spec_CXX=
27372 hardcode_libdir_flag_spec_ld_CXX=
27373 hardcode_libdir_separator_CXX=
27374 hardcode_minus_L_CXX=no
27375 hardcode_shlibpath_var_CXX=unsupported
27376 hardcode_automatic_CXX=no
27377 inherit_rpath_CXX=no
27378 module_cmds_CXX=
27379 module_expsym_cmds_CXX=
27380 link_all_deplibs_CXX=unknown
27381 old_archive_cmds_CXX=$old_archive_cmds
27382 reload_flag_CXX=$reload_flag
27383 reload_cmds_CXX=$reload_cmds
27384 no_undefined_flag_CXX=
27385 whole_archive_flag_spec_CXX=
27386 enable_shared_with_static_runtimes_CXX=no
27387
27388 # Source file extension for C++ test sources.
27389 ac_ext=cpp
27390
27391 # Object file extension for compiled C++ test sources.
27392 objext=o
27393 objext_CXX=$objext
27394
27395 # No sense in running all these tests if we already determined that
27396 # the CXX compiler isn't working.  Some variables (like enable_shared)
27397 # are currently assumed to apply to all compilers on this platform,
27398 # and will be corrupted by setting them based on a non-working compiler.
27399 if test "$_lt_caught_CXX_error" != yes; then
27400   # Code to be used in simple compile tests
27401   lt_simple_compile_test_code="int some_variable = 0;"
27402
27403   # Code to be used in simple link tests
27404   lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
27405
27406   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
27407
27408
27409
27410
27411
27412
27413 # If no C compiler was specified, use CC.
27414 LTCC=${LTCC-"$CC"}
27415
27416 # If no C compiler flags were specified, use CFLAGS.
27417 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
27418
27419 # Allow CC to be a program name with arguments.
27420 compiler=$CC
27421
27422
27423   # save warnings/boilerplate of simple test code
27424   ac_outfile=conftest.$ac_objext
27425 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
27426 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
27427 _lt_compiler_boilerplate=`cat conftest.err`
27428 $RM conftest*
27429
27430   ac_outfile=conftest.$ac_objext
27431 echo "$lt_simple_link_test_code" >conftest.$ac_ext
27432 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
27433 _lt_linker_boilerplate=`cat conftest.err`
27434 $RM -r conftest*
27435
27436
27437   # Allow CC to be a program name with arguments.
27438   lt_save_CC=$CC
27439   lt_save_CFLAGS=$CFLAGS
27440   lt_save_LD=$LD
27441   lt_save_GCC=$GCC
27442   GCC=$GXX
27443   lt_save_with_gnu_ld=$with_gnu_ld
27444   lt_save_path_LD=$lt_cv_path_LD
27445   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
27446     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
27447   else
27448     $as_unset lt_cv_prog_gnu_ld
27449   fi
27450   if test -n "${lt_cv_path_LDCXX+set}"; then
27451     lt_cv_path_LD=$lt_cv_path_LDCXX
27452   else
27453     $as_unset lt_cv_path_LD
27454   fi
27455   test -z "${LDCXX+set}" || LD=$LDCXX
27456   CC=${CXX-"c++"}
27457   CFLAGS=$CXXFLAGS
27458   compiler=$CC
27459   compiler_CXX=$CC
27460   for cc_temp in $compiler""; do
27461   case $cc_temp in
27462     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
27463     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
27464     \-*) ;;
27465     *) break;;
27466   esac
27467 done
27468 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
27469
27470
27471   if test -n "$compiler"; then
27472     # We don't want -fno-exception when compiling C++ code, so set the
27473     # no_builtin_flag separately
27474     if test "$GXX" = yes; then
27475       lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
27476     else
27477       lt_prog_compiler_no_builtin_flag_CXX=
27478     fi
27479
27480     if test "$GXX" = yes; then
27481       # Set up default GNU C++ configuration
27482
27483
27484
27485 # Check whether --with-gnu-ld was given.
27486 if test "${with_gnu_ld+set}" = set; then :
27487   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
27488 else
27489   with_gnu_ld=no
27490 fi
27491
27492 ac_prog=ld
27493 if test "$GCC" = yes; then
27494   # Check if gcc -print-prog-name=ld gives a path.
27495   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
27496 $as_echo_n "checking for ld used by $CC... " >&6; }
27497   case $host in
27498   *-*-mingw*)
27499     # gcc leaves a trailing carriage return which upsets mingw
27500     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
27501   *)
27502     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
27503   esac
27504   case $ac_prog in
27505     # Accept absolute paths.
27506     [\\/]* | ?:[\\/]*)
27507       re_direlt='/[^/][^/]*/\.\./'
27508       # Canonicalize the pathname of ld
27509       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
27510       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
27511         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
27512       done
27513       test -z "$LD" && LD="$ac_prog"
27514       ;;
27515   "")
27516     # If it fails, then pretend we aren't using GCC.
27517     ac_prog=ld
27518     ;;
27519   *)
27520     # If it is relative, then search for the first ld in PATH.
27521     with_gnu_ld=unknown
27522     ;;
27523   esac
27524 elif test "$with_gnu_ld" = yes; then
27525   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
27526 $as_echo_n "checking for GNU ld... " >&6; }
27527 else
27528   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
27529 $as_echo_n "checking for non-GNU ld... " >&6; }
27530 fi
27531 if ${lt_cv_path_LD+:} false; then :
27532   $as_echo_n "(cached) " >&6
27533 else
27534   if test -z "$LD"; then
27535   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
27536   for ac_dir in $PATH; do
27537     IFS="$lt_save_ifs"
27538     test -z "$ac_dir" && ac_dir=.
27539     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
27540       lt_cv_path_LD="$ac_dir/$ac_prog"
27541       # Check to see if the program is GNU ld.  I'd rather use --version,
27542       # but apparently some variants of GNU ld only accept -v.
27543       # Break only if it was the GNU/non-GNU ld that we prefer.
27544       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
27545       *GNU* | *'with BFD'*)
27546         test "$with_gnu_ld" != no && break
27547         ;;
27548       *)
27549         test "$with_gnu_ld" != yes && break
27550         ;;
27551       esac
27552     fi
27553   done
27554   IFS="$lt_save_ifs"
27555 else
27556   lt_cv_path_LD="$LD" # Let the user override the test with a path.
27557 fi
27558 fi
27559
27560 LD="$lt_cv_path_LD"
27561 if test -n "$LD"; then
27562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
27563 $as_echo "$LD" >&6; }
27564 else
27565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27566 $as_echo "no" >&6; }
27567 fi
27568 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
27569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
27570 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
27571 if ${lt_cv_prog_gnu_ld+:} false; then :
27572   $as_echo_n "(cached) " >&6
27573 else
27574   # I'd rather use --version here, but apparently some GNU lds only accept -v.
27575 case `$LD -v 2>&1 </dev/null` in
27576 *GNU* | *'with BFD'*)
27577   lt_cv_prog_gnu_ld=yes
27578   ;;
27579 *)
27580   lt_cv_prog_gnu_ld=no
27581   ;;
27582 esac
27583 fi
27584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
27585 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
27586 with_gnu_ld=$lt_cv_prog_gnu_ld
27587
27588
27589
27590
27591
27592
27593
27594       # Check if GNU C++ uses GNU ld as the underlying linker, since the
27595       # archiving commands below assume that GNU ld is being used.
27596       if test "$with_gnu_ld" = yes; then
27597         archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
27598         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'
27599
27600         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
27601         export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
27602
27603         # If archive_cmds runs LD, not CC, wlarc should be empty
27604         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
27605         #     investigate it a little bit more. (MM)
27606         wlarc='${wl}'
27607
27608         # ancient GNU ld didn't support --whole-archive et. al.
27609         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
27610           $GREP 'no-whole-archive' > /dev/null; then
27611           whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
27612         else
27613           whole_archive_flag_spec_CXX=
27614         fi
27615       else
27616         with_gnu_ld=no
27617         wlarc=
27618
27619         # A generic and very simple default shared library creation
27620         # command for GNU C++ for the case where it uses the native
27621         # linker, instead of GNU ld.  If possible, this setting should
27622         # overridden to take advantage of the native linker features on
27623         # the platform it is being used on.
27624         archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
27625       fi
27626
27627       # Commands to make compiler produce verbose output that lists
27628       # what "hidden" libraries, object files and flags are used when
27629       # linking a shared library.
27630       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
27631
27632     else
27633       GXX=no
27634       with_gnu_ld=no
27635       wlarc=
27636     fi
27637
27638     # PORTME: fill in a description of your system's C++ link characteristics
27639     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
27640 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
27641     ld_shlibs_CXX=yes
27642     case $host_os in
27643       aix3*)
27644         # FIXME: insert proper C++ library support
27645         ld_shlibs_CXX=no
27646         ;;
27647       aix[4-9]*)
27648         if test "$host_cpu" = ia64; then
27649           # On IA64, the linker does run time linking by default, so we don't
27650           # have to do anything special.
27651           aix_use_runtimelinking=no
27652           exp_sym_flag='-Bexport'
27653           no_entry_flag=""
27654         else
27655           aix_use_runtimelinking=no
27656
27657           # Test if we are trying to use run time linking or normal
27658           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
27659           # need to do runtime linking.
27660           case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
27661             for ld_flag in $LDFLAGS; do
27662               case $ld_flag in
27663               *-brtl*)
27664                 aix_use_runtimelinking=yes
27665                 break
27666                 ;;
27667               esac
27668             done
27669             ;;
27670           esac
27671
27672           exp_sym_flag='-bexport'
27673           no_entry_flag='-bnoentry'
27674         fi
27675
27676         # When large executables or shared objects are built, AIX ld can
27677         # have problems creating the table of contents.  If linking a library
27678         # or program results in "error TOC overflow" add -mminimal-toc to
27679         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
27680         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
27681
27682         archive_cmds_CXX=''
27683         hardcode_direct_CXX=yes
27684         hardcode_direct_absolute_CXX=yes
27685         hardcode_libdir_separator_CXX=':'
27686         link_all_deplibs_CXX=yes
27687         file_list_spec_CXX='${wl}-f,'
27688
27689         if test "$GXX" = yes; then
27690           case $host_os in aix4.[012]|aix4.[012].*)
27691           # We only want to do this on AIX 4.2 and lower, the check
27692           # below for broken collect2 doesn't work under 4.3+
27693           collect2name=`${CC} -print-prog-name=collect2`
27694           if test -f "$collect2name" &&
27695              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
27696           then
27697             # We have reworked collect2
27698             :
27699           else
27700             # We have old collect2
27701             hardcode_direct_CXX=unsupported
27702             # It fails to find uninstalled libraries when the uninstalled
27703             # path is not listed in the libpath.  Setting hardcode_minus_L
27704             # to unsupported forces relinking
27705             hardcode_minus_L_CXX=yes
27706             hardcode_libdir_flag_spec_CXX='-L$libdir'
27707             hardcode_libdir_separator_CXX=
27708           fi
27709           esac
27710           shared_flag='-shared'
27711           if test "$aix_use_runtimelinking" = yes; then
27712             shared_flag="$shared_flag "'${wl}-G'
27713           fi
27714         else
27715           # not using gcc
27716           if test "$host_cpu" = ia64; then
27717           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
27718           # chokes on -Wl,-G. The following line is correct:
27719           shared_flag='-G'
27720           else
27721             if test "$aix_use_runtimelinking" = yes; then
27722               shared_flag='${wl}-G'
27723             else
27724               shared_flag='${wl}-bM:SRE'
27725             fi
27726           fi
27727         fi
27728
27729         export_dynamic_flag_spec_CXX='${wl}-bexpall'
27730         # It seems that -bexpall does not export symbols beginning with
27731         # underscore (_), so it is better to generate a list of symbols to
27732         # export.
27733         always_export_symbols_CXX=yes
27734         if test "$aix_use_runtimelinking" = yes; then
27735           # Warning - without using the other runtime loading flags (-brtl),
27736           # -berok will link without error, but may produce a broken library.
27737           allow_undefined_flag_CXX='-berok'
27738           # Determine the default libpath from the value encoded in an empty
27739           # executable.
27740           if test "${lt_cv_aix_libpath+set}" = set; then
27741   aix_libpath=$lt_cv_aix_libpath
27742 else
27743   if ${lt_cv_aix_libpath__CXX+:} false; then :
27744   $as_echo_n "(cached) " >&6
27745 else
27746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27747 /* end confdefs.h.  */
27748
27749 int
27750 main ()
27751 {
27752
27753   ;
27754   return 0;
27755 }
27756 _ACEOF
27757 if ac_fn_cxx_try_link "$LINENO"; then :
27758
27759   lt_aix_libpath_sed='
27760       /Import File Strings/,/^$/ {
27761           /^0/ {
27762               s/^0  *\([^ ]*\) *$/\1/
27763               p
27764           }
27765       }'
27766   lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
27767   # Check for a 64-bit object if we didn't find anything.
27768   if test -z "$lt_cv_aix_libpath__CXX"; then
27769     lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
27770   fi
27771 fi
27772 rm -f core conftest.err conftest.$ac_objext \
27773     conftest$ac_exeext conftest.$ac_ext
27774   if test -z "$lt_cv_aix_libpath__CXX"; then
27775     lt_cv_aix_libpath__CXX="/usr/lib:/lib"
27776   fi
27777
27778 fi
27779
27780   aix_libpath=$lt_cv_aix_libpath__CXX
27781 fi
27782
27783           hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
27784
27785           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"
27786         else
27787           if test "$host_cpu" = ia64; then
27788             hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
27789             allow_undefined_flag_CXX="-z nodefs"
27790             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"
27791           else
27792             # Determine the default libpath from the value encoded in an
27793             # empty executable.
27794             if test "${lt_cv_aix_libpath+set}" = set; then
27795   aix_libpath=$lt_cv_aix_libpath
27796 else
27797   if ${lt_cv_aix_libpath__CXX+:} false; then :
27798   $as_echo_n "(cached) " >&6
27799 else
27800   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27801 /* end confdefs.h.  */
27802
27803 int
27804 main ()
27805 {
27806
27807   ;
27808   return 0;
27809 }
27810 _ACEOF
27811 if ac_fn_cxx_try_link "$LINENO"; then :
27812
27813   lt_aix_libpath_sed='
27814       /Import File Strings/,/^$/ {
27815           /^0/ {
27816               s/^0  *\([^ ]*\) *$/\1/
27817               p
27818           }
27819       }'
27820   lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
27821   # Check for a 64-bit object if we didn't find anything.
27822   if test -z "$lt_cv_aix_libpath__CXX"; then
27823     lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
27824   fi
27825 fi
27826 rm -f core conftest.err conftest.$ac_objext \
27827     conftest$ac_exeext conftest.$ac_ext
27828   if test -z "$lt_cv_aix_libpath__CXX"; then
27829     lt_cv_aix_libpath__CXX="/usr/lib:/lib"
27830   fi
27831
27832 fi
27833
27834   aix_libpath=$lt_cv_aix_libpath__CXX
27835 fi
27836
27837             hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
27838             # Warning - without using the other run time loading flags,
27839             # -berok will link without error, but may produce a broken library.
27840             no_undefined_flag_CXX=' ${wl}-bernotok'
27841             allow_undefined_flag_CXX=' ${wl}-berok'
27842             if test "$with_gnu_ld" = yes; then
27843               # We only use this code for GNU lds that support --whole-archive.
27844               whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
27845             else
27846               # Exported symbols can be pulled into shared objects from archives
27847               whole_archive_flag_spec_CXX='$convenience'
27848             fi
27849             archive_cmds_need_lc_CXX=yes
27850             # This is similar to how AIX traditionally builds its shared
27851             # libraries.
27852             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'
27853           fi
27854         fi
27855         ;;
27856
27857       beos*)
27858         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
27859           allow_undefined_flag_CXX=unsupported
27860           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
27861           # support --undefined.  This deserves some investigation.  FIXME
27862           archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
27863         else
27864           ld_shlibs_CXX=no
27865         fi
27866         ;;
27867
27868       chorus*)
27869         case $cc_basename in
27870           *)
27871           # FIXME: insert proper C++ library support
27872           ld_shlibs_CXX=no
27873           ;;
27874         esac
27875         ;;
27876
27877       cygwin* | mingw* | pw32* | cegcc*)
27878         case $GXX,$cc_basename in
27879         ,cl* | no,cl*)
27880           # Native MSVC
27881           # hardcode_libdir_flag_spec is actually meaningless, as there is
27882           # no search path for DLLs.
27883           hardcode_libdir_flag_spec_CXX=' '
27884           allow_undefined_flag_CXX=unsupported
27885           always_export_symbols_CXX=yes
27886           file_list_spec_CXX='@'
27887           # Tell ltmain to make .lib files, not .a files.
27888           libext=lib
27889           # Tell ltmain to make .dll files, not .so files.
27890           shrext_cmds=".dll"
27891           # FIXME: Setting linknames here is a bad hack.
27892           archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
27893           archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
27894               $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
27895             else
27896               $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
27897             fi~
27898             $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
27899             linknames='
27900           # The linker will not automatically build a static lib if we build a DLL.
27901           # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
27902           enable_shared_with_static_runtimes_CXX=yes
27903           # Don't use ranlib
27904           old_postinstall_cmds_CXX='chmod 644 $oldlib'
27905           postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
27906             lt_tool_outputfile="@TOOL_OUTPUT@"~
27907             case $lt_outputfile in
27908               *.exe|*.EXE) ;;
27909               *)
27910                 lt_outputfile="$lt_outputfile.exe"
27911                 lt_tool_outputfile="$lt_tool_outputfile.exe"
27912                 ;;
27913             esac~
27914             func_to_tool_file "$lt_outputfile"~
27915             if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
27916               $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
27917               $RM "$lt_outputfile.manifest";
27918             fi'
27919           ;;
27920         *)
27921           # g++
27922           # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
27923           # as there is no search path for DLLs.
27924           hardcode_libdir_flag_spec_CXX='-L$libdir'
27925           export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
27926           allow_undefined_flag_CXX=unsupported
27927           always_export_symbols_CXX=no
27928           enable_shared_with_static_runtimes_CXX=yes
27929
27930           if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
27931             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'
27932             # If the export-symbols file already is a .def file (1st line
27933             # is EXPORTS), use it as is; otherwise, prepend...
27934             archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
27935               cp $export_symbols $output_objdir/$soname.def;
27936             else
27937               echo EXPORTS > $output_objdir/$soname.def;
27938               cat $export_symbols >> $output_objdir/$soname.def;
27939             fi~
27940             $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'
27941           else
27942             ld_shlibs_CXX=no
27943           fi
27944           ;;
27945         esac
27946         ;;
27947       darwin* | rhapsody*)
27948
27949
27950   archive_cmds_need_lc_CXX=no
27951   hardcode_direct_CXX=no
27952   hardcode_automatic_CXX=yes
27953   hardcode_shlibpath_var_CXX=unsupported
27954   if test "$lt_cv_ld_force_load" = "yes"; then
27955     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\"`'
27956   else
27957     whole_archive_flag_spec_CXX=''
27958   fi
27959   link_all_deplibs_CXX=yes
27960   allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
27961   case $cc_basename in
27962      ifort*) _lt_dar_can_shared=yes ;;
27963      *) _lt_dar_can_shared=$GCC ;;
27964   esac
27965   if test "$_lt_dar_can_shared" = "yes"; then
27966     output_verbose_link_cmd=func_echo_all
27967     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}"
27968     module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
27969     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}"
27970     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}"
27971        if test "$lt_cv_apple_cc_single_mod" != "yes"; then
27972       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}"
27973       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}"
27974     fi
27975
27976   else
27977   ld_shlibs_CXX=no
27978   fi
27979
27980         ;;
27981
27982       dgux*)
27983         case $cc_basename in
27984           ec++*)
27985             # FIXME: insert proper C++ library support
27986             ld_shlibs_CXX=no
27987             ;;
27988           ghcx*)
27989             # Green Hills C++ Compiler
27990             # FIXME: insert proper C++ library support
27991             ld_shlibs_CXX=no
27992             ;;
27993           *)
27994             # FIXME: insert proper C++ library support
27995             ld_shlibs_CXX=no
27996             ;;
27997         esac
27998         ;;
27999
28000       freebsd[12]*)
28001         # C++ shared libraries reported to be fairly broken before
28002         # switch to ELF
28003         ld_shlibs_CXX=no
28004         ;;
28005
28006       freebsd-elf*)
28007         archive_cmds_need_lc_CXX=no
28008         ;;
28009
28010       freebsd* | dragonfly*)
28011         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
28012         # conventions
28013         ld_shlibs_CXX=yes
28014         ;;
28015
28016       gnu*)
28017         ;;
28018
28019       haiku*)
28020         archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28021         link_all_deplibs_CXX=yes
28022         ;;
28023
28024       hpux9*)
28025         hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
28026         hardcode_libdir_separator_CXX=:
28027         export_dynamic_flag_spec_CXX='${wl}-E'
28028         hardcode_direct_CXX=yes
28029         hardcode_minus_L_CXX=yes # Not in the search PATH,
28030                                              # but as the default
28031                                              # location of the library.
28032
28033         case $cc_basename in
28034           CC*)
28035             # FIXME: insert proper C++ library support
28036             ld_shlibs_CXX=no
28037             ;;
28038           aCC*)
28039             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'
28040             # Commands to make compiler produce verbose output that lists
28041             # what "hidden" libraries, object files and flags are used when
28042             # linking a shared library.
28043             #
28044             # There doesn't appear to be a way to prevent this compiler from
28045             # explicitly linking system object files so we need to strip them
28046             # from the output so that they don't get included in the library
28047             # dependencies.
28048             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"'
28049             ;;
28050           *)
28051             if test "$GXX" = yes; then
28052               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'
28053             else
28054               # FIXME: insert proper C++ library support
28055               ld_shlibs_CXX=no
28056             fi
28057             ;;
28058         esac
28059         ;;
28060
28061       hpux10*|hpux11*)
28062         if test $with_gnu_ld = no; then
28063           hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
28064           hardcode_libdir_separator_CXX=:
28065
28066           case $host_cpu in
28067             hppa*64*|ia64*)
28068               ;;
28069             *)
28070               export_dynamic_flag_spec_CXX='${wl}-E'
28071               ;;
28072           esac
28073         fi
28074         case $host_cpu in
28075           hppa*64*|ia64*)
28076             hardcode_direct_CXX=no
28077             hardcode_shlibpath_var_CXX=no
28078             ;;
28079           *)
28080             hardcode_direct_CXX=yes
28081             hardcode_direct_absolute_CXX=yes
28082             hardcode_minus_L_CXX=yes # Not in the search PATH,
28083                                                  # but as the default
28084                                                  # location of the library.
28085             ;;
28086         esac
28087
28088         case $cc_basename in
28089           CC*)
28090             # FIXME: insert proper C++ library support
28091             ld_shlibs_CXX=no
28092             ;;
28093           aCC*)
28094             case $host_cpu in
28095               hppa*64*)
28096                 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28097                 ;;
28098               ia64*)
28099                 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28100                 ;;
28101               *)
28102                 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28103                 ;;
28104             esac
28105             # Commands to make compiler produce verbose output that lists
28106             # what "hidden" libraries, object files and flags are used when
28107             # linking a shared library.
28108             #
28109             # There doesn't appear to be a way to prevent this compiler from
28110             # explicitly linking system object files so we need to strip them
28111             # from the output so that they don't get included in the library
28112             # dependencies.
28113             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"'
28114             ;;
28115           *)
28116             if test "$GXX" = yes; then
28117               if test $with_gnu_ld = no; then
28118                 case $host_cpu in
28119                   hppa*64*)
28120                     archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28121                     ;;
28122                   ia64*)
28123                     archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28124                     ;;
28125                   *)
28126                     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'
28127                     ;;
28128                 esac
28129               fi
28130             else
28131               # FIXME: insert proper C++ library support
28132               ld_shlibs_CXX=no
28133             fi
28134             ;;
28135         esac
28136         ;;
28137
28138       interix[3-9]*)
28139         hardcode_direct_CXX=no
28140         hardcode_shlibpath_var_CXX=no
28141         hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28142         export_dynamic_flag_spec_CXX='${wl}-E'
28143         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
28144         # Instead, shared libraries are loaded at an image base (0x10000000 by
28145         # default) and relocated if they conflict, which is a slow very memory
28146         # consuming and fragmenting process.  To avoid this, we pick a random,
28147         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
28148         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
28149         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'
28150         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'
28151         ;;
28152       irix5* | irix6*)
28153         case $cc_basename in
28154           CC*)
28155             # SGI C++
28156             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'
28157
28158             # Archives containing C++ object files must be created using
28159             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
28160             # necessary to make sure instantiated templates are included
28161             # in the archive.
28162             old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
28163             ;;
28164           *)
28165             if test "$GXX" = yes; then
28166               if test "$with_gnu_ld" = no; then
28167                 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'
28168               else
28169                 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'
28170               fi
28171             fi
28172             link_all_deplibs_CXX=yes
28173             ;;
28174         esac
28175         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
28176         hardcode_libdir_separator_CXX=:
28177         inherit_rpath_CXX=yes
28178         ;;
28179
28180       linux* | k*bsd*-gnu | kopensolaris*-gnu)
28181         case $cc_basename in
28182           KCC*)
28183             # Kuck and Associates, Inc. (KAI) C++ Compiler
28184
28185             # KCC will only create a shared library if the output file
28186             # ends with ".so" (or ".sl" for HP-UX), so rename the library
28187             # to its proper name (with version) after linking.
28188             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'
28189             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'
28190             # Commands to make compiler produce verbose output that lists
28191             # what "hidden" libraries, object files and flags are used when
28192             # linking a shared library.
28193             #
28194             # There doesn't appear to be a way to prevent this compiler from
28195             # explicitly linking system object files so we need to strip them
28196             # from the output so that they don't get included in the library
28197             # dependencies.
28198             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"'
28199
28200             hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28201             export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
28202
28203             # Archives containing C++ object files must be created using
28204             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
28205             old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
28206             ;;
28207           icpc* | ecpc* )
28208             # Intel C++
28209             with_gnu_ld=yes
28210             # version 8.0 and above of icpc choke on multiply defined symbols
28211             # if we add $predep_objects and $postdep_objects, however 7.1 and
28212             # earlier do not add the objects themselves.
28213             case `$CC -V 2>&1` in
28214               *"Version 7."*)
28215                 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
28216                 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'
28217                 ;;
28218               *)  # Version 8.0 or newer
28219                 tmp_idyn=
28220                 case $host_cpu in
28221                   ia64*) tmp_idyn=' -i_dynamic';;
28222                 esac
28223                 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28224                 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'
28225                 ;;
28226             esac
28227             archive_cmds_need_lc_CXX=no
28228             hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28229             export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
28230             whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
28231             ;;
28232           pgCC* | pgcpp*)
28233             # Portland Group C++ compiler
28234             case `$CC -V` in
28235             *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
28236               prelink_cmds_CXX='tpldir=Template.dir~
28237                 rm -rf $tpldir~
28238                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
28239                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
28240               old_archive_cmds_CXX='tpldir=Template.dir~
28241                 rm -rf $tpldir~
28242                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
28243                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
28244                 $RANLIB $oldlib'
28245               archive_cmds_CXX='tpldir=Template.dir~
28246                 rm -rf $tpldir~
28247                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
28248                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
28249               archive_expsym_cmds_CXX='tpldir=Template.dir~
28250                 rm -rf $tpldir~
28251                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
28252                 $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'
28253               ;;
28254             *) # Version 6 and above use weak symbols
28255               archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
28256               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'
28257               ;;
28258             esac
28259
28260             hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
28261             export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
28262             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'
28263             ;;
28264           cxx*)
28265             # Compaq C++
28266             archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
28267             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'
28268
28269             runpath_var=LD_RUN_PATH
28270             hardcode_libdir_flag_spec_CXX='-rpath $libdir'
28271             hardcode_libdir_separator_CXX=:
28272
28273             # Commands to make compiler produce verbose output that lists
28274             # what "hidden" libraries, object files and flags are used when
28275             # linking a shared library.
28276             #
28277             # There doesn't appear to be a way to prevent this compiler from
28278             # explicitly linking system object files so we need to strip them
28279             # from the output so that they don't get included in the library
28280             # dependencies.
28281             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'
28282             ;;
28283           xl* | mpixl* | bgxl*)
28284             # IBM XL 8.0 on PPC, with GNU ld
28285             hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
28286             export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
28287             archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28288             if test "x$supports_anon_versioning" = xyes; then
28289               archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
28290                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
28291                 echo "local: *; };" >> $output_objdir/$libname.ver~
28292                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
28293             fi
28294             ;;
28295           *)
28296             case `$CC -V 2>&1 | sed 5q` in
28297             *Sun\ C*)
28298               # Sun C++ 5.9
28299               no_undefined_flag_CXX=' -zdefs'
28300               archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28301               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'
28302               hardcode_libdir_flag_spec_CXX='-R$libdir'
28303               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'
28304               compiler_needs_object_CXX=yes
28305
28306               # Not sure whether something based on
28307               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
28308               # would be better.
28309               output_verbose_link_cmd='func_echo_all'
28310
28311               # Archives containing C++ object files must be created using
28312               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
28313               # necessary to make sure instantiated templates are included
28314               # in the archive.
28315               old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
28316               ;;
28317             esac
28318             ;;
28319         esac
28320         ;;
28321
28322       lynxos*)
28323         # FIXME: insert proper C++ library support
28324         ld_shlibs_CXX=no
28325         ;;
28326
28327       m88k*)
28328         # FIXME: insert proper C++ library support
28329         ld_shlibs_CXX=no
28330         ;;
28331
28332       mvs*)
28333         case $cc_basename in
28334           cxx*)
28335             # FIXME: insert proper C++ library support
28336             ld_shlibs_CXX=no
28337             ;;
28338           *)
28339             # FIXME: insert proper C++ library support
28340             ld_shlibs_CXX=no
28341             ;;
28342         esac
28343         ;;
28344
28345       netbsd*)
28346         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
28347           archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
28348           wlarc=
28349           hardcode_libdir_flag_spec_CXX='-R$libdir'
28350           hardcode_direct_CXX=yes
28351           hardcode_shlibpath_var_CXX=no
28352         fi
28353         # Workaround some broken pre-1.5 toolchains
28354         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
28355         ;;
28356
28357       *nto* | *qnx*)
28358         ld_shlibs_CXX=yes
28359         ;;
28360
28361       openbsd2*)
28362         # C++ shared libraries are fairly broken
28363         ld_shlibs_CXX=no
28364         ;;
28365
28366       openbsd*)
28367         if test -f /usr/libexec/ld.so; then
28368           hardcode_direct_CXX=yes
28369           hardcode_shlibpath_var_CXX=no
28370           hardcode_direct_absolute_CXX=yes
28371           archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
28372           hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28373           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
28374             archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
28375             export_dynamic_flag_spec_CXX='${wl}-E'
28376             whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
28377           fi
28378           output_verbose_link_cmd=func_echo_all
28379         else
28380           ld_shlibs_CXX=no
28381         fi
28382         ;;
28383
28384       osf3* | osf4* | osf5*)
28385         case $cc_basename in
28386           KCC*)
28387             # Kuck and Associates, Inc. (KAI) C++ Compiler
28388
28389             # KCC will only create a shared library if the output file
28390             # ends with ".so" (or ".sl" for HP-UX), so rename the library
28391             # to its proper name (with version) after linking.
28392             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'
28393
28394             hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28395             hardcode_libdir_separator_CXX=:
28396
28397             # Archives containing C++ object files must be created using
28398             # the KAI C++ compiler.
28399             case $host in
28400               osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
28401               *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
28402             esac
28403             ;;
28404           RCC*)
28405             # Rational C++ 2.4.1
28406             # FIXME: insert proper C++ library support
28407             ld_shlibs_CXX=no
28408             ;;
28409           cxx*)
28410             case $host in
28411               osf3*)
28412                 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
28413                 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'
28414                 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
28415                 ;;
28416               *)
28417                 allow_undefined_flag_CXX=' -expect_unresolved \*'
28418                 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'
28419                 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
28420                   echo "-hidden">> $lib.exp~
28421                   $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~
28422                   $RM $lib.exp'
28423                 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
28424                 ;;
28425             esac
28426
28427             hardcode_libdir_separator_CXX=:
28428
28429             # Commands to make compiler produce verbose output that lists
28430             # what "hidden" libraries, object files and flags are used when
28431             # linking a shared library.
28432             #
28433             # There doesn't appear to be a way to prevent this compiler from
28434             # explicitly linking system object files so we need to strip them
28435             # from the output so that they don't get included in the library
28436             # dependencies.
28437             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"'
28438             ;;
28439           *)
28440             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
28441               allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
28442               case $host in
28443                 osf3*)
28444                   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'
28445                   ;;
28446                 *)
28447                   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'
28448                   ;;
28449               esac
28450
28451               hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
28452               hardcode_libdir_separator_CXX=:
28453
28454               # Commands to make compiler produce verbose output that lists
28455               # what "hidden" libraries, object files and flags are used when
28456               # linking a shared library.
28457               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
28458
28459             else
28460               # FIXME: insert proper C++ library support
28461               ld_shlibs_CXX=no
28462             fi
28463             ;;
28464         esac
28465         ;;
28466
28467       psos*)
28468         # FIXME: insert proper C++ library support
28469         ld_shlibs_CXX=no
28470         ;;
28471
28472       sunos4*)
28473         case $cc_basename in
28474           CC*)
28475             # Sun C++ 4.x
28476             # FIXME: insert proper C++ library support
28477             ld_shlibs_CXX=no
28478             ;;
28479           lcc*)
28480             # Lucid
28481             # FIXME: insert proper C++ library support
28482             ld_shlibs_CXX=no
28483             ;;
28484           *)
28485             # FIXME: insert proper C++ library support
28486             ld_shlibs_CXX=no
28487             ;;
28488         esac
28489         ;;
28490
28491       solaris*)
28492         case $cc_basename in
28493           CC* | sunCC*)
28494             # Sun C++ 4.2, 5.x and Centerline C++
28495             archive_cmds_need_lc_CXX=yes
28496             no_undefined_flag_CXX=' -zdefs'
28497             archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28498             archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
28499               $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'
28500
28501             hardcode_libdir_flag_spec_CXX='-R$libdir'
28502             hardcode_shlibpath_var_CXX=no
28503             case $host_os in
28504               solaris2.[0-5] | solaris2.[0-5].*) ;;
28505               *)
28506                 # The compiler driver will combine and reorder linker options,
28507                 # but understands `-z linker_flag'.
28508                 # Supported since Solaris 2.6 (maybe 2.5.1?)
28509                 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
28510                 ;;
28511             esac
28512             link_all_deplibs_CXX=yes
28513
28514             output_verbose_link_cmd='func_echo_all'
28515
28516             # Archives containing C++ object files must be created using
28517             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
28518             # necessary to make sure instantiated templates are included
28519             # in the archive.
28520             old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
28521             ;;
28522           gcx*)
28523             # Green Hills C++ Compiler
28524             archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
28525
28526             # The C++ compiler must be used to create the archive.
28527             old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
28528             ;;
28529           *)
28530             # GNU C++ compiler with Solaris linker
28531             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
28532               no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
28533               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
28534                 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
28535                 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
28536                   $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
28537
28538                 # Commands to make compiler produce verbose output that lists
28539                 # what "hidden" libraries, object files and flags are used when
28540                 # linking a shared library.
28541                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
28542               else
28543                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
28544                 # platform.
28545                 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
28546                 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
28547                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
28548
28549                 # Commands to make compiler produce verbose output that lists
28550                 # what "hidden" libraries, object files and flags are used when
28551                 # linking a shared library.
28552                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
28553               fi
28554
28555               hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
28556               case $host_os in
28557                 solaris2.[0-5] | solaris2.[0-5].*) ;;
28558                 *)
28559                   whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
28560                   ;;
28561               esac
28562             fi
28563             ;;
28564         esac
28565         ;;
28566
28567     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
28568       no_undefined_flag_CXX='${wl}-z,text'
28569       archive_cmds_need_lc_CXX=no
28570       hardcode_shlibpath_var_CXX=no
28571       runpath_var='LD_RUN_PATH'
28572
28573       case $cc_basename in
28574         CC*)
28575           archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28576           archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28577           ;;
28578         *)
28579           archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28580           archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28581           ;;
28582       esac
28583       ;;
28584
28585       sysv5* | sco3.2v5* | sco5v6*)
28586         # Note: We can NOT use -z defs as we might desire, because we do not
28587         # link with -lc, and that would cause any symbols used from libc to
28588         # always be unresolved, which means just about no library would
28589         # ever link correctly.  If we're not using GNU ld we use -z text
28590         # though, which does catch some bad symbols but isn't as heavy-handed
28591         # as -z defs.
28592         no_undefined_flag_CXX='${wl}-z,text'
28593         allow_undefined_flag_CXX='${wl}-z,nodefs'
28594         archive_cmds_need_lc_CXX=no
28595         hardcode_shlibpath_var_CXX=no
28596         hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
28597         hardcode_libdir_separator_CXX=':'
28598         link_all_deplibs_CXX=yes
28599         export_dynamic_flag_spec_CXX='${wl}-Bexport'
28600         runpath_var='LD_RUN_PATH'
28601
28602         case $cc_basename in
28603           CC*)
28604             archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28605             archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28606             old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
28607               '"$old_archive_cmds_CXX"
28608             reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
28609               '"$reload_cmds_CXX"
28610             ;;
28611           *)
28612             archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28613             archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28614             ;;
28615         esac
28616       ;;
28617
28618       tandem*)
28619         case $cc_basename in
28620           NCC*)
28621             # NonStop-UX NCC 3.20
28622             # FIXME: insert proper C++ library support
28623             ld_shlibs_CXX=no
28624             ;;
28625           *)
28626             # FIXME: insert proper C++ library support
28627             ld_shlibs_CXX=no
28628             ;;
28629         esac
28630         ;;
28631
28632       vxworks*)
28633         # FIXME: insert proper C++ library support
28634         ld_shlibs_CXX=no
28635         ;;
28636
28637       *)
28638         # FIXME: insert proper C++ library support
28639         ld_shlibs_CXX=no
28640         ;;
28641     esac
28642
28643     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
28644 $as_echo "$ld_shlibs_CXX" >&6; }
28645     test "$ld_shlibs_CXX" = no && can_build_shared=no
28646
28647     GCC_CXX="$GXX"
28648     LD_CXX="$LD"
28649
28650     ## CAVEAT EMPTOR:
28651     ## There is no encapsulation within the following macros, do not change
28652     ## the running order or otherwise move them around unless you know exactly
28653     ## what you are doing...
28654     # Dependencies to place before and after the object being linked:
28655 predep_objects_CXX=
28656 postdep_objects_CXX=
28657 predeps_CXX=
28658 postdeps_CXX=
28659 compiler_lib_search_path_CXX=
28660
28661 cat > conftest.$ac_ext <<_LT_EOF
28662 class Foo
28663 {
28664 public:
28665   Foo (void) { a = 0; }
28666 private:
28667   int a;
28668 };
28669 _LT_EOF
28670
28671
28672 _lt_libdeps_save_CFLAGS=$CFLAGS
28673 case "$CC $CFLAGS " in #(
28674 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
28675 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
28676 esac
28677
28678 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
28679   (eval $ac_compile) 2>&5
28680   ac_status=$?
28681   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28682   test $ac_status = 0; }; then
28683   # Parse the compiler output and extract the necessary
28684   # objects, libraries and library flags.
28685
28686   # Sentinel used to keep track of whether or not we are before
28687   # the conftest object file.
28688   pre_test_object_deps_done=no
28689
28690   for p in `eval "$output_verbose_link_cmd"`; do
28691     case ${prev}${p} in
28692
28693     -L* | -R* | -l*)
28694        # Some compilers place space between "-{L,R}" and the path.
28695        # Remove the space.
28696        if test $p = "-L" ||
28697           test $p = "-R"; then
28698          prev=$p
28699          continue
28700        fi
28701
28702        # Expand the sysroot to ease extracting the directories later.
28703        if test -z "$prev"; then
28704          case $p in
28705          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
28706          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
28707          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
28708          esac
28709        fi
28710        case $p in
28711        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
28712        esac
28713        if test "$pre_test_object_deps_done" = no; then
28714          case ${prev} in
28715          -L | -R)
28716            # Internal compiler library paths should come after those
28717            # provided the user.  The postdeps already come after the
28718            # user supplied libs so there is no need to process them.
28719            if test -z "$compiler_lib_search_path_CXX"; then
28720              compiler_lib_search_path_CXX="${prev}${p}"
28721            else
28722              compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
28723            fi
28724            ;;
28725          # The "-l" case would never come before the object being
28726          # linked, so don't bother handling this case.
28727          esac
28728        else
28729          if test -z "$postdeps_CXX"; then
28730            postdeps_CXX="${prev}${p}"
28731          else
28732            postdeps_CXX="${postdeps_CXX} ${prev}${p}"
28733          fi
28734        fi
28735        prev=
28736        ;;
28737
28738     *.lto.$objext) ;; # Ignore GCC LTO objects
28739     *.$objext)
28740        # This assumes that the test object file only shows up
28741        # once in the compiler output.
28742        if test "$p" = "conftest.$objext"; then
28743          pre_test_object_deps_done=yes
28744          continue
28745        fi
28746
28747        if test "$pre_test_object_deps_done" = no; then
28748          if test -z "$predep_objects_CXX"; then
28749            predep_objects_CXX="$p"
28750          else
28751            predep_objects_CXX="$predep_objects_CXX $p"
28752          fi
28753        else
28754          if test -z "$postdep_objects_CXX"; then
28755            postdep_objects_CXX="$p"
28756          else
28757            postdep_objects_CXX="$postdep_objects_CXX $p"
28758          fi
28759        fi
28760        ;;
28761
28762     *) ;; # Ignore the rest.
28763
28764     esac
28765   done
28766
28767   # Clean up.
28768   rm -f a.out a.exe
28769 else
28770   echo "libtool.m4: error: problem compiling CXX test program"
28771 fi
28772
28773 $RM -f confest.$objext
28774 CFLAGS=$_lt_libdeps_save_CFLAGS
28775
28776 # PORTME: override above test on systems where it is broken
28777 case $host_os in
28778 interix[3-9]*)
28779   # Interix 3.5 installs completely hosed .la files for C++, so rather than
28780   # hack all around it, let's just trust "g++" to DTRT.
28781   predep_objects_CXX=
28782   postdep_objects_CXX=
28783   postdeps_CXX=
28784   ;;
28785
28786 linux*)
28787   case `$CC -V 2>&1 | sed 5q` in
28788   *Sun\ C*)
28789     # Sun C++ 5.9
28790
28791     # The more standards-conforming stlport4 library is
28792     # incompatible with the Cstd library. Avoid specifying
28793     # it if it's in CXXFLAGS. Ignore libCrun as
28794     # -library=stlport4 depends on it.
28795     case " $CXX $CXXFLAGS " in
28796     *" -library=stlport4 "*)
28797       solaris_use_stlport4=yes
28798       ;;
28799     esac
28800
28801     if test "$solaris_use_stlport4" != yes; then
28802       postdeps_CXX='-library=Cstd -library=Crun'
28803     fi
28804     ;;
28805   esac
28806   ;;
28807
28808 solaris*)
28809   case $cc_basename in
28810   CC* | sunCC*)
28811     # The more standards-conforming stlport4 library is
28812     # incompatible with the Cstd library. Avoid specifying
28813     # it if it's in CXXFLAGS. Ignore libCrun as
28814     # -library=stlport4 depends on it.
28815     case " $CXX $CXXFLAGS " in
28816     *" -library=stlport4 "*)
28817       solaris_use_stlport4=yes
28818       ;;
28819     esac
28820
28821     # Adding this requires a known-good setup of shared libraries for
28822     # Sun compiler versions before 5.6, else PIC objects from an old
28823     # archive will be linked into the output, leading to subtle bugs.
28824     if test "$solaris_use_stlport4" != yes; then
28825       postdeps_CXX='-library=Cstd -library=Crun'
28826     fi
28827     ;;
28828   esac
28829   ;;
28830 esac
28831
28832
28833 case " $postdeps_CXX " in
28834 *" -lc "*) archive_cmds_need_lc_CXX=no ;;
28835 esac
28836  compiler_lib_search_dirs_CXX=
28837 if test -n "${compiler_lib_search_path_CXX}"; then
28838  compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
28839 fi
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871     lt_prog_compiler_wl_CXX=
28872 lt_prog_compiler_pic_CXX=
28873 lt_prog_compiler_static_CXX=
28874
28875
28876   # C++ specific cases for pic, static, wl, etc.
28877   if test "$GXX" = yes; then
28878     lt_prog_compiler_wl_CXX='-Wl,'
28879     lt_prog_compiler_static_CXX='-static'
28880
28881     case $host_os in
28882     aix*)
28883       # All AIX code is PIC.
28884       if test "$host_cpu" = ia64; then
28885         # AIX 5 now supports IA64 processor
28886         lt_prog_compiler_static_CXX='-Bstatic'
28887       fi
28888       ;;
28889
28890     amigaos*)
28891       case $host_cpu in
28892       powerpc)
28893             # see comment about AmigaOS4 .so support
28894             lt_prog_compiler_pic_CXX='-fPIC'
28895         ;;
28896       m68k)
28897             # FIXME: we need at least 68020 code to build shared libraries, but
28898             # adding the `-m68020' flag to GCC prevents building anything better,
28899             # like `-m68040'.
28900             lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
28901         ;;
28902       esac
28903       ;;
28904
28905     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
28906       # PIC is the default for these OSes.
28907       ;;
28908     mingw* | cygwin* | os2* | pw32* | cegcc*)
28909       # This hack is so that the source file can tell whether it is being
28910       # built for inclusion in a dll (and should export symbols for example).
28911       # Although the cygwin gcc ignores -fPIC, still need this for old-style
28912       # (--disable-auto-import) libraries
28913       lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
28914       ;;
28915     darwin* | rhapsody*)
28916       # PIC is the default on this platform
28917       # Common symbols not allowed in MH_DYLIB files
28918       lt_prog_compiler_pic_CXX='-fno-common'
28919       ;;
28920     *djgpp*)
28921       # DJGPP does not support shared libraries at all
28922       lt_prog_compiler_pic_CXX=
28923       ;;
28924     haiku*)
28925       # PIC is the default for Haiku.
28926       # The "-static" flag exists, but is broken.
28927       lt_prog_compiler_static_CXX=
28928       ;;
28929     interix[3-9]*)
28930       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
28931       # Instead, we relocate shared libraries at runtime.
28932       ;;
28933     sysv4*MP*)
28934       if test -d /usr/nec; then
28935         lt_prog_compiler_pic_CXX=-Kconform_pic
28936       fi
28937       ;;
28938     hpux*)
28939       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
28940       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
28941       # sets the default TLS model and affects inlining.
28942       case $host_cpu in
28943       hppa*64*)
28944         ;;
28945       *)
28946         lt_prog_compiler_pic_CXX='-fPIC'
28947         ;;
28948       esac
28949       ;;
28950     *qnx* | *nto*)
28951       # QNX uses GNU C++, but need to define -shared option too, otherwise
28952       # it will coredump.
28953       lt_prog_compiler_pic_CXX='-fPIC -shared'
28954       ;;
28955     *)
28956       lt_prog_compiler_pic_CXX='-fPIC'
28957       ;;
28958     esac
28959   else
28960     case $host_os in
28961       aix[4-9]*)
28962         # All AIX code is PIC.
28963         if test "$host_cpu" = ia64; then
28964           # AIX 5 now supports IA64 processor
28965           lt_prog_compiler_static_CXX='-Bstatic'
28966         else
28967           lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
28968         fi
28969         ;;
28970       chorus*)
28971         case $cc_basename in
28972         cxch68*)
28973           # Green Hills C++ Compiler
28974           # _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"
28975           ;;
28976         esac
28977         ;;
28978       mingw* | cygwin* | os2* | pw32* | cegcc*)
28979         # This hack is so that the source file can tell whether it is being
28980         # built for inclusion in a dll (and should export symbols for example).
28981         lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
28982         ;;
28983       dgux*)
28984         case $cc_basename in
28985           ec++*)
28986             lt_prog_compiler_pic_CXX='-KPIC'
28987             ;;
28988           ghcx*)
28989             # Green Hills C++ Compiler
28990             lt_prog_compiler_pic_CXX='-pic'
28991             ;;
28992           *)
28993             ;;
28994         esac
28995         ;;
28996       freebsd* | dragonfly*)
28997         # FreeBSD uses GNU C++
28998         ;;
28999       hpux9* | hpux10* | hpux11*)
29000         case $cc_basename in
29001           CC*)
29002             lt_prog_compiler_wl_CXX='-Wl,'
29003             lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
29004             if test "$host_cpu" != ia64; then
29005               lt_prog_compiler_pic_CXX='+Z'
29006             fi
29007             ;;
29008           aCC*)
29009             lt_prog_compiler_wl_CXX='-Wl,'
29010             lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
29011             case $host_cpu in
29012             hppa*64*|ia64*)
29013               # +Z the default
29014               ;;
29015             *)
29016               lt_prog_compiler_pic_CXX='+Z'
29017               ;;
29018             esac
29019             ;;
29020           *)
29021             ;;
29022         esac
29023         ;;
29024       interix*)
29025         # This is c89, which is MS Visual C++ (no shared libs)
29026         # Anyone wants to do a port?
29027         ;;
29028       irix5* | irix6* | nonstopux*)
29029         case $cc_basename in
29030           CC*)
29031             lt_prog_compiler_wl_CXX='-Wl,'
29032             lt_prog_compiler_static_CXX='-non_shared'
29033             # CC pic flag -KPIC is the default.
29034             ;;
29035           *)
29036             ;;
29037         esac
29038         ;;
29039       linux* | k*bsd*-gnu | kopensolaris*-gnu)
29040         case $cc_basename in
29041           KCC*)
29042             # KAI C++ Compiler
29043             lt_prog_compiler_wl_CXX='--backend -Wl,'
29044             lt_prog_compiler_pic_CXX='-fPIC'
29045             ;;
29046           ecpc* )
29047             # old Intel C++ for x86_64 which still supported -KPIC.
29048             lt_prog_compiler_wl_CXX='-Wl,'
29049             lt_prog_compiler_pic_CXX='-KPIC'
29050             lt_prog_compiler_static_CXX='-static'
29051             ;;
29052           icpc* )
29053             # Intel C++, used to be incompatible with GCC.
29054             # ICC 10 doesn't accept -KPIC any more.
29055             lt_prog_compiler_wl_CXX='-Wl,'
29056             lt_prog_compiler_pic_CXX='-fPIC'
29057             lt_prog_compiler_static_CXX='-static'
29058             ;;
29059           pgCC* | pgcpp*)
29060             # Portland Group C++ compiler
29061             lt_prog_compiler_wl_CXX='-Wl,'
29062             lt_prog_compiler_pic_CXX='-fpic'
29063             lt_prog_compiler_static_CXX='-Bstatic'
29064             ;;
29065           cxx*)
29066             # Compaq C++
29067             # Make sure the PIC flag is empty.  It appears that all Alpha
29068             # Linux and Compaq Tru64 Unix objects are PIC.
29069             lt_prog_compiler_pic_CXX=
29070             lt_prog_compiler_static_CXX='-non_shared'
29071             ;;
29072           xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
29073             # IBM XL 8.0, 9.0 on PPC and BlueGene
29074             lt_prog_compiler_wl_CXX='-Wl,'
29075             lt_prog_compiler_pic_CXX='-qpic'
29076             lt_prog_compiler_static_CXX='-qstaticlink'
29077             ;;
29078           *)
29079             case `$CC -V 2>&1 | sed 5q` in
29080             *Sun\ C*)
29081               # Sun C++ 5.9
29082               lt_prog_compiler_pic_CXX='-KPIC'
29083               lt_prog_compiler_static_CXX='-Bstatic'
29084               lt_prog_compiler_wl_CXX='-Qoption ld '
29085               ;;
29086             esac
29087             ;;
29088         esac
29089         ;;
29090       lynxos*)
29091         ;;
29092       m88k*)
29093         ;;
29094       mvs*)
29095         case $cc_basename in
29096           cxx*)
29097             lt_prog_compiler_pic_CXX='-W c,exportall'
29098             ;;
29099           *)
29100             ;;
29101         esac
29102         ;;
29103       netbsd*)
29104         ;;
29105       *qnx* | *nto*)
29106         # QNX uses GNU C++, but need to define -shared option too, otherwise
29107         # it will coredump.
29108         lt_prog_compiler_pic_CXX='-fPIC -shared'
29109         ;;
29110       osf3* | osf4* | osf5*)
29111         case $cc_basename in
29112           KCC*)
29113             lt_prog_compiler_wl_CXX='--backend -Wl,'
29114             ;;
29115           RCC*)
29116             # Rational C++ 2.4.1
29117             lt_prog_compiler_pic_CXX='-pic'
29118             ;;
29119           cxx*)
29120             # Digital/Compaq C++
29121             lt_prog_compiler_wl_CXX='-Wl,'
29122             # Make sure the PIC flag is empty.  It appears that all Alpha
29123             # Linux and Compaq Tru64 Unix objects are PIC.
29124             lt_prog_compiler_pic_CXX=
29125             lt_prog_compiler_static_CXX='-non_shared'
29126             ;;
29127           *)
29128             ;;
29129         esac
29130         ;;
29131       psos*)
29132         ;;
29133       solaris*)
29134         case $cc_basename in
29135           CC* | sunCC*)
29136             # Sun C++ 4.2, 5.x and Centerline C++
29137             lt_prog_compiler_pic_CXX='-KPIC'
29138             lt_prog_compiler_static_CXX='-Bstatic'
29139             lt_prog_compiler_wl_CXX='-Qoption ld '
29140             ;;
29141           gcx*)
29142             # Green Hills C++ Compiler
29143             lt_prog_compiler_pic_CXX='-PIC'
29144             ;;
29145           *)
29146             ;;
29147         esac
29148         ;;
29149       sunos4*)
29150         case $cc_basename in
29151           CC*)
29152             # Sun C++ 4.x
29153             lt_prog_compiler_pic_CXX='-pic'
29154             lt_prog_compiler_static_CXX='-Bstatic'
29155             ;;
29156           lcc*)
29157             # Lucid
29158             lt_prog_compiler_pic_CXX='-pic'
29159             ;;
29160           *)
29161             ;;
29162         esac
29163         ;;
29164       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
29165         case $cc_basename in
29166           CC*)
29167             lt_prog_compiler_wl_CXX='-Wl,'
29168             lt_prog_compiler_pic_CXX='-KPIC'
29169             lt_prog_compiler_static_CXX='-Bstatic'
29170             ;;
29171         esac
29172         ;;
29173       tandem*)
29174         case $cc_basename in
29175           NCC*)
29176             # NonStop-UX NCC 3.20
29177             lt_prog_compiler_pic_CXX='-KPIC'
29178             ;;
29179           *)
29180             ;;
29181         esac
29182         ;;
29183       vxworks*)
29184         ;;
29185       *)
29186         lt_prog_compiler_can_build_shared_CXX=no
29187         ;;
29188     esac
29189   fi
29190
29191 case $host_os in
29192   # For platforms which do not support PIC, -DPIC is meaningless:
29193   *djgpp*)
29194     lt_prog_compiler_pic_CXX=
29195     ;;
29196   *)
29197     lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
29198     ;;
29199 esac
29200
29201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
29202 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
29203 if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
29204   $as_echo_n "(cached) " >&6
29205 else
29206   lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
29207 fi
29208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
29209 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
29210 lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
29211
29212 #
29213 # Check to make sure the PIC flag actually works.
29214 #
29215 if test -n "$lt_prog_compiler_pic_CXX"; then
29216   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
29217 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
29218 if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
29219   $as_echo_n "(cached) " >&6
29220 else
29221   lt_cv_prog_compiler_pic_works_CXX=no
29222    ac_outfile=conftest.$ac_objext
29223    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
29224    lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
29225    # Insert the option either (1) after the last *FLAGS variable, or
29226    # (2) before a word containing "conftest.", or (3) at the end.
29227    # Note that $ac_compile itself does not contain backslashes and begins
29228    # with a dollar sign (not a hyphen), so the echo should work correctly.
29229    # The option is referenced via a variable to avoid confusing sed.
29230    lt_compile=`echo "$ac_compile" | $SED \
29231    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
29232    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
29233    -e 's:$: $lt_compiler_flag:'`
29234    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
29235    (eval "$lt_compile" 2>conftest.err)
29236    ac_status=$?
29237    cat conftest.err >&5
29238    echo "$as_me:$LINENO: \$? = $ac_status" >&5
29239    if (exit $ac_status) && test -s "$ac_outfile"; then
29240      # The compiler can only warn and ignore the option if not recognized
29241      # So say no if there are warnings other than the usual output.
29242      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
29243      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
29244      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
29245        lt_cv_prog_compiler_pic_works_CXX=yes
29246      fi
29247    fi
29248    $RM conftest*
29249
29250 fi
29251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
29252 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
29253
29254 if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
29255     case $lt_prog_compiler_pic_CXX in
29256      "" | " "*) ;;
29257      *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
29258      esac
29259 else
29260     lt_prog_compiler_pic_CXX=
29261      lt_prog_compiler_can_build_shared_CXX=no
29262 fi
29263
29264 fi
29265
29266
29267
29268
29269
29270 #
29271 # Check to make sure the static flag actually works.
29272 #
29273 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
29274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
29275 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
29276 if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
29277   $as_echo_n "(cached) " >&6
29278 else
29279   lt_cv_prog_compiler_static_works_CXX=no
29280    save_LDFLAGS="$LDFLAGS"
29281    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
29282    echo "$lt_simple_link_test_code" > conftest.$ac_ext
29283    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
29284      # The linker can only warn and ignore the option if not recognized
29285      # So say no if there are warnings
29286      if test -s conftest.err; then
29287        # Append any errors to the config.log.
29288        cat conftest.err 1>&5
29289        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
29290        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
29291        if diff conftest.exp conftest.er2 >/dev/null; then
29292          lt_cv_prog_compiler_static_works_CXX=yes
29293        fi
29294      else
29295        lt_cv_prog_compiler_static_works_CXX=yes
29296      fi
29297    fi
29298    $RM -r conftest*
29299    LDFLAGS="$save_LDFLAGS"
29300
29301 fi
29302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
29303 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
29304
29305 if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
29306     :
29307 else
29308     lt_prog_compiler_static_CXX=
29309 fi
29310
29311
29312
29313
29314     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
29315 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
29316 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
29317   $as_echo_n "(cached) " >&6
29318 else
29319   lt_cv_prog_compiler_c_o_CXX=no
29320    $RM -r conftest 2>/dev/null
29321    mkdir conftest
29322    cd conftest
29323    mkdir out
29324    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
29325
29326    lt_compiler_flag="-o out/conftest2.$ac_objext"
29327    # Insert the option either (1) after the last *FLAGS variable, or
29328    # (2) before a word containing "conftest.", or (3) at the end.
29329    # Note that $ac_compile itself does not contain backslashes and begins
29330    # with a dollar sign (not a hyphen), so the echo should work correctly.
29331    lt_compile=`echo "$ac_compile" | $SED \
29332    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
29333    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
29334    -e 's:$: $lt_compiler_flag:'`
29335    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
29336    (eval "$lt_compile" 2>out/conftest.err)
29337    ac_status=$?
29338    cat out/conftest.err >&5
29339    echo "$as_me:$LINENO: \$? = $ac_status" >&5
29340    if (exit $ac_status) && test -s out/conftest2.$ac_objext
29341    then
29342      # The compiler can only warn and ignore the option if not recognized
29343      # So say no if there are warnings
29344      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
29345      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
29346      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
29347        lt_cv_prog_compiler_c_o_CXX=yes
29348      fi
29349    fi
29350    chmod u+w . 2>&5
29351    $RM conftest*
29352    # SGI C++ compiler will create directory out/ii_files/ for
29353    # template instantiation
29354    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
29355    $RM out/* && rmdir out
29356    cd ..
29357    $RM -r conftest
29358    $RM conftest*
29359
29360 fi
29361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
29362 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
29363
29364
29365
29366     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
29367 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
29368 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
29369   $as_echo_n "(cached) " >&6
29370 else
29371   lt_cv_prog_compiler_c_o_CXX=no
29372    $RM -r conftest 2>/dev/null
29373    mkdir conftest
29374    cd conftest
29375    mkdir out
29376    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
29377
29378    lt_compiler_flag="-o out/conftest2.$ac_objext"
29379    # Insert the option either (1) after the last *FLAGS variable, or
29380    # (2) before a word containing "conftest.", or (3) at the end.
29381    # Note that $ac_compile itself does not contain backslashes and begins
29382    # with a dollar sign (not a hyphen), so the echo should work correctly.
29383    lt_compile=`echo "$ac_compile" | $SED \
29384    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
29385    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
29386    -e 's:$: $lt_compiler_flag:'`
29387    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
29388    (eval "$lt_compile" 2>out/conftest.err)
29389    ac_status=$?
29390    cat out/conftest.err >&5
29391    echo "$as_me:$LINENO: \$? = $ac_status" >&5
29392    if (exit $ac_status) && test -s out/conftest2.$ac_objext
29393    then
29394      # The compiler can only warn and ignore the option if not recognized
29395      # So say no if there are warnings
29396      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
29397      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
29398      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
29399        lt_cv_prog_compiler_c_o_CXX=yes
29400      fi
29401    fi
29402    chmod u+w . 2>&5
29403    $RM conftest*
29404    # SGI C++ compiler will create directory out/ii_files/ for
29405    # template instantiation
29406    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
29407    $RM out/* && rmdir out
29408    cd ..
29409    $RM -r conftest
29410    $RM conftest*
29411
29412 fi
29413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
29414 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
29415
29416
29417
29418
29419 hard_links="nottested"
29420 if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
29421   # do not overwrite the value of need_locks provided by the user
29422   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
29423 $as_echo_n "checking if we can lock with hard links... " >&6; }
29424   hard_links=yes
29425   $RM conftest*
29426   ln conftest.a conftest.b 2>/dev/null && hard_links=no
29427   touch conftest.a
29428   ln conftest.a conftest.b 2>&5 || hard_links=no
29429   ln conftest.a conftest.b 2>/dev/null && hard_links=no
29430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
29431 $as_echo "$hard_links" >&6; }
29432   if test "$hard_links" = no; then
29433     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
29434 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
29435     need_locks=warn
29436   fi
29437 else
29438   need_locks=no
29439 fi
29440
29441
29442
29443     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
29444 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
29445
29446   export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
29447   exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
29448   case $host_os in
29449   aix[4-9]*)
29450     # If we're using GNU nm, then we don't want the "-C" option.
29451     # -C means demangle to AIX nm, but means don't demangle with GNU nm
29452     # Also, AIX nm treats weak defined symbols like other global defined
29453     # symbols, whereas GNU nm marks them as "W".
29454     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
29455       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'
29456     else
29457       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'
29458     fi
29459     ;;
29460   pw32*)
29461     export_symbols_cmds_CXX="$ltdll_cmds"
29462     ;;
29463   cygwin* | mingw* | cegcc*)
29464     case $cc_basename in
29465     cl*) ;;
29466     *)
29467       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'
29468       exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
29469       ;;
29470     esac
29471     ;;
29472   *)
29473     export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
29474     ;;
29475   esac
29476
29477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
29478 $as_echo "$ld_shlibs_CXX" >&6; }
29479 test "$ld_shlibs_CXX" = no && can_build_shared=no
29480
29481 with_gnu_ld_CXX=$with_gnu_ld
29482
29483
29484
29485
29486
29487
29488 #
29489 # Do we need to explicitly link libc?
29490 #
29491 case "x$archive_cmds_need_lc_CXX" in
29492 x|xyes)
29493   # Assume -lc should be added
29494   archive_cmds_need_lc_CXX=yes
29495
29496   if test "$enable_shared" = yes && test "$GCC" = yes; then
29497     case $archive_cmds_CXX in
29498     *'~'*)
29499       # FIXME: we may have to deal with multi-command sequences.
29500       ;;
29501     '$CC '*)
29502       # Test whether the compiler implicitly links with -lc since on some
29503       # systems, -lgcc has to come before -lc. If gcc already passes -lc
29504       # to ld, don't add -lc before -lgcc.
29505       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
29506 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
29507 if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
29508   $as_echo_n "(cached) " >&6
29509 else
29510   $RM conftest*
29511         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
29512
29513         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
29514   (eval $ac_compile) 2>&5
29515   ac_status=$?
29516   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29517   test $ac_status = 0; } 2>conftest.err; then
29518           soname=conftest
29519           lib=conftest
29520           libobjs=conftest.$ac_objext
29521           deplibs=
29522           wl=$lt_prog_compiler_wl_CXX
29523           pic_flag=$lt_prog_compiler_pic_CXX
29524           compiler_flags=-v
29525           linker_flags=-v
29526           verstring=
29527           output_objdir=.
29528           libname=conftest
29529           lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
29530           allow_undefined_flag_CXX=
29531           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
29532   (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
29533   ac_status=$?
29534   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29535   test $ac_status = 0; }
29536           then
29537             lt_cv_archive_cmds_need_lc_CXX=no
29538           else
29539             lt_cv_archive_cmds_need_lc_CXX=yes
29540           fi
29541           allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
29542         else
29543           cat conftest.err 1>&5
29544         fi
29545         $RM conftest*
29546
29547 fi
29548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
29549 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
29550       archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
29551       ;;
29552     esac
29553   fi
29554   ;;
29555 esac
29556
29557
29558
29559
29560
29561
29562
29563
29564
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     { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
29621 $as_echo_n "checking dynamic linker characteristics... " >&6; }
29622
29623 library_names_spec=
29624 libname_spec='lib$name'
29625 soname_spec=
29626 shrext_cmds=".so"
29627 postinstall_cmds=
29628 postuninstall_cmds=
29629 finish_cmds=
29630 finish_eval=
29631 shlibpath_var=
29632 shlibpath_overrides_runpath=unknown
29633 version_type=none
29634 dynamic_linker="$host_os ld.so"
29635 sys_lib_dlsearch_path_spec="/lib /usr/lib"
29636 need_lib_prefix=unknown
29637 hardcode_into_libs=no
29638
29639 # when you set need_version to no, make sure it does not cause -set_version
29640 # flags to be left without arguments
29641 need_version=unknown
29642
29643 case $host_os in
29644 aix3*)
29645   version_type=linux
29646   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
29647   shlibpath_var=LIBPATH
29648
29649   # AIX 3 has no versioning support, so we append a major version to the name.
29650   soname_spec='${libname}${release}${shared_ext}$major'
29651   ;;
29652
29653 aix[4-9]*)
29654   version_type=linux
29655   need_lib_prefix=no
29656   need_version=no
29657   hardcode_into_libs=yes
29658   if test "$host_cpu" = ia64; then
29659     # AIX 5 supports IA64
29660     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
29661     shlibpath_var=LD_LIBRARY_PATH
29662   else
29663     # With GCC up to 2.95.x, collect2 would create an import file
29664     # for dependence libraries.  The import file would start with
29665     # the line `#! .'.  This would cause the generated library to
29666     # depend on `.', always an invalid library.  This was fixed in
29667     # development snapshots of GCC prior to 3.0.
29668     case $host_os in
29669       aix4 | aix4.[01] | aix4.[01].*)
29670       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
29671            echo ' yes '
29672            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
29673         :
29674       else
29675         can_build_shared=no
29676       fi
29677       ;;
29678     esac
29679     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
29680     # soname into executable. Probably we can add versioning support to
29681     # collect2, so additional links can be useful in future.
29682     if test "$aix_use_runtimelinking" = yes; then
29683       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
29684       # instead of lib<name>.a to let people know that these are not
29685       # typical AIX shared libraries.
29686       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29687     else
29688       # We preserve .a as extension for shared libraries through AIX4.2
29689       # and later when we are not doing run time linking.
29690       library_names_spec='${libname}${release}.a $libname.a'
29691       soname_spec='${libname}${release}${shared_ext}$major'
29692     fi
29693     shlibpath_var=LIBPATH
29694   fi
29695   ;;
29696
29697 amigaos*)
29698   case $host_cpu in
29699   powerpc)
29700     # Since July 2007 AmigaOS4 officially supports .so libraries.
29701     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
29702     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29703     ;;
29704   m68k)
29705     library_names_spec='$libname.ixlibrary $libname.a'
29706     # Create ${libname}_ixlibrary.a entries in /sys/libs.
29707     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'
29708     ;;
29709   esac
29710   ;;
29711
29712 beos*)
29713   library_names_spec='${libname}${shared_ext}'
29714   dynamic_linker="$host_os ld.so"
29715   shlibpath_var=LIBRARY_PATH
29716   ;;
29717
29718 bsdi[45]*)
29719   version_type=linux
29720   need_version=no
29721   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29722   soname_spec='${libname}${release}${shared_ext}$major'
29723   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
29724   shlibpath_var=LD_LIBRARY_PATH
29725   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
29726   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
29727   # the default ld.so.conf also contains /usr/contrib/lib and
29728   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
29729   # libtool to hard-code these into programs
29730   ;;
29731
29732 cygwin* | mingw* | pw32* | cegcc*)
29733   version_type=windows
29734   shrext_cmds=".dll"
29735   need_version=no
29736   need_lib_prefix=no
29737
29738   case $GCC,$cc_basename in
29739   yes,*)
29740     # gcc
29741     library_names_spec='$libname.dll.a'
29742     # DLL is installed to $(libdir)/../bin by postinstall_cmds
29743     postinstall_cmds='base_file=`basename \${file}`~
29744       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
29745       dldir=$destdir/`dirname \$dlpath`~
29746       test -d \$dldir || mkdir -p \$dldir~
29747       $install_prog $dir/$dlname \$dldir/$dlname~
29748       chmod a+x \$dldir/$dlname~
29749       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
29750         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
29751       fi'
29752     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
29753       dlpath=$dir/\$dldll~
29754        $RM \$dlpath'
29755     shlibpath_overrides_runpath=yes
29756
29757     case $host_os in
29758     cygwin*)
29759       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
29760       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
29761
29762       ;;
29763     mingw* | cegcc*)
29764       # MinGW DLLs use traditional 'lib' prefix
29765       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
29766       ;;
29767     pw32*)
29768       # pw32 DLLs use 'pw' prefix rather than 'lib'
29769       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
29770       ;;
29771     esac
29772     dynamic_linker='Win32 ld.exe'
29773     ;;
29774
29775   *,cl*)
29776     # Native MSVC
29777     libname_spec='$name'
29778     soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
29779     library_names_spec='${libname}.dll.lib'
29780
29781     case $build_os in
29782     mingw*)
29783       sys_lib_search_path_spec=
29784       lt_save_ifs=$IFS
29785       IFS=';'
29786       for lt_path in $LIB
29787       do
29788         IFS=$lt_save_ifs
29789         # Let DOS variable expansion print the short 8.3 style file name.
29790         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
29791         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
29792       done
29793       IFS=$lt_save_ifs
29794       # Convert to MSYS style.
29795       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
29796       ;;
29797     cygwin*)
29798       # Convert to unix form, then to dos form, then back to unix form
29799       # but this time dos style (no spaces!) so that the unix form looks
29800       # like /cygdrive/c/PROGRA~1:/cygdr...
29801       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
29802       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
29803       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
29804       ;;
29805     *)
29806       sys_lib_search_path_spec="$LIB"
29807       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
29808         # It is most probably a Windows format PATH.
29809         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
29810       else
29811         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
29812       fi
29813       # FIXME: find the short name or the path components, as spaces are
29814       # common. (e.g. "Program Files" -> "PROGRA~1")
29815       ;;
29816     esac
29817
29818     # DLL is installed to $(libdir)/../bin by postinstall_cmds
29819     postinstall_cmds='base_file=`basename \${file}`~
29820       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
29821       dldir=$destdir/`dirname \$dlpath`~
29822       test -d \$dldir || mkdir -p \$dldir~
29823       $install_prog $dir/$dlname \$dldir/$dlname'
29824     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
29825       dlpath=$dir/\$dldll~
29826        $RM \$dlpath'
29827     shlibpath_overrides_runpath=yes
29828     dynamic_linker='Win32 link.exe'
29829     ;;
29830
29831   *)
29832     # Assume MSVC wrapper
29833     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
29834     dynamic_linker='Win32 ld.exe'
29835     ;;
29836   esac
29837   # FIXME: first we should search . and the directory the executable is in
29838   shlibpath_var=PATH
29839   ;;
29840
29841 darwin* | rhapsody*)
29842   dynamic_linker="$host_os dyld"
29843   version_type=darwin
29844   need_lib_prefix=no
29845   need_version=no
29846   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
29847   soname_spec='${libname}${release}${major}$shared_ext'
29848   shlibpath_overrides_runpath=yes
29849   shlibpath_var=DYLD_LIBRARY_PATH
29850   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
29851
29852   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
29853   ;;
29854
29855 dgux*)
29856   version_type=linux
29857   need_lib_prefix=no
29858   need_version=no
29859   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
29860   soname_spec='${libname}${release}${shared_ext}$major'
29861   shlibpath_var=LD_LIBRARY_PATH
29862   ;;
29863
29864 freebsd1*)
29865   dynamic_linker=no
29866   ;;
29867
29868 freebsd* | dragonfly*)
29869   # DragonFly does not have aout.  When/if they implement a new
29870   # versioning mechanism, adjust this.
29871   if test -x /usr/bin/objformat; then
29872     objformat=`/usr/bin/objformat`
29873   else
29874     case $host_os in
29875     freebsd[123]*) objformat=aout ;;
29876     *) objformat=elf ;;
29877     esac
29878   fi
29879   version_type=freebsd-$objformat
29880   case $version_type in
29881     freebsd-elf*)
29882       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
29883       need_version=no
29884       need_lib_prefix=no
29885       ;;
29886     freebsd-*)
29887       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
29888       need_version=yes
29889       ;;
29890   esac
29891   shlibpath_var=LD_LIBRARY_PATH
29892   case $host_os in
29893   freebsd2*)
29894     shlibpath_overrides_runpath=yes
29895     ;;
29896   freebsd3.[01]* | freebsdelf3.[01]*)
29897     shlibpath_overrides_runpath=yes
29898     hardcode_into_libs=yes
29899     ;;
29900   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
29901   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
29902     shlibpath_overrides_runpath=no
29903     hardcode_into_libs=yes
29904     ;;
29905   *) # from 4.6 on, and DragonFly
29906     shlibpath_overrides_runpath=yes
29907     hardcode_into_libs=yes
29908     ;;
29909   esac
29910   ;;
29911
29912 gnu*)
29913   version_type=linux
29914   need_lib_prefix=no
29915   need_version=no
29916   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
29917   soname_spec='${libname}${release}${shared_ext}$major'
29918   shlibpath_var=LD_LIBRARY_PATH
29919   hardcode_into_libs=yes
29920   ;;
29921
29922 haiku*)
29923   version_type=linux
29924   need_lib_prefix=no
29925   need_version=no
29926   dynamic_linker="$host_os runtime_loader"
29927   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
29928   soname_spec='${libname}${release}${shared_ext}$major'
29929   shlibpath_var=LIBRARY_PATH
29930   shlibpath_overrides_runpath=yes
29931   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
29932   hardcode_into_libs=yes
29933   ;;
29934
29935 hpux9* | hpux10* | hpux11*)
29936   # Give a soname corresponding to the major version so that dld.sl refuses to
29937   # link against other versions.
29938   version_type=sunos
29939   need_lib_prefix=no
29940   need_version=no
29941   case $host_cpu in
29942   ia64*)
29943     shrext_cmds='.so'
29944     hardcode_into_libs=yes
29945     dynamic_linker="$host_os dld.so"
29946     shlibpath_var=LD_LIBRARY_PATH
29947     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
29948     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29949     soname_spec='${libname}${release}${shared_ext}$major'
29950     if test "X$HPUX_IA64_MODE" = X32; then
29951       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
29952     else
29953       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
29954     fi
29955     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
29956     ;;
29957   hppa*64*)
29958     shrext_cmds='.sl'
29959     hardcode_into_libs=yes
29960     dynamic_linker="$host_os dld.sl"
29961     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
29962     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
29963     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29964     soname_spec='${libname}${release}${shared_ext}$major'
29965     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
29966     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
29967     ;;
29968   *)
29969     shrext_cmds='.sl'
29970     dynamic_linker="$host_os dld.sl"
29971     shlibpath_var=SHLIB_PATH
29972     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
29973     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29974     soname_spec='${libname}${release}${shared_ext}$major'
29975     ;;
29976   esac
29977   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
29978   postinstall_cmds='chmod 555 $lib'
29979   # or fails outright, so override atomically:
29980   install_override_mode=555
29981   ;;
29982
29983 interix[3-9]*)
29984   version_type=linux
29985   need_lib_prefix=no
29986   need_version=no
29987   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
29988   soname_spec='${libname}${release}${shared_ext}$major'
29989   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
29990   shlibpath_var=LD_LIBRARY_PATH
29991   shlibpath_overrides_runpath=no
29992   hardcode_into_libs=yes
29993   ;;
29994
29995 irix5* | irix6* | nonstopux*)
29996   case $host_os in
29997     nonstopux*) version_type=nonstopux ;;
29998     *)
29999         if test "$lt_cv_prog_gnu_ld" = yes; then
30000                 version_type=linux
30001         else
30002                 version_type=irix
30003         fi ;;
30004   esac
30005   need_lib_prefix=no
30006   need_version=no
30007   soname_spec='${libname}${release}${shared_ext}$major'
30008   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
30009   case $host_os in
30010   irix5* | nonstopux*)
30011     libsuff= shlibsuff=
30012     ;;
30013   *)
30014     case $LD in # libtool.m4 will add one of these switches to LD
30015     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
30016       libsuff= shlibsuff= libmagic=32-bit;;
30017     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
30018       libsuff=32 shlibsuff=N32 libmagic=N32;;
30019     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
30020       libsuff=64 shlibsuff=64 libmagic=64-bit;;
30021     *) libsuff= shlibsuff= libmagic=never-match;;
30022     esac
30023     ;;
30024   esac
30025   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
30026   shlibpath_overrides_runpath=no
30027   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
30028   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
30029   hardcode_into_libs=yes
30030   ;;
30031
30032 # No shared lib support for Linux oldld, aout, or coff.
30033 linux*oldld* | linux*aout* | linux*coff*)
30034   dynamic_linker=no
30035   ;;
30036
30037 # This must be Linux ELF.
30038 linux* | k*bsd*-gnu | kopensolaris*-gnu)
30039   version_type=linux
30040   need_lib_prefix=no
30041   need_version=no
30042   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30043   soname_spec='${libname}${release}${shared_ext}$major'
30044   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
30045   shlibpath_var=LD_LIBRARY_PATH
30046   shlibpath_overrides_runpath=no
30047
30048   # Some binutils ld are patched to set DT_RUNPATH
30049   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
30050   $as_echo_n "(cached) " >&6
30051 else
30052   lt_cv_shlibpath_overrides_runpath=no
30053     save_LDFLAGS=$LDFLAGS
30054     save_libdir=$libdir
30055     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
30056          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
30057     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30058 /* end confdefs.h.  */
30059
30060 int
30061 main ()
30062 {
30063
30064   ;
30065   return 0;
30066 }
30067 _ACEOF
30068 if ac_fn_cxx_try_link "$LINENO"; then :
30069   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
30070   lt_cv_shlibpath_overrides_runpath=yes
30071 fi
30072 fi
30073 rm -f core conftest.err conftest.$ac_objext \
30074     conftest$ac_exeext conftest.$ac_ext
30075     LDFLAGS=$save_LDFLAGS
30076     libdir=$save_libdir
30077
30078 fi
30079
30080   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
30081
30082   # This implies no fast_install, which is unacceptable.
30083   # Some rework will be needed to allow for fast_install
30084   # before this can be enabled.
30085   hardcode_into_libs=yes
30086
30087   # Append ld.so.conf contents to the search path
30088   if test -f /etc/ld.so.conf; then
30089     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' ' '`
30090     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
30091   fi
30092
30093   # We used to test for /lib/ld.so.1 and disable shared libraries on
30094   # powerpc, because MkLinux only supported shared libraries with the
30095   # GNU dynamic linker.  Since this was broken with cross compilers,
30096   # most powerpc-linux boxes support dynamic linking these days and
30097   # people can always --disable-shared, the test was removed, and we
30098   # assume the GNU/Linux dynamic linker is in use.
30099   dynamic_linker='GNU/Linux ld.so'
30100   ;;
30101
30102 netbsd*)
30103   version_type=sunos
30104   need_lib_prefix=no
30105   need_version=no
30106   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
30107     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
30108     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
30109     dynamic_linker='NetBSD (a.out) ld.so'
30110   else
30111     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
30112     soname_spec='${libname}${release}${shared_ext}$major'
30113     dynamic_linker='NetBSD ld.elf_so'
30114   fi
30115   shlibpath_var=LD_LIBRARY_PATH
30116   shlibpath_overrides_runpath=yes
30117   hardcode_into_libs=yes
30118   ;;
30119
30120 newsos6)
30121   version_type=linux
30122   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30123   shlibpath_var=LD_LIBRARY_PATH
30124   shlibpath_overrides_runpath=yes
30125   ;;
30126
30127 *nto* | *qnx*)
30128   version_type=qnx
30129   need_lib_prefix=no
30130   need_version=no
30131   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30132   soname_spec='${libname}${release}${shared_ext}$major'
30133   shlibpath_var=LD_LIBRARY_PATH
30134   shlibpath_overrides_runpath=no
30135   hardcode_into_libs=yes
30136   dynamic_linker='ldqnx.so'
30137   ;;
30138
30139 openbsd*)
30140   version_type=sunos
30141   sys_lib_dlsearch_path_spec="/usr/lib"
30142   need_lib_prefix=no
30143   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
30144   case $host_os in
30145     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
30146     *)                          need_version=no  ;;
30147   esac
30148   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
30149   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
30150   shlibpath_var=LD_LIBRARY_PATH
30151   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
30152     case $host_os in
30153       openbsd2.[89] | openbsd2.[89].*)
30154         shlibpath_overrides_runpath=no
30155         ;;
30156       *)
30157         shlibpath_overrides_runpath=yes
30158         ;;
30159       esac
30160   else
30161     shlibpath_overrides_runpath=yes
30162   fi
30163   ;;
30164
30165 os2*)
30166   libname_spec='$name'
30167   shrext_cmds=".dll"
30168   need_lib_prefix=no
30169   library_names_spec='$libname${shared_ext} $libname.a'
30170   dynamic_linker='OS/2 ld.exe'
30171   shlibpath_var=LIBPATH
30172   ;;
30173
30174 osf3* | osf4* | osf5*)
30175   version_type=osf
30176   need_lib_prefix=no
30177   need_version=no
30178   soname_spec='${libname}${release}${shared_ext}$major'
30179   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30180   shlibpath_var=LD_LIBRARY_PATH
30181   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
30182   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
30183   ;;
30184
30185 rdos*)
30186   dynamic_linker=no
30187   ;;
30188
30189 solaris*)
30190   version_type=linux
30191   need_lib_prefix=no
30192   need_version=no
30193   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30194   soname_spec='${libname}${release}${shared_ext}$major'
30195   shlibpath_var=LD_LIBRARY_PATH
30196   shlibpath_overrides_runpath=yes
30197   hardcode_into_libs=yes
30198   # ldd complains unless libraries are executable
30199   postinstall_cmds='chmod +x $lib'
30200   ;;
30201
30202 sunos4*)
30203   version_type=sunos
30204   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
30205   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
30206   shlibpath_var=LD_LIBRARY_PATH
30207   shlibpath_overrides_runpath=yes
30208   if test "$with_gnu_ld" = yes; then
30209     need_lib_prefix=no
30210   fi
30211   need_version=yes
30212   ;;
30213
30214 sysv4 | sysv4.3*)
30215   version_type=linux
30216   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30217   soname_spec='${libname}${release}${shared_ext}$major'
30218   shlibpath_var=LD_LIBRARY_PATH
30219   case $host_vendor in
30220     sni)
30221       shlibpath_overrides_runpath=no
30222       need_lib_prefix=no
30223       runpath_var=LD_RUN_PATH
30224       ;;
30225     siemens)
30226       need_lib_prefix=no
30227       ;;
30228     motorola)
30229       need_lib_prefix=no
30230       need_version=no
30231       shlibpath_overrides_runpath=no
30232       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
30233       ;;
30234   esac
30235   ;;
30236
30237 sysv4*MP*)
30238   if test -d /usr/nec ;then
30239     version_type=linux
30240     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
30241     soname_spec='$libname${shared_ext}.$major'
30242     shlibpath_var=LD_LIBRARY_PATH
30243   fi
30244   ;;
30245
30246 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
30247   version_type=freebsd-elf
30248   need_lib_prefix=no
30249   need_version=no
30250   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
30251   soname_spec='${libname}${release}${shared_ext}$major'
30252   shlibpath_var=LD_LIBRARY_PATH
30253   shlibpath_overrides_runpath=yes
30254   hardcode_into_libs=yes
30255   if test "$with_gnu_ld" = yes; then
30256     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
30257   else
30258     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
30259     case $host_os in
30260       sco3.2v5*)
30261         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
30262         ;;
30263     esac
30264   fi
30265   sys_lib_dlsearch_path_spec='/usr/lib'
30266   ;;
30267
30268 tpf*)
30269   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
30270   version_type=linux
30271   need_lib_prefix=no
30272   need_version=no
30273   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30274   shlibpath_var=LD_LIBRARY_PATH
30275   shlibpath_overrides_runpath=no
30276   hardcode_into_libs=yes
30277   ;;
30278
30279 uts4*)
30280   version_type=linux
30281   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30282   soname_spec='${libname}${release}${shared_ext}$major'
30283   shlibpath_var=LD_LIBRARY_PATH
30284   ;;
30285
30286 *)
30287   dynamic_linker=no
30288   ;;
30289 esac
30290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
30291 $as_echo "$dynamic_linker" >&6; }
30292 test "$dynamic_linker" = no && can_build_shared=no
30293
30294 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
30295 if test "$GCC" = yes; then
30296   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
30297 fi
30298
30299 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
30300   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
30301 fi
30302 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
30303   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
30304 fi
30305
30306
30307
30308
30309
30310
30311
30312
30313
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     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
30344 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
30345 hardcode_action_CXX=
30346 if test -n "$hardcode_libdir_flag_spec_CXX" ||
30347    test -n "$runpath_var_CXX" ||
30348    test "X$hardcode_automatic_CXX" = "Xyes" ; then
30349
30350   # We can hardcode non-existent directories.
30351   if test "$hardcode_direct_CXX" != no &&
30352      # If the only mechanism to avoid hardcoding is shlibpath_var, we
30353      # have to relink, otherwise we might link with an installed library
30354      # when we should be linking with a yet-to-be-installed one
30355      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
30356      test "$hardcode_minus_L_CXX" != no; then
30357     # Linking always hardcodes the temporary library directory.
30358     hardcode_action_CXX=relink
30359   else
30360     # We can link without hardcoding, and we can hardcode nonexisting dirs.
30361     hardcode_action_CXX=immediate
30362   fi
30363 else
30364   # We cannot hardcode anything, or else we can only hardcode existing
30365   # directories.
30366   hardcode_action_CXX=unsupported
30367 fi
30368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
30369 $as_echo "$hardcode_action_CXX" >&6; }
30370
30371 if test "$hardcode_action_CXX" = relink ||
30372    test "$inherit_rpath_CXX" = yes; then
30373   # Fast installation is not supported
30374   enable_fast_install=no
30375 elif test "$shlibpath_overrides_runpath" = yes ||
30376      test "$enable_shared" = no; then
30377   # Fast installation is not necessary
30378   enable_fast_install=needless
30379 fi
30380
30381
30382
30383
30384
30385
30386
30387   fi # test -n "$compiler"
30388
30389   CC=$lt_save_CC
30390   CFLAGS=$lt_save_CFLAGS
30391   LDCXX=$LD
30392   LD=$lt_save_LD
30393   GCC=$lt_save_GCC
30394   with_gnu_ld=$lt_save_with_gnu_ld
30395   lt_cv_path_LDCXX=$lt_cv_path_LD
30396   lt_cv_path_LD=$lt_save_path_LD
30397   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
30398   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
30399 fi # test "$_lt_caught_CXX_error" != yes
30400
30401 ac_ext=c
30402 ac_cpp='$CPP $CPPFLAGS'
30403 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30404 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30405 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30406
30407
30408
30409 gta=false
30410
30411 # Check whether --with-gtest was given.
30412 if test "${with_gtest+set}" = set; then :
30413   withval=$with_gtest; try_gtest=$withval
30414 else
30415   try_gtest=yes
30416
30417 fi
30418
30419 case "$try_gtest" in
30420  yes)
30421     # Extract the first word of "gtest-config", so it can be a program name with args.
30422 set dummy gtest-config; ac_word=$2
30423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30424 $as_echo_n "checking for $ac_word... " >&6; }
30425 if ${ac_cv_path_GTEST_CONFIG+:} false; then :
30426   $as_echo_n "(cached) " >&6
30427 else
30428   case $GTEST_CONFIG in
30429   [\\/]* | ?:[\\/]*)
30430   ac_cv_path_GTEST_CONFIG="$GTEST_CONFIG" # Let the user override the test with a path.
30431   ;;
30432   *)
30433   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30434 for as_dir in $PATH
30435 do
30436   IFS=$as_save_IFS
30437   test -z "$as_dir" && as_dir=.
30438     for ac_exec_ext in '' $ac_executable_extensions; do
30439   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30440     ac_cv_path_GTEST_CONFIG="$as_dir/$ac_word$ac_exec_ext"
30441     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30442     break 2
30443   fi
30444 done
30445   done
30446 IFS=$as_save_IFS
30447
30448   ;;
30449 esac
30450 fi
30451 GTEST_CONFIG=$ac_cv_path_GTEST_CONFIG
30452 if test -n "$GTEST_CONFIG"; then
30453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTEST_CONFIG" >&5
30454 $as_echo "$GTEST_CONFIG" >&6; }
30455 else
30456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30457 $as_echo "no" >&6; }
30458 fi
30459
30460
30461     { ac_cv_path_GTEST_CONFIG=; unset ac_cv_path_GTEST_CONFIG;}
30462     case x${GTEST_CONFIG} in
30463      x) ;;
30464      *)
30465         { $as_echo "$as_me:${as_lineno-$LINENO}: checking gtest version" >&5
30466 $as_echo_n "checking gtest version... " >&6; }
30467         gtest_version_test=`$GTEST_CONFIG --min-version=1.5 || echo toolow`
30468         case "$gtest_version_test" in
30469          toolow*)
30470             ;;
30471          *)
30472             GTEST_LDFLAGS=`$GTEST_CONFIG --ldflags`
30473             GTEST_LIBS=`$GTEST_CONFIG --libs`
30474             GTEST_CXXFLAGS=`$GTEST_CONFIG --cxxflags`
30475             GTEST_CPPFLAGS=`$GTEST_CONFIG --cppflags`
30476
30477
30478
30479
30480             gta=true
30481             ;;
30482         esac
30483         gtest_version=`$GTEST_CONFIG --version`
30484         case "$gta" in
30485          true)
30486             { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($gtest_version) ok" >&5
30487 $as_echo "($gtest_version) ok" >&6; }
30488             ;;
30489          *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($gtest_version) not ok" >&5
30490 $as_echo "($gtest_version) not ok" >&6; }
30491             ;;
30492         esac
30493         { gtest_version_test=; unset gtest_version_test;}
30494         { gtest_version=; unset gtest_version;}
30495     esac
30496 esac
30497  if $gta; then
30498   GTEST_AVAILABLE_TRUE=
30499   GTEST_AVAILABLE_FALSE='#'
30500 else
30501   GTEST_AVAILABLE_TRUE='#'
30502   GTEST_AVAILABLE_FALSE=
30503 fi
30504
30505
30506
30507
30508 # All libraries should be in various LIB_* variables now.
30509 #LIBS=
30510 # Sadly not.  There is a gettext() check somewhere, and on Solaris this pulls
30511 # in -lintl -lgen, outside our "scope".
30512
30513 ac_config_files="$ac_config_files Makefile"
30514
30515 ac_config_files="$ac_config_files include/Makefile"
30516
30517 ac_config_files="$ac_config_files scripts/Makefile"
30518
30519 ac_config_files="$ac_config_files tests/Makefile"
30520
30521 ac_config_files="$ac_config_files tests/fileHandlingTest.h"
30522
30523 ac_config_files="$ac_config_files unity/Makefile"
30524
30525
30526 cat >confcache <<\_ACEOF
30527 # This file is a shell script that caches the results of configure
30528 # tests run on this system so they can be shared between configure
30529 # scripts and configure runs, see configure's option --config-cache.
30530 # It is not useful on other systems.  If it contains results you don't
30531 # want to keep, you may remove or edit it.
30532 #
30533 # config.status only pays attention to the cache file if you give it
30534 # the --recheck option to rerun configure.
30535 #
30536 # `ac_cv_env_foo' variables (set or unset) will be overridden when
30537 # loading this file, other *unset* `ac_cv_foo' will be assigned the
30538 # following values.
30539
30540 _ACEOF
30541
30542 # The following way of writing the cache mishandles newlines in values,
30543 # but we know of no workaround that is simple, portable, and efficient.
30544 # So, we kill variables containing newlines.
30545 # Ultrix sh set writes to stderr and can't be redirected directly,
30546 # and sets the high bit in the cache file unless we assign to the vars.
30547 (
30548   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
30549     eval ac_val=\$$ac_var
30550     case $ac_val in #(
30551     *${as_nl}*)
30552       case $ac_var in #(
30553       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
30554 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
30555       esac
30556       case $ac_var in #(
30557       _ | IFS | as_nl) ;; #(
30558       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
30559       *) { eval $ac_var=; unset $ac_var;} ;;
30560       esac ;;
30561     esac
30562   done
30563
30564   (set) 2>&1 |
30565     case $as_nl`(ac_space=' '; set) 2>&1` in #(
30566     *${as_nl}ac_space=\ *)
30567       # `set' does not quote correctly, so add quotes: double-quote
30568       # substitution turns \\\\ into \\, and sed turns \\ into \.
30569       sed -n \
30570         "s/'/'\\\\''/g;
30571           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
30572       ;; #(
30573     *)
30574       # `set' quotes correctly as required by POSIX, so do not add quotes.
30575       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
30576       ;;
30577     esac |
30578     sort
30579 ) |
30580   sed '
30581      /^ac_cv_env_/b end
30582      t clear
30583      :clear
30584      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
30585      t end
30586      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
30587      :end' >>confcache
30588 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
30589   if test -w "$cache_file"; then
30590     if test "x$cache_file" != "x/dev/null"; then
30591       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
30592 $as_echo "$as_me: updating cache $cache_file" >&6;}
30593       if test ! -f "$cache_file" || test -h "$cache_file"; then
30594         cat confcache >"$cache_file"
30595       else
30596         case $cache_file in #(
30597         */* | ?:*)
30598           mv -f confcache "$cache_file"$$ &&
30599           mv -f "$cache_file"$$ "$cache_file" ;; #(
30600         *)
30601           mv -f confcache "$cache_file" ;;
30602         esac
30603       fi
30604     fi
30605   else
30606     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
30607 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
30608   fi
30609 fi
30610 rm -f confcache
30611
30612 test "x$prefix" = xNONE && prefix=$ac_default_prefix
30613 # Let make expand exec_prefix.
30614 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
30615
30616 DEFS=-DHAVE_CONFIG_H
30617
30618 ac_libobjs=
30619 ac_ltlibobjs=
30620 U=
30621 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
30622   # 1. Remove the extension, and $U if already installed.
30623   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
30624   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
30625   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
30626   #    will be set to the directory where LIBOBJS objects are built.
30627   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
30628   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
30629 done
30630 LIBOBJS=$ac_libobjs
30631
30632 LTLIBOBJS=$ac_ltlibobjs
30633
30634
30635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
30636 $as_echo_n "checking that generated files are newer than configure... " >&6; }
30637    if test -n "$am_sleep_pid"; then
30638      # Hide warnings about reused PIDs.
30639      wait $am_sleep_pid 2>/dev/null
30640    fi
30641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
30642 $as_echo "done" >&6; }
30643  if test -n "$EXEEXT"; then
30644   am__EXEEXT_TRUE=
30645   am__EXEEXT_FALSE='#'
30646 else
30647   am__EXEEXT_TRUE='#'
30648   am__EXEEXT_FALSE=
30649 fi
30650
30651 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
30652   as_fn_error $? "conditional \"AMDEP\" was never defined.
30653 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30654 fi
30655 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
30656   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
30657 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30658 fi
30659 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
30660   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
30661 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30662 fi
30663
30664 if test -z "${WANT_CALC_TICKADJ_MS_TRUE}" && test -z "${WANT_CALC_TICKADJ_MS_FALSE}"; then
30665   as_fn_error $? "conditional \"WANT_CALC_TICKADJ_MS\" was never defined.
30666 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30667 fi
30668 if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; then
30669   as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
30670 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30671 fi
30672 if test -z "${INSTALL_UPDATE_LEAP_TRUE}" && test -z "${INSTALL_UPDATE_LEAP_FALSE}"; then
30673   as_fn_error $? "conditional \"INSTALL_UPDATE_LEAP\" was never defined.
30674 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30675 fi
30676 if test -z "${NTP_CROSSCOMPILE_TRUE}" && test -z "${NTP_CROSSCOMPILE_FALSE}"; then
30677   as_fn_error $? "conditional \"NTP_CROSSCOMPILE\" was never defined.
30678 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30679 fi
30680 if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
30681   as_fn_error $? "conditional \"PTHREADS\" was never defined.
30682 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30683 fi
30684 if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then
30685   as_fn_error $? "conditional \"BUILD_SNTP\" was never defined.
30686 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30687 fi
30688 if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
30689   as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
30690 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30691 fi
30692 if test -z "${INSTALL_LIBOPTS_TRUE}" && test -z "${INSTALL_LIBOPTS_FALSE}"; then
30693   as_fn_error $? "conditional \"INSTALL_LIBOPTS\" was never defined.
30694 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30695 fi
30696 if test -z "${NEED_LIBOPTS_TRUE}" && test -z "${NEED_LIBOPTS_FALSE}"; then
30697   as_fn_error $? "conditional \"NEED_LIBOPTS\" was never defined.
30698 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30699 fi
30700 if test -z "${BUILD_LIBEVENT_TRUE}" && test -z "${BUILD_LIBEVENT_FALSE}"; then
30701   as_fn_error $? "conditional \"BUILD_LIBEVENT\" was never defined.
30702 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30703 fi
30704 if test -z "${UNITYBUILD_AVAILABLE_TRUE}" && test -z "${UNITYBUILD_AVAILABLE_FALSE}"; then
30705   as_fn_error $? "conditional \"UNITYBUILD_AVAILABLE\" was never defined.
30706 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30707 fi
30708 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
30709   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
30710 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30711 fi
30712 if test -z "${GTEST_AVAILABLE_TRUE}" && test -z "${GTEST_AVAILABLE_FALSE}"; then
30713   as_fn_error $? "conditional \"GTEST_AVAILABLE\" was never defined.
30714 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30715 fi
30716
30717 : "${CONFIG_STATUS=./config.status}"
30718 ac_write_fail=0
30719 ac_clean_files_save=$ac_clean_files
30720 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
30721 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
30722 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
30723 as_write_fail=0
30724 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
30725 #! $SHELL
30726 # Generated by $as_me.
30727 # Run this file to recreate the current configuration.
30728 # Compiler output produced by configure, useful for debugging
30729 # configure, is in config.log if it exists.
30730
30731 debug=false
30732 ac_cs_recheck=false
30733 ac_cs_silent=false
30734
30735 SHELL=\${CONFIG_SHELL-$SHELL}
30736 export SHELL
30737 _ASEOF
30738 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
30739 ## -------------------- ##
30740 ## M4sh Initialization. ##
30741 ## -------------------- ##
30742
30743 # Be more Bourne compatible
30744 DUALCASE=1; export DUALCASE # for MKS sh
30745 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
30746   emulate sh
30747   NULLCMD=:
30748   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
30749   # is contrary to our usage.  Disable this feature.
30750   alias -g '${1+"$@"}'='"$@"'
30751   setopt NO_GLOB_SUBST
30752 else
30753   case `(set -o) 2>/dev/null` in #(
30754   *posix*) :
30755     set -o posix ;; #(
30756   *) :
30757      ;;
30758 esac
30759 fi
30760
30761
30762 as_nl='
30763 '
30764 export as_nl
30765 # Printing a long string crashes Solaris 7 /usr/bin/printf.
30766 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
30767 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
30768 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
30769 # Prefer a ksh shell builtin over an external printf program on Solaris,
30770 # but without wasting forks for bash or zsh.
30771 if test -z "$BASH_VERSION$ZSH_VERSION" \
30772     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
30773   as_echo='print -r --'
30774   as_echo_n='print -rn --'
30775 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
30776   as_echo='printf %s\n'
30777   as_echo_n='printf %s'
30778 else
30779   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
30780     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
30781     as_echo_n='/usr/ucb/echo -n'
30782   else
30783     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
30784     as_echo_n_body='eval
30785       arg=$1;
30786       case $arg in #(
30787       *"$as_nl"*)
30788         expr "X$arg" : "X\\(.*\\)$as_nl";
30789         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
30790       esac;
30791       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
30792     '
30793     export as_echo_n_body
30794     as_echo_n='sh -c $as_echo_n_body as_echo'
30795   fi
30796   export as_echo_body
30797   as_echo='sh -c $as_echo_body as_echo'
30798 fi
30799
30800 # The user is always right.
30801 if test "${PATH_SEPARATOR+set}" != set; then
30802   PATH_SEPARATOR=:
30803   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
30804     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
30805       PATH_SEPARATOR=';'
30806   }
30807 fi
30808
30809
30810 # IFS
30811 # We need space, tab and new line, in precisely that order.  Quoting is
30812 # there to prevent editors from complaining about space-tab.
30813 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
30814 # splitting by setting IFS to empty value.)
30815 IFS=" ""        $as_nl"
30816
30817 # Find who we are.  Look in the path if we contain no directory separator.
30818 as_myself=
30819 case $0 in #((
30820   *[\\/]* ) as_myself=$0 ;;
30821   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30822 for as_dir in $PATH
30823 do
30824   IFS=$as_save_IFS
30825   test -z "$as_dir" && as_dir=.
30826     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
30827   done
30828 IFS=$as_save_IFS
30829
30830      ;;
30831 esac
30832 # We did not find ourselves, most probably we were run as `sh COMMAND'
30833 # in which case we are not to be found in the path.
30834 if test "x$as_myself" = x; then
30835   as_myself=$0
30836 fi
30837 if test ! -f "$as_myself"; then
30838   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
30839   exit 1
30840 fi
30841
30842 # Unset variables that we do not need and which cause bugs (e.g. in
30843 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
30844 # suppresses any "Segmentation fault" message there.  '((' could
30845 # trigger a bug in pdksh 5.2.14.
30846 for as_var in BASH_ENV ENV MAIL MAILPATH
30847 do eval test x\${$as_var+set} = xset \
30848   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
30849 done
30850 PS1='$ '
30851 PS2='> '
30852 PS4='+ '
30853
30854 # NLS nuisances.
30855 LC_ALL=C
30856 export LC_ALL
30857 LANGUAGE=C
30858 export LANGUAGE
30859
30860 # CDPATH.
30861 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
30862
30863
30864 # as_fn_error STATUS ERROR [LINENO LOG_FD]
30865 # ----------------------------------------
30866 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
30867 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
30868 # script with STATUS, using 1 if that was 0.
30869 as_fn_error ()
30870 {
30871   as_status=$1; test $as_status -eq 0 && as_status=1
30872   if test "$4"; then
30873     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
30874     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
30875   fi
30876   $as_echo "$as_me: error: $2" >&2
30877   as_fn_exit $as_status
30878 } # as_fn_error
30879
30880
30881 # as_fn_set_status STATUS
30882 # -----------------------
30883 # Set $? to STATUS, without forking.
30884 as_fn_set_status ()
30885 {
30886   return $1
30887 } # as_fn_set_status
30888
30889 # as_fn_exit STATUS
30890 # -----------------
30891 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
30892 as_fn_exit ()
30893 {
30894   set +e
30895   as_fn_set_status $1
30896   exit $1
30897 } # as_fn_exit
30898
30899 # as_fn_unset VAR
30900 # ---------------
30901 # Portably unset VAR.
30902 as_fn_unset ()
30903 {
30904   { eval $1=; unset $1;}
30905 }
30906 as_unset=as_fn_unset
30907 # as_fn_append VAR VALUE
30908 # ----------------------
30909 # Append the text in VALUE to the end of the definition contained in VAR. Take
30910 # advantage of any shell optimizations that allow amortized linear growth over
30911 # repeated appends, instead of the typical quadratic growth present in naive
30912 # implementations.
30913 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
30914   eval 'as_fn_append ()
30915   {
30916     eval $1+=\$2
30917   }'
30918 else
30919   as_fn_append ()
30920   {
30921     eval $1=\$$1\$2
30922   }
30923 fi # as_fn_append
30924
30925 # as_fn_arith ARG...
30926 # ------------------
30927 # Perform arithmetic evaluation on the ARGs, and store the result in the
30928 # global $as_val. Take advantage of shells that can avoid forks. The arguments
30929 # must be portable across $(()) and expr.
30930 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
30931   eval 'as_fn_arith ()
30932   {
30933     as_val=$(( $* ))
30934   }'
30935 else
30936   as_fn_arith ()
30937   {
30938     as_val=`expr "$@" || test $? -eq 1`
30939   }
30940 fi # as_fn_arith
30941
30942
30943 if expr a : '\(a\)' >/dev/null 2>&1 &&
30944    test "X`expr 00001 : '.*\(...\)'`" = X001; then
30945   as_expr=expr
30946 else
30947   as_expr=false
30948 fi
30949
30950 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
30951   as_basename=basename
30952 else
30953   as_basename=false
30954 fi
30955
30956 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
30957   as_dirname=dirname
30958 else
30959   as_dirname=false
30960 fi
30961
30962 as_me=`$as_basename -- "$0" ||
30963 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
30964          X"$0" : 'X\(//\)$' \| \
30965          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
30966 $as_echo X/"$0" |
30967     sed '/^.*\/\([^/][^/]*\)\/*$/{
30968             s//\1/
30969             q
30970           }
30971           /^X\/\(\/\/\)$/{
30972             s//\1/
30973             q
30974           }
30975           /^X\/\(\/\).*/{
30976             s//\1/
30977             q
30978           }
30979           s/.*/./; q'`
30980
30981 # Avoid depending upon Character Ranges.
30982 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
30983 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
30984 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
30985 as_cr_digits='0123456789'
30986 as_cr_alnum=$as_cr_Letters$as_cr_digits
30987
30988 ECHO_C= ECHO_N= ECHO_T=
30989 case `echo -n x` in #(((((
30990 -n*)
30991   case `echo 'xy\c'` in
30992   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
30993   xy)  ECHO_C='\c';;
30994   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
30995        ECHO_T=' ';;
30996   esac;;
30997 *)
30998   ECHO_N='-n';;
30999 esac
31000
31001 rm -f conf$$ conf$$.exe conf$$.file
31002 if test -d conf$$.dir; then
31003   rm -f conf$$.dir/conf$$.file
31004 else
31005   rm -f conf$$.dir
31006   mkdir conf$$.dir 2>/dev/null
31007 fi
31008 if (echo >conf$$.file) 2>/dev/null; then
31009   if ln -s conf$$.file conf$$ 2>/dev/null; then
31010     as_ln_s='ln -s'
31011     # ... but there are two gotchas:
31012     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
31013     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
31014     # In both cases, we have to default to `cp -pR'.
31015     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
31016       as_ln_s='cp -pR'
31017   elif ln conf$$.file conf$$ 2>/dev/null; then
31018     as_ln_s=ln
31019   else
31020     as_ln_s='cp -pR'
31021   fi
31022 else
31023   as_ln_s='cp -pR'
31024 fi
31025 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
31026 rmdir conf$$.dir 2>/dev/null
31027
31028
31029 # as_fn_mkdir_p
31030 # -------------
31031 # Create "$as_dir" as a directory, including parents if necessary.
31032 as_fn_mkdir_p ()
31033 {
31034
31035   case $as_dir in #(
31036   -*) as_dir=./$as_dir;;
31037   esac
31038   test -d "$as_dir" || eval $as_mkdir_p || {
31039     as_dirs=
31040     while :; do
31041       case $as_dir in #(
31042       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
31043       *) as_qdir=$as_dir;;
31044       esac
31045       as_dirs="'$as_qdir' $as_dirs"
31046       as_dir=`$as_dirname -- "$as_dir" ||
31047 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31048          X"$as_dir" : 'X\(//\)[^/]' \| \
31049          X"$as_dir" : 'X\(//\)$' \| \
31050          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31051 $as_echo X"$as_dir" |
31052     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31053             s//\1/
31054             q
31055           }
31056           /^X\(\/\/\)[^/].*/{
31057             s//\1/
31058             q
31059           }
31060           /^X\(\/\/\)$/{
31061             s//\1/
31062             q
31063           }
31064           /^X\(\/\).*/{
31065             s//\1/
31066             q
31067           }
31068           s/.*/./; q'`
31069       test -d "$as_dir" && break
31070     done
31071     test -z "$as_dirs" || eval "mkdir $as_dirs"
31072   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
31073
31074
31075 } # as_fn_mkdir_p
31076 if mkdir -p . 2>/dev/null; then
31077   as_mkdir_p='mkdir -p "$as_dir"'
31078 else
31079   test -d ./-p && rmdir ./-p
31080   as_mkdir_p=false
31081 fi
31082
31083
31084 # as_fn_executable_p FILE
31085 # -----------------------
31086 # Test if FILE is an executable regular file.
31087 as_fn_executable_p ()
31088 {
31089   test -f "$1" && test -x "$1"
31090 } # as_fn_executable_p
31091 as_test_x='test -x'
31092 as_executable_p=as_fn_executable_p
31093
31094 # Sed expression to map a string onto a valid CPP name.
31095 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
31096
31097 # Sed expression to map a string onto a valid variable name.
31098 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
31099
31100
31101 exec 6>&1
31102 ## ----------------------------------- ##
31103 ## Main body of $CONFIG_STATUS script. ##
31104 ## ----------------------------------- ##
31105 _ASEOF
31106 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
31107
31108 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31109 # Save the log message, to keep $0 and so on meaningful, and to
31110 # report actual input values of CONFIG_FILES etc. instead of their
31111 # values after options handling.
31112 ac_log="
31113 This file was extended by sntp $as_me 4.2.8p6, which was
31114 generated by GNU Autoconf 2.69.  Invocation command line was
31115
31116   CONFIG_FILES    = $CONFIG_FILES
31117   CONFIG_HEADERS  = $CONFIG_HEADERS
31118   CONFIG_LINKS    = $CONFIG_LINKS
31119   CONFIG_COMMANDS = $CONFIG_COMMANDS
31120   $ $0 $@
31121
31122 on `(hostname || uname -n) 2>/dev/null | sed 1q`
31123 "
31124
31125 _ACEOF
31126
31127 case $ac_config_files in *"
31128 "*) set x $ac_config_files; shift; ac_config_files=$*;;
31129 esac
31130
31131 case $ac_config_headers in *"
31132 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
31133 esac
31134
31135
31136 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31137 # Files that config.status was made for.
31138 config_files="$ac_config_files"
31139 config_headers="$ac_config_headers"
31140 config_commands="$ac_config_commands"
31141
31142 _ACEOF
31143
31144 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31145 ac_cs_usage="\
31146 \`$as_me' instantiates files and other configuration actions
31147 from templates according to the current configuration.  Unless the files
31148 and actions are specified as TAGs, all are instantiated by default.
31149
31150 Usage: $0 [OPTION]... [TAG]...
31151
31152   -h, --help       print this help, then exit
31153   -V, --version    print version number and configuration settings, then exit
31154       --config     print configuration, then exit
31155   -q, --quiet, --silent
31156                    do not print progress messages
31157   -d, --debug      don't remove temporary files
31158       --recheck    update $as_me by reconfiguring in the same conditions
31159       --file=FILE[:TEMPLATE]
31160                    instantiate the configuration file FILE
31161       --header=FILE[:TEMPLATE]
31162                    instantiate the configuration header FILE
31163
31164 Configuration files:
31165 $config_files
31166
31167 Configuration headers:
31168 $config_headers
31169
31170 Configuration commands:
31171 $config_commands
31172
31173 Report bugs to <http://bugs.ntp.org./>.
31174 sntp home page: <http://www.ntp.org./>."
31175
31176 _ACEOF
31177 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31178 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31179 ac_cs_version="\\
31180 sntp config.status 4.2.8p6
31181 configured by $0, generated by GNU Autoconf 2.69,
31182   with options \\"\$ac_cs_config\\"
31183
31184 Copyright (C) 2012 Free Software Foundation, Inc.
31185 This config.status script is free software; the Free Software Foundation
31186 gives unlimited permission to copy, distribute and modify it."
31187
31188 ac_pwd='$ac_pwd'
31189 srcdir='$srcdir'
31190 INSTALL='$INSTALL'
31191 MKDIR_P='$MKDIR_P'
31192 AWK='$AWK'
31193 test -n "\$AWK" || AWK=awk
31194 _ACEOF
31195
31196 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31197 # The default lists apply if the user does not specify any file.
31198 ac_need_defaults=:
31199 while test $# != 0
31200 do
31201   case $1 in
31202   --*=?*)
31203     ac_option=`expr "X$1" : 'X\([^=]*\)='`
31204     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31205     ac_shift=:
31206     ;;
31207   --*=)
31208     ac_option=`expr "X$1" : 'X\([^=]*\)='`
31209     ac_optarg=
31210     ac_shift=:
31211     ;;
31212   *)
31213     ac_option=$1
31214     ac_optarg=$2
31215     ac_shift=shift
31216     ;;
31217   esac
31218
31219   case $ac_option in
31220   # Handling of the options.
31221   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31222     ac_cs_recheck=: ;;
31223   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31224     $as_echo "$ac_cs_version"; exit ;;
31225   --config | --confi | --conf | --con | --co | --c )
31226     $as_echo "$ac_cs_config"; exit ;;
31227   --debug | --debu | --deb | --de | --d | -d )
31228     debug=: ;;
31229   --file | --fil | --fi | --f )
31230     $ac_shift
31231     case $ac_optarg in
31232     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31233     '') as_fn_error $? "missing file argument" ;;
31234     esac
31235     as_fn_append CONFIG_FILES " '$ac_optarg'"
31236     ac_need_defaults=false;;
31237   --header | --heade | --head | --hea )
31238     $ac_shift
31239     case $ac_optarg in
31240     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31241     esac
31242     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31243     ac_need_defaults=false;;
31244   --he | --h)
31245     # Conflict between --help and --header
31246     as_fn_error $? "ambiguous option: \`$1'
31247 Try \`$0 --help' for more information.";;
31248   --help | --hel | -h )
31249     $as_echo "$ac_cs_usage"; exit ;;
31250   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31251   | -silent | --silent | --silen | --sile | --sil | --si | --s)
31252     ac_cs_silent=: ;;
31253
31254   # This is an error.
31255   -*) as_fn_error $? "unrecognized option: \`$1'
31256 Try \`$0 --help' for more information." ;;
31257
31258   *) as_fn_append ac_config_targets " $1"
31259      ac_need_defaults=false ;;
31260
31261   esac
31262   shift
31263 done
31264
31265 ac_configure_extra_args=
31266
31267 if $ac_cs_silent; then
31268   exec 6>/dev/null
31269   ac_configure_extra_args="$ac_configure_extra_args --silent"
31270 fi
31271
31272 _ACEOF
31273 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31274 if \$ac_cs_recheck; then
31275   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31276   shift
31277   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
31278   CONFIG_SHELL='$SHELL'
31279   export CONFIG_SHELL
31280   exec "\$@"
31281 fi
31282
31283 _ACEOF
31284 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31285 exec 5>>config.log
31286 {
31287   echo
31288   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31289 ## Running $as_me. ##
31290 _ASBOX
31291   $as_echo "$ac_log"
31292 } >&5
31293
31294 _ACEOF
31295 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31296 #
31297 # INIT-COMMANDS
31298 #
31299 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
31300
31301
31302 # The HP-UX ksh and POSIX shell print the target directory to stdout
31303 # if CDPATH is set.
31304 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31305
31306 sed_quote_subst='$sed_quote_subst'
31307 double_quote_subst='$double_quote_subst'
31308 delay_variable_subst='$delay_variable_subst'
31309 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
31310 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
31311 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
31312 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
31313 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
31314 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
31315 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
31316 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
31317 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
31318 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
31319 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
31320 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
31321 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
31322 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
31323 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
31324 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
31325 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
31326 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
31327 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
31328 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
31329 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
31330 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
31331 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
31332 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
31333 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
31334 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
31335 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
31336 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
31337 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
31338 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
31339 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
31340 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
31341 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
31342 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
31343 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
31344 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
31345 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
31346 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
31347 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
31348 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
31349 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
31350 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
31351 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
31352 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
31353 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
31354 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
31355 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
31356 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
31357 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
31358 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
31359 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
31360 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
31361 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
31362 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
31363 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
31364 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"`'
31365 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
31366 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
31367 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
31368 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
31369 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
31370 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
31371 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
31372 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
31373 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
31374 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
31375 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
31376 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
31377 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
31378 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
31379 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
31380 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
31381 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
31382 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
31383 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
31384 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
31385 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
31386 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
31387 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
31388 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
31389 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
31390 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
31391 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
31392 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
31393 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
31394 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
31395 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
31396 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
31397 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
31398 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
31399 hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
31400 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
31401 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
31402 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
31403 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
31404 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
31405 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
31406 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
31407 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
31408 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
31409 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
31410 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
31411 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
31412 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
31413 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
31414 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
31415 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
31416 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
31417 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
31418 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
31419 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
31420 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
31421 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
31422 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
31423 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
31424 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
31425 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
31426 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
31427 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
31428 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
31429 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
31430 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
31431 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
31432 sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
31433 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
31434 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
31435 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
31436 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
31437 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
31438 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
31439 compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
31440 predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
31441 postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
31442 predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
31443 postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
31444 compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
31445 LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
31446 reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
31447 reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31448 old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31449 compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
31450 GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
31451 lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
31452 lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
31453 lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
31454 lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
31455 lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
31456 archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
31457 enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
31458 export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
31459 whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
31460 compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
31461 old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31462 old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31463 archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31464 archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31465 module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31466 module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31467 with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
31468 allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
31469 no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
31470 hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
31471 hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`'
31472 hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
31473 hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
31474 hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
31475 hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
31476 hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
31477 hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
31478 inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
31479 link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
31480 always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
31481 export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31482 exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
31483 include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
31484 prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31485 postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31486 file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
31487 hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
31488 compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
31489 predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
31490 postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
31491 predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
31492 postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
31493 compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
31494
31495 LTCC='$LTCC'
31496 LTCFLAGS='$LTCFLAGS'
31497 compiler='$compiler_DEFAULT'
31498
31499 # A function that is used when there is no print builtin or printf.
31500 func_fallback_echo ()
31501 {
31502   eval 'cat <<_LTECHO_EOF
31503 \$1
31504 _LTECHO_EOF'
31505 }
31506
31507 # Quote evaled strings.
31508 for var in SED \
31509 GREP \
31510 EGREP \
31511 FGREP \
31512 SHELL \
31513 ECHO \
31514 LD \
31515 NM \
31516 LN_S \
31517 lt_SP2NL \
31518 lt_NL2SP \
31519 reload_flag \
31520 OBJDUMP \
31521 deplibs_check_method \
31522 file_magic_cmd \
31523 file_magic_glob \
31524 want_nocaseglob \
31525 DLLTOOL \
31526 sharedlib_from_linklib_cmd \
31527 AR \
31528 AR_FLAGS \
31529 archiver_list_spec \
31530 STRIP \
31531 RANLIB \
31532 CC \
31533 CFLAGS \
31534 compiler \
31535 lt_cv_sys_global_symbol_pipe \
31536 lt_cv_sys_global_symbol_to_cdecl \
31537 lt_cv_sys_global_symbol_to_c_name_address \
31538 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
31539 nm_file_list_spec \
31540 lt_prog_compiler_no_builtin_flag \
31541 lt_prog_compiler_pic \
31542 lt_prog_compiler_wl \
31543 lt_prog_compiler_static \
31544 lt_cv_prog_compiler_c_o \
31545 need_locks \
31546 MANIFEST_TOOL \
31547 DSYMUTIL \
31548 NMEDIT \
31549 LIPO \
31550 OTOOL \
31551 OTOOL64 \
31552 shrext_cmds \
31553 export_dynamic_flag_spec \
31554 whole_archive_flag_spec \
31555 compiler_needs_object \
31556 with_gnu_ld \
31557 allow_undefined_flag \
31558 no_undefined_flag \
31559 hardcode_libdir_flag_spec \
31560 hardcode_libdir_flag_spec_ld \
31561 hardcode_libdir_separator \
31562 exclude_expsyms \
31563 include_expsyms \
31564 file_list_spec \
31565 variables_saved_for_relink \
31566 libname_spec \
31567 library_names_spec \
31568 soname_spec \
31569 install_override_mode \
31570 finish_eval \
31571 old_striplib \
31572 striplib \
31573 compiler_lib_search_dirs \
31574 predep_objects \
31575 postdep_objects \
31576 predeps \
31577 postdeps \
31578 compiler_lib_search_path \
31579 LD_CXX \
31580 reload_flag_CXX \
31581 compiler_CXX \
31582 lt_prog_compiler_no_builtin_flag_CXX \
31583 lt_prog_compiler_pic_CXX \
31584 lt_prog_compiler_wl_CXX \
31585 lt_prog_compiler_static_CXX \
31586 lt_cv_prog_compiler_c_o_CXX \
31587 export_dynamic_flag_spec_CXX \
31588 whole_archive_flag_spec_CXX \
31589 compiler_needs_object_CXX \
31590 with_gnu_ld_CXX \
31591 allow_undefined_flag_CXX \
31592 no_undefined_flag_CXX \
31593 hardcode_libdir_flag_spec_CXX \
31594 hardcode_libdir_flag_spec_ld_CXX \
31595 hardcode_libdir_separator_CXX \
31596 exclude_expsyms_CXX \
31597 include_expsyms_CXX \
31598 file_list_spec_CXX \
31599 compiler_lib_search_dirs_CXX \
31600 predep_objects_CXX \
31601 postdep_objects_CXX \
31602 predeps_CXX \
31603 postdeps_CXX \
31604 compiler_lib_search_path_CXX; do
31605     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
31606     *[\\\\\\\`\\"\\\$]*)
31607       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
31608       ;;
31609     *)
31610       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
31611       ;;
31612     esac
31613 done
31614
31615 # Double-quote double-evaled strings.
31616 for var in reload_cmds \
31617 old_postinstall_cmds \
31618 old_postuninstall_cmds \
31619 old_archive_cmds \
31620 extract_expsyms_cmds \
31621 old_archive_from_new_cmds \
31622 old_archive_from_expsyms_cmds \
31623 archive_cmds \
31624 archive_expsym_cmds \
31625 module_cmds \
31626 module_expsym_cmds \
31627 export_symbols_cmds \
31628 prelink_cmds \
31629 postlink_cmds \
31630 postinstall_cmds \
31631 postuninstall_cmds \
31632 finish_cmds \
31633 sys_lib_search_path_spec \
31634 sys_lib_dlsearch_path_spec \
31635 reload_cmds_CXX \
31636 old_archive_cmds_CXX \
31637 old_archive_from_new_cmds_CXX \
31638 old_archive_from_expsyms_cmds_CXX \
31639 archive_cmds_CXX \
31640 archive_expsym_cmds_CXX \
31641 module_cmds_CXX \
31642 module_expsym_cmds_CXX \
31643 export_symbols_cmds_CXX \
31644 prelink_cmds_CXX \
31645 postlink_cmds_CXX; do
31646     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
31647     *[\\\\\\\`\\"\\\$]*)
31648       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
31649       ;;
31650     *)
31651       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
31652       ;;
31653     esac
31654 done
31655
31656 ac_aux_dir='$ac_aux_dir'
31657 xsi_shell='$xsi_shell'
31658 lt_shell_append='$lt_shell_append'
31659
31660 # See if we are running on zsh, and set the options which allow our
31661 # commands through without removal of \ escapes INIT.
31662 if test -n "\${ZSH_VERSION+set}" ; then
31663    setopt NO_GLOB_SUBST
31664 fi
31665
31666
31667     PACKAGE='$PACKAGE'
31668     VERSION='$VERSION'
31669     TIMESTAMP='$TIMESTAMP'
31670     RM='$RM'
31671     ofile='$ofile'
31672
31673
31674
31675
31676
31677
31678 _ACEOF
31679
31680 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31681
31682 # Handling of arguments.
31683 for ac_config_target in $ac_config_targets
31684 do
31685   case $ac_config_target in
31686     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
31687     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
31688     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
31689     "libopts/Makefile") CONFIG_FILES="$CONFIG_FILES libopts/Makefile" ;;
31690     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
31691     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
31692     "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
31693     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
31694     "tests/fileHandlingTest.h") CONFIG_FILES="$CONFIG_FILES tests/fileHandlingTest.h" ;;
31695     "unity/Makefile") CONFIG_FILES="$CONFIG_FILES unity/Makefile" ;;
31696
31697   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
31698   esac
31699 done
31700
31701
31702 # If the user did not use the arguments to specify the items to instantiate,
31703 # then the envvar interface is used.  Set only those that are not.
31704 # We use the long form for the default assignment because of an extremely
31705 # bizarre bug on SunOS 4.1.3.
31706 if $ac_need_defaults; then
31707   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
31708   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
31709   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
31710 fi
31711
31712 # Have a temporary directory for convenience.  Make it in the build tree
31713 # simply because there is no reason against having it here, and in addition,
31714 # creating and moving files from /tmp can sometimes cause problems.
31715 # Hook for its removal unless debugging.
31716 # Note that there is a small window in which the directory will not be cleaned:
31717 # after its creation but before its name has been assigned to `$tmp'.
31718 $debug ||
31719 {
31720   tmp= ac_tmp=
31721   trap 'exit_status=$?
31722   : "${ac_tmp:=$tmp}"
31723   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
31724 ' 0
31725   trap 'as_fn_exit 1' 1 2 13 15
31726 }
31727 # Create a (secure) tmp directory for tmp files.
31728
31729 {
31730   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31731   test -d "$tmp"
31732 }  ||
31733 {
31734   tmp=./conf$$-$RANDOM
31735   (umask 077 && mkdir "$tmp")
31736 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31737 ac_tmp=$tmp
31738
31739 # Set up the scripts for CONFIG_FILES section.
31740 # No need to generate them if there are no CONFIG_FILES.
31741 # This happens for instance with `./config.status config.h'.
31742 if test -n "$CONFIG_FILES"; then
31743
31744
31745 ac_cr=`echo X | tr X '\015'`
31746 # On cygwin, bash can eat \r inside `` if the user requested igncr.
31747 # But we know of no other shell where ac_cr would be empty at this
31748 # point, so we can use a bashism as a fallback.
31749 if test "x$ac_cr" = x; then
31750   eval ac_cr=\$\'\\r\'
31751 fi
31752 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31753 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31754   ac_cs_awk_cr='\\r'
31755 else
31756   ac_cs_awk_cr=$ac_cr
31757 fi
31758
31759 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
31760 _ACEOF
31761
31762
31763 {
31764   echo "cat >conf$$subs.awk <<_ACEOF" &&
31765   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31766   echo "_ACEOF"
31767 } >conf$$subs.sh ||
31768   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31769 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
31770 ac_delim='%!_!# '
31771 for ac_last_try in false false false false false :; do
31772   . ./conf$$subs.sh ||
31773     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31774
31775   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31776   if test $ac_delim_n = $ac_delim_num; then
31777     break
31778   elif $ac_last_try; then
31779     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31780   else
31781     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31782   fi
31783 done
31784 rm -f conf$$subs.sh
31785
31786 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31787 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
31788 _ACEOF
31789 sed -n '
31790 h
31791 s/^/S["/; s/!.*/"]=/
31792 p
31793 g
31794 s/^[^!]*!//
31795 :repl
31796 t repl
31797 s/'"$ac_delim"'$//
31798 t delim
31799 :nl
31800 h
31801 s/\(.\{148\}\)..*/\1/
31802 t more1
31803 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31804 p
31805 n
31806 b repl
31807 :more1
31808 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31809 p
31810 g
31811 s/.\{148\}//
31812 t nl
31813 :delim
31814 h
31815 s/\(.\{148\}\)..*/\1/
31816 t more2
31817 s/["\\]/\\&/g; s/^/"/; s/$/"/
31818 p
31819 b
31820 :more2
31821 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31822 p
31823 g
31824 s/.\{148\}//
31825 t delim
31826 ' <conf$$subs.awk | sed '
31827 /^[^""]/{
31828   N
31829   s/\n//
31830 }
31831 ' >>$CONFIG_STATUS || ac_write_fail=1
31832 rm -f conf$$subs.awk
31833 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31834 _ACAWK
31835 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
31836   for (key in S) S_is_set[key] = 1
31837   FS = "\a"
31838
31839 }
31840 {
31841   line = $ 0
31842   nfields = split(line, field, "@")
31843   substed = 0
31844   len = length(field[1])
31845   for (i = 2; i < nfields; i++) {
31846     key = field[i]
31847     keylen = length(key)
31848     if (S_is_set[key]) {
31849       value = S[key]
31850       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31851       len += length(value) + length(field[++i])
31852       substed = 1
31853     } else
31854       len += 1 + keylen
31855   }
31856
31857   print line
31858 }
31859
31860 _ACAWK
31861 _ACEOF
31862 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31863 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31864   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31865 else
31866   cat
31867 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
31868   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
31869 _ACEOF
31870
31871 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
31872 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
31873 # trailing colons and then remove the whole line if VPATH becomes empty
31874 # (actually we leave an empty line to preserve line numbers).
31875 if test "x$srcdir" = x.; then
31876   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
31877 h
31878 s///
31879 s/^/:/
31880 s/[      ]*$/:/
31881 s/:\$(srcdir):/:/g
31882 s/:\${srcdir}:/:/g
31883 s/:@srcdir@:/:/g
31884 s/^:*//
31885 s/:*$//
31886 x
31887 s/\(=[   ]*\).*/\1/
31888 G
31889 s/\n//
31890 s/^[^=]*=[       ]*$//
31891 }'
31892 fi
31893
31894 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31895 fi # test -n "$CONFIG_FILES"
31896
31897 # Set up the scripts for CONFIG_HEADERS section.
31898 # No need to generate them if there are no CONFIG_HEADERS.
31899 # This happens for instance with `./config.status Makefile'.
31900 if test -n "$CONFIG_HEADERS"; then
31901 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
31902 BEGIN {
31903 _ACEOF
31904
31905 # Transform confdefs.h into an awk script `defines.awk', embedded as
31906 # here-document in config.status, that substitutes the proper values into
31907 # config.h.in to produce config.h.
31908
31909 # Create a delimiter string that does not exist in confdefs.h, to ease
31910 # handling of long lines.
31911 ac_delim='%!_!# '
31912 for ac_last_try in false false :; do
31913   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
31914   if test -z "$ac_tt"; then
31915     break
31916   elif $ac_last_try; then
31917     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
31918   else
31919     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31920   fi
31921 done
31922
31923 # For the awk script, D is an array of macro values keyed by name,
31924 # likewise P contains macro parameters if any.  Preserve backslash
31925 # newline sequences.
31926
31927 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31928 sed -n '
31929 s/.\{148\}/&'"$ac_delim"'/g
31930 t rset
31931 :rset
31932 s/^[     ]*#[    ]*define[       ][      ]*/ /
31933 t def
31934 d
31935 :def
31936 s/\\$//
31937 t bsnl
31938 s/["\\]/\\&/g
31939 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
31940 D["\1"]=" \3"/p
31941 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
31942 d
31943 :bsnl
31944 s/["\\]/\\&/g
31945 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
31946 D["\1"]=" \3\\\\\\n"\\/p
31947 t cont
31948 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
31949 t cont
31950 d
31951 :cont
31952 n
31953 s/.\{148\}/&'"$ac_delim"'/g
31954 t clear
31955 :clear
31956 s/\\$//
31957 t bsnlc
31958 s/["\\]/\\&/g; s/^/"/; s/$/"/p
31959 d
31960 :bsnlc
31961 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
31962 b cont
31963 ' <confdefs.h | sed '
31964 s/'"$ac_delim"'/"\\\
31965 "/g' >>$CONFIG_STATUS || ac_write_fail=1
31966
31967 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31968   for (key in D) D_is_set[key] = 1
31969   FS = "\a"
31970 }
31971 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
31972   line = \$ 0
31973   split(line, arg, " ")
31974   if (arg[1] == "#") {
31975     defundef = arg[2]
31976     mac1 = arg[3]
31977   } else {
31978     defundef = substr(arg[1], 2)
31979     mac1 = arg[2]
31980   }
31981   split(mac1, mac2, "(") #)
31982   macro = mac2[1]
31983   prefix = substr(line, 1, index(line, defundef) - 1)
31984   if (D_is_set[macro]) {
31985     # Preserve the white space surrounding the "#".
31986     print prefix "define", macro P[macro] D[macro]
31987     next
31988   } else {
31989     # Replace #undef with comments.  This is necessary, for example,
31990     # in the case of _POSIX_SOURCE, which is predefined and required
31991     # on some systems where configure will not decide to define it.
31992     if (defundef == "undef") {
31993       print "/*", prefix defundef, macro, "*/"
31994       next
31995     }
31996   }
31997 }
31998 { print }
31999 _ACAWK
32000 _ACEOF
32001 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32002   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32003 fi # test -n "$CONFIG_HEADERS"
32004
32005
32006 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
32007 shift
32008 for ac_tag
32009 do
32010   case $ac_tag in
32011   :[FHLC]) ac_mode=$ac_tag; continue;;
32012   esac
32013   case $ac_mode$ac_tag in
32014   :[FHL]*:*);;
32015   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
32016   :[FH]-) ac_tag=-:-;;
32017   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32018   esac
32019   ac_save_IFS=$IFS
32020   IFS=:
32021   set x $ac_tag
32022   IFS=$ac_save_IFS
32023   shift
32024   ac_file=$1
32025   shift
32026
32027   case $ac_mode in
32028   :L) ac_source=$1;;
32029   :[FH])
32030     ac_file_inputs=
32031     for ac_f
32032     do
32033       case $ac_f in
32034       -) ac_f="$ac_tmp/stdin";;
32035       *) # Look for the file first in the build tree, then in the source tree
32036          # (if the path is not absolute).  The absolute path cannot be DOS-style,
32037          # because $ac_f cannot contain `:'.
32038          test -f "$ac_f" ||
32039            case $ac_f in
32040            [\\/$]*) false;;
32041            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32042            esac ||
32043            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
32044       esac
32045       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32046       as_fn_append ac_file_inputs " '$ac_f'"
32047     done
32048
32049     # Let's still pretend it is `configure' which instantiates (i.e., don't
32050     # use $as_me), people would be surprised to read:
32051     #    /* config.h.  Generated by config.status.  */
32052     configure_input='Generated from '`
32053           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32054         `' by configure.'
32055     if test x"$ac_file" != x-; then
32056       configure_input="$ac_file.  $configure_input"
32057       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32058 $as_echo "$as_me: creating $ac_file" >&6;}
32059     fi
32060     # Neutralize special characters interpreted by sed in replacement strings.
32061     case $configure_input in #(
32062     *\&* | *\|* | *\\* )
32063        ac_sed_conf_input=`$as_echo "$configure_input" |
32064        sed 's/[\\\\&|]/\\\\&/g'`;; #(
32065     *) ac_sed_conf_input=$configure_input;;
32066     esac
32067
32068     case $ac_tag in
32069     *:-:* | *:-) cat >"$ac_tmp/stdin" \
32070       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
32071     esac
32072     ;;
32073   esac
32074
32075   ac_dir=`$as_dirname -- "$ac_file" ||
32076 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32077          X"$ac_file" : 'X\(//\)[^/]' \| \
32078          X"$ac_file" : 'X\(//\)$' \| \
32079          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32080 $as_echo X"$ac_file" |
32081     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32082             s//\1/
32083             q
32084           }
32085           /^X\(\/\/\)[^/].*/{
32086             s//\1/
32087             q
32088           }
32089           /^X\(\/\/\)$/{
32090             s//\1/
32091             q
32092           }
32093           /^X\(\/\).*/{
32094             s//\1/
32095             q
32096           }
32097           s/.*/./; q'`
32098   as_dir="$ac_dir"; as_fn_mkdir_p
32099   ac_builddir=.
32100
32101 case "$ac_dir" in
32102 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32103 *)
32104   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32105   # A ".." for each directory in $ac_dir_suffix.
32106   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32107   case $ac_top_builddir_sub in
32108   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32109   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32110   esac ;;
32111 esac
32112 ac_abs_top_builddir=$ac_pwd
32113 ac_abs_builddir=$ac_pwd$ac_dir_suffix
32114 # for backward compatibility:
32115 ac_top_builddir=$ac_top_build_prefix
32116
32117 case $srcdir in
32118   .)  # We are building in place.
32119     ac_srcdir=.
32120     ac_top_srcdir=$ac_top_builddir_sub
32121     ac_abs_top_srcdir=$ac_pwd ;;
32122   [\\/]* | ?:[\\/]* )  # Absolute name.
32123     ac_srcdir=$srcdir$ac_dir_suffix;
32124     ac_top_srcdir=$srcdir
32125     ac_abs_top_srcdir=$srcdir ;;
32126   *) # Relative name.
32127     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32128     ac_top_srcdir=$ac_top_build_prefix$srcdir
32129     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32130 esac
32131 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32132
32133
32134   case $ac_mode in
32135   :F)
32136   #
32137   # CONFIG_FILE
32138   #
32139
32140   case $INSTALL in
32141   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
32142   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
32143   esac
32144   ac_MKDIR_P=$MKDIR_P
32145   case $MKDIR_P in
32146   [\\/$]* | ?:[\\/]* ) ;;
32147   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
32148   esac
32149 _ACEOF
32150
32151 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32152 # If the template does not know about datarootdir, expand it.
32153 # FIXME: This hack should be removed a few years after 2.60.
32154 ac_datarootdir_hack=; ac_datarootdir_seen=
32155 ac_sed_dataroot='
32156 /datarootdir/ {
32157   p
32158   q
32159 }
32160 /@datadir@/p
32161 /@docdir@/p
32162 /@infodir@/p
32163 /@localedir@/p
32164 /@mandir@/p'
32165 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32166 *datarootdir*) ac_datarootdir_seen=yes;;
32167 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32168   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32169 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32170 _ACEOF
32171 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32172   ac_datarootdir_hack='
32173   s&@datadir@&$datadir&g
32174   s&@docdir@&$docdir&g
32175   s&@infodir@&$infodir&g
32176   s&@localedir@&$localedir&g
32177   s&@mandir@&$mandir&g
32178   s&\\\${datarootdir}&$datarootdir&g' ;;
32179 esac
32180 _ACEOF
32181
32182 # Neutralize VPATH when `$srcdir' = `.'.
32183 # Shell code in configure.ac might set extrasub.
32184 # FIXME: do we really want to maintain this feature?
32185 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32186 ac_sed_extra="$ac_vpsub
32187 $extrasub
32188 _ACEOF
32189 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32190 :t
32191 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32192 s|@configure_input@|$ac_sed_conf_input|;t t
32193 s&@top_builddir@&$ac_top_builddir_sub&;t t
32194 s&@top_build_prefix@&$ac_top_build_prefix&;t t
32195 s&@srcdir@&$ac_srcdir&;t t
32196 s&@abs_srcdir@&$ac_abs_srcdir&;t t
32197 s&@top_srcdir@&$ac_top_srcdir&;t t
32198 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32199 s&@builddir@&$ac_builddir&;t t
32200 s&@abs_builddir@&$ac_abs_builddir&;t t
32201 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32202 s&@INSTALL@&$ac_INSTALL&;t t
32203 s&@MKDIR_P@&$ac_MKDIR_P&;t t
32204 $ac_datarootdir_hack
32205 "
32206 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
32207   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32208
32209 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32210   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
32211   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
32212       "$ac_tmp/out"`; test -z "$ac_out"; } &&
32213   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32214 which seems to be undefined.  Please make sure it is defined" >&5
32215 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32216 which seems to be undefined.  Please make sure it is defined" >&2;}
32217
32218   rm -f "$ac_tmp/stdin"
32219   case $ac_file in
32220   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
32221   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
32222   esac \
32223   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32224  ;;
32225   :H)
32226   #
32227   # CONFIG_HEADER
32228   #
32229   if test x"$ac_file" != x-; then
32230     {
32231       $as_echo "/* $configure_input  */" \
32232       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
32233     } >"$ac_tmp/config.h" \
32234       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32235     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
32236       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32237 $as_echo "$as_me: $ac_file is unchanged" >&6;}
32238     else
32239       rm -f "$ac_file"
32240       mv "$ac_tmp/config.h" "$ac_file" \
32241         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32242     fi
32243   else
32244     $as_echo "/* $configure_input  */" \
32245       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
32246       || as_fn_error $? "could not create -" "$LINENO" 5
32247   fi
32248 # Compute "$ac_file"'s index in $config_headers.
32249 _am_arg="$ac_file"
32250 _am_stamp_count=1
32251 for _am_header in $config_headers :; do
32252   case $_am_header in
32253     $_am_arg | $_am_arg:* )
32254       break ;;
32255     * )
32256       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
32257   esac
32258 done
32259 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
32260 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32261          X"$_am_arg" : 'X\(//\)[^/]' \| \
32262          X"$_am_arg" : 'X\(//\)$' \| \
32263          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
32264 $as_echo X"$_am_arg" |
32265     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32266             s//\1/
32267             q
32268           }
32269           /^X\(\/\/\)[^/].*/{
32270             s//\1/
32271             q
32272           }
32273           /^X\(\/\/\)$/{
32274             s//\1/
32275             q
32276           }
32277           /^X\(\/\).*/{
32278             s//\1/
32279             q
32280           }
32281           s/.*/./; q'`/stamp-h$_am_stamp_count
32282  ;;
32283
32284   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
32285 $as_echo "$as_me: executing $ac_file commands" >&6;}
32286  ;;
32287   esac
32288
32289
32290   case $ac_file$ac_mode in
32291     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
32292   # Older Autoconf quotes --file arguments for eval, but not when files
32293   # are listed without --file.  Let's play safe and only enable the eval
32294   # if we detect the quoting.
32295   case $CONFIG_FILES in
32296   *\'*) eval set x "$CONFIG_FILES" ;;
32297   *)   set x $CONFIG_FILES ;;
32298   esac
32299   shift
32300   for mf
32301   do
32302     # Strip MF so we end up with the name of the file.
32303     mf=`echo "$mf" | sed -e 's/:.*$//'`
32304     # Check whether this is an Automake generated Makefile or not.
32305     # We used to match only the files named 'Makefile.in', but
32306     # some people rename them; so instead we look at the file content.
32307     # Grep'ing the first line is not enough: some people post-process
32308     # each Makefile.in and add a new line on top of each file to say so.
32309     # Grep'ing the whole file is not good either: AIX grep has a line
32310     # limit of 2048, but all sed's we know have understand at least 4000.
32311     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
32312       dirpart=`$as_dirname -- "$mf" ||
32313 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32314          X"$mf" : 'X\(//\)[^/]' \| \
32315          X"$mf" : 'X\(//\)$' \| \
32316          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
32317 $as_echo X"$mf" |
32318     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32319             s//\1/
32320             q
32321           }
32322           /^X\(\/\/\)[^/].*/{
32323             s//\1/
32324             q
32325           }
32326           /^X\(\/\/\)$/{
32327             s//\1/
32328             q
32329           }
32330           /^X\(\/\).*/{
32331             s//\1/
32332             q
32333           }
32334           s/.*/./; q'`
32335     else
32336       continue
32337     fi
32338     # Extract the definition of DEPDIR, am__include, and am__quote
32339     # from the Makefile without running 'make'.
32340     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
32341     test -z "$DEPDIR" && continue
32342     am__include=`sed -n 's/^am__include = //p' < "$mf"`
32343     test -z "$am__include" && continue
32344     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
32345     # Find all dependency output files, they are included files with
32346     # $(DEPDIR) in their names.  We invoke sed twice because it is the
32347     # simplest approach to changing $(DEPDIR) to its actual value in the
32348     # expansion.
32349     for file in `sed -n "
32350       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
32351          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
32352       # Make sure the directory exists.
32353       test -f "$dirpart/$file" && continue
32354       fdir=`$as_dirname -- "$file" ||
32355 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32356          X"$file" : 'X\(//\)[^/]' \| \
32357          X"$file" : 'X\(//\)$' \| \
32358          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
32359 $as_echo X"$file" |
32360     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32361             s//\1/
32362             q
32363           }
32364           /^X\(\/\/\)[^/].*/{
32365             s//\1/
32366             q
32367           }
32368           /^X\(\/\/\)$/{
32369             s//\1/
32370             q
32371           }
32372           /^X\(\/\).*/{
32373             s//\1/
32374             q
32375           }
32376           s/.*/./; q'`
32377       as_dir=$dirpart/$fdir; as_fn_mkdir_p
32378       # echo "creating $dirpart/$file"
32379       echo '# dummy' > "$dirpart/$file"
32380     done
32381   done
32382 }
32383  ;;
32384     "libtool":C)
32385
32386     # See if we are running on zsh, and set the options which allow our
32387     # commands through without removal of \ escapes.
32388     if test -n "${ZSH_VERSION+set}" ; then
32389       setopt NO_GLOB_SUBST
32390     fi
32391
32392     cfgfile="${ofile}T"
32393     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
32394     $RM "$cfgfile"
32395
32396     cat <<_LT_EOF >> "$cfgfile"
32397 #! $SHELL
32398
32399 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
32400 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
32401 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
32402 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
32403 #
32404 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
32405 #                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
32406 #                 Inc.
32407 #   Written by Gordon Matzigkeit, 1996
32408 #
32409 #   This file is part of GNU Libtool.
32410 #
32411 # GNU Libtool is free software; you can redistribute it and/or
32412 # modify it under the terms of the GNU General Public License as
32413 # published by the Free Software Foundation; either version 2 of
32414 # the License, or (at your option) any later version.
32415 #
32416 # As a special exception to the GNU General Public License,
32417 # if you distribute this file as part of a program or library that
32418 # is built using GNU Libtool, you may include this file under the
32419 # same distribution terms that you use for the rest of that program.
32420 #
32421 # GNU Libtool is distributed in the hope that it will be useful,
32422 # but WITHOUT ANY WARRANTY; without even the implied warranty of
32423 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
32424 # GNU General Public License for more details.
32425 #
32426 # You should have received a copy of the GNU General Public License
32427 # along with GNU Libtool; see the file COPYING.  If not, a copy
32428 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
32429 # obtained by writing to the Free Software Foundation, Inc.,
32430 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
32431
32432
32433 # The names of the tagged configurations supported by this script.
32434 available_tags="CXX "
32435
32436 # ### BEGIN LIBTOOL CONFIG
32437
32438 # A sed program that does not truncate output.
32439 SED=$lt_SED
32440
32441 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
32442 Xsed="\$SED -e 1s/^X//"
32443
32444 # A grep program that handles long lines.
32445 GREP=$lt_GREP
32446
32447 # An ERE matcher.
32448 EGREP=$lt_EGREP
32449
32450 # A literal string matcher.
32451 FGREP=$lt_FGREP
32452
32453 # Shell to use when invoking shell scripts.
32454 SHELL=$lt_SHELL
32455
32456 # An echo program that protects backslashes.
32457 ECHO=$lt_ECHO
32458
32459 # Whether or not to build shared libraries.
32460 build_libtool_libs=$enable_shared
32461
32462 # Which release of libtool.m4 was used?
32463 macro_version=$macro_version
32464 macro_revision=$macro_revision
32465
32466 # Whether or not to build static libraries.
32467 build_old_libs=$enable_static
32468
32469 # What type of objects to build.
32470 pic_mode=$pic_mode
32471
32472 # Whether or not to optimize for fast installation.
32473 fast_install=$enable_fast_install
32474
32475 # The host system.
32476 host_alias=$host_alias
32477 host=$host
32478 host_os=$host_os
32479
32480 # The build system.
32481 build_alias=$build_alias
32482 build=$build
32483 build_os=$build_os
32484
32485 # A BSD- or MS-compatible name lister.
32486 NM=$lt_NM
32487
32488 # Whether we need soft or hard links.
32489 LN_S=$lt_LN_S
32490
32491 # What is the maximum length of a command?
32492 max_cmd_len=$max_cmd_len
32493
32494 # Object file suffix (normally "o").
32495 objext=$ac_objext
32496
32497 # Executable file suffix (normally "").
32498 exeext=$exeext
32499
32500 # whether the shell understands "unset".
32501 lt_unset=$lt_unset
32502
32503 # turn spaces into newlines.
32504 SP2NL=$lt_lt_SP2NL
32505
32506 # turn newlines into spaces.
32507 NL2SP=$lt_lt_NL2SP
32508
32509 # convert \$build file names to \$host format.
32510 to_host_file_cmd=$lt_cv_to_host_file_cmd
32511
32512 # convert \$build files to toolchain format.
32513 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
32514
32515 # An object symbol dumper.
32516 OBJDUMP=$lt_OBJDUMP
32517
32518 # Method to check whether dependent libraries are shared objects.
32519 deplibs_check_method=$lt_deplibs_check_method
32520
32521 # Command to use when deplibs_check_method = "file_magic".
32522 file_magic_cmd=$lt_file_magic_cmd
32523
32524 # How to find potential files when deplibs_check_method = "file_magic".
32525 file_magic_glob=$lt_file_magic_glob
32526
32527 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
32528 want_nocaseglob=$lt_want_nocaseglob
32529
32530 # DLL creation program.
32531 DLLTOOL=$lt_DLLTOOL
32532
32533 # Command to associate shared and link libraries.
32534 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
32535
32536 # The archiver.
32537 AR=$lt_AR
32538
32539 # Flags to create an archive.
32540 AR_FLAGS=$lt_AR_FLAGS
32541
32542 # How to feed a file listing to the archiver.
32543 archiver_list_spec=$lt_archiver_list_spec
32544
32545 # A symbol stripping program.
32546 STRIP=$lt_STRIP
32547
32548 # Commands used to install an old-style archive.
32549 RANLIB=$lt_RANLIB
32550 old_postinstall_cmds=$lt_old_postinstall_cmds
32551 old_postuninstall_cmds=$lt_old_postuninstall_cmds
32552
32553 # Whether to use a lock for old archive extraction.
32554 lock_old_archive_extraction=$lock_old_archive_extraction
32555
32556 # A C compiler.
32557 LTCC=$lt_CC
32558
32559 # LTCC compiler flags.
32560 LTCFLAGS=$lt_CFLAGS
32561
32562 # Take the output of nm and produce a listing of raw symbols and C names.
32563 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
32564
32565 # Transform the output of nm in a proper C declaration.
32566 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
32567
32568 # Transform the output of nm in a C name address pair.
32569 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
32570
32571 # Transform the output of nm in a C name address pair when lib prefix is needed.
32572 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
32573
32574 # Specify filename containing input files for \$NM.
32575 nm_file_list_spec=$lt_nm_file_list_spec
32576
32577 # The root where to search for dependent libraries,and in which our libraries should be installed.
32578 lt_sysroot=$lt_sysroot
32579
32580 # The name of the directory that contains temporary libtool files.
32581 objdir=$objdir
32582
32583 # Used to examine libraries when file_magic_cmd begins with "file".
32584 MAGIC_CMD=$MAGIC_CMD
32585
32586 # Must we lock files when doing compilation?
32587 need_locks=$lt_need_locks
32588
32589 # Manifest tool.
32590 MANIFEST_TOOL=$lt_MANIFEST_TOOL
32591
32592 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
32593 DSYMUTIL=$lt_DSYMUTIL
32594
32595 # Tool to change global to local symbols on Mac OS X.
32596 NMEDIT=$lt_NMEDIT
32597
32598 # Tool to manipulate fat objects and archives on Mac OS X.
32599 LIPO=$lt_LIPO
32600
32601 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
32602 OTOOL=$lt_OTOOL
32603
32604 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
32605 OTOOL64=$lt_OTOOL64
32606
32607 # Old archive suffix (normally "a").
32608 libext=$libext
32609
32610 # Shared library suffix (normally ".so").
32611 shrext_cmds=$lt_shrext_cmds
32612
32613 # The commands to extract the exported symbol list from a shared archive.
32614 extract_expsyms_cmds=$lt_extract_expsyms_cmds
32615
32616 # Variables whose values should be saved in libtool wrapper scripts and
32617 # restored at link time.
32618 variables_saved_for_relink=$lt_variables_saved_for_relink
32619
32620 # Do we need the "lib" prefix for modules?
32621 need_lib_prefix=$need_lib_prefix
32622
32623 # Do we need a version for libraries?
32624 need_version=$need_version
32625
32626 # Library versioning type.
32627 version_type=$version_type
32628
32629 # Shared library runtime path variable.
32630 runpath_var=$runpath_var
32631
32632 # Shared library path variable.
32633 shlibpath_var=$shlibpath_var
32634
32635 # Is shlibpath searched before the hard-coded library search path?
32636 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
32637
32638 # Format of library name prefix.
32639 libname_spec=$lt_libname_spec
32640
32641 # List of archive names.  First name is the real one, the rest are links.
32642 # The last name is the one that the linker finds with -lNAME
32643 library_names_spec=$lt_library_names_spec
32644
32645 # The coded name of the library, if different from the real name.
32646 soname_spec=$lt_soname_spec
32647
32648 # Permission mode override for installation of shared libraries.
32649 install_override_mode=$lt_install_override_mode
32650
32651 # Command to use after installation of a shared archive.
32652 postinstall_cmds=$lt_postinstall_cmds
32653
32654 # Command to use after uninstallation of a shared archive.
32655 postuninstall_cmds=$lt_postuninstall_cmds
32656
32657 # Commands used to finish a libtool library installation in a directory.
32658 finish_cmds=$lt_finish_cmds
32659
32660 # As "finish_cmds", except a single script fragment to be evaled but
32661 # not shown.
32662 finish_eval=$lt_finish_eval
32663
32664 # Whether we should hardcode library paths into libraries.
32665 hardcode_into_libs=$hardcode_into_libs
32666
32667 # Compile-time system search path for libraries.
32668 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
32669
32670 # Run-time system search path for libraries.
32671 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
32672
32673 # Whether dlopen is supported.
32674 dlopen_support=$enable_dlopen
32675
32676 # Whether dlopen of programs is supported.
32677 dlopen_self=$enable_dlopen_self
32678
32679 # Whether dlopen of statically linked programs is supported.
32680 dlopen_self_static=$enable_dlopen_self_static
32681
32682 # Commands to strip libraries.
32683 old_striplib=$lt_old_striplib
32684 striplib=$lt_striplib
32685
32686
32687 # The linker used to build libraries.
32688 LD=$lt_LD
32689
32690 # How to create reloadable object files.
32691 reload_flag=$lt_reload_flag
32692 reload_cmds=$lt_reload_cmds
32693
32694 # Commands used to build an old-style archive.
32695 old_archive_cmds=$lt_old_archive_cmds
32696
32697 # A language specific compiler.
32698 CC=$lt_compiler
32699
32700 # Is the compiler the GNU compiler?
32701 with_gcc=$GCC
32702
32703 # Compiler flag to turn off builtin functions.
32704 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
32705
32706 # Additional compiler flags for building library objects.
32707 pic_flag=$lt_lt_prog_compiler_pic
32708
32709 # How to pass a linker flag through the compiler.
32710 wl=$lt_lt_prog_compiler_wl
32711
32712 # Compiler flag to prevent dynamic linking.
32713 link_static_flag=$lt_lt_prog_compiler_static
32714
32715 # Does compiler simultaneously support -c and -o options?
32716 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
32717
32718 # Whether or not to add -lc for building shared libraries.
32719 build_libtool_need_lc=$archive_cmds_need_lc
32720
32721 # Whether or not to disallow shared libs when runtime libs are static.
32722 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
32723
32724 # Compiler flag to allow reflexive dlopens.
32725 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
32726
32727 # Compiler flag to generate shared objects directly from archives.
32728 whole_archive_flag_spec=$lt_whole_archive_flag_spec
32729
32730 # Whether the compiler copes with passing no objects directly.
32731 compiler_needs_object=$lt_compiler_needs_object
32732
32733 # Create an old-style archive from a shared archive.
32734 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
32735
32736 # Create a temporary old-style archive to link instead of a shared archive.
32737 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
32738
32739 # Commands used to build a shared archive.
32740 archive_cmds=$lt_archive_cmds
32741 archive_expsym_cmds=$lt_archive_expsym_cmds
32742
32743 # Commands used to build a loadable module if different from building
32744 # a shared archive.
32745 module_cmds=$lt_module_cmds
32746 module_expsym_cmds=$lt_module_expsym_cmds
32747
32748 # Whether we are building with GNU ld or not.
32749 with_gnu_ld=$lt_with_gnu_ld
32750
32751 # Flag that allows shared libraries with undefined symbols to be built.
32752 allow_undefined_flag=$lt_allow_undefined_flag
32753
32754 # Flag that enforces no undefined symbols.
32755 no_undefined_flag=$lt_no_undefined_flag
32756
32757 # Flag to hardcode \$libdir into a binary during linking.
32758 # This must work even if \$libdir does not exist
32759 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
32760
32761 # If ld is used when linking, flag to hardcode \$libdir into a binary
32762 # during linking.  This must work even if \$libdir does not exist.
32763 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
32764
32765 # Whether we need a single "-rpath" flag with a separated argument.
32766 hardcode_libdir_separator=$lt_hardcode_libdir_separator
32767
32768 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
32769 # DIR into the resulting binary.
32770 hardcode_direct=$hardcode_direct
32771
32772 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
32773 # DIR into the resulting binary and the resulting library dependency is
32774 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
32775 # library is relocated.
32776 hardcode_direct_absolute=$hardcode_direct_absolute
32777
32778 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
32779 # into the resulting binary.
32780 hardcode_minus_L=$hardcode_minus_L
32781
32782 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
32783 # into the resulting binary.
32784 hardcode_shlibpath_var=$hardcode_shlibpath_var
32785
32786 # Set to "yes" if building a shared library automatically hardcodes DIR
32787 # into the library and all subsequent libraries and executables linked
32788 # against it.
32789 hardcode_automatic=$hardcode_automatic
32790
32791 # Set to yes if linker adds runtime paths of dependent libraries
32792 # to runtime path list.
32793 inherit_rpath=$inherit_rpath
32794
32795 # Whether libtool must link a program against all its dependency libraries.
32796 link_all_deplibs=$link_all_deplibs
32797
32798 # Set to "yes" if exported symbols are required.
32799 always_export_symbols=$always_export_symbols
32800
32801 # The commands to list exported symbols.
32802 export_symbols_cmds=$lt_export_symbols_cmds
32803
32804 # Symbols that should not be listed in the preloaded symbols.
32805 exclude_expsyms=$lt_exclude_expsyms
32806
32807 # Symbols that must always be exported.
32808 include_expsyms=$lt_include_expsyms
32809
32810 # Commands necessary for linking programs (against libraries) with templates.
32811 prelink_cmds=$lt_prelink_cmds
32812
32813 # Commands necessary for finishing linking programs.
32814 postlink_cmds=$lt_postlink_cmds
32815
32816 # Specify filename containing input files.
32817 file_list_spec=$lt_file_list_spec
32818
32819 # How to hardcode a shared library path into an executable.
32820 hardcode_action=$hardcode_action
32821
32822 # The directories searched by this compiler when creating a shared library.
32823 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
32824
32825 # Dependencies to place before and after the objects being linked to
32826 # create a shared library.
32827 predep_objects=$lt_predep_objects
32828 postdep_objects=$lt_postdep_objects
32829 predeps=$lt_predeps
32830 postdeps=$lt_postdeps
32831
32832 # The library search path used internally by the compiler when linking
32833 # a shared library.
32834 compiler_lib_search_path=$lt_compiler_lib_search_path
32835
32836 # ### END LIBTOOL CONFIG
32837
32838 _LT_EOF
32839
32840   case $host_os in
32841   aix3*)
32842     cat <<\_LT_EOF >> "$cfgfile"
32843 # AIX sometimes has problems with the GCC collect2 program.  For some
32844 # reason, if we set the COLLECT_NAMES environment variable, the problems
32845 # vanish in a puff of smoke.
32846 if test "X${COLLECT_NAMES+set}" != Xset; then
32847   COLLECT_NAMES=
32848   export COLLECT_NAMES
32849 fi
32850 _LT_EOF
32851     ;;
32852   esac
32853
32854
32855 ltmain="$ac_aux_dir/ltmain.sh"
32856
32857
32858   # We use sed instead of cat because bash on DJGPP gets confused if
32859   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
32860   # text mode, it properly converts lines to CR/LF.  This bash problem
32861   # is reportedly fixed, but why not run on old versions too?
32862   sed '$q' "$ltmain" >> "$cfgfile" \
32863      || (rm -f "$cfgfile"; exit 1)
32864
32865   if test x"$xsi_shell" = xyes; then
32866   sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
32867 func_dirname ()\
32868 {\
32869 \    case ${1} in\
32870 \      */*) func_dirname_result="${1%/*}${2}" ;;\
32871 \      *  ) func_dirname_result="${3}" ;;\
32872 \    esac\
32873 } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
32874   && mv -f "$cfgfile.tmp" "$cfgfile" \
32875     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32876 test 0 -eq $? || _lt_function_replace_fail=:
32877
32878
32879   sed -e '/^func_basename ()$/,/^} # func_basename /c\
32880 func_basename ()\
32881 {\
32882 \    func_basename_result="${1##*/}"\
32883 } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
32884   && mv -f "$cfgfile.tmp" "$cfgfile" \
32885     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32886 test 0 -eq $? || _lt_function_replace_fail=:
32887
32888
32889   sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
32890 func_dirname_and_basename ()\
32891 {\
32892 \    case ${1} in\
32893 \      */*) func_dirname_result="${1%/*}${2}" ;;\
32894 \      *  ) func_dirname_result="${3}" ;;\
32895 \    esac\
32896 \    func_basename_result="${1##*/}"\
32897 } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
32898   && mv -f "$cfgfile.tmp" "$cfgfile" \
32899     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32900 test 0 -eq $? || _lt_function_replace_fail=:
32901
32902
32903   sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
32904 func_stripname ()\
32905 {\
32906 \    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
32907 \    # positional parameters, so assign one to ordinary parameter first.\
32908 \    func_stripname_result=${3}\
32909 \    func_stripname_result=${func_stripname_result#"${1}"}\
32910 \    func_stripname_result=${func_stripname_result%"${2}"}\
32911 } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
32912   && mv -f "$cfgfile.tmp" "$cfgfile" \
32913     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32914 test 0 -eq $? || _lt_function_replace_fail=:
32915
32916
32917   sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
32918 func_split_long_opt ()\
32919 {\
32920 \    func_split_long_opt_name=${1%%=*}\
32921 \    func_split_long_opt_arg=${1#*=}\
32922 } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
32923   && mv -f "$cfgfile.tmp" "$cfgfile" \
32924     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32925 test 0 -eq $? || _lt_function_replace_fail=:
32926
32927
32928   sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
32929 func_split_short_opt ()\
32930 {\
32931 \    func_split_short_opt_arg=${1#??}\
32932 \    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
32933 } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
32934   && mv -f "$cfgfile.tmp" "$cfgfile" \
32935     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32936 test 0 -eq $? || _lt_function_replace_fail=:
32937
32938
32939   sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
32940 func_lo2o ()\
32941 {\
32942 \    case ${1} in\
32943 \      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
32944 \      *)    func_lo2o_result=${1} ;;\
32945 \    esac\
32946 } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
32947   && mv -f "$cfgfile.tmp" "$cfgfile" \
32948     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32949 test 0 -eq $? || _lt_function_replace_fail=:
32950
32951
32952   sed -e '/^func_xform ()$/,/^} # func_xform /c\
32953 func_xform ()\
32954 {\
32955     func_xform_result=${1%.*}.lo\
32956 } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
32957   && mv -f "$cfgfile.tmp" "$cfgfile" \
32958     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32959 test 0 -eq $? || _lt_function_replace_fail=:
32960
32961
32962   sed -e '/^func_arith ()$/,/^} # func_arith /c\
32963 func_arith ()\
32964 {\
32965     func_arith_result=$(( $* ))\
32966 } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
32967   && mv -f "$cfgfile.tmp" "$cfgfile" \
32968     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32969 test 0 -eq $? || _lt_function_replace_fail=:
32970
32971
32972   sed -e '/^func_len ()$/,/^} # func_len /c\
32973 func_len ()\
32974 {\
32975     func_len_result=${#1}\
32976 } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
32977   && mv -f "$cfgfile.tmp" "$cfgfile" \
32978     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32979 test 0 -eq $? || _lt_function_replace_fail=:
32980
32981 fi
32982
32983 if test x"$lt_shell_append" = xyes; then
32984   sed -e '/^func_append ()$/,/^} # func_append /c\
32985 func_append ()\
32986 {\
32987     eval "${1}+=\\${2}"\
32988 } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
32989   && mv -f "$cfgfile.tmp" "$cfgfile" \
32990     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32991 test 0 -eq $? || _lt_function_replace_fail=:
32992
32993
32994   sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
32995 func_append_quoted ()\
32996 {\
32997 \    func_quote_for_eval "${2}"\
32998 \    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
32999 } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
33000   && mv -f "$cfgfile.tmp" "$cfgfile" \
33001     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33002 test 0 -eq $? || _lt_function_replace_fail=:
33003
33004
33005   # Save a `func_append' function call where possible by direct use of '+='
33006   sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
33007     && mv -f "$cfgfile.tmp" "$cfgfile" \
33008       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33009   test 0 -eq $? || _lt_function_replace_fail=:
33010 else
33011   # Save a `func_append' function call even when '+=' is not available
33012   sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
33013     && mv -f "$cfgfile.tmp" "$cfgfile" \
33014       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33015   test 0 -eq $? || _lt_function_replace_fail=:
33016 fi
33017
33018 if test x"$_lt_function_replace_fail" = x":"; then
33019   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
33020 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
33021 fi
33022
33023
33024    mv -f "$cfgfile" "$ofile" ||
33025     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
33026   chmod +x "$ofile"
33027
33028
33029     cat <<_LT_EOF >> "$ofile"
33030
33031 # ### BEGIN LIBTOOL TAG CONFIG: CXX
33032
33033 # The linker used to build libraries.
33034 LD=$lt_LD_CXX
33035
33036 # How to create reloadable object files.
33037 reload_flag=$lt_reload_flag_CXX
33038 reload_cmds=$lt_reload_cmds_CXX
33039
33040 # Commands used to build an old-style archive.
33041 old_archive_cmds=$lt_old_archive_cmds_CXX
33042
33043 # A language specific compiler.
33044 CC=$lt_compiler_CXX
33045
33046 # Is the compiler the GNU compiler?
33047 with_gcc=$GCC_CXX
33048
33049 # Compiler flag to turn off builtin functions.
33050 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
33051
33052 # Additional compiler flags for building library objects.
33053 pic_flag=$lt_lt_prog_compiler_pic_CXX
33054
33055 # How to pass a linker flag through the compiler.
33056 wl=$lt_lt_prog_compiler_wl_CXX
33057
33058 # Compiler flag to prevent dynamic linking.
33059 link_static_flag=$lt_lt_prog_compiler_static_CXX
33060
33061 # Does compiler simultaneously support -c and -o options?
33062 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
33063
33064 # Whether or not to add -lc for building shared libraries.
33065 build_libtool_need_lc=$archive_cmds_need_lc_CXX
33066
33067 # Whether or not to disallow shared libs when runtime libs are static.
33068 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
33069
33070 # Compiler flag to allow reflexive dlopens.
33071 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
33072
33073 # Compiler flag to generate shared objects directly from archives.
33074 whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
33075
33076 # Whether the compiler copes with passing no objects directly.
33077 compiler_needs_object=$lt_compiler_needs_object_CXX
33078
33079 # Create an old-style archive from a shared archive.
33080 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
33081
33082 # Create a temporary old-style archive to link instead of a shared archive.
33083 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
33084
33085 # Commands used to build a shared archive.
33086 archive_cmds=$lt_archive_cmds_CXX
33087 archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
33088
33089 # Commands used to build a loadable module if different from building
33090 # a shared archive.
33091 module_cmds=$lt_module_cmds_CXX
33092 module_expsym_cmds=$lt_module_expsym_cmds_CXX
33093
33094 # Whether we are building with GNU ld or not.
33095 with_gnu_ld=$lt_with_gnu_ld_CXX
33096
33097 # Flag that allows shared libraries with undefined symbols to be built.
33098 allow_undefined_flag=$lt_allow_undefined_flag_CXX
33099
33100 # Flag that enforces no undefined symbols.
33101 no_undefined_flag=$lt_no_undefined_flag_CXX
33102
33103 # Flag to hardcode \$libdir into a binary during linking.
33104 # This must work even if \$libdir does not exist
33105 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
33106
33107 # If ld is used when linking, flag to hardcode \$libdir into a binary
33108 # during linking.  This must work even if \$libdir does not exist.
33109 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
33110
33111 # Whether we need a single "-rpath" flag with a separated argument.
33112 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
33113
33114 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
33115 # DIR into the resulting binary.
33116 hardcode_direct=$hardcode_direct_CXX
33117
33118 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
33119 # DIR into the resulting binary and the resulting library dependency is
33120 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
33121 # library is relocated.
33122 hardcode_direct_absolute=$hardcode_direct_absolute_CXX
33123
33124 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
33125 # into the resulting binary.
33126 hardcode_minus_L=$hardcode_minus_L_CXX
33127
33128 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
33129 # into the resulting binary.
33130 hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
33131
33132 # Set to "yes" if building a shared library automatically hardcodes DIR
33133 # into the library and all subsequent libraries and executables linked
33134 # against it.
33135 hardcode_automatic=$hardcode_automatic_CXX
33136
33137 # Set to yes if linker adds runtime paths of dependent libraries
33138 # to runtime path list.
33139 inherit_rpath=$inherit_rpath_CXX
33140
33141 # Whether libtool must link a program against all its dependency libraries.
33142 link_all_deplibs=$link_all_deplibs_CXX
33143
33144 # Set to "yes" if exported symbols are required.
33145 always_export_symbols=$always_export_symbols_CXX
33146
33147 # The commands to list exported symbols.
33148 export_symbols_cmds=$lt_export_symbols_cmds_CXX
33149
33150 # Symbols that should not be listed in the preloaded symbols.
33151 exclude_expsyms=$lt_exclude_expsyms_CXX
33152
33153 # Symbols that must always be exported.
33154 include_expsyms=$lt_include_expsyms_CXX
33155
33156 # Commands necessary for linking programs (against libraries) with templates.
33157 prelink_cmds=$lt_prelink_cmds_CXX
33158
33159 # Commands necessary for finishing linking programs.
33160 postlink_cmds=$lt_postlink_cmds_CXX
33161
33162 # Specify filename containing input files.
33163 file_list_spec=$lt_file_list_spec_CXX
33164
33165 # How to hardcode a shared library path into an executable.
33166 hardcode_action=$hardcode_action_CXX
33167
33168 # The directories searched by this compiler when creating a shared library.
33169 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
33170
33171 # Dependencies to place before and after the objects being linked to
33172 # create a shared library.
33173 predep_objects=$lt_predep_objects_CXX
33174 postdep_objects=$lt_postdep_objects_CXX
33175 predeps=$lt_predeps_CXX
33176 postdeps=$lt_postdeps_CXX
33177
33178 # The library search path used internally by the compiler when linking
33179 # a shared library.
33180 compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
33181
33182 # ### END LIBTOOL TAG CONFIG: CXX
33183 _LT_EOF
33184
33185  ;;
33186
33187   esac
33188 done # for ac_tag
33189
33190
33191 as_fn_exit 0
33192 _ACEOF
33193 ac_clean_files=$ac_clean_files_save
33194
33195 test $ac_write_fail = 0 ||
33196   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33197
33198
33199 # configure is writing to config.log, and then calls config.status.
33200 # config.status does its own redirection, appending to config.log.
33201 # Unfortunately, on DOS this fails, as config.log is still kept open
33202 # by configure, so config.status won't be able to write to it; its
33203 # output is simply discarded.  So we exec the FD to /dev/null,
33204 # effectively closing config.log, so it can be properly (re)opened and
33205 # appended to by config.status.  When coming back to configure, we
33206 # need to make the FD available again.
33207 if test "$no_create" != yes; then
33208   ac_cs_success=:
33209   ac_config_status_args=
33210   test "$silent" = yes &&
33211     ac_config_status_args="$ac_config_status_args --quiet"
33212   exec 5>/dev/null
33213   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33214   exec 5>>config.log
33215   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33216   # would make configure fail if this is the last instruction.
33217   $ac_cs_success || as_fn_exit 1
33218 fi
33219
33220 #
33221 # CONFIG_SUBDIRS section.
33222 #
33223 if test "$no_recursion" != yes; then
33224
33225   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
33226   # so they do not pile up.
33227   ac_sub_configure_args=
33228   ac_prev=
33229   eval "set x $ac_configure_args"
33230   shift
33231   for ac_arg
33232   do
33233     if test -n "$ac_prev"; then
33234       ac_prev=
33235       continue
33236     fi
33237     case $ac_arg in
33238     -cache-file | --cache-file | --cache-fil | --cache-fi \
33239     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
33240       ac_prev=cache_file ;;
33241     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
33242     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
33243     | --c=*)
33244       ;;
33245     --config-cache | -C)
33246       ;;
33247     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
33248       ac_prev=srcdir ;;
33249     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
33250       ;;
33251     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
33252       ac_prev=prefix ;;
33253     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
33254       ;;
33255     --disable-option-checking)
33256       ;;
33257     *)
33258       case $ac_arg in
33259       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
33260       esac
33261       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
33262     esac
33263   done
33264
33265   # Always prepend --prefix to ensure using the same prefix
33266   # in subdir configurations.
33267   ac_arg="--prefix=$prefix"
33268   case $ac_arg in
33269   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
33270   esac
33271   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
33272
33273   # Pass --silent
33274   if test "$silent" = yes; then
33275     ac_sub_configure_args="--silent $ac_sub_configure_args"
33276   fi
33277
33278   # Always prepend --disable-option-checking to silence warnings, since
33279   # different subdirs can have different --enable and --with options.
33280   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
33281
33282   ac_popdir=`pwd`
33283   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
33284
33285     # Do not complain, so a configure script can configure whichever
33286     # parts of a large source tree are present.
33287     test -d "$srcdir/$ac_dir" || continue
33288
33289     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
33290     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
33291     $as_echo "$ac_msg" >&6
33292     as_dir="$ac_dir"; as_fn_mkdir_p
33293     ac_builddir=.
33294
33295 case "$ac_dir" in
33296 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33297 *)
33298   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33299   # A ".." for each directory in $ac_dir_suffix.
33300   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33301   case $ac_top_builddir_sub in
33302   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33303   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33304   esac ;;
33305 esac
33306 ac_abs_top_builddir=$ac_pwd
33307 ac_abs_builddir=$ac_pwd$ac_dir_suffix
33308 # for backward compatibility:
33309 ac_top_builddir=$ac_top_build_prefix
33310
33311 case $srcdir in
33312   .)  # We are building in place.
33313     ac_srcdir=.
33314     ac_top_srcdir=$ac_top_builddir_sub
33315     ac_abs_top_srcdir=$ac_pwd ;;
33316   [\\/]* | ?:[\\/]* )  # Absolute name.
33317     ac_srcdir=$srcdir$ac_dir_suffix;
33318     ac_top_srcdir=$srcdir
33319     ac_abs_top_srcdir=$srcdir ;;
33320   *) # Relative name.
33321     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
33322     ac_top_srcdir=$ac_top_build_prefix$srcdir
33323     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
33324 esac
33325 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
33326
33327
33328     cd "$ac_dir"
33329
33330     # Check for guested configure; otherwise get Cygnus style configure.
33331     if test -f "$ac_srcdir/configure.gnu"; then
33332       ac_sub_configure=$ac_srcdir/configure.gnu
33333     elif test -f "$ac_srcdir/configure"; then
33334       ac_sub_configure=$ac_srcdir/configure
33335     elif test -f "$ac_srcdir/configure.in"; then
33336       # This should be Cygnus configure.
33337       ac_sub_configure=$ac_aux_dir/configure
33338     else
33339       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
33340 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
33341       ac_sub_configure=
33342     fi
33343
33344     # The recursion is here.
33345     if test -n "$ac_sub_configure"; then
33346       # Make the cache file name correct relative to the subdirectory.
33347       case $cache_file in
33348       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
33349       *) # Relative name.
33350         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
33351       esac
33352
33353       { $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
33354 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
33355       # The eval makes quoting arguments work.
33356       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
33357            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
33358         as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
33359     fi
33360
33361     cd "$ac_popdir"
33362   done
33363 fi
33364 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33365   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33366 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33367 fi
33368