]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/ntp/sntp/configure
Fix ntp multiple vulnerabilities.
[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.8p7.
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.8p7'
594 PACKAGE_STRING='sntp 4.2.8p7'
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.8p7 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.8p7:";;
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.8p7
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.8p7, 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.8p7'
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
9693 $as_echo "#define NEED_EARLY_FORK 1" >>confdefs.h
9694
9695 esac
9696
9697 for ac_header in arpa/nameser.h sys/param.h sys/time.h sys/timers.h
9698 do :
9699   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9700 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9701 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9702   cat >>confdefs.h <<_ACEOF
9703 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9704 _ACEOF
9705
9706 fi
9707
9708 done
9709
9710 # sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
9711 for ac_header in sys/sysctl.h
9712 do :
9713   ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
9714     #if defined HAVE_SYS_PARAM_H
9715     # include <sys/param.h>
9716     #endif
9717
9718 "
9719 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
9720   cat >>confdefs.h <<_ACEOF
9721 #define HAVE_SYS_SYSCTL_H 1
9722 _ACEOF
9723
9724 fi
9725
9726 done
9727
9728 for ac_header in netinet/in_system.h netinet/in_systm.h netinet/in.h
9729 do :
9730   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9731 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9732 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9733   cat >>confdefs.h <<_ACEOF
9734 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9735 _ACEOF
9736
9737 fi
9738
9739 done
9740
9741
9742 for ac_header in resolv.h
9743 do :
9744   ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
9745     #ifdef HAVE_SYS_TYPES_H
9746     # include <sys/types.h>
9747     #endif
9748     #ifdef HAVE_NETINET_IN_H
9749     # include <netinet/in.h>
9750     #endif
9751     #ifdef HAVE_ARPA_NAMESER_H
9752     # include <arpa/nameser.h>
9753     #endif
9754
9755 "
9756 if test "x$ac_cv_header_resolv_h" = xyes; then :
9757   cat >>confdefs.h <<_ACEOF
9758 #define HAVE_RESOLV_H 1
9759 _ACEOF
9760
9761 fi
9762
9763 done
9764
9765
9766 for ac_header in net/if_var.h
9767 do :
9768   ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
9769     #if HAVE_SYS_TYPES_H
9770     # include <sys/types.h>
9771     #endif
9772     #ifdef HAVE_SYS_SOCKET_H
9773     # include <sys/socket.h>
9774     #endif
9775     #ifdef HAVE_NETINET_IN_H
9776     # include <netinet/in.h>
9777     #endif
9778     #ifdef HAVE_NET_IF_H
9779     # include <net/if.h>
9780     #endif
9781
9782 "
9783 if test "x$ac_cv_header_net_if_var_h" = xyes; then :
9784   cat >>confdefs.h <<_ACEOF
9785 #define HAVE_NET_IF_VAR_H 1
9786 _ACEOF
9787
9788 fi
9789
9790 done
9791
9792
9793 for ac_header in netinet/ip.h netinet/in_var.h
9794 do :
9795   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9796 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
9797     #ifdef HAVE_SYS_TYPES_H
9798     # include <sys/types.h>
9799     #endif
9800     #ifdef HAVE_SYS_SOCKET_H
9801     # include <sys/socket.h>
9802     #endif
9803     #ifdef HAVE_NET_IF_H
9804     # include <net/if.h>
9805     #endif
9806     #ifdef HAVE_NETINET_IN_H
9807     # include <netinet/in.h>
9808     #endif
9809     #ifdef HAVE_NET_IF_VAR_H
9810     # include <net/if_var.h>
9811     #endif
9812     #ifdef HAVE_NETINET_IN_SYSTM_H
9813     # include <netinet/in_systm.h>
9814     #endif
9815
9816 "
9817 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9818   cat >>confdefs.h <<_ACEOF
9819 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9820 _ACEOF
9821
9822 fi
9823
9824 done
9825
9826
9827 # HMS: Do we need to check for -lsocket before or after these tests?
9828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
9829 $as_echo_n "checking for library containing inet_pton... " >&6; }
9830 if ${ac_cv_search_inet_pton+:} false; then :
9831   $as_echo_n "(cached) " >&6
9832 else
9833   ac_func_search_save_LIBS=$LIBS
9834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9835 /* end confdefs.h.  */
9836
9837 /* Override any GCC internal prototype to avoid an error.
9838    Use char because int might match the return type of a GCC
9839    builtin and then its argument prototype would still apply.  */
9840 #ifdef __cplusplus
9841 extern "C"
9842 #endif
9843 char inet_pton ();
9844 int
9845 main ()
9846 {
9847 return inet_pton ();
9848   ;
9849   return 0;
9850 }
9851 _ACEOF
9852 for ac_lib in '' nsl; do
9853   if test -z "$ac_lib"; then
9854     ac_res="none required"
9855   else
9856     ac_res=-l$ac_lib
9857     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9858   fi
9859   if ac_fn_c_try_link "$LINENO"; then :
9860   ac_cv_search_inet_pton=$ac_res
9861 fi
9862 rm -f core conftest.err conftest.$ac_objext \
9863     conftest$ac_exeext
9864   if ${ac_cv_search_inet_pton+:} false; then :
9865   break
9866 fi
9867 done
9868 if ${ac_cv_search_inet_pton+:} false; then :
9869
9870 else
9871   ac_cv_search_inet_pton=no
9872 fi
9873 rm conftest.$ac_ext
9874 LIBS=$ac_func_search_save_LIBS
9875 fi
9876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
9877 $as_echo "$ac_cv_search_inet_pton" >&6; }
9878 ac_res=$ac_cv_search_inet_pton
9879 if test "$ac_res" != no; then :
9880   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9881   case "$ac_cv_search_inet_pton" in
9882  'none required') ;;
9883  no) ;;
9884  *) LDADD_LIBNTP="$ac_cv_search_inet_pton $LDADD_LIBNTP" ;;
9885  esac
9886
9887 fi
9888
9889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
9890 $as_echo_n "checking for library containing inet_ntop... " >&6; }
9891 if ${ac_cv_search_inet_ntop+:} false; then :
9892   $as_echo_n "(cached) " >&6
9893 else
9894   ac_func_search_save_LIBS=$LIBS
9895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9896 /* end confdefs.h.  */
9897
9898 /* Override any GCC internal prototype to avoid an error.
9899    Use char because int might match the return type of a GCC
9900    builtin and then its argument prototype would still apply.  */
9901 #ifdef __cplusplus
9902 extern "C"
9903 #endif
9904 char inet_ntop ();
9905 int
9906 main ()
9907 {
9908 return inet_ntop ();
9909   ;
9910   return 0;
9911 }
9912 _ACEOF
9913 for ac_lib in '' resolv; do
9914   if test -z "$ac_lib"; then
9915     ac_res="none required"
9916   else
9917     ac_res=-l$ac_lib
9918     LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
9919   fi
9920   if ac_fn_c_try_link "$LINENO"; then :
9921   ac_cv_search_inet_ntop=$ac_res
9922 fi
9923 rm -f core conftest.err conftest.$ac_objext \
9924     conftest$ac_exeext
9925   if ${ac_cv_search_inet_ntop+:} false; then :
9926   break
9927 fi
9928 done
9929 if ${ac_cv_search_inet_ntop+:} false; then :
9930
9931 else
9932   ac_cv_search_inet_ntop=no
9933 fi
9934 rm conftest.$ac_ext
9935 LIBS=$ac_func_search_save_LIBS
9936 fi
9937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
9938 $as_echo "$ac_cv_search_inet_ntop" >&6; }
9939 ac_res=$ac_cv_search_inet_ntop
9940 if test "$ac_res" != no; then :
9941   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9942   case "$ac_cv_search_inet_ntop" in
9943  'none required') ;;
9944  no) ;;
9945  *) LDADD_LIBNTP="$ac_cv_search_inet_ntop $LDADD_LIBNTP" ;;
9946  esac
9947
9948 fi
9949
9950
9951 # [Bug 1628] On Solaris, we need -lxnet -lsocket.  Generalize this to
9952 # avoid keying on the OS name:  If we find socket functions in
9953 # libsocket, next try for them in libxnet without libsocket, if found,
9954 # list both.  If we simply tested libxnet first, we would find the
9955 # functions there and never add libsocket.  See also [Bug 660]
9956 # http://bugs.ntp.org/show_bug.cgi?id=660#c9
9957 saved_LIBS=$LIBS
9958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
9959 $as_echo_n "checking for library containing setsockopt... " >&6; }
9960 if ${ac_cv_search_setsockopt+:} false; then :
9961   $as_echo_n "(cached) " >&6
9962 else
9963   ac_func_search_save_LIBS=$LIBS
9964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9965 /* end confdefs.h.  */
9966
9967 /* Override any GCC internal prototype to avoid an error.
9968    Use char because int might match the return type of a GCC
9969    builtin and then its argument prototype would still apply.  */
9970 #ifdef __cplusplus
9971 extern "C"
9972 #endif
9973 char setsockopt ();
9974 int
9975 main ()
9976 {
9977 return setsockopt ();
9978   ;
9979   return 0;
9980 }
9981 _ACEOF
9982 for ac_lib in '' socket; do
9983   if test -z "$ac_lib"; then
9984     ac_res="none required"
9985   else
9986     ac_res=-l$ac_lib
9987     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9988   fi
9989   if ac_fn_c_try_link "$LINENO"; then :
9990   ac_cv_search_setsockopt=$ac_res
9991 fi
9992 rm -f core conftest.err conftest.$ac_objext \
9993     conftest$ac_exeext
9994   if ${ac_cv_search_setsockopt+:} false; then :
9995   break
9996 fi
9997 done
9998 if ${ac_cv_search_setsockopt+:} false; then :
9999
10000 else
10001   ac_cv_search_setsockopt=no
10002 fi
10003 rm conftest.$ac_ext
10004 LIBS=$ac_func_search_save_LIBS
10005 fi
10006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
10007 $as_echo "$ac_cv_search_setsockopt" >&6; }
10008 ac_res=$ac_cv_search_setsockopt
10009 if test "$ac_res" != no; then :
10010   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10011   case "$ac_cv_search_setsockopt" in
10012  'none required') ;;
10013  no) ;;
10014  *) LDADD_LIBNTP="$ac_cv_search_setsockopt $LDADD_LIBNTP" ;;
10015  esac
10016
10017 fi
10018
10019 case "$ac_cv_search_setsockopt" in
10020  -lsocket)
10021     LIBS="$saved_LIBS"
10022     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
10023 $as_echo_n "checking for library containing getsockopt... " >&6; }
10024 if ${ac_cv_search_getsockopt+:} false; then :
10025   $as_echo_n "(cached) " >&6
10026 else
10027   ac_func_search_save_LIBS=$LIBS
10028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10029 /* end confdefs.h.  */
10030
10031 /* Override any GCC internal prototype to avoid an error.
10032    Use char because int might match the return type of a GCC
10033    builtin and then its argument prototype would still apply.  */
10034 #ifdef __cplusplus
10035 extern "C"
10036 #endif
10037 char getsockopt ();
10038 int
10039 main ()
10040 {
10041 return getsockopt ();
10042   ;
10043   return 0;
10044 }
10045 _ACEOF
10046 for ac_lib in '' xnet; do
10047   if test -z "$ac_lib"; then
10048     ac_res="none required"
10049   else
10050     ac_res=-l$ac_lib
10051     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10052   fi
10053   if ac_fn_c_try_link "$LINENO"; then :
10054   ac_cv_search_getsockopt=$ac_res
10055 fi
10056 rm -f core conftest.err conftest.$ac_objext \
10057     conftest$ac_exeext
10058   if ${ac_cv_search_getsockopt+:} false; then :
10059   break
10060 fi
10061 done
10062 if ${ac_cv_search_getsockopt+:} false; then :
10063
10064 else
10065   ac_cv_search_getsockopt=no
10066 fi
10067 rm conftest.$ac_ext
10068 LIBS=$ac_func_search_save_LIBS
10069 fi
10070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
10071 $as_echo "$ac_cv_search_getsockopt" >&6; }
10072 ac_res=$ac_cv_search_getsockopt
10073 if test "$ac_res" != no; then :
10074   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10075   case "$ac_cv_search_getsockopt" in
10076  'none required') ;;
10077  no) ;;
10078  *) LDADD_LIBNTP="$ac_cv_search_getsockopt $LDADD_LIBNTP" ;;
10079  esac
10080
10081 fi
10082
10083     # XXX Possible trouble here - reading the comments above and looking at the
10084     # code below I wonder if we'll add -lxnet when we don't need it.
10085     # Also, do we need to add -lxnet to LDADD_LIBNTP, or perhaps see if it's
10086     # there when it is not needed?
10087     case "$ac_cv_search_getsockopt" in
10088      -lxnet)
10089         LIBS="-lxnet -lsocket $saved_LIBS"
10090         ;;
10091      *) LIBS="-lsocket $saved_LIBS"
10092         ;;
10093     esac
10094     ;;
10095 esac
10096 { saved_LIBS=; unset saved_LIBS;}
10097
10098 # Bug 2427 - look for recvmsg here.
10099 for ac_func in recvmsg
10100 do :
10101   ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
10102 if test "x$ac_cv_func_recvmsg" = xyes; then :
10103   cat >>confdefs.h <<_ACEOF
10104 #define HAVE_RECVMSG 1
10105 _ACEOF
10106
10107 fi
10108 done
10109
10110
10111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10112 $as_echo_n "checking for inline... " >&6; }
10113 if ${ac_cv_c_inline+:} false; then :
10114   $as_echo_n "(cached) " >&6
10115 else
10116   ac_cv_c_inline=no
10117 for ac_kw in inline __inline__ __inline; do
10118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10119 /* end confdefs.h.  */
10120 #ifndef __cplusplus
10121 typedef int foo_t;
10122 static $ac_kw foo_t static_foo () {return 0; }
10123 $ac_kw foo_t foo () {return 0; }
10124 #endif
10125
10126 _ACEOF
10127 if ac_fn_c_try_compile "$LINENO"; then :
10128   ac_cv_c_inline=$ac_kw
10129 fi
10130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10131   test "$ac_cv_c_inline" != no && break
10132 done
10133
10134 fi
10135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10136 $as_echo "$ac_cv_c_inline" >&6; }
10137
10138 case $ac_cv_c_inline in
10139   inline | yes) ;;
10140   *)
10141     case $ac_cv_c_inline in
10142       no) ac_val=;;
10143       *) ac_val=$ac_cv_c_inline;;
10144     esac
10145     cat >>confdefs.h <<_ACEOF
10146 #ifndef __cplusplus
10147 #define inline $ac_val
10148 #endif
10149 _ACEOF
10150     ;;
10151 esac
10152
10153
10154 case "$ac_cv_c_inline" in
10155  '')
10156     ;;
10157  *)
10158
10159 $as_echo "#define HAVE_INLINE 1" >>confdefs.h
10160
10161
10162 esac
10163
10164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10165 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10166 if ${ac_cv_header_time+:} false; then :
10167   $as_echo_n "(cached) " >&6
10168 else
10169   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10170 /* end confdefs.h.  */
10171 #include <sys/types.h>
10172 #include <sys/time.h>
10173 #include <time.h>
10174
10175 int
10176 main ()
10177 {
10178 if ((struct tm *) 0)
10179 return 0;
10180   ;
10181   return 0;
10182 }
10183 _ACEOF
10184 if ac_fn_c_try_compile "$LINENO"; then :
10185   ac_cv_header_time=yes
10186 else
10187   ac_cv_header_time=no
10188 fi
10189 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10190 fi
10191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10192 $as_echo "$ac_cv_header_time" >&6; }
10193 if test $ac_cv_header_time = yes; then
10194
10195 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
10196
10197 fi
10198
10199 # The cast to long int works around a bug in the HP C Compiler
10200 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10201 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10202 # This bug is HP SR number 8606223364.
10203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
10204 $as_echo_n "checking size of time_t... " >&6; }
10205 if ${ac_cv_sizeof_time_t+:} false; then :
10206   $as_echo_n "(cached) " >&6
10207 else
10208   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
10209
10210 else
10211   if test "$ac_cv_type_time_t" = yes; then
10212      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10213 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10214 as_fn_error 77 "cannot compute sizeof (time_t)
10215 See \`config.log' for more details" "$LINENO" 5; }
10216    else
10217      ac_cv_sizeof_time_t=0
10218    fi
10219 fi
10220
10221 fi
10222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
10223 $as_echo "$ac_cv_sizeof_time_t" >&6; }
10224
10225
10226
10227 cat >>confdefs.h <<_ACEOF
10228 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
10229 _ACEOF
10230
10231
10232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10233 $as_echo_n "checking whether char is unsigned... " >&6; }
10234 if ${ac_cv_c_char_unsigned+:} false; then :
10235   $as_echo_n "(cached) " >&6
10236 else
10237   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10238 /* end confdefs.h.  */
10239 $ac_includes_default
10240 int
10241 main ()
10242 {
10243 static int test_array [1 - 2 * !(((char) -1) < 0)];
10244 test_array [0] = 0;
10245 return test_array [0];
10246
10247   ;
10248   return 0;
10249 }
10250 _ACEOF
10251 if ac_fn_c_try_compile "$LINENO"; then :
10252   ac_cv_c_char_unsigned=no
10253 else
10254   ac_cv_c_char_unsigned=yes
10255 fi
10256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10257 fi
10258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10259 $as_echo "$ac_cv_c_char_unsigned" >&6; }
10260 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
10261   $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
10262
10263 fi
10264                 # The cast to long int works around a bug in the HP C Compiler
10265 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10266 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10267 # This bug is HP SR number 8606223364.
10268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
10269 $as_echo_n "checking size of signed char... " >&6; }
10270 if ${ac_cv_sizeof_signed_char+:} false; then :
10271   $as_echo_n "(cached) " >&6
10272 else
10273   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char"        "$ac_includes_default"; then :
10274
10275 else
10276   if test "$ac_cv_type_signed_char" = yes; then
10277      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10278 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10279 as_fn_error 77 "cannot compute sizeof (signed char)
10280 See \`config.log' for more details" "$LINENO" 5; }
10281    else
10282      ac_cv_sizeof_signed_char=0
10283    fi
10284 fi
10285
10286 fi
10287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
10288 $as_echo "$ac_cv_sizeof_signed_char" >&6; }
10289
10290
10291
10292 cat >>confdefs.h <<_ACEOF
10293 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10294 _ACEOF
10295
10296
10297 ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
10298 if test "x$ac_cv_type_s_char" = xyes; then :
10299
10300 cat >>confdefs.h <<_ACEOF
10301 #define HAVE_S_CHAR 1
10302 _ACEOF
10303
10304
10305 fi
10306 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
10307 if test "x$ac_cv_type_long_long" = xyes; then :
10308
10309 cat >>confdefs.h <<_ACEOF
10310 #define HAVE_LONG_LONG 1
10311 _ACEOF
10312
10313
10314 fi
10315
10316 # The cast to long int works around a bug in the HP C Compiler
10317 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10318 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10319 # This bug is HP SR number 8606223364.
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
10321 $as_echo_n "checking size of short... " >&6; }
10322 if ${ac_cv_sizeof_short+:} false; then :
10323   $as_echo_n "(cached) " >&6
10324 else
10325   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
10326
10327 else
10328   if test "$ac_cv_type_short" = yes; then
10329      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10330 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10331 as_fn_error 77 "cannot compute sizeof (short)
10332 See \`config.log' for more details" "$LINENO" 5; }
10333    else
10334      ac_cv_sizeof_short=0
10335    fi
10336 fi
10337
10338 fi
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
10340 $as_echo "$ac_cv_sizeof_short" >&6; }
10341
10342
10343
10344 cat >>confdefs.h <<_ACEOF
10345 #define SIZEOF_SHORT $ac_cv_sizeof_short
10346 _ACEOF
10347
10348
10349 # The cast to long int works around a bug in the HP C Compiler
10350 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10351 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10352 # This bug is HP SR number 8606223364.
10353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
10354 $as_echo_n "checking size of int... " >&6; }
10355 if ${ac_cv_sizeof_int+:} false; then :
10356   $as_echo_n "(cached) " >&6
10357 else
10358   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
10359
10360 else
10361   if test "$ac_cv_type_int" = yes; then
10362      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10363 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10364 as_fn_error 77 "cannot compute sizeof (int)
10365 See \`config.log' for more details" "$LINENO" 5; }
10366    else
10367      ac_cv_sizeof_int=0
10368    fi
10369 fi
10370
10371 fi
10372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
10373 $as_echo "$ac_cv_sizeof_int" >&6; }
10374
10375
10376
10377 cat >>confdefs.h <<_ACEOF
10378 #define SIZEOF_INT $ac_cv_sizeof_int
10379 _ACEOF
10380
10381
10382 # The cast to long int works around a bug in the HP C Compiler
10383 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10384 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10385 # This bug is HP SR number 8606223364.
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
10387 $as_echo_n "checking size of long... " >&6; }
10388 if ${ac_cv_sizeof_long+:} false; then :
10389   $as_echo_n "(cached) " >&6
10390 else
10391   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
10392
10393 else
10394   if test "$ac_cv_type_long" = yes; then
10395      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10396 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10397 as_fn_error 77 "cannot compute sizeof (long)
10398 See \`config.log' for more details" "$LINENO" 5; }
10399    else
10400      ac_cv_sizeof_long=0
10401    fi
10402 fi
10403
10404 fi
10405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
10406 $as_echo "$ac_cv_sizeof_long" >&6; }
10407
10408
10409
10410 cat >>confdefs.h <<_ACEOF
10411 #define SIZEOF_LONG $ac_cv_sizeof_long
10412 _ACEOF
10413
10414
10415
10416 case "$ac_cv_type_long_long" in
10417  no)
10418     ;;
10419  *)
10420     # The cast to long int works around a bug in the HP C Compiler
10421 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10422 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10423 # This bug is HP SR number 8606223364.
10424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
10425 $as_echo_n "checking size of long long... " >&6; }
10426 if ${ac_cv_sizeof_long_long+:} false; then :
10427   $as_echo_n "(cached) " >&6
10428 else
10429   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
10430
10431 else
10432   if test "$ac_cv_type_long_long" = yes; then
10433      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10434 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10435 as_fn_error 77 "cannot compute sizeof (long long)
10436 See \`config.log' for more details" "$LINENO" 5; }
10437    else
10438      ac_cv_sizeof_long_long=0
10439    fi
10440 fi
10441
10442 fi
10443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10444 $as_echo "$ac_cv_sizeof_long_long" >&6; }
10445
10446
10447
10448 cat >>confdefs.h <<_ACEOF
10449 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10450 _ACEOF
10451
10452
10453     ;;
10454 esac
10455
10456 case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
10457  *yes)
10458     # We have a typedef for s_char.  Might as well believe it...
10459     ;;
10460  no0no)
10461     # We have signed chars, can't say 'signed char', no s_char typedef.
10462
10463 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
10464
10465     ;;
10466  no1no)
10467     # We have signed chars, can say 'signed char', no s_char typedef.
10468
10469 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
10470
10471     ;;
10472  yes0no)
10473     # We have unsigned chars, can't say 'signed char', no s_char typedef.
10474     as_fn_error $? "No way to specify a signed character!" "$LINENO" 5
10475     ;;
10476  yes1no)
10477     # We have unsigned chars, can say 'signed char', no s_char typedef.
10478
10479 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
10480
10481     ;;
10482 esac
10483
10484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
10485 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
10486 if ${ac_cv_type_uid_t+:} false; then :
10487   $as_echo_n "(cached) " >&6
10488 else
10489   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10490 /* end confdefs.h.  */
10491 #include <sys/types.h>
10492
10493 _ACEOF
10494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10495   $EGREP "uid_t" >/dev/null 2>&1; then :
10496   ac_cv_type_uid_t=yes
10497 else
10498   ac_cv_type_uid_t=no
10499 fi
10500 rm -f conftest*
10501
10502 fi
10503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
10504 $as_echo "$ac_cv_type_uid_t" >&6; }
10505 if test $ac_cv_type_uid_t = no; then
10506
10507 $as_echo "#define uid_t int" >>confdefs.h
10508
10509
10510 $as_echo "#define gid_t int" >>confdefs.h
10511
10512 fi
10513
10514
10515
10516
10517
10518
10519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
10520 $as_echo_n "checking if we're including debugging code... " >&6; }
10521 # Check whether --enable-debugging was given.
10522 if test "${enable_debugging+set}" = set; then :
10523   enableval=$enable_debugging; ntp_ok=$enableval
10524 else
10525   ntp_ok=yes
10526
10527 fi
10528
10529 case "$ntp_ok" in
10530  yes)
10531
10532 $as_echo "#define DEBUG 1" >>confdefs.h
10533
10534 esac
10535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
10536 $as_echo "$ntp_ok" >&6; }
10537
10538
10539
10540 # check if we can compile with pthreads
10541 for ac_header in semaphore.h
10542 do :
10543   ac_fn_c_check_header_mongrel "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
10544 if test "x$ac_cv_header_semaphore_h" = xyes; then :
10545   cat >>confdefs.h <<_ACEOF
10546 #define HAVE_SEMAPHORE_H 1
10547 _ACEOF
10548
10549 fi
10550
10551 done
10552
10553 for ac_func in socketpair
10554 do :
10555   ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
10556 if test "x$ac_cv_func_socketpair" = xyes; then :
10557   cat >>confdefs.h <<_ACEOF
10558 #define HAVE_SOCKETPAIR 1
10559 _ACEOF
10560
10561 fi
10562 done
10563
10564 # Check whether --enable-thread-support was given.
10565 if test "${enable_thread_support+set}" = set; then :
10566   enableval=$enable_thread_support;
10567 else
10568   enable_thread_support=yes
10569
10570 fi
10571
10572 have_pthreads=no
10573 case "$enable_thread_support" in
10574  no) ;;
10575  *)
10576     ol_found_pthreads=no
10577
10578
10579
10580 ac_ext=c
10581 ac_cpp='$CPP $CPPFLAGS'
10582 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10583 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10584 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10585
10586 # OpenLDAP --with-threads
10587
10588 # Check whether --with-threads was given.
10589 if test "${with_threads+set}" = set; then :
10590   withval=$with_threads;
10591         ol_arg=invalid
10592         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
10593                 if test "$withval" = "$ol_val" ; then
10594                         ol_arg="$ol_val"
10595                 fi
10596         done
10597         if test "$ol_arg" = "invalid" ; then
10598                 as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
10599         fi
10600         ol_with_threads="$ol_arg"
10601
10602 else
10603         ol_with_threads="auto"
10604 fi
10605 # end --with-threads
10606
10607
10608 case "$ol_with_threads$host" in
10609  auto*-*-solaris2.[0-6])
10610         ol_with_threads=no
10611     ;;
10612 esac
10613
10614
10615 ol_aix_threads=no
10616 case "$host" in
10617 *-*-aix*)       if test -z "$CC" ; then
10618                 case "$ol_with_threads" in
10619                 auto | yes |  posix) ol_aix_threads=yes ;;
10620                 esac
10621         fi
10622 ;;
10623 esac
10624
10625 if test $ol_aix_threads = yes ; then
10626         if test -z "${CC}" ; then
10627                 for ac_prog in cc_r xlc_r cc
10628 do
10629   # Extract the first word of "$ac_prog", so it can be a program name with args.
10630 set dummy $ac_prog; ac_word=$2
10631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10632 $as_echo_n "checking for $ac_word... " >&6; }
10633 if ${ac_cv_prog_CC+:} false; then :
10634   $as_echo_n "(cached) " >&6
10635 else
10636   if test -n "$CC"; then
10637   ac_cv_prog_CC="$CC" # Let the user override the test.
10638 else
10639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10640 for as_dir in $PATH
10641 do
10642   IFS=$as_save_IFS
10643   test -z "$as_dir" && as_dir=.
10644     for ac_exec_ext in '' $ac_executable_extensions; do
10645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10646     ac_cv_prog_CC="$ac_prog"
10647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10648     break 2
10649   fi
10650 done
10651   done
10652 IFS=$as_save_IFS
10653
10654 fi
10655 fi
10656 CC=$ac_cv_prog_CC
10657 if test -n "$CC"; then
10658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
10659 $as_echo "$CC" >&6; }
10660 else
10661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10662 $as_echo "no" >&6; }
10663 fi
10664
10665
10666   test -n "$CC" && break
10667 done
10668
10669
10670                 if test "$CC" = cc ; then
10671                                                 if test $ol_with_threads != auto ; then
10672                                 as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
10673                         else
10674                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
10675 $as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
10676                         fi
10677                         ol_with_threads=no
10678                 fi
10679         fi
10680
10681         case ${CC} in cc_r | xlc_r)
10682                 ol_with_threads=posix
10683                 ol_cv_pthread_create=yes
10684                 ;;
10685         esac
10686 fi
10687
10688 ol_link_threads=no
10689 # OpenLDAP --with-yielding_select
10690
10691 # Check whether --with-yielding_select was given.
10692 if test "${with_yielding_select+set}" = set; then :
10693   withval=$with_yielding_select;
10694         ol_arg=invalid
10695         for ol_val in auto yes no manual  ; do
10696                 if test "$withval" = "$ol_val" ; then
10697                         ol_arg="$ol_val"
10698                 fi
10699         done
10700         if test "$ol_arg" = "invalid" ; then
10701                 as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
10702         fi
10703         ol_with_yielding_select="$ol_arg"
10704
10705 else
10706         ol_with_yielding_select="auto"
10707 fi
10708 # end --with-yielding_select
10709
10710
10711 case $ol_with_threads in auto | yes | nt)
10712
10713
10714         ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
10715 if test "x$ac_cv_func__beginthread" = xyes; then :
10716
10717 fi
10718
10719
10720         if test $ac_cv_func__beginthread = yes ; then
10721
10722 $as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
10723
10724                 ol_cv_nt_threads=yes
10725         fi
10726
10727
10728         if test "$ol_cv_nt_threads" = yes ; then
10729                 ol_link_threads=nt
10730                 ol_with_threads=found
10731                 ol_with_yielding_select=yes
10732
10733
10734 $as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
10735
10736
10737 $as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
10738
10739         fi
10740
10741         if test $ol_with_threads = nt ; then
10742                 as_fn_error $? "could not locate NT Threads" "$LINENO" 5
10743         fi
10744         ;;
10745 esac
10746
10747 case $ol_with_threads in auto | yes | posix)
10748
10749         for ac_header in pthread.h
10750 do :
10751   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10752 if test "x$ac_cv_header_pthread_h" = xyes; then :
10753   cat >>confdefs.h <<_ACEOF
10754 #define HAVE_PTHREAD_H 1
10755 _ACEOF
10756
10757 fi
10758
10759 done
10760
10761
10762         if test $ac_cv_header_pthread_h = yes ; then
10763                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
10764 $as_echo_n "checking POSIX thread version... " >&6; }
10765 if ${ol_cv_pthread_version+:} false; then :
10766   $as_echo_n "(cached) " >&6
10767 else
10768
10769         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10770 /* end confdefs.h.  */
10771
10772 #               include <pthread.h>
10773
10774 int
10775 main ()
10776 {
10777
10778                 int i = PTHREAD_CREATE_JOINABLE;
10779
10780   ;
10781   return 0;
10782 }
10783 _ACEOF
10784 if ac_fn_c_try_compile "$LINENO"; then :
10785
10786         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10787 /* end confdefs.h.  */
10788 #include <pthread.h>
10789
10790 _ACEOF
10791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10792   $EGREP "pthread_detach" >/dev/null 2>&1; then :
10793   ol_cv_pthread_version=10
10794 else
10795   ol_cv_pthread_version=8
10796 fi
10797 rm -f conftest*
10798
10799 else
10800
10801         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10802 /* end confdefs.h.  */
10803
10804 #               include <pthread.h>
10805 #               ifdef PTHREAD_CREATE_UNDETACHED
10806                 draft7
10807 #               endif
10808
10809 _ACEOF
10810 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10811   $EGREP "draft7" >/dev/null 2>&1; then :
10812   ol_cv_pthread_version=7
10813 else
10814
10815         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10816 /* end confdefs.h.  */
10817 #include <pthread.h>
10818
10819 _ACEOF
10820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10821   $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
10822   ol_cv_pthread_version=6
10823 else
10824
10825         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10826 /* end confdefs.h.  */
10827
10828 #               include <pthread.h>
10829 #ifdef          PTHREAD_MUTEX_INITIALIZER
10830                 draft5
10831 #endif
10832
10833 _ACEOF
10834 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10835   $EGREP "draft5" >/dev/null 2>&1; then :
10836   ol_cv_pthread_version=5
10837 else
10838   ol_cv_pthread_version=4
10839 fi
10840 rm -f conftest*
10841
10842 fi
10843 rm -f conftest*
10844
10845 fi
10846 rm -f conftest*
10847
10848 fi
10849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10850
10851 fi
10852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
10853 $as_echo "$ol_cv_pthread_version" >&6; }
10854
10855
10856                 if test $ol_cv_pthread_version != 0 ; then
10857
10858 cat >>confdefs.h <<_ACEOF
10859 #define HAVE_PTHREADS $ol_cv_pthread_version
10860 _ACEOF
10861
10862                 else
10863                         as_fn_error $? "unknown pthread version" "$LINENO" 5
10864                 fi
10865
10866                 # consider threads found
10867                 ol_with_threads=found
10868
10869
10870         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
10871 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
10872 if ${ol_cv_header_linux_threads+:} false; then :
10873   $as_echo_n "(cached) " >&6
10874 else
10875   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10876 /* end confdefs.h.  */
10877 #include <pthread.h>
10878 _ACEOF
10879 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10880   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
10881   ol_cv_header_linux_threads=yes
10882 else
10883   ol_cv_header_linux_threads=no
10884 fi
10885 rm -f conftest*
10886
10887
10888 fi
10889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
10890 $as_echo "$ol_cv_header_linux_threads" >&6; }
10891         if test $ol_cv_header_linux_threads = yes; then
10892
10893 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
10894
10895         fi
10896
10897
10898         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
10899 $as_echo_n "checking for GNU Pth pthread.h... " >&6; }
10900 if ${ol_cv_header_gnu_pth_pthread_h+:} false; then :
10901   $as_echo_n "(cached) " >&6
10902 else
10903   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10904 /* end confdefs.h.  */
10905 #include <pthread.h>
10906 #ifdef _POSIX_THREAD_IS_GNU_PTH
10907         __gnu_pth__;
10908 #endif
10909
10910 _ACEOF
10911 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10912   $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
10913   ol_cv_header_gnu_pth_pthread_h=yes
10914 else
10915   ol_cv_header_gnu_pth_pthread_h=no
10916 fi
10917 rm -f conftest*
10918
10919
10920 fi
10921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
10922 $as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
10923
10924
10925                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
10926                         for ac_header in sched.h
10927 do :
10928   ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
10929 if test "x$ac_cv_header_sched_h" = xyes; then :
10930   cat >>confdefs.h <<_ACEOF
10931 #define HAVE_SCHED_H 1
10932 _ACEOF
10933
10934 fi
10935
10936 done
10937
10938                 fi
10939
10940
10941                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
10942 $as_echo_n "checking for pthread_create in default libraries... " >&6; }
10943 if ${ol_cv_pthread_create+:} false; then :
10944   $as_echo_n "(cached) " >&6
10945 else
10946
10947                         if test "$cross_compiling" = yes; then :
10948   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10949 /* end confdefs.h.  */
10950
10951 /* pthread test headers */
10952 #include <pthread.h>
10953 #if HAVE_PTHREADS < 7
10954 #include <errno.h>
10955 #endif
10956 #ifndef NULL
10957 #define NULL (void*)0
10958 #endif
10959
10960 static void *task(p)
10961         void *p;
10962 {
10963         return (void *) (p == NULL);
10964 }
10965
10966 int
10967 main ()
10968 {
10969
10970         /* pthread test function */
10971 #ifndef PTHREAD_CREATE_DETACHED
10972 #define PTHREAD_CREATE_DETACHED 1
10973 #endif
10974         pthread_t t;
10975         int status;
10976         int detach = PTHREAD_CREATE_DETACHED;
10977
10978 #if HAVE_PTHREADS > 4
10979         /* Final pthreads */
10980         pthread_attr_t attr;
10981
10982         status = pthread_attr_init(&attr);
10983         if( status ) return status;
10984
10985 #if HAVE_PTHREADS < 7
10986         status = pthread_attr_setdetachstate(&attr, &detach);
10987         if( status < 0 ) status = errno;
10988 #else
10989         status = pthread_attr_setdetachstate(&attr, detach);
10990 #endif
10991         if( status ) return status;
10992         status = pthread_create( &t, &attr, task, NULL );
10993 #if HAVE_PTHREADS < 7
10994         if( status < 0 ) status = errno;
10995 #endif
10996         if( status ) return status;
10997 #else
10998         /* Draft 4 pthreads */
10999         status = pthread_create( &t, pthread_attr_default, task, NULL );
11000         if( status ) return errno;
11001
11002         /* give thread a chance to complete */
11003         /* it should remain joinable and hence detachable */
11004         sleep( 1 );
11005
11006         status = pthread_detach( &t );
11007         if( status ) return errno;
11008 #endif
11009
11010 #ifdef HAVE_LINUX_THREADS
11011         pthread_kill_other_threads_np();
11012 #endif
11013
11014         return 0;
11015
11016   ;
11017   return 0;
11018 }
11019 _ACEOF
11020 if ac_fn_c_try_link "$LINENO"; then :
11021   ol_cv_pthread_create=yes
11022 else
11023   ol_cv_pthread_create=no
11024 fi
11025 rm -f core conftest.err conftest.$ac_objext \
11026     conftest$ac_exeext conftest.$ac_ext
11027 else
11028   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11029 /* end confdefs.h.  */
11030
11031
11032 /* pthread test headers */
11033 #include <pthread.h>
11034 #if HAVE_PTHREADS < 7
11035 #include <errno.h>
11036 #endif
11037 #ifndef NULL
11038 #define NULL (void*)0
11039 #endif
11040
11041 static void *task(p)
11042         void *p;
11043 {
11044         return (void *) (p == NULL);
11045 }
11046
11047
11048 int main(argc, argv)
11049         int argc;
11050         char **argv;
11051 {
11052
11053         /* pthread test function */
11054 #ifndef PTHREAD_CREATE_DETACHED
11055 #define PTHREAD_CREATE_DETACHED 1
11056 #endif
11057         pthread_t t;
11058         int status;
11059         int detach = PTHREAD_CREATE_DETACHED;
11060
11061 #if HAVE_PTHREADS > 4
11062         /* Final pthreads */
11063         pthread_attr_t attr;
11064
11065         status = pthread_attr_init(&attr);
11066         if( status ) return status;
11067
11068 #if HAVE_PTHREADS < 7
11069         status = pthread_attr_setdetachstate(&attr, &detach);
11070         if( status < 0 ) status = errno;
11071 #else
11072         status = pthread_attr_setdetachstate(&attr, detach);
11073 #endif
11074         if( status ) return status;
11075         status = pthread_create( &t, &attr, task, NULL );
11076 #if HAVE_PTHREADS < 7
11077         if( status < 0 ) status = errno;
11078 #endif
11079         if( status ) return status;
11080 #else
11081         /* Draft 4 pthreads */
11082         status = pthread_create( &t, pthread_attr_default, task, NULL );
11083         if( status ) return errno;
11084
11085         /* give thread a chance to complete */
11086         /* it should remain joinable and hence detachable */
11087         sleep( 1 );
11088
11089         status = pthread_detach( &t );
11090         if( status ) return errno;
11091 #endif
11092
11093 #ifdef HAVE_LINUX_THREADS
11094         pthread_kill_other_threads_np();
11095 #endif
11096
11097         return 0;
11098
11099 }
11100
11101 _ACEOF
11102 if ac_fn_c_try_run "$LINENO"; then :
11103   ol_cv_pthread_create=yes
11104 else
11105   ol_cv_pthread_create=no
11106 fi
11107 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11108   conftest.$ac_objext conftest.beam conftest.$ac_ext
11109 fi
11110
11111 fi
11112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
11113 $as_echo "$ol_cv_pthread_create" >&6; }
11114
11115                 if test $ol_cv_pthread_create != no ; then
11116                         ol_link_threads=posix
11117                         ol_link_pthreads=""
11118                 fi
11119
11120                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11121 if test "$ol_link_threads" = no ; then
11122         # try -kthread
11123         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
11124 $as_echo_n "checking for pthread link with -kthread... " >&6; }
11125 if ${ol_cv_pthread_kthread+:} false; then :
11126   $as_echo_n "(cached) " >&6
11127 else
11128
11129                 # save the flags
11130                 ol_LIBS="$LIBS"
11131                 LIBS="-kthread $LIBS"
11132
11133                 if test "$cross_compiling" = yes; then :
11134   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11135 /* end confdefs.h.  */
11136
11137 /* pthread test headers */
11138 #include <pthread.h>
11139 #if HAVE_PTHREADS < 7
11140 #include <errno.h>
11141 #endif
11142 #ifndef NULL
11143 #define NULL (void*)0
11144 #endif
11145
11146 static void *task(p)
11147         void *p;
11148 {
11149         return (void *) (p == NULL);
11150 }
11151
11152 int
11153 main ()
11154 {
11155
11156         /* pthread test function */
11157 #ifndef PTHREAD_CREATE_DETACHED
11158 #define PTHREAD_CREATE_DETACHED 1
11159 #endif
11160         pthread_t t;
11161         int status;
11162         int detach = PTHREAD_CREATE_DETACHED;
11163
11164 #if HAVE_PTHREADS > 4
11165         /* Final pthreads */
11166         pthread_attr_t attr;
11167
11168         status = pthread_attr_init(&attr);
11169         if( status ) return status;
11170
11171 #if HAVE_PTHREADS < 7
11172         status = pthread_attr_setdetachstate(&attr, &detach);
11173         if( status < 0 ) status = errno;
11174 #else
11175         status = pthread_attr_setdetachstate(&attr, detach);
11176 #endif
11177         if( status ) return status;
11178         status = pthread_create( &t, &attr, task, NULL );
11179 #if HAVE_PTHREADS < 7
11180         if( status < 0 ) status = errno;
11181 #endif
11182         if( status ) return status;
11183 #else
11184         /* Draft 4 pthreads */
11185         status = pthread_create( &t, pthread_attr_default, task, NULL );
11186         if( status ) return errno;
11187
11188         /* give thread a chance to complete */
11189         /* it should remain joinable and hence detachable */
11190         sleep( 1 );
11191
11192         status = pthread_detach( &t );
11193         if( status ) return errno;
11194 #endif
11195
11196 #ifdef HAVE_LINUX_THREADS
11197         pthread_kill_other_threads_np();
11198 #endif
11199
11200         return 0;
11201
11202   ;
11203   return 0;
11204 }
11205 _ACEOF
11206 if ac_fn_c_try_link "$LINENO"; then :
11207   ol_cv_pthread_kthread=yes
11208 else
11209   ol_cv_pthread_kthread=no
11210 fi
11211 rm -f core conftest.err conftest.$ac_objext \
11212     conftest$ac_exeext conftest.$ac_ext
11213 else
11214   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11215 /* end confdefs.h.  */
11216
11217
11218 /* pthread test headers */
11219 #include <pthread.h>
11220 #if HAVE_PTHREADS < 7
11221 #include <errno.h>
11222 #endif
11223 #ifndef NULL
11224 #define NULL (void*)0
11225 #endif
11226
11227 static void *task(p)
11228         void *p;
11229 {
11230         return (void *) (p == NULL);
11231 }
11232
11233
11234 int main(argc, argv)
11235         int argc;
11236         char **argv;
11237 {
11238
11239         /* pthread test function */
11240 #ifndef PTHREAD_CREATE_DETACHED
11241 #define PTHREAD_CREATE_DETACHED 1
11242 #endif
11243         pthread_t t;
11244         int status;
11245         int detach = PTHREAD_CREATE_DETACHED;
11246
11247 #if HAVE_PTHREADS > 4
11248         /* Final pthreads */
11249         pthread_attr_t attr;
11250
11251         status = pthread_attr_init(&attr);
11252         if( status ) return status;
11253
11254 #if HAVE_PTHREADS < 7
11255         status = pthread_attr_setdetachstate(&attr, &detach);
11256         if( status < 0 ) status = errno;
11257 #else
11258         status = pthread_attr_setdetachstate(&attr, detach);
11259 #endif
11260         if( status ) return status;
11261         status = pthread_create( &t, &attr, task, NULL );
11262 #if HAVE_PTHREADS < 7
11263         if( status < 0 ) status = errno;
11264 #endif
11265         if( status ) return status;
11266 #else
11267         /* Draft 4 pthreads */
11268         status = pthread_create( &t, pthread_attr_default, task, NULL );
11269         if( status ) return errno;
11270
11271         /* give thread a chance to complete */
11272         /* it should remain joinable and hence detachable */
11273         sleep( 1 );
11274
11275         status = pthread_detach( &t );
11276         if( status ) return errno;
11277 #endif
11278
11279 #ifdef HAVE_LINUX_THREADS
11280         pthread_kill_other_threads_np();
11281 #endif
11282
11283         return 0;
11284
11285 }
11286
11287 _ACEOF
11288 if ac_fn_c_try_run "$LINENO"; then :
11289   ol_cv_pthread_kthread=yes
11290 else
11291   ol_cv_pthread_kthread=no
11292 fi
11293 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11294   conftest.$ac_objext conftest.beam conftest.$ac_ext
11295 fi
11296
11297
11298                 # restore the LIBS
11299                 LIBS="$ol_LIBS"
11300
11301 fi
11302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
11303 $as_echo "$ol_cv_pthread_kthread" >&6; }
11304
11305         if test $ol_cv_pthread_kthread = yes ; then
11306                 ol_link_pthreads="-kthread"
11307                 ol_link_threads=posix
11308         fi
11309 fi
11310
11311                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11312 if test "$ol_link_threads" = no ; then
11313         # try -pthread
11314         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
11315 $as_echo_n "checking for pthread link with -pthread... " >&6; }
11316 if ${ol_cv_pthread_pthread+:} false; then :
11317   $as_echo_n "(cached) " >&6
11318 else
11319
11320                 # save the flags
11321                 ol_LIBS="$LIBS"
11322                 LIBS="-pthread $LIBS"
11323
11324                 if test "$cross_compiling" = yes; then :
11325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11326 /* end confdefs.h.  */
11327
11328 /* pthread test headers */
11329 #include <pthread.h>
11330 #if HAVE_PTHREADS < 7
11331 #include <errno.h>
11332 #endif
11333 #ifndef NULL
11334 #define NULL (void*)0
11335 #endif
11336
11337 static void *task(p)
11338         void *p;
11339 {
11340         return (void *) (p == NULL);
11341 }
11342
11343 int
11344 main ()
11345 {
11346
11347         /* pthread test function */
11348 #ifndef PTHREAD_CREATE_DETACHED
11349 #define PTHREAD_CREATE_DETACHED 1
11350 #endif
11351         pthread_t t;
11352         int status;
11353         int detach = PTHREAD_CREATE_DETACHED;
11354
11355 #if HAVE_PTHREADS > 4
11356         /* Final pthreads */
11357         pthread_attr_t attr;
11358
11359         status = pthread_attr_init(&attr);
11360         if( status ) return status;
11361
11362 #if HAVE_PTHREADS < 7
11363         status = pthread_attr_setdetachstate(&attr, &detach);
11364         if( status < 0 ) status = errno;
11365 #else
11366         status = pthread_attr_setdetachstate(&attr, detach);
11367 #endif
11368         if( status ) return status;
11369         status = pthread_create( &t, &attr, task, NULL );
11370 #if HAVE_PTHREADS < 7
11371         if( status < 0 ) status = errno;
11372 #endif
11373         if( status ) return status;
11374 #else
11375         /* Draft 4 pthreads */
11376         status = pthread_create( &t, pthread_attr_default, task, NULL );
11377         if( status ) return errno;
11378
11379         /* give thread a chance to complete */
11380         /* it should remain joinable and hence detachable */
11381         sleep( 1 );
11382
11383         status = pthread_detach( &t );
11384         if( status ) return errno;
11385 #endif
11386
11387 #ifdef HAVE_LINUX_THREADS
11388         pthread_kill_other_threads_np();
11389 #endif
11390
11391         return 0;
11392
11393   ;
11394   return 0;
11395 }
11396 _ACEOF
11397 if ac_fn_c_try_link "$LINENO"; then :
11398   ol_cv_pthread_pthread=yes
11399 else
11400   ol_cv_pthread_pthread=no
11401 fi
11402 rm -f core conftest.err conftest.$ac_objext \
11403     conftest$ac_exeext conftest.$ac_ext
11404 else
11405   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11406 /* end confdefs.h.  */
11407
11408
11409 /* pthread test headers */
11410 #include <pthread.h>
11411 #if HAVE_PTHREADS < 7
11412 #include <errno.h>
11413 #endif
11414 #ifndef NULL
11415 #define NULL (void*)0
11416 #endif
11417
11418 static void *task(p)
11419         void *p;
11420 {
11421         return (void *) (p == NULL);
11422 }
11423
11424
11425 int main(argc, argv)
11426         int argc;
11427         char **argv;
11428 {
11429
11430         /* pthread test function */
11431 #ifndef PTHREAD_CREATE_DETACHED
11432 #define PTHREAD_CREATE_DETACHED 1
11433 #endif
11434         pthread_t t;
11435         int status;
11436         int detach = PTHREAD_CREATE_DETACHED;
11437
11438 #if HAVE_PTHREADS > 4
11439         /* Final pthreads */
11440         pthread_attr_t attr;
11441
11442         status = pthread_attr_init(&attr);
11443         if( status ) return status;
11444
11445 #if HAVE_PTHREADS < 7
11446         status = pthread_attr_setdetachstate(&attr, &detach);
11447         if( status < 0 ) status = errno;
11448 #else
11449         status = pthread_attr_setdetachstate(&attr, detach);
11450 #endif
11451         if( status ) return status;
11452         status = pthread_create( &t, &attr, task, NULL );
11453 #if HAVE_PTHREADS < 7
11454         if( status < 0 ) status = errno;
11455 #endif
11456         if( status ) return status;
11457 #else
11458         /* Draft 4 pthreads */
11459         status = pthread_create( &t, pthread_attr_default, task, NULL );
11460         if( status ) return errno;
11461
11462         /* give thread a chance to complete */
11463         /* it should remain joinable and hence detachable */
11464         sleep( 1 );
11465
11466         status = pthread_detach( &t );
11467         if( status ) return errno;
11468 #endif
11469
11470 #ifdef HAVE_LINUX_THREADS
11471         pthread_kill_other_threads_np();
11472 #endif
11473
11474         return 0;
11475
11476 }
11477
11478 _ACEOF
11479 if ac_fn_c_try_run "$LINENO"; then :
11480   ol_cv_pthread_pthread=yes
11481 else
11482   ol_cv_pthread_pthread=no
11483 fi
11484 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11485   conftest.$ac_objext conftest.beam conftest.$ac_ext
11486 fi
11487
11488
11489                 # restore the LIBS
11490                 LIBS="$ol_LIBS"
11491
11492 fi
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
11494 $as_echo "$ol_cv_pthread_pthread" >&6; }
11495
11496         if test $ol_cv_pthread_pthread = yes ; then
11497                 ol_link_pthreads="-pthread"
11498                 ol_link_threads=posix
11499         fi
11500 fi
11501
11502                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
11503 if test "$ol_link_threads" = no ; then
11504         # try -pthreads
11505         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
11506 $as_echo_n "checking for pthread link with -pthreads... " >&6; }
11507 if ${ol_cv_pthread_pthreads+:} false; then :
11508   $as_echo_n "(cached) " >&6
11509 else
11510
11511                 # save the flags
11512                 ol_LIBS="$LIBS"
11513                 LIBS="-pthreads $LIBS"
11514
11515                 if test "$cross_compiling" = yes; then :
11516   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11517 /* end confdefs.h.  */
11518
11519 /* pthread test headers */
11520 #include <pthread.h>
11521 #if HAVE_PTHREADS < 7
11522 #include <errno.h>
11523 #endif
11524 #ifndef NULL
11525 #define NULL (void*)0
11526 #endif
11527
11528 static void *task(p)
11529         void *p;
11530 {
11531         return (void *) (p == NULL);
11532 }
11533
11534 int
11535 main ()
11536 {
11537
11538         /* pthread test function */
11539 #ifndef PTHREAD_CREATE_DETACHED
11540 #define PTHREAD_CREATE_DETACHED 1
11541 #endif
11542         pthread_t t;
11543         int status;
11544         int detach = PTHREAD_CREATE_DETACHED;
11545
11546 #if HAVE_PTHREADS > 4
11547         /* Final pthreads */
11548         pthread_attr_t attr;
11549
11550         status = pthread_attr_init(&attr);
11551         if( status ) return status;
11552
11553 #if HAVE_PTHREADS < 7
11554         status = pthread_attr_setdetachstate(&attr, &detach);
11555         if( status < 0 ) status = errno;
11556 #else
11557         status = pthread_attr_setdetachstate(&attr, detach);
11558 #endif
11559         if( status ) return status;
11560         status = pthread_create( &t, &attr, task, NULL );
11561 #if HAVE_PTHREADS < 7
11562         if( status < 0 ) status = errno;
11563 #endif
11564         if( status ) return status;
11565 #else
11566         /* Draft 4 pthreads */
11567         status = pthread_create( &t, pthread_attr_default, task, NULL );
11568         if( status ) return errno;
11569
11570         /* give thread a chance to complete */
11571         /* it should remain joinable and hence detachable */
11572         sleep( 1 );
11573
11574         status = pthread_detach( &t );
11575         if( status ) return errno;
11576 #endif
11577
11578 #ifdef HAVE_LINUX_THREADS
11579         pthread_kill_other_threads_np();
11580 #endif
11581
11582         return 0;
11583
11584   ;
11585   return 0;
11586 }
11587 _ACEOF
11588 if ac_fn_c_try_link "$LINENO"; then :
11589   ol_cv_pthread_pthreads=yes
11590 else
11591   ol_cv_pthread_pthreads=no
11592 fi
11593 rm -f core conftest.err conftest.$ac_objext \
11594     conftest$ac_exeext conftest.$ac_ext
11595 else
11596   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11597 /* end confdefs.h.  */
11598
11599
11600 /* pthread test headers */
11601 #include <pthread.h>
11602 #if HAVE_PTHREADS < 7
11603 #include <errno.h>
11604 #endif
11605 #ifndef NULL
11606 #define NULL (void*)0
11607 #endif
11608
11609 static void *task(p)
11610         void *p;
11611 {
11612         return (void *) (p == NULL);
11613 }
11614
11615
11616 int main(argc, argv)
11617         int argc;
11618         char **argv;
11619 {
11620
11621         /* pthread test function */
11622 #ifndef PTHREAD_CREATE_DETACHED
11623 #define PTHREAD_CREATE_DETACHED 1
11624 #endif
11625         pthread_t t;
11626         int status;
11627         int detach = PTHREAD_CREATE_DETACHED;
11628
11629 #if HAVE_PTHREADS > 4
11630         /* Final pthreads */
11631         pthread_attr_t attr;
11632
11633         status = pthread_attr_init(&attr);
11634         if( status ) return status;
11635
11636 #if HAVE_PTHREADS < 7
11637         status = pthread_attr_setdetachstate(&attr, &detach);
11638         if( status < 0 ) status = errno;
11639 #else
11640         status = pthread_attr_setdetachstate(&attr, detach);
11641 #endif
11642         if( status ) return status;
11643         status = pthread_create( &t, &attr, task, NULL );
11644 #if HAVE_PTHREADS < 7
11645         if( status < 0 ) status = errno;
11646 #endif
11647         if( status ) return status;
11648 #else
11649         /* Draft 4 pthreads */
11650         status = pthread_create( &t, pthread_attr_default, task, NULL );
11651         if( status ) return errno;
11652
11653         /* give thread a chance to complete */
11654         /* it should remain joinable and hence detachable */
11655         sleep( 1 );
11656
11657         status = pthread_detach( &t );
11658         if( status ) return errno;
11659 #endif
11660
11661 #ifdef HAVE_LINUX_THREADS
11662         pthread_kill_other_threads_np();
11663 #endif
11664
11665         return 0;
11666
11667 }
11668
11669 _ACEOF
11670 if ac_fn_c_try_run "$LINENO"; then :
11671   ol_cv_pthread_pthreads=yes
11672 else
11673   ol_cv_pthread_pthreads=no
11674 fi
11675 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11676   conftest.$ac_objext conftest.beam conftest.$ac_ext
11677 fi
11678
11679
11680                 # restore the LIBS
11681                 LIBS="$ol_LIBS"
11682
11683 fi
11684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
11685 $as_echo "$ol_cv_pthread_pthreads" >&6; }
11686
11687         if test $ol_cv_pthread_pthreads = yes ; then
11688                 ol_link_pthreads="-pthreads"
11689                 ol_link_threads=posix
11690         fi
11691 fi
11692
11693                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
11694 if test "$ol_link_threads" = no ; then
11695         # try -mthreads
11696         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
11697 $as_echo_n "checking for pthread link with -mthreads... " >&6; }
11698 if ${ol_cv_pthread_mthreads+:} false; then :
11699   $as_echo_n "(cached) " >&6
11700 else
11701
11702                 # save the flags
11703                 ol_LIBS="$LIBS"
11704                 LIBS="-mthreads $LIBS"
11705
11706                 if test "$cross_compiling" = yes; then :
11707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11708 /* end confdefs.h.  */
11709
11710 /* pthread test headers */
11711 #include <pthread.h>
11712 #if HAVE_PTHREADS < 7
11713 #include <errno.h>
11714 #endif
11715 #ifndef NULL
11716 #define NULL (void*)0
11717 #endif
11718
11719 static void *task(p)
11720         void *p;
11721 {
11722         return (void *) (p == NULL);
11723 }
11724
11725 int
11726 main ()
11727 {
11728
11729         /* pthread test function */
11730 #ifndef PTHREAD_CREATE_DETACHED
11731 #define PTHREAD_CREATE_DETACHED 1
11732 #endif
11733         pthread_t t;
11734         int status;
11735         int detach = PTHREAD_CREATE_DETACHED;
11736
11737 #if HAVE_PTHREADS > 4
11738         /* Final pthreads */
11739         pthread_attr_t attr;
11740
11741         status = pthread_attr_init(&attr);
11742         if( status ) return status;
11743
11744 #if HAVE_PTHREADS < 7
11745         status = pthread_attr_setdetachstate(&attr, &detach);
11746         if( status < 0 ) status = errno;
11747 #else
11748         status = pthread_attr_setdetachstate(&attr, detach);
11749 #endif
11750         if( status ) return status;
11751         status = pthread_create( &t, &attr, task, NULL );
11752 #if HAVE_PTHREADS < 7
11753         if( status < 0 ) status = errno;
11754 #endif
11755         if( status ) return status;
11756 #else
11757         /* Draft 4 pthreads */
11758         status = pthread_create( &t, pthread_attr_default, task, NULL );
11759         if( status ) return errno;
11760
11761         /* give thread a chance to complete */
11762         /* it should remain joinable and hence detachable */
11763         sleep( 1 );
11764
11765         status = pthread_detach( &t );
11766         if( status ) return errno;
11767 #endif
11768
11769 #ifdef HAVE_LINUX_THREADS
11770         pthread_kill_other_threads_np();
11771 #endif
11772
11773         return 0;
11774
11775   ;
11776   return 0;
11777 }
11778 _ACEOF
11779 if ac_fn_c_try_link "$LINENO"; then :
11780   ol_cv_pthread_mthreads=yes
11781 else
11782   ol_cv_pthread_mthreads=no
11783 fi
11784 rm -f core conftest.err conftest.$ac_objext \
11785     conftest$ac_exeext conftest.$ac_ext
11786 else
11787   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11788 /* end confdefs.h.  */
11789
11790
11791 /* pthread test headers */
11792 #include <pthread.h>
11793 #if HAVE_PTHREADS < 7
11794 #include <errno.h>
11795 #endif
11796 #ifndef NULL
11797 #define NULL (void*)0
11798 #endif
11799
11800 static void *task(p)
11801         void *p;
11802 {
11803         return (void *) (p == NULL);
11804 }
11805
11806
11807 int main(argc, argv)
11808         int argc;
11809         char **argv;
11810 {
11811
11812         /* pthread test function */
11813 #ifndef PTHREAD_CREATE_DETACHED
11814 #define PTHREAD_CREATE_DETACHED 1
11815 #endif
11816         pthread_t t;
11817         int status;
11818         int detach = PTHREAD_CREATE_DETACHED;
11819
11820 #if HAVE_PTHREADS > 4
11821         /* Final pthreads */
11822         pthread_attr_t attr;
11823
11824         status = pthread_attr_init(&attr);
11825         if( status ) return status;
11826
11827 #if HAVE_PTHREADS < 7
11828         status = pthread_attr_setdetachstate(&attr, &detach);
11829         if( status < 0 ) status = errno;
11830 #else
11831         status = pthread_attr_setdetachstate(&attr, detach);
11832 #endif
11833         if( status ) return status;
11834         status = pthread_create( &t, &attr, task, NULL );
11835 #if HAVE_PTHREADS < 7
11836         if( status < 0 ) status = errno;
11837 #endif
11838         if( status ) return status;
11839 #else
11840         /* Draft 4 pthreads */
11841         status = pthread_create( &t, pthread_attr_default, task, NULL );
11842         if( status ) return errno;
11843
11844         /* give thread a chance to complete */
11845         /* it should remain joinable and hence detachable */
11846         sleep( 1 );
11847
11848         status = pthread_detach( &t );
11849         if( status ) return errno;
11850 #endif
11851
11852 #ifdef HAVE_LINUX_THREADS
11853         pthread_kill_other_threads_np();
11854 #endif
11855
11856         return 0;
11857
11858 }
11859
11860 _ACEOF
11861 if ac_fn_c_try_run "$LINENO"; then :
11862   ol_cv_pthread_mthreads=yes
11863 else
11864   ol_cv_pthread_mthreads=no
11865 fi
11866 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11867   conftest.$ac_objext conftest.beam conftest.$ac_ext
11868 fi
11869
11870
11871                 # restore the LIBS
11872                 LIBS="$ol_LIBS"
11873
11874 fi
11875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
11876 $as_echo "$ol_cv_pthread_mthreads" >&6; }
11877
11878         if test $ol_cv_pthread_mthreads = yes ; then
11879                 ol_link_pthreads="-mthreads"
11880                 ol_link_threads=posix
11881         fi
11882 fi
11883
11884                 # Pthread try link: -thread (ol_cv_pthread_thread)
11885 if test "$ol_link_threads" = no ; then
11886         # try -thread
11887         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
11888 $as_echo_n "checking for pthread link with -thread... " >&6; }
11889 if ${ol_cv_pthread_thread+:} false; then :
11890   $as_echo_n "(cached) " >&6
11891 else
11892
11893                 # save the flags
11894                 ol_LIBS="$LIBS"
11895                 LIBS="-thread $LIBS"
11896
11897                 if test "$cross_compiling" = yes; then :
11898   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11899 /* end confdefs.h.  */
11900
11901 /* pthread test headers */
11902 #include <pthread.h>
11903 #if HAVE_PTHREADS < 7
11904 #include <errno.h>
11905 #endif
11906 #ifndef NULL
11907 #define NULL (void*)0
11908 #endif
11909
11910 static void *task(p)
11911         void *p;
11912 {
11913         return (void *) (p == NULL);
11914 }
11915
11916 int
11917 main ()
11918 {
11919
11920         /* pthread test function */
11921 #ifndef PTHREAD_CREATE_DETACHED
11922 #define PTHREAD_CREATE_DETACHED 1
11923 #endif
11924         pthread_t t;
11925         int status;
11926         int detach = PTHREAD_CREATE_DETACHED;
11927
11928 #if HAVE_PTHREADS > 4
11929         /* Final pthreads */
11930         pthread_attr_t attr;
11931
11932         status = pthread_attr_init(&attr);
11933         if( status ) return status;
11934
11935 #if HAVE_PTHREADS < 7
11936         status = pthread_attr_setdetachstate(&attr, &detach);
11937         if( status < 0 ) status = errno;
11938 #else
11939         status = pthread_attr_setdetachstate(&attr, detach);
11940 #endif
11941         if( status ) return status;
11942         status = pthread_create( &t, &attr, task, NULL );
11943 #if HAVE_PTHREADS < 7
11944         if( status < 0 ) status = errno;
11945 #endif
11946         if( status ) return status;
11947 #else
11948         /* Draft 4 pthreads */
11949         status = pthread_create( &t, pthread_attr_default, task, NULL );
11950         if( status ) return errno;
11951
11952         /* give thread a chance to complete */
11953         /* it should remain joinable and hence detachable */
11954         sleep( 1 );
11955
11956         status = pthread_detach( &t );
11957         if( status ) return errno;
11958 #endif
11959
11960 #ifdef HAVE_LINUX_THREADS
11961         pthread_kill_other_threads_np();
11962 #endif
11963
11964         return 0;
11965
11966   ;
11967   return 0;
11968 }
11969 _ACEOF
11970 if ac_fn_c_try_link "$LINENO"; then :
11971   ol_cv_pthread_thread=yes
11972 else
11973   ol_cv_pthread_thread=no
11974 fi
11975 rm -f core conftest.err conftest.$ac_objext \
11976     conftest$ac_exeext conftest.$ac_ext
11977 else
11978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11979 /* end confdefs.h.  */
11980
11981
11982 /* pthread test headers */
11983 #include <pthread.h>
11984 #if HAVE_PTHREADS < 7
11985 #include <errno.h>
11986 #endif
11987 #ifndef NULL
11988 #define NULL (void*)0
11989 #endif
11990
11991 static void *task(p)
11992         void *p;
11993 {
11994         return (void *) (p == NULL);
11995 }
11996
11997
11998 int main(argc, argv)
11999         int argc;
12000         char **argv;
12001 {
12002
12003         /* pthread test function */
12004 #ifndef PTHREAD_CREATE_DETACHED
12005 #define PTHREAD_CREATE_DETACHED 1
12006 #endif
12007         pthread_t t;
12008         int status;
12009         int detach = PTHREAD_CREATE_DETACHED;
12010
12011 #if HAVE_PTHREADS > 4
12012         /* Final pthreads */
12013         pthread_attr_t attr;
12014
12015         status = pthread_attr_init(&attr);
12016         if( status ) return status;
12017
12018 #if HAVE_PTHREADS < 7
12019         status = pthread_attr_setdetachstate(&attr, &detach);
12020         if( status < 0 ) status = errno;
12021 #else
12022         status = pthread_attr_setdetachstate(&attr, detach);
12023 #endif
12024         if( status ) return status;
12025         status = pthread_create( &t, &attr, task, NULL );
12026 #if HAVE_PTHREADS < 7
12027         if( status < 0 ) status = errno;
12028 #endif
12029         if( status ) return status;
12030 #else
12031         /* Draft 4 pthreads */
12032         status = pthread_create( &t, pthread_attr_default, task, NULL );
12033         if( status ) return errno;
12034
12035         /* give thread a chance to complete */
12036         /* it should remain joinable and hence detachable */
12037         sleep( 1 );
12038
12039         status = pthread_detach( &t );
12040         if( status ) return errno;
12041 #endif
12042
12043 #ifdef HAVE_LINUX_THREADS
12044         pthread_kill_other_threads_np();
12045 #endif
12046
12047         return 0;
12048
12049 }
12050
12051 _ACEOF
12052 if ac_fn_c_try_run "$LINENO"; then :
12053   ol_cv_pthread_thread=yes
12054 else
12055   ol_cv_pthread_thread=no
12056 fi
12057 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12058   conftest.$ac_objext conftest.beam conftest.$ac_ext
12059 fi
12060
12061
12062                 # restore the LIBS
12063                 LIBS="$ol_LIBS"
12064
12065 fi
12066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
12067 $as_echo "$ol_cv_pthread_thread" >&6; }
12068
12069         if test $ol_cv_pthread_thread = yes ; then
12070                 ol_link_pthreads="-thread"
12071                 ol_link_threads=posix
12072         fi
12073 fi
12074
12075
12076                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12077 if test "$ol_link_threads" = no ; then
12078         # try -lpthread -lmach -lexc -lc_r
12079         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12080 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
12081 if ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+:} false; then :
12082   $as_echo_n "(cached) " >&6
12083 else
12084
12085                 # save the flags
12086                 ol_LIBS="$LIBS"
12087                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12088
12089                 if test "$cross_compiling" = yes; then :
12090   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12091 /* end confdefs.h.  */
12092
12093 /* pthread test headers */
12094 #include <pthread.h>
12095 #if HAVE_PTHREADS < 7
12096 #include <errno.h>
12097 #endif
12098 #ifndef NULL
12099 #define NULL (void*)0
12100 #endif
12101
12102 static void *task(p)
12103         void *p;
12104 {
12105         return (void *) (p == NULL);
12106 }
12107
12108 int
12109 main ()
12110 {
12111
12112         /* pthread test function */
12113 #ifndef PTHREAD_CREATE_DETACHED
12114 #define PTHREAD_CREATE_DETACHED 1
12115 #endif
12116         pthread_t t;
12117         int status;
12118         int detach = PTHREAD_CREATE_DETACHED;
12119
12120 #if HAVE_PTHREADS > 4
12121         /* Final pthreads */
12122         pthread_attr_t attr;
12123
12124         status = pthread_attr_init(&attr);
12125         if( status ) return status;
12126
12127 #if HAVE_PTHREADS < 7
12128         status = pthread_attr_setdetachstate(&attr, &detach);
12129         if( status < 0 ) status = errno;
12130 #else
12131         status = pthread_attr_setdetachstate(&attr, detach);
12132 #endif
12133         if( status ) return status;
12134         status = pthread_create( &t, &attr, task, NULL );
12135 #if HAVE_PTHREADS < 7
12136         if( status < 0 ) status = errno;
12137 #endif
12138         if( status ) return status;
12139 #else
12140         /* Draft 4 pthreads */
12141         status = pthread_create( &t, pthread_attr_default, task, NULL );
12142         if( status ) return errno;
12143
12144         /* give thread a chance to complete */
12145         /* it should remain joinable and hence detachable */
12146         sleep( 1 );
12147
12148         status = pthread_detach( &t );
12149         if( status ) return errno;
12150 #endif
12151
12152 #ifdef HAVE_LINUX_THREADS
12153         pthread_kill_other_threads_np();
12154 #endif
12155
12156         return 0;
12157
12158   ;
12159   return 0;
12160 }
12161 _ACEOF
12162 if ac_fn_c_try_link "$LINENO"; then :
12163   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12164 else
12165   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12166 fi
12167 rm -f core conftest.err conftest.$ac_objext \
12168     conftest$ac_exeext conftest.$ac_ext
12169 else
12170   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12171 /* end confdefs.h.  */
12172
12173
12174 /* pthread test headers */
12175 #include <pthread.h>
12176 #if HAVE_PTHREADS < 7
12177 #include <errno.h>
12178 #endif
12179 #ifndef NULL
12180 #define NULL (void*)0
12181 #endif
12182
12183 static void *task(p)
12184         void *p;
12185 {
12186         return (void *) (p == NULL);
12187 }
12188
12189
12190 int main(argc, argv)
12191         int argc;
12192         char **argv;
12193 {
12194
12195         /* pthread test function */
12196 #ifndef PTHREAD_CREATE_DETACHED
12197 #define PTHREAD_CREATE_DETACHED 1
12198 #endif
12199         pthread_t t;
12200         int status;
12201         int detach = PTHREAD_CREATE_DETACHED;
12202
12203 #if HAVE_PTHREADS > 4
12204         /* Final pthreads */
12205         pthread_attr_t attr;
12206
12207         status = pthread_attr_init(&attr);
12208         if( status ) return status;
12209
12210 #if HAVE_PTHREADS < 7
12211         status = pthread_attr_setdetachstate(&attr, &detach);
12212         if( status < 0 ) status = errno;
12213 #else
12214         status = pthread_attr_setdetachstate(&attr, detach);
12215 #endif
12216         if( status ) return status;
12217         status = pthread_create( &t, &attr, task, NULL );
12218 #if HAVE_PTHREADS < 7
12219         if( status < 0 ) status = errno;
12220 #endif
12221         if( status ) return status;
12222 #else
12223         /* Draft 4 pthreads */
12224         status = pthread_create( &t, pthread_attr_default, task, NULL );
12225         if( status ) return errno;
12226
12227         /* give thread a chance to complete */
12228         /* it should remain joinable and hence detachable */
12229         sleep( 1 );
12230
12231         status = pthread_detach( &t );
12232         if( status ) return errno;
12233 #endif
12234
12235 #ifdef HAVE_LINUX_THREADS
12236         pthread_kill_other_threads_np();
12237 #endif
12238
12239         return 0;
12240
12241 }
12242
12243 _ACEOF
12244 if ac_fn_c_try_run "$LINENO"; then :
12245   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12246 else
12247   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12248 fi
12249 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12250   conftest.$ac_objext conftest.beam conftest.$ac_ext
12251 fi
12252
12253
12254                 # restore the LIBS
12255                 LIBS="$ol_LIBS"
12256
12257 fi
12258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
12259 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
12260
12261         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12262                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12263                 ol_link_threads=posix
12264         fi
12265 fi
12266
12267                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12268 if test "$ol_link_threads" = no ; then
12269         # try -lpthread -lmach -lexc
12270         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
12271 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
12272 if ${ol_cv_pthread_lpthread_lmach_lexc+:} false; then :
12273   $as_echo_n "(cached) " >&6
12274 else
12275
12276                 # save the flags
12277                 ol_LIBS="$LIBS"
12278                 LIBS="-lpthread -lmach -lexc $LIBS"
12279
12280                 if test "$cross_compiling" = yes; then :
12281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12282 /* end confdefs.h.  */
12283
12284 /* pthread test headers */
12285 #include <pthread.h>
12286 #if HAVE_PTHREADS < 7
12287 #include <errno.h>
12288 #endif
12289 #ifndef NULL
12290 #define NULL (void*)0
12291 #endif
12292
12293 static void *task(p)
12294         void *p;
12295 {
12296         return (void *) (p == NULL);
12297 }
12298
12299 int
12300 main ()
12301 {
12302
12303         /* pthread test function */
12304 #ifndef PTHREAD_CREATE_DETACHED
12305 #define PTHREAD_CREATE_DETACHED 1
12306 #endif
12307         pthread_t t;
12308         int status;
12309         int detach = PTHREAD_CREATE_DETACHED;
12310
12311 #if HAVE_PTHREADS > 4
12312         /* Final pthreads */
12313         pthread_attr_t attr;
12314
12315         status = pthread_attr_init(&attr);
12316         if( status ) return status;
12317
12318 #if HAVE_PTHREADS < 7
12319         status = pthread_attr_setdetachstate(&attr, &detach);
12320         if( status < 0 ) status = errno;
12321 #else
12322         status = pthread_attr_setdetachstate(&attr, detach);
12323 #endif
12324         if( status ) return status;
12325         status = pthread_create( &t, &attr, task, NULL );
12326 #if HAVE_PTHREADS < 7
12327         if( status < 0 ) status = errno;
12328 #endif
12329         if( status ) return status;
12330 #else
12331         /* Draft 4 pthreads */
12332         status = pthread_create( &t, pthread_attr_default, task, NULL );
12333         if( status ) return errno;
12334
12335         /* give thread a chance to complete */
12336         /* it should remain joinable and hence detachable */
12337         sleep( 1 );
12338
12339         status = pthread_detach( &t );
12340         if( status ) return errno;
12341 #endif
12342
12343 #ifdef HAVE_LINUX_THREADS
12344         pthread_kill_other_threads_np();
12345 #endif
12346
12347         return 0;
12348
12349   ;
12350   return 0;
12351 }
12352 _ACEOF
12353 if ac_fn_c_try_link "$LINENO"; then :
12354   ol_cv_pthread_lpthread_lmach_lexc=yes
12355 else
12356   ol_cv_pthread_lpthread_lmach_lexc=no
12357 fi
12358 rm -f core conftest.err conftest.$ac_objext \
12359     conftest$ac_exeext conftest.$ac_ext
12360 else
12361   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12362 /* end confdefs.h.  */
12363
12364
12365 /* pthread test headers */
12366 #include <pthread.h>
12367 #if HAVE_PTHREADS < 7
12368 #include <errno.h>
12369 #endif
12370 #ifndef NULL
12371 #define NULL (void*)0
12372 #endif
12373
12374 static void *task(p)
12375         void *p;
12376 {
12377         return (void *) (p == NULL);
12378 }
12379
12380
12381 int main(argc, argv)
12382         int argc;
12383         char **argv;
12384 {
12385
12386         /* pthread test function */
12387 #ifndef PTHREAD_CREATE_DETACHED
12388 #define PTHREAD_CREATE_DETACHED 1
12389 #endif
12390         pthread_t t;
12391         int status;
12392         int detach = PTHREAD_CREATE_DETACHED;
12393
12394 #if HAVE_PTHREADS > 4
12395         /* Final pthreads */
12396         pthread_attr_t attr;
12397
12398         status = pthread_attr_init(&attr);
12399         if( status ) return status;
12400
12401 #if HAVE_PTHREADS < 7
12402         status = pthread_attr_setdetachstate(&attr, &detach);
12403         if( status < 0 ) status = errno;
12404 #else
12405         status = pthread_attr_setdetachstate(&attr, detach);
12406 #endif
12407         if( status ) return status;
12408         status = pthread_create( &t, &attr, task, NULL );
12409 #if HAVE_PTHREADS < 7
12410         if( status < 0 ) status = errno;
12411 #endif
12412         if( status ) return status;
12413 #else
12414         /* Draft 4 pthreads */
12415         status = pthread_create( &t, pthread_attr_default, task, NULL );
12416         if( status ) return errno;
12417
12418         /* give thread a chance to complete */
12419         /* it should remain joinable and hence detachable */
12420         sleep( 1 );
12421
12422         status = pthread_detach( &t );
12423         if( status ) return errno;
12424 #endif
12425
12426 #ifdef HAVE_LINUX_THREADS
12427         pthread_kill_other_threads_np();
12428 #endif
12429
12430         return 0;
12431
12432 }
12433
12434 _ACEOF
12435 if ac_fn_c_try_run "$LINENO"; then :
12436   ol_cv_pthread_lpthread_lmach_lexc=yes
12437 else
12438   ol_cv_pthread_lpthread_lmach_lexc=no
12439 fi
12440 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12441   conftest.$ac_objext conftest.beam conftest.$ac_ext
12442 fi
12443
12444
12445                 # restore the LIBS
12446                 LIBS="$ol_LIBS"
12447
12448 fi
12449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
12450 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
12451
12452         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
12453                 ol_link_pthreads="-lpthread -lmach -lexc"
12454                 ol_link_threads=posix
12455         fi
12456 fi
12457
12458
12459                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
12460 if test "$ol_link_threads" = no ; then
12461         # try -lpthread -Wl,-woff,85
12462         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
12463 $as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
12464 if ${ol_cv_pthread_lib_lpthread_woff+:} false; then :
12465   $as_echo_n "(cached) " >&6
12466 else
12467
12468                 # save the flags
12469                 ol_LIBS="$LIBS"
12470                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
12471
12472                 if test "$cross_compiling" = yes; then :
12473   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12474 /* end confdefs.h.  */
12475
12476 /* pthread test headers */
12477 #include <pthread.h>
12478 #if HAVE_PTHREADS < 7
12479 #include <errno.h>
12480 #endif
12481 #ifndef NULL
12482 #define NULL (void*)0
12483 #endif
12484
12485 static void *task(p)
12486         void *p;
12487 {
12488         return (void *) (p == NULL);
12489 }
12490
12491 int
12492 main ()
12493 {
12494
12495         /* pthread test function */
12496 #ifndef PTHREAD_CREATE_DETACHED
12497 #define PTHREAD_CREATE_DETACHED 1
12498 #endif
12499         pthread_t t;
12500         int status;
12501         int detach = PTHREAD_CREATE_DETACHED;
12502
12503 #if HAVE_PTHREADS > 4
12504         /* Final pthreads */
12505         pthread_attr_t attr;
12506
12507         status = pthread_attr_init(&attr);
12508         if( status ) return status;
12509
12510 #if HAVE_PTHREADS < 7
12511         status = pthread_attr_setdetachstate(&attr, &detach);
12512         if( status < 0 ) status = errno;
12513 #else
12514         status = pthread_attr_setdetachstate(&attr, detach);
12515 #endif
12516         if( status ) return status;
12517         status = pthread_create( &t, &attr, task, NULL );
12518 #if HAVE_PTHREADS < 7
12519         if( status < 0 ) status = errno;
12520 #endif
12521         if( status ) return status;
12522 #else
12523         /* Draft 4 pthreads */
12524         status = pthread_create( &t, pthread_attr_default, task, NULL );
12525         if( status ) return errno;
12526
12527         /* give thread a chance to complete */
12528         /* it should remain joinable and hence detachable */
12529         sleep( 1 );
12530
12531         status = pthread_detach( &t );
12532         if( status ) return errno;
12533 #endif
12534
12535 #ifdef HAVE_LINUX_THREADS
12536         pthread_kill_other_threads_np();
12537 #endif
12538
12539         return 0;
12540
12541   ;
12542   return 0;
12543 }
12544 _ACEOF
12545 if ac_fn_c_try_link "$LINENO"; then :
12546   ol_cv_pthread_lib_lpthread_woff=yes
12547 else
12548   ol_cv_pthread_lib_lpthread_woff=no
12549 fi
12550 rm -f core conftest.err conftest.$ac_objext \
12551     conftest$ac_exeext conftest.$ac_ext
12552 else
12553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12554 /* end confdefs.h.  */
12555
12556
12557 /* pthread test headers */
12558 #include <pthread.h>
12559 #if HAVE_PTHREADS < 7
12560 #include <errno.h>
12561 #endif
12562 #ifndef NULL
12563 #define NULL (void*)0
12564 #endif
12565
12566 static void *task(p)
12567         void *p;
12568 {
12569         return (void *) (p == NULL);
12570 }
12571
12572
12573 int main(argc, argv)
12574         int argc;
12575         char **argv;
12576 {
12577
12578         /* pthread test function */
12579 #ifndef PTHREAD_CREATE_DETACHED
12580 #define PTHREAD_CREATE_DETACHED 1
12581 #endif
12582         pthread_t t;
12583         int status;
12584         int detach = PTHREAD_CREATE_DETACHED;
12585
12586 #if HAVE_PTHREADS > 4
12587         /* Final pthreads */
12588         pthread_attr_t attr;
12589
12590         status = pthread_attr_init(&attr);
12591         if( status ) return status;
12592
12593 #if HAVE_PTHREADS < 7
12594         status = pthread_attr_setdetachstate(&attr, &detach);
12595         if( status < 0 ) status = errno;
12596 #else
12597         status = pthread_attr_setdetachstate(&attr, detach);
12598 #endif
12599         if( status ) return status;
12600         status = pthread_create( &t, &attr, task, NULL );
12601 #if HAVE_PTHREADS < 7
12602         if( status < 0 ) status = errno;
12603 #endif
12604         if( status ) return status;
12605 #else
12606         /* Draft 4 pthreads */
12607         status = pthread_create( &t, pthread_attr_default, task, NULL );
12608         if( status ) return errno;
12609
12610         /* give thread a chance to complete */
12611         /* it should remain joinable and hence detachable */
12612         sleep( 1 );
12613
12614         status = pthread_detach( &t );
12615         if( status ) return errno;
12616 #endif
12617
12618 #ifdef HAVE_LINUX_THREADS
12619         pthread_kill_other_threads_np();
12620 #endif
12621
12622         return 0;
12623
12624 }
12625
12626 _ACEOF
12627 if ac_fn_c_try_run "$LINENO"; then :
12628   ol_cv_pthread_lib_lpthread_woff=yes
12629 else
12630   ol_cv_pthread_lib_lpthread_woff=no
12631 fi
12632 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12633   conftest.$ac_objext conftest.beam conftest.$ac_ext
12634 fi
12635
12636
12637                 # restore the LIBS
12638                 LIBS="$ol_LIBS"
12639
12640 fi
12641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
12642 $as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
12643
12644         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
12645                 ol_link_pthreads="-lpthread -Wl,-woff,85"
12646                 ol_link_threads=posix
12647         fi
12648 fi
12649
12650
12651                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
12652 if test "$ol_link_threads" = no ; then
12653         # try -lpthread
12654         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
12655 $as_echo_n "checking for pthread link with -lpthread... " >&6; }
12656 if ${ol_cv_pthread_lpthread+:} false; then :
12657   $as_echo_n "(cached) " >&6
12658 else
12659
12660                 # save the flags
12661                 ol_LIBS="$LIBS"
12662                 LIBS="-lpthread $LIBS"
12663
12664                 if test "$cross_compiling" = yes; then :
12665   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12666 /* end confdefs.h.  */
12667
12668 /* pthread test headers */
12669 #include <pthread.h>
12670 #if HAVE_PTHREADS < 7
12671 #include <errno.h>
12672 #endif
12673 #ifndef NULL
12674 #define NULL (void*)0
12675 #endif
12676
12677 static void *task(p)
12678         void *p;
12679 {
12680         return (void *) (p == NULL);
12681 }
12682
12683 int
12684 main ()
12685 {
12686
12687         /* pthread test function */
12688 #ifndef PTHREAD_CREATE_DETACHED
12689 #define PTHREAD_CREATE_DETACHED 1
12690 #endif
12691         pthread_t t;
12692         int status;
12693         int detach = PTHREAD_CREATE_DETACHED;
12694
12695 #if HAVE_PTHREADS > 4
12696         /* Final pthreads */
12697         pthread_attr_t attr;
12698
12699         status = pthread_attr_init(&attr);
12700         if( status ) return status;
12701
12702 #if HAVE_PTHREADS < 7
12703         status = pthread_attr_setdetachstate(&attr, &detach);
12704         if( status < 0 ) status = errno;
12705 #else
12706         status = pthread_attr_setdetachstate(&attr, detach);
12707 #endif
12708         if( status ) return status;
12709         status = pthread_create( &t, &attr, task, NULL );
12710 #if HAVE_PTHREADS < 7
12711         if( status < 0 ) status = errno;
12712 #endif
12713         if( status ) return status;
12714 #else
12715         /* Draft 4 pthreads */
12716         status = pthread_create( &t, pthread_attr_default, task, NULL );
12717         if( status ) return errno;
12718
12719         /* give thread a chance to complete */
12720         /* it should remain joinable and hence detachable */
12721         sleep( 1 );
12722
12723         status = pthread_detach( &t );
12724         if( status ) return errno;
12725 #endif
12726
12727 #ifdef HAVE_LINUX_THREADS
12728         pthread_kill_other_threads_np();
12729 #endif
12730
12731         return 0;
12732
12733   ;
12734   return 0;
12735 }
12736 _ACEOF
12737 if ac_fn_c_try_link "$LINENO"; then :
12738   ol_cv_pthread_lpthread=yes
12739 else
12740   ol_cv_pthread_lpthread=no
12741 fi
12742 rm -f core conftest.err conftest.$ac_objext \
12743     conftest$ac_exeext conftest.$ac_ext
12744 else
12745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12746 /* end confdefs.h.  */
12747
12748
12749 /* pthread test headers */
12750 #include <pthread.h>
12751 #if HAVE_PTHREADS < 7
12752 #include <errno.h>
12753 #endif
12754 #ifndef NULL
12755 #define NULL (void*)0
12756 #endif
12757
12758 static void *task(p)
12759         void *p;
12760 {
12761         return (void *) (p == NULL);
12762 }
12763
12764
12765 int main(argc, argv)
12766         int argc;
12767         char **argv;
12768 {
12769
12770         /* pthread test function */
12771 #ifndef PTHREAD_CREATE_DETACHED
12772 #define PTHREAD_CREATE_DETACHED 1
12773 #endif
12774         pthread_t t;
12775         int status;
12776         int detach = PTHREAD_CREATE_DETACHED;
12777
12778 #if HAVE_PTHREADS > 4
12779         /* Final pthreads */
12780         pthread_attr_t attr;
12781
12782         status = pthread_attr_init(&attr);
12783         if( status ) return status;
12784
12785 #if HAVE_PTHREADS < 7
12786         status = pthread_attr_setdetachstate(&attr, &detach);
12787         if( status < 0 ) status = errno;
12788 #else
12789         status = pthread_attr_setdetachstate(&attr, detach);
12790 #endif
12791         if( status ) return status;
12792         status = pthread_create( &t, &attr, task, NULL );
12793 #if HAVE_PTHREADS < 7
12794         if( status < 0 ) status = errno;
12795 #endif
12796         if( status ) return status;
12797 #else
12798         /* Draft 4 pthreads */
12799         status = pthread_create( &t, pthread_attr_default, task, NULL );
12800         if( status ) return errno;
12801
12802         /* give thread a chance to complete */
12803         /* it should remain joinable and hence detachable */
12804         sleep( 1 );
12805
12806         status = pthread_detach( &t );
12807         if( status ) return errno;
12808 #endif
12809
12810 #ifdef HAVE_LINUX_THREADS
12811         pthread_kill_other_threads_np();
12812 #endif
12813
12814         return 0;
12815
12816 }
12817
12818 _ACEOF
12819 if ac_fn_c_try_run "$LINENO"; then :
12820   ol_cv_pthread_lpthread=yes
12821 else
12822   ol_cv_pthread_lpthread=no
12823 fi
12824 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12825   conftest.$ac_objext conftest.beam conftest.$ac_ext
12826 fi
12827
12828
12829                 # restore the LIBS
12830                 LIBS="$ol_LIBS"
12831
12832 fi
12833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
12834 $as_echo "$ol_cv_pthread_lpthread" >&6; }
12835
12836         if test $ol_cv_pthread_lpthread = yes ; then
12837                 ol_link_pthreads="-lpthread"
12838                 ol_link_threads=posix
12839         fi
12840 fi
12841
12842                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
12843 if test "$ol_link_threads" = no ; then
12844         # try -lc_r
12845         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
12846 $as_echo_n "checking for pthread link with -lc_r... " >&6; }
12847 if ${ol_cv_pthread_lc_r+:} false; then :
12848   $as_echo_n "(cached) " >&6
12849 else
12850
12851                 # save the flags
12852                 ol_LIBS="$LIBS"
12853                 LIBS="-lc_r $LIBS"
12854
12855                 if test "$cross_compiling" = yes; then :
12856   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12857 /* end confdefs.h.  */
12858
12859 /* pthread test headers */
12860 #include <pthread.h>
12861 #if HAVE_PTHREADS < 7
12862 #include <errno.h>
12863 #endif
12864 #ifndef NULL
12865 #define NULL (void*)0
12866 #endif
12867
12868 static void *task(p)
12869         void *p;
12870 {
12871         return (void *) (p == NULL);
12872 }
12873
12874 int
12875 main ()
12876 {
12877
12878         /* pthread test function */
12879 #ifndef PTHREAD_CREATE_DETACHED
12880 #define PTHREAD_CREATE_DETACHED 1
12881 #endif
12882         pthread_t t;
12883         int status;
12884         int detach = PTHREAD_CREATE_DETACHED;
12885
12886 #if HAVE_PTHREADS > 4
12887         /* Final pthreads */
12888         pthread_attr_t attr;
12889
12890         status = pthread_attr_init(&attr);
12891         if( status ) return status;
12892
12893 #if HAVE_PTHREADS < 7
12894         status = pthread_attr_setdetachstate(&attr, &detach);
12895         if( status < 0 ) status = errno;
12896 #else
12897         status = pthread_attr_setdetachstate(&attr, detach);
12898 #endif
12899         if( status ) return status;
12900         status = pthread_create( &t, &attr, task, NULL );
12901 #if HAVE_PTHREADS < 7
12902         if( status < 0 ) status = errno;
12903 #endif
12904         if( status ) return status;
12905 #else
12906         /* Draft 4 pthreads */
12907         status = pthread_create( &t, pthread_attr_default, task, NULL );
12908         if( status ) return errno;
12909
12910         /* give thread a chance to complete */
12911         /* it should remain joinable and hence detachable */
12912         sleep( 1 );
12913
12914         status = pthread_detach( &t );
12915         if( status ) return errno;
12916 #endif
12917
12918 #ifdef HAVE_LINUX_THREADS
12919         pthread_kill_other_threads_np();
12920 #endif
12921
12922         return 0;
12923
12924   ;
12925   return 0;
12926 }
12927 _ACEOF
12928 if ac_fn_c_try_link "$LINENO"; then :
12929   ol_cv_pthread_lc_r=yes
12930 else
12931   ol_cv_pthread_lc_r=no
12932 fi
12933 rm -f core conftest.err conftest.$ac_objext \
12934     conftest$ac_exeext conftest.$ac_ext
12935 else
12936   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12937 /* end confdefs.h.  */
12938
12939
12940 /* pthread test headers */
12941 #include <pthread.h>
12942 #if HAVE_PTHREADS < 7
12943 #include <errno.h>
12944 #endif
12945 #ifndef NULL
12946 #define NULL (void*)0
12947 #endif
12948
12949 static void *task(p)
12950         void *p;
12951 {
12952         return (void *) (p == NULL);
12953 }
12954
12955
12956 int main(argc, argv)
12957         int argc;
12958         char **argv;
12959 {
12960
12961         /* pthread test function */
12962 #ifndef PTHREAD_CREATE_DETACHED
12963 #define PTHREAD_CREATE_DETACHED 1
12964 #endif
12965         pthread_t t;
12966         int status;
12967         int detach = PTHREAD_CREATE_DETACHED;
12968
12969 #if HAVE_PTHREADS > 4
12970         /* Final pthreads */
12971         pthread_attr_t attr;
12972
12973         status = pthread_attr_init(&attr);
12974         if( status ) return status;
12975
12976 #if HAVE_PTHREADS < 7
12977         status = pthread_attr_setdetachstate(&attr, &detach);
12978         if( status < 0 ) status = errno;
12979 #else
12980         status = pthread_attr_setdetachstate(&attr, detach);
12981 #endif
12982         if( status ) return status;
12983         status = pthread_create( &t, &attr, task, NULL );
12984 #if HAVE_PTHREADS < 7
12985         if( status < 0 ) status = errno;
12986 #endif
12987         if( status ) return status;
12988 #else
12989         /* Draft 4 pthreads */
12990         status = pthread_create( &t, pthread_attr_default, task, NULL );
12991         if( status ) return errno;
12992
12993         /* give thread a chance to complete */
12994         /* it should remain joinable and hence detachable */
12995         sleep( 1 );
12996
12997         status = pthread_detach( &t );
12998         if( status ) return errno;
12999 #endif
13000
13001 #ifdef HAVE_LINUX_THREADS
13002         pthread_kill_other_threads_np();
13003 #endif
13004
13005         return 0;
13006
13007 }
13008
13009 _ACEOF
13010 if ac_fn_c_try_run "$LINENO"; then :
13011   ol_cv_pthread_lc_r=yes
13012 else
13013   ol_cv_pthread_lc_r=no
13014 fi
13015 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13016   conftest.$ac_objext conftest.beam conftest.$ac_ext
13017 fi
13018
13019
13020                 # restore the LIBS
13021                 LIBS="$ol_LIBS"
13022
13023 fi
13024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
13025 $as_echo "$ol_cv_pthread_lc_r" >&6; }
13026
13027         if test $ol_cv_pthread_lc_r = yes ; then
13028                 ol_link_pthreads="-lc_r"
13029                 ol_link_threads=posix
13030         fi
13031 fi
13032
13033
13034                 # Pthread try link: -threads (ol_cv_pthread_threads)
13035 if test "$ol_link_threads" = no ; then
13036         # try -threads
13037         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
13038 $as_echo_n "checking for pthread link with -threads... " >&6; }
13039 if ${ol_cv_pthread_threads+:} false; then :
13040   $as_echo_n "(cached) " >&6
13041 else
13042
13043                 # save the flags
13044                 ol_LIBS="$LIBS"
13045                 LIBS="-threads $LIBS"
13046
13047                 if test "$cross_compiling" = yes; then :
13048   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13049 /* end confdefs.h.  */
13050
13051 /* pthread test headers */
13052 #include <pthread.h>
13053 #if HAVE_PTHREADS < 7
13054 #include <errno.h>
13055 #endif
13056 #ifndef NULL
13057 #define NULL (void*)0
13058 #endif
13059
13060 static void *task(p)
13061         void *p;
13062 {
13063         return (void *) (p == NULL);
13064 }
13065
13066 int
13067 main ()
13068 {
13069
13070         /* pthread test function */
13071 #ifndef PTHREAD_CREATE_DETACHED
13072 #define PTHREAD_CREATE_DETACHED 1
13073 #endif
13074         pthread_t t;
13075         int status;
13076         int detach = PTHREAD_CREATE_DETACHED;
13077
13078 #if HAVE_PTHREADS > 4
13079         /* Final pthreads */
13080         pthread_attr_t attr;
13081
13082         status = pthread_attr_init(&attr);
13083         if( status ) return status;
13084
13085 #if HAVE_PTHREADS < 7
13086         status = pthread_attr_setdetachstate(&attr, &detach);
13087         if( status < 0 ) status = errno;
13088 #else
13089         status = pthread_attr_setdetachstate(&attr, detach);
13090 #endif
13091         if( status ) return status;
13092         status = pthread_create( &t, &attr, task, NULL );
13093 #if HAVE_PTHREADS < 7
13094         if( status < 0 ) status = errno;
13095 #endif
13096         if( status ) return status;
13097 #else
13098         /* Draft 4 pthreads */
13099         status = pthread_create( &t, pthread_attr_default, task, NULL );
13100         if( status ) return errno;
13101
13102         /* give thread a chance to complete */
13103         /* it should remain joinable and hence detachable */
13104         sleep( 1 );
13105
13106         status = pthread_detach( &t );
13107         if( status ) return errno;
13108 #endif
13109
13110 #ifdef HAVE_LINUX_THREADS
13111         pthread_kill_other_threads_np();
13112 #endif
13113
13114         return 0;
13115
13116   ;
13117   return 0;
13118 }
13119 _ACEOF
13120 if ac_fn_c_try_link "$LINENO"; then :
13121   ol_cv_pthread_threads=yes
13122 else
13123   ol_cv_pthread_threads=no
13124 fi
13125 rm -f core conftest.err conftest.$ac_objext \
13126     conftest$ac_exeext conftest.$ac_ext
13127 else
13128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13129 /* end confdefs.h.  */
13130
13131
13132 /* pthread test headers */
13133 #include <pthread.h>
13134 #if HAVE_PTHREADS < 7
13135 #include <errno.h>
13136 #endif
13137 #ifndef NULL
13138 #define NULL (void*)0
13139 #endif
13140
13141 static void *task(p)
13142         void *p;
13143 {
13144         return (void *) (p == NULL);
13145 }
13146
13147
13148 int main(argc, argv)
13149         int argc;
13150         char **argv;
13151 {
13152
13153         /* pthread test function */
13154 #ifndef PTHREAD_CREATE_DETACHED
13155 #define PTHREAD_CREATE_DETACHED 1
13156 #endif
13157         pthread_t t;
13158         int status;
13159         int detach = PTHREAD_CREATE_DETACHED;
13160
13161 #if HAVE_PTHREADS > 4
13162         /* Final pthreads */
13163         pthread_attr_t attr;
13164
13165         status = pthread_attr_init(&attr);
13166         if( status ) return status;
13167
13168 #if HAVE_PTHREADS < 7
13169         status = pthread_attr_setdetachstate(&attr, &detach);
13170         if( status < 0 ) status = errno;
13171 #else
13172         status = pthread_attr_setdetachstate(&attr, detach);
13173 #endif
13174         if( status ) return status;
13175         status = pthread_create( &t, &attr, task, NULL );
13176 #if HAVE_PTHREADS < 7
13177         if( status < 0 ) status = errno;
13178 #endif
13179         if( status ) return status;
13180 #else
13181         /* Draft 4 pthreads */
13182         status = pthread_create( &t, pthread_attr_default, task, NULL );
13183         if( status ) return errno;
13184
13185         /* give thread a chance to complete */
13186         /* it should remain joinable and hence detachable */
13187         sleep( 1 );
13188
13189         status = pthread_detach( &t );
13190         if( status ) return errno;
13191 #endif
13192
13193 #ifdef HAVE_LINUX_THREADS
13194         pthread_kill_other_threads_np();
13195 #endif
13196
13197         return 0;
13198
13199 }
13200
13201 _ACEOF
13202 if ac_fn_c_try_run "$LINENO"; then :
13203   ol_cv_pthread_threads=yes
13204 else
13205   ol_cv_pthread_threads=no
13206 fi
13207 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13208   conftest.$ac_objext conftest.beam conftest.$ac_ext
13209 fi
13210
13211
13212                 # restore the LIBS
13213                 LIBS="$ol_LIBS"
13214
13215 fi
13216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
13217 $as_echo "$ol_cv_pthread_threads" >&6; }
13218
13219         if test $ol_cv_pthread_threads = yes ; then
13220                 ol_link_pthreads="-threads"
13221                 ol_link_threads=posix
13222         fi
13223 fi
13224
13225
13226                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13227 if test "$ol_link_threads" = no ; then
13228         # try -lpthreads -lmach -lexc -lc_r
13229         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13230 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
13231 if ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+:} false; then :
13232   $as_echo_n "(cached) " >&6
13233 else
13234
13235                 # save the flags
13236                 ol_LIBS="$LIBS"
13237                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13238
13239                 if test "$cross_compiling" = yes; then :
13240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13241 /* end confdefs.h.  */
13242
13243 /* pthread test headers */
13244 #include <pthread.h>
13245 #if HAVE_PTHREADS < 7
13246 #include <errno.h>
13247 #endif
13248 #ifndef NULL
13249 #define NULL (void*)0
13250 #endif
13251
13252 static void *task(p)
13253         void *p;
13254 {
13255         return (void *) (p == NULL);
13256 }
13257
13258 int
13259 main ()
13260 {
13261
13262         /* pthread test function */
13263 #ifndef PTHREAD_CREATE_DETACHED
13264 #define PTHREAD_CREATE_DETACHED 1
13265 #endif
13266         pthread_t t;
13267         int status;
13268         int detach = PTHREAD_CREATE_DETACHED;
13269
13270 #if HAVE_PTHREADS > 4
13271         /* Final pthreads */
13272         pthread_attr_t attr;
13273
13274         status = pthread_attr_init(&attr);
13275         if( status ) return status;
13276
13277 #if HAVE_PTHREADS < 7
13278         status = pthread_attr_setdetachstate(&attr, &detach);
13279         if( status < 0 ) status = errno;
13280 #else
13281         status = pthread_attr_setdetachstate(&attr, detach);
13282 #endif
13283         if( status ) return status;
13284         status = pthread_create( &t, &attr, task, NULL );
13285 #if HAVE_PTHREADS < 7
13286         if( status < 0 ) status = errno;
13287 #endif
13288         if( status ) return status;
13289 #else
13290         /* Draft 4 pthreads */
13291         status = pthread_create( &t, pthread_attr_default, task, NULL );
13292         if( status ) return errno;
13293
13294         /* give thread a chance to complete */
13295         /* it should remain joinable and hence detachable */
13296         sleep( 1 );
13297
13298         status = pthread_detach( &t );
13299         if( status ) return errno;
13300 #endif
13301
13302 #ifdef HAVE_LINUX_THREADS
13303         pthread_kill_other_threads_np();
13304 #endif
13305
13306         return 0;
13307
13308   ;
13309   return 0;
13310 }
13311 _ACEOF
13312 if ac_fn_c_try_link "$LINENO"; then :
13313   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13314 else
13315   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13316 fi
13317 rm -f core conftest.err conftest.$ac_objext \
13318     conftest$ac_exeext conftest.$ac_ext
13319 else
13320   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13321 /* end confdefs.h.  */
13322
13323
13324 /* pthread test headers */
13325 #include <pthread.h>
13326 #if HAVE_PTHREADS < 7
13327 #include <errno.h>
13328 #endif
13329 #ifndef NULL
13330 #define NULL (void*)0
13331 #endif
13332
13333 static void *task(p)
13334         void *p;
13335 {
13336         return (void *) (p == NULL);
13337 }
13338
13339
13340 int main(argc, argv)
13341         int argc;
13342         char **argv;
13343 {
13344
13345         /* pthread test function */
13346 #ifndef PTHREAD_CREATE_DETACHED
13347 #define PTHREAD_CREATE_DETACHED 1
13348 #endif
13349         pthread_t t;
13350         int status;
13351         int detach = PTHREAD_CREATE_DETACHED;
13352
13353 #if HAVE_PTHREADS > 4
13354         /* Final pthreads */
13355         pthread_attr_t attr;
13356
13357         status = pthread_attr_init(&attr);
13358         if( status ) return status;
13359
13360 #if HAVE_PTHREADS < 7
13361         status = pthread_attr_setdetachstate(&attr, &detach);
13362         if( status < 0 ) status = errno;
13363 #else
13364         status = pthread_attr_setdetachstate(&attr, detach);
13365 #endif
13366         if( status ) return status;
13367         status = pthread_create( &t, &attr, task, NULL );
13368 #if HAVE_PTHREADS < 7
13369         if( status < 0 ) status = errno;
13370 #endif
13371         if( status ) return status;
13372 #else
13373         /* Draft 4 pthreads */
13374         status = pthread_create( &t, pthread_attr_default, task, NULL );
13375         if( status ) return errno;
13376
13377         /* give thread a chance to complete */
13378         /* it should remain joinable and hence detachable */
13379         sleep( 1 );
13380
13381         status = pthread_detach( &t );
13382         if( status ) return errno;
13383 #endif
13384
13385 #ifdef HAVE_LINUX_THREADS
13386         pthread_kill_other_threads_np();
13387 #endif
13388
13389         return 0;
13390
13391 }
13392
13393 _ACEOF
13394 if ac_fn_c_try_run "$LINENO"; then :
13395   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13396 else
13397   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13398 fi
13399 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13400   conftest.$ac_objext conftest.beam conftest.$ac_ext
13401 fi
13402
13403
13404                 # restore the LIBS
13405                 LIBS="$ol_LIBS"
13406
13407 fi
13408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
13409 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
13410
13411         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
13412                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
13413                 ol_link_threads=posix
13414         fi
13415 fi
13416
13417                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
13418 if test "$ol_link_threads" = no ; then
13419         # try -lpthreads -lmach -lexc
13420         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
13421 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
13422 if ${ol_cv_pthread_lpthreads_lmach_lexc+:} false; then :
13423   $as_echo_n "(cached) " >&6
13424 else
13425
13426                 # save the flags
13427                 ol_LIBS="$LIBS"
13428                 LIBS="-lpthreads -lmach -lexc $LIBS"
13429
13430                 if test "$cross_compiling" = yes; then :
13431   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13432 /* end confdefs.h.  */
13433
13434 /* pthread test headers */
13435 #include <pthread.h>
13436 #if HAVE_PTHREADS < 7
13437 #include <errno.h>
13438 #endif
13439 #ifndef NULL
13440 #define NULL (void*)0
13441 #endif
13442
13443 static void *task(p)
13444         void *p;
13445 {
13446         return (void *) (p == NULL);
13447 }
13448
13449 int
13450 main ()
13451 {
13452
13453         /* pthread test function */
13454 #ifndef PTHREAD_CREATE_DETACHED
13455 #define PTHREAD_CREATE_DETACHED 1
13456 #endif
13457         pthread_t t;
13458         int status;
13459         int detach = PTHREAD_CREATE_DETACHED;
13460
13461 #if HAVE_PTHREADS > 4
13462         /* Final pthreads */
13463         pthread_attr_t attr;
13464
13465         status = pthread_attr_init(&attr);
13466         if( status ) return status;
13467
13468 #if HAVE_PTHREADS < 7
13469         status = pthread_attr_setdetachstate(&attr, &detach);
13470         if( status < 0 ) status = errno;
13471 #else
13472         status = pthread_attr_setdetachstate(&attr, detach);
13473 #endif
13474         if( status ) return status;
13475         status = pthread_create( &t, &attr, task, NULL );
13476 #if HAVE_PTHREADS < 7
13477         if( status < 0 ) status = errno;
13478 #endif
13479         if( status ) return status;
13480 #else
13481         /* Draft 4 pthreads */
13482         status = pthread_create( &t, pthread_attr_default, task, NULL );
13483         if( status ) return errno;
13484
13485         /* give thread a chance to complete */
13486         /* it should remain joinable and hence detachable */
13487         sleep( 1 );
13488
13489         status = pthread_detach( &t );
13490         if( status ) return errno;
13491 #endif
13492
13493 #ifdef HAVE_LINUX_THREADS
13494         pthread_kill_other_threads_np();
13495 #endif
13496
13497         return 0;
13498
13499   ;
13500   return 0;
13501 }
13502 _ACEOF
13503 if ac_fn_c_try_link "$LINENO"; then :
13504   ol_cv_pthread_lpthreads_lmach_lexc=yes
13505 else
13506   ol_cv_pthread_lpthreads_lmach_lexc=no
13507 fi
13508 rm -f core conftest.err conftest.$ac_objext \
13509     conftest$ac_exeext conftest.$ac_ext
13510 else
13511   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13512 /* end confdefs.h.  */
13513
13514
13515 /* pthread test headers */
13516 #include <pthread.h>
13517 #if HAVE_PTHREADS < 7
13518 #include <errno.h>
13519 #endif
13520 #ifndef NULL
13521 #define NULL (void*)0
13522 #endif
13523
13524 static void *task(p)
13525         void *p;
13526 {
13527         return (void *) (p == NULL);
13528 }
13529
13530
13531 int main(argc, argv)
13532         int argc;
13533         char **argv;
13534 {
13535
13536         /* pthread test function */
13537 #ifndef PTHREAD_CREATE_DETACHED
13538 #define PTHREAD_CREATE_DETACHED 1
13539 #endif
13540         pthread_t t;
13541         int status;
13542         int detach = PTHREAD_CREATE_DETACHED;
13543
13544 #if HAVE_PTHREADS > 4
13545         /* Final pthreads */
13546         pthread_attr_t attr;
13547
13548         status = pthread_attr_init(&attr);
13549         if( status ) return status;
13550
13551 #if HAVE_PTHREADS < 7
13552         status = pthread_attr_setdetachstate(&attr, &detach);
13553         if( status < 0 ) status = errno;
13554 #else
13555         status = pthread_attr_setdetachstate(&attr, detach);
13556 #endif
13557         if( status ) return status;
13558         status = pthread_create( &t, &attr, task, NULL );
13559 #if HAVE_PTHREADS < 7
13560         if( status < 0 ) status = errno;
13561 #endif
13562         if( status ) return status;
13563 #else
13564         /* Draft 4 pthreads */
13565         status = pthread_create( &t, pthread_attr_default, task, NULL );
13566         if( status ) return errno;
13567
13568         /* give thread a chance to complete */
13569         /* it should remain joinable and hence detachable */
13570         sleep( 1 );
13571
13572         status = pthread_detach( &t );
13573         if( status ) return errno;
13574 #endif
13575
13576 #ifdef HAVE_LINUX_THREADS
13577         pthread_kill_other_threads_np();
13578 #endif
13579
13580         return 0;
13581
13582 }
13583
13584 _ACEOF
13585 if ac_fn_c_try_run "$LINENO"; then :
13586   ol_cv_pthread_lpthreads_lmach_lexc=yes
13587 else
13588   ol_cv_pthread_lpthreads_lmach_lexc=no
13589 fi
13590 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13591   conftest.$ac_objext conftest.beam conftest.$ac_ext
13592 fi
13593
13594
13595                 # restore the LIBS
13596                 LIBS="$ol_LIBS"
13597
13598 fi
13599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
13600 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
13601
13602         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
13603                 ol_link_pthreads="-lpthreads -lmach -lexc"
13604                 ol_link_threads=posix
13605         fi
13606 fi
13607
13608                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
13609 if test "$ol_link_threads" = no ; then
13610         # try -lpthreads -lexc
13611         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
13612 $as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
13613 if ${ol_cv_pthread_lpthreads_lexc+:} false; then :
13614   $as_echo_n "(cached) " >&6
13615 else
13616
13617                 # save the flags
13618                 ol_LIBS="$LIBS"
13619                 LIBS="-lpthreads -lexc $LIBS"
13620
13621                 if test "$cross_compiling" = yes; then :
13622   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13623 /* end confdefs.h.  */
13624
13625 /* pthread test headers */
13626 #include <pthread.h>
13627 #if HAVE_PTHREADS < 7
13628 #include <errno.h>
13629 #endif
13630 #ifndef NULL
13631 #define NULL (void*)0
13632 #endif
13633
13634 static void *task(p)
13635         void *p;
13636 {
13637         return (void *) (p == NULL);
13638 }
13639
13640 int
13641 main ()
13642 {
13643
13644         /* pthread test function */
13645 #ifndef PTHREAD_CREATE_DETACHED
13646 #define PTHREAD_CREATE_DETACHED 1
13647 #endif
13648         pthread_t t;
13649         int status;
13650         int detach = PTHREAD_CREATE_DETACHED;
13651
13652 #if HAVE_PTHREADS > 4
13653         /* Final pthreads */
13654         pthread_attr_t attr;
13655
13656         status = pthread_attr_init(&attr);
13657         if( status ) return status;
13658
13659 #if HAVE_PTHREADS < 7
13660         status = pthread_attr_setdetachstate(&attr, &detach);
13661         if( status < 0 ) status = errno;
13662 #else
13663         status = pthread_attr_setdetachstate(&attr, detach);
13664 #endif
13665         if( status ) return status;
13666         status = pthread_create( &t, &attr, task, NULL );
13667 #if HAVE_PTHREADS < 7
13668         if( status < 0 ) status = errno;
13669 #endif
13670         if( status ) return status;
13671 #else
13672         /* Draft 4 pthreads */
13673         status = pthread_create( &t, pthread_attr_default, task, NULL );
13674         if( status ) return errno;
13675
13676         /* give thread a chance to complete */
13677         /* it should remain joinable and hence detachable */
13678         sleep( 1 );
13679
13680         status = pthread_detach( &t );
13681         if( status ) return errno;
13682 #endif
13683
13684 #ifdef HAVE_LINUX_THREADS
13685         pthread_kill_other_threads_np();
13686 #endif
13687
13688         return 0;
13689
13690   ;
13691   return 0;
13692 }
13693 _ACEOF
13694 if ac_fn_c_try_link "$LINENO"; then :
13695   ol_cv_pthread_lpthreads_lexc=yes
13696 else
13697   ol_cv_pthread_lpthreads_lexc=no
13698 fi
13699 rm -f core conftest.err conftest.$ac_objext \
13700     conftest$ac_exeext conftest.$ac_ext
13701 else
13702   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13703 /* end confdefs.h.  */
13704
13705
13706 /* pthread test headers */
13707 #include <pthread.h>
13708 #if HAVE_PTHREADS < 7
13709 #include <errno.h>
13710 #endif
13711 #ifndef NULL
13712 #define NULL (void*)0
13713 #endif
13714
13715 static void *task(p)
13716         void *p;
13717 {
13718         return (void *) (p == NULL);
13719 }
13720
13721
13722 int main(argc, argv)
13723         int argc;
13724         char **argv;
13725 {
13726
13727         /* pthread test function */
13728 #ifndef PTHREAD_CREATE_DETACHED
13729 #define PTHREAD_CREATE_DETACHED 1
13730 #endif
13731         pthread_t t;
13732         int status;
13733         int detach = PTHREAD_CREATE_DETACHED;
13734
13735 #if HAVE_PTHREADS > 4
13736         /* Final pthreads */
13737         pthread_attr_t attr;
13738
13739         status = pthread_attr_init(&attr);
13740         if( status ) return status;
13741
13742 #if HAVE_PTHREADS < 7
13743         status = pthread_attr_setdetachstate(&attr, &detach);
13744         if( status < 0 ) status = errno;
13745 #else
13746         status = pthread_attr_setdetachstate(&attr, detach);
13747 #endif
13748         if( status ) return status;
13749         status = pthread_create( &t, &attr, task, NULL );
13750 #if HAVE_PTHREADS < 7
13751         if( status < 0 ) status = errno;
13752 #endif
13753         if( status ) return status;
13754 #else
13755         /* Draft 4 pthreads */
13756         status = pthread_create( &t, pthread_attr_default, task, NULL );
13757         if( status ) return errno;
13758
13759         /* give thread a chance to complete */
13760         /* it should remain joinable and hence detachable */
13761         sleep( 1 );
13762
13763         status = pthread_detach( &t );
13764         if( status ) return errno;
13765 #endif
13766
13767 #ifdef HAVE_LINUX_THREADS
13768         pthread_kill_other_threads_np();
13769 #endif
13770
13771         return 0;
13772
13773 }
13774
13775 _ACEOF
13776 if ac_fn_c_try_run "$LINENO"; then :
13777   ol_cv_pthread_lpthreads_lexc=yes
13778 else
13779   ol_cv_pthread_lpthreads_lexc=no
13780 fi
13781 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13782   conftest.$ac_objext conftest.beam conftest.$ac_ext
13783 fi
13784
13785
13786                 # restore the LIBS
13787                 LIBS="$ol_LIBS"
13788
13789 fi
13790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
13791 $as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
13792
13793         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
13794                 ol_link_pthreads="-lpthreads -lexc"
13795                 ol_link_threads=posix
13796         fi
13797 fi
13798
13799
13800                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
13801 if test "$ol_link_threads" = no ; then
13802         # try -lpthreads
13803         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
13804 $as_echo_n "checking for pthread link with -lpthreads... " >&6; }
13805 if ${ol_cv_pthread_lib_lpthreads+:} false; then :
13806   $as_echo_n "(cached) " >&6
13807 else
13808
13809                 # save the flags
13810                 ol_LIBS="$LIBS"
13811                 LIBS="-lpthreads $LIBS"
13812
13813                 if test "$cross_compiling" = yes; then :
13814   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13815 /* end confdefs.h.  */
13816
13817 /* pthread test headers */
13818 #include <pthread.h>
13819 #if HAVE_PTHREADS < 7
13820 #include <errno.h>
13821 #endif
13822 #ifndef NULL
13823 #define NULL (void*)0
13824 #endif
13825
13826 static void *task(p)
13827         void *p;
13828 {
13829         return (void *) (p == NULL);
13830 }
13831
13832 int
13833 main ()
13834 {
13835
13836         /* pthread test function */
13837 #ifndef PTHREAD_CREATE_DETACHED
13838 #define PTHREAD_CREATE_DETACHED 1
13839 #endif
13840         pthread_t t;
13841         int status;
13842         int detach = PTHREAD_CREATE_DETACHED;
13843
13844 #if HAVE_PTHREADS > 4
13845         /* Final pthreads */
13846         pthread_attr_t attr;
13847
13848         status = pthread_attr_init(&attr);
13849         if( status ) return status;
13850
13851 #if HAVE_PTHREADS < 7
13852         status = pthread_attr_setdetachstate(&attr, &detach);
13853         if( status < 0 ) status = errno;
13854 #else
13855         status = pthread_attr_setdetachstate(&attr, detach);
13856 #endif
13857         if( status ) return status;
13858         status = pthread_create( &t, &attr, task, NULL );
13859 #if HAVE_PTHREADS < 7
13860         if( status < 0 ) status = errno;
13861 #endif
13862         if( status ) return status;
13863 #else
13864         /* Draft 4 pthreads */
13865         status = pthread_create( &t, pthread_attr_default, task, NULL );
13866         if( status ) return errno;
13867
13868         /* give thread a chance to complete */
13869         /* it should remain joinable and hence detachable */
13870         sleep( 1 );
13871
13872         status = pthread_detach( &t );
13873         if( status ) return errno;
13874 #endif
13875
13876 #ifdef HAVE_LINUX_THREADS
13877         pthread_kill_other_threads_np();
13878 #endif
13879
13880         return 0;
13881
13882   ;
13883   return 0;
13884 }
13885 _ACEOF
13886 if ac_fn_c_try_link "$LINENO"; then :
13887   ol_cv_pthread_lib_lpthreads=yes
13888 else
13889   ol_cv_pthread_lib_lpthreads=no
13890 fi
13891 rm -f core conftest.err conftest.$ac_objext \
13892     conftest$ac_exeext conftest.$ac_ext
13893 else
13894   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13895 /* end confdefs.h.  */
13896
13897
13898 /* pthread test headers */
13899 #include <pthread.h>
13900 #if HAVE_PTHREADS < 7
13901 #include <errno.h>
13902 #endif
13903 #ifndef NULL
13904 #define NULL (void*)0
13905 #endif
13906
13907 static void *task(p)
13908         void *p;
13909 {
13910         return (void *) (p == NULL);
13911 }
13912
13913
13914 int main(argc, argv)
13915         int argc;
13916         char **argv;
13917 {
13918
13919         /* pthread test function */
13920 #ifndef PTHREAD_CREATE_DETACHED
13921 #define PTHREAD_CREATE_DETACHED 1
13922 #endif
13923         pthread_t t;
13924         int status;
13925         int detach = PTHREAD_CREATE_DETACHED;
13926
13927 #if HAVE_PTHREADS > 4
13928         /* Final pthreads */
13929         pthread_attr_t attr;
13930
13931         status = pthread_attr_init(&attr);
13932         if( status ) return status;
13933
13934 #if HAVE_PTHREADS < 7
13935         status = pthread_attr_setdetachstate(&attr, &detach);
13936         if( status < 0 ) status = errno;
13937 #else
13938         status = pthread_attr_setdetachstate(&attr, detach);
13939 #endif
13940         if( status ) return status;
13941         status = pthread_create( &t, &attr, task, NULL );
13942 #if HAVE_PTHREADS < 7
13943         if( status < 0 ) status = errno;
13944 #endif
13945         if( status ) return status;
13946 #else
13947         /* Draft 4 pthreads */
13948         status = pthread_create( &t, pthread_attr_default, task, NULL );
13949         if( status ) return errno;
13950
13951         /* give thread a chance to complete */
13952         /* it should remain joinable and hence detachable */
13953         sleep( 1 );
13954
13955         status = pthread_detach( &t );
13956         if( status ) return errno;
13957 #endif
13958
13959 #ifdef HAVE_LINUX_THREADS
13960         pthread_kill_other_threads_np();
13961 #endif
13962
13963         return 0;
13964
13965 }
13966
13967 _ACEOF
13968 if ac_fn_c_try_run "$LINENO"; then :
13969   ol_cv_pthread_lib_lpthreads=yes
13970 else
13971   ol_cv_pthread_lib_lpthreads=no
13972 fi
13973 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13974   conftest.$ac_objext conftest.beam conftest.$ac_ext
13975 fi
13976
13977
13978                 # restore the LIBS
13979                 LIBS="$ol_LIBS"
13980
13981 fi
13982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
13983 $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
13984
13985         if test $ol_cv_pthread_lib_lpthreads = yes ; then
13986                 ol_link_pthreads="-lpthreads"
13987                 ol_link_threads=posix
13988         fi
13989 fi
13990
13991
13992 { $as_echo "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
13993 $as_echo "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
13994
13995                 if test $ol_link_threads != no ; then
13996                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
13997
13998                                                 save_CPPFLAGS="$CPPFLAGS"
13999                         save_LIBS="$LIBS"
14000                         LIBS="$LTHREAD_LIBS $LIBS"
14001
14002                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14003 do :
14004   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14005 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14006 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14007   cat >>confdefs.h <<_ACEOF
14008 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14009 _ACEOF
14010
14011 fi
14012 done
14013
14014
14015                         if test $ac_cv_func_sched_yield = no &&
14016                            test $ac_cv_func_pthread_yield = no &&
14017                            test $ac_cv_func_thr_yield = no ; then
14018                                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
14019 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
14020 if ${ac_cv_lib_rt_sched_yield+:} false; then :
14021   $as_echo_n "(cached) " >&6
14022 else
14023   ac_check_lib_save_LIBS=$LIBS
14024 LIBS="-lrt  $LIBS"
14025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14026 /* end confdefs.h.  */
14027
14028 /* Override any GCC internal prototype to avoid an error.
14029    Use char because int might match the return type of a GCC
14030    builtin and then its argument prototype would still apply.  */
14031 #ifdef __cplusplus
14032 extern "C"
14033 #endif
14034 char sched_yield ();
14035 int
14036 main ()
14037 {
14038 return sched_yield ();
14039   ;
14040   return 0;
14041 }
14042 _ACEOF
14043 if ac_fn_c_try_link "$LINENO"; then :
14044   ac_cv_lib_rt_sched_yield=yes
14045 else
14046   ac_cv_lib_rt_sched_yield=no
14047 fi
14048 rm -f core conftest.err conftest.$ac_objext \
14049     conftest$ac_exeext conftest.$ac_ext
14050 LIBS=$ac_check_lib_save_LIBS
14051 fi
14052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
14053 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
14054 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
14055   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14056
14057 $as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
14058
14059                                         ac_cv_func_sched_yield=yes
14060 else
14061   ac_cv_func_sched_yield=no
14062 fi
14063
14064                         fi
14065                         if test $ac_cv_func_sched_yield = no &&
14066                            test $ac_cv_func_pthread_yield = no &&
14067                            test "$ac_cv_func_thr_yield" = no ; then
14068                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
14069 $as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
14070                         fi
14071
14072                                                 for ac_func in pthread_kill
14073 do :
14074   ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
14075 if test "x$ac_cv_func_pthread_kill" = xyes; then :
14076   cat >>confdefs.h <<_ACEOF
14077 #define HAVE_PTHREAD_KILL 1
14078 _ACEOF
14079
14080 fi
14081 done
14082
14083
14084                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
14085 $as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
14086 if ${ol_cv_func_pthread_rwlock_destroy+:} false; then :
14087   $as_echo_n "(cached) " >&6
14088 else
14089
14090                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14091 /* end confdefs.h.  */
14092
14093 #include <pthread.h>
14094 pthread_rwlock_t rwlock;
14095
14096 int
14097 main ()
14098 {
14099 pthread_rwlock_destroy(&rwlock);
14100   ;
14101   return 0;
14102 }
14103 _ACEOF
14104 if ac_fn_c_try_link "$LINENO"; then :
14105   ol_cv_func_pthread_rwlock_destroy=yes
14106 else
14107   ol_cv_func_pthread_rwlock_destroy=no
14108 fi
14109 rm -f core conftest.err conftest.$ac_objext \
14110     conftest$ac_exeext conftest.$ac_ext
14111
14112 fi
14113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
14114 $as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
14115                         if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
14116
14117 $as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
14118
14119                         fi
14120
14121                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
14122 $as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
14123 if ${ol_cv_func_pthread_detach+:} false; then :
14124   $as_echo_n "(cached) " >&6
14125 else
14126
14127                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14128 /* end confdefs.h.  */
14129
14130 #include <pthread.h>
14131 #ifndef NULL
14132 #define NULL (void*)0
14133 #endif
14134
14135 int
14136 main ()
14137 {
14138 pthread_detach(NULL);
14139   ;
14140   return 0;
14141 }
14142 _ACEOF
14143 if ac_fn_c_try_link "$LINENO"; then :
14144   ol_cv_func_pthread_detach=yes
14145 else
14146   ol_cv_func_pthread_detach=no
14147 fi
14148 rm -f core conftest.err conftest.$ac_objext \
14149     conftest$ac_exeext conftest.$ac_ext
14150
14151 fi
14152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
14153 $as_echo "$ol_cv_func_pthread_detach" >&6; }
14154
14155                         if test $ol_cv_func_pthread_detach = no ; then
14156                                 as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
14157                         fi
14158
14159
14160 $as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
14161
14162
14163                                                 for ac_func in \
14164                                 pthread_setconcurrency \
14165                                 pthread_getconcurrency \
14166                                 thr_setconcurrency \
14167                                 thr_getconcurrency \
14168
14169 do :
14170   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14171 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14172 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14173   cat >>confdefs.h <<_ACEOF
14174 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14175 _ACEOF
14176
14177 fi
14178 done
14179
14180
14181
14182         for ac_func in pthread_kill_other_threads_np
14183 do :
14184   ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
14185 if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes; then :
14186   cat >>confdefs.h <<_ACEOF
14187 #define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
14188 _ACEOF
14189
14190 fi
14191 done
14192
14193         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
14194 $as_echo_n "checking for LinuxThreads implementation... " >&6; }
14195 if ${ol_cv_sys_linux_threads+:} false; then :
14196   $as_echo_n "(cached) " >&6
14197 else
14198   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14199 fi
14200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
14201 $as_echo "$ol_cv_sys_linux_threads" >&6; }
14202
14203
14204
14205
14206         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
14207 $as_echo_n "checking for LinuxThreads consistency... " >&6; }
14208 if ${ol_cv_linux_threads+:} false; then :
14209   $as_echo_n "(cached) " >&6
14210 else
14211
14212                 if test $ol_cv_header_linux_threads = yes &&
14213                    test $ol_cv_sys_linux_threads = yes; then
14214                         ol_cv_linux_threads=yes
14215                 elif test $ol_cv_header_linux_threads = no &&
14216                      test $ol_cv_sys_linux_threads = no; then
14217                         ol_cv_linux_threads=no
14218                 else
14219                         ol_cv_linux_threads=error
14220                 fi
14221
14222 fi
14223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
14224 $as_echo "$ol_cv_linux_threads" >&6; }
14225
14226
14227                         if test $ol_cv_linux_threads = error; then
14228                                 as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
14229                         fi
14230
14231                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
14232 $as_echo_n "checking if pthread_create() works... " >&6; }
14233 if ${ol_cv_pthread_create_works+:} false; then :
14234   $as_echo_n "(cached) " >&6
14235 else
14236
14237                         if test "$cross_compiling" = yes; then :
14238                                 ol_cv_pthread_create_works=yes
14239 else
14240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14241 /* end confdefs.h.  */
14242
14243
14244 /* pthread test headers */
14245 #include <pthread.h>
14246 #if HAVE_PTHREADS < 7
14247 #include <errno.h>
14248 #endif
14249 #ifndef NULL
14250 #define NULL (void*)0
14251 #endif
14252
14253 static void *task(p)
14254         void *p;
14255 {
14256         return (void *) (p == NULL);
14257 }
14258
14259
14260 int main(argc, argv)
14261         int argc;
14262         char **argv;
14263 {
14264
14265         /* pthread test function */
14266 #ifndef PTHREAD_CREATE_DETACHED
14267 #define PTHREAD_CREATE_DETACHED 1
14268 #endif
14269         pthread_t t;
14270         int status;
14271         int detach = PTHREAD_CREATE_DETACHED;
14272
14273 #if HAVE_PTHREADS > 4
14274         /* Final pthreads */
14275         pthread_attr_t attr;
14276
14277         status = pthread_attr_init(&attr);
14278         if( status ) return status;
14279
14280 #if HAVE_PTHREADS < 7
14281         status = pthread_attr_setdetachstate(&attr, &detach);
14282         if( status < 0 ) status = errno;
14283 #else
14284         status = pthread_attr_setdetachstate(&attr, detach);
14285 #endif
14286         if( status ) return status;
14287         status = pthread_create( &t, &attr, task, NULL );
14288 #if HAVE_PTHREADS < 7
14289         if( status < 0 ) status = errno;
14290 #endif
14291         if( status ) return status;
14292 #else
14293         /* Draft 4 pthreads */
14294         status = pthread_create( &t, pthread_attr_default, task, NULL );
14295         if( status ) return errno;
14296
14297         /* give thread a chance to complete */
14298         /* it should remain joinable and hence detachable */
14299         sleep( 1 );
14300
14301         status = pthread_detach( &t );
14302         if( status ) return errno;
14303 #endif
14304
14305 #ifdef HAVE_LINUX_THREADS
14306         pthread_kill_other_threads_np();
14307 #endif
14308
14309         return 0;
14310
14311 }
14312
14313 _ACEOF
14314 if ac_fn_c_try_run "$LINENO"; then :
14315   ol_cv_pthread_create_works=yes
14316 else
14317   ol_cv_pthread_create_works=no
14318 fi
14319 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14320   conftest.$ac_objext conftest.beam conftest.$ac_ext
14321 fi
14322
14323 fi
14324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
14325 $as_echo "$ol_cv_pthread_create_works" >&6; }
14326
14327                         if test $ol_cv_pthread_create_works = no ; then
14328                                 as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
14329                         fi
14330
14331                         ol_replace_broken_yield=no
14332
14333                         if test $ol_replace_broken_yield = yes ; then
14334
14335 $as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
14336
14337                         fi
14338
14339                                                 if test x$ol_with_yielding_select = xauto ; then
14340                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
14341 $as_echo_n "checking if select yields when using pthreads... " >&6; }
14342 if ${ol_cv_pthread_select_yields+:} false; then :
14343   $as_echo_n "(cached) " >&6
14344 else
14345
14346                                 if test "$cross_compiling" = yes; then :
14347   ol_cv_pthread_select_yields=cross
14348 else
14349   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14350 /* end confdefs.h.  */
14351
14352 #include <sys/types.h>
14353 #include <sys/time.h>
14354 #include <unistd.h>
14355 #include <pthread.h>
14356 #ifndef NULL
14357 #define NULL (void*) 0
14358 #endif
14359
14360 static int fildes[2];
14361
14362 static void *task(p)
14363         void *p;
14364 {
14365         int i;
14366         struct timeval tv;
14367
14368         fd_set rfds;
14369
14370         tv.tv_sec=10;
14371         tv.tv_usec=0;
14372
14373         FD_ZERO(&rfds);
14374         FD_SET(fildes[0], &rfds);
14375
14376         /* we're not interested in any fds */
14377         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
14378
14379         if(i < 0) {
14380                 perror("select");
14381                 exit(10);
14382         }
14383
14384         exit(0); /* if we exit here, the select blocked the whole process */
14385 }
14386
14387 int main(argc, argv)
14388         int argc;
14389         char **argv;
14390 {
14391         pthread_t t;
14392
14393         /* create a pipe to select */
14394         if(pipe(&fildes[0])) {
14395                 perror("select");
14396                 exit(1);
14397         }
14398
14399 #ifdef HAVE_PTHREAD_SETCONCURRENCY
14400         (void) pthread_setconcurrency(2);
14401 #else
14402 #ifdef HAVE_THR_SETCONCURRENCY
14403         /* Set Solaris LWP concurrency to 2 */
14404         thr_setconcurrency(2);
14405 #endif
14406 #endif
14407
14408 #if HAVE_PTHREADS < 6
14409         pthread_create(&t, pthread_attr_default, task, NULL);
14410 #else
14411         pthread_create(&t, NULL, task, NULL);
14412 #endif
14413
14414         /* make sure task runs first */
14415 #ifdef HAVE_THR_YIELD
14416         thr_yield();
14417 #elif defined( HAVE_SCHED_YIELD )
14418         sched_yield();
14419 #elif defined( HAVE_PTHREAD_YIELD )
14420         pthread_yield();
14421 #endif
14422
14423         exit(2);
14424 }
14425 _ACEOF
14426 if ac_fn_c_try_run "$LINENO"; then :
14427   ol_cv_pthread_select_yields=no
14428 else
14429   ol_cv_pthread_select_yields=yes
14430 fi
14431 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14432   conftest.$ac_objext conftest.beam conftest.$ac_ext
14433 fi
14434
14435 fi
14436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
14437 $as_echo "$ol_cv_pthread_select_yields" >&6; }
14438
14439                                 if test $ol_cv_pthread_select_yields = cross ; then
14440                                         as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
14441                                 fi
14442
14443                                 if test $ol_cv_pthread_select_yields = yes ; then
14444                                         ol_with_yielding_select=yes
14445                                 fi
14446                         fi
14447
14448                                                 CPPFLAGS="$save_CPPFLAGS"
14449                         LIBS="$save_LIBS"
14450                 else
14451                         as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
14452                 fi
14453         fi
14454
14455         if test $ol_with_threads = posix ; then
14456                 as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
14457         fi
14458         ;;
14459 esac
14460
14461 case $ol_with_threads in auto | yes | mach)
14462
14463                 for ac_header in mach/cthreads.h cthreads.h
14464 do :
14465   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14466 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14467 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14468   cat >>confdefs.h <<_ACEOF
14469 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14470 _ACEOF
14471
14472 fi
14473
14474 done
14475
14476         if test $ac_cv_header_mach_cthreads_h = yes ; then
14477                 ol_with_threads=found
14478
14479                                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
14480 if test "x$ac_cv_func_cthread_fork" = xyes; then :
14481   ol_link_threads=yes
14482 fi
14483
14484
14485                 if test $ol_link_threads = no ; then
14486                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
14487 $as_echo_n "checking for cthread_fork with -all_load... " >&6; }
14488 if ${ol_cv_cthread_all_load+:} false; then :
14489   $as_echo_n "(cached) " >&6
14490 else
14491
14492                                                                 save_LIBS="$LIBS"
14493                                 LIBS="-all_load $LIBS"
14494                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14495 /* end confdefs.h.  */
14496 #include <mach/cthreads.h>
14497 int
14498 main ()
14499 {
14500
14501                                         cthread_fork((void *)0, (void *)0);
14502
14503   ;
14504   return 0;
14505 }
14506 _ACEOF
14507 if ac_fn_c_try_link "$LINENO"; then :
14508   ol_cv_cthread_all_load=yes
14509 else
14510   ol_cv_cthread_all_load=no
14511 fi
14512 rm -f core conftest.err conftest.$ac_objext \
14513     conftest$ac_exeext conftest.$ac_ext
14514                                                                 LIBS="$save_LIBS"
14515
14516 fi
14517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
14518 $as_echo "$ol_cv_cthread_all_load" >&6; }
14519
14520                         if test $ol_cv_cthread_all_load = yes ; then
14521                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
14522                                 ol_link_threads=mach
14523                                 ol_with_threads=found
14524                         fi
14525                 fi
14526
14527         elif test $ac_cv_header_cthreads_h = yes ; then
14528
14529                 ol_with_threads=found
14530
14531                                 save_LIBS="$LIBS"
14532                 LIBS="$LIBS -lthreads"
14533                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
14534 if test "x$ac_cv_func_cthread_fork" = xyes; then :
14535   ol_link_threads=yes
14536 fi
14537
14538                 LIBS="$save_LIBS"
14539
14540                 if test $ol_link_threads = yes ; then
14541                         LTHREAD_LIBS="-lthreads"
14542                         ol_link_threads=mach
14543                         ol_with_threads=found
14544                 else
14545                         as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
14546                 fi
14547
14548         elif test $ol_with_threads = mach ; then
14549                 as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
14550         fi
14551
14552         if test $ol_link_threads = mach ; then
14553
14554 $as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
14555
14556         elif test $ol_with_threads = found ; then
14557                 as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
14558         fi
14559         ;;
14560 esac
14561
14562 case $ol_with_threads in auto | yes | pth)
14563
14564         for ac_header in pth.h
14565 do :
14566   ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
14567 if test "x$ac_cv_header_pth_h" = xyes; then :
14568   cat >>confdefs.h <<_ACEOF
14569 #define HAVE_PTH_H 1
14570 _ACEOF
14571
14572 fi
14573
14574 done
14575
14576
14577         if test $ac_cv_header_pth_h = yes ; then
14578                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
14579 $as_echo_n "checking for pth_version in -lpth... " >&6; }
14580 if ${ac_cv_lib_pth_pth_version+:} false; then :
14581   $as_echo_n "(cached) " >&6
14582 else
14583   ac_check_lib_save_LIBS=$LIBS
14584 LIBS="-lpth  $LIBS"
14585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14586 /* end confdefs.h.  */
14587
14588 /* Override any GCC internal prototype to avoid an error.
14589    Use char because int might match the return type of a GCC
14590    builtin and then its argument prototype would still apply.  */
14591 #ifdef __cplusplus
14592 extern "C"
14593 #endif
14594 char pth_version ();
14595 int
14596 main ()
14597 {
14598 return pth_version ();
14599   ;
14600   return 0;
14601 }
14602 _ACEOF
14603 if ac_fn_c_try_link "$LINENO"; then :
14604   ac_cv_lib_pth_pth_version=yes
14605 else
14606   ac_cv_lib_pth_pth_version=no
14607 fi
14608 rm -f core conftest.err conftest.$ac_objext \
14609     conftest$ac_exeext conftest.$ac_ext
14610 LIBS=$ac_check_lib_save_LIBS
14611 fi
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
14613 $as_echo "$ac_cv_lib_pth_pth_version" >&6; }
14614 if test "x$ac_cv_lib_pth_pth_version" = xyes; then :
14615   have_pth=yes
14616 else
14617   have_pth=no
14618 fi
14619
14620
14621                 if test $have_pth = yes ; then
14622
14623 $as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
14624
14625                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
14626                         ol_link_threads=pth
14627                         ol_with_threads=found
14628
14629                         if test x$ol_with_yielding_select = xauto ; then
14630                                 ol_with_yielding_select=yes
14631                         fi
14632                 fi
14633         fi
14634         ;;
14635 esac
14636
14637 case $ol_with_threads in auto | yes | lwp)
14638
14639                 for ac_header in thread.h synch.h
14640 do :
14641   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14642 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14643 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14644   cat >>confdefs.h <<_ACEOF
14645 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14646 _ACEOF
14647
14648 fi
14649
14650 done
14651
14652         if test $ac_cv_header_thread_h = yes &&
14653            test $ac_cv_header_synch_h = yes ; then
14654                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
14655 $as_echo_n "checking for thr_create in -lthread... " >&6; }
14656 if ${ac_cv_lib_thread_thr_create+:} false; then :
14657   $as_echo_n "(cached) " >&6
14658 else
14659   ac_check_lib_save_LIBS=$LIBS
14660 LIBS="-lthread  $LIBS"
14661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14662 /* end confdefs.h.  */
14663
14664 /* Override any GCC internal prototype to avoid an error.
14665    Use char because int might match the return type of a GCC
14666    builtin and then its argument prototype would still apply.  */
14667 #ifdef __cplusplus
14668 extern "C"
14669 #endif
14670 char thr_create ();
14671 int
14672 main ()
14673 {
14674 return thr_create ();
14675   ;
14676   return 0;
14677 }
14678 _ACEOF
14679 if ac_fn_c_try_link "$LINENO"; then :
14680   ac_cv_lib_thread_thr_create=yes
14681 else
14682   ac_cv_lib_thread_thr_create=no
14683 fi
14684 rm -f core conftest.err conftest.$ac_objext \
14685     conftest$ac_exeext conftest.$ac_ext
14686 LIBS=$ac_check_lib_save_LIBS
14687 fi
14688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
14689 $as_echo "$ac_cv_lib_thread_thr_create" >&6; }
14690 if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
14691   have_thr=yes
14692 else
14693   have_thr=no
14694 fi
14695
14696
14697                 if test $have_thr = yes ; then
14698
14699 $as_echo "#define HAVE_THR 1" >>confdefs.h
14700
14701                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
14702                         ol_link_threads=thr
14703
14704                         if test x$ol_with_yielding_select = xauto ; then
14705                                 ol_with_yielding_select=yes
14706                         fi
14707
14708                                                 for ac_func in \
14709                                 thr_setconcurrency \
14710                                 thr_getconcurrency \
14711
14712 do :
14713   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14714 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14715 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14716   cat >>confdefs.h <<_ACEOF
14717 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14718 _ACEOF
14719
14720 fi
14721 done
14722
14723                 fi
14724         fi
14725
14726                 for ac_header in lwp/lwp.h
14727 do :
14728   ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
14729 if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
14730   cat >>confdefs.h <<_ACEOF
14731 #define HAVE_LWP_LWP_H 1
14732 _ACEOF
14733
14734 fi
14735
14736 done
14737
14738         if test $ac_cv_header_lwp_lwp_h = yes ; then
14739                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
14740 $as_echo_n "checking for lwp_create in -llwp... " >&6; }
14741 if ${ac_cv_lib_lwp_lwp_create+:} false; then :
14742   $as_echo_n "(cached) " >&6
14743 else
14744   ac_check_lib_save_LIBS=$LIBS
14745 LIBS="-llwp  $LIBS"
14746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14747 /* end confdefs.h.  */
14748
14749 /* Override any GCC internal prototype to avoid an error.
14750    Use char because int might match the return type of a GCC
14751    builtin and then its argument prototype would still apply.  */
14752 #ifdef __cplusplus
14753 extern "C"
14754 #endif
14755 char lwp_create ();
14756 int
14757 main ()
14758 {
14759 return lwp_create ();
14760   ;
14761   return 0;
14762 }
14763 _ACEOF
14764 if ac_fn_c_try_link "$LINENO"; then :
14765   ac_cv_lib_lwp_lwp_create=yes
14766 else
14767   ac_cv_lib_lwp_lwp_create=no
14768 fi
14769 rm -f core conftest.err conftest.$ac_objext \
14770     conftest$ac_exeext conftest.$ac_ext
14771 LIBS=$ac_check_lib_save_LIBS
14772 fi
14773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
14774 $as_echo "$ac_cv_lib_lwp_lwp_create" >&6; }
14775 if test "x$ac_cv_lib_lwp_lwp_create" = xyes; then :
14776   have_lwp=yes
14777 else
14778   have_lwp=no
14779 fi
14780
14781
14782                 if test $have_lwp = yes ; then
14783
14784 $as_echo "#define HAVE_LWP 1" >>confdefs.h
14785
14786                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
14787                         ol_link_threads=lwp
14788
14789                         if test x$ol_with_yielding_select = xauto ; then
14790                                 ol_with_yielding_select=no
14791                         fi
14792                 fi
14793         fi
14794         ;;
14795 esac
14796
14797 if test $ol_with_yielding_select = yes ; then
14798
14799 $as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
14800
14801 fi
14802
14803 if test $ol_with_threads = manual ; then
14804                 ol_link_threads=yes
14805
14806         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
14807 $as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
14808
14809         for ac_header in pthread.h sched.h
14810 do :
14811   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14812 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14813 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14814   cat >>confdefs.h <<_ACEOF
14815 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14816 _ACEOF
14817
14818 fi
14819
14820 done
14821
14822         for ac_func in sched_yield pthread_yield
14823 do :
14824   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14825 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14826 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14827   cat >>confdefs.h <<_ACEOF
14828 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14829 _ACEOF
14830
14831 fi
14832 done
14833
14834
14835         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
14836 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
14837 if ${ol_cv_header_linux_threads+:} false; then :
14838   $as_echo_n "(cached) " >&6
14839 else
14840   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14841 /* end confdefs.h.  */
14842 #include <pthread.h>
14843 _ACEOF
14844 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14845   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
14846   ol_cv_header_linux_threads=yes
14847 else
14848   ol_cv_header_linux_threads=no
14849 fi
14850 rm -f conftest*
14851
14852
14853 fi
14854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
14855 $as_echo "$ol_cv_header_linux_threads" >&6; }
14856         if test $ol_cv_header_linux_threads = yes; then
14857
14858 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
14859
14860         fi
14861
14862
14863         for ac_header in mach/cthreads.h
14864 do :
14865   ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
14866 if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
14867   cat >>confdefs.h <<_ACEOF
14868 #define HAVE_MACH_CTHREADS_H 1
14869 _ACEOF
14870
14871 fi
14872
14873 done
14874
14875         for ac_header in lwp/lwp.h
14876 do :
14877   ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
14878 if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
14879   cat >>confdefs.h <<_ACEOF
14880 #define HAVE_LWP_LWP_H 1
14881 _ACEOF
14882
14883 fi
14884
14885 done
14886
14887         for ac_header in thread.h synch.h
14888 do :
14889   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14890 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14891 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14892   cat >>confdefs.h <<_ACEOF
14893 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14894 _ACEOF
14895
14896 fi
14897
14898 done
14899
14900 fi
14901
14902 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
14903
14904 $as_echo "#define REENTRANT 1" >>confdefs.h
14905
14906
14907 $as_echo "#define _REENTRANT 1" >>confdefs.h
14908
14909
14910 $as_echo "#define THREAD_SAFE 1" >>confdefs.h
14911
14912
14913 $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
14914
14915
14916 $as_echo "#define THREADSAFE 1" >>confdefs.h
14917
14918
14919 $as_echo "#define _THREADSAFE 1" >>confdefs.h
14920
14921
14922 $as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
14923
14924
14925                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
14926 $as_echo_n "checking for thread specific errno... " >&6; }
14927 if ${ol_cv_errno_thread_specific+:} false; then :
14928   $as_echo_n "(cached) " >&6
14929 else
14930
14931                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14932 /* end confdefs.h.  */
14933 #include <errno.h>
14934 int
14935 main ()
14936 {
14937 errno = 0;
14938   ;
14939   return 0;
14940 }
14941 _ACEOF
14942 if ac_fn_c_try_link "$LINENO"; then :
14943   ol_cv_errno_thread_specific=yes
14944 else
14945   ol_cv_errno_thread_specific=no
14946 fi
14947 rm -f core conftest.err conftest.$ac_objext \
14948     conftest$ac_exeext conftest.$ac_ext
14949
14950 fi
14951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
14952 $as_echo "$ol_cv_errno_thread_specific" >&6; }
14953
14954                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
14955 $as_echo_n "checking for thread specific h_errno... " >&6; }
14956 if ${ol_cv_h_errno_thread_specific+:} false; then :
14957   $as_echo_n "(cached) " >&6
14958 else
14959
14960                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14961 /* end confdefs.h.  */
14962 #include <netdb.h>
14963 int
14964 main ()
14965 {
14966 h_errno = 0;
14967   ;
14968   return 0;
14969 }
14970 _ACEOF
14971 if ac_fn_c_try_link "$LINENO"; then :
14972   ol_cv_h_errno_thread_specific=yes
14973 else
14974   ol_cv_h_errno_thread_specific=no
14975 fi
14976 rm -f core conftest.err conftest.$ac_objext \
14977     conftest$ac_exeext conftest.$ac_ext
14978
14979 fi
14980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
14981 $as_echo "$ol_cv_h_errno_thread_specific" >&6; }
14982
14983         if test $ol_cv_errno_thread_specific != yes ||
14984            test $ol_cv_h_errno_thread_specific != yes ; then
14985                 LIBS="$LTHREAD_LIBS $LIBS"
14986                 LTHREAD_LIBS=""
14987         fi
14988
14989 fi
14990
14991 if test $ol_link_threads = no ; then
14992         if test $ol_with_threads = yes ; then
14993                 as_fn_error $? "no suitable thread support" "$LINENO" 5
14994         fi
14995
14996         if test $ol_with_threads = auto ; then
14997                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
14998 $as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
14999                 ol_with_threads=no
15000         fi
15001
15002
15003 $as_echo "#define NO_THREADS 1" >>confdefs.h
15004
15005         LTHREAD_LIBS=""
15006         BUILD_THREAD=no
15007 else
15008         BUILD_THREAD=yes
15009 fi
15010
15011 if test $ol_link_threads != no ; then
15012
15013 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
15014
15015 fi
15016
15017 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
15018 case "$ol_with_threads" in
15019  no)
15020     ol_pthread_ok=no
15021
15022     ;;
15023  *)
15024     ol_found_pthreads=yes
15025     ;;
15026 esac
15027
15028 ac_ext=c
15029 ac_cpp='$CPP $CPPFLAGS'
15030 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15031 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15032 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15033
15034
15035
15036
15037
15038
15039     case "$ol_found_pthreads" in
15040      yes)
15041         saved_LIBS="$LIBS"
15042         LIBS="$LTHREAD_LIBS $LIBS"
15043         saved_CFLAGS="$CFLAGS"
15044         CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
15045         for ac_func in sem_timedwait
15046 do :
15047   ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
15048 if test "x$ac_cv_func_sem_timedwait" = xyes; then :
15049   cat >>confdefs.h <<_ACEOF
15050 #define HAVE_SEM_TIMEDWAIT 1
15051 _ACEOF
15052
15053 fi
15054 done
15055
15056         LIBS="$saved_LIBS"
15057         { saved_LIBS=; unset saved_LIBS;}
15058         CFLAGS="$saved_CFLAGS"
15059         { saved_CFLAGS=; unset saved_CFLAGS;}
15060         case "$ac_cv_func_sem_timedwait" in
15061          yes)
15062             PTHREAD_LIBS="$LTHREAD_LIBS"
15063             have_pthreads=yes
15064         esac
15065     esac
15066 esac
15067
15068 case "$have_pthreads" in
15069  yes)
15070     CFLAGS_NTP="$CFLAGS_NTP $PTHREAD_CFLAGS"
15071     saved_LIBS="$LIBS"
15072     LIBS="$LTHREAD_LIBS $LIBS"
15073     saved_CFLAGS="$CFLAGS"
15074     CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
15075     # The cast to long int works around a bug in the HP C Compiler
15076 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15077 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15078 # This bug is HP SR number 8606223364.
15079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
15080 $as_echo_n "checking size of pthread_t... " >&6; }
15081 if ${ac_cv_sizeof_pthread_t+:} false; then :
15082   $as_echo_n "(cached) " >&6
15083 else
15084   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "
15085             $ac_includes_default
15086             #include <pthread.h>
15087
15088
15089 "; then :
15090
15091 else
15092   if test "$ac_cv_type_pthread_t" = yes; then
15093      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15094 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15095 as_fn_error 77 "cannot compute sizeof (pthread_t)
15096 See \`config.log' for more details" "$LINENO" 5; }
15097    else
15098      ac_cv_sizeof_pthread_t=0
15099    fi
15100 fi
15101
15102 fi
15103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
15104 $as_echo "$ac_cv_sizeof_pthread_t" >&6; }
15105
15106
15107
15108 cat >>confdefs.h <<_ACEOF
15109 #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
15110 _ACEOF
15111
15112
15113     LIBISC_PTHREADS_NOTHREADS=pthreads
15114
15115 $as_echo "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
15116
15117     #
15118     # We'd like to use sigwait() too
15119     #
15120     ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
15121 if test "x$ac_cv_func_sigwait" = xyes; then :
15122   have_sigwait=yes
15123 else
15124   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
15125 $as_echo_n "checking for sigwait in -lc... " >&6; }
15126 if ${ac_cv_lib_c_sigwait+:} false; then :
15127   $as_echo_n "(cached) " >&6
15128 else
15129   ac_check_lib_save_LIBS=$LIBS
15130 LIBS="-lc  $LIBS"
15131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15132 /* end confdefs.h.  */
15133
15134 /* Override any GCC internal prototype to avoid an error.
15135    Use char because int might match the return type of a GCC
15136    builtin and then its argument prototype would still apply.  */
15137 #ifdef __cplusplus
15138 extern "C"
15139 #endif
15140 char sigwait ();
15141 int
15142 main ()
15143 {
15144 return sigwait ();
15145   ;
15146   return 0;
15147 }
15148 _ACEOF
15149 if ac_fn_c_try_link "$LINENO"; then :
15150   ac_cv_lib_c_sigwait=yes
15151 else
15152   ac_cv_lib_c_sigwait=no
15153 fi
15154 rm -f core conftest.err conftest.$ac_objext \
15155     conftest$ac_exeext conftest.$ac_ext
15156 LIBS=$ac_check_lib_save_LIBS
15157 fi
15158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
15159 $as_echo "$ac_cv_lib_c_sigwait" >&6; }
15160 if test "x$ac_cv_lib_c_sigwait" = xyes; then :
15161   have_sigwait=yes
15162 else
15163   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
15164 $as_echo_n "checking for sigwait in -lpthread... " >&6; }
15165 if ${ac_cv_lib_pthread_sigwait+:} false; then :
15166   $as_echo_n "(cached) " >&6
15167 else
15168   ac_check_lib_save_LIBS=$LIBS
15169 LIBS="-lpthread  $LIBS"
15170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15171 /* end confdefs.h.  */
15172
15173 /* Override any GCC internal prototype to avoid an error.
15174    Use char because int might match the return type of a GCC
15175    builtin and then its argument prototype would still apply.  */
15176 #ifdef __cplusplus
15177 extern "C"
15178 #endif
15179 char sigwait ();
15180 int
15181 main ()
15182 {
15183 return sigwait ();
15184   ;
15185   return 0;
15186 }
15187 _ACEOF
15188 if ac_fn_c_try_link "$LINENO"; then :
15189   ac_cv_lib_pthread_sigwait=yes
15190 else
15191   ac_cv_lib_pthread_sigwait=no
15192 fi
15193 rm -f core conftest.err conftest.$ac_objext \
15194     conftest$ac_exeext conftest.$ac_ext
15195 LIBS=$ac_check_lib_save_LIBS
15196 fi
15197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
15198 $as_echo "$ac_cv_lib_pthread_sigwait" >&6; }
15199 if test "x$ac_cv_lib_pthread_sigwait" = xyes; then :
15200   have_sigwait=yes
15201 else
15202   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
15203 $as_echo_n "checking for _Psigwait in -lpthread... " >&6; }
15204 if ${ac_cv_lib_pthread__Psigwait+:} false; then :
15205   $as_echo_n "(cached) " >&6
15206 else
15207   ac_check_lib_save_LIBS=$LIBS
15208 LIBS="-lpthread  $LIBS"
15209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15210 /* end confdefs.h.  */
15211
15212 /* Override any GCC internal prototype to avoid an error.
15213    Use char because int might match the return type of a GCC
15214    builtin and then its argument prototype would still apply.  */
15215 #ifdef __cplusplus
15216 extern "C"
15217 #endif
15218 char _Psigwait ();
15219 int
15220 main ()
15221 {
15222 return _Psigwait ();
15223   ;
15224   return 0;
15225 }
15226 _ACEOF
15227 if ac_fn_c_try_link "$LINENO"; then :
15228   ac_cv_lib_pthread__Psigwait=yes
15229 else
15230   ac_cv_lib_pthread__Psigwait=no
15231 fi
15232 rm -f core conftest.err conftest.$ac_objext \
15233     conftest$ac_exeext conftest.$ac_ext
15234 LIBS=$ac_check_lib_save_LIBS
15235 fi
15236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
15237 $as_echo "$ac_cv_lib_pthread__Psigwait" >&6; }
15238 if test "x$ac_cv_lib_pthread__Psigwait" = xyes; then :
15239   have_sigwait=yes
15240 else
15241   have_sigwait=no
15242
15243 fi
15244
15245
15246 fi
15247
15248
15249 fi
15250
15251
15252 fi
15253
15254     case "$host:$have_sigwait" in
15255      *-freebsd*:no)
15256         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
15257 $as_echo_n "checking for sigwait in -lc_r... " >&6; }
15258 if ${ac_cv_lib_c_r_sigwait+:} false; then :
15259   $as_echo_n "(cached) " >&6
15260 else
15261   ac_check_lib_save_LIBS=$LIBS
15262 LIBS="-lc_r  $LIBS"
15263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15264 /* end confdefs.h.  */
15265
15266 /* Override any GCC internal prototype to avoid an error.
15267    Use char because int might match the return type of a GCC
15268    builtin and then its argument prototype would still apply.  */
15269 #ifdef __cplusplus
15270 extern "C"
15271 #endif
15272 char sigwait ();
15273 int
15274 main ()
15275 {
15276 return sigwait ();
15277   ;
15278   return 0;
15279 }
15280 _ACEOF
15281 if ac_fn_c_try_link "$LINENO"; then :
15282   ac_cv_lib_c_r_sigwait=yes
15283 else
15284   ac_cv_lib_c_r_sigwait=no
15285 fi
15286 rm -f core conftest.err conftest.$ac_objext \
15287     conftest$ac_exeext conftest.$ac_ext
15288 LIBS=$ac_check_lib_save_LIBS
15289 fi
15290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
15291 $as_echo "$ac_cv_lib_c_r_sigwait" >&6; }
15292 if test "x$ac_cv_lib_c_r_sigwait" = xyes; then :
15293   have_sigwait=yes
15294
15295 fi
15296
15297     esac
15298     case "$have_sigwait" in
15299      yes)
15300         ac_cv_func_sigwait=yes
15301
15302 $as_echo "#define HAVE_SIGWAIT 1" >>confdefs.h
15303
15304     esac
15305
15306     for ac_func in pthread_attr_getstacksize
15307 do :
15308   ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
15309 if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes; then :
15310   cat >>confdefs.h <<_ACEOF
15311 #define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
15312 _ACEOF
15313
15314 fi
15315 done
15316
15317     for ac_func in pthread_attr_setstacksize sysconf
15318 do :
15319   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15320 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15321 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15322   cat >>confdefs.h <<_ACEOF
15323 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15324 _ACEOF
15325
15326 fi
15327 done
15328
15329
15330     case "$host" in
15331      *-freebsd5.[012]|*-freebsd5.[012].*)
15332         ;;
15333      *-freebsd5.[3456789]|*-freebsd5.[3456789].*|*-freebsd6.*)
15334
15335 $as_echo "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
15336
15337         ;;
15338      *-bsdi3.*|*-bsdi4.0*)
15339
15340 $as_echo "#define NEED_PTHREAD_INIT 1" >>confdefs.h
15341
15342         ;;
15343      *-linux*)
15344
15345 $as_echo "#define HAVE_LINUXTHREADS 1" >>confdefs.h
15346
15347         ;;
15348      *-solaris*)
15349         $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
15350
15351         for ac_func in pthread_setconcurrency
15352 do :
15353   ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
15354 if test "x$ac_cv_func_pthread_setconcurrency" = xyes; then :
15355   cat >>confdefs.h <<_ACEOF
15356 #define HAVE_PTHREAD_SETCONCURRENCY 1
15357 _ACEOF
15358
15359 fi
15360 done
15361
15362         case "$ac_cv_func_pthread_setconcurrency" in
15363          yes)
15364
15365 $as_echo "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
15366
15367         esac
15368         ;;
15369      *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
15370
15371 $as_echo "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
15372
15373         ;;
15374     esac
15375     hack_shutup_pthreadonceinit=no
15376     case "$host" in
15377      *-aix5.[123].*)
15378         hack_shutup_pthreadonceinit=yes
15379         ;;
15380      *-solaris2.[89])
15381         hack_shutup_pthreadonceinit=yes
15382         ;;
15383      *-solaris2.1[0-9])
15384         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
15385 $as_echo_n "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
15386 if ${ntp_cv_braces_around_pthread_once_init+:} false; then :
15387   $as_echo_n "(cached) " >&6
15388 else
15389   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15390 /* end confdefs.h.  */
15391
15392                         #include <pthread.h>
15393
15394 int
15395 main ()
15396 {
15397
15398                         static pthread_once_t once_test =
15399                                                 PTHREAD_ONCE_INIT;
15400
15401
15402   ;
15403   return 0;
15404 }
15405 _ACEOF
15406 if ac_fn_c_try_compile "$LINENO"; then :
15407   ntp_cv_braces_around_pthread_once_init=no
15408 else
15409   ntp_cv_braces_around_pthread_once_init=yes
15410
15411 fi
15412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15413
15414 fi
15415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
15416 $as_echo "$ntp_cv_braces_around_pthread_once_init" >&6; }
15417         case "$ntp_cv_braces_around_pthread_once_init" in
15418          yes)
15419             hack_shutup_pthreadonceinit=yes
15420         esac
15421         ;;
15422     esac
15423     case "$hack_shutup_pthreadonceinit" in
15424      yes)
15425
15426 $as_echo "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
15427
15428     esac
15429     LIBS="$saved_LIBS"
15430     { saved_LIBS=; unset saved_LIBS;}
15431     CFLAGS="$saved_CFLAGS"
15432     { saved_CFLAGS=; unset saved_CFLAGS;}
15433     ;;
15434  *)
15435     LIBISC_PTHREADS_NOTHREADS=nothreads
15436     ;;
15437 esac
15438
15439  if test "$have_pthreads" != "no"; then
15440   PTHREADS_TRUE=
15441   PTHREADS_FALSE='#'
15442 else
15443   PTHREADS_TRUE='#'
15444   PTHREADS_FALSE=
15445 fi
15446
15447
15448
15449
15450
15451
15452
15453 case "$hw_use_rpl_vsnprintf:$hw_cv_func_vsnprintf" in
15454  no:yes)
15455     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
15456 $as_echo_n "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
15457 if ${ntp_cv_vsnprintf_percent_m+:} false; then :
15458   $as_echo_n "(cached) " >&6
15459 else
15460   if test "$cross_compiling" = yes; then :
15461   ntp_cv_vsnprintf_percent_m=no
15462
15463 else
15464   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15465 /* end confdefs.h.  */
15466
15467                     #include <stdarg.h>
15468                     #include <errno.h>
15469                     #include <stdio.h>
15470                     #include <string.h>
15471
15472                     int call_vsnprintf(
15473                             char *      dst,
15474                             size_t      sz,
15475                             const char *fmt,
15476                             ...
15477                             );
15478
15479                     int call_vsnprintf(
15480                             char *      dst,
15481                             size_t      sz,
15482                             const char *fmt,
15483                             ...
15484                             )
15485                     {
15486                             va_list     ap;
15487                             int         rc;
15488
15489                             va_start(ap, fmt);
15490                             rc = vsnprintf(dst, sz, fmt, ap);
15491                             va_end(ap);
15492
15493                             return rc;
15494                     }
15495
15496 int
15497 main ()
15498 {
15499
15500                     char        sbuf[512];
15501                     char        pbuf[512];
15502                     int         slen;
15503
15504                     strcpy(sbuf, strerror(ENOENT));
15505                     errno = ENOENT;
15506                     slen = call_vsnprintf(pbuf, sizeof(pbuf), "%m",
15507                                           "wrong");
15508                     return strcmp(sbuf, pbuf);
15509
15510
15511   ;
15512   return 0;
15513 }
15514 _ACEOF
15515 if ac_fn_c_try_run "$LINENO"; then :
15516   ntp_cv_vsnprintf_percent_m=yes
15517 else
15518   ntp_cv_vsnprintf_percent_m=no
15519 fi
15520 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15521   conftest.$ac_objext conftest.beam conftest.$ac_ext
15522 fi
15523
15524
15525 fi
15526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
15527 $as_echo "$ntp_cv_vsnprintf_percent_m" >&6; }
15528     case "$ntp_cv_vsnprintf_percent_m" in
15529      yes)
15530
15531 $as_echo "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
15532
15533     esac
15534 esac
15535
15536 for ac_header in sys/clockctl.h
15537 do :
15538   ac_fn_c_check_header_mongrel "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
15539 if test "x$ac_cv_header_sys_clockctl_h" = xyes; then :
15540   cat >>confdefs.h <<_ACEOF
15541 #define HAVE_SYS_CLOCKCTL_H 1
15542 _ACEOF
15543
15544 fi
15545
15546 done
15547
15548
15549 # Check whether --enable-clockctl was given.
15550 if test "${enable_clockctl+set}" = set; then :
15551   enableval=$enable_clockctl; ntp_use_dev_clockctl=$enableval
15552 else
15553   ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h
15554
15555 fi
15556
15557
15558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
15559 $as_echo_n "checking if we should use /dev/clockctl... " >&6; }
15560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
15561 $as_echo "$ntp_use_dev_clockctl" >&6; }
15562
15563
15564 for ac_header in sys/capability.h sys/prctl.h
15565 do :
15566   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15567 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15568 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15569   cat >>confdefs.h <<_ACEOF
15570 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15571 _ACEOF
15572
15573 fi
15574
15575 done
15576
15577
15578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
15579 $as_echo_n "checking if we have linux capabilities (libcap)... " >&6; }
15580
15581 case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
15582  yesyes)
15583     case "$host" in
15584      mips-sgi-irix*)
15585         ntp_have_linuxcaps=no
15586         ;;
15587      *) ntp_have_linuxcaps=yes
15588         ;;
15589     esac
15590     ;;
15591  *)
15592     ntp_have_linuxcaps=no
15593     ;;
15594 esac
15595
15596 # Check whether --enable-linuxcaps was given.
15597 if test "${enable_linuxcaps+set}" = set; then :
15598   enableval=$enable_linuxcaps; ntp_have_linuxcaps=$enableval
15599
15600 fi
15601
15602
15603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
15604 $as_echo "$ntp_have_linuxcaps" >&6; }
15605
15606 case "$ntp_have_linuxcaps" in
15607  yes)
15608
15609 $as_echo "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
15610
15611     LIBS="$LIBS -lcap"
15612     ;;
15613 esac
15614
15615
15616 for ac_header in priv.h
15617 do :
15618   ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
15619 if test "x$ac_cv_header_priv_h" = xyes; then :
15620   cat >>confdefs.h <<_ACEOF
15621 #define HAVE_PRIV_H 1
15622 _ACEOF
15623
15624 fi
15625
15626 done
15627
15628
15629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
15630 $as_echo_n "checking if we have solaris privileges... " >&6; }
15631
15632 case "$ac_cv_header_priv_h" in
15633  yes)
15634     case "$host" in
15635      *-solaris*)
15636         ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
15637 if test "x$ac_cv_func_setppriv" = xyes; then :
15638   ntp_have_solarisprivs=yes
15639 else
15640   ntp_have_solarisprivs=no
15641
15642 fi
15643
15644         ;;
15645     esac
15646 esac
15647
15648 # Check whether --enable-solarisprivs was given.
15649 if test "${enable_solarisprivs+set}" = set; then :
15650   enableval=$enable_solarisprivs; ntp_have_solarisprivs=$enableval
15651
15652 fi
15653
15654
15655
15656 case "$ntp_have_solarisprivs" in
15657  yes)
15658
15659 $as_echo "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
15660
15661 esac
15662
15663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
15664 $as_echo "$ntp_have_solarisprivs" >&6; }
15665
15666 case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs" in
15667  *yes*)
15668
15669 $as_echo "#define HAVE_DROPROOT 1" >>confdefs.h
15670
15671 esac
15672
15673 case "$host" in
15674  *-*-darwin*)
15675     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
15676 $as_echo_n "checking for library containing res_9_init... " >&6; }
15677 if ${ac_cv_search_res_9_init+:} false; then :
15678   $as_echo_n "(cached) " >&6
15679 else
15680   ac_func_search_save_LIBS=$LIBS
15681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15682 /* end confdefs.h.  */
15683
15684 /* Override any GCC internal prototype to avoid an error.
15685    Use char because int might match the return type of a GCC
15686    builtin and then its argument prototype would still apply.  */
15687 #ifdef __cplusplus
15688 extern "C"
15689 #endif
15690 char res_9_init ();
15691 int
15692 main ()
15693 {
15694 return res_9_init ();
15695   ;
15696   return 0;
15697 }
15698 _ACEOF
15699 for ac_lib in '' resolv; do
15700   if test -z "$ac_lib"; then
15701     ac_res="none required"
15702   else
15703     ac_res=-l$ac_lib
15704     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15705   fi
15706   if ac_fn_c_try_link "$LINENO"; then :
15707   ac_cv_search_res_9_init=$ac_res
15708 fi
15709 rm -f core conftest.err conftest.$ac_objext \
15710     conftest$ac_exeext
15711   if ${ac_cv_search_res_9_init+:} false; then :
15712   break
15713 fi
15714 done
15715 if ${ac_cv_search_res_9_init+:} false; then :
15716
15717 else
15718   ac_cv_search_res_9_init=no
15719 fi
15720 rm conftest.$ac_ext
15721 LIBS=$ac_func_search_save_LIBS
15722 fi
15723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
15724 $as_echo "$ac_cv_search_res_9_init" >&6; }
15725 ac_res=$ac_cv_search_res_9_init
15726 if test "$ac_res" != no; then :
15727   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15728
15729 fi
15730
15731     ;;
15732  *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
15733 $as_echo_n "checking for library containing res_init... " >&6; }
15734 if ${ac_cv_search_res_init+:} false; then :
15735   $as_echo_n "(cached) " >&6
15736 else
15737   ac_func_search_save_LIBS=$LIBS
15738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15739 /* end confdefs.h.  */
15740
15741 /* Override any GCC internal prototype to avoid an error.
15742    Use char because int might match the return type of a GCC
15743    builtin and then its argument prototype would still apply.  */
15744 #ifdef __cplusplus
15745 extern "C"
15746 #endif
15747 char res_init ();
15748 int
15749 main ()
15750 {
15751 return res_init ();
15752   ;
15753   return 0;
15754 }
15755 _ACEOF
15756 for ac_lib in '' resolv; do
15757   if test -z "$ac_lib"; then
15758     ac_res="none required"
15759   else
15760     ac_res=-l$ac_lib
15761     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15762   fi
15763   if ac_fn_c_try_link "$LINENO"; then :
15764   ac_cv_search_res_init=$ac_res
15765 fi
15766 rm -f core conftest.err conftest.$ac_objext \
15767     conftest$ac_exeext
15768   if ${ac_cv_search_res_init+:} false; then :
15769   break
15770 fi
15771 done
15772 if ${ac_cv_search_res_init+:} false; then :
15773
15774 else
15775   ac_cv_search_res_init=no
15776 fi
15777 rm conftest.$ac_ext
15778 LIBS=$ac_func_search_save_LIBS
15779 fi
15780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
15781 $as_echo "$ac_cv_search_res_init" >&6; }
15782 ac_res=$ac_cv_search_res_init
15783 if test "$ac_res" != no; then :
15784   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15785
15786 fi
15787
15788     ;;
15789 esac
15790 for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
15791 do :
15792   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15793 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
15794 #  include <sys/types.h>
15795 #endif
15796 #ifdef HAVE_NETINET_IN_H
15797 #  include <netinet/in.h>   /* inet_ functions / structs */
15798 #endif
15799 #ifdef HAVE_ARPA_NAMESER_H
15800 #  include <arpa/nameser.h> /* DNS HEADER struct */
15801 #endif
15802 #ifdef HAVE_NETDB_H
15803 #  include <netdb.h>
15804 #endif
15805 "
15806 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15807   cat >>confdefs.h <<_ACEOF
15808 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15809 _ACEOF
15810
15811 fi
15812
15813 done
15814
15815
15816 #HMS: Why do we do this check so "early"?
15817 for ac_func in res_init
15818 do :
15819   ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
15820 if test "x$ac_cv_func_res_init" = xyes; then :
15821   cat >>confdefs.h <<_ACEOF
15822 #define HAVE_RES_INIT 1
15823 _ACEOF
15824
15825 else
15826   for ac_func in __res_init
15827 do :
15828   ac_fn_c_check_func "$LINENO" "__res_init" "ac_cv_func___res_init"
15829 if test "x$ac_cv_func___res_init" = xyes; then :
15830   cat >>confdefs.h <<_ACEOF
15831 #define HAVE___RES_INIT 1
15832 _ACEOF
15833
15834 fi
15835 done
15836
15837 fi
15838 done
15839
15840
15841 # We also need -lsocket, but we have tested for that already.
15842 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
15843 if test "x$ac_cv_func_inet_ntop" = xyes; then :
15844
15845 else
15846
15847 $as_echo "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
15848
15849 fi
15850
15851 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
15852 if test "x$ac_cv_func_inet_pton" = xyes; then :
15853
15854 else
15855
15856 $as_echo "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
15857
15858 fi
15859
15860
15861 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
15862 if test "x$ac_cv_type_uintptr_t" = xyes; then :
15863
15864 cat >>confdefs.h <<_ACEOF
15865 #define HAVE_UINTPTR_T 1
15866 _ACEOF
15867
15868
15869 fi
15870 ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" "$ac_includes_default"
15871 if test "x$ac_cv_type_int32" = xyes; then :
15872
15873 cat >>confdefs.h <<_ACEOF
15874 #define HAVE_INT32 1
15875 _ACEOF
15876
15877
15878 fi
15879 ac_fn_c_check_type "$LINENO" "u_int32" "ac_cv_type_u_int32" "$ac_includes_default"
15880 if test "x$ac_cv_type_u_int32" = xyes; then :
15881
15882 cat >>confdefs.h <<_ACEOF
15883 #define HAVE_U_INT32 1
15884 _ACEOF
15885
15886
15887 fi
15888
15889
15890
15891
15892 case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
15893  no::yes)
15894     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
15895 $as_echo_n "checking for int32 with DNS headers included... " >&6; }
15896 if ${ntp_cv_type_int32_with_dns+:} false; then :
15897   $as_echo_n "(cached) " >&6
15898 else
15899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15900 /* end confdefs.h.  */
15901
15902                     #ifdef HAVE_ARPA_NAMESER_H
15903                     # include <arpa/nameser.h>
15904                     #endif
15905                     #include <resolv.h>
15906
15907 int
15908 main ()
15909 {
15910
15911                     size_t cb = sizeof(int32);
15912
15913
15914   ;
15915   return 0;
15916 }
15917 _ACEOF
15918 if ac_fn_c_try_compile "$LINENO"; then :
15919   ntp_cv_type_int32_with_dns=yes
15920 else
15921   ntp_cv_type_int32_with_dns=no
15922
15923 fi
15924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15925
15926 fi
15927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
15928 $as_echo "$ntp_cv_type_int32_with_dns" >&6; }
15929     case "$ntp_cv_type_int32_with_dns" in
15930      yes)
15931
15932 $as_echo "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
15933
15934     esac
15935 esac
15936
15937 case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
15938  no::yes)
15939     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
15940 $as_echo_n "checking for u_int32 with DNS headers included... " >&6; }
15941 if ${ntp_cv_type_u_int32_with_dns+:} false; then :
15942   $as_echo_n "(cached) " >&6
15943 else
15944   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15945 /* end confdefs.h.  */
15946
15947                     #ifdef HAVE_ARPA_NAMESER_H
15948                     # include <arpa/nameser.h>
15949                     #endif
15950                     #include <resolv.h>
15951
15952 int
15953 main ()
15954 {
15955
15956                     size_t cb = sizeof(u_int32);
15957
15958
15959   ;
15960   return 0;
15961 }
15962 _ACEOF
15963 if ac_fn_c_try_compile "$LINENO"; then :
15964   ntp_cv_type_u_int32_with_dns=yes
15965 else
15966   ntp_cv_type_u_int32_with_dns=no
15967
15968 fi
15969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15970
15971 fi
15972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
15973 $as_echo "$ntp_cv_type_u_int32_with_dns" >&6; }
15974     case "$ntp_cv_type_u_int32_with_dns" in
15975      yes)
15976
15977 $as_echo "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
15978
15979     esac
15980 esac
15981
15982 for ac_header in sys/timepps.h
15983 do :
15984   ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
15985         #ifdef HAVE_SYS_TIME_H
15986         # include <sys/time.h>
15987         #endif
15988         #ifdef HAVE_ERRNO_H
15989         # include <errno.h>
15990         #endif
15991
15992
15993 "
15994 if test "x$ac_cv_header_sys_timepps_h" = xyes; then :
15995   cat >>confdefs.h <<_ACEOF
15996 #define HAVE_SYS_TIMEPPS_H 1
15997 _ACEOF
15998
15999 fi
16000
16001 done
16002
16003
16004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
16005 $as_echo_n "checking for struct timespec... " >&6; }
16006 if ${ntp_cv_struct_timespec+:} false; then :
16007   $as_echo_n "(cached) " >&6
16008 else
16009   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16010 /* end confdefs.h.  */
16011
16012                 #include <sys/time.h>
16013                 /* Under SunOS, timespec is in sys/timepps.h,
16014                    which needs errno.h and FRAC */
16015                 #ifdef HAVE_ERRNO_H
16016                 # include <errno.h>
16017                 #endif
16018                 #ifdef HAVE_SYS_TIMEPPS_H
16019                 # define FRAC 4294967296
16020                 # include <sys/timepps.h>
16021                 #endif
16022
16023 int
16024 main ()
16025 {
16026
16027                 struct timespec n;
16028
16029
16030   ;
16031   return 0;
16032 }
16033 _ACEOF
16034 if ac_fn_c_try_compile "$LINENO"; then :
16035   ntp_cv_struct_timespec=yes
16036 else
16037   ntp_cv_struct_timespec=no
16038
16039 fi
16040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16041
16042 fi
16043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_timespec" >&5
16044 $as_echo "$ntp_cv_struct_timespec" >&6; }
16045 case "$ntp_cv_struct_timespec" in
16046  yes)
16047
16048 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
16049
16050 esac
16051
16052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ntptimeval" >&5
16053 $as_echo_n "checking for struct ntptimeval... " >&6; }
16054 if ${ntp_cv_struct_ntptimeval+:} false; then :
16055   $as_echo_n "(cached) " >&6
16056 else
16057   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16058 /* end confdefs.h.  */
16059
16060                 #include <sys/time.h>
16061                 #include <sys/timex.h>
16062
16063 int
16064 main ()
16065 {
16066
16067                 struct ntptimeval n;
16068
16069
16070   ;
16071   return 0;
16072 }
16073 _ACEOF
16074 if ac_fn_c_try_compile "$LINENO"; then :
16075   ntp_cv_struct_ntptimeval=yes
16076 else
16077   ntp_cv_struct_ntptimeval=no
16078
16079 fi
16080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16081
16082 fi
16083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ntptimeval" >&5
16084 $as_echo "$ntp_cv_struct_ntptimeval" >&6; }
16085 case "$ntp_cv_struct_ntptimeval" in
16086  yes)
16087
16088 $as_echo "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
16089
16090 esac
16091
16092 for ac_header in md5.h
16093 do :
16094   ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
16095         #ifdef HAVE_SYS_TYPES_H
16096         # include <sys/types.h>
16097         #endif
16098
16099
16100 "
16101 if test "x$ac_cv_header_md5_h" = xyes; then :
16102   cat >>confdefs.h <<_ACEOF
16103 #define HAVE_MD5_H 1
16104 _ACEOF
16105
16106 fi
16107
16108 done
16109
16110
16111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
16112 $as_echo_n "checking for library containing MD5Init... " >&6; }
16113 if ${ac_cv_search_MD5Init+:} false; then :
16114   $as_echo_n "(cached) " >&6
16115 else
16116   ac_func_search_save_LIBS=$LIBS
16117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16118 /* end confdefs.h.  */
16119
16120 /* Override any GCC internal prototype to avoid an error.
16121    Use char because int might match the return type of a GCC
16122    builtin and then its argument prototype would still apply.  */
16123 #ifdef __cplusplus
16124 extern "C"
16125 #endif
16126 char MD5Init ();
16127 int
16128 main ()
16129 {
16130 return MD5Init ();
16131   ;
16132   return 0;
16133 }
16134 _ACEOF
16135 for ac_lib in '' md5 md; do
16136   if test -z "$ac_lib"; then
16137     ac_res="none required"
16138   else
16139     ac_res=-l$ac_lib
16140     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16141   fi
16142   if ac_fn_c_try_link "$LINENO"; then :
16143   ac_cv_search_MD5Init=$ac_res
16144 fi
16145 rm -f core conftest.err conftest.$ac_objext \
16146     conftest$ac_exeext
16147   if ${ac_cv_search_MD5Init+:} false; then :
16148   break
16149 fi
16150 done
16151 if ${ac_cv_search_MD5Init+:} false; then :
16152
16153 else
16154   ac_cv_search_MD5Init=no
16155 fi
16156 rm conftest.$ac_ext
16157 LIBS=$ac_func_search_save_LIBS
16158 fi
16159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
16160 $as_echo "$ac_cv_search_MD5Init" >&6; }
16161 ac_res=$ac_cv_search_MD5Init
16162 if test "$ac_res" != no; then :
16163   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16164
16165 fi
16166
16167 for ac_func in MD5Init sysconf getdtablesize sigaction sigset sigvec
16168 do :
16169   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16170 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16171 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16172   cat >>confdefs.h <<_ACEOF
16173 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16174 _ACEOF
16175
16176 fi
16177 done
16178
16179
16180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
16181 $as_echo_n "checking for SIGIO... " >&6; }
16182 if ${ntp_cv_hdr_def_sigio+:} false; then :
16183   $as_echo_n "(cached) " >&6
16184 else
16185   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16186 /* end confdefs.h.  */
16187
16188             #include <signal.h>
16189
16190             #ifndef SIGIO
16191             # error
16192             #endif
16193
16194 _ACEOF
16195 if ac_fn_c_try_cpp "$LINENO"; then :
16196   ntp_cv_hdr_def_sigio=yes
16197 else
16198   ntp_cv_hdr_def_sigio=no
16199
16200 fi
16201 rm -f conftest.err conftest.i conftest.$ac_ext
16202
16203 fi
16204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
16205 $as_echo "$ntp_cv_hdr_def_sigio" >&6; }
16206
16207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
16208 $as_echo_n "checking if we want to use SIGIO... " >&6; }
16209 ans=no
16210 case "$ntp_cv_hdr_def_sigio" in
16211  yes)
16212     ans=yes
16213     case "$host" in
16214      alpha*-dec-osf4*|alpha*-dec-osf5*)
16215         ans=no
16216         ;;
16217      *-convex-*)
16218         ans=no
16219         ;;
16220      *-dec-*)
16221         ans=no
16222         ;;
16223      *-pc-cygwin*)
16224         ans=no
16225         ;;
16226      *-sni-sysv*)
16227         ans=no
16228         ;;
16229      *-stratus-vos)
16230         ans=no
16231         ;;
16232      *-univel-sysv*)
16233         ans=no
16234         ;;
16235      *-*-irix6*)
16236         ans=no
16237         ;;
16238      *-*-freebsd*)
16239         ans=no
16240         ;;
16241      *-*-*linux*)
16242         ans=no
16243         ;;
16244      *-*-unicosmp*)
16245         ans=no
16246         ;;
16247      *-*-kfreebsd*)
16248         ans=no
16249         ;;
16250      m68k-*-mint*)
16251         ans=no
16252         ;;
16253     esac
16254     ;;
16255 esac
16256 case "$ans" in
16257  yes)
16258
16259 $as_echo "#define HAVE_SIGNALED_IO 1" >>confdefs.h
16260
16261 esac
16262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16263 $as_echo "$ans" >&6; }
16264
16265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
16266 $as_echo_n "checking for SIGPOLL... " >&6; }
16267 if ${ntp_cv_hdr_def_sigpoll+:} false; then :
16268   $as_echo_n "(cached) " >&6
16269 else
16270   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16271 /* end confdefs.h.  */
16272
16273             #include <signal.h>
16274
16275             #ifndef SIGPOLL
16276             # error
16277             #endif
16278
16279 _ACEOF
16280 if ac_fn_c_try_cpp "$LINENO"; then :
16281   ntp_cv_hdr_def_sigpoll=yes
16282 else
16283   ntp_cv_hdr_def_sigpoll=no
16284
16285 fi
16286 rm -f conftest.err conftest.i conftest.$ac_ext
16287
16288 fi
16289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
16290 $as_echo "$ntp_cv_hdr_def_sigpoll" >&6; }
16291
16292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
16293 $as_echo_n "checking if we can use SIGPOLL for UDP I/O... " >&6; }
16294 ans=no
16295 case "$ntp_cv_hdr_def_sigpoll" in
16296  yes)
16297     case "$host" in
16298      mips-sgi-irix*)
16299         ans=no
16300         ;;
16301      vax-dec-bsd)
16302         ans=no
16303         ;;
16304      *-pc-cygwin*)
16305         ans=no
16306         ;;
16307      *-sni-sysv*)
16308         ans=no
16309         ;;
16310      *-stratus-vos)
16311         ans=no
16312         ;;
16313      *-*-aix[4-9]*)
16314         # XXX Only verified thru AIX6
16315         ans=no
16316         ;;
16317      *-*-hpux*)
16318         ans=no
16319         ;;
16320      *-*-*linux*)
16321         ans=no
16322         ;;
16323      *-*-osf*)
16324         ans=no
16325         ;;
16326      *-*-qnx*)
16327         ans=no
16328         ;;
16329      *-*-sunos*)
16330         ans=no
16331         ;;
16332      *-*-solaris*)
16333         ans=no
16334         ;;
16335      *-*-ultrix*)
16336         ans=no
16337         ;;
16338      *-*-unicosmp*)
16339         ans=no
16340         ;;
16341      *-*-kfreebsd*)
16342         ans=no
16343         ;;
16344      *) ans=yes
16345         ;;
16346     esac
16347     ;;
16348 esac
16349 case "$ans" in
16350  yes)
16351
16352 $as_echo "#define USE_UDP_SIGPOLL 1" >>confdefs.h
16353
16354 esac
16355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16356 $as_echo "$ans" >&6; }
16357
16358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
16359 $as_echo_n "checking if we can use SIGPOLL for TTY I/O... " >&6; }
16360 ans=no
16361 case "$ntp_cv_hdr_def_sigpoll" in
16362  yes)
16363     case "$host" in
16364      mips-sgi-irix*)
16365         ans=no
16366         ;;
16367      vax-dec-bsd)
16368         ans=no
16369         ;;
16370      *-pc-cygwin*)
16371         ans=no
16372         ;;
16373      *-sni-sysv*)
16374         ans=no
16375         ;;
16376      *-stratus-vos)
16377         ans=no
16378         ;;
16379      *-*-aix[4-9]*)
16380         # XXX Only verified thru AIX6
16381         ans=no
16382         ;;
16383      *-*-hpux*)
16384         ans=no
16385         ;;
16386      *-*-*linux*)
16387         ans=no
16388         ;;
16389      *-*-osf*)
16390         ans=no
16391         ;;
16392      *-*-sunos*)
16393         ans=no
16394         ;;
16395      *-*-ultrix*)
16396         ans=no
16397         ;;
16398      *-*-qnx*)
16399         ans=no
16400         ;;
16401      *-*-unicosmp*)
16402         ans=no
16403         ;;
16404      *-*-kfreebsd*)
16405         ans=no
16406         ;;
16407      *) ans=yes
16408         ;;
16409     esac
16410     ;;
16411 esac
16412 case "$ans" in
16413  yes)
16414
16415 $as_echo "#define USE_TTY_SIGPOLL 1" >>confdefs.h
16416
16417 esac
16418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16419 $as_echo "$ans" >&6; }
16420
16421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
16422 $as_echo_n "checking number of arguments to gettimeofday()... " >&6; }
16423 if ${ntp_cv_func_Xettimeofday_nargs+:} false; then :
16424   $as_echo_n "(cached) " >&6
16425 else
16426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16427 /* end confdefs.h.  */
16428
16429                 #include <sys/time.h>
16430
16431 int
16432 main ()
16433 {
16434
16435                 gettimeofday(0, 0);
16436                 settimeofday(0, 0);
16437
16438
16439   ;
16440   return 0;
16441 }
16442 _ACEOF
16443 if ac_fn_c_try_compile "$LINENO"; then :
16444   ntp_cv_func_Xettimeofday_nargs=2
16445 else
16446   ntp_cv_func_Xettimeofday_nargs=1
16447
16448 fi
16449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16450
16451 fi
16452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
16453 $as_echo "$ntp_cv_func_Xettimeofday_nargs" >&6; }
16454 case "$ntp_cv_func_Xettimeofday_nargs" in
16455  1)
16456
16457 $as_echo "#define SYSV_TIMEOFDAY 1" >>confdefs.h
16458
16459 esac
16460
16461 for ac_func in settimeofday
16462 do :
16463   ac_fn_c_check_func "$LINENO" "settimeofday" "ac_cv_func_settimeofday"
16464 if test "x$ac_cv_func_settimeofday" = xyes; then :
16465   cat >>confdefs.h <<_ACEOF
16466 #define HAVE_SETTIMEOFDAY 1
16467 _ACEOF
16468
16469 else
16470
16471     case "$host" in
16472      *-*-mpeix*) ac_cv_func_settimeofday=yes
16473     esac
16474
16475 fi
16476 done
16477
16478
16479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
16480 $as_echo_n "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
16481 ntp_warning='GRONK'
16482 ans=none
16483 case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
16484  yes*)
16485     ntp_warning=''
16486     ans='clock_settime()'
16487     ;;
16488  noyes*)
16489     ntp_warning='But clock_settime() would be better (if we had it)'
16490     ans='settimeofday()'
16491     ;;
16492  nonoyes)
16493     ntp_warning='Which is the worst of the three'
16494     ans='stime()'
16495     ;;
16496  *)
16497     case "$build" in
16498      $host)
16499         ntp_warning='Which leaves us with nothing to use!'
16500     esac
16501 esac
16502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16503 $as_echo "$ans" >&6; }
16504 case "$ntp_warning" in
16505  '')
16506     ;;
16507  *)
16508     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
16509 $as_echo "$as_me: WARNING: *** $ntp_warning ***" >&2;}
16510     ;;
16511 esac
16512
16513
16514 LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
16515 LIBS=$__LIBS
16516 { __LIBS=; unset __LIBS;}
16517
16518
16519
16520 # Check whether --enable-shared was given.
16521 if test "${enable_shared+set}" = set; then :
16522   enableval=$enable_shared; p=${PACKAGE-default}
16523     case $enableval in
16524     yes) enable_shared=yes ;;
16525     no) enable_shared=no ;;
16526     *)
16527       enable_shared=no
16528       # Look at the argument we got.  We use all the common list separators.
16529       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
16530       for pkg in $enableval; do
16531         IFS="$lt_save_ifs"
16532         if test "X$pkg" = "X$p"; then
16533           enable_shared=yes
16534         fi
16535       done
16536       IFS="$lt_save_ifs"
16537       ;;
16538     esac
16539 else
16540   enable_shared=no
16541 fi
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551 case `pwd` in
16552   *\ * | *\     *)
16553     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
16554 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
16555 esac
16556
16557
16558
16559 macro_version='2.4.2'
16560 macro_revision='1.3337'
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574 ltmain="$ac_aux_dir/ltmain.sh"
16575
16576 # Backslashify metacharacters that are still active within
16577 # double-quoted strings.
16578 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
16579
16580 # Same as above, but do not quote variable references.
16581 double_quote_subst='s/\(["`\\]\)/\\\1/g'
16582
16583 # Sed substitution to delay expansion of an escaped shell variable in a
16584 # double_quote_subst'ed string.
16585 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
16586
16587 # Sed substitution to delay expansion of an escaped single quote.
16588 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
16589
16590 # Sed substitution to avoid accidental globbing in evaled expressions
16591 no_glob_subst='s/\*/\\\*/g'
16592
16593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
16594 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
16595 if ${lt_cv_path_NM+:} false; then :
16596   $as_echo_n "(cached) " >&6
16597 else
16598   if test -n "$NM"; then
16599   # Let the user override the test.
16600   lt_cv_path_NM="$NM"
16601 else
16602   lt_nm_to_check="${ac_tool_prefix}nm"
16603   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
16604     lt_nm_to_check="$lt_nm_to_check nm"
16605   fi
16606   for lt_tmp_nm in $lt_nm_to_check; do
16607     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
16608     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
16609       IFS="$lt_save_ifs"
16610       test -z "$ac_dir" && ac_dir=.
16611       tmp_nm="$ac_dir/$lt_tmp_nm"
16612       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
16613         # Check to see if the nm accepts a BSD-compat flag.
16614         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
16615         #   nm: unknown option "B" ignored
16616         # Tru64's nm complains that /dev/null is an invalid object file
16617         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
16618         */dev/null* | *'Invalid file or object type'*)
16619           lt_cv_path_NM="$tmp_nm -B"
16620           break
16621           ;;
16622         *)
16623           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
16624           */dev/null*)
16625             lt_cv_path_NM="$tmp_nm -p"
16626             break
16627             ;;
16628           *)
16629             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
16630             continue # so that we can try to find one that supports BSD flags
16631             ;;
16632           esac
16633           ;;
16634         esac
16635       fi
16636     done
16637     IFS="$lt_save_ifs"
16638   done
16639   : ${lt_cv_path_NM=no}
16640 fi
16641 fi
16642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
16643 $as_echo "$lt_cv_path_NM" >&6; }
16644 if test "$lt_cv_path_NM" != "no"; then
16645   NM="$lt_cv_path_NM"
16646 else
16647   # Didn't find any BSD compatible name lister, look for dumpbin.
16648   if test -n "$DUMPBIN"; then :
16649     # Let the user override the test.
16650   else
16651     if test -n "$ac_tool_prefix"; then
16652   for ac_prog in dumpbin "link -dump"
16653   do
16654     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16655 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16657 $as_echo_n "checking for $ac_word... " >&6; }
16658 if ${ac_cv_prog_DUMPBIN+:} false; then :
16659   $as_echo_n "(cached) " >&6
16660 else
16661   if test -n "$DUMPBIN"; then
16662   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
16663 else
16664 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16665 for as_dir in $PATH
16666 do
16667   IFS=$as_save_IFS
16668   test -z "$as_dir" && as_dir=.
16669     for ac_exec_ext in '' $ac_executable_extensions; do
16670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16671     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
16672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16673     break 2
16674   fi
16675 done
16676   done
16677 IFS=$as_save_IFS
16678
16679 fi
16680 fi
16681 DUMPBIN=$ac_cv_prog_DUMPBIN
16682 if test -n "$DUMPBIN"; then
16683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
16684 $as_echo "$DUMPBIN" >&6; }
16685 else
16686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16687 $as_echo "no" >&6; }
16688 fi
16689
16690
16691     test -n "$DUMPBIN" && break
16692   done
16693 fi
16694 if test -z "$DUMPBIN"; then
16695   ac_ct_DUMPBIN=$DUMPBIN
16696   for ac_prog in dumpbin "link -dump"
16697 do
16698   # Extract the first word of "$ac_prog", so it can be a program name with args.
16699 set dummy $ac_prog; ac_word=$2
16700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16701 $as_echo_n "checking for $ac_word... " >&6; }
16702 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
16703   $as_echo_n "(cached) " >&6
16704 else
16705   if test -n "$ac_ct_DUMPBIN"; then
16706   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
16707 else
16708 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16709 for as_dir in $PATH
16710 do
16711   IFS=$as_save_IFS
16712   test -z "$as_dir" && as_dir=.
16713     for ac_exec_ext in '' $ac_executable_extensions; do
16714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16715     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
16716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16717     break 2
16718   fi
16719 done
16720   done
16721 IFS=$as_save_IFS
16722
16723 fi
16724 fi
16725 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
16726 if test -n "$ac_ct_DUMPBIN"; then
16727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
16728 $as_echo "$ac_ct_DUMPBIN" >&6; }
16729 else
16730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16731 $as_echo "no" >&6; }
16732 fi
16733
16734
16735   test -n "$ac_ct_DUMPBIN" && break
16736 done
16737
16738   if test "x$ac_ct_DUMPBIN" = x; then
16739     DUMPBIN=":"
16740   else
16741     case $cross_compiling:$ac_tool_warned in
16742 yes:)
16743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16744 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16745 ac_tool_warned=yes ;;
16746 esac
16747     DUMPBIN=$ac_ct_DUMPBIN
16748   fi
16749 fi
16750
16751     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
16752     *COFF*)
16753       DUMPBIN="$DUMPBIN -symbols"
16754       ;;
16755     *)
16756       DUMPBIN=:
16757       ;;
16758     esac
16759   fi
16760
16761   if test "$DUMPBIN" != ":"; then
16762     NM="$DUMPBIN"
16763   fi
16764 fi
16765 test -z "$NM" && NM=nm
16766
16767
16768
16769
16770
16771
16772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
16773 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
16774 if ${lt_cv_nm_interface+:} false; then :
16775   $as_echo_n "(cached) " >&6
16776 else
16777   lt_cv_nm_interface="BSD nm"
16778   echo "int some_variable = 0;" > conftest.$ac_ext
16779   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
16780   (eval "$ac_compile" 2>conftest.err)
16781   cat conftest.err >&5
16782   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
16783   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
16784   cat conftest.err >&5
16785   (eval echo "\"\$as_me:$LINENO: output\"" >&5)
16786   cat conftest.out >&5
16787   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
16788     lt_cv_nm_interface="MS dumpbin"
16789   fi
16790   rm -f conftest*
16791 fi
16792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
16793 $as_echo "$lt_cv_nm_interface" >&6; }
16794
16795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
16796 $as_echo_n "checking whether ln -s works... " >&6; }
16797 LN_S=$as_ln_s
16798 if test "$LN_S" = "ln -s"; then
16799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16800 $as_echo "yes" >&6; }
16801 else
16802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
16803 $as_echo "no, using $LN_S" >&6; }
16804 fi
16805
16806 # find the maximum length of command line arguments
16807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
16808 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
16809 if ${lt_cv_sys_max_cmd_len+:} false; then :
16810   $as_echo_n "(cached) " >&6
16811 else
16812     i=0
16813   teststring="ABCD"
16814
16815   case $build_os in
16816   msdosdjgpp*)
16817     # On DJGPP, this test can blow up pretty badly due to problems in libc
16818     # (any single argument exceeding 2000 bytes causes a buffer overrun
16819     # during glob expansion).  Even if it were fixed, the result of this
16820     # check would be larger than it should be.
16821     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
16822     ;;
16823
16824   gnu*)
16825     # Under GNU Hurd, this test is not required because there is
16826     # no limit to the length of command line arguments.
16827     # Libtool will interpret -1 as no limit whatsoever
16828     lt_cv_sys_max_cmd_len=-1;
16829     ;;
16830
16831   cygwin* | mingw* | cegcc*)
16832     # On Win9x/ME, this test blows up -- it succeeds, but takes
16833     # about 5 minutes as the teststring grows exponentially.
16834     # Worse, since 9x/ME are not pre-emptively multitasking,
16835     # you end up with a "frozen" computer, even though with patience
16836     # the test eventually succeeds (with a max line length of 256k).
16837     # Instead, let's just punt: use the minimum linelength reported by
16838     # all of the supported platforms: 8192 (on NT/2K/XP).
16839     lt_cv_sys_max_cmd_len=8192;
16840     ;;
16841
16842   mint*)
16843     # On MiNT this can take a long time and run out of memory.
16844     lt_cv_sys_max_cmd_len=8192;
16845     ;;
16846
16847   amigaos*)
16848     # On AmigaOS with pdksh, this test takes hours, literally.
16849     # So we just punt and use a minimum line length of 8192.
16850     lt_cv_sys_max_cmd_len=8192;
16851     ;;
16852
16853   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
16854     # This has been around since 386BSD, at least.  Likely further.
16855     if test -x /sbin/sysctl; then
16856       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
16857     elif test -x /usr/sbin/sysctl; then
16858       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
16859     else
16860       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
16861     fi
16862     # And add a safety zone
16863     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
16864     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
16865     ;;
16866
16867   interix*)
16868     # We know the value 262144 and hardcode it with a safety zone (like BSD)
16869     lt_cv_sys_max_cmd_len=196608
16870     ;;
16871
16872   osf*)
16873     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
16874     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
16875     # nice to cause kernel panics so lets avoid the loop below.
16876     # First set a reasonable default.
16877     lt_cv_sys_max_cmd_len=16384
16878     #
16879     if test -x /sbin/sysconfig; then
16880       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
16881         *1*) lt_cv_sys_max_cmd_len=-1 ;;
16882       esac
16883     fi
16884     ;;
16885   sco3.2v5*)
16886     lt_cv_sys_max_cmd_len=102400
16887     ;;
16888   sysv5* | sco5v6* | sysv4.2uw2*)
16889     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
16890     if test -n "$kargmax"; then
16891       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
16892     else
16893       lt_cv_sys_max_cmd_len=32768
16894     fi
16895     ;;
16896   *)
16897     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
16898     if test -n "$lt_cv_sys_max_cmd_len"; then
16899       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
16900       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
16901     else
16902       # Make teststring a little bigger before we do anything with it.
16903       # a 1K string should be a reasonable start.
16904       for i in 1 2 3 4 5 6 7 8 ; do
16905         teststring=$teststring$teststring
16906       done
16907       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
16908       # If test is not a shell built-in, we'll probably end up computing a
16909       # maximum length that is only half of the actual maximum length, but
16910       # we can't tell.
16911       while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
16912                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
16913               test $i != 17 # 1/2 MB should be enough
16914       do
16915         i=`expr $i + 1`
16916         teststring=$teststring$teststring
16917       done
16918       # Only check the string length outside the loop.
16919       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
16920       teststring=
16921       # Add a significant safety factor because C++ compilers can tack on
16922       # massive amounts of additional arguments before passing them to the
16923       # linker.  It appears as though 1/2 is a usable value.
16924       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
16925     fi
16926     ;;
16927   esac
16928
16929 fi
16930
16931 if test -n $lt_cv_sys_max_cmd_len ; then
16932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
16933 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
16934 else
16935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
16936 $as_echo "none" >&6; }
16937 fi
16938 max_cmd_len=$lt_cv_sys_max_cmd_len
16939
16940
16941
16942
16943
16944
16945 : ${CP="cp -f"}
16946 : ${MV="mv -f"}
16947 : ${RM="rm -f"}
16948
16949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
16950 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
16951 # Try some XSI features
16952 xsi_shell=no
16953 ( _lt_dummy="a/b/c"
16954   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
16955       = c,a/b,b/c, \
16956     && eval 'test $(( 1 + 1 )) -eq 2 \
16957     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
16958   && xsi_shell=yes
16959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
16960 $as_echo "$xsi_shell" >&6; }
16961
16962
16963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
16964 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
16965 lt_shell_append=no
16966 ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
16967     >/dev/null 2>&1 \
16968   && lt_shell_append=yes
16969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
16970 $as_echo "$lt_shell_append" >&6; }
16971
16972
16973 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
16974   lt_unset=unset
16975 else
16976   lt_unset=false
16977 fi
16978
16979
16980
16981
16982
16983 # test EBCDIC or ASCII
16984 case `echo X|tr X '\101'` in
16985  A) # ASCII based system
16986     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
16987   lt_SP2NL='tr \040 \012'
16988   lt_NL2SP='tr \015\012 \040\040'
16989   ;;
16990  *) # EBCDIC based system
16991   lt_SP2NL='tr \100 \n'
16992   lt_NL2SP='tr \r\n \100\100'
16993   ;;
16994 esac
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
17005 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
17006 if ${lt_cv_to_host_file_cmd+:} false; then :
17007   $as_echo_n "(cached) " >&6
17008 else
17009   case $host in
17010   *-*-mingw* )
17011     case $build in
17012       *-*-mingw* ) # actually msys
17013         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
17014         ;;
17015       *-*-cygwin* )
17016         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
17017         ;;
17018       * ) # otherwise, assume *nix
17019         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
17020         ;;
17021     esac
17022     ;;
17023   *-*-cygwin* )
17024     case $build in
17025       *-*-mingw* ) # actually msys
17026         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
17027         ;;
17028       *-*-cygwin* )
17029         lt_cv_to_host_file_cmd=func_convert_file_noop
17030         ;;
17031       * ) # otherwise, assume *nix
17032         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
17033         ;;
17034     esac
17035     ;;
17036   * ) # unhandled hosts (and "normal" native builds)
17037     lt_cv_to_host_file_cmd=func_convert_file_noop
17038     ;;
17039 esac
17040
17041 fi
17042
17043 to_host_file_cmd=$lt_cv_to_host_file_cmd
17044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
17045 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
17046
17047
17048
17049
17050
17051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
17052 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
17053 if ${lt_cv_to_tool_file_cmd+:} false; then :
17054   $as_echo_n "(cached) " >&6
17055 else
17056   #assume ordinary cross tools, or native build.
17057 lt_cv_to_tool_file_cmd=func_convert_file_noop
17058 case $host in
17059   *-*-mingw* )
17060     case $build in
17061       *-*-mingw* ) # actually msys
17062         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
17063         ;;
17064     esac
17065     ;;
17066 esac
17067
17068 fi
17069
17070 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
17071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
17072 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
17073
17074
17075
17076
17077
17078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
17079 $as_echo_n "checking for $LD option to reload object files... " >&6; }
17080 if ${lt_cv_ld_reload_flag+:} false; then :
17081   $as_echo_n "(cached) " >&6
17082 else
17083   lt_cv_ld_reload_flag='-r'
17084 fi
17085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
17086 $as_echo "$lt_cv_ld_reload_flag" >&6; }
17087 reload_flag=$lt_cv_ld_reload_flag
17088 case $reload_flag in
17089 "" | " "*) ;;
17090 *) reload_flag=" $reload_flag" ;;
17091 esac
17092 reload_cmds='$LD$reload_flag -o $output$reload_objs'
17093 case $host_os in
17094   cygwin* | mingw* | pw32* | cegcc*)
17095     if test "$GCC" != yes; then
17096       reload_cmds=false
17097     fi
17098     ;;
17099   darwin*)
17100     if test "$GCC" = yes; then
17101       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
17102     else
17103       reload_cmds='$LD$reload_flag -o $output$reload_objs'
17104     fi
17105     ;;
17106 esac
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116 if test -n "$ac_tool_prefix"; then
17117   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
17118 set dummy ${ac_tool_prefix}objdump; ac_word=$2
17119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17120 $as_echo_n "checking for $ac_word... " >&6; }
17121 if ${ac_cv_prog_OBJDUMP+:} false; then :
17122   $as_echo_n "(cached) " >&6
17123 else
17124   if test -n "$OBJDUMP"; then
17125   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
17126 else
17127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17128 for as_dir in $PATH
17129 do
17130   IFS=$as_save_IFS
17131   test -z "$as_dir" && as_dir=.
17132     for ac_exec_ext in '' $ac_executable_extensions; do
17133   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17134     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
17135     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17136     break 2
17137   fi
17138 done
17139   done
17140 IFS=$as_save_IFS
17141
17142 fi
17143 fi
17144 OBJDUMP=$ac_cv_prog_OBJDUMP
17145 if test -n "$OBJDUMP"; then
17146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
17147 $as_echo "$OBJDUMP" >&6; }
17148 else
17149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17150 $as_echo "no" >&6; }
17151 fi
17152
17153
17154 fi
17155 if test -z "$ac_cv_prog_OBJDUMP"; then
17156   ac_ct_OBJDUMP=$OBJDUMP
17157   # Extract the first word of "objdump", so it can be a program name with args.
17158 set dummy objdump; ac_word=$2
17159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17160 $as_echo_n "checking for $ac_word... " >&6; }
17161 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
17162   $as_echo_n "(cached) " >&6
17163 else
17164   if test -n "$ac_ct_OBJDUMP"; then
17165   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
17166 else
17167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17168 for as_dir in $PATH
17169 do
17170   IFS=$as_save_IFS
17171   test -z "$as_dir" && as_dir=.
17172     for ac_exec_ext in '' $ac_executable_extensions; do
17173   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17174     ac_cv_prog_ac_ct_OBJDUMP="objdump"
17175     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17176     break 2
17177   fi
17178 done
17179   done
17180 IFS=$as_save_IFS
17181
17182 fi
17183 fi
17184 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
17185 if test -n "$ac_ct_OBJDUMP"; then
17186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
17187 $as_echo "$ac_ct_OBJDUMP" >&6; }
17188 else
17189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17190 $as_echo "no" >&6; }
17191 fi
17192
17193   if test "x$ac_ct_OBJDUMP" = x; then
17194     OBJDUMP="false"
17195   else
17196     case $cross_compiling:$ac_tool_warned in
17197 yes:)
17198 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17199 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17200 ac_tool_warned=yes ;;
17201 esac
17202     OBJDUMP=$ac_ct_OBJDUMP
17203   fi
17204 else
17205   OBJDUMP="$ac_cv_prog_OBJDUMP"
17206 fi
17207
17208 test -z "$OBJDUMP" && OBJDUMP=objdump
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
17219 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
17220 if ${lt_cv_deplibs_check_method+:} false; then :
17221   $as_echo_n "(cached) " >&6
17222 else
17223   lt_cv_file_magic_cmd='$MAGIC_CMD'
17224 lt_cv_file_magic_test_file=
17225 lt_cv_deplibs_check_method='unknown'
17226 # Need to set the preceding variable on all platforms that support
17227 # interlibrary dependencies.
17228 # 'none' -- dependencies not supported.
17229 # `unknown' -- same as none, but documents that we really don't know.
17230 # 'pass_all' -- all dependencies passed with no checks.
17231 # 'test_compile' -- check by making test program.
17232 # 'file_magic [[regex]]' -- check by looking for files in library path
17233 # which responds to the $file_magic_cmd with a given extended regex.
17234 # If you have `file' or equivalent on your system and you're not sure
17235 # whether `pass_all' will *always* work, you probably want this one.
17236
17237 case $host_os in
17238 aix[4-9]*)
17239   lt_cv_deplibs_check_method=pass_all
17240   ;;
17241
17242 beos*)
17243   lt_cv_deplibs_check_method=pass_all
17244   ;;
17245
17246 bsdi[45]*)
17247   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
17248   lt_cv_file_magic_cmd='/usr/bin/file -L'
17249   lt_cv_file_magic_test_file=/shlib/libc.so
17250   ;;
17251
17252 cygwin*)
17253   # func_win32_libid is a shell function defined in ltmain.sh
17254   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
17255   lt_cv_file_magic_cmd='func_win32_libid'
17256   ;;
17257
17258 mingw* | pw32*)
17259   # Base MSYS/MinGW do not provide the 'file' command needed by
17260   # func_win32_libid shell function, so use a weaker test based on 'objdump',
17261   # unless we find 'file', for example because we are cross-compiling.
17262   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
17263   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
17264     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
17265     lt_cv_file_magic_cmd='func_win32_libid'
17266   else
17267     # Keep this pattern in sync with the one in func_win32_libid.
17268     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
17269     lt_cv_file_magic_cmd='$OBJDUMP -f'
17270   fi
17271   ;;
17272
17273 cegcc*)
17274   # use the weaker test based on 'objdump'. See mingw*.
17275   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
17276   lt_cv_file_magic_cmd='$OBJDUMP -f'
17277   ;;
17278
17279 darwin* | rhapsody*)
17280   lt_cv_deplibs_check_method=pass_all
17281   ;;
17282
17283 freebsd* | dragonfly*)
17284   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
17285     case $host_cpu in
17286     i*86 )
17287       # Not sure whether the presence of OpenBSD here was a mistake.
17288       # Let's accept both of them until this is cleared up.
17289       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
17290       lt_cv_file_magic_cmd=/usr/bin/file
17291       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
17292       ;;
17293     esac
17294   else
17295     lt_cv_deplibs_check_method=pass_all
17296   fi
17297   ;;
17298
17299 gnu*)
17300   lt_cv_deplibs_check_method=pass_all
17301   ;;
17302
17303 haiku*)
17304   lt_cv_deplibs_check_method=pass_all
17305   ;;
17306
17307 hpux10.20* | hpux11*)
17308   lt_cv_file_magic_cmd=/usr/bin/file
17309   case $host_cpu in
17310   ia64*)
17311     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
17312     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
17313     ;;
17314   hppa*64*)
17315     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]'
17316     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
17317     ;;
17318   *)
17319     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
17320     lt_cv_file_magic_test_file=/usr/lib/libc.sl
17321     ;;
17322   esac
17323   ;;
17324
17325 interix[3-9]*)
17326   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
17327   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
17328   ;;
17329
17330 irix5* | irix6* | nonstopux*)
17331   case $LD in
17332   *-32|*"-32 ") libmagic=32-bit;;
17333   *-n32|*"-n32 ") libmagic=N32;;
17334   *-64|*"-64 ") libmagic=64-bit;;
17335   *) libmagic=never-match;;
17336   esac
17337   lt_cv_deplibs_check_method=pass_all
17338   ;;
17339
17340 # This must be Linux ELF.
17341 linux* | k*bsd*-gnu | kopensolaris*-gnu)
17342   lt_cv_deplibs_check_method=pass_all
17343   ;;
17344
17345 netbsd*)
17346   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
17347     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
17348   else
17349     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
17350   fi
17351   ;;
17352
17353 newos6*)
17354   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
17355   lt_cv_file_magic_cmd=/usr/bin/file
17356   lt_cv_file_magic_test_file=/usr/lib/libnls.so
17357   ;;
17358
17359 *nto* | *qnx*)
17360   lt_cv_deplibs_check_method=pass_all
17361   ;;
17362
17363 openbsd*)
17364   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
17365     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
17366   else
17367     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
17368   fi
17369   ;;
17370
17371 osf3* | osf4* | osf5*)
17372   lt_cv_deplibs_check_method=pass_all
17373   ;;
17374
17375 rdos*)
17376   lt_cv_deplibs_check_method=pass_all
17377   ;;
17378
17379 solaris*)
17380   lt_cv_deplibs_check_method=pass_all
17381   ;;
17382
17383 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
17384   lt_cv_deplibs_check_method=pass_all
17385   ;;
17386
17387 sysv4 | sysv4.3*)
17388   case $host_vendor in
17389   motorola)
17390     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]'
17391     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
17392     ;;
17393   ncr)
17394     lt_cv_deplibs_check_method=pass_all
17395     ;;
17396   sequent)
17397     lt_cv_file_magic_cmd='/bin/file'
17398     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
17399     ;;
17400   sni)
17401     lt_cv_file_magic_cmd='/bin/file'
17402     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
17403     lt_cv_file_magic_test_file=/lib/libc.so
17404     ;;
17405   siemens)
17406     lt_cv_deplibs_check_method=pass_all
17407     ;;
17408   pc)
17409     lt_cv_deplibs_check_method=pass_all
17410     ;;
17411   esac
17412   ;;
17413
17414 tpf*)
17415   lt_cv_deplibs_check_method=pass_all
17416   ;;
17417 esac
17418
17419 fi
17420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
17421 $as_echo "$lt_cv_deplibs_check_method" >&6; }
17422
17423 file_magic_glob=
17424 want_nocaseglob=no
17425 if test "$build" = "$host"; then
17426   case $host_os in
17427   mingw* | pw32*)
17428     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
17429       want_nocaseglob=yes
17430     else
17431       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
17432     fi
17433     ;;
17434   esac
17435 fi
17436
17437 file_magic_cmd=$lt_cv_file_magic_cmd
17438 deplibs_check_method=$lt_cv_deplibs_check_method
17439 test -z "$deplibs_check_method" && deplibs_check_method=unknown
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462 if test -n "$ac_tool_prefix"; then
17463   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
17464 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
17465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17466 $as_echo_n "checking for $ac_word... " >&6; }
17467 if ${ac_cv_prog_DLLTOOL+:} false; then :
17468   $as_echo_n "(cached) " >&6
17469 else
17470   if test -n "$DLLTOOL"; then
17471   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
17472 else
17473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17474 for as_dir in $PATH
17475 do
17476   IFS=$as_save_IFS
17477   test -z "$as_dir" && as_dir=.
17478     for ac_exec_ext in '' $ac_executable_extensions; do
17479   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17480     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
17481     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17482     break 2
17483   fi
17484 done
17485   done
17486 IFS=$as_save_IFS
17487
17488 fi
17489 fi
17490 DLLTOOL=$ac_cv_prog_DLLTOOL
17491 if test -n "$DLLTOOL"; then
17492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
17493 $as_echo "$DLLTOOL" >&6; }
17494 else
17495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17496 $as_echo "no" >&6; }
17497 fi
17498
17499
17500 fi
17501 if test -z "$ac_cv_prog_DLLTOOL"; then
17502   ac_ct_DLLTOOL=$DLLTOOL
17503   # Extract the first word of "dlltool", so it can be a program name with args.
17504 set dummy dlltool; ac_word=$2
17505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17506 $as_echo_n "checking for $ac_word... " >&6; }
17507 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
17508   $as_echo_n "(cached) " >&6
17509 else
17510   if test -n "$ac_ct_DLLTOOL"; then
17511   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
17512 else
17513 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17514 for as_dir in $PATH
17515 do
17516   IFS=$as_save_IFS
17517   test -z "$as_dir" && as_dir=.
17518     for ac_exec_ext in '' $ac_executable_extensions; do
17519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17520     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
17521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17522     break 2
17523   fi
17524 done
17525   done
17526 IFS=$as_save_IFS
17527
17528 fi
17529 fi
17530 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
17531 if test -n "$ac_ct_DLLTOOL"; then
17532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
17533 $as_echo "$ac_ct_DLLTOOL" >&6; }
17534 else
17535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17536 $as_echo "no" >&6; }
17537 fi
17538
17539   if test "x$ac_ct_DLLTOOL" = x; then
17540     DLLTOOL="false"
17541   else
17542     case $cross_compiling:$ac_tool_warned in
17543 yes:)
17544 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17545 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17546 ac_tool_warned=yes ;;
17547 esac
17548     DLLTOOL=$ac_ct_DLLTOOL
17549   fi
17550 else
17551   DLLTOOL="$ac_cv_prog_DLLTOOL"
17552 fi
17553
17554 test -z "$DLLTOOL" && DLLTOOL=dlltool
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
17566 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
17567 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
17568   $as_echo_n "(cached) " >&6
17569 else
17570   lt_cv_sharedlib_from_linklib_cmd='unknown'
17571
17572 case $host_os in
17573 cygwin* | mingw* | pw32* | cegcc*)
17574   # two different shell functions defined in ltmain.sh
17575   # decide which to use based on capabilities of $DLLTOOL
17576   case `$DLLTOOL --help 2>&1` in
17577   *--identify-strict*)
17578     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
17579     ;;
17580   *)
17581     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
17582     ;;
17583   esac
17584   ;;
17585 *)
17586   # fallback: assume linklib IS sharedlib
17587   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
17588   ;;
17589 esac
17590
17591 fi
17592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
17593 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
17594 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
17595 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
17596
17597
17598
17599
17600
17601
17602
17603 if test -n "$ac_tool_prefix"; then
17604   for ac_prog in ar
17605   do
17606     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
17607 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
17608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17609 $as_echo_n "checking for $ac_word... " >&6; }
17610 if ${ac_cv_prog_AR+:} false; then :
17611   $as_echo_n "(cached) " >&6
17612 else
17613   if test -n "$AR"; then
17614   ac_cv_prog_AR="$AR" # Let the user override the test.
17615 else
17616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17617 for as_dir in $PATH
17618 do
17619   IFS=$as_save_IFS
17620   test -z "$as_dir" && as_dir=.
17621     for ac_exec_ext in '' $ac_executable_extensions; do
17622   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17623     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
17624     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17625     break 2
17626   fi
17627 done
17628   done
17629 IFS=$as_save_IFS
17630
17631 fi
17632 fi
17633 AR=$ac_cv_prog_AR
17634 if test -n "$AR"; then
17635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
17636 $as_echo "$AR" >&6; }
17637 else
17638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17639 $as_echo "no" >&6; }
17640 fi
17641
17642
17643     test -n "$AR" && break
17644   done
17645 fi
17646 if test -z "$AR"; then
17647   ac_ct_AR=$AR
17648   for ac_prog in ar
17649 do
17650   # Extract the first word of "$ac_prog", so it can be a program name with args.
17651 set dummy $ac_prog; ac_word=$2
17652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17653 $as_echo_n "checking for $ac_word... " >&6; }
17654 if ${ac_cv_prog_ac_ct_AR+:} false; then :
17655   $as_echo_n "(cached) " >&6
17656 else
17657   if test -n "$ac_ct_AR"; then
17658   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
17659 else
17660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17661 for as_dir in $PATH
17662 do
17663   IFS=$as_save_IFS
17664   test -z "$as_dir" && as_dir=.
17665     for ac_exec_ext in '' $ac_executable_extensions; do
17666   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17667     ac_cv_prog_ac_ct_AR="$ac_prog"
17668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17669     break 2
17670   fi
17671 done
17672   done
17673 IFS=$as_save_IFS
17674
17675 fi
17676 fi
17677 ac_ct_AR=$ac_cv_prog_ac_ct_AR
17678 if test -n "$ac_ct_AR"; then
17679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
17680 $as_echo "$ac_ct_AR" >&6; }
17681 else
17682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17683 $as_echo "no" >&6; }
17684 fi
17685
17686
17687   test -n "$ac_ct_AR" && break
17688 done
17689
17690   if test "x$ac_ct_AR" = x; then
17691     AR="false"
17692   else
17693     case $cross_compiling:$ac_tool_warned in
17694 yes:)
17695 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17696 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17697 ac_tool_warned=yes ;;
17698 esac
17699     AR=$ac_ct_AR
17700   fi
17701 fi
17702
17703 : ${AR=ar}
17704 : ${AR_FLAGS=cru}
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
17717 $as_echo_n "checking for archiver @FILE support... " >&6; }
17718 if ${lt_cv_ar_at_file+:} false; then :
17719   $as_echo_n "(cached) " >&6
17720 else
17721   lt_cv_ar_at_file=no
17722    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17723 /* end confdefs.h.  */
17724
17725 int
17726 main ()
17727 {
17728
17729   ;
17730   return 0;
17731 }
17732 _ACEOF
17733 if ac_fn_c_try_compile "$LINENO"; then :
17734   echo conftest.$ac_objext > conftest.lst
17735       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
17736       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
17737   (eval $lt_ar_try) 2>&5
17738   ac_status=$?
17739   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17740   test $ac_status = 0; }
17741       if test "$ac_status" -eq 0; then
17742         # Ensure the archiver fails upon bogus file names.
17743         rm -f conftest.$ac_objext libconftest.a
17744         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
17745   (eval $lt_ar_try) 2>&5
17746   ac_status=$?
17747   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17748   test $ac_status = 0; }
17749         if test "$ac_status" -ne 0; then
17750           lt_cv_ar_at_file=@
17751         fi
17752       fi
17753       rm -f conftest.* libconftest.a
17754
17755 fi
17756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17757
17758 fi
17759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
17760 $as_echo "$lt_cv_ar_at_file" >&6; }
17761
17762 if test "x$lt_cv_ar_at_file" = xno; then
17763   archiver_list_spec=
17764 else
17765   archiver_list_spec=$lt_cv_ar_at_file
17766 fi
17767
17768
17769
17770
17771
17772
17773
17774 if test -n "$ac_tool_prefix"; then
17775   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
17776 set dummy ${ac_tool_prefix}strip; ac_word=$2
17777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17778 $as_echo_n "checking for $ac_word... " >&6; }
17779 if ${ac_cv_prog_STRIP+:} false; then :
17780   $as_echo_n "(cached) " >&6
17781 else
17782   if test -n "$STRIP"; then
17783   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
17784 else
17785 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17786 for as_dir in $PATH
17787 do
17788   IFS=$as_save_IFS
17789   test -z "$as_dir" && as_dir=.
17790     for ac_exec_ext in '' $ac_executable_extensions; do
17791   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17792     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
17793     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17794     break 2
17795   fi
17796 done
17797   done
17798 IFS=$as_save_IFS
17799
17800 fi
17801 fi
17802 STRIP=$ac_cv_prog_STRIP
17803 if test -n "$STRIP"; then
17804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
17805 $as_echo "$STRIP" >&6; }
17806 else
17807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17808 $as_echo "no" >&6; }
17809 fi
17810
17811
17812 fi
17813 if test -z "$ac_cv_prog_STRIP"; then
17814   ac_ct_STRIP=$STRIP
17815   # Extract the first word of "strip", so it can be a program name with args.
17816 set dummy strip; ac_word=$2
17817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17818 $as_echo_n "checking for $ac_word... " >&6; }
17819 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
17820   $as_echo_n "(cached) " >&6
17821 else
17822   if test -n "$ac_ct_STRIP"; then
17823   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
17824 else
17825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17826 for as_dir in $PATH
17827 do
17828   IFS=$as_save_IFS
17829   test -z "$as_dir" && as_dir=.
17830     for ac_exec_ext in '' $ac_executable_extensions; do
17831   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17832     ac_cv_prog_ac_ct_STRIP="strip"
17833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17834     break 2
17835   fi
17836 done
17837   done
17838 IFS=$as_save_IFS
17839
17840 fi
17841 fi
17842 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
17843 if test -n "$ac_ct_STRIP"; then
17844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
17845 $as_echo "$ac_ct_STRIP" >&6; }
17846 else
17847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17848 $as_echo "no" >&6; }
17849 fi
17850
17851   if test "x$ac_ct_STRIP" = x; then
17852     STRIP=":"
17853   else
17854     case $cross_compiling:$ac_tool_warned in
17855 yes:)
17856 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17857 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17858 ac_tool_warned=yes ;;
17859 esac
17860     STRIP=$ac_ct_STRIP
17861   fi
17862 else
17863   STRIP="$ac_cv_prog_STRIP"
17864 fi
17865
17866 test -z "$STRIP" && STRIP=:
17867
17868
17869
17870
17871
17872
17873 if test -n "$ac_tool_prefix"; then
17874   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
17875 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
17876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17877 $as_echo_n "checking for $ac_word... " >&6; }
17878 if ${ac_cv_prog_RANLIB+:} false; then :
17879   $as_echo_n "(cached) " >&6
17880 else
17881   if test -n "$RANLIB"; then
17882   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
17883 else
17884 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17885 for as_dir in $PATH
17886 do
17887   IFS=$as_save_IFS
17888   test -z "$as_dir" && as_dir=.
17889     for ac_exec_ext in '' $ac_executable_extensions; do
17890   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17891     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
17892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17893     break 2
17894   fi
17895 done
17896   done
17897 IFS=$as_save_IFS
17898
17899 fi
17900 fi
17901 RANLIB=$ac_cv_prog_RANLIB
17902 if test -n "$RANLIB"; then
17903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
17904 $as_echo "$RANLIB" >&6; }
17905 else
17906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17907 $as_echo "no" >&6; }
17908 fi
17909
17910
17911 fi
17912 if test -z "$ac_cv_prog_RANLIB"; then
17913   ac_ct_RANLIB=$RANLIB
17914   # Extract the first word of "ranlib", so it can be a program name with args.
17915 set dummy ranlib; ac_word=$2
17916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17917 $as_echo_n "checking for $ac_word... " >&6; }
17918 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
17919   $as_echo_n "(cached) " >&6
17920 else
17921   if test -n "$ac_ct_RANLIB"; then
17922   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
17923 else
17924 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17925 for as_dir in $PATH
17926 do
17927   IFS=$as_save_IFS
17928   test -z "$as_dir" && as_dir=.
17929     for ac_exec_ext in '' $ac_executable_extensions; do
17930   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17931     ac_cv_prog_ac_ct_RANLIB="ranlib"
17932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17933     break 2
17934   fi
17935 done
17936   done
17937 IFS=$as_save_IFS
17938
17939 fi
17940 fi
17941 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
17942 if test -n "$ac_ct_RANLIB"; then
17943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
17944 $as_echo "$ac_ct_RANLIB" >&6; }
17945 else
17946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17947 $as_echo "no" >&6; }
17948 fi
17949
17950   if test "x$ac_ct_RANLIB" = x; then
17951     RANLIB=":"
17952   else
17953     case $cross_compiling:$ac_tool_warned in
17954 yes:)
17955 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17956 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17957 ac_tool_warned=yes ;;
17958 esac
17959     RANLIB=$ac_ct_RANLIB
17960   fi
17961 else
17962   RANLIB="$ac_cv_prog_RANLIB"
17963 fi
17964
17965 test -z "$RANLIB" && RANLIB=:
17966
17967
17968
17969
17970
17971
17972 # Determine commands to create old-style static archives.
17973 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
17974 old_postinstall_cmds='chmod 644 $oldlib'
17975 old_postuninstall_cmds=
17976
17977 if test -n "$RANLIB"; then
17978   case $host_os in
17979   openbsd*)
17980     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
17981     ;;
17982   *)
17983     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
17984     ;;
17985   esac
17986   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
17987 fi
17988
17989 case $host_os in
17990   darwin*)
17991     lock_old_archive_extraction=yes ;;
17992   *)
17993     lock_old_archive_extraction=no ;;
17994 esac
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
18032
18033
18034 # If no C compiler was specified, use CC.
18035 LTCC=${LTCC-"$CC"}
18036
18037 # If no C compiler flags were specified, use CFLAGS.
18038 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
18039
18040 # Allow CC to be a program name with arguments.
18041 compiler=$CC
18042
18043
18044 # Check for command to grab the raw symbol name followed by C symbol from nm.
18045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
18046 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
18047 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
18048   $as_echo_n "(cached) " >&6
18049 else
18050
18051 # These are sane defaults that work on at least a few old systems.
18052 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
18053
18054 # Character class describing NM global symbol codes.
18055 symcode='[BCDEGRST]'
18056
18057 # Regexp to match symbols that can be accessed directly from C.
18058 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
18059
18060 # Define system-specific variables.
18061 case $host_os in
18062 aix*)
18063   symcode='[BCDT]'
18064   ;;
18065 cygwin* | mingw* | pw32* | cegcc*)
18066   symcode='[ABCDGISTW]'
18067   ;;
18068 hpux*)
18069   if test "$host_cpu" = ia64; then
18070     symcode='[ABCDEGRST]'
18071   fi
18072   ;;
18073 irix* | nonstopux*)
18074   symcode='[BCDEGRST]'
18075   ;;
18076 osf*)
18077   symcode='[BCDEGQRST]'
18078   ;;
18079 solaris*)
18080   symcode='[BDRT]'
18081   ;;
18082 sco3.2v5*)
18083   symcode='[DT]'
18084   ;;
18085 sysv4.2uw2*)
18086   symcode='[DT]'
18087   ;;
18088 sysv5* | sco5v6* | unixware* | OpenUNIX*)
18089   symcode='[ABDT]'
18090   ;;
18091 sysv4)
18092   symcode='[DFNSTU]'
18093   ;;
18094 esac
18095
18096 # If we're using GNU nm, then use its standard symbol codes.
18097 case `$NM -V 2>&1` in
18098 *GNU* | *'with BFD'*)
18099   symcode='[ABCDGIRSTW]' ;;
18100 esac
18101
18102 # Transform an extracted symbol line into a proper C declaration.
18103 # Some systems (esp. on ia64) link data and code symbols differently,
18104 # so use this general approach.
18105 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
18106
18107 # Transform an extracted symbol line into symbol name and symbol address
18108 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
18109 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'"
18110
18111 # Handle CRLF in mingw tool chain
18112 opt_cr=
18113 case $build_os in
18114 mingw*)
18115   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
18116   ;;
18117 esac
18118
18119 # Try without a prefix underscore, then with it.
18120 for ac_symprfx in "" "_"; do
18121
18122   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
18123   symxfrm="\\1 $ac_symprfx\\2 \\2"
18124
18125   # Write the raw and C identifiers.
18126   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
18127     # Fake it for dumpbin and say T for any non-static function
18128     # and D for any global variable.
18129     # Also find C++ and __fastcall symbols from MSVC++,
18130     # which start with @ or ?.
18131     lt_cv_sys_global_symbol_pipe="$AWK '"\
18132 "     {last_section=section; section=\$ 3};"\
18133 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
18134 "     \$ 0!~/External *\|/{next};"\
18135 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
18136 "     {if(hide[section]) next};"\
18137 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
18138 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
18139 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
18140 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
18141 "     ' prfx=^$ac_symprfx"
18142   else
18143     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
18144   fi
18145   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
18146
18147   # Check to see that the pipe works correctly.
18148   pipe_works=no
18149
18150   rm -f conftest*
18151   cat > conftest.$ac_ext <<_LT_EOF
18152 #ifdef __cplusplus
18153 extern "C" {
18154 #endif
18155 char nm_test_var;
18156 void nm_test_func(void);
18157 void nm_test_func(void){}
18158 #ifdef __cplusplus
18159 }
18160 #endif
18161 int main(){nm_test_var='a';nm_test_func();return(0);}
18162 _LT_EOF
18163
18164   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18165   (eval $ac_compile) 2>&5
18166   ac_status=$?
18167   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18168   test $ac_status = 0; }; then
18169     # Now try to grab the symbols.
18170     nlist=conftest.nm
18171     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
18172   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
18173   ac_status=$?
18174   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18175   test $ac_status = 0; } && test -s "$nlist"; then
18176       # Try sorting and uniquifying the output.
18177       if sort "$nlist" | uniq > "$nlist"T; then
18178         mv -f "$nlist"T "$nlist"
18179       else
18180         rm -f "$nlist"T
18181       fi
18182
18183       # Make sure that we snagged all the symbols we need.
18184       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
18185         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
18186           cat <<_LT_EOF > conftest.$ac_ext
18187 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
18188 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
18189 /* DATA imports from DLLs on WIN32 con't be const, because runtime
18190    relocations are performed -- see ld's documentation on pseudo-relocs.  */
18191 # define LT_DLSYM_CONST
18192 #elif defined(__osf__)
18193 /* This system does not cope well with relocations in const data.  */
18194 # define LT_DLSYM_CONST
18195 #else
18196 # define LT_DLSYM_CONST const
18197 #endif
18198
18199 #ifdef __cplusplus
18200 extern "C" {
18201 #endif
18202
18203 _LT_EOF
18204           # Now generate the symbol file.
18205           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
18206
18207           cat <<_LT_EOF >> conftest.$ac_ext
18208
18209 /* The mapping between symbol names and symbols.  */
18210 LT_DLSYM_CONST struct {
18211   const char *name;
18212   void       *address;
18213 }
18214 lt__PROGRAM__LTX_preloaded_symbols[] =
18215 {
18216   { "@PROGRAM@", (void *) 0 },
18217 _LT_EOF
18218           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
18219           cat <<\_LT_EOF >> conftest.$ac_ext
18220   {0, (void *) 0}
18221 };
18222
18223 /* This works around a problem in FreeBSD linker */
18224 #ifdef FREEBSD_WORKAROUND
18225 static const void *lt_preloaded_setup() {
18226   return lt__PROGRAM__LTX_preloaded_symbols;
18227 }
18228 #endif
18229
18230 #ifdef __cplusplus
18231 }
18232 #endif
18233 _LT_EOF
18234           # Now try linking the two files.
18235           mv conftest.$ac_objext conftstm.$ac_objext
18236           lt_globsym_save_LIBS=$LIBS
18237           lt_globsym_save_CFLAGS=$CFLAGS
18238           LIBS="conftstm.$ac_objext"
18239           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
18240           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
18241   (eval $ac_link) 2>&5
18242   ac_status=$?
18243   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18244   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
18245             pipe_works=yes
18246           fi
18247           LIBS=$lt_globsym_save_LIBS
18248           CFLAGS=$lt_globsym_save_CFLAGS
18249         else
18250           echo "cannot find nm_test_func in $nlist" >&5
18251         fi
18252       else
18253         echo "cannot find nm_test_var in $nlist" >&5
18254       fi
18255     else
18256       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
18257     fi
18258   else
18259     echo "$progname: failed program was:" >&5
18260     cat conftest.$ac_ext >&5
18261   fi
18262   rm -rf conftest* conftst*
18263
18264   # Do not use the global_symbol_pipe unless it works.
18265   if test "$pipe_works" = yes; then
18266     break
18267   else
18268     lt_cv_sys_global_symbol_pipe=
18269   fi
18270 done
18271
18272 fi
18273
18274 if test -z "$lt_cv_sys_global_symbol_pipe"; then
18275   lt_cv_sys_global_symbol_to_cdecl=
18276 fi
18277 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
18278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
18279 $as_echo "failed" >&6; }
18280 else
18281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18282 $as_echo "ok" >&6; }
18283 fi
18284
18285 # Response file support.
18286 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
18287   nm_file_list_spec='@'
18288 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
18289   nm_file_list_spec='@'
18290 fi
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
18316
18317
18318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
18319 $as_echo_n "checking for sysroot... " >&6; }
18320
18321 # Check whether --with-sysroot was given.
18322 if test "${with_sysroot+set}" = set; then :
18323   withval=$with_sysroot;
18324 else
18325   with_sysroot=no
18326 fi
18327
18328
18329 lt_sysroot=
18330 case ${with_sysroot} in #(
18331  yes)
18332    if test "$GCC" = yes; then
18333      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
18334    fi
18335    ;; #(
18336  /*)
18337    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
18338    ;; #(
18339  no|'')
18340    ;; #(
18341  *)
18342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
18343 $as_echo "${with_sysroot}" >&6; }
18344    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
18345    ;;
18346 esac
18347
18348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
18349 $as_echo "${lt_sysroot:-no}" >&6; }
18350
18351
18352
18353
18354
18355 # Check whether --enable-libtool-lock was given.
18356 if test "${enable_libtool_lock+set}" = set; then :
18357   enableval=$enable_libtool_lock;
18358 fi
18359
18360 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
18361
18362 # Some flags need to be propagated to the compiler or linker for good
18363 # libtool support.
18364 case $host in
18365 ia64-*-hpux*)
18366   # Find out which ABI we are using.
18367   echo 'int i;' > conftest.$ac_ext
18368   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18369   (eval $ac_compile) 2>&5
18370   ac_status=$?
18371   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18372   test $ac_status = 0; }; then
18373     case `/usr/bin/file conftest.$ac_objext` in
18374       *ELF-32*)
18375         HPUX_IA64_MODE="32"
18376         ;;
18377       *ELF-64*)
18378         HPUX_IA64_MODE="64"
18379         ;;
18380     esac
18381   fi
18382   rm -rf conftest*
18383   ;;
18384 *-*-irix6*)
18385   # Find out which ABI we are using.
18386   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
18387   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18388   (eval $ac_compile) 2>&5
18389   ac_status=$?
18390   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18391   test $ac_status = 0; }; then
18392     if test "$lt_cv_prog_gnu_ld" = yes; then
18393       case `/usr/bin/file conftest.$ac_objext` in
18394         *32-bit*)
18395           LD="${LD-ld} -melf32bsmip"
18396           ;;
18397         *N32*)
18398           LD="${LD-ld} -melf32bmipn32"
18399           ;;
18400         *64-bit*)
18401           LD="${LD-ld} -melf64bmip"
18402         ;;
18403       esac
18404     else
18405       case `/usr/bin/file conftest.$ac_objext` in
18406         *32-bit*)
18407           LD="${LD-ld} -32"
18408           ;;
18409         *N32*)
18410           LD="${LD-ld} -n32"
18411           ;;
18412         *64-bit*)
18413           LD="${LD-ld} -64"
18414           ;;
18415       esac
18416     fi
18417   fi
18418   rm -rf conftest*
18419   ;;
18420
18421 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
18422 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
18423   # Find out which ABI we are using.
18424   echo 'int i;' > conftest.$ac_ext
18425   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18426   (eval $ac_compile) 2>&5
18427   ac_status=$?
18428   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18429   test $ac_status = 0; }; then
18430     case `/usr/bin/file conftest.o` in
18431       *32-bit*)
18432         case $host in
18433           x86_64-*kfreebsd*-gnu)
18434             LD="${LD-ld} -m elf_i386_fbsd"
18435             ;;
18436           x86_64-*linux*)
18437             LD="${LD-ld} -m elf_i386"
18438             ;;
18439           ppc64-*linux*|powerpc64-*linux*)
18440             LD="${LD-ld} -m elf32ppclinux"
18441             ;;
18442           s390x-*linux*)
18443             LD="${LD-ld} -m elf_s390"
18444             ;;
18445           sparc64-*linux*)
18446             LD="${LD-ld} -m elf32_sparc"
18447             ;;
18448         esac
18449         ;;
18450       *64-bit*)
18451         case $host in
18452           x86_64-*kfreebsd*-gnu)
18453             LD="${LD-ld} -m elf_x86_64_fbsd"
18454             ;;
18455           x86_64-*linux*)
18456             LD="${LD-ld} -m elf_x86_64"
18457             ;;
18458           ppc*-*linux*|powerpc*-*linux*)
18459             LD="${LD-ld} -m elf64ppc"
18460             ;;
18461           s390*-*linux*|s390*-*tpf*)
18462             LD="${LD-ld} -m elf64_s390"
18463             ;;
18464           sparc*-*linux*)
18465             LD="${LD-ld} -m elf64_sparc"
18466             ;;
18467         esac
18468         ;;
18469     esac
18470   fi
18471   rm -rf conftest*
18472   ;;
18473
18474 *-*-sco3.2v5*)
18475   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
18476   SAVE_CFLAGS="$CFLAGS"
18477   CFLAGS="$CFLAGS -belf"
18478   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
18479 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
18480 if ${lt_cv_cc_needs_belf+:} false; then :
18481   $as_echo_n "(cached) " >&6
18482 else
18483   ac_ext=c
18484 ac_cpp='$CPP $CPPFLAGS'
18485 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18486 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18487 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18488
18489      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18490 /* end confdefs.h.  */
18491
18492 int
18493 main ()
18494 {
18495
18496   ;
18497   return 0;
18498 }
18499 _ACEOF
18500 if ac_fn_c_try_link "$LINENO"; then :
18501   lt_cv_cc_needs_belf=yes
18502 else
18503   lt_cv_cc_needs_belf=no
18504 fi
18505 rm -f core conftest.err conftest.$ac_objext \
18506     conftest$ac_exeext conftest.$ac_ext
18507      ac_ext=c
18508 ac_cpp='$CPP $CPPFLAGS'
18509 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18510 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18511 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18512
18513 fi
18514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
18515 $as_echo "$lt_cv_cc_needs_belf" >&6; }
18516   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
18517     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
18518     CFLAGS="$SAVE_CFLAGS"
18519   fi
18520   ;;
18521 sparc*-*solaris*)
18522   # Find out which ABI we are using.
18523   echo 'int i;' > conftest.$ac_ext
18524   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18525   (eval $ac_compile) 2>&5
18526   ac_status=$?
18527   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18528   test $ac_status = 0; }; then
18529     case `/usr/bin/file conftest.o` in
18530     *64-bit*)
18531       case $lt_cv_prog_gnu_ld in
18532       yes*) LD="${LD-ld} -m elf64_sparc" ;;
18533       *)
18534         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
18535           LD="${LD-ld} -64"
18536         fi
18537         ;;
18538       esac
18539       ;;
18540     esac
18541   fi
18542   rm -rf conftest*
18543   ;;
18544 esac
18545
18546 need_locks="$enable_libtool_lock"
18547
18548 if test -n "$ac_tool_prefix"; then
18549   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
18550 set dummy ${ac_tool_prefix}mt; ac_word=$2
18551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18552 $as_echo_n "checking for $ac_word... " >&6; }
18553 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
18554   $as_echo_n "(cached) " >&6
18555 else
18556   if test -n "$MANIFEST_TOOL"; then
18557   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
18558 else
18559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18560 for as_dir in $PATH
18561 do
18562   IFS=$as_save_IFS
18563   test -z "$as_dir" && as_dir=.
18564     for ac_exec_ext in '' $ac_executable_extensions; do
18565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18566     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
18567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18568     break 2
18569   fi
18570 done
18571   done
18572 IFS=$as_save_IFS
18573
18574 fi
18575 fi
18576 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
18577 if test -n "$MANIFEST_TOOL"; then
18578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
18579 $as_echo "$MANIFEST_TOOL" >&6; }
18580 else
18581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18582 $as_echo "no" >&6; }
18583 fi
18584
18585
18586 fi
18587 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
18588   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
18589   # Extract the first word of "mt", so it can be a program name with args.
18590 set dummy mt; ac_word=$2
18591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18592 $as_echo_n "checking for $ac_word... " >&6; }
18593 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
18594   $as_echo_n "(cached) " >&6
18595 else
18596   if test -n "$ac_ct_MANIFEST_TOOL"; then
18597   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
18598 else
18599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18600 for as_dir in $PATH
18601 do
18602   IFS=$as_save_IFS
18603   test -z "$as_dir" && as_dir=.
18604     for ac_exec_ext in '' $ac_executable_extensions; do
18605   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18606     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
18607     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18608     break 2
18609   fi
18610 done
18611   done
18612 IFS=$as_save_IFS
18613
18614 fi
18615 fi
18616 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
18617 if test -n "$ac_ct_MANIFEST_TOOL"; then
18618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
18619 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
18620 else
18621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18622 $as_echo "no" >&6; }
18623 fi
18624
18625   if test "x$ac_ct_MANIFEST_TOOL" = x; then
18626     MANIFEST_TOOL=":"
18627   else
18628     case $cross_compiling:$ac_tool_warned in
18629 yes:)
18630 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18631 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18632 ac_tool_warned=yes ;;
18633 esac
18634     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
18635   fi
18636 else
18637   MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
18638 fi
18639
18640 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
18641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
18642 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
18643 if ${lt_cv_path_mainfest_tool+:} false; then :
18644   $as_echo_n "(cached) " >&6
18645 else
18646   lt_cv_path_mainfest_tool=no
18647   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
18648   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
18649   cat conftest.err >&5
18650   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
18651     lt_cv_path_mainfest_tool=yes
18652   fi
18653   rm -f conftest*
18654 fi
18655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
18656 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
18657 if test "x$lt_cv_path_mainfest_tool" != xyes; then
18658   MANIFEST_TOOL=:
18659 fi
18660
18661
18662
18663
18664
18665
18666   case $host_os in
18667     rhapsody* | darwin*)
18668     if test -n "$ac_tool_prefix"; then
18669   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
18670 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
18671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18672 $as_echo_n "checking for $ac_word... " >&6; }
18673 if ${ac_cv_prog_DSYMUTIL+:} false; then :
18674   $as_echo_n "(cached) " >&6
18675 else
18676   if test -n "$DSYMUTIL"; then
18677   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
18678 else
18679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18680 for as_dir in $PATH
18681 do
18682   IFS=$as_save_IFS
18683   test -z "$as_dir" && as_dir=.
18684     for ac_exec_ext in '' $ac_executable_extensions; do
18685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18686     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
18687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18688     break 2
18689   fi
18690 done
18691   done
18692 IFS=$as_save_IFS
18693
18694 fi
18695 fi
18696 DSYMUTIL=$ac_cv_prog_DSYMUTIL
18697 if test -n "$DSYMUTIL"; then
18698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18699 $as_echo "$DSYMUTIL" >&6; }
18700 else
18701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18702 $as_echo "no" >&6; }
18703 fi
18704
18705
18706 fi
18707 if test -z "$ac_cv_prog_DSYMUTIL"; then
18708   ac_ct_DSYMUTIL=$DSYMUTIL
18709   # Extract the first word of "dsymutil", so it can be a program name with args.
18710 set dummy dsymutil; ac_word=$2
18711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18712 $as_echo_n "checking for $ac_word... " >&6; }
18713 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
18714   $as_echo_n "(cached) " >&6
18715 else
18716   if test -n "$ac_ct_DSYMUTIL"; then
18717   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
18718 else
18719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18720 for as_dir in $PATH
18721 do
18722   IFS=$as_save_IFS
18723   test -z "$as_dir" && as_dir=.
18724     for ac_exec_ext in '' $ac_executable_extensions; do
18725   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18726     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
18727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18728     break 2
18729   fi
18730 done
18731   done
18732 IFS=$as_save_IFS
18733
18734 fi
18735 fi
18736 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
18737 if test -n "$ac_ct_DSYMUTIL"; then
18738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
18739 $as_echo "$ac_ct_DSYMUTIL" >&6; }
18740 else
18741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18742 $as_echo "no" >&6; }
18743 fi
18744
18745   if test "x$ac_ct_DSYMUTIL" = x; then
18746     DSYMUTIL=":"
18747   else
18748     case $cross_compiling:$ac_tool_warned in
18749 yes:)
18750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18751 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18752 ac_tool_warned=yes ;;
18753 esac
18754     DSYMUTIL=$ac_ct_DSYMUTIL
18755   fi
18756 else
18757   DSYMUTIL="$ac_cv_prog_DSYMUTIL"
18758 fi
18759
18760     if test -n "$ac_tool_prefix"; then
18761   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
18762 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
18763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18764 $as_echo_n "checking for $ac_word... " >&6; }
18765 if ${ac_cv_prog_NMEDIT+:} false; then :
18766   $as_echo_n "(cached) " >&6
18767 else
18768   if test -n "$NMEDIT"; then
18769   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
18770 else
18771 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18772 for as_dir in $PATH
18773 do
18774   IFS=$as_save_IFS
18775   test -z "$as_dir" && as_dir=.
18776     for ac_exec_ext in '' $ac_executable_extensions; do
18777   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18778     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
18779     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18780     break 2
18781   fi
18782 done
18783   done
18784 IFS=$as_save_IFS
18785
18786 fi
18787 fi
18788 NMEDIT=$ac_cv_prog_NMEDIT
18789 if test -n "$NMEDIT"; then
18790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
18791 $as_echo "$NMEDIT" >&6; }
18792 else
18793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18794 $as_echo "no" >&6; }
18795 fi
18796
18797
18798 fi
18799 if test -z "$ac_cv_prog_NMEDIT"; then
18800   ac_ct_NMEDIT=$NMEDIT
18801   # Extract the first word of "nmedit", so it can be a program name with args.
18802 set dummy nmedit; ac_word=$2
18803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18804 $as_echo_n "checking for $ac_word... " >&6; }
18805 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
18806   $as_echo_n "(cached) " >&6
18807 else
18808   if test -n "$ac_ct_NMEDIT"; then
18809   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
18810 else
18811 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18812 for as_dir in $PATH
18813 do
18814   IFS=$as_save_IFS
18815   test -z "$as_dir" && as_dir=.
18816     for ac_exec_ext in '' $ac_executable_extensions; do
18817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18818     ac_cv_prog_ac_ct_NMEDIT="nmedit"
18819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18820     break 2
18821   fi
18822 done
18823   done
18824 IFS=$as_save_IFS
18825
18826 fi
18827 fi
18828 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
18829 if test -n "$ac_ct_NMEDIT"; then
18830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
18831 $as_echo "$ac_ct_NMEDIT" >&6; }
18832 else
18833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18834 $as_echo "no" >&6; }
18835 fi
18836
18837   if test "x$ac_ct_NMEDIT" = x; then
18838     NMEDIT=":"
18839   else
18840     case $cross_compiling:$ac_tool_warned in
18841 yes:)
18842 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18843 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18844 ac_tool_warned=yes ;;
18845 esac
18846     NMEDIT=$ac_ct_NMEDIT
18847   fi
18848 else
18849   NMEDIT="$ac_cv_prog_NMEDIT"
18850 fi
18851
18852     if test -n "$ac_tool_prefix"; then
18853   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
18854 set dummy ${ac_tool_prefix}lipo; ac_word=$2
18855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18856 $as_echo_n "checking for $ac_word... " >&6; }
18857 if ${ac_cv_prog_LIPO+:} false; then :
18858   $as_echo_n "(cached) " >&6
18859 else
18860   if test -n "$LIPO"; then
18861   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
18862 else
18863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18864 for as_dir in $PATH
18865 do
18866   IFS=$as_save_IFS
18867   test -z "$as_dir" && as_dir=.
18868     for ac_exec_ext in '' $ac_executable_extensions; do
18869   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18870     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
18871     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18872     break 2
18873   fi
18874 done
18875   done
18876 IFS=$as_save_IFS
18877
18878 fi
18879 fi
18880 LIPO=$ac_cv_prog_LIPO
18881 if test -n "$LIPO"; then
18882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
18883 $as_echo "$LIPO" >&6; }
18884 else
18885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18886 $as_echo "no" >&6; }
18887 fi
18888
18889
18890 fi
18891 if test -z "$ac_cv_prog_LIPO"; then
18892   ac_ct_LIPO=$LIPO
18893   # Extract the first word of "lipo", so it can be a program name with args.
18894 set dummy lipo; ac_word=$2
18895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18896 $as_echo_n "checking for $ac_word... " >&6; }
18897 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
18898   $as_echo_n "(cached) " >&6
18899 else
18900   if test -n "$ac_ct_LIPO"; then
18901   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
18902 else
18903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18904 for as_dir in $PATH
18905 do
18906   IFS=$as_save_IFS
18907   test -z "$as_dir" && as_dir=.
18908     for ac_exec_ext in '' $ac_executable_extensions; do
18909   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18910     ac_cv_prog_ac_ct_LIPO="lipo"
18911     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18912     break 2
18913   fi
18914 done
18915   done
18916 IFS=$as_save_IFS
18917
18918 fi
18919 fi
18920 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
18921 if test -n "$ac_ct_LIPO"; then
18922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
18923 $as_echo "$ac_ct_LIPO" >&6; }
18924 else
18925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18926 $as_echo "no" >&6; }
18927 fi
18928
18929   if test "x$ac_ct_LIPO" = x; then
18930     LIPO=":"
18931   else
18932     case $cross_compiling:$ac_tool_warned in
18933 yes:)
18934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18935 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18936 ac_tool_warned=yes ;;
18937 esac
18938     LIPO=$ac_ct_LIPO
18939   fi
18940 else
18941   LIPO="$ac_cv_prog_LIPO"
18942 fi
18943
18944     if test -n "$ac_tool_prefix"; then
18945   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
18946 set dummy ${ac_tool_prefix}otool; ac_word=$2
18947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18948 $as_echo_n "checking for $ac_word... " >&6; }
18949 if ${ac_cv_prog_OTOOL+:} false; then :
18950   $as_echo_n "(cached) " >&6
18951 else
18952   if test -n "$OTOOL"; then
18953   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
18954 else
18955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18956 for as_dir in $PATH
18957 do
18958   IFS=$as_save_IFS
18959   test -z "$as_dir" && as_dir=.
18960     for ac_exec_ext in '' $ac_executable_extensions; do
18961   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18962     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
18963     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18964     break 2
18965   fi
18966 done
18967   done
18968 IFS=$as_save_IFS
18969
18970 fi
18971 fi
18972 OTOOL=$ac_cv_prog_OTOOL
18973 if test -n "$OTOOL"; then
18974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18975 $as_echo "$OTOOL" >&6; }
18976 else
18977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18978 $as_echo "no" >&6; }
18979 fi
18980
18981
18982 fi
18983 if test -z "$ac_cv_prog_OTOOL"; then
18984   ac_ct_OTOOL=$OTOOL
18985   # Extract the first word of "otool", so it can be a program name with args.
18986 set dummy otool; ac_word=$2
18987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18988 $as_echo_n "checking for $ac_word... " >&6; }
18989 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
18990   $as_echo_n "(cached) " >&6
18991 else
18992   if test -n "$ac_ct_OTOOL"; then
18993   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
18994 else
18995 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18996 for as_dir in $PATH
18997 do
18998   IFS=$as_save_IFS
18999   test -z "$as_dir" && as_dir=.
19000     for ac_exec_ext in '' $ac_executable_extensions; do
19001   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19002     ac_cv_prog_ac_ct_OTOOL="otool"
19003     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19004     break 2
19005   fi
19006 done
19007   done
19008 IFS=$as_save_IFS
19009
19010 fi
19011 fi
19012 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
19013 if test -n "$ac_ct_OTOOL"; then
19014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
19015 $as_echo "$ac_ct_OTOOL" >&6; }
19016 else
19017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19018 $as_echo "no" >&6; }
19019 fi
19020
19021   if test "x$ac_ct_OTOOL" = x; then
19022     OTOOL=":"
19023   else
19024     case $cross_compiling:$ac_tool_warned in
19025 yes:)
19026 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19027 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19028 ac_tool_warned=yes ;;
19029 esac
19030     OTOOL=$ac_ct_OTOOL
19031   fi
19032 else
19033   OTOOL="$ac_cv_prog_OTOOL"
19034 fi
19035
19036     if test -n "$ac_tool_prefix"; then
19037   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
19038 set dummy ${ac_tool_prefix}otool64; ac_word=$2
19039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19040 $as_echo_n "checking for $ac_word... " >&6; }
19041 if ${ac_cv_prog_OTOOL64+:} false; then :
19042   $as_echo_n "(cached) " >&6
19043 else
19044   if test -n "$OTOOL64"; then
19045   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
19046 else
19047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19048 for as_dir in $PATH
19049 do
19050   IFS=$as_save_IFS
19051   test -z "$as_dir" && as_dir=.
19052     for ac_exec_ext in '' $ac_executable_extensions; do
19053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19054     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
19055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19056     break 2
19057   fi
19058 done
19059   done
19060 IFS=$as_save_IFS
19061
19062 fi
19063 fi
19064 OTOOL64=$ac_cv_prog_OTOOL64
19065 if test -n "$OTOOL64"; then
19066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
19067 $as_echo "$OTOOL64" >&6; }
19068 else
19069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19070 $as_echo "no" >&6; }
19071 fi
19072
19073
19074 fi
19075 if test -z "$ac_cv_prog_OTOOL64"; then
19076   ac_ct_OTOOL64=$OTOOL64
19077   # Extract the first word of "otool64", so it can be a program name with args.
19078 set dummy otool64; ac_word=$2
19079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19080 $as_echo_n "checking for $ac_word... " >&6; }
19081 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
19082   $as_echo_n "(cached) " >&6
19083 else
19084   if test -n "$ac_ct_OTOOL64"; then
19085   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
19086 else
19087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19088 for as_dir in $PATH
19089 do
19090   IFS=$as_save_IFS
19091   test -z "$as_dir" && as_dir=.
19092     for ac_exec_ext in '' $ac_executable_extensions; do
19093   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19094     ac_cv_prog_ac_ct_OTOOL64="otool64"
19095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19096     break 2
19097   fi
19098 done
19099   done
19100 IFS=$as_save_IFS
19101
19102 fi
19103 fi
19104 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
19105 if test -n "$ac_ct_OTOOL64"; then
19106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
19107 $as_echo "$ac_ct_OTOOL64" >&6; }
19108 else
19109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19110 $as_echo "no" >&6; }
19111 fi
19112
19113   if test "x$ac_ct_OTOOL64" = x; then
19114     OTOOL64=":"
19115   else
19116     case $cross_compiling:$ac_tool_warned in
19117 yes:)
19118 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19119 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19120 ac_tool_warned=yes ;;
19121 esac
19122     OTOOL64=$ac_ct_OTOOL64
19123   fi
19124 else
19125   OTOOL64="$ac_cv_prog_OTOOL64"
19126 fi
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
19152
19153
19154     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
19155 $as_echo_n "checking for -single_module linker flag... " >&6; }
19156 if ${lt_cv_apple_cc_single_mod+:} false; then :
19157   $as_echo_n "(cached) " >&6
19158 else
19159   lt_cv_apple_cc_single_mod=no
19160       if test -z "${LT_MULTI_MODULE}"; then
19161         # By default we will add the -single_module flag. You can override
19162         # by either setting the environment variable LT_MULTI_MODULE
19163         # non-empty at configure time, or by adding -multi_module to the
19164         # link flags.
19165         rm -rf libconftest.dylib*
19166         echo "int foo(void){return 1;}" > conftest.c
19167         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
19168 -dynamiclib -Wl,-single_module conftest.c" >&5
19169         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
19170           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
19171         _lt_result=$?
19172         if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
19173           lt_cv_apple_cc_single_mod=yes
19174         else
19175           cat conftest.err >&5
19176         fi
19177         rm -rf libconftest.dylib*
19178         rm -f conftest.*
19179       fi
19180 fi
19181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
19182 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
19183     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
19184 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
19185 if ${lt_cv_ld_exported_symbols_list+:} false; then :
19186   $as_echo_n "(cached) " >&6
19187 else
19188   lt_cv_ld_exported_symbols_list=no
19189       save_LDFLAGS=$LDFLAGS
19190       echo "_main" > conftest.sym
19191       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
19192       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19193 /* end confdefs.h.  */
19194
19195 int
19196 main ()
19197 {
19198
19199   ;
19200   return 0;
19201 }
19202 _ACEOF
19203 if ac_fn_c_try_link "$LINENO"; then :
19204   lt_cv_ld_exported_symbols_list=yes
19205 else
19206   lt_cv_ld_exported_symbols_list=no
19207 fi
19208 rm -f core conftest.err conftest.$ac_objext \
19209     conftest$ac_exeext conftest.$ac_ext
19210         LDFLAGS="$save_LDFLAGS"
19211
19212 fi
19213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
19214 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
19215     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
19216 $as_echo_n "checking for -force_load linker flag... " >&6; }
19217 if ${lt_cv_ld_force_load+:} false; then :
19218   $as_echo_n "(cached) " >&6
19219 else
19220   lt_cv_ld_force_load=no
19221       cat > conftest.c << _LT_EOF
19222 int forced_loaded() { return 2;}
19223 _LT_EOF
19224       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
19225       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
19226       echo "$AR cru libconftest.a conftest.o" >&5
19227       $AR cru libconftest.a conftest.o 2>&5
19228       echo "$RANLIB libconftest.a" >&5
19229       $RANLIB libconftest.a 2>&5
19230       cat > conftest.c << _LT_EOF
19231 int main() { return 0;}
19232 _LT_EOF
19233       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
19234       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
19235       _lt_result=$?
19236       if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
19237         lt_cv_ld_force_load=yes
19238       else
19239         cat conftest.err >&5
19240       fi
19241         rm -f conftest.err libconftest.a conftest conftest.c
19242         rm -rf conftest.dSYM
19243
19244 fi
19245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
19246 $as_echo "$lt_cv_ld_force_load" >&6; }
19247     case $host_os in
19248     rhapsody* | darwin1.[012])
19249       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
19250     darwin1.*)
19251       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
19252     darwin*) # darwin 5.x on
19253       # if running on 10.5 or later, the deployment target defaults
19254       # to the OS version, if on x86, and 10.4, the deployment
19255       # target defaults to 10.4. Don't you love it?
19256       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
19257         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
19258           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
19259         10.[012]*)
19260           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
19261         10.*)
19262           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
19263       esac
19264     ;;
19265   esac
19266     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
19267       _lt_dar_single_mod='$single_module'
19268     fi
19269     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
19270       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
19271     else
19272       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
19273     fi
19274     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
19275       _lt_dsymutil='~$DSYMUTIL $lib || :'
19276     else
19277       _lt_dsymutil=
19278     fi
19279     ;;
19280   esac
19281
19282 for ac_header in dlfcn.h
19283 do :
19284   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
19285 "
19286 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
19287   cat >>confdefs.h <<_ACEOF
19288 #define HAVE_DLFCN_H 1
19289 _ACEOF
19290
19291 fi
19292
19293 done
19294
19295
19296
19297
19298
19299 # Set options
19300
19301
19302
19303         enable_dlopen=no
19304
19305
19306   enable_win32_dll=no
19307
19308
19309
19310   # Check whether --enable-static was given.
19311 if test "${enable_static+set}" = set; then :
19312   enableval=$enable_static; p=${PACKAGE-default}
19313     case $enableval in
19314     yes) enable_static=yes ;;
19315     no) enable_static=no ;;
19316     *)
19317      enable_static=no
19318       # Look at the argument we got.  We use all the common list separators.
19319       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
19320       for pkg in $enableval; do
19321         IFS="$lt_save_ifs"
19322         if test "X$pkg" = "X$p"; then
19323           enable_static=yes
19324         fi
19325       done
19326       IFS="$lt_save_ifs"
19327       ;;
19328     esac
19329 else
19330   enable_static=yes
19331 fi
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342 # Check whether --with-pic was given.
19343 if test "${with_pic+set}" = set; then :
19344   withval=$with_pic; pic_mode="$withval"
19345 else
19346   pic_mode=default
19347 fi
19348
19349
19350 test -z "$pic_mode" && pic_mode=default
19351
19352
19353
19354
19355
19356
19357
19358   # Check whether --enable-fast-install was given.
19359 if test "${enable_fast_install+set}" = set; then :
19360   enableval=$enable_fast_install; p=${PACKAGE-default}
19361     case $enableval in
19362     yes) enable_fast_install=yes ;;
19363     no) enable_fast_install=no ;;
19364     *)
19365       enable_fast_install=no
19366       # Look at the argument we got.  We use all the common list separators.
19367       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
19368       for pkg in $enableval; do
19369         IFS="$lt_save_ifs"
19370         if test "X$pkg" = "X$p"; then
19371           enable_fast_install=yes
19372         fi
19373       done
19374       IFS="$lt_save_ifs"
19375       ;;
19376     esac
19377 else
19378   enable_fast_install=yes
19379 fi
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391 # This can be used to rebuild libtool when needed
19392 LIBTOOL_DEPS="$ltmain"
19393
19394 # Always use our own libtool.
19395 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422 test -z "$LN_S" && LN_S="ln -s"
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437 if test -n "${ZSH_VERSION+set}" ; then
19438    setopt NO_GLOB_SUBST
19439 fi
19440
19441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
19442 $as_echo_n "checking for objdir... " >&6; }
19443 if ${lt_cv_objdir+:} false; then :
19444   $as_echo_n "(cached) " >&6
19445 else
19446   rm -f .libs 2>/dev/null
19447 mkdir .libs 2>/dev/null
19448 if test -d .libs; then
19449   lt_cv_objdir=.libs
19450 else
19451   # MS-DOS does not allow filenames that begin with a dot.
19452   lt_cv_objdir=_libs
19453 fi
19454 rmdir .libs 2>/dev/null
19455 fi
19456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
19457 $as_echo "$lt_cv_objdir" >&6; }
19458 objdir=$lt_cv_objdir
19459
19460
19461
19462
19463
19464 cat >>confdefs.h <<_ACEOF
19465 #define LT_OBJDIR "$lt_cv_objdir/"
19466 _ACEOF
19467
19468
19469
19470
19471 case $host_os in
19472 aix3*)
19473   # AIX sometimes has problems with the GCC collect2 program.  For some
19474   # reason, if we set the COLLECT_NAMES environment variable, the problems
19475   # vanish in a puff of smoke.
19476   if test "X${COLLECT_NAMES+set}" != Xset; then
19477     COLLECT_NAMES=
19478     export COLLECT_NAMES
19479   fi
19480   ;;
19481 esac
19482
19483 # Global variables:
19484 ofile=libtool
19485 can_build_shared=yes
19486
19487 # All known linkers require a `.a' archive for static linking (except MSVC,
19488 # which needs '.lib').
19489 libext=a
19490
19491 with_gnu_ld="$lt_cv_prog_gnu_ld"
19492
19493 old_CC="$CC"
19494 old_CFLAGS="$CFLAGS"
19495
19496 # Set sane defaults for various variables
19497 test -z "$CC" && CC=cc
19498 test -z "$LTCC" && LTCC=$CC
19499 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
19500 test -z "$LD" && LD=ld
19501 test -z "$ac_objext" && ac_objext=o
19502
19503 for cc_temp in $compiler""; do
19504   case $cc_temp in
19505     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
19506     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
19507     \-*) ;;
19508     *) break;;
19509   esac
19510 done
19511 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
19512
19513
19514 # Only perform the check for file, if the check method requires it
19515 test -z "$MAGIC_CMD" && MAGIC_CMD=file
19516 case $deplibs_check_method in
19517 file_magic*)
19518   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
19519     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
19520 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
19521 if ${lt_cv_path_MAGIC_CMD+:} false; then :
19522   $as_echo_n "(cached) " >&6
19523 else
19524   case $MAGIC_CMD in
19525 [\\/*] |  ?:[\\/]*)
19526   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
19527   ;;
19528 *)
19529   lt_save_MAGIC_CMD="$MAGIC_CMD"
19530   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
19531   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
19532   for ac_dir in $ac_dummy; do
19533     IFS="$lt_save_ifs"
19534     test -z "$ac_dir" && ac_dir=.
19535     if test -f $ac_dir/${ac_tool_prefix}file; then
19536       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
19537       if test -n "$file_magic_test_file"; then
19538         case $deplibs_check_method in
19539         "file_magic "*)
19540           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
19541           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19542           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
19543             $EGREP "$file_magic_regex" > /dev/null; then
19544             :
19545           else
19546             cat <<_LT_EOF 1>&2
19547
19548 *** Warning: the command libtool uses to detect shared libraries,
19549 *** $file_magic_cmd, produces output that libtool cannot recognize.
19550 *** The result is that libtool may fail to recognize shared libraries
19551 *** as such.  This will affect the creation of libtool libraries that
19552 *** depend on shared libraries, but programs linked with such libtool
19553 *** libraries will work regardless of this problem.  Nevertheless, you
19554 *** may want to report the problem to your system manager and/or to
19555 *** bug-libtool@gnu.org
19556
19557 _LT_EOF
19558           fi ;;
19559         esac
19560       fi
19561       break
19562     fi
19563   done
19564   IFS="$lt_save_ifs"
19565   MAGIC_CMD="$lt_save_MAGIC_CMD"
19566   ;;
19567 esac
19568 fi
19569
19570 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19571 if test -n "$MAGIC_CMD"; then
19572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
19573 $as_echo "$MAGIC_CMD" >&6; }
19574 else
19575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19576 $as_echo "no" >&6; }
19577 fi
19578
19579
19580
19581
19582
19583 if test -z "$lt_cv_path_MAGIC_CMD"; then
19584   if test -n "$ac_tool_prefix"; then
19585     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
19586 $as_echo_n "checking for file... " >&6; }
19587 if ${lt_cv_path_MAGIC_CMD+:} false; then :
19588   $as_echo_n "(cached) " >&6
19589 else
19590   case $MAGIC_CMD in
19591 [\\/*] |  ?:[\\/]*)
19592   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
19593   ;;
19594 *)
19595   lt_save_MAGIC_CMD="$MAGIC_CMD"
19596   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
19597   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
19598   for ac_dir in $ac_dummy; do
19599     IFS="$lt_save_ifs"
19600     test -z "$ac_dir" && ac_dir=.
19601     if test -f $ac_dir/file; then
19602       lt_cv_path_MAGIC_CMD="$ac_dir/file"
19603       if test -n "$file_magic_test_file"; then
19604         case $deplibs_check_method in
19605         "file_magic "*)
19606           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
19607           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19608           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
19609             $EGREP "$file_magic_regex" > /dev/null; then
19610             :
19611           else
19612             cat <<_LT_EOF 1>&2
19613
19614 *** Warning: the command libtool uses to detect shared libraries,
19615 *** $file_magic_cmd, produces output that libtool cannot recognize.
19616 *** The result is that libtool may fail to recognize shared libraries
19617 *** as such.  This will affect the creation of libtool libraries that
19618 *** depend on shared libraries, but programs linked with such libtool
19619 *** libraries will work regardless of this problem.  Nevertheless, you
19620 *** may want to report the problem to your system manager and/or to
19621 *** bug-libtool@gnu.org
19622
19623 _LT_EOF
19624           fi ;;
19625         esac
19626       fi
19627       break
19628     fi
19629   done
19630   IFS="$lt_save_ifs"
19631   MAGIC_CMD="$lt_save_MAGIC_CMD"
19632   ;;
19633 esac
19634 fi
19635
19636 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19637 if test -n "$MAGIC_CMD"; then
19638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
19639 $as_echo "$MAGIC_CMD" >&6; }
19640 else
19641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19642 $as_echo "no" >&6; }
19643 fi
19644
19645
19646   else
19647     MAGIC_CMD=:
19648   fi
19649 fi
19650
19651   fi
19652   ;;
19653 esac
19654
19655 # Use C for the default configuration in the libtool script
19656
19657 lt_save_CC="$CC"
19658 ac_ext=c
19659 ac_cpp='$CPP $CPPFLAGS'
19660 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19661 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19662 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19663
19664
19665 # Source file extension for C test sources.
19666 ac_ext=c
19667
19668 # Object file extension for compiled C test sources.
19669 objext=o
19670 objext=$objext
19671
19672 # Code to be used in simple compile tests
19673 lt_simple_compile_test_code="int some_variable = 0;"
19674
19675 # Code to be used in simple link tests
19676 lt_simple_link_test_code='int main(){return(0);}'
19677
19678
19679
19680
19681
19682
19683
19684 # If no C compiler was specified, use CC.
19685 LTCC=${LTCC-"$CC"}
19686
19687 # If no C compiler flags were specified, use CFLAGS.
19688 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
19689
19690 # Allow CC to be a program name with arguments.
19691 compiler=$CC
19692
19693 # Save the default compiler, since it gets overwritten when the other
19694 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
19695 compiler_DEFAULT=$CC
19696
19697 # save warnings/boilerplate of simple test code
19698 ac_outfile=conftest.$ac_objext
19699 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
19700 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19701 _lt_compiler_boilerplate=`cat conftest.err`
19702 $RM conftest*
19703
19704 ac_outfile=conftest.$ac_objext
19705 echo "$lt_simple_link_test_code" >conftest.$ac_ext
19706 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19707 _lt_linker_boilerplate=`cat conftest.err`
19708 $RM -r conftest*
19709
19710
19711 ## CAVEAT EMPTOR:
19712 ## There is no encapsulation within the following macros, do not change
19713 ## the running order or otherwise move them around unless you know exactly
19714 ## what you are doing...
19715 if test -n "$compiler"; then
19716
19717 lt_prog_compiler_no_builtin_flag=
19718
19719 if test "$GCC" = yes; then
19720   case $cc_basename in
19721   nvcc*)
19722     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
19723   *)
19724     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
19725   esac
19726
19727   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
19728 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
19729 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
19730   $as_echo_n "(cached) " >&6
19731 else
19732   lt_cv_prog_compiler_rtti_exceptions=no
19733    ac_outfile=conftest.$ac_objext
19734    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19735    lt_compiler_flag="-fno-rtti -fno-exceptions"
19736    # Insert the option either (1) after the last *FLAGS variable, or
19737    # (2) before a word containing "conftest.", or (3) at the end.
19738    # Note that $ac_compile itself does not contain backslashes and begins
19739    # with a dollar sign (not a hyphen), so the echo should work correctly.
19740    # The option is referenced via a variable to avoid confusing sed.
19741    lt_compile=`echo "$ac_compile" | $SED \
19742    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19743    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19744    -e 's:$: $lt_compiler_flag:'`
19745    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19746    (eval "$lt_compile" 2>conftest.err)
19747    ac_status=$?
19748    cat conftest.err >&5
19749    echo "$as_me:$LINENO: \$? = $ac_status" >&5
19750    if (exit $ac_status) && test -s "$ac_outfile"; then
19751      # The compiler can only warn and ignore the option if not recognized
19752      # So say no if there are warnings other than the usual output.
19753      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
19754      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19755      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
19756        lt_cv_prog_compiler_rtti_exceptions=yes
19757      fi
19758    fi
19759    $RM conftest*
19760
19761 fi
19762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
19763 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
19764
19765 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
19766     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
19767 else
19768     :
19769 fi
19770
19771 fi
19772
19773
19774
19775
19776
19777
19778   lt_prog_compiler_wl=
19779 lt_prog_compiler_pic=
19780 lt_prog_compiler_static=
19781
19782
19783   if test "$GCC" = yes; then
19784     lt_prog_compiler_wl='-Wl,'
19785     lt_prog_compiler_static='-static'
19786
19787     case $host_os in
19788       aix*)
19789       # All AIX code is PIC.
19790       if test "$host_cpu" = ia64; then
19791         # AIX 5 now supports IA64 processor
19792         lt_prog_compiler_static='-Bstatic'
19793       fi
19794       ;;
19795
19796     amigaos*)
19797       case $host_cpu in
19798       powerpc)
19799             # see comment about AmigaOS4 .so support
19800             lt_prog_compiler_pic='-fPIC'
19801         ;;
19802       m68k)
19803             # FIXME: we need at least 68020 code to build shared libraries, but
19804             # adding the `-m68020' flag to GCC prevents building anything better,
19805             # like `-m68040'.
19806             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
19807         ;;
19808       esac
19809       ;;
19810
19811     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
19812       # PIC is the default for these OSes.
19813       ;;
19814
19815     mingw* | cygwin* | pw32* | os2* | cegcc*)
19816       # This hack is so that the source file can tell whether it is being
19817       # built for inclusion in a dll (and should export symbols for example).
19818       # Although the cygwin gcc ignores -fPIC, still need this for old-style
19819       # (--disable-auto-import) libraries
19820       lt_prog_compiler_pic='-DDLL_EXPORT'
19821       ;;
19822
19823     darwin* | rhapsody*)
19824       # PIC is the default on this platform
19825       # Common symbols not allowed in MH_DYLIB files
19826       lt_prog_compiler_pic='-fno-common'
19827       ;;
19828
19829     haiku*)
19830       # PIC is the default for Haiku.
19831       # The "-static" flag exists, but is broken.
19832       lt_prog_compiler_static=
19833       ;;
19834
19835     hpux*)
19836       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
19837       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
19838       # sets the default TLS model and affects inlining.
19839       case $host_cpu in
19840       hppa*64*)
19841         # +Z the default
19842         ;;
19843       *)
19844         lt_prog_compiler_pic='-fPIC'
19845         ;;
19846       esac
19847       ;;
19848
19849     interix[3-9]*)
19850       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
19851       # Instead, we relocate shared libraries at runtime.
19852       ;;
19853
19854     msdosdjgpp*)
19855       # Just because we use GCC doesn't mean we suddenly get shared libraries
19856       # on systems that don't support them.
19857       lt_prog_compiler_can_build_shared=no
19858       enable_shared=no
19859       ;;
19860
19861     *nto* | *qnx*)
19862       # QNX uses GNU C++, but need to define -shared option too, otherwise
19863       # it will coredump.
19864       lt_prog_compiler_pic='-fPIC -shared'
19865       ;;
19866
19867     sysv4*MP*)
19868       if test -d /usr/nec; then
19869         lt_prog_compiler_pic=-Kconform_pic
19870       fi
19871       ;;
19872
19873     *)
19874       lt_prog_compiler_pic='-fPIC'
19875       ;;
19876     esac
19877
19878     case $cc_basename in
19879     nvcc*) # Cuda Compiler Driver 2.2
19880       lt_prog_compiler_wl='-Xlinker '
19881       lt_prog_compiler_pic='-Xcompiler -fPIC'
19882       ;;
19883     esac
19884   else
19885     # PORTME Check for flag to pass linker flags through the system compiler.
19886     case $host_os in
19887     aix*)
19888       lt_prog_compiler_wl='-Wl,'
19889       if test "$host_cpu" = ia64; then
19890         # AIX 5 now supports IA64 processor
19891         lt_prog_compiler_static='-Bstatic'
19892       else
19893         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
19894       fi
19895       ;;
19896
19897     mingw* | cygwin* | pw32* | os2* | cegcc*)
19898       # This hack is so that the source file can tell whether it is being
19899       # built for inclusion in a dll (and should export symbols for example).
19900       lt_prog_compiler_pic='-DDLL_EXPORT'
19901       ;;
19902
19903     hpux9* | hpux10* | hpux11*)
19904       lt_prog_compiler_wl='-Wl,'
19905       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
19906       # not for PA HP-UX.
19907       case $host_cpu in
19908       hppa*64*|ia64*)
19909         # +Z the default
19910         ;;
19911       *)
19912         lt_prog_compiler_pic='+Z'
19913         ;;
19914       esac
19915       # Is there a better lt_prog_compiler_static that works with the bundled CC?
19916       lt_prog_compiler_static='${wl}-a ${wl}archive'
19917       ;;
19918
19919     irix5* | irix6* | nonstopux*)
19920       lt_prog_compiler_wl='-Wl,'
19921       # PIC (with -KPIC) is the default.
19922       lt_prog_compiler_static='-non_shared'
19923       ;;
19924
19925     linux* | k*bsd*-gnu | kopensolaris*-gnu)
19926       case $cc_basename in
19927       # old Intel for x86_64 which still supported -KPIC.
19928       ecc*)
19929         lt_prog_compiler_wl='-Wl,'
19930         lt_prog_compiler_pic='-KPIC'
19931         lt_prog_compiler_static='-static'
19932         ;;
19933       # icc used to be incompatible with GCC.
19934       # ICC 10 doesn't accept -KPIC any more.
19935       icc* | ifort*)
19936         lt_prog_compiler_wl='-Wl,'
19937         lt_prog_compiler_pic='-fPIC'
19938         lt_prog_compiler_static='-static'
19939         ;;
19940       # Lahey Fortran 8.1.
19941       lf95*)
19942         lt_prog_compiler_wl='-Wl,'
19943         lt_prog_compiler_pic='--shared'
19944         lt_prog_compiler_static='--static'
19945         ;;
19946       nagfor*)
19947         # NAG Fortran compiler
19948         lt_prog_compiler_wl='-Wl,-Wl,,'
19949         lt_prog_compiler_pic='-PIC'
19950         lt_prog_compiler_static='-Bstatic'
19951         ;;
19952       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
19953         # Portland Group compilers (*not* the Pentium gcc compiler,
19954         # which looks to be a dead project)
19955         lt_prog_compiler_wl='-Wl,'
19956         lt_prog_compiler_pic='-fpic'
19957         lt_prog_compiler_static='-Bstatic'
19958         ;;
19959       ccc*)
19960         lt_prog_compiler_wl='-Wl,'
19961         # All Alpha code is PIC.
19962         lt_prog_compiler_static='-non_shared'
19963         ;;
19964       xl* | bgxl* | bgf* | mpixl*)
19965         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
19966         lt_prog_compiler_wl='-Wl,'
19967         lt_prog_compiler_pic='-qpic'
19968         lt_prog_compiler_static='-qstaticlink'
19969         ;;
19970       *)
19971         case `$CC -V 2>&1 | sed 5q` in
19972         *Sun\ F* | *Sun*Fortran*)
19973           # Sun Fortran 8.3 passes all unrecognized flags to the linker
19974           lt_prog_compiler_pic='-KPIC'
19975           lt_prog_compiler_static='-Bstatic'
19976           lt_prog_compiler_wl=''
19977           ;;
19978         *Sun\ C*)
19979           # Sun C 5.9
19980           lt_prog_compiler_pic='-KPIC'
19981           lt_prog_compiler_static='-Bstatic'
19982           lt_prog_compiler_wl='-Wl,'
19983           ;;
19984         esac
19985         ;;
19986       esac
19987       ;;
19988
19989     newsos6)
19990       lt_prog_compiler_pic='-KPIC'
19991       lt_prog_compiler_static='-Bstatic'
19992       ;;
19993
19994     *nto* | *qnx*)
19995       # QNX uses GNU C++, but need to define -shared option too, otherwise
19996       # it will coredump.
19997       lt_prog_compiler_pic='-fPIC -shared'
19998       ;;
19999
20000     osf3* | osf4* | osf5*)
20001       lt_prog_compiler_wl='-Wl,'
20002       # All OSF/1 code is PIC.
20003       lt_prog_compiler_static='-non_shared'
20004       ;;
20005
20006     rdos*)
20007       lt_prog_compiler_static='-non_shared'
20008       ;;
20009
20010     solaris*)
20011       lt_prog_compiler_pic='-KPIC'
20012       lt_prog_compiler_static='-Bstatic'
20013       case $cc_basename in
20014       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
20015         lt_prog_compiler_wl='-Qoption ld ';;
20016       *)
20017         lt_prog_compiler_wl='-Wl,';;
20018       esac
20019       ;;
20020
20021     sunos4*)
20022       lt_prog_compiler_wl='-Qoption ld '
20023       lt_prog_compiler_pic='-PIC'
20024       lt_prog_compiler_static='-Bstatic'
20025       ;;
20026
20027     sysv4 | sysv4.2uw2* | sysv4.3*)
20028       lt_prog_compiler_wl='-Wl,'
20029       lt_prog_compiler_pic='-KPIC'
20030       lt_prog_compiler_static='-Bstatic'
20031       ;;
20032
20033     sysv4*MP*)
20034       if test -d /usr/nec ;then
20035         lt_prog_compiler_pic='-Kconform_pic'
20036         lt_prog_compiler_static='-Bstatic'
20037       fi
20038       ;;
20039
20040     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
20041       lt_prog_compiler_wl='-Wl,'
20042       lt_prog_compiler_pic='-KPIC'
20043       lt_prog_compiler_static='-Bstatic'
20044       ;;
20045
20046     unicos*)
20047       lt_prog_compiler_wl='-Wl,'
20048       lt_prog_compiler_can_build_shared=no
20049       ;;
20050
20051     uts4*)
20052       lt_prog_compiler_pic='-pic'
20053       lt_prog_compiler_static='-Bstatic'
20054       ;;
20055
20056     *)
20057       lt_prog_compiler_can_build_shared=no
20058       ;;
20059     esac
20060   fi
20061
20062 case $host_os in
20063   # For platforms which do not support PIC, -DPIC is meaningless:
20064   *djgpp*)
20065     lt_prog_compiler_pic=
20066     ;;
20067   *)
20068     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
20069     ;;
20070 esac
20071
20072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
20073 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
20074 if ${lt_cv_prog_compiler_pic+:} false; then :
20075   $as_echo_n "(cached) " >&6
20076 else
20077   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
20078 fi
20079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
20080 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
20081 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
20082
20083 #
20084 # Check to make sure the PIC flag actually works.
20085 #
20086 if test -n "$lt_prog_compiler_pic"; then
20087   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
20088 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
20089 if ${lt_cv_prog_compiler_pic_works+:} false; then :
20090   $as_echo_n "(cached) " >&6
20091 else
20092   lt_cv_prog_compiler_pic_works=no
20093    ac_outfile=conftest.$ac_objext
20094    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20095    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
20096    # Insert the option either (1) after the last *FLAGS variable, or
20097    # (2) before a word containing "conftest.", or (3) at the end.
20098    # Note that $ac_compile itself does not contain backslashes and begins
20099    # with a dollar sign (not a hyphen), so the echo should work correctly.
20100    # The option is referenced via a variable to avoid confusing sed.
20101    lt_compile=`echo "$ac_compile" | $SED \
20102    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20103    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
20104    -e 's:$: $lt_compiler_flag:'`
20105    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
20106    (eval "$lt_compile" 2>conftest.err)
20107    ac_status=$?
20108    cat conftest.err >&5
20109    echo "$as_me:$LINENO: \$? = $ac_status" >&5
20110    if (exit $ac_status) && test -s "$ac_outfile"; then
20111      # The compiler can only warn and ignore the option if not recognized
20112      # So say no if there are warnings other than the usual output.
20113      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
20114      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
20115      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
20116        lt_cv_prog_compiler_pic_works=yes
20117      fi
20118    fi
20119    $RM conftest*
20120
20121 fi
20122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
20123 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
20124
20125 if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
20126     case $lt_prog_compiler_pic in
20127      "" | " "*) ;;
20128      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
20129      esac
20130 else
20131     lt_prog_compiler_pic=
20132      lt_prog_compiler_can_build_shared=no
20133 fi
20134
20135 fi
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147 #
20148 # Check to make sure the static flag actually works.
20149 #
20150 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
20151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
20152 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
20153 if ${lt_cv_prog_compiler_static_works+:} false; then :
20154   $as_echo_n "(cached) " >&6
20155 else
20156   lt_cv_prog_compiler_static_works=no
20157    save_LDFLAGS="$LDFLAGS"
20158    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
20159    echo "$lt_simple_link_test_code" > conftest.$ac_ext
20160    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
20161      # The linker can only warn and ignore the option if not recognized
20162      # So say no if there are warnings
20163      if test -s conftest.err; then
20164        # Append any errors to the config.log.
20165        cat conftest.err 1>&5
20166        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
20167        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
20168        if diff conftest.exp conftest.er2 >/dev/null; then
20169          lt_cv_prog_compiler_static_works=yes
20170        fi
20171      else
20172        lt_cv_prog_compiler_static_works=yes
20173      fi
20174    fi
20175    $RM -r conftest*
20176    LDFLAGS="$save_LDFLAGS"
20177
20178 fi
20179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
20180 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
20181
20182 if test x"$lt_cv_prog_compiler_static_works" = xyes; then
20183     :
20184 else
20185     lt_prog_compiler_static=
20186 fi
20187
20188
20189
20190
20191
20192
20193
20194   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
20195 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
20196 if ${lt_cv_prog_compiler_c_o+:} false; then :
20197   $as_echo_n "(cached) " >&6
20198 else
20199   lt_cv_prog_compiler_c_o=no
20200    $RM -r conftest 2>/dev/null
20201    mkdir conftest
20202    cd conftest
20203    mkdir out
20204    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20205
20206    lt_compiler_flag="-o out/conftest2.$ac_objext"
20207    # Insert the option either (1) after the last *FLAGS variable, or
20208    # (2) before a word containing "conftest.", or (3) at the end.
20209    # Note that $ac_compile itself does not contain backslashes and begins
20210    # with a dollar sign (not a hyphen), so the echo should work correctly.
20211    lt_compile=`echo "$ac_compile" | $SED \
20212    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20213    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
20214    -e 's:$: $lt_compiler_flag:'`
20215    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
20216    (eval "$lt_compile" 2>out/conftest.err)
20217    ac_status=$?
20218    cat out/conftest.err >&5
20219    echo "$as_me:$LINENO: \$? = $ac_status" >&5
20220    if (exit $ac_status) && test -s out/conftest2.$ac_objext
20221    then
20222      # The compiler can only warn and ignore the option if not recognized
20223      # So say no if there are warnings
20224      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
20225      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
20226      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
20227        lt_cv_prog_compiler_c_o=yes
20228      fi
20229    fi
20230    chmod u+w . 2>&5
20231    $RM conftest*
20232    # SGI C++ compiler will create directory out/ii_files/ for
20233    # template instantiation
20234    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
20235    $RM out/* && rmdir out
20236    cd ..
20237    $RM -r conftest
20238    $RM conftest*
20239
20240 fi
20241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
20242 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
20243
20244
20245
20246
20247
20248
20249   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
20250 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
20251 if ${lt_cv_prog_compiler_c_o+:} false; then :
20252   $as_echo_n "(cached) " >&6
20253 else
20254   lt_cv_prog_compiler_c_o=no
20255    $RM -r conftest 2>/dev/null
20256    mkdir conftest
20257    cd conftest
20258    mkdir out
20259    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20260
20261    lt_compiler_flag="-o out/conftest2.$ac_objext"
20262    # Insert the option either (1) after the last *FLAGS variable, or
20263    # (2) before a word containing "conftest.", or (3) at the end.
20264    # Note that $ac_compile itself does not contain backslashes and begins
20265    # with a dollar sign (not a hyphen), so the echo should work correctly.
20266    lt_compile=`echo "$ac_compile" | $SED \
20267    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20268    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
20269    -e 's:$: $lt_compiler_flag:'`
20270    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
20271    (eval "$lt_compile" 2>out/conftest.err)
20272    ac_status=$?
20273    cat out/conftest.err >&5
20274    echo "$as_me:$LINENO: \$? = $ac_status" >&5
20275    if (exit $ac_status) && test -s out/conftest2.$ac_objext
20276    then
20277      # The compiler can only warn and ignore the option if not recognized
20278      # So say no if there are warnings
20279      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
20280      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
20281      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
20282        lt_cv_prog_compiler_c_o=yes
20283      fi
20284    fi
20285    chmod u+w . 2>&5
20286    $RM conftest*
20287    # SGI C++ compiler will create directory out/ii_files/ for
20288    # template instantiation
20289    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
20290    $RM out/* && rmdir out
20291    cd ..
20292    $RM -r conftest
20293    $RM conftest*
20294
20295 fi
20296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
20297 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
20298
20299
20300
20301
20302 hard_links="nottested"
20303 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
20304   # do not overwrite the value of need_locks provided by the user
20305   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
20306 $as_echo_n "checking if we can lock with hard links... " >&6; }
20307   hard_links=yes
20308   $RM conftest*
20309   ln conftest.a conftest.b 2>/dev/null && hard_links=no
20310   touch conftest.a
20311   ln conftest.a conftest.b 2>&5 || hard_links=no
20312   ln conftest.a conftest.b 2>/dev/null && hard_links=no
20313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
20314 $as_echo "$hard_links" >&6; }
20315   if test "$hard_links" = no; then
20316     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
20317 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
20318     need_locks=warn
20319   fi
20320 else
20321   need_locks=no
20322 fi
20323
20324
20325
20326
20327
20328
20329   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
20330 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
20331
20332   runpath_var=
20333   allow_undefined_flag=
20334   always_export_symbols=no
20335   archive_cmds=
20336   archive_expsym_cmds=
20337   compiler_needs_object=no
20338   enable_shared_with_static_runtimes=no
20339   export_dynamic_flag_spec=
20340   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
20341   hardcode_automatic=no
20342   hardcode_direct=no
20343   hardcode_direct_absolute=no
20344   hardcode_libdir_flag_spec=
20345   hardcode_libdir_flag_spec_ld=
20346   hardcode_libdir_separator=
20347   hardcode_minus_L=no
20348   hardcode_shlibpath_var=unsupported
20349   inherit_rpath=no
20350   link_all_deplibs=unknown
20351   module_cmds=
20352   module_expsym_cmds=
20353   old_archive_from_new_cmds=
20354   old_archive_from_expsyms_cmds=
20355   thread_safe_flag_spec=
20356   whole_archive_flag_spec=
20357   # include_expsyms should be a list of space-separated symbols to be *always*
20358   # included in the symbol list
20359   include_expsyms=
20360   # exclude_expsyms can be an extended regexp of symbols to exclude
20361   # it will be wrapped by ` (' and `)$', so one must not match beginning or
20362   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
20363   # as well as any symbol that contains `d'.
20364   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
20365   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
20366   # platforms (ab)use it in PIC code, but their linkers get confused if
20367   # the symbol is explicitly referenced.  Since portable code cannot
20368   # rely on this symbol name, it's probably fine to never include it in
20369   # preloaded symbol tables.
20370   # Exclude shared library initialization/finalization symbols.
20371   extract_expsyms_cmds=
20372
20373   case $host_os in
20374   cygwin* | mingw* | pw32* | cegcc*)
20375     # FIXME: the MSVC++ port hasn't been tested in a loooong time
20376     # When not using gcc, we currently assume that we are using
20377     # Microsoft Visual C++.
20378     if test "$GCC" != yes; then
20379       with_gnu_ld=no
20380     fi
20381     ;;
20382   interix*)
20383     # we just hope/assume this is gcc and not c89 (= MSVC++)
20384     with_gnu_ld=yes
20385     ;;
20386   openbsd*)
20387     with_gnu_ld=no
20388     ;;
20389   esac
20390
20391   ld_shlibs=yes
20392
20393   # On some targets, GNU ld is compatible enough with the native linker
20394   # that we're better off using the native interface for both.
20395   lt_use_gnu_ld_interface=no
20396   if test "$with_gnu_ld" = yes; then
20397     case $host_os in
20398       aix*)
20399         # The AIX port of GNU ld has always aspired to compatibility
20400         # with the native linker.  However, as the warning in the GNU ld
20401         # block says, versions before 2.19.5* couldn't really create working
20402         # shared libraries, regardless of the interface used.
20403         case `$LD -v 2>&1` in
20404           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
20405           *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
20406           *\ \(GNU\ Binutils\)\ [3-9]*) ;;
20407           *)
20408             lt_use_gnu_ld_interface=yes
20409             ;;
20410         esac
20411         ;;
20412       *)
20413         lt_use_gnu_ld_interface=yes
20414         ;;
20415     esac
20416   fi
20417
20418   if test "$lt_use_gnu_ld_interface" = yes; then
20419     # If archive_cmds runs LD, not CC, wlarc should be empty
20420     wlarc='${wl}'
20421
20422     # Set some defaults for GNU ld with shared library support. These
20423     # are reset later if shared libraries are not supported. Putting them
20424     # here allows them to be overridden if necessary.
20425     runpath_var=LD_RUN_PATH
20426     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
20427     export_dynamic_flag_spec='${wl}--export-dynamic'
20428     # ancient GNU ld didn't support --whole-archive et. al.
20429     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
20430       whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
20431     else
20432       whole_archive_flag_spec=
20433     fi
20434     supports_anon_versioning=no
20435     case `$LD -v 2>&1` in
20436       *GNU\ gold*) supports_anon_versioning=yes ;;
20437       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
20438       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
20439       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
20440       *\ 2.11.*) ;; # other 2.11 versions
20441       *) supports_anon_versioning=yes ;;
20442     esac
20443
20444     # See if GNU ld supports shared libraries.
20445     case $host_os in
20446     aix[3-9]*)
20447       # On AIX/PPC, the GNU linker is very broken
20448       if test "$host_cpu" != ia64; then
20449         ld_shlibs=no
20450         cat <<_LT_EOF 1>&2
20451
20452 *** Warning: the GNU linker, at least up to release 2.19, is reported
20453 *** to be unable to reliably create shared libraries on AIX.
20454 *** Therefore, libtool is disabling shared libraries support.  If you
20455 *** really care for shared libraries, you may want to install binutils
20456 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
20457 *** You will then need to restart the configuration process.
20458
20459 _LT_EOF
20460       fi
20461       ;;
20462
20463     amigaos*)
20464       case $host_cpu in
20465       powerpc)
20466             # see comment about AmigaOS4 .so support
20467             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20468             archive_expsym_cmds=''
20469         ;;
20470       m68k)
20471             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)'
20472             hardcode_libdir_flag_spec='-L$libdir'
20473             hardcode_minus_L=yes
20474         ;;
20475       esac
20476       ;;
20477
20478     beos*)
20479       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20480         allow_undefined_flag=unsupported
20481         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
20482         # support --undefined.  This deserves some investigation.  FIXME
20483         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20484       else
20485         ld_shlibs=no
20486       fi
20487       ;;
20488
20489     cygwin* | mingw* | pw32* | cegcc*)
20490       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
20491       # as there is no search path for DLLs.
20492       hardcode_libdir_flag_spec='-L$libdir'
20493       export_dynamic_flag_spec='${wl}--export-all-symbols'
20494       allow_undefined_flag=unsupported
20495       always_export_symbols=no
20496       enable_shared_with_static_runtimes=yes
20497       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'
20498       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
20499
20500       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
20501         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
20502         # If the export-symbols file already is a .def file (1st line
20503         # is EXPORTS), use it as is; otherwise, prepend...
20504         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
20505           cp $export_symbols $output_objdir/$soname.def;
20506         else
20507           echo EXPORTS > $output_objdir/$soname.def;
20508           cat $export_symbols >> $output_objdir/$soname.def;
20509         fi~
20510         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
20511       else
20512         ld_shlibs=no
20513       fi
20514       ;;
20515
20516     haiku*)
20517       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20518       link_all_deplibs=yes
20519       ;;
20520
20521     interix[3-9]*)
20522       hardcode_direct=no
20523       hardcode_shlibpath_var=no
20524       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
20525       export_dynamic_flag_spec='${wl}-E'
20526       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
20527       # Instead, shared libraries are loaded at an image base (0x10000000 by
20528       # default) and relocated if they conflict, which is a slow very memory
20529       # consuming and fragmenting process.  To avoid this, we pick a random,
20530       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
20531       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
20532       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
20533       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'
20534       ;;
20535
20536     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
20537       tmp_diet=no
20538       if test "$host_os" = linux-dietlibc; then
20539         case $cc_basename in
20540           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
20541         esac
20542       fi
20543       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
20544          && test "$tmp_diet" = no
20545       then
20546         tmp_addflag=' $pic_flag'
20547         tmp_sharedflag='-shared'
20548         case $cc_basename,$host_cpu in
20549         pgcc*)                          # Portland Group C compiler
20550           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'
20551           tmp_addflag=' $pic_flag'
20552           ;;
20553         pgf77* | pgf90* | pgf95* | pgfortran*)
20554                                         # Portland Group f77 and f90 compilers
20555           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'
20556           tmp_addflag=' $pic_flag -Mnomain' ;;
20557         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
20558           tmp_addflag=' -i_dynamic' ;;
20559         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
20560           tmp_addflag=' -i_dynamic -nofor_main' ;;
20561         ifc* | ifort*)                  # Intel Fortran compiler
20562           tmp_addflag=' -nofor_main' ;;
20563         lf95*)                          # Lahey Fortran 8.1
20564           whole_archive_flag_spec=
20565           tmp_sharedflag='--shared' ;;
20566         xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
20567           tmp_sharedflag='-qmkshrobj'
20568           tmp_addflag= ;;
20569         nvcc*)  # Cuda Compiler Driver 2.2
20570           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'
20571           compiler_needs_object=yes
20572           ;;
20573         esac
20574         case `$CC -V 2>&1 | sed 5q` in
20575         *Sun\ C*)                       # Sun C 5.9
20576           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'
20577           compiler_needs_object=yes
20578           tmp_sharedflag='-G' ;;
20579         *Sun\ F*)                       # Sun Fortran 8.3
20580           tmp_sharedflag='-G' ;;
20581         esac
20582         archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20583
20584         if test "x$supports_anon_versioning" = xyes; then
20585           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
20586             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
20587             echo "local: *; };" >> $output_objdir/$libname.ver~
20588             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
20589         fi
20590
20591         case $cc_basename in
20592         xlf* | bgf* | bgxlf* | mpixlf*)
20593           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
20594           whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
20595           hardcode_libdir_flag_spec=
20596           hardcode_libdir_flag_spec_ld='-rpath $libdir'
20597           archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
20598           if test "x$supports_anon_versioning" = xyes; then
20599             archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
20600               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
20601               echo "local: *; };" >> $output_objdir/$libname.ver~
20602               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
20603           fi
20604           ;;
20605         esac
20606       else
20607         ld_shlibs=no
20608       fi
20609       ;;
20610
20611     netbsd*)
20612       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
20613         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
20614         wlarc=
20615       else
20616         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20617         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20618       fi
20619       ;;
20620
20621     solaris*)
20622       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
20623         ld_shlibs=no
20624         cat <<_LT_EOF 1>&2
20625
20626 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
20627 *** create shared libraries on Solaris systems.  Therefore, libtool
20628 *** is disabling shared libraries support.  We urge you to upgrade GNU
20629 *** binutils to release 2.9.1 or newer.  Another option is to modify
20630 *** your PATH or compiler configuration so that the native linker is
20631 *** used, and then restart.
20632
20633 _LT_EOF
20634       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20635         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20636         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20637       else
20638         ld_shlibs=no
20639       fi
20640       ;;
20641
20642     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
20643       case `$LD -v 2>&1` in
20644         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
20645         ld_shlibs=no
20646         cat <<_LT_EOF 1>&2
20647
20648 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
20649 *** reliably create shared libraries on SCO systems.  Therefore, libtool
20650 *** is disabling shared libraries support.  We urge you to upgrade GNU
20651 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
20652 *** your PATH or compiler configuration so that the native linker is
20653 *** used, and then restart.
20654
20655 _LT_EOF
20656         ;;
20657         *)
20658           # For security reasons, it is highly recommended that you always
20659           # use absolute paths for naming shared libraries, and exclude the
20660           # DT_RUNPATH tag from executables and libraries.  But doing so
20661           # requires that you compile everything twice, which is a pain.
20662           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20663             hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
20664             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20665             archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20666           else
20667             ld_shlibs=no
20668           fi
20669         ;;
20670       esac
20671       ;;
20672
20673     sunos4*)
20674       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
20675       wlarc=
20676       hardcode_direct=yes
20677       hardcode_shlibpath_var=no
20678       ;;
20679
20680     *)
20681       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20682         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20683         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20684       else
20685         ld_shlibs=no
20686       fi
20687       ;;
20688     esac
20689
20690     if test "$ld_shlibs" = no; then
20691       runpath_var=
20692       hardcode_libdir_flag_spec=
20693       export_dynamic_flag_spec=
20694       whole_archive_flag_spec=
20695     fi
20696   else
20697     # PORTME fill in a description of your system's linker (not GNU ld)
20698     case $host_os in
20699     aix3*)
20700       allow_undefined_flag=unsupported
20701       always_export_symbols=yes
20702       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'
20703       # Note: this linker hardcodes the directories in LIBPATH if there
20704       # are no directories specified by -L.
20705       hardcode_minus_L=yes
20706       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
20707         # Neither direct hardcoding nor static linking is supported with a
20708         # broken collect2.
20709         hardcode_direct=unsupported
20710       fi
20711       ;;
20712
20713     aix[4-9]*)
20714       if test "$host_cpu" = ia64; then
20715         # On IA64, the linker does run time linking by default, so we don't
20716         # have to do anything special.
20717         aix_use_runtimelinking=no
20718         exp_sym_flag='-Bexport'
20719         no_entry_flag=""
20720       else
20721         # If we're using GNU nm, then we don't want the "-C" option.
20722         # -C means demangle to AIX nm, but means don't demangle with GNU nm
20723         # Also, AIX nm treats weak defined symbols like other global
20724         # defined symbols, whereas GNU nm marks them as "W".
20725         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
20726           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'
20727         else
20728           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'
20729         fi
20730         aix_use_runtimelinking=no
20731
20732         # Test if we are trying to use run time linking or normal
20733         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
20734         # need to do runtime linking.
20735         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
20736           for ld_flag in $LDFLAGS; do
20737           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
20738             aix_use_runtimelinking=yes
20739             break
20740           fi
20741           done
20742           ;;
20743         esac
20744
20745         exp_sym_flag='-bexport'
20746         no_entry_flag='-bnoentry'
20747       fi
20748
20749       # When large executables or shared objects are built, AIX ld can
20750       # have problems creating the table of contents.  If linking a library
20751       # or program results in "error TOC overflow" add -mminimal-toc to
20752       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
20753       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
20754
20755       archive_cmds=''
20756       hardcode_direct=yes
20757       hardcode_direct_absolute=yes
20758       hardcode_libdir_separator=':'
20759       link_all_deplibs=yes
20760       file_list_spec='${wl}-f,'
20761
20762       if test "$GCC" = yes; then
20763         case $host_os in aix4.[012]|aix4.[012].*)
20764         # We only want to do this on AIX 4.2 and lower, the check
20765         # below for broken collect2 doesn't work under 4.3+
20766           collect2name=`${CC} -print-prog-name=collect2`
20767           if test -f "$collect2name" &&
20768            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
20769           then
20770           # We have reworked collect2
20771           :
20772           else
20773           # We have old collect2
20774           hardcode_direct=unsupported
20775           # It fails to find uninstalled libraries when the uninstalled
20776           # path is not listed in the libpath.  Setting hardcode_minus_L
20777           # to unsupported forces relinking
20778           hardcode_minus_L=yes
20779           hardcode_libdir_flag_spec='-L$libdir'
20780           hardcode_libdir_separator=
20781           fi
20782           ;;
20783         esac
20784         shared_flag='-shared'
20785         if test "$aix_use_runtimelinking" = yes; then
20786           shared_flag="$shared_flag "'${wl}-G'
20787         fi
20788       else
20789         # not using gcc
20790         if test "$host_cpu" = ia64; then
20791         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
20792         # chokes on -Wl,-G. The following line is correct:
20793           shared_flag='-G'
20794         else
20795           if test "$aix_use_runtimelinking" = yes; then
20796             shared_flag='${wl}-G'
20797           else
20798             shared_flag='${wl}-bM:SRE'
20799           fi
20800         fi
20801       fi
20802
20803       export_dynamic_flag_spec='${wl}-bexpall'
20804       # It seems that -bexpall does not export symbols beginning with
20805       # underscore (_), so it is better to generate a list of symbols to export.
20806       always_export_symbols=yes
20807       if test "$aix_use_runtimelinking" = yes; then
20808         # Warning - without using the other runtime loading flags (-brtl),
20809         # -berok will link without error, but may produce a broken library.
20810         allow_undefined_flag='-berok'
20811         # Determine the default libpath from the value encoded in an
20812         # empty executable.
20813         if test "${lt_cv_aix_libpath+set}" = set; then
20814   aix_libpath=$lt_cv_aix_libpath
20815 else
20816   if ${lt_cv_aix_libpath_+:} false; then :
20817   $as_echo_n "(cached) " >&6
20818 else
20819   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20820 /* end confdefs.h.  */
20821
20822 int
20823 main ()
20824 {
20825
20826   ;
20827   return 0;
20828 }
20829 _ACEOF
20830 if ac_fn_c_try_link "$LINENO"; then :
20831
20832   lt_aix_libpath_sed='
20833       /Import File Strings/,/^$/ {
20834           /^0/ {
20835               s/^0  *\([^ ]*\) *$/\1/
20836               p
20837           }
20838       }'
20839   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20840   # Check for a 64-bit object if we didn't find anything.
20841   if test -z "$lt_cv_aix_libpath_"; then
20842     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20843   fi
20844 fi
20845 rm -f core conftest.err conftest.$ac_objext \
20846     conftest$ac_exeext conftest.$ac_ext
20847   if test -z "$lt_cv_aix_libpath_"; then
20848     lt_cv_aix_libpath_="/usr/lib:/lib"
20849   fi
20850
20851 fi
20852
20853   aix_libpath=$lt_cv_aix_libpath_
20854 fi
20855
20856         hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
20857         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"
20858       else
20859         if test "$host_cpu" = ia64; then
20860           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
20861           allow_undefined_flag="-z nodefs"
20862           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"
20863         else
20864          # Determine the default libpath from the value encoded in an
20865          # empty executable.
20866          if test "${lt_cv_aix_libpath+set}" = set; then
20867   aix_libpath=$lt_cv_aix_libpath
20868 else
20869   if ${lt_cv_aix_libpath_+:} false; then :
20870   $as_echo_n "(cached) " >&6
20871 else
20872   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20873 /* end confdefs.h.  */
20874
20875 int
20876 main ()
20877 {
20878
20879   ;
20880   return 0;
20881 }
20882 _ACEOF
20883 if ac_fn_c_try_link "$LINENO"; then :
20884
20885   lt_aix_libpath_sed='
20886       /Import File Strings/,/^$/ {
20887           /^0/ {
20888               s/^0  *\([^ ]*\) *$/\1/
20889               p
20890           }
20891       }'
20892   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20893   # Check for a 64-bit object if we didn't find anything.
20894   if test -z "$lt_cv_aix_libpath_"; then
20895     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20896   fi
20897 fi
20898 rm -f core conftest.err conftest.$ac_objext \
20899     conftest$ac_exeext conftest.$ac_ext
20900   if test -z "$lt_cv_aix_libpath_"; then
20901     lt_cv_aix_libpath_="/usr/lib:/lib"
20902   fi
20903
20904 fi
20905
20906   aix_libpath=$lt_cv_aix_libpath_
20907 fi
20908
20909          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
20910           # Warning - without using the other run time loading flags,
20911           # -berok will link without error, but may produce a broken library.
20912           no_undefined_flag=' ${wl}-bernotok'
20913           allow_undefined_flag=' ${wl}-berok'
20914           if test "$with_gnu_ld" = yes; then
20915             # We only use this code for GNU lds that support --whole-archive.
20916             whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
20917           else
20918             # Exported symbols can be pulled into shared objects from archives
20919             whole_archive_flag_spec='$convenience'
20920           fi
20921           archive_cmds_need_lc=yes
20922           # This is similar to how AIX traditionally builds its shared libraries.
20923           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'
20924         fi
20925       fi
20926       ;;
20927
20928     amigaos*)
20929       case $host_cpu in
20930       powerpc)
20931             # see comment about AmigaOS4 .so support
20932             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20933             archive_expsym_cmds=''
20934         ;;
20935       m68k)
20936             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)'
20937             hardcode_libdir_flag_spec='-L$libdir'
20938             hardcode_minus_L=yes
20939         ;;
20940       esac
20941       ;;
20942
20943     bsdi[45]*)
20944       export_dynamic_flag_spec=-rdynamic
20945       ;;
20946
20947     cygwin* | mingw* | pw32* | cegcc*)
20948       # When not using gcc, we currently assume that we are using
20949       # Microsoft Visual C++.
20950       # hardcode_libdir_flag_spec is actually meaningless, as there is
20951       # no search path for DLLs.
20952       case $cc_basename in
20953       cl*)
20954         # Native MSVC
20955         hardcode_libdir_flag_spec=' '
20956         allow_undefined_flag=unsupported
20957         always_export_symbols=yes
20958         file_list_spec='@'
20959         # Tell ltmain to make .lib files, not .a files.
20960         libext=lib
20961         # Tell ltmain to make .dll files, not .so files.
20962         shrext_cmds=".dll"
20963         # FIXME: Setting linknames here is a bad hack.
20964         archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
20965         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
20966             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
20967           else
20968             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
20969           fi~
20970           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
20971           linknames='
20972         # The linker will not automatically build a static lib if we build a DLL.
20973         # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
20974         enable_shared_with_static_runtimes=yes
20975         export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
20976         # Don't use ranlib
20977         old_postinstall_cmds='chmod 644 $oldlib'
20978         postlink_cmds='lt_outputfile="@OUTPUT@"~
20979           lt_tool_outputfile="@TOOL_OUTPUT@"~
20980           case $lt_outputfile in
20981             *.exe|*.EXE) ;;
20982             *)
20983               lt_outputfile="$lt_outputfile.exe"
20984               lt_tool_outputfile="$lt_tool_outputfile.exe"
20985               ;;
20986           esac~
20987           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
20988             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
20989             $RM "$lt_outputfile.manifest";
20990           fi'
20991         ;;
20992       *)
20993         # Assume MSVC wrapper
20994         hardcode_libdir_flag_spec=' '
20995         allow_undefined_flag=unsupported
20996         # Tell ltmain to make .lib files, not .a files.
20997         libext=lib
20998         # Tell ltmain to make .dll files, not .so files.
20999         shrext_cmds=".dll"
21000         # FIXME: Setting linknames here is a bad hack.
21001         archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
21002         # The linker will automatically build a .lib file if we build a DLL.
21003         old_archive_from_new_cmds='true'
21004         # FIXME: Should let the user specify the lib program.
21005         old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
21006         enable_shared_with_static_runtimes=yes
21007         ;;
21008       esac
21009       ;;
21010
21011     darwin* | rhapsody*)
21012
21013
21014   archive_cmds_need_lc=no
21015   hardcode_direct=no
21016   hardcode_automatic=yes
21017   hardcode_shlibpath_var=unsupported
21018   if test "$lt_cv_ld_force_load" = "yes"; then
21019     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\"`'
21020   else
21021     whole_archive_flag_spec=''
21022   fi
21023   link_all_deplibs=yes
21024   allow_undefined_flag="$_lt_dar_allow_undefined"
21025   case $cc_basename in
21026      ifort*) _lt_dar_can_shared=yes ;;
21027      *) _lt_dar_can_shared=$GCC ;;
21028   esac
21029   if test "$_lt_dar_can_shared" = "yes"; then
21030     output_verbose_link_cmd=func_echo_all
21031     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
21032     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
21033     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}"
21034     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}"
21035
21036   else
21037   ld_shlibs=no
21038   fi
21039
21040       ;;
21041
21042     dgux*)
21043       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21044       hardcode_libdir_flag_spec='-L$libdir'
21045       hardcode_shlibpath_var=no
21046       ;;
21047
21048     freebsd1*)
21049       ld_shlibs=no
21050       ;;
21051
21052     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
21053     # support.  Future versions do this automatically, but an explicit c++rt0.o
21054     # does not break anything, and helps significantly (at the cost of a little
21055     # extra space).
21056     freebsd2.2*)
21057       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
21058       hardcode_libdir_flag_spec='-R$libdir'
21059       hardcode_direct=yes
21060       hardcode_shlibpath_var=no
21061       ;;
21062
21063     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
21064     freebsd2*)
21065       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
21066       hardcode_direct=yes
21067       hardcode_minus_L=yes
21068       hardcode_shlibpath_var=no
21069       ;;
21070
21071     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
21072     freebsd* | dragonfly*)
21073       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
21074       hardcode_libdir_flag_spec='-R$libdir'
21075       hardcode_direct=yes
21076       hardcode_shlibpath_var=no
21077       ;;
21078
21079     hpux9*)
21080       if test "$GCC" = yes; then
21081         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'
21082       else
21083         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'
21084       fi
21085       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
21086       hardcode_libdir_separator=:
21087       hardcode_direct=yes
21088
21089       # hardcode_minus_L: Not really in the search PATH,
21090       # but as the default location of the library.
21091       hardcode_minus_L=yes
21092       export_dynamic_flag_spec='${wl}-E'
21093       ;;
21094
21095     hpux10*)
21096       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
21097         archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
21098       else
21099         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
21100       fi
21101       if test "$with_gnu_ld" = no; then
21102         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
21103         hardcode_libdir_flag_spec_ld='+b $libdir'
21104         hardcode_libdir_separator=:
21105         hardcode_direct=yes
21106         hardcode_direct_absolute=yes
21107         export_dynamic_flag_spec='${wl}-E'
21108         # hardcode_minus_L: Not really in the search PATH,
21109         # but as the default location of the library.
21110         hardcode_minus_L=yes
21111       fi
21112       ;;
21113
21114     hpux11*)
21115       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
21116         case $host_cpu in
21117         hppa*64*)
21118           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
21119           ;;
21120         ia64*)
21121           archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
21122           ;;
21123         *)
21124           archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
21125           ;;
21126         esac
21127       else
21128         case $host_cpu in
21129         hppa*64*)
21130           archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
21131           ;;
21132         ia64*)
21133           archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
21134           ;;
21135         *)
21136
21137           # Older versions of the 11.00 compiler do not understand -b yet
21138           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
21139           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
21140 $as_echo_n "checking if $CC understands -b... " >&6; }
21141 if ${lt_cv_prog_compiler__b+:} false; then :
21142   $as_echo_n "(cached) " >&6
21143 else
21144   lt_cv_prog_compiler__b=no
21145    save_LDFLAGS="$LDFLAGS"
21146    LDFLAGS="$LDFLAGS -b"
21147    echo "$lt_simple_link_test_code" > conftest.$ac_ext
21148    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
21149      # The linker can only warn and ignore the option if not recognized
21150      # So say no if there are warnings
21151      if test -s conftest.err; then
21152        # Append any errors to the config.log.
21153        cat conftest.err 1>&5
21154        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
21155        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
21156        if diff conftest.exp conftest.er2 >/dev/null; then
21157          lt_cv_prog_compiler__b=yes
21158        fi
21159      else
21160        lt_cv_prog_compiler__b=yes
21161      fi
21162    fi
21163    $RM -r conftest*
21164    LDFLAGS="$save_LDFLAGS"
21165
21166 fi
21167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
21168 $as_echo "$lt_cv_prog_compiler__b" >&6; }
21169
21170 if test x"$lt_cv_prog_compiler__b" = xyes; then
21171     archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
21172 else
21173     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
21174 fi
21175
21176           ;;
21177         esac
21178       fi
21179       if test "$with_gnu_ld" = no; then
21180         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
21181         hardcode_libdir_separator=:
21182
21183         case $host_cpu in
21184         hppa*64*|ia64*)
21185           hardcode_direct=no
21186           hardcode_shlibpath_var=no
21187           ;;
21188         *)
21189           hardcode_direct=yes
21190           hardcode_direct_absolute=yes
21191           export_dynamic_flag_spec='${wl}-E'
21192
21193           # hardcode_minus_L: Not really in the search PATH,
21194           # but as the default location of the library.
21195           hardcode_minus_L=yes
21196           ;;
21197         esac
21198       fi
21199       ;;
21200
21201     irix5* | irix6* | nonstopux*)
21202       if test "$GCC" = yes; then
21203         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'
21204         # Try to use the -exported_symbol ld option, if it does not
21205         # work, assume that -exports_file does not work either and
21206         # implicitly export all symbols.
21207         # This should be the same for all languages, so no per-tag cache variable.
21208         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
21209 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
21210 if ${lt_cv_irix_exported_symbol+:} false; then :
21211   $as_echo_n "(cached) " >&6
21212 else
21213   save_LDFLAGS="$LDFLAGS"
21214            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
21215            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21216 /* end confdefs.h.  */
21217 int foo (void) { return 0; }
21218 _ACEOF
21219 if ac_fn_c_try_link "$LINENO"; then :
21220   lt_cv_irix_exported_symbol=yes
21221 else
21222   lt_cv_irix_exported_symbol=no
21223 fi
21224 rm -f core conftest.err conftest.$ac_objext \
21225     conftest$ac_exeext conftest.$ac_ext
21226            LDFLAGS="$save_LDFLAGS"
21227 fi
21228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
21229 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
21230         if test "$lt_cv_irix_exported_symbol" = yes; then
21231           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'
21232         fi
21233       else
21234         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'
21235         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'
21236       fi
21237       archive_cmds_need_lc='no'
21238       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
21239       hardcode_libdir_separator=:
21240       inherit_rpath=yes
21241       link_all_deplibs=yes
21242       ;;
21243
21244     netbsd*)
21245       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
21246         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
21247       else
21248         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
21249       fi
21250       hardcode_libdir_flag_spec='-R$libdir'
21251       hardcode_direct=yes
21252       hardcode_shlibpath_var=no
21253       ;;
21254
21255     newsos6)
21256       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21257       hardcode_direct=yes
21258       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
21259       hardcode_libdir_separator=:
21260       hardcode_shlibpath_var=no
21261       ;;
21262
21263     *nto* | *qnx*)
21264       ;;
21265
21266     openbsd*)
21267       if test -f /usr/libexec/ld.so; then
21268         hardcode_direct=yes
21269         hardcode_shlibpath_var=no
21270         hardcode_direct_absolute=yes
21271         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
21272           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
21273           archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
21274           hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
21275           export_dynamic_flag_spec='${wl}-E'
21276         else
21277           case $host_os in
21278            openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
21279              archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
21280              hardcode_libdir_flag_spec='-R$libdir'
21281              ;;
21282            *)
21283              archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
21284              hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
21285              ;;
21286           esac
21287         fi
21288       else
21289         ld_shlibs=no
21290       fi
21291       ;;
21292
21293     os2*)
21294       hardcode_libdir_flag_spec='-L$libdir'
21295       hardcode_minus_L=yes
21296       allow_undefined_flag=unsupported
21297       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'
21298       old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
21299       ;;
21300
21301     osf3*)
21302       if test "$GCC" = yes; then
21303         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
21304         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'
21305       else
21306         allow_undefined_flag=' -expect_unresolved \*'
21307         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'
21308       fi
21309       archive_cmds_need_lc='no'
21310       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
21311       hardcode_libdir_separator=:
21312       ;;
21313
21314     osf4* | osf5*)      # as osf3* with the addition of -msym flag
21315       if test "$GCC" = yes; then
21316         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
21317         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'
21318         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
21319       else
21320         allow_undefined_flag=' -expect_unresolved \*'
21321         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'
21322         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~
21323         $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'
21324
21325         # Both c and cxx compiler support -rpath directly
21326         hardcode_libdir_flag_spec='-rpath $libdir'
21327       fi
21328       archive_cmds_need_lc='no'
21329       hardcode_libdir_separator=:
21330       ;;
21331
21332     solaris*)
21333       no_undefined_flag=' -z defs'
21334       if test "$GCC" = yes; then
21335         wlarc='${wl}'
21336         archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
21337         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
21338           $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'
21339       else
21340         case `$CC -V 2>&1` in
21341         *"Compilers 5.0"*)
21342           wlarc=''
21343           archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
21344           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
21345           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
21346           ;;
21347         *)
21348           wlarc='${wl}'
21349           archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
21350           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
21351           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
21352           ;;
21353         esac
21354       fi
21355       hardcode_libdir_flag_spec='-R$libdir'
21356       hardcode_shlibpath_var=no
21357       case $host_os in
21358       solaris2.[0-5] | solaris2.[0-5].*) ;;
21359       *)
21360         # The compiler driver will combine and reorder linker options,
21361         # but understands `-z linker_flag'.  GCC discards it without `$wl',
21362         # but is careful enough not to reorder.
21363         # Supported since Solaris 2.6 (maybe 2.5.1?)
21364         if test "$GCC" = yes; then
21365           whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
21366         else
21367           whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
21368         fi
21369         ;;
21370       esac
21371       link_all_deplibs=yes
21372       ;;
21373
21374     sunos4*)
21375       if test "x$host_vendor" = xsequent; then
21376         # Use $CC to link under sequent, because it throws in some extra .o
21377         # files that make .init and .fini sections work.
21378         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
21379       else
21380         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
21381       fi
21382       hardcode_libdir_flag_spec='-L$libdir'
21383       hardcode_direct=yes
21384       hardcode_minus_L=yes
21385       hardcode_shlibpath_var=no
21386       ;;
21387
21388     sysv4)
21389       case $host_vendor in
21390         sni)
21391           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21392           hardcode_direct=yes # is this really true???
21393         ;;
21394         siemens)
21395           ## LD is ld it makes a PLAMLIB
21396           ## CC just makes a GrossModule.
21397           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
21398           reload_cmds='$CC -r -o $output$reload_objs'
21399           hardcode_direct=no
21400         ;;
21401         motorola)
21402           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21403           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
21404         ;;
21405       esac
21406       runpath_var='LD_RUN_PATH'
21407       hardcode_shlibpath_var=no
21408       ;;
21409
21410     sysv4.3*)
21411       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21412       hardcode_shlibpath_var=no
21413       export_dynamic_flag_spec='-Bexport'
21414       ;;
21415
21416     sysv4*MP*)
21417       if test -d /usr/nec; then
21418         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21419         hardcode_shlibpath_var=no
21420         runpath_var=LD_RUN_PATH
21421         hardcode_runpath_var=yes
21422         ld_shlibs=yes
21423       fi
21424       ;;
21425
21426     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
21427       no_undefined_flag='${wl}-z,text'
21428       archive_cmds_need_lc=no
21429       hardcode_shlibpath_var=no
21430       runpath_var='LD_RUN_PATH'
21431
21432       if test "$GCC" = yes; then
21433         archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21434         archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21435       else
21436         archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21437         archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21438       fi
21439       ;;
21440
21441     sysv5* | sco3.2v5* | sco5v6*)
21442       # Note: We can NOT use -z defs as we might desire, because we do not
21443       # link with -lc, and that would cause any symbols used from libc to
21444       # always be unresolved, which means just about no library would
21445       # ever link correctly.  If we're not using GNU ld we use -z text
21446       # though, which does catch some bad symbols but isn't as heavy-handed
21447       # as -z defs.
21448       no_undefined_flag='${wl}-z,text'
21449       allow_undefined_flag='${wl}-z,nodefs'
21450       archive_cmds_need_lc=no
21451       hardcode_shlibpath_var=no
21452       hardcode_libdir_flag_spec='${wl}-R,$libdir'
21453       hardcode_libdir_separator=':'
21454       link_all_deplibs=yes
21455       export_dynamic_flag_spec='${wl}-Bexport'
21456       runpath_var='LD_RUN_PATH'
21457
21458       if test "$GCC" = yes; then
21459         archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21460         archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21461       else
21462         archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21463         archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21464       fi
21465       ;;
21466
21467     uts4*)
21468       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21469       hardcode_libdir_flag_spec='-L$libdir'
21470       hardcode_shlibpath_var=no
21471       ;;
21472
21473     *)
21474       ld_shlibs=no
21475       ;;
21476     esac
21477
21478     if test x$host_vendor = xsni; then
21479       case $host in
21480       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
21481         export_dynamic_flag_spec='${wl}-Blargedynsym'
21482         ;;
21483       esac
21484     fi
21485   fi
21486
21487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
21488 $as_echo "$ld_shlibs" >&6; }
21489 test "$ld_shlibs" = no && can_build_shared=no
21490
21491 with_gnu_ld=$with_gnu_ld
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507 #
21508 # Do we need to explicitly link libc?
21509 #
21510 case "x$archive_cmds_need_lc" in
21511 x|xyes)
21512   # Assume -lc should be added
21513   archive_cmds_need_lc=yes
21514
21515   if test "$enable_shared" = yes && test "$GCC" = yes; then
21516     case $archive_cmds in
21517     *'~'*)
21518       # FIXME: we may have to deal with multi-command sequences.
21519       ;;
21520     '$CC '*)
21521       # Test whether the compiler implicitly links with -lc since on some
21522       # systems, -lgcc has to come before -lc. If gcc already passes -lc
21523       # to ld, don't add -lc before -lgcc.
21524       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
21525 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
21526 if ${lt_cv_archive_cmds_need_lc+:} false; then :
21527   $as_echo_n "(cached) " >&6
21528 else
21529   $RM conftest*
21530         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
21531
21532         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
21533   (eval $ac_compile) 2>&5
21534   ac_status=$?
21535   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21536   test $ac_status = 0; } 2>conftest.err; then
21537           soname=conftest
21538           lib=conftest
21539           libobjs=conftest.$ac_objext
21540           deplibs=
21541           wl=$lt_prog_compiler_wl
21542           pic_flag=$lt_prog_compiler_pic
21543           compiler_flags=-v
21544           linker_flags=-v
21545           verstring=
21546           output_objdir=.
21547           libname=conftest
21548           lt_save_allow_undefined_flag=$allow_undefined_flag
21549           allow_undefined_flag=
21550           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
21551   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
21552   ac_status=$?
21553   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21554   test $ac_status = 0; }
21555           then
21556             lt_cv_archive_cmds_need_lc=no
21557           else
21558             lt_cv_archive_cmds_need_lc=yes
21559           fi
21560           allow_undefined_flag=$lt_save_allow_undefined_flag
21561         else
21562           cat conftest.err 1>&5
21563         fi
21564         $RM conftest*
21565
21566 fi
21567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
21568 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
21569       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
21570       ;;
21571     esac
21572   fi
21573   ;;
21574 esac
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
21730
21731
21732   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
21733 $as_echo_n "checking dynamic linker characteristics... " >&6; }
21734
21735 if test "$GCC" = yes; then
21736   case $host_os in
21737     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
21738     *) lt_awk_arg="/^libraries:/" ;;
21739   esac
21740   case $host_os in
21741     mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
21742     *) lt_sed_strip_eq="s,=/,/,g" ;;
21743   esac
21744   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
21745   case $lt_search_path_spec in
21746   *\;*)
21747     # if the path contains ";" then we assume it to be the separator
21748     # otherwise default to the standard path separator (i.e. ":") - it is
21749     # assumed that no part of a normal pathname contains ";" but that should
21750     # okay in the real world where ";" in dirpaths is itself problematic.
21751     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
21752     ;;
21753   *)
21754     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
21755     ;;
21756   esac
21757   # Ok, now we have the path, separated by spaces, we can step through it
21758   # and add multilib dir if necessary.
21759   lt_tmp_lt_search_path_spec=
21760   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
21761   for lt_sys_path in $lt_search_path_spec; do
21762     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
21763       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
21764     else
21765       test -d "$lt_sys_path" && \
21766         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
21767     fi
21768   done
21769   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
21770 BEGIN {RS=" "; FS="/|\n";} {
21771   lt_foo="";
21772   lt_count=0;
21773   for (lt_i = NF; lt_i > 0; lt_i--) {
21774     if ($lt_i != "" && $lt_i != ".") {
21775       if ($lt_i == "..") {
21776         lt_count++;
21777       } else {
21778         if (lt_count == 0) {
21779           lt_foo="/" $lt_i lt_foo;
21780         } else {
21781           lt_count--;
21782         }
21783       }
21784     }
21785   }
21786   if (lt_foo != "") { lt_freq[lt_foo]++; }
21787   if (lt_freq[lt_foo] == 1) { print lt_foo; }
21788 }'`
21789   # AWK program above erroneously prepends '/' to C:/dos/paths
21790   # for these hosts.
21791   case $host_os in
21792     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
21793       $SED 's,/\([A-Za-z]:\),\1,g'` ;;
21794   esac
21795   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
21796 else
21797   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
21798 fi
21799 library_names_spec=
21800 libname_spec='lib$name'
21801 soname_spec=
21802 shrext_cmds=".so"
21803 postinstall_cmds=
21804 postuninstall_cmds=
21805 finish_cmds=
21806 finish_eval=
21807 shlibpath_var=
21808 shlibpath_overrides_runpath=unknown
21809 version_type=none
21810 dynamic_linker="$host_os ld.so"
21811 sys_lib_dlsearch_path_spec="/lib /usr/lib"
21812 need_lib_prefix=unknown
21813 hardcode_into_libs=no
21814
21815 # when you set need_version to no, make sure it does not cause -set_version
21816 # flags to be left without arguments
21817 need_version=unknown
21818
21819 case $host_os in
21820 aix3*)
21821   version_type=linux
21822   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
21823   shlibpath_var=LIBPATH
21824
21825   # AIX 3 has no versioning support, so we append a major version to the name.
21826   soname_spec='${libname}${release}${shared_ext}$major'
21827   ;;
21828
21829 aix[4-9]*)
21830   version_type=linux
21831   need_lib_prefix=no
21832   need_version=no
21833   hardcode_into_libs=yes
21834   if test "$host_cpu" = ia64; then
21835     # AIX 5 supports IA64
21836     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
21837     shlibpath_var=LD_LIBRARY_PATH
21838   else
21839     # With GCC up to 2.95.x, collect2 would create an import file
21840     # for dependence libraries.  The import file would start with
21841     # the line `#! .'.  This would cause the generated library to
21842     # depend on `.', always an invalid library.  This was fixed in
21843     # development snapshots of GCC prior to 3.0.
21844     case $host_os in
21845       aix4 | aix4.[01] | aix4.[01].*)
21846       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
21847            echo ' yes '
21848            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
21849         :
21850       else
21851         can_build_shared=no
21852       fi
21853       ;;
21854     esac
21855     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
21856     # soname into executable. Probably we can add versioning support to
21857     # collect2, so additional links can be useful in future.
21858     if test "$aix_use_runtimelinking" = yes; then
21859       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
21860       # instead of lib<name>.a to let people know that these are not
21861       # typical AIX shared libraries.
21862       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
21863     else
21864       # We preserve .a as extension for shared libraries through AIX4.2
21865       # and later when we are not doing run time linking.
21866       library_names_spec='${libname}${release}.a $libname.a'
21867       soname_spec='${libname}${release}${shared_ext}$major'
21868     fi
21869     shlibpath_var=LIBPATH
21870   fi
21871   ;;
21872
21873 amigaos*)
21874   case $host_cpu in
21875   powerpc)
21876     # Since July 2007 AmigaOS4 officially supports .so libraries.
21877     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
21878     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
21879     ;;
21880   m68k)
21881     library_names_spec='$libname.ixlibrary $libname.a'
21882     # Create ${libname}_ixlibrary.a entries in /sys/libs.
21883     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'
21884     ;;
21885   esac
21886   ;;
21887
21888 beos*)
21889   library_names_spec='${libname}${shared_ext}'
21890   dynamic_linker="$host_os ld.so"
21891   shlibpath_var=LIBRARY_PATH
21892   ;;
21893
21894 bsdi[45]*)
21895   version_type=linux
21896   need_version=no
21897   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
21898   soname_spec='${libname}${release}${shared_ext}$major'
21899   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
21900   shlibpath_var=LD_LIBRARY_PATH
21901   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
21902   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
21903   # the default ld.so.conf also contains /usr/contrib/lib and
21904   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
21905   # libtool to hard-code these into programs
21906   ;;
21907
21908 cygwin* | mingw* | pw32* | cegcc*)
21909   version_type=windows
21910   shrext_cmds=".dll"
21911   need_version=no
21912   need_lib_prefix=no
21913
21914   case $GCC,$cc_basename in
21915   yes,*)
21916     # gcc
21917     library_names_spec='$libname.dll.a'
21918     # DLL is installed to $(libdir)/../bin by postinstall_cmds
21919     postinstall_cmds='base_file=`basename \${file}`~
21920       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
21921       dldir=$destdir/`dirname \$dlpath`~
21922       test -d \$dldir || mkdir -p \$dldir~
21923       $install_prog $dir/$dlname \$dldir/$dlname~
21924       chmod a+x \$dldir/$dlname~
21925       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
21926         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
21927       fi'
21928     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
21929       dlpath=$dir/\$dldll~
21930        $RM \$dlpath'
21931     shlibpath_overrides_runpath=yes
21932
21933     case $host_os in
21934     cygwin*)
21935       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
21936       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
21937
21938       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
21939       ;;
21940     mingw* | cegcc*)
21941       # MinGW DLLs use traditional 'lib' prefix
21942       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
21943       ;;
21944     pw32*)
21945       # pw32 DLLs use 'pw' prefix rather than 'lib'
21946       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
21947       ;;
21948     esac
21949     dynamic_linker='Win32 ld.exe'
21950     ;;
21951
21952   *,cl*)
21953     # Native MSVC
21954     libname_spec='$name'
21955     soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
21956     library_names_spec='${libname}.dll.lib'
21957
21958     case $build_os in
21959     mingw*)
21960       sys_lib_search_path_spec=
21961       lt_save_ifs=$IFS
21962       IFS=';'
21963       for lt_path in $LIB
21964       do
21965         IFS=$lt_save_ifs
21966         # Let DOS variable expansion print the short 8.3 style file name.
21967         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
21968         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
21969       done
21970       IFS=$lt_save_ifs
21971       # Convert to MSYS style.
21972       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
21973       ;;
21974     cygwin*)
21975       # Convert to unix form, then to dos form, then back to unix form
21976       # but this time dos style (no spaces!) so that the unix form looks
21977       # like /cygdrive/c/PROGRA~1:/cygdr...
21978       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
21979       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
21980       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
21981       ;;
21982     *)
21983       sys_lib_search_path_spec="$LIB"
21984       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
21985         # It is most probably a Windows format PATH.
21986         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
21987       else
21988         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
21989       fi
21990       # FIXME: find the short name or the path components, as spaces are
21991       # common. (e.g. "Program Files" -> "PROGRA~1")
21992       ;;
21993     esac
21994
21995     # DLL is installed to $(libdir)/../bin by postinstall_cmds
21996     postinstall_cmds='base_file=`basename \${file}`~
21997       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
21998       dldir=$destdir/`dirname \$dlpath`~
21999       test -d \$dldir || mkdir -p \$dldir~
22000       $install_prog $dir/$dlname \$dldir/$dlname'
22001     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
22002       dlpath=$dir/\$dldll~
22003        $RM \$dlpath'
22004     shlibpath_overrides_runpath=yes
22005     dynamic_linker='Win32 link.exe'
22006     ;;
22007
22008   *)
22009     # Assume MSVC wrapper
22010     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
22011     dynamic_linker='Win32 ld.exe'
22012     ;;
22013   esac
22014   # FIXME: first we should search . and the directory the executable is in
22015   shlibpath_var=PATH
22016   ;;
22017
22018 darwin* | rhapsody*)
22019   dynamic_linker="$host_os dyld"
22020   version_type=darwin
22021   need_lib_prefix=no
22022   need_version=no
22023   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
22024   soname_spec='${libname}${release}${major}$shared_ext'
22025   shlibpath_overrides_runpath=yes
22026   shlibpath_var=DYLD_LIBRARY_PATH
22027   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
22028
22029   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
22030   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
22031   ;;
22032
22033 dgux*)
22034   version_type=linux
22035   need_lib_prefix=no
22036   need_version=no
22037   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
22038   soname_spec='${libname}${release}${shared_ext}$major'
22039   shlibpath_var=LD_LIBRARY_PATH
22040   ;;
22041
22042 freebsd1*)
22043   dynamic_linker=no
22044   ;;
22045
22046 freebsd* | dragonfly*)
22047   # DragonFly does not have aout.  When/if they implement a new
22048   # versioning mechanism, adjust this.
22049   if test -x /usr/bin/objformat; then
22050     objformat=`/usr/bin/objformat`
22051   else
22052     case $host_os in
22053     freebsd[123]*) objformat=aout ;;
22054     *) objformat=elf ;;
22055     esac
22056   fi
22057   version_type=freebsd-$objformat
22058   case $version_type in
22059     freebsd-elf*)
22060       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
22061       need_version=no
22062       need_lib_prefix=no
22063       ;;
22064     freebsd-*)
22065       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
22066       need_version=yes
22067       ;;
22068   esac
22069   shlibpath_var=LD_LIBRARY_PATH
22070   case $host_os in
22071   freebsd2*)
22072     shlibpath_overrides_runpath=yes
22073     ;;
22074   freebsd3.[01]* | freebsdelf3.[01]*)
22075     shlibpath_overrides_runpath=yes
22076     hardcode_into_libs=yes
22077     ;;
22078   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
22079   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
22080     shlibpath_overrides_runpath=no
22081     hardcode_into_libs=yes
22082     ;;
22083   *) # from 4.6 on, and DragonFly
22084     shlibpath_overrides_runpath=yes
22085     hardcode_into_libs=yes
22086     ;;
22087   esac
22088   ;;
22089
22090 gnu*)
22091   version_type=linux
22092   need_lib_prefix=no
22093   need_version=no
22094   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
22095   soname_spec='${libname}${release}${shared_ext}$major'
22096   shlibpath_var=LD_LIBRARY_PATH
22097   hardcode_into_libs=yes
22098   ;;
22099
22100 haiku*)
22101   version_type=linux
22102   need_lib_prefix=no
22103   need_version=no
22104   dynamic_linker="$host_os runtime_loader"
22105   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
22106   soname_spec='${libname}${release}${shared_ext}$major'
22107   shlibpath_var=LIBRARY_PATH
22108   shlibpath_overrides_runpath=yes
22109   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
22110   hardcode_into_libs=yes
22111   ;;
22112
22113 hpux9* | hpux10* | hpux11*)
22114   # Give a soname corresponding to the major version so that dld.sl refuses to
22115   # link against other versions.
22116   version_type=sunos
22117   need_lib_prefix=no
22118   need_version=no
22119   case $host_cpu in
22120   ia64*)
22121     shrext_cmds='.so'
22122     hardcode_into_libs=yes
22123     dynamic_linker="$host_os dld.so"
22124     shlibpath_var=LD_LIBRARY_PATH
22125     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
22126     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22127     soname_spec='${libname}${release}${shared_ext}$major'
22128     if test "X$HPUX_IA64_MODE" = X32; then
22129       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
22130     else
22131       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
22132     fi
22133     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
22134     ;;
22135   hppa*64*)
22136     shrext_cmds='.sl'
22137     hardcode_into_libs=yes
22138     dynamic_linker="$host_os dld.sl"
22139     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
22140     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
22141     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22142     soname_spec='${libname}${release}${shared_ext}$major'
22143     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
22144     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
22145     ;;
22146   *)
22147     shrext_cmds='.sl'
22148     dynamic_linker="$host_os dld.sl"
22149     shlibpath_var=SHLIB_PATH
22150     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
22151     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22152     soname_spec='${libname}${release}${shared_ext}$major'
22153     ;;
22154   esac
22155   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
22156   postinstall_cmds='chmod 555 $lib'
22157   # or fails outright, so override atomically:
22158   install_override_mode=555
22159   ;;
22160
22161 interix[3-9]*)
22162   version_type=linux
22163   need_lib_prefix=no
22164   need_version=no
22165   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
22166   soname_spec='${libname}${release}${shared_ext}$major'
22167   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
22168   shlibpath_var=LD_LIBRARY_PATH
22169   shlibpath_overrides_runpath=no
22170   hardcode_into_libs=yes
22171   ;;
22172
22173 irix5* | irix6* | nonstopux*)
22174   case $host_os in
22175     nonstopux*) version_type=nonstopux ;;
22176     *)
22177         if test "$lt_cv_prog_gnu_ld" = yes; then
22178                 version_type=linux
22179         else
22180                 version_type=irix
22181         fi ;;
22182   esac
22183   need_lib_prefix=no
22184   need_version=no
22185   soname_spec='${libname}${release}${shared_ext}$major'
22186   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
22187   case $host_os in
22188   irix5* | nonstopux*)
22189     libsuff= shlibsuff=
22190     ;;
22191   *)
22192     case $LD in # libtool.m4 will add one of these switches to LD
22193     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
22194       libsuff= shlibsuff= libmagic=32-bit;;
22195     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
22196       libsuff=32 shlibsuff=N32 libmagic=N32;;
22197     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
22198       libsuff=64 shlibsuff=64 libmagic=64-bit;;
22199     *) libsuff= shlibsuff= libmagic=never-match;;
22200     esac
22201     ;;
22202   esac
22203   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
22204   shlibpath_overrides_runpath=no
22205   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
22206   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
22207   hardcode_into_libs=yes
22208   ;;
22209
22210 # No shared lib support for Linux oldld, aout, or coff.
22211 linux*oldld* | linux*aout* | linux*coff*)
22212   dynamic_linker=no
22213   ;;
22214
22215 # This must be Linux ELF.
22216 linux* | k*bsd*-gnu | kopensolaris*-gnu)
22217   version_type=linux
22218   need_lib_prefix=no
22219   need_version=no
22220   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22221   soname_spec='${libname}${release}${shared_ext}$major'
22222   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
22223   shlibpath_var=LD_LIBRARY_PATH
22224   shlibpath_overrides_runpath=no
22225
22226   # Some binutils ld are patched to set DT_RUNPATH
22227   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
22228   $as_echo_n "(cached) " >&6
22229 else
22230   lt_cv_shlibpath_overrides_runpath=no
22231     save_LDFLAGS=$LDFLAGS
22232     save_libdir=$libdir
22233     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
22234          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
22235     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22236 /* end confdefs.h.  */
22237
22238 int
22239 main ()
22240 {
22241
22242   ;
22243   return 0;
22244 }
22245 _ACEOF
22246 if ac_fn_c_try_link "$LINENO"; then :
22247   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
22248   lt_cv_shlibpath_overrides_runpath=yes
22249 fi
22250 fi
22251 rm -f core conftest.err conftest.$ac_objext \
22252     conftest$ac_exeext conftest.$ac_ext
22253     LDFLAGS=$save_LDFLAGS
22254     libdir=$save_libdir
22255
22256 fi
22257
22258   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
22259
22260   # This implies no fast_install, which is unacceptable.
22261   # Some rework will be needed to allow for fast_install
22262   # before this can be enabled.
22263   hardcode_into_libs=yes
22264
22265   # Append ld.so.conf contents to the search path
22266   if test -f /etc/ld.so.conf; then
22267     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' ' '`
22268     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
22269   fi
22270
22271   # We used to test for /lib/ld.so.1 and disable shared libraries on
22272   # powerpc, because MkLinux only supported shared libraries with the
22273   # GNU dynamic linker.  Since this was broken with cross compilers,
22274   # most powerpc-linux boxes support dynamic linking these days and
22275   # people can always --disable-shared, the test was removed, and we
22276   # assume the GNU/Linux dynamic linker is in use.
22277   dynamic_linker='GNU/Linux ld.so'
22278   ;;
22279
22280 netbsd*)
22281   version_type=sunos
22282   need_lib_prefix=no
22283   need_version=no
22284   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
22285     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
22286     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
22287     dynamic_linker='NetBSD (a.out) ld.so'
22288   else
22289     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
22290     soname_spec='${libname}${release}${shared_ext}$major'
22291     dynamic_linker='NetBSD ld.elf_so'
22292   fi
22293   shlibpath_var=LD_LIBRARY_PATH
22294   shlibpath_overrides_runpath=yes
22295   hardcode_into_libs=yes
22296   ;;
22297
22298 newsos6)
22299   version_type=linux
22300   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22301   shlibpath_var=LD_LIBRARY_PATH
22302   shlibpath_overrides_runpath=yes
22303   ;;
22304
22305 *nto* | *qnx*)
22306   version_type=qnx
22307   need_lib_prefix=no
22308   need_version=no
22309   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22310   soname_spec='${libname}${release}${shared_ext}$major'
22311   shlibpath_var=LD_LIBRARY_PATH
22312   shlibpath_overrides_runpath=no
22313   hardcode_into_libs=yes
22314   dynamic_linker='ldqnx.so'
22315   ;;
22316
22317 openbsd*)
22318   version_type=sunos
22319   sys_lib_dlsearch_path_spec="/usr/lib"
22320   need_lib_prefix=no
22321   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
22322   case $host_os in
22323     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
22324     *)                          need_version=no  ;;
22325   esac
22326   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
22327   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
22328   shlibpath_var=LD_LIBRARY_PATH
22329   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
22330     case $host_os in
22331       openbsd2.[89] | openbsd2.[89].*)
22332         shlibpath_overrides_runpath=no
22333         ;;
22334       *)
22335         shlibpath_overrides_runpath=yes
22336         ;;
22337       esac
22338   else
22339     shlibpath_overrides_runpath=yes
22340   fi
22341   ;;
22342
22343 os2*)
22344   libname_spec='$name'
22345   shrext_cmds=".dll"
22346   need_lib_prefix=no
22347   library_names_spec='$libname${shared_ext} $libname.a'
22348   dynamic_linker='OS/2 ld.exe'
22349   shlibpath_var=LIBPATH
22350   ;;
22351
22352 osf3* | osf4* | osf5*)
22353   version_type=osf
22354   need_lib_prefix=no
22355   need_version=no
22356   soname_spec='${libname}${release}${shared_ext}$major'
22357   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22358   shlibpath_var=LD_LIBRARY_PATH
22359   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
22360   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
22361   ;;
22362
22363 rdos*)
22364   dynamic_linker=no
22365   ;;
22366
22367 solaris*)
22368   version_type=linux
22369   need_lib_prefix=no
22370   need_version=no
22371   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22372   soname_spec='${libname}${release}${shared_ext}$major'
22373   shlibpath_var=LD_LIBRARY_PATH
22374   shlibpath_overrides_runpath=yes
22375   hardcode_into_libs=yes
22376   # ldd complains unless libraries are executable
22377   postinstall_cmds='chmod +x $lib'
22378   ;;
22379
22380 sunos4*)
22381   version_type=sunos
22382   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
22383   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
22384   shlibpath_var=LD_LIBRARY_PATH
22385   shlibpath_overrides_runpath=yes
22386   if test "$with_gnu_ld" = yes; then
22387     need_lib_prefix=no
22388   fi
22389   need_version=yes
22390   ;;
22391
22392 sysv4 | sysv4.3*)
22393   version_type=linux
22394   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22395   soname_spec='${libname}${release}${shared_ext}$major'
22396   shlibpath_var=LD_LIBRARY_PATH
22397   case $host_vendor in
22398     sni)
22399       shlibpath_overrides_runpath=no
22400       need_lib_prefix=no
22401       runpath_var=LD_RUN_PATH
22402       ;;
22403     siemens)
22404       need_lib_prefix=no
22405       ;;
22406     motorola)
22407       need_lib_prefix=no
22408       need_version=no
22409       shlibpath_overrides_runpath=no
22410       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
22411       ;;
22412   esac
22413   ;;
22414
22415 sysv4*MP*)
22416   if test -d /usr/nec ;then
22417     version_type=linux
22418     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
22419     soname_spec='$libname${shared_ext}.$major'
22420     shlibpath_var=LD_LIBRARY_PATH
22421   fi
22422   ;;
22423
22424 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
22425   version_type=freebsd-elf
22426   need_lib_prefix=no
22427   need_version=no
22428   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
22429   soname_spec='${libname}${release}${shared_ext}$major'
22430   shlibpath_var=LD_LIBRARY_PATH
22431   shlibpath_overrides_runpath=yes
22432   hardcode_into_libs=yes
22433   if test "$with_gnu_ld" = yes; then
22434     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
22435   else
22436     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
22437     case $host_os in
22438       sco3.2v5*)
22439         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
22440         ;;
22441     esac
22442   fi
22443   sys_lib_dlsearch_path_spec='/usr/lib'
22444   ;;
22445
22446 tpf*)
22447   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
22448   version_type=linux
22449   need_lib_prefix=no
22450   need_version=no
22451   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22452   shlibpath_var=LD_LIBRARY_PATH
22453   shlibpath_overrides_runpath=no
22454   hardcode_into_libs=yes
22455   ;;
22456
22457 uts4*)
22458   version_type=linux
22459   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22460   soname_spec='${libname}${release}${shared_ext}$major'
22461   shlibpath_var=LD_LIBRARY_PATH
22462   ;;
22463
22464 *)
22465   dynamic_linker=no
22466   ;;
22467 esac
22468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
22469 $as_echo "$dynamic_linker" >&6; }
22470 test "$dynamic_linker" = no && can_build_shared=no
22471
22472 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
22473 if test "$GCC" = yes; then
22474   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
22475 fi
22476
22477 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
22478   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
22479 fi
22480 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
22481   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
22482 fi
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
22573
22574
22575   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
22576 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
22577 hardcode_action=
22578 if test -n "$hardcode_libdir_flag_spec" ||
22579    test -n "$runpath_var" ||
22580    test "X$hardcode_automatic" = "Xyes" ; then
22581
22582   # We can hardcode non-existent directories.
22583   if test "$hardcode_direct" != no &&
22584      # If the only mechanism to avoid hardcoding is shlibpath_var, we
22585      # have to relink, otherwise we might link with an installed library
22586      # when we should be linking with a yet-to-be-installed one
22587      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
22588      test "$hardcode_minus_L" != no; then
22589     # Linking always hardcodes the temporary library directory.
22590     hardcode_action=relink
22591   else
22592     # We can link without hardcoding, and we can hardcode nonexisting dirs.
22593     hardcode_action=immediate
22594   fi
22595 else
22596   # We cannot hardcode anything, or else we can only hardcode existing
22597   # directories.
22598   hardcode_action=unsupported
22599 fi
22600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
22601 $as_echo "$hardcode_action" >&6; }
22602
22603 if test "$hardcode_action" = relink ||
22604    test "$inherit_rpath" = yes; then
22605   # Fast installation is not supported
22606   enable_fast_install=no
22607 elif test "$shlibpath_overrides_runpath" = yes ||
22608      test "$enable_shared" = no; then
22609   # Fast installation is not necessary
22610   enable_fast_install=needless
22611 fi
22612
22613
22614
22615
22616
22617
22618   if test "x$enable_dlopen" != xyes; then
22619   enable_dlopen=unknown
22620   enable_dlopen_self=unknown
22621   enable_dlopen_self_static=unknown
22622 else
22623   lt_cv_dlopen=no
22624   lt_cv_dlopen_libs=
22625
22626   case $host_os in
22627   beos*)
22628     lt_cv_dlopen="load_add_on"
22629     lt_cv_dlopen_libs=
22630     lt_cv_dlopen_self=yes
22631     ;;
22632
22633   mingw* | pw32* | cegcc*)
22634     lt_cv_dlopen="LoadLibrary"
22635     lt_cv_dlopen_libs=
22636     ;;
22637
22638   cygwin*)
22639     lt_cv_dlopen="dlopen"
22640     lt_cv_dlopen_libs=
22641     ;;
22642
22643   darwin*)
22644   # if libdl is installed we need to link against it
22645     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
22646 $as_echo_n "checking for dlopen in -ldl... " >&6; }
22647 if ${ac_cv_lib_dl_dlopen+:} false; then :
22648   $as_echo_n "(cached) " >&6
22649 else
22650   ac_check_lib_save_LIBS=$LIBS
22651 LIBS="-ldl  $LIBS"
22652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22653 /* end confdefs.h.  */
22654
22655 /* Override any GCC internal prototype to avoid an error.
22656    Use char because int might match the return type of a GCC
22657    builtin and then its argument prototype would still apply.  */
22658 #ifdef __cplusplus
22659 extern "C"
22660 #endif
22661 char dlopen ();
22662 int
22663 main ()
22664 {
22665 return dlopen ();
22666   ;
22667   return 0;
22668 }
22669 _ACEOF
22670 if ac_fn_c_try_link "$LINENO"; then :
22671   ac_cv_lib_dl_dlopen=yes
22672 else
22673   ac_cv_lib_dl_dlopen=no
22674 fi
22675 rm -f core conftest.err conftest.$ac_objext \
22676     conftest$ac_exeext conftest.$ac_ext
22677 LIBS=$ac_check_lib_save_LIBS
22678 fi
22679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
22680 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
22681 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
22682   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
22683 else
22684
22685     lt_cv_dlopen="dyld"
22686     lt_cv_dlopen_libs=
22687     lt_cv_dlopen_self=yes
22688
22689 fi
22690
22691     ;;
22692
22693   *)
22694     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
22695 if test "x$ac_cv_func_shl_load" = xyes; then :
22696   lt_cv_dlopen="shl_load"
22697 else
22698   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
22699 $as_echo_n "checking for shl_load in -ldld... " >&6; }
22700 if ${ac_cv_lib_dld_shl_load+:} false; then :
22701   $as_echo_n "(cached) " >&6
22702 else
22703   ac_check_lib_save_LIBS=$LIBS
22704 LIBS="-ldld  $LIBS"
22705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22706 /* end confdefs.h.  */
22707
22708 /* Override any GCC internal prototype to avoid an error.
22709    Use char because int might match the return type of a GCC
22710    builtin and then its argument prototype would still apply.  */
22711 #ifdef __cplusplus
22712 extern "C"
22713 #endif
22714 char shl_load ();
22715 int
22716 main ()
22717 {
22718 return shl_load ();
22719   ;
22720   return 0;
22721 }
22722 _ACEOF
22723 if ac_fn_c_try_link "$LINENO"; then :
22724   ac_cv_lib_dld_shl_load=yes
22725 else
22726   ac_cv_lib_dld_shl_load=no
22727 fi
22728 rm -f core conftest.err conftest.$ac_objext \
22729     conftest$ac_exeext conftest.$ac_ext
22730 LIBS=$ac_check_lib_save_LIBS
22731 fi
22732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
22733 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
22734 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
22735   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
22736 else
22737   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
22738 if test "x$ac_cv_func_dlopen" = xyes; then :
22739   lt_cv_dlopen="dlopen"
22740 else
22741   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
22742 $as_echo_n "checking for dlopen in -ldl... " >&6; }
22743 if ${ac_cv_lib_dl_dlopen+:} false; then :
22744   $as_echo_n "(cached) " >&6
22745 else
22746   ac_check_lib_save_LIBS=$LIBS
22747 LIBS="-ldl  $LIBS"
22748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22749 /* end confdefs.h.  */
22750
22751 /* Override any GCC internal prototype to avoid an error.
22752    Use char because int might match the return type of a GCC
22753    builtin and then its argument prototype would still apply.  */
22754 #ifdef __cplusplus
22755 extern "C"
22756 #endif
22757 char dlopen ();
22758 int
22759 main ()
22760 {
22761 return dlopen ();
22762   ;
22763   return 0;
22764 }
22765 _ACEOF
22766 if ac_fn_c_try_link "$LINENO"; then :
22767   ac_cv_lib_dl_dlopen=yes
22768 else
22769   ac_cv_lib_dl_dlopen=no
22770 fi
22771 rm -f core conftest.err conftest.$ac_objext \
22772     conftest$ac_exeext conftest.$ac_ext
22773 LIBS=$ac_check_lib_save_LIBS
22774 fi
22775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
22776 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
22777 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
22778   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
22779 else
22780   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
22781 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
22782 if ${ac_cv_lib_svld_dlopen+:} false; then :
22783   $as_echo_n "(cached) " >&6
22784 else
22785   ac_check_lib_save_LIBS=$LIBS
22786 LIBS="-lsvld  $LIBS"
22787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22788 /* end confdefs.h.  */
22789
22790 /* Override any GCC internal prototype to avoid an error.
22791    Use char because int might match the return type of a GCC
22792    builtin and then its argument prototype would still apply.  */
22793 #ifdef __cplusplus
22794 extern "C"
22795 #endif
22796 char dlopen ();
22797 int
22798 main ()
22799 {
22800 return dlopen ();
22801   ;
22802   return 0;
22803 }
22804 _ACEOF
22805 if ac_fn_c_try_link "$LINENO"; then :
22806   ac_cv_lib_svld_dlopen=yes
22807 else
22808   ac_cv_lib_svld_dlopen=no
22809 fi
22810 rm -f core conftest.err conftest.$ac_objext \
22811     conftest$ac_exeext conftest.$ac_ext
22812 LIBS=$ac_check_lib_save_LIBS
22813 fi
22814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
22815 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
22816 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
22817   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
22818 else
22819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
22820 $as_echo_n "checking for dld_link in -ldld... " >&6; }
22821 if ${ac_cv_lib_dld_dld_link+:} false; then :
22822   $as_echo_n "(cached) " >&6
22823 else
22824   ac_check_lib_save_LIBS=$LIBS
22825 LIBS="-ldld  $LIBS"
22826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22827 /* end confdefs.h.  */
22828
22829 /* Override any GCC internal prototype to avoid an error.
22830    Use char because int might match the return type of a GCC
22831    builtin and then its argument prototype would still apply.  */
22832 #ifdef __cplusplus
22833 extern "C"
22834 #endif
22835 char dld_link ();
22836 int
22837 main ()
22838 {
22839 return dld_link ();
22840   ;
22841   return 0;
22842 }
22843 _ACEOF
22844 if ac_fn_c_try_link "$LINENO"; then :
22845   ac_cv_lib_dld_dld_link=yes
22846 else
22847   ac_cv_lib_dld_dld_link=no
22848 fi
22849 rm -f core conftest.err conftest.$ac_objext \
22850     conftest$ac_exeext conftest.$ac_ext
22851 LIBS=$ac_check_lib_save_LIBS
22852 fi
22853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
22854 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
22855 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
22856   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
22857 fi
22858
22859
22860 fi
22861
22862
22863 fi
22864
22865
22866 fi
22867
22868
22869 fi
22870
22871
22872 fi
22873
22874     ;;
22875   esac
22876
22877   if test "x$lt_cv_dlopen" != xno; then
22878     enable_dlopen=yes
22879   else
22880     enable_dlopen=no
22881   fi
22882
22883   case $lt_cv_dlopen in
22884   dlopen)
22885     save_CPPFLAGS="$CPPFLAGS"
22886     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
22887
22888     save_LDFLAGS="$LDFLAGS"
22889     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
22890
22891     save_LIBS="$LIBS"
22892     LIBS="$lt_cv_dlopen_libs $LIBS"
22893
22894     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
22895 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
22896 if ${lt_cv_dlopen_self+:} false; then :
22897   $as_echo_n "(cached) " >&6
22898 else
22899           if test "$cross_compiling" = yes; then :
22900   lt_cv_dlopen_self=cross
22901 else
22902   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
22903   lt_status=$lt_dlunknown
22904   cat > conftest.$ac_ext <<_LT_EOF
22905 #line $LINENO "configure"
22906 #include "confdefs.h"
22907
22908 #if HAVE_DLFCN_H
22909 #include <dlfcn.h>
22910 #endif
22911
22912 #include <stdio.h>
22913
22914 #ifdef RTLD_GLOBAL
22915 #  define LT_DLGLOBAL           RTLD_GLOBAL
22916 #else
22917 #  ifdef DL_GLOBAL
22918 #    define LT_DLGLOBAL         DL_GLOBAL
22919 #  else
22920 #    define LT_DLGLOBAL         0
22921 #  endif
22922 #endif
22923
22924 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
22925    find out it does not work in some platform. */
22926 #ifndef LT_DLLAZY_OR_NOW
22927 #  ifdef RTLD_LAZY
22928 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
22929 #  else
22930 #    ifdef DL_LAZY
22931 #      define LT_DLLAZY_OR_NOW          DL_LAZY
22932 #    else
22933 #      ifdef RTLD_NOW
22934 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
22935 #      else
22936 #        ifdef DL_NOW
22937 #          define LT_DLLAZY_OR_NOW      DL_NOW
22938 #        else
22939 #          define LT_DLLAZY_OR_NOW      0
22940 #        endif
22941 #      endif
22942 #    endif
22943 #  endif
22944 #endif
22945
22946 /* When -fvisbility=hidden is used, assume the code has been annotated
22947    correspondingly for the symbols needed.  */
22948 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
22949 int fnord () __attribute__((visibility("default")));
22950 #endif
22951
22952 int fnord () { return 42; }
22953 int main ()
22954 {
22955   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
22956   int status = $lt_dlunknown;
22957
22958   if (self)
22959     {
22960       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
22961       else
22962         {
22963           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
22964           else puts (dlerror ());
22965         }
22966       /* dlclose (self); */
22967     }
22968   else
22969     puts (dlerror ());
22970
22971   return status;
22972 }
22973 _LT_EOF
22974   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
22975   (eval $ac_link) 2>&5
22976   ac_status=$?
22977   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22978   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
22979     (./conftest; exit; ) >&5 2>/dev/null
22980     lt_status=$?
22981     case x$lt_status in
22982       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
22983       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
22984       x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
22985     esac
22986   else :
22987     # compilation failed
22988     lt_cv_dlopen_self=no
22989   fi
22990 fi
22991 rm -fr conftest*
22992
22993
22994 fi
22995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
22996 $as_echo "$lt_cv_dlopen_self" >&6; }
22997
22998     if test "x$lt_cv_dlopen_self" = xyes; then
22999       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
23000       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
23001 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
23002 if ${lt_cv_dlopen_self_static+:} false; then :
23003   $as_echo_n "(cached) " >&6
23004 else
23005           if test "$cross_compiling" = yes; then :
23006   lt_cv_dlopen_self_static=cross
23007 else
23008   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
23009   lt_status=$lt_dlunknown
23010   cat > conftest.$ac_ext <<_LT_EOF
23011 #line $LINENO "configure"
23012 #include "confdefs.h"
23013
23014 #if HAVE_DLFCN_H
23015 #include <dlfcn.h>
23016 #endif
23017
23018 #include <stdio.h>
23019
23020 #ifdef RTLD_GLOBAL
23021 #  define LT_DLGLOBAL           RTLD_GLOBAL
23022 #else
23023 #  ifdef DL_GLOBAL
23024 #    define LT_DLGLOBAL         DL_GLOBAL
23025 #  else
23026 #    define LT_DLGLOBAL         0
23027 #  endif
23028 #endif
23029
23030 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
23031    find out it does not work in some platform. */
23032 #ifndef LT_DLLAZY_OR_NOW
23033 #  ifdef RTLD_LAZY
23034 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
23035 #  else
23036 #    ifdef DL_LAZY
23037 #      define LT_DLLAZY_OR_NOW          DL_LAZY
23038 #    else
23039 #      ifdef RTLD_NOW
23040 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
23041 #      else
23042 #        ifdef DL_NOW
23043 #          define LT_DLLAZY_OR_NOW      DL_NOW
23044 #        else
23045 #          define LT_DLLAZY_OR_NOW      0
23046 #        endif
23047 #      endif
23048 #    endif
23049 #  endif
23050 #endif
23051
23052 /* When -fvisbility=hidden is used, assume the code has been annotated
23053    correspondingly for the symbols needed.  */
23054 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
23055 int fnord () __attribute__((visibility("default")));
23056 #endif
23057
23058 int fnord () { return 42; }
23059 int main ()
23060 {
23061   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
23062   int status = $lt_dlunknown;
23063
23064   if (self)
23065     {
23066       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
23067       else
23068         {
23069           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
23070           else puts (dlerror ());
23071         }
23072       /* dlclose (self); */
23073     }
23074   else
23075     puts (dlerror ());
23076
23077   return status;
23078 }
23079 _LT_EOF
23080   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
23081   (eval $ac_link) 2>&5
23082   ac_status=$?
23083   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23084   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
23085     (./conftest; exit; ) >&5 2>/dev/null
23086     lt_status=$?
23087     case x$lt_status in
23088       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
23089       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
23090       x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
23091     esac
23092   else :
23093     # compilation failed
23094     lt_cv_dlopen_self_static=no
23095   fi
23096 fi
23097 rm -fr conftest*
23098
23099
23100 fi
23101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
23102 $as_echo "$lt_cv_dlopen_self_static" >&6; }
23103     fi
23104
23105     CPPFLAGS="$save_CPPFLAGS"
23106     LDFLAGS="$save_LDFLAGS"
23107     LIBS="$save_LIBS"
23108     ;;
23109   esac
23110
23111   case $lt_cv_dlopen_self in
23112   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
23113   *) enable_dlopen_self=unknown ;;
23114   esac
23115
23116   case $lt_cv_dlopen_self_static in
23117   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
23118   *) enable_dlopen_self_static=unknown ;;
23119   esac
23120 fi
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135
23136
23137
23138 striplib=
23139 old_striplib=
23140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
23141 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
23142 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
23143   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
23144   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
23145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23146 $as_echo "yes" >&6; }
23147 else
23148 # FIXME - insert some real tests, host_os isn't really good enough
23149   case $host_os in
23150   darwin*)
23151     if test -n "$STRIP" ; then
23152       striplib="$STRIP -x"
23153       old_striplib="$STRIP -S"
23154       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23155 $as_echo "yes" >&6; }
23156     else
23157       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23158 $as_echo "no" >&6; }
23159     fi
23160     ;;
23161   *)
23162     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23163 $as_echo "no" >&6; }
23164     ;;
23165   esac
23166 fi
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179   # Report which library types will actually be built
23180   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
23181 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
23182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
23183 $as_echo "$can_build_shared" >&6; }
23184
23185   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
23186 $as_echo_n "checking whether to build shared libraries... " >&6; }
23187   test "$can_build_shared" = "no" && enable_shared=no
23188
23189   # On AIX, shared libraries and static libraries use the same namespace, and
23190   # are all built from PIC.
23191   case $host_os in
23192   aix3*)
23193     test "$enable_shared" = yes && enable_static=no
23194     if test -n "$RANLIB"; then
23195       archive_cmds="$archive_cmds~\$RANLIB \$lib"
23196       postinstall_cmds='$RANLIB $lib'
23197     fi
23198     ;;
23199
23200   aix[4-9]*)
23201     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
23202       test "$enable_shared" = yes && enable_static=no
23203     fi
23204     ;;
23205   esac
23206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
23207 $as_echo "$enable_shared" >&6; }
23208
23209   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
23210 $as_echo_n "checking whether to build static libraries... " >&6; }
23211   # Make sure either enable_shared or enable_static is yes.
23212   test "$enable_shared" = yes || enable_static=yes
23213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
23214 $as_echo "$enable_static" >&6; }
23215
23216
23217
23218
23219 fi
23220 ac_ext=c
23221 ac_cpp='$CPP $CPPFLAGS'
23222 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23223 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23224 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23225
23226 CC="$lt_save_CC"
23227
23228
23229
23230
23231
23232
23233
23234
23235
23236
23237
23238
23239
23240         ac_config_commands="$ac_config_commands libtool"
23241
23242
23243
23244
23245 # Only expand once:
23246
23247
23248
23249
23250
23251
23252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
23253 $as_echo_n "checking if sntp will be built... " >&6; }
23254
23255 # Check whether --with-sntp was given.
23256 if test "${with_sntp+set}" = set; then :
23257   withval=$with_sntp;
23258 else
23259   with_sntp="${withsntp=yes}"
23260
23261 fi
23262
23263 case "$with_sntp" in
23264  no)
23265     SNTP=
23266     ;;
23267  *)
23268     SNTP=sntp
23269     ;;
23270 esac
23271
23272  if test -n "$SNTP"; then
23273   BUILD_SNTP_TRUE=
23274   BUILD_SNTP_FALSE='#'
23275 else
23276   BUILD_SNTP_TRUE='#'
23277   BUILD_SNTP_FALSE=
23278 fi
23279
23280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
23281 $as_echo "$with_sntp" >&6; }
23282
23283
23284
23285 case "$SNTP" in
23286  '')
23287     SNTP_DB=
23288     SNTP_DL=
23289     SNTP_DS=
23290     ;;
23291 esac
23292
23293 ###
23294
23295 # NTP has (so far) been relying on leading-edge autogen.
23296 # Therefore, by default:
23297 # - use the version we ship with
23298 # - do not install it
23299 # - build a static copy (AC_DISABLE_SHARED - done earlier)
23300 case "${enable_local_libopts+set}" in
23301  set) ;;
23302  *) enable_local_libopts=yes ;;
23303 esac
23304 case "${enable_libopts_install+set}" in
23305  set) ;;
23306  *) enable_libopts_install=no ;;
23307 esac
23308 enable_nls=no
23309
23310
23311   ac_header_dirent=no
23312 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
23313   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
23314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
23315 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
23316 if eval \${$as_ac_Header+:} false; then :
23317   $as_echo_n "(cached) " >&6
23318 else
23319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23320 /* end confdefs.h.  */
23321 #include <sys/types.h>
23322 #include <$ac_hdr>
23323
23324 int
23325 main ()
23326 {
23327 if ((DIR *) 0)
23328 return 0;
23329   ;
23330   return 0;
23331 }
23332 _ACEOF
23333 if ac_fn_c_try_compile "$LINENO"; then :
23334   eval "$as_ac_Header=yes"
23335 else
23336   eval "$as_ac_Header=no"
23337 fi
23338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23339 fi
23340 eval ac_res=\$$as_ac_Header
23341                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23342 $as_echo "$ac_res" >&6; }
23343 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23344   cat >>confdefs.h <<_ACEOF
23345 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
23346 _ACEOF
23347
23348 ac_header_dirent=$ac_hdr; break
23349 fi
23350
23351 done
23352 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
23353 if test $ac_header_dirent = dirent.h; then
23354   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
23355 $as_echo_n "checking for library containing opendir... " >&6; }
23356 if ${ac_cv_search_opendir+:} false; then :
23357   $as_echo_n "(cached) " >&6
23358 else
23359   ac_func_search_save_LIBS=$LIBS
23360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23361 /* end confdefs.h.  */
23362
23363 /* Override any GCC internal prototype to avoid an error.
23364    Use char because int might match the return type of a GCC
23365    builtin and then its argument prototype would still apply.  */
23366 #ifdef __cplusplus
23367 extern "C"
23368 #endif
23369 char opendir ();
23370 int
23371 main ()
23372 {
23373 return opendir ();
23374   ;
23375   return 0;
23376 }
23377 _ACEOF
23378 for ac_lib in '' dir; do
23379   if test -z "$ac_lib"; then
23380     ac_res="none required"
23381   else
23382     ac_res=-l$ac_lib
23383     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23384   fi
23385   if ac_fn_c_try_link "$LINENO"; then :
23386   ac_cv_search_opendir=$ac_res
23387 fi
23388 rm -f core conftest.err conftest.$ac_objext \
23389     conftest$ac_exeext
23390   if ${ac_cv_search_opendir+:} false; then :
23391   break
23392 fi
23393 done
23394 if ${ac_cv_search_opendir+:} false; then :
23395
23396 else
23397   ac_cv_search_opendir=no
23398 fi
23399 rm conftest.$ac_ext
23400 LIBS=$ac_func_search_save_LIBS
23401 fi
23402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
23403 $as_echo "$ac_cv_search_opendir" >&6; }
23404 ac_res=$ac_cv_search_opendir
23405 if test "$ac_res" != no; then :
23406   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23407
23408 fi
23409
23410 else
23411   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
23412 $as_echo_n "checking for library containing opendir... " >&6; }
23413 if ${ac_cv_search_opendir+:} false; then :
23414   $as_echo_n "(cached) " >&6
23415 else
23416   ac_func_search_save_LIBS=$LIBS
23417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23418 /* end confdefs.h.  */
23419
23420 /* Override any GCC internal prototype to avoid an error.
23421    Use char because int might match the return type of a GCC
23422    builtin and then its argument prototype would still apply.  */
23423 #ifdef __cplusplus
23424 extern "C"
23425 #endif
23426 char opendir ();
23427 int
23428 main ()
23429 {
23430 return opendir ();
23431   ;
23432   return 0;
23433 }
23434 _ACEOF
23435 for ac_lib in '' x; do
23436   if test -z "$ac_lib"; then
23437     ac_res="none required"
23438   else
23439     ac_res=-l$ac_lib
23440     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23441   fi
23442   if ac_fn_c_try_link "$LINENO"; then :
23443   ac_cv_search_opendir=$ac_res
23444 fi
23445 rm -f core conftest.err conftest.$ac_objext \
23446     conftest$ac_exeext
23447   if ${ac_cv_search_opendir+:} false; then :
23448   break
23449 fi
23450 done
23451 if ${ac_cv_search_opendir+:} false; then :
23452
23453 else
23454   ac_cv_search_opendir=no
23455 fi
23456 rm conftest.$ac_ext
23457 LIBS=$ac_func_search_save_LIBS
23458 fi
23459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
23460 $as_echo "$ac_cv_search_opendir" >&6; }
23461 ac_res=$ac_cv_search_opendir
23462 if test "$ac_res" != no; then :
23463   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23464
23465 fi
23466
23467 fi
23468
23469
23470   # =================
23471   # AC_CHECK_HEADERS
23472   # =================
23473   for ac_header in  \
23474       sys/mman.h    sys/param.h   sys/poll.h    sys/procset.h \
23475       sys/select.h  sys/socket.h  sys/stropts.h sys/time.h \
23476       sys/un.h      sys/wait.h    dlfcn.h       errno.h \
23477       fcntl.h       libgen.h      libintl.h     memory.h \
23478       netinet/in.h  setjmp.h      stdbool.h     sysexits.h \
23479       unistd.h      utime.h
23480 do :
23481   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23482 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23483 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23484   cat >>confdefs.h <<_ACEOF
23485 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23486 _ACEOF
23487
23488 fi
23489
23490 done
23491
23492
23493   for ac_header in stdarg.h     varargs.h
23494 do :
23495   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23496 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23497 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23498   cat >>confdefs.h <<_ACEOF
23499 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23500 _ACEOF
23501  lo_have_arg_hdr=true;break
23502 else
23503   lo_have_arg_hdr=false
23504 fi
23505
23506 done
23507
23508
23509   for ac_header in string.h     strings.h
23510 do :
23511   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23512 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23513 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23514   cat >>confdefs.h <<_ACEOF
23515 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23516 _ACEOF
23517  lo_have_str_hdr=true;break
23518 else
23519   lo_have_str_hdr=false
23520 fi
23521
23522 done
23523
23524
23525   for ac_header in limits.h     sys/limits.h  values.h
23526 do :
23527   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23528 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23529 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23530   cat >>confdefs.h <<_ACEOF
23531 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23532 _ACEOF
23533  lo_have_lim_hdr=true;break
23534 else
23535   lo_have_lim_hdr=false
23536 fi
23537
23538 done
23539
23540
23541   for ac_header in inttypes.h   stdint.h
23542 do :
23543   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23544 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23545 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23546   cat >>confdefs.h <<_ACEOF
23547 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23548 _ACEOF
23549  lo_have_typ_hdr=true;break
23550 else
23551   lo_have_typ_hdr=false
23552 fi
23553
23554 done
23555
23556
23557   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
23558 $as_echo_n "checking for working stdnoreturn.h... " >&6; }
23559 if ${gl_cv_header_working_stdnoreturn_h+:} false; then :
23560   $as_echo_n "(cached) " >&6
23561 else
23562   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23563 /* end confdefs.h.  */
23564 #include <stdlib.h>
23565             #include <stdnoreturn.h>
23566             /* Do not check for 'noreturn' after the return type.
23567                C11 allows it, but it's rarely done that way
23568                and circa-2012 bleeding-edge GCC rejects it when given
23569                -Werror=old-style-declaration.  */
23570             noreturn void foo1 (void) { exit (0); }
23571             _Noreturn void foo2 (void) { exit (0); }
23572             int testit (int argc, char **argv) {
23573               if (argc & 1)
23574                 return 0;
23575               (argv[0][0] ? foo1 : foo2) ();
23576             }
23577
23578 int
23579 main ()
23580 {
23581
23582   ;
23583   return 0;
23584 }
23585 _ACEOF
23586 if ac_fn_c_try_compile "$LINENO"; then :
23587   gl_cv_header_working_stdnoreturn_h=yes
23588 else
23589   gl_cv_header_working_stdnoreturn_h=no
23590 fi
23591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23592 fi
23593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
23594 $as_echo "$gl_cv_header_working_stdnoreturn_h" >&6; }
23595
23596   if test $gl_cv_header_working_stdnoreturn_h = yes; then
23597     STDNORETURN_H=''
23598   else
23599     STDNORETURN_H='stdnoreturn.h'
23600   fi
23601
23602
23603    if test -n "$STDNORETURN_H"; then
23604   GL_GENERATE_STDNORETURN_H_TRUE=
23605   GL_GENERATE_STDNORETURN_H_FALSE='#'
23606 else
23607   GL_GENERATE_STDNORETURN_H_TRUE='#'
23608   GL_GENERATE_STDNORETURN_H_FALSE=
23609 fi
23610
23611
23612
23613   # ----------------------------------------------------------------------
23614   # check for various programs used during the build.
23615   # On OS/X, "wchar.h" needs "runetype.h" to work properly.
23616   # ----------------------------------------------------------------------
23617   for ac_header in runetype.h wchar.h
23618 do :
23619   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23620 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
23621   $ac_includes_default
23622   #if HAVE_RUNETYPE_H
23623   # include <runetype.h>
23624   #endif
23625
23626 "
23627 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23628   cat >>confdefs.h <<_ACEOF
23629 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23630 _ACEOF
23631
23632 fi
23633
23634 done
23635
23636
23637   # Check whether --enable-nls was given.
23638 if test "${enable_nls+set}" = set; then :
23639   enableval=$enable_nls;
23640 fi
23641
23642   if test "x$enable_nls" != "xno" && \
23643   test "X${ac_cv_header_libintl_h}" = Xyes; then :
23644
23645
23646 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
23647
23648 fi
23649
23650   # --------------------------------------------
23651   # Verify certain entries from AC_CHECK_HEADERS
23652   # --------------------------------------------
23653   ${lo_have_arg_hdr} || \
23654     as_fn_error $? "you must have stdarg.h or varargs.h on your system" "$LINENO" 5
23655
23656   ${lo_have_str_hdr} || \
23657     as_fn_error $? "you must have string.h or strings.h on your system" "$LINENO" 5
23658
23659   ${lo_have_lim_hdr} || \
23660     as_fn_error $? "you must have one of limits.h, sys/limits.h or values.h" "$LINENO" 5
23661
23662   ${lo_have_typ_hdr} || \
23663     as_fn_error $? "you must have inttypes.h or stdint.h on your system" "$LINENO" 5
23664
23665   for f in sys_types sys_param sys_stat string errno stdlib memory setjmp
23666   do eval as_ac_var=\${ac_cv_header_${f}_h}
23667      test "X${as_ac_var}" = Xyes || {
23668        as_fn_error $? "you must have ${f}.h on your system" "$LINENO" 5
23669      }
23670   done
23671   test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
23672     echo '#include <stdint.h>' > inttypes.h
23673
23674   # ----------------------------------------------------------------------
23675   # Checks for typedefs
23676   # ----------------------------------------------------------------------
23677   ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
23678 if test "x$ac_cv_type_wchar_t" = xyes; then :
23679
23680 cat >>confdefs.h <<_ACEOF
23681 #define HAVE_WCHAR_T 1
23682 _ACEOF
23683
23684
23685 fi
23686
23687   ac_fn_c_check_type "$LINENO" "wint_t" "ac_cv_type_wint_t" "
23688     $ac_includes_default
23689     #if HAVE_RUNETYPE_H
23690     # include <runetype.h>
23691     #endif
23692     #if HAVE_WCHAR_H
23693     # include <wchar.h>
23694     #endif
23695
23696 "
23697 if test "x$ac_cv_type_wint_t" = xyes; then :
23698
23699 cat >>confdefs.h <<_ACEOF
23700 #define HAVE_WINT_T 1
23701 _ACEOF
23702
23703
23704 fi
23705
23706   ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
23707 if test "x$ac_cv_type_int8_t" = xyes; then :
23708
23709 cat >>confdefs.h <<_ACEOF
23710 #define HAVE_INT8_T 1
23711 _ACEOF
23712
23713
23714 fi
23715 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
23716 if test "x$ac_cv_type_uint8_t" = xyes; then :
23717
23718 cat >>confdefs.h <<_ACEOF
23719 #define HAVE_UINT8_T 1
23720 _ACEOF
23721
23722
23723 fi
23724 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
23725 if test "x$ac_cv_type_int16_t" = xyes; then :
23726
23727 cat >>confdefs.h <<_ACEOF
23728 #define HAVE_INT16_T 1
23729 _ACEOF
23730
23731
23732 fi
23733 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
23734 if test "x$ac_cv_type_uint16_t" = xyes; then :
23735
23736 cat >>confdefs.h <<_ACEOF
23737 #define HAVE_UINT16_T 1
23738 _ACEOF
23739
23740
23741 fi
23742 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
23743 if test "x$ac_cv_type_int32_t" = xyes; then :
23744
23745 cat >>confdefs.h <<_ACEOF
23746 #define HAVE_INT32_T 1
23747 _ACEOF
23748
23749
23750 fi
23751 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
23752 if test "x$ac_cv_type_uint32_t" = xyes; then :
23753
23754 cat >>confdefs.h <<_ACEOF
23755 #define HAVE_UINT32_T 1
23756 _ACEOF
23757
23758
23759 fi
23760 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
23761 if test "x$ac_cv_type_intptr_t" = xyes; then :
23762
23763 cat >>confdefs.h <<_ACEOF
23764 #define HAVE_INTPTR_T 1
23765 _ACEOF
23766
23767
23768 fi
23769 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
23770 if test "x$ac_cv_type_uintptr_t" = xyes; then :
23771
23772 cat >>confdefs.h <<_ACEOF
23773 #define HAVE_UINTPTR_T 1
23774 _ACEOF
23775
23776
23777 fi
23778 ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
23779 if test "x$ac_cv_type_uint_t" = xyes; then :
23780
23781 cat >>confdefs.h <<_ACEOF
23782 #define HAVE_UINT_T 1
23783 _ACEOF
23784
23785
23786 fi
23787 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
23788 if test "x$ac_cv_type_pid_t" = xyes; then :
23789
23790 cat >>confdefs.h <<_ACEOF
23791 #define HAVE_PID_T 1
23792 _ACEOF
23793
23794
23795 fi
23796 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
23797 if test "x$ac_cv_type_size_t" = xyes; then :
23798
23799 cat >>confdefs.h <<_ACEOF
23800 #define HAVE_SIZE_T 1
23801 _ACEOF
23802
23803
23804 fi
23805 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
23806 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
23807
23808 cat >>confdefs.h <<_ACEOF
23809 #define HAVE_PTRDIFF_T 1
23810 _ACEOF
23811
23812
23813 fi
23814
23815   # The cast to long int works around a bug in the HP C Compiler
23816 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23817 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23818 # This bug is HP SR number 8606223364.
23819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
23820 $as_echo_n "checking size of char *... " >&6; }
23821 if ${ac_cv_sizeof_char_p+:} false; then :
23822   $as_echo_n "(cached) " >&6
23823 else
23824   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p"        "$ac_includes_default"; then :
23825
23826 else
23827   if test "$ac_cv_type_char_p" = yes; then
23828      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23829 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23830 as_fn_error 77 "cannot compute sizeof (char *)
23831 See \`config.log' for more details" "$LINENO" 5; }
23832    else
23833      ac_cv_sizeof_char_p=0
23834    fi
23835 fi
23836
23837 fi
23838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
23839 $as_echo "$ac_cv_sizeof_char_p" >&6; }
23840
23841
23842
23843 cat >>confdefs.h <<_ACEOF
23844 #define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
23845 _ACEOF
23846
23847
23848   # The cast to long int works around a bug in the HP C Compiler
23849 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23850 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23851 # This bug is HP SR number 8606223364.
23852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
23853 $as_echo_n "checking size of int... " >&6; }
23854 if ${ac_cv_sizeof_int+:} false; then :
23855   $as_echo_n "(cached) " >&6
23856 else
23857   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
23858
23859 else
23860   if test "$ac_cv_type_int" = yes; then
23861      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23862 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23863 as_fn_error 77 "cannot compute sizeof (int)
23864 See \`config.log' for more details" "$LINENO" 5; }
23865    else
23866      ac_cv_sizeof_int=0
23867    fi
23868 fi
23869
23870 fi
23871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
23872 $as_echo "$ac_cv_sizeof_int" >&6; }
23873
23874
23875
23876 cat >>confdefs.h <<_ACEOF
23877 #define SIZEOF_INT $ac_cv_sizeof_int
23878 _ACEOF
23879
23880
23881   # The cast to long int works around a bug in the HP C Compiler
23882 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23883 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23884 # This bug is HP SR number 8606223364.
23885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
23886 $as_echo_n "checking size of long... " >&6; }
23887 if ${ac_cv_sizeof_long+:} false; then :
23888   $as_echo_n "(cached) " >&6
23889 else
23890   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
23891
23892 else
23893   if test "$ac_cv_type_long" = yes; then
23894      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23895 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23896 as_fn_error 77 "cannot compute sizeof (long)
23897 See \`config.log' for more details" "$LINENO" 5; }
23898    else
23899      ac_cv_sizeof_long=0
23900    fi
23901 fi
23902
23903 fi
23904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
23905 $as_echo "$ac_cv_sizeof_long" >&6; }
23906
23907
23908
23909 cat >>confdefs.h <<_ACEOF
23910 #define SIZEOF_LONG $ac_cv_sizeof_long
23911 _ACEOF
23912
23913
23914   # The cast to long int works around a bug in the HP C Compiler
23915 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23916 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23917 # This bug is HP SR number 8606223364.
23918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
23919 $as_echo_n "checking size of short... " >&6; }
23920 if ${ac_cv_sizeof_short+:} false; then :
23921   $as_echo_n "(cached) " >&6
23922 else
23923   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
23924
23925 else
23926   if test "$ac_cv_type_short" = yes; then
23927      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23928 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23929 as_fn_error 77 "cannot compute sizeof (short)
23930 See \`config.log' for more details" "$LINENO" 5; }
23931    else
23932      ac_cv_sizeof_short=0
23933    fi
23934 fi
23935
23936 fi
23937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
23938 $as_echo "$ac_cv_sizeof_short" >&6; }
23939
23940
23941
23942 cat >>confdefs.h <<_ACEOF
23943 #define SIZEOF_SHORT $ac_cv_sizeof_short
23944 _ACEOF
23945
23946
23947
23948   # ------------
23949   # AC_CHECK_LIB
23950   # ------------
23951   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
23952 $as_echo_n "checking for pathfind in -lgen... " >&6; }
23953 if ${ac_cv_lib_gen_pathfind+:} false; then :
23954   $as_echo_n "(cached) " >&6
23955 else
23956   ac_check_lib_save_LIBS=$LIBS
23957 LIBS="-lgen  $LIBS"
23958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23959 /* end confdefs.h.  */
23960
23961 /* Override any GCC internal prototype to avoid an error.
23962    Use char because int might match the return type of a GCC
23963    builtin and then its argument prototype would still apply.  */
23964 #ifdef __cplusplus
23965 extern "C"
23966 #endif
23967 char pathfind ();
23968 int
23969 main ()
23970 {
23971 return pathfind ();
23972   ;
23973   return 0;
23974 }
23975 _ACEOF
23976 if ac_fn_c_try_link "$LINENO"; then :
23977   ac_cv_lib_gen_pathfind=yes
23978 else
23979   ac_cv_lib_gen_pathfind=no
23980 fi
23981 rm -f core conftest.err conftest.$ac_objext \
23982     conftest$ac_exeext conftest.$ac_ext
23983 LIBS=$ac_check_lib_save_LIBS
23984 fi
23985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
23986 $as_echo "$ac_cv_lib_gen_pathfind" >&6; }
23987 if test "x$ac_cv_lib_gen_pathfind" = xyes; then :
23988   cat >>confdefs.h <<_ACEOF
23989 #define HAVE_LIBGEN 1
23990 _ACEOF
23991
23992   LIBS="-lgen $LIBS"
23993
23994 fi
23995
23996   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
23997 $as_echo_n "checking for gettext in -lintl... " >&6; }
23998 if ${ac_cv_lib_intl_gettext+:} false; then :
23999   $as_echo_n "(cached) " >&6
24000 else
24001   ac_check_lib_save_LIBS=$LIBS
24002 LIBS="-lintl  $LIBS"
24003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24004 /* end confdefs.h.  */
24005
24006 /* Override any GCC internal prototype to avoid an error.
24007    Use char because int might match the return type of a GCC
24008    builtin and then its argument prototype would still apply.  */
24009 #ifdef __cplusplus
24010 extern "C"
24011 #endif
24012 char gettext ();
24013 int
24014 main ()
24015 {
24016 return gettext ();
24017   ;
24018   return 0;
24019 }
24020 _ACEOF
24021 if ac_fn_c_try_link "$LINENO"; then :
24022   ac_cv_lib_intl_gettext=yes
24023 else
24024   ac_cv_lib_intl_gettext=no
24025 fi
24026 rm -f core conftest.err conftest.$ac_objext \
24027     conftest$ac_exeext conftest.$ac_ext
24028 LIBS=$ac_check_lib_save_LIBS
24029 fi
24030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
24031 $as_echo "$ac_cv_lib_intl_gettext" >&6; }
24032 if test "x$ac_cv_lib_intl_gettext" = xyes; then :
24033   cat >>confdefs.h <<_ACEOF
24034 #define HAVE_LIBINTL 1
24035 _ACEOF
24036
24037   LIBS="-lintl $LIBS"
24038
24039 fi
24040
24041   for ac_func in vprintf
24042 do :
24043   ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
24044 if test "x$ac_cv_func_vprintf" = xyes; then :
24045   cat >>confdefs.h <<_ACEOF
24046 #define HAVE_VPRINTF 1
24047 _ACEOF
24048
24049 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
24050 if test "x$ac_cv_func__doprnt" = xyes; then :
24051
24052 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
24053
24054 fi
24055
24056 fi
24057 done
24058
24059
24060   for ac_header in vfork.h
24061 do :
24062   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
24063 if test "x$ac_cv_header_vfork_h" = xyes; then :
24064   cat >>confdefs.h <<_ACEOF
24065 #define HAVE_VFORK_H 1
24066 _ACEOF
24067
24068 fi
24069
24070 done
24071
24072 for ac_func in fork vfork
24073 do :
24074   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24075 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24076 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
24077   cat >>confdefs.h <<_ACEOF
24078 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24079 _ACEOF
24080
24081 fi
24082 done
24083
24084 if test "x$ac_cv_func_fork" = xyes; then
24085   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
24086 $as_echo_n "checking for working fork... " >&6; }
24087 if ${ac_cv_func_fork_works+:} false; then :
24088   $as_echo_n "(cached) " >&6
24089 else
24090   if test "$cross_compiling" = yes; then :
24091   ac_cv_func_fork_works=cross
24092 else
24093   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24094 /* end confdefs.h.  */
24095 $ac_includes_default
24096 int
24097 main ()
24098 {
24099
24100           /* By Ruediger Kuhlmann. */
24101           return fork () < 0;
24102
24103   ;
24104   return 0;
24105 }
24106 _ACEOF
24107 if ac_fn_c_try_run "$LINENO"; then :
24108   ac_cv_func_fork_works=yes
24109 else
24110   ac_cv_func_fork_works=no
24111 fi
24112 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24113   conftest.$ac_objext conftest.beam conftest.$ac_ext
24114 fi
24115
24116 fi
24117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
24118 $as_echo "$ac_cv_func_fork_works" >&6; }
24119
24120 else
24121   ac_cv_func_fork_works=$ac_cv_func_fork
24122 fi
24123 if test "x$ac_cv_func_fork_works" = xcross; then
24124   case $host in
24125     *-*-amigaos* | *-*-msdosdjgpp*)
24126       # Override, as these systems have only a dummy fork() stub
24127       ac_cv_func_fork_works=no
24128       ;;
24129     *)
24130       ac_cv_func_fork_works=yes
24131       ;;
24132   esac
24133   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
24134 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
24135 fi
24136 ac_cv_func_vfork_works=$ac_cv_func_vfork
24137 if test "x$ac_cv_func_vfork" = xyes; then
24138   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
24139 $as_echo_n "checking for working vfork... " >&6; }
24140 if ${ac_cv_func_vfork_works+:} false; then :
24141   $as_echo_n "(cached) " >&6
24142 else
24143   if test "$cross_compiling" = yes; then :
24144   ac_cv_func_vfork_works=cross
24145 else
24146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24147 /* end confdefs.h.  */
24148 /* Thanks to Paul Eggert for this test.  */
24149 $ac_includes_default
24150 #include <sys/wait.h>
24151 #ifdef HAVE_VFORK_H
24152 # include <vfork.h>
24153 #endif
24154 /* On some sparc systems, changes by the child to local and incoming
24155    argument registers are propagated back to the parent.  The compiler
24156    is told about this with #include <vfork.h>, but some compilers
24157    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24158    static variable whose address is put into a register that is
24159    clobbered by the vfork.  */
24160 static void
24161 #ifdef __cplusplus
24162 sparc_address_test (int arg)
24163 # else
24164 sparc_address_test (arg) int arg;
24165 #endif
24166 {
24167   static pid_t child;
24168   if (!child) {
24169     child = vfork ();
24170     if (child < 0) {
24171       perror ("vfork");
24172       _exit(2);
24173     }
24174     if (!child) {
24175       arg = getpid();
24176       write(-1, "", 0);
24177       _exit (arg);
24178     }
24179   }
24180 }
24181
24182 int
24183 main ()
24184 {
24185   pid_t parent = getpid ();
24186   pid_t child;
24187
24188   sparc_address_test (0);
24189
24190   child = vfork ();
24191
24192   if (child == 0) {
24193     /* Here is another test for sparc vfork register problems.  This
24194        test uses lots of local variables, at least as many local
24195        variables as main has allocated so far including compiler
24196        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24197        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24198        reuse the register of parent for one of the local variables,
24199        since it will think that parent can't possibly be used any more
24200        in this routine.  Assigning to the local variable will thus
24201        munge parent in the parent process.  */
24202     pid_t
24203       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24204       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24205     /* Convince the compiler that p..p7 are live; otherwise, it might
24206        use the same hardware register for all 8 local variables.  */
24207     if (p != p1 || p != p2 || p != p3 || p != p4
24208         || p != p5 || p != p6 || p != p7)
24209       _exit(1);
24210
24211     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24212        from child file descriptors.  If the child closes a descriptor
24213        before it execs or exits, this munges the parent's descriptor
24214        as well.  Test for this by closing stdout in the child.  */
24215     _exit(close(fileno(stdout)) != 0);
24216   } else {
24217     int status;
24218     struct stat st;
24219
24220     while (wait(&status) != child)
24221       ;
24222     return (
24223          /* Was there some problem with vforking?  */
24224          child < 0
24225
24226          /* Did the child fail?  (This shouldn't happen.)  */
24227          || status
24228
24229          /* Did the vfork/compiler bug occur?  */
24230          || parent != getpid()
24231
24232          /* Did the file descriptor bug occur?  */
24233          || fstat(fileno(stdout), &st) != 0
24234          );
24235   }
24236 }
24237 _ACEOF
24238 if ac_fn_c_try_run "$LINENO"; then :
24239   ac_cv_func_vfork_works=yes
24240 else
24241   ac_cv_func_vfork_works=no
24242 fi
24243 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24244   conftest.$ac_objext conftest.beam conftest.$ac_ext
24245 fi
24246
24247 fi
24248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
24249 $as_echo "$ac_cv_func_vfork_works" >&6; }
24250
24251 fi;
24252 if test "x$ac_cv_func_fork_works" = xcross; then
24253   ac_cv_func_vfork_works=$ac_cv_func_vfork
24254   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
24255 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
24256 fi
24257
24258 if test "x$ac_cv_func_vfork_works" = xyes; then
24259
24260 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
24261
24262 else
24263
24264 $as_echo "#define vfork fork" >>confdefs.h
24265
24266 fi
24267 if test "x$ac_cv_func_fork_works" = xyes; then
24268
24269 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
24270
24271 fi
24272
24273   for ac_func in mmap canonicalize_file_name snprintf strdup strchr \
24274                  strrchr strsignal fchmod fstat chmod
24275 do :
24276   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24277 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24278 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
24279   cat >>confdefs.h <<_ACEOF
24280 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24281 _ACEOF
24282
24283 fi
24284 done
24285
24286   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
24287 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
24288 if ${ac_cv_path_SED+:} false; then :
24289   $as_echo_n "(cached) " >&6
24290 else
24291             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
24292      for ac_i in 1 2 3 4 5 6 7; do
24293        ac_script="$ac_script$as_nl$ac_script"
24294      done
24295      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
24296      { ac_script=; unset ac_script;}
24297      if test -z "$SED"; then
24298   ac_path_SED_found=false
24299   # Loop through the user's path and test for each of PROGNAME-LIST
24300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24301 for as_dir in $PATH
24302 do
24303   IFS=$as_save_IFS
24304   test -z "$as_dir" && as_dir=.
24305     for ac_prog in sed gsed; do
24306     for ac_exec_ext in '' $ac_executable_extensions; do
24307       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
24308       as_fn_executable_p "$ac_path_SED" || continue
24309 # Check for GNU ac_path_SED and select it if it is found.
24310   # Check for GNU $ac_path_SED
24311 case `"$ac_path_SED" --version 2>&1` in
24312 *GNU*)
24313   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
24314 *)
24315   ac_count=0
24316   $as_echo_n 0123456789 >"conftest.in"
24317   while :
24318   do
24319     cat "conftest.in" "conftest.in" >"conftest.tmp"
24320     mv "conftest.tmp" "conftest.in"
24321     cp "conftest.in" "conftest.nl"
24322     $as_echo '' >> "conftest.nl"
24323     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
24324     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
24325     as_fn_arith $ac_count + 1 && ac_count=$as_val
24326     if test $ac_count -gt ${ac_path_SED_max-0}; then
24327       # Best one so far, save it but keep looking for a better one
24328       ac_cv_path_SED="$ac_path_SED"
24329       ac_path_SED_max=$ac_count
24330     fi
24331     # 10*(2^10) chars as input seems more than enough
24332     test $ac_count -gt 10 && break
24333   done
24334   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
24335 esac
24336
24337       $ac_path_SED_found && break 3
24338     done
24339   done
24340   done
24341 IFS=$as_save_IFS
24342   if test -z "$ac_cv_path_SED"; then
24343     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
24344   fi
24345 else
24346   ac_cv_path_SED=$SED
24347 fi
24348
24349 fi
24350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
24351 $as_echo "$ac_cv_path_SED" >&6; }
24352  SED="$ac_cv_path_SED"
24353   rm -f conftest.sed
24354
24355   while :
24356   do
24357       POSIX_SHELL=`which bash`
24358       test -x "$POSIX_SHELL" && break
24359       POSIX_SHELL=`which dash`
24360       test -x "$POSIX_SHELL" && break
24361       POSIX_SHELL=/usr/xpg4/bin/sh
24362       test -x "$POSIX_SHELL" && break
24363       POSIX_SHELL=`/bin/sh -c '
24364           exec 2>/dev/null
24365           if ! true ; then exit 1 ; fi
24366           echo /bin/sh'`
24367       test -x "$POSIX_SHELL" && break
24368       as_fn_error $? "cannot locate a working POSIX shell" "$LINENO" 5
24369   done
24370
24371 cat >>confdefs.h <<_ACEOF
24372 #define POSIX_SHELL "${POSIX_SHELL}"
24373 _ACEOF
24374
24375
24376
24377
24378
24379   LIBOPTS_BUILD_BLOCKED=''
24380
24381
24382   NEED_LIBOPTS_DIR=''
24383
24384   # Check whether --enable-local-libopts was given.
24385 if test "${enable_local_libopts+set}" = set; then :
24386   enableval=$enable_local_libopts;
24387     if test x$enableval = xyes ; then
24388        { $as_echo "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
24389 $as_echo "$as_me: Using supplied libopts tearoff" >&6;}
24390        LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
24391        NEED_LIBOPTS_DIR=true
24392        LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
24393     fi
24394 fi
24395
24396
24397   # Check whether --enable-libopts-install was given.
24398 if test "${enable_libopts_install+set}" = set; then :
24399   enableval=$enable_libopts_install;
24400 fi
24401
24402    if test "X${enable_libopts_install}" = Xyes; then
24403   INSTALL_LIBOPTS_TRUE=
24404   INSTALL_LIBOPTS_FALSE='#'
24405 else
24406   INSTALL_LIBOPTS_TRUE='#'
24407   INSTALL_LIBOPTS_FALSE=
24408 fi
24409
24410
24411   if test -z "${NEED_LIBOPTS_DIR}" ; then
24412      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
24413 $as_echo_n "checking whether autoopts-config can be found... " >&6; }
24414
24415 # Check whether --with-autoopts-config was given.
24416 if test "${with_autoopts_config+set}" = set; then :
24417   withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
24418 else
24419   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
24420 $as_echo_n "checking whether autoopts-config is specified... " >&6; }
24421 if ${lo_cv_with_autoopts_config+:} false; then :
24422   $as_echo_n "(cached) " >&6
24423 else
24424   if autoopts-config --help 2>/dev/null 1>&2
24425         then lo_cv_with_autoopts_config=autoopts-config
24426         elif libopts-config --help 2>/dev/null 1>&2
24427         then lo_cv_with_autoopts_config=libopts-config
24428         else lo_cv_with_autoopts_config=no ; fi
24429 fi
24430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
24431 $as_echo "$lo_cv_with_autoopts_config" >&6; }
24432
24433 fi
24434  # end of AC_ARG_WITH
24435
24436      if ${lo_cv_test_autoopts+:} false; then :
24437   $as_echo_n "(cached) " >&6
24438 else
24439
24440         if test -z "${lo_cv_with_autoopts_config}" \
24441                 -o X"${lo_cv_with_autoopts_config}" = Xno
24442         then
24443            if autoopts-config --help 2>/dev/null 1>&2
24444            then lo_cv_with_autoopts_config=autoopts-config
24445            elif libopts-config --help 2>/dev/null 1>&2
24446            then lo_cv_with_autoopts_config=libopts-config
24447            else lo_cv_with_autoopts_config=false ; fi
24448         fi
24449         lo_cv_test_autoopts=`
24450             ${lo_cv_with_autoopts_config} --libs` 2> /dev/null
24451         if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"
24452         then lo_cv_test_autoopts=no ; fi
24453
24454 fi
24455  # end of CACHE_VAL
24456      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
24457 $as_echo "${lo_cv_test_autoopts}" >&6; }
24458
24459      if test "X${lo_cv_test_autoopts}" != Xno
24460      then
24461         LIBOPTS_LDADD="${lo_cv_test_autoopts}"
24462         LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
24463      else
24464         LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
24465         LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
24466         NEED_LIBOPTS_DIR=true
24467      fi
24468   fi # end of if test -z "${NEED_LIBOPTS_DIR}"
24469   if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
24470     NEED_LIBOPTS_DIR=''
24471   fi
24472    if test -n "${NEED_LIBOPTS_DIR}"; then
24473   NEED_LIBOPTS_TRUE=
24474   NEED_LIBOPTS_FALSE='#'
24475 else
24476   NEED_LIBOPTS_TRUE='#'
24477   NEED_LIBOPTS_FALSE=
24478 fi
24479
24480
24481
24482   LIBOPTS_DIR=libopts
24483
24484
24485 # end of AC_DEFUN of LIBOPTS_CHECK_COMMON
24486
24487
24488     if test -z "$NEED_LIBOPTS_TRUE"; then :
24489
24490
24491
24492   # Check to see if a reg expr header is specified.
24493
24494
24495 # Check whether --with-regex-header was given.
24496 if test "${with_regex_header+set}" = set; then :
24497   withval=$with_regex_header; libopts_cv_with_regex_header=${with_regex_header}
24498 else
24499   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a reg expr header is specified" >&5
24500 $as_echo_n "checking whether a reg expr header is specified... " >&6; }
24501 if ${libopts_cv_with_regex_header+:} false; then :
24502   $as_echo_n "(cached) " >&6
24503 else
24504   libopts_cv_with_regex_header=no
24505 fi
24506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_regex_header" >&5
24507 $as_echo "$libopts_cv_with_regex_header" >&6; }
24508
24509 fi
24510  # end of AC_ARG_WITH
24511   if test "X${libopts_cv_with_regex_header}" != Xno
24512   then
24513     cat >>confdefs.h <<_ACEOF
24514 #define REGEX_HEADER <${libopts_cv_with_regex_header}>
24515 _ACEOF
24516
24517   else
24518
24519 $as_echo "#define REGEX_HEADER <regex.h>" >>confdefs.h
24520
24521   fi
24522
24523
24524
24525   # Check to see if a working libregex can be found.
24526
24527
24528 # Check whether --with-libregex was given.
24529 if test "${with_libregex+set}" = set; then :
24530   withval=$with_libregex; libopts_cv_with_libregex_root=${with_libregex}
24531 else
24532   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex was specified" >&5
24533 $as_echo_n "checking whether with-libregex was specified... " >&6; }
24534 if ${libopts_cv_with_libregex_root+:} false; then :
24535   $as_echo_n "(cached) " >&6
24536 else
24537   libopts_cv_with_libregex_root=no
24538 fi
24539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_root" >&5
24540 $as_echo "$libopts_cv_with_libregex_root" >&6; }
24541
24542 fi
24543  # end of AC_ARG_WITH libregex
24544
24545   if test "${with_libregex+set}" = set && \
24546      test "X${withval}" = Xno
24547   then ## disabled by request
24548     libopts_cv_with_libregex_root=no
24549     libopts_cv_with_libregex_cflags=no
24550     libopts_cv_with_libregex_libs=no
24551   else
24552
24553
24554 # Check whether --with-libregex-cflags was given.
24555 if test "${with_libregex_cflags+set}" = set; then :
24556   withval=$with_libregex_cflags; libopts_cv_with_libregex_cflags=${with_libregex_cflags}
24557 else
24558   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-cflags was specified" >&5
24559 $as_echo_n "checking whether with-libregex-cflags was specified... " >&6; }
24560 if ${libopts_cv_with_libregex_cflags+:} false; then :
24561   $as_echo_n "(cached) " >&6
24562 else
24563   libopts_cv_with_libregex_cflags=no
24564 fi
24565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_cflags" >&5
24566 $as_echo "$libopts_cv_with_libregex_cflags" >&6; }
24567
24568 fi
24569  # end of AC_ARG_WITH libregex-cflags
24570
24571
24572 # Check whether --with-libregex-libs was given.
24573 if test "${with_libregex_libs+set}" = set; then :
24574   withval=$with_libregex_libs; libopts_cv_with_libregex_libs=${with_libregex_libs}
24575 else
24576   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-libs was specified" >&5
24577 $as_echo_n "checking whether with-libregex-libs was specified... " >&6; }
24578 if ${libopts_cv_with_libregex_libs+:} false; then :
24579   $as_echo_n "(cached) " >&6
24580 else
24581   libopts_cv_with_libregex_libs=no
24582 fi
24583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_libs" >&5
24584 $as_echo "$libopts_cv_with_libregex_libs" >&6; }
24585
24586 fi
24587  # end of AC_ARG_WITH libregex-libs
24588
24589   case "X${libopts_cv_with_libregex_cflags}" in
24590   Xyes|Xno|X )
24591     case "X${libopts_cv_with_libregex_root}" in
24592     Xyes|Xno|X ) libopts_cv_with_libregex_cflags=no ;;
24593     * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;;
24594     esac
24595   esac
24596   case "X${libopts_cv_with_libregex_libs}" in
24597   Xyes|Xno|X )
24598     case "X${libopts_cv_with_libregex_root}" in
24599     Xyes|Xno|X ) libopts_cv_with_libregex_libs=no ;;
24600     * )        libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex" ;;
24601     esac
24602   esac
24603   libopts_save_CPPFLAGS="${CPPFLAGS}"
24604   libopts_save_LIBS="${LIBS}"
24605   case "X${libopts_cv_with_libregex_cflags}" in
24606   Xyes|Xno|X )
24607     libopts_cv_with_libregex_cflags="" ;;
24608   * ) CPPFLAGS="${CPPFLAGS} ${libopts_cv_with_libregex_cflags}" ;;
24609   esac
24610   case "X${libopts_cv_with_libregex_libs}" in
24611   Xyes|Xno|X )
24612     libopts_cv_with_libregex_libs="" ;;
24613   * )
24614     LIBS="${LIBS} ${libopts_cv_with_libregex_libs}" ;;
24615   esac
24616   LIBREGEX_CFLAGS=""
24617   LIBREGEX_LIBS=""
24618   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libregex functions properly" >&5
24619 $as_echo_n "checking whether libregex functions properly... " >&6; }
24620   if ${libopts_cv_with_libregex+:} false; then :
24621   $as_echo_n "(cached) " >&6
24622 else
24623
24624   if test "$cross_compiling" = yes; then :
24625   libopts_cv_with_libregex=no
24626 else
24627   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24628 /* end confdefs.h.  */
24629 #include <stdio.h>
24630 #include <stdlib.h>
24631 #include <sys/types.h>
24632 #include REGEX_HEADER
24633 static regex_t re;
24634 void comp_re(char const * pzPat) {
24635   int res = regcomp( &re, pzPat, REG_EXTENDED|REG_ICASE|REG_NEWLINE );
24636   if (res == 0) return;
24637   exit( res ); }
24638 int main() {
24639   regmatch_t m[2];
24640   comp_re( "^.*\$"   );
24641   comp_re( "()|no.*" );
24642   comp_re( "."       );
24643   if (regexec( &re, "X", 2, m, 0 ) != 0)  return 1;
24644   if ((m[0].rm_so != 0) || (m[0].rm_eo != 1)) {
24645     fputs( "error: regex -->.<-- did not match\n", stderr );
24646     return 1;
24647   }
24648   return 0; }
24649 _ACEOF
24650 if ac_fn_c_try_run "$LINENO"; then :
24651   libopts_cv_with_libregex=yes
24652 else
24653   libopts_cv_with_libregex=no
24654 fi
24655 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24656   conftest.$ac_objext conftest.beam conftest.$ac_ext
24657 fi
24658  # end of AC_RUN_IFELSE
24659
24660 fi
24661  # end of AC_CACHE_VAL for libopts_cv_with_libregex
24662   fi ## disabled by request
24663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_with_libregex}" >&5
24664 $as_echo "${libopts_cv_with_libregex}" >&6; }
24665   if test "X${libopts_cv_with_libregex}" != Xno
24666   then
24667
24668 $as_echo "#define WITH_LIBREGEX 1" >>confdefs.h
24669
24670   else
24671     CPPFLAGS="${libopts_save_CPPFLAGS}"
24672     LIBS="${libopts_save_LIBS}"
24673     libopts_cv_with_libregex_root=no
24674 libopts_cv_with_libregex_cflags=no
24675 libopts_cv_with_libregex_libs=no
24676 libopts_cv_with_libregex=no
24677   fi
24678
24679
24680
24681   # Check to see if pathfind(3) works.
24682
24683   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pathfind(3) works" >&5
24684 $as_echo_n "checking whether pathfind(3) works... " >&6; }
24685   if ${libopts_cv_run_pathfind+:} false; then :
24686   $as_echo_n "(cached) " >&6
24687 else
24688
24689   if test "$cross_compiling" = yes; then :
24690   libopts_cv_run_pathfind=no
24691
24692 else
24693   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24694 /* end confdefs.h.  */
24695 #include <string.h>
24696 #include <stdlib.h>
24697 int main (int argc, char ** argv) {
24698    char * pz = pathfind( getenv( "PATH" ), "sh", "x" );
24699    return (pz == 0) ? 1 : 0;
24700 }
24701 _ACEOF
24702 if ac_fn_c_try_run "$LINENO"; then :
24703   libopts_cv_run_pathfind=yes
24704 else
24705   libopts_cv_run_pathfind=no
24706 fi
24707 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24708   conftest.$ac_objext conftest.beam conftest.$ac_ext
24709 fi
24710  # end of RUN_IFELSE
24711
24712 fi
24713  # end of AC_CACHE_VAL for libopts_cv_run_pathfind
24714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_pathfind}" >&5
24715 $as_echo "${libopts_cv_run_pathfind}" >&6; }
24716   if test "X${libopts_cv_run_pathfind}" != Xno
24717   then
24718
24719 $as_echo "#define HAVE_PATHFIND 1" >>confdefs.h
24720
24721   fi
24722
24723
24724
24725   # Check to see if /dev/zero is readable device.
24726
24727   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/zero is readable device" >&5
24728 $as_echo_n "checking whether /dev/zero is readable device... " >&6; }
24729   if ${libopts_cv_test_dev_zero+:} false; then :
24730   $as_echo_n "(cached) " >&6
24731 else
24732
24733     libopts_cv_test_dev_zero=`exec 2> /dev/null
24734 dzero=\`ls -lL /dev/zero | egrep ^c......r\`
24735 test -z "${dzero}" && exit 1
24736 echo ${dzero}`
24737     if test $? -ne 0 || test -z "$libopts_cv_test_dev_zero"
24738     then libopts_cv_test_dev_zero=no
24739     fi
24740
24741 fi
24742  # end of CACHE_VAL of libopts_cv_test_dev_zero
24743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_test_dev_zero}" >&5
24744 $as_echo "${libopts_cv_test_dev_zero}" >&6; }
24745   if test "X${libopts_cv_test_dev_zero}" != Xno
24746   then
24747
24748 $as_echo "#define HAVE_DEV_ZERO 1" >>confdefs.h
24749
24750   fi
24751
24752
24753
24754   # Check to see if we have a functional realpath(3C).
24755
24756   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a functional realpath(3C)" >&5
24757 $as_echo_n "checking whether we have a functional realpath(3C)... " >&6; }
24758   if ${libopts_cv_run_realpath+:} false; then :
24759   $as_echo_n "(cached) " >&6
24760 else
24761
24762   if test "$cross_compiling" = yes; then :
24763   libopts_cv_run_realpath=no
24764
24765 else
24766   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24767 /* end confdefs.h.  */
24768 #include <limits.h>
24769 #include <stdlib.h>
24770 int main (int argc, char ** argv) {
24771 #ifndef PATH_MAX
24772 choke me!!
24773 #else
24774    char zPath[PATH_MAX+1];
24775 #endif
24776    char *pz = realpath(argv[0], zPath);
24777    return (pz == zPath) ? 0 : 1;
24778 }
24779 _ACEOF
24780 if ac_fn_c_try_run "$LINENO"; then :
24781   libopts_cv_run_realpath=yes
24782 else
24783   libopts_cv_run_realpath=no
24784 fi
24785 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24786   conftest.$ac_objext conftest.beam conftest.$ac_ext
24787 fi
24788  # end of RUN_IFELSE
24789
24790 fi
24791  # end of AC_CACHE_VAL for libopts_cv_run_realpath
24792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_realpath}" >&5
24793 $as_echo "${libopts_cv_run_realpath}" >&6; }
24794   if test "X${libopts_cv_run_realpath}" != Xno
24795   then
24796
24797 $as_echo "#define HAVE_REALPATH 1" >>confdefs.h
24798
24799   fi
24800
24801
24802
24803   # Check to see if strftime() works.
24804
24805   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strftime() works" >&5
24806 $as_echo_n "checking whether strftime() works... " >&6; }
24807   if ${libopts_cv_run_strftime+:} false; then :
24808   $as_echo_n "(cached) " >&6
24809 else
24810
24811   if test "$cross_compiling" = yes; then :
24812   libopts_cv_run_strftime=no
24813
24814 else
24815   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24816 /* end confdefs.h.  */
24817 #include <time.h>
24818 #include <string.h>
24819 char t_buf[ 64 ];
24820 int main() {
24821   static char const z[] = "Thursday Aug 28 240";
24822   struct tm tm;
24823   tm.tm_sec   = 36;  /* seconds after the minute [0, 61]  */
24824   tm.tm_min   = 44;  /* minutes after the hour [0, 59] */
24825   tm.tm_hour  = 12;  /* hour since midnight [0, 23] */
24826   tm.tm_mday  = 28;  /* day of the month [1, 31] */
24827   tm.tm_mon   =  7;  /* months since January [0, 11] */
24828   tm.tm_year  = 86;  /* years since 1900 */
24829   tm.tm_wday  =  4;  /* days since Sunday [0, 6] */
24830   tm.tm_yday  = 239; /* days since January 1 [0, 365] */
24831   tm.tm_isdst =  1;  /* flag for daylight savings time */
24832   strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
24833   return (strcmp( t_buf, z ) != 0); }
24834 _ACEOF
24835 if ac_fn_c_try_run "$LINENO"; then :
24836   libopts_cv_run_strftime=yes
24837 else
24838   libopts_cv_run_strftime=no
24839 fi
24840 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24841   conftest.$ac_objext conftest.beam conftest.$ac_ext
24842 fi
24843  # end of RUN_IFELSE
24844
24845 fi
24846  # end of AC_CACHE_VAL for libopts_cv_run_strftime
24847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_strftime}" >&5
24848 $as_echo "${libopts_cv_run_strftime}" >&6; }
24849   if test "X${libopts_cv_run_strftime}" != Xno
24850   then
24851
24852 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
24853
24854   fi
24855
24856
24857
24858   # Check to see if fopen accepts "b" mode.
24859
24860   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"b\" mode" >&5
24861 $as_echo_n "checking whether fopen accepts \"b\" mode... " >&6; }
24862   if ${libopts_cv_run_fopen_binary+:} false; then :
24863   $as_echo_n "(cached) " >&6
24864 else
24865
24866   if test "$cross_compiling" = yes; then :
24867   libopts_cv_run_fopen_binary=no
24868
24869 else
24870   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24871 /* end confdefs.h.  */
24872 #include <stdio.h>
24873 int main (int argc, char ** argv) {
24874 FILE * fp = fopen("conftest.$ac_ext", "rb");
24875 return (fp == NULL) ? 1 : fclose(fp); }
24876 _ACEOF
24877 if ac_fn_c_try_run "$LINENO"; then :
24878   libopts_cv_run_fopen_binary=yes
24879 else
24880   libopts_cv_run_fopen_binary=no
24881 fi
24882 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24883   conftest.$ac_objext conftest.beam conftest.$ac_ext
24884 fi
24885  # end of RUN_IFELSE
24886
24887 fi
24888  # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
24889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_binary}" >&5
24890 $as_echo "${libopts_cv_run_fopen_binary}" >&6; }
24891   if test "X${libopts_cv_run_fopen_binary}" != Xno
24892   then
24893
24894 $as_echo "#define FOPEN_BINARY_FLAG \"b\"" >>confdefs.h
24895
24896   else
24897
24898 $as_echo "#define FOPEN_BINARY_FLAG \"\"" >>confdefs.h
24899
24900   fi
24901
24902
24903
24904   # Check to see if fopen accepts "t" mode.
24905
24906   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"t\" mode" >&5
24907 $as_echo_n "checking whether fopen accepts \"t\" mode... " >&6; }
24908   if ${libopts_cv_run_fopen_text+:} false; then :
24909   $as_echo_n "(cached) " >&6
24910 else
24911
24912   if test "$cross_compiling" = yes; then :
24913   libopts_cv_run_fopen_text=no
24914
24915 else
24916   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24917 /* end confdefs.h.  */
24918 #include <stdio.h>
24919 int main (int argc, char ** argv) {
24920 FILE * fp = fopen("conftest.$ac_ext", "rt");
24921 return (fp == NULL) ? 1 : fclose(fp); }
24922 _ACEOF
24923 if ac_fn_c_try_run "$LINENO"; then :
24924   libopts_cv_run_fopen_text=yes
24925 else
24926   libopts_cv_run_fopen_text=no
24927 fi
24928 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24929   conftest.$ac_objext conftest.beam conftest.$ac_ext
24930 fi
24931  # end of RUN_IFELSE
24932
24933 fi
24934  # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
24935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_text}" >&5
24936 $as_echo "${libopts_cv_run_fopen_text}" >&6; }
24937   if test "X${libopts_cv_run_fopen_text}" != Xno
24938   then
24939
24940 $as_echo "#define FOPEN_TEXT_FLAG \"t\"" >>confdefs.h
24941
24942   else
24943
24944 $as_echo "#define FOPEN_TEXT_FLAG \"\"" >>confdefs.h
24945
24946   fi
24947
24948
24949
24950   # Check to see if not wanting optional option args.
24951
24952   # Check whether --enable-optional-args was given.
24953 if test "${enable_optional_args+set}" = set; then :
24954   enableval=$enable_optional_args; libopts_cv_enable_optional_args=${enable_optional_args}
24955 else
24956   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether not wanting optional option args" >&5
24957 $as_echo_n "checking whether not wanting optional option args... " >&6; }
24958 if ${libopts_cv_enable_optional_args+:} false; then :
24959   $as_echo_n "(cached) " >&6
24960 else
24961   libopts_cv_enable_optional_args=yes
24962 fi
24963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_enable_optional_args" >&5
24964 $as_echo "$libopts_cv_enable_optional_args" >&6; }
24965
24966 fi
24967  # end of AC_ARG_ENABLE
24968   if test "X${libopts_cv_enable_optional_args}" = Xno
24969   then
24970
24971 $as_echo "#define NO_OPTIONAL_OPT_ARGS 1" >>confdefs.h
24972
24973   fi
24974
24975
24976
24977
24978
24979           fi
24980   ac_config_files="$ac_config_files libopts/Makefile"
24981
24982   # end of AC_DEFUN of LIBOPTS_CHECK
24983
24984
24985 # From when we only used libevent for sntp:
24986 #AM_COND_IF(
24987 #    [BUILD_SNTP],
24988 #    [NTP_LIBEVENT_CHECK],
24989 #    [NTP_LIBEVENT_CHECK_NOBUILD]
24990 #)
24991
24992
24993
24994 ntp_pkgconfig_min_version='0.15.0'
24995 if test -n "$ac_tool_prefix"; then
24996   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24997 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24999 $as_echo_n "checking for $ac_word... " >&6; }
25000 if ${ac_cv_path_PKG_CONFIG+:} false; then :
25001   $as_echo_n "(cached) " >&6
25002 else
25003   case $PKG_CONFIG in
25004   [\\/]* | ?:[\\/]*)
25005   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
25006   ;;
25007   *)
25008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25009 for as_dir in $PATH
25010 do
25011   IFS=$as_save_IFS
25012   test -z "$as_dir" && as_dir=.
25013     for ac_exec_ext in '' $ac_executable_extensions; do
25014   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25015     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
25016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25017     break 2
25018   fi
25019 done
25020   done
25021 IFS=$as_save_IFS
25022
25023   ;;
25024 esac
25025 fi
25026 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
25027 if test -n "$PKG_CONFIG"; then
25028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
25029 $as_echo "$PKG_CONFIG" >&6; }
25030 else
25031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25032 $as_echo "no" >&6; }
25033 fi
25034
25035
25036 fi
25037 if test -z "$ac_cv_path_PKG_CONFIG"; then
25038   ac_pt_PKG_CONFIG=$PKG_CONFIG
25039   # Extract the first word of "pkg-config", so it can be a program name with args.
25040 set dummy pkg-config; ac_word=$2
25041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25042 $as_echo_n "checking for $ac_word... " >&6; }
25043 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
25044   $as_echo_n "(cached) " >&6
25045 else
25046   case $ac_pt_PKG_CONFIG in
25047   [\\/]* | ?:[\\/]*)
25048   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
25049   ;;
25050   *)
25051   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25052 for as_dir in $PATH
25053 do
25054   IFS=$as_save_IFS
25055   test -z "$as_dir" && as_dir=.
25056     for ac_exec_ext in '' $ac_executable_extensions; do
25057   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25058     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
25059     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25060     break 2
25061   fi
25062 done
25063   done
25064 IFS=$as_save_IFS
25065
25066   ;;
25067 esac
25068 fi
25069 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
25070 if test -n "$ac_pt_PKG_CONFIG"; then
25071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
25072 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
25073 else
25074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25075 $as_echo "no" >&6; }
25076 fi
25077
25078   if test "x$ac_pt_PKG_CONFIG" = x; then
25079     PKG_CONFIG=""
25080   else
25081     case $cross_compiling:$ac_tool_warned in
25082 yes:)
25083 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25084 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25085 ac_tool_warned=yes ;;
25086 esac
25087     PKG_CONFIG=$ac_pt_PKG_CONFIG
25088   fi
25089 else
25090   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
25091 fi
25092
25093 { ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
25094 { ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
25095
25096 case "$PKG_CONFIG" in
25097  /*)
25098     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
25099 $as_echo_n "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
25100     if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
25101         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25102 $as_echo "yes" >&6; }
25103     else
25104         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25105 $as_echo "no" >&6; }
25106         PKG_CONFIG=""
25107     fi
25108     ;;
25109 esac
25110
25111
25112
25113
25114 # Check whether --enable-local-libevent was given.
25115 if test "${enable_local_libevent+set}" = set; then :
25116   enableval=$enable_local_libevent; ntp_use_local_libevent=$enableval
25117 else
25118   ntp_use_local_libevent=${ntp_use_local_libevent-detect}
25119
25120 fi
25121
25122
25123
25124
25125
25126
25127
25128
25129
25130
25131 ntp_libevent_min_version=2
25132 ntp_libevent_tearoff=libevent
25133
25134
25135
25136
25137
25138 case "$ntp_use_local_libevent" in
25139  yes)
25140     ;;
25141  *) # If we have (a good enough) pkg-config, see if it can find libevent
25142     case "$PKG_CONFIG" in
25143      /*)
25144         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
25145 $as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
25146         if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
25147         then
25148             ntp_use_local_libevent=no
25149             { $as_echo "$as_me:${as_lineno-$LINENO}: Using the installed libevent" >&5
25150 $as_echo "$as_me: Using the installed libevent" >&6;}
25151             CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
25152             CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
25153             # HMS: I hope the following is accurate.
25154             # We don't need -levent, we only need  -levent_core.
25155             # While we could grab only the -L stuff, there *might* be
25156             # other flags there we want.  Originally we just removed -levent
25157             # but then somebody decided to install -levent-2.0
25158             # LDADD_LIBEVENT=`$PKG_CONFIG --libs libevent | sed 's:-levent::'`
25159             # So now we dance...
25160             LDADD_LIBEVENT=
25161             for i in `$PKG_CONFIG --libs libevent` `$PKG_CONFIG --cflags-only-other libevent_pthreads`
25162             do
25163                 case "$i" in
25164                  -D*) ;;
25165                  -levent*) ;;
25166                  *) case "$LDADD_LIBEVENT" in
25167                      '') LDADD_LIBEVENT="$i" ;;
25168                      *) LDADD_LIBEVENT="$LDADD_LIBEVENT $i" ;;
25169                     esac
25170                     ;;
25171                 esac
25172             done
25173             case "$LIBISC_PTHREADS_NOTHREADS" in
25174              pthreads)
25175                 LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads"
25176             esac
25177             LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core"
25178             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25179 $as_echo "yes" >&6; }
25180         else
25181             ntp_use_local_libevent=yes
25182             # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
25183             # is "pthreads"?
25184             CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
25185             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25186 $as_echo "no" >&6; }
25187         fi
25188         ;;
25189      *)
25190         ntp_use_local_libevent=yes
25191         ;;
25192     esac
25193     ;;
25194 esac
25195
25196 case "$ntp_use_local_libevent" in
25197  yes)
25198     { $as_echo "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
25199 $as_echo "$as_me: Using libevent tearoff" >&6;}
25200     CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
25201     case "$LIBISC_PTHREADS_NOTHREADS" in
25202      pthreads)
25203         LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_pthreads.la \$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
25204         ;;
25205      *)
25206         LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
25207     esac
25208 esac
25209
25210
25211  if test "x$ntp_use_local_libevent" = "xyes"; then
25212   BUILD_LIBEVENT_TRUE=
25213   BUILD_LIBEVENT_FALSE='#'
25214 else
25215   BUILD_LIBEVENT_TRUE='#'
25216   BUILD_LIBEVENT_FALSE=
25217 fi
25218
25219
25220
25221
25222 case "$ntp_libevent_tearoff" in
25223  libevent)
25224     ;;
25225  *)
25226     as_fn_error $? "ntp_libevent.m4 dir must be libevent, not $ntp_libevent_tearoff" "$LINENO" 5
25227     ;;
25228 esac
25229
25230 case "$ntp_use_local_libevent" in
25231  yes)
25232                         ac_configure_args=" --disable-openssl${ac_configure_args}"
25233     ac_configure_args=" --disable-shared${ac_configure_args}"
25234     ac_configure_args=" --disable-libevent-regress${ac_configure_args}"
25235     ac_configure_args=" --disable-libevent-install${ac_configure_args}"
25236     ac_configure_args=" --enable-silent-rules${ac_configure_args}"
25237     ac_configure_args=" --enable-function-sections${ac_configure_args}"
25238     subdirs="$subdirs libevent"
25239
25240     ;;
25241  *)
25242     NTP_FORCE_LIBEVENT_DIST=libevent
25243     ;;
25244 esac
25245
25246
25247
25248 # Checks for libraries.
25249
25250
25251 LIB_SYSLOG=''
25252
25253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
25254 $as_echo_n "checking for library containing openlog... " >&6; }
25255 if ${ac_cv_search_openlog+:} false; then :
25256   $as_echo_n "(cached) " >&6
25257 else
25258   ac_func_search_save_LIBS=$LIBS
25259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25260 /* end confdefs.h.  */
25261
25262 /* Override any GCC internal prototype to avoid an error.
25263    Use char because int might match the return type of a GCC
25264    builtin and then its argument prototype would still apply.  */
25265 #ifdef __cplusplus
25266 extern "C"
25267 #endif
25268 char openlog ();
25269 int
25270 main ()
25271 {
25272 return openlog ();
25273   ;
25274   return 0;
25275 }
25276 _ACEOF
25277 for ac_lib in '' gen syslog; do
25278   if test -z "$ac_lib"; then
25279     ac_res="none required"
25280   else
25281     ac_res=-l$ac_lib
25282     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25283   fi
25284   if ac_fn_c_try_link "$LINENO"; then :
25285   ac_cv_search_openlog=$ac_res
25286 fi
25287 rm -f core conftest.err conftest.$ac_objext \
25288     conftest$ac_exeext
25289   if ${ac_cv_search_openlog+:} false; then :
25290   break
25291 fi
25292 done
25293 if ${ac_cv_search_openlog+:} false; then :
25294
25295 else
25296   ac_cv_search_openlog=no
25297 fi
25298 rm conftest.$ac_ext
25299 LIBS=$ac_func_search_save_LIBS
25300 fi
25301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
25302 $as_echo "$ac_cv_search_openlog" >&6; }
25303 ac_res=$ac_cv_search_openlog
25304 if test "$ac_res" != no; then :
25305   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25306   case "$ac_cv_search_openlog" in
25307  'none required') ;;
25308  no) ;;
25309  *) LIB_SYSLOG="$ac_cv_search_openlog $LIB_SYSLOG" ;;
25310  esac
25311
25312 fi
25313
25314
25315 # Checks for header files.
25316 for ac_header in netdb.h string.h strings.h syslog.h
25317 do :
25318   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25319 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25320 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25321   cat >>confdefs.h <<_ACEOF
25322 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25323 _ACEOF
25324
25325 fi
25326
25327 done
25328
25329
25330
25331 for ac_header in sysexits.h
25332 do :
25333   ac_fn_c_check_header_mongrel "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
25334 if test "x$ac_cv_header_sysexits_h" = xyes; then :
25335   cat >>confdefs.h <<_ACEOF
25336 #define HAVE_SYSEXITS_H 1
25337 _ACEOF
25338
25339 else
25340
25341
25342 $as_echo "#define EX_OK 0" >>confdefs.h
25343
25344
25345 $as_echo "#define EX_SOFTWARE 70" >>confdefs.h
25346
25347
25348 fi
25349
25350 done
25351
25352
25353
25354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
25355 $as_echo_n "checking for facilitynames in syslog.h... " >&6; }
25356 if ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+:} false; then :
25357   $as_echo_n "(cached) " >&6
25358 else
25359
25360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25361 /* end confdefs.h.  */
25362
25363 #define SYSLOG_NAMES
25364 #include <stdlib.h>
25365 #include <syslog.h>
25366
25367 int
25368 main ()
25369 {
25370  void *fnames; fnames = facilitynames;
25371   ;
25372   return 0;
25373 }
25374 _ACEOF
25375 if ac_fn_c_try_compile "$LINENO"; then :
25376   ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
25377 else
25378   ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
25379 fi
25380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25381 fi
25382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
25383 $as_echo "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
25384 case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
25385  yes)
25386
25387 $as_echo "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
25388
25389     ;;
25390  no)
25391     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
25392 $as_echo "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
25393     ;;
25394  cross)
25395     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
25396 $as_echo "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
25397     ;;
25398 esac
25399
25400
25401 # Checks for typedefs, structures, and compiler characteristics.
25402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
25403 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
25404 if ${ac_cv_header_stdbool_h+:} false; then :
25405   $as_echo_n "(cached) " >&6
25406 else
25407   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25408 /* end confdefs.h.  */
25409
25410              #include <stdbool.h>
25411              #ifndef bool
25412               "error: bool is not defined"
25413              #endif
25414              #ifndef false
25415               "error: false is not defined"
25416              #endif
25417              #if false
25418               "error: false is not 0"
25419              #endif
25420              #ifndef true
25421               "error: true is not defined"
25422              #endif
25423              #if true != 1
25424               "error: true is not 1"
25425              #endif
25426              #ifndef __bool_true_false_are_defined
25427               "error: __bool_true_false_are_defined is not defined"
25428              #endif
25429
25430              struct s { _Bool s: 1; _Bool t; } s;
25431
25432              char a[true == 1 ? 1 : -1];
25433              char b[false == 0 ? 1 : -1];
25434              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
25435              char d[(bool) 0.5 == true ? 1 : -1];
25436              /* See body of main program for 'e'.  */
25437              char f[(_Bool) 0.0 == false ? 1 : -1];
25438              char g[true];
25439              char h[sizeof (_Bool)];
25440              char i[sizeof s.t];
25441              enum { j = false, k = true, l = false * true, m = true * 256 };
25442              /* The following fails for
25443                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
25444              _Bool n[m];
25445              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
25446              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
25447              /* Catch a bug in an HP-UX C compiler.  See
25448                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
25449                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
25450               */
25451              _Bool q = true;
25452              _Bool *pq = &q;
25453
25454 int
25455 main ()
25456 {
25457
25458              bool e = &s;
25459              *pq |= q;
25460              *pq |= ! q;
25461              /* Refer to every declared value, to avoid compiler optimizations.  */
25462              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
25463                      + !m + !n + !o + !p + !q + !pq);
25464
25465   ;
25466   return 0;
25467 }
25468 _ACEOF
25469 if ac_fn_c_try_compile "$LINENO"; then :
25470   ac_cv_header_stdbool_h=yes
25471 else
25472   ac_cv_header_stdbool_h=no
25473 fi
25474 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25475 fi
25476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
25477 $as_echo "$ac_cv_header_stdbool_h" >&6; }
25478    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
25479 if test "x$ac_cv_type__Bool" = xyes; then :
25480
25481 cat >>confdefs.h <<_ACEOF
25482 #define HAVE__BOOL 1
25483 _ACEOF
25484
25485
25486 fi
25487
25488
25489 if test $ac_cv_header_stdbool_h = yes; then
25490
25491 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
25492
25493 fi
25494
25495
25496
25497
25498
25499 VER_SUFFIX=
25500
25501
25502
25503
25504 # Check whether --with-crypto was given.
25505 if test "${with_crypto+set}" = set; then :
25506   withval=$with_crypto;
25507 fi
25508
25509
25510 # Check whether --with-openssl-libdir was given.
25511 if test "${with_openssl_libdir+set}" = set; then :
25512   withval=$with_openssl_libdir;
25513 fi
25514
25515
25516 # Check whether --with-openssl-incdir was given.
25517 if test "${with_openssl_incdir+set}" = set; then :
25518   withval=$with_openssl_incdir;
25519 fi
25520
25521
25522 # Check whether --with-rpath was given.
25523 if test "${with_rpath+set}" = set; then :
25524   withval=$with_rpath;
25525 fi
25526
25527 ntp_openssl=no
25528 ntp_openssl_from_pkg_config=no
25529 with_crypto=${with_crypto:-openssl,libcrypto}
25530 case "$with_crypto" in
25531  yes)
25532     with_crypto=openssl,libcrypto
25533 esac
25534 case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
25535  no:*) ;;
25536  *:notempty:notgiven:notgiven)
25537     for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
25538         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
25539 $as_echo_n "checking pkg-config for $pkg... " >&6; }
25540         if $PKG_CONFIG --exists $pkg ; then
25541             CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
25542             CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
25543             LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`"
25544             LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l $pkg`"
25545             LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`"
25546             VER_SUFFIX=o
25547             ntp_openssl=yes
25548             ntp_openssl_from_pkg_config=yes
25549             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25550 $as_echo "yes" >&6; }
25551
25552             break
25553         fi
25554         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25555 $as_echo "no" >&6; }
25556     done
25557 esac
25558 case "$with_crypto:$ntp_openssl" in
25559  no:*) ;;
25560  *:no)
25561     need_dash_r=
25562     need_dash_Wlrpath=
25563     case "${with_rpath-notgiven}" in
25564      yes)
25565         # Lame - what to do if we need -Wl... but not -R?
25566         need_dash_r=1
25567         ;;
25568      notgiven)
25569         case "$host" in
25570          *-*-linux*)
25571             # This may really only be true for gcc
25572             need_dash_Wlrpath=1
25573             ;;
25574          *-*-netbsd*)
25575             need_dash_r=1
25576             ;;
25577          *-*-solaris*)
25578             need_dash_r=1
25579             ;;
25580         esac
25581         ;;
25582     esac
25583
25584     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
25585 $as_echo_n "checking for openssl library directory... " >&6; }
25586     with_openssl_libdir=${with_openssl_libdir-notgiven}
25587     case "$with_openssl_libdir" in
25588      notgiven)
25589         case "$build" in
25590          $host)
25591             with_openssl_libdir=default
25592             ;;
25593          *)
25594             with_openssl_libdir=no
25595             ;;
25596         esac
25597     esac
25598     case "$with_openssl_libdir" in
25599      default)
25600         # Look in:
25601         with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib"
25602         with_openssl_libdir="$with_openssl_libdir /usr/local/lib"
25603         with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib"
25604     esac
25605     case "$with_openssl_libdir" in
25606      no)
25607         ;;
25608      *) # Look for libcrypto.a and libssl.a:
25609         for i in $with_openssl_libdir no
25610         do
25611             case "$host" in
25612              *-*-darwin*)
25613                 test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
25614                 ;;
25615              *)
25616                 test -f $i/libcrypto.so -a -f $i/libssl.so && break
25617                 test -f $i/libcrypto.a -a -f $i/libssl.a && break
25618                 ;;
25619             esac
25620         done
25621         openssl_libdir=$i
25622         ;;
25623     esac
25624     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
25625 $as_echo "$openssl_libdir" >&6; }
25626     case "$openssl_libdir" in
25627      no)
25628         openssl_libdir=
25629         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
25630 $as_echo "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
25631     esac
25632
25633     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
25634 $as_echo_n "checking for openssl include directory... " >&6; }
25635     with_openssl_incdir=${with_openssl_incdir-notgiven}
25636     case "$with_openssl_incdir" in
25637      notgiven)
25638         # Look in:
25639         with_openssl_incdir="/usr/include /usr/sfw/include"
25640         with_openssl_incdir="$with_openssl_incdir /usr/local/include"
25641         with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include"
25642     esac
25643     case "$with_openssl_incdir" in
25644      no)
25645         ;;
25646      *) # look for openssl/evp.h:
25647         for i in $with_openssl_incdir no
25648         do
25649             test -f $i/openssl/evp.h && break
25650         done
25651         openssl_incdir=$i
25652         ;;
25653     esac
25654     { i=; unset i;}
25655     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
25656 $as_echo "$openssl_incdir" >&6; }
25657     case "$openssl_incdir" in
25658      no)
25659         openssl_incdir=
25660         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
25661 $as_echo "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
25662     esac
25663     if test -z "$openssl_libdir" -o -z "$openssl_incdir"
25664     then
25665         ntp_openssl=no
25666     else
25667         ntp_openssl=yes
25668         VER_SUFFIX=o
25669     fi
25670     case "$ntp_openssl" in
25671      yes)
25672         # We have OpenSSL inc/lib dirs - use them.
25673         case "$openssl_incdir" in
25674          /usr/include)
25675             ;;
25676          *)
25677             CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir"
25678             ;;
25679         esac
25680         case "$openssl_libdir" in
25681          /usr/lib)
25682             ;;
25683          *)
25684             LDADD_NTP="$LDADD_NTP -L$openssl_libdir"
25685             case "$need_dash_r" in
25686              1)
25687                 LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir"
25688             esac
25689             case "$need_dash_Wlrpath" in
25690              1)
25691                 LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir"
25692             esac
25693             ;;
25694         esac
25695         LDADD_NTP="$LDADD_NTP -lcrypto"
25696     esac
25697 esac
25698
25699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
25700 $as_echo_n "checking if we will use crypto... " >&6; }
25701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
25702 $as_echo "$ntp_openssl" >&6; }
25703
25704 case "$ntp_openssl" in
25705  yes)
25706
25707 $as_echo "#define OPENSSL /**/" >>confdefs.h
25708
25709     case "$VER_SUFFIX" in
25710      *o*) ;;
25711      *) as_fn_error $? "OPENSSL set but no 'o' in VER_SUFFIX!" "$LINENO" 5 ;;
25712     esac
25713     ;;
25714 esac
25715
25716 NTPO_SAVED_CPPFLAGS="$CPPFLAGS"
25717 CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP"
25718 NTPO_SAVED_LIBS="$LIBS"
25719
25720 #
25721 # check for linking with -lcrypto failure, and try -lcrypto -lz.
25722 # Helps m68k-atari-mint
25723 #
25724 case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
25725  yes:no)
25726     LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
25727     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
25728 $as_echo_n "checking if linking with -lcrypto alone works... " >&6; }
25729 if ${ntp_cv_bare_lcrypto+:} false; then :
25730   $as_echo_n "(cached) " >&6
25731 else
25732   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25733 /* end confdefs.h.  */
25734
25735                     #include "openssl/err.h"
25736                     #include "openssl/evp.h"
25737
25738 int
25739 main ()
25740 {
25741
25742                     ERR_load_crypto_strings();
25743                     OpenSSL_add_all_algorithms();
25744
25745
25746   ;
25747   return 0;
25748 }
25749 _ACEOF
25750 if ac_fn_c_try_link "$LINENO"; then :
25751   ntp_cv_bare_lcrypto=yes
25752 else
25753   ntp_cv_bare_lcrypto=no
25754
25755 fi
25756 rm -f core conftest.err conftest.$ac_objext \
25757     conftest$ac_exeext conftest.$ac_ext
25758
25759 fi
25760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
25761 $as_echo "$ntp_cv_bare_lcrypto" >&6; }
25762     case "$ntp_cv_bare_lcrypto" in
25763      no)
25764         LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
25765         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
25766 $as_echo_n "checking if linking with -lcrypto -lz works... " >&6; }
25767 if ${ntp_cv_lcrypto_lz+:} false; then :
25768   $as_echo_n "(cached) " >&6
25769 else
25770   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25771 /* end confdefs.h.  */
25772
25773                         #include "openssl/err.h"
25774                         #include "openssl/evp.h"
25775
25776 int
25777 main ()
25778 {
25779
25780                         ERR_load_crypto_strings();
25781                         OpenSSL_add_all_algorithms();
25782
25783
25784   ;
25785   return 0;
25786 }
25787 _ACEOF
25788 if ac_fn_c_try_link "$LINENO"; then :
25789   ntp_cv_lcrypto_lz=yes
25790 else
25791   ntp_cv_lcrypto_lz=no
25792
25793 fi
25794 rm -f core conftest.err conftest.$ac_objext \
25795     conftest$ac_exeext conftest.$ac_ext
25796
25797 fi
25798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
25799 $as_echo "$ntp_cv_lcrypto_lz" >&6; }
25800         case "$ntp_cv_lcrypto_lz" in
25801          yes)
25802              LDADD_NTP="$LDADD_NTP -lz"
25803         esac
25804     esac
25805 esac
25806
25807 #
25808 # Older OpenSSL headers have a number of callback prototypes inside
25809 # other function prototypes which trigger copious warnings with gcc's
25810 # -Wstrict-prototypes, which is included in -Wall.
25811 #
25812 # An example:
25813 #
25814 # int i2d_RSA_NET(const RSA *a, unsigned char **pp,
25815 #                 int (*cb)(), int sgckey);
25816 #                 ^^^^^^^^^^^
25817 #
25818 #
25819 #
25820 openssl_triggers_warnings=unknown
25821 NTPO_SAVED_CFLAGS="$CFLAGS"
25822
25823 case "$ntp_openssl:$GCC" in
25824  yes:yes)
25825     CFLAGS="$CFLAGS -Werror"
25826     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25827 /* end confdefs.h.  */
25828
25829
25830 int
25831 main ()
25832 {
25833
25834                 /* see if -Werror breaks gcc */
25835
25836
25837   ;
25838   return 0;
25839 }
25840 _ACEOF
25841 if ac_fn_c_try_compile "$LINENO"; then :
25842   gcc_handles_Werror=yes
25843 else
25844   gcc_handles_Werror=no
25845
25846 fi
25847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25848     case "$gcc_handles_Werror" in
25849      no)
25850         # if this gcc doesn't do -Werror go ahead and use
25851         # -Wstrict-prototypes.
25852         openssl_triggers_warnings=yes
25853         ;;
25854      yes)
25855         CFLAGS="$CFLAGS -Wstrict-prototypes"
25856         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25857 /* end confdefs.h.  */
25858
25859                     #include "openssl/asn1_mac.h"
25860                     #include "openssl/bn.h"
25861                     #include "openssl/err.h"
25862                     #include "openssl/evp.h"
25863                     #include "openssl/pem.h"
25864                     #include "openssl/rand.h"
25865                     #include "openssl/x509v3.h"
25866
25867 int
25868 main ()
25869 {
25870
25871                     /* empty body */
25872
25873
25874   ;
25875   return 0;
25876 }
25877 _ACEOF
25878 if ac_fn_c_try_compile "$LINENO"; then :
25879   openssl_triggers_warnings=no
25880 else
25881   openssl_triggers_warnings=yes
25882
25883 fi
25884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25885     esac
25886     case "$openssl_triggers_warnings" in
25887      yes)
25888         CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes"
25889         ;;
25890      *)
25891         CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
25892     esac
25893     ;;
25894  no:yes)
25895     # gcc without OpenSSL
25896     CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
25897 esac
25898
25899 # Because we don't want -Werror for the EVP_MD_do_all_sorted check
25900 CFLAGS="$NTPO_SAVED_CFLAGS"
25901
25902 case "$ntp_openssl" in
25903  yes)
25904     LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
25905     for ac_func in EVP_MD_do_all_sorted
25906 do :
25907   ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
25908 if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes; then :
25909   cat >>confdefs.h <<_ACEOF
25910 #define HAVE_EVP_MD_DO_ALL_SORTED 1
25911 _ACEOF
25912
25913 fi
25914 done
25915
25916     ;;
25917 esac
25918
25919 CPPFLAGS="$NTPO_SAVED_CPPFLAGS"
25920 LIBS="$NTPO_SAVED_LIBS"
25921 { NTPO_SAVED_CFLAGS=; unset NTPO_SAVED_CFLAGS;}
25922 { NTPO_SAVED_CPPFLAGS=; unset NTPO_SAVED_CPPFLAGS;}
25923 { NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;}
25924 { openssl_triggers_warnings=; unset openssl_triggers_warnings;}
25925 { ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
25926
25927
25928
25929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
25930 $as_echo_n "checking for struct sockaddr_storage... " >&6; }
25931 if ${ntp_cv_sockaddr_storage+:} false; then :
25932   $as_echo_n "(cached) " >&6
25933 else
25934   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25935 /* end confdefs.h.  */
25936
25937                 #ifdef HAVE_SYS_TYPES_H
25938                 # include <sys/types.h>
25939                 #endif
25940                 #ifdef HAVE_SYS_SOCKET_H
25941                 # include <sys/socket.h>
25942                 #endif
25943                 #ifdef HAVE_NETINET_IN_H
25944                 # include <netinet/in.h>
25945                 #endif
25946
25947 int
25948 main ()
25949 {
25950
25951                 struct sockaddr_storage n;
25952
25953
25954   ;
25955   return 0;
25956 }
25957 _ACEOF
25958 if ac_fn_c_try_compile "$LINENO"; then :
25959   ntp_cv_sockaddr_storage=yes
25960 else
25961   ntp_cv_sockaddr_storage=no
25962
25963 fi
25964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25965
25966 fi
25967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
25968 $as_echo "$ntp_cv_sockaddr_storage" >&6; }
25969 case "$ntp_cv_sockaddr_storage" in
25970  yes)
25971
25972 $as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
25973
25974     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
25975 $as_echo_n "checking for sockaddr_storage.__ss_family... " >&6; }
25976 if ${ntp_cv_have___ss_family+:} false; then :
25977   $as_echo_n "(cached) " >&6
25978 else
25979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25980 /* end confdefs.h.  */
25981
25982                     #ifdef HAVE_SYS_TYPES_H
25983                     # include <sys/types.h>
25984                     #endif
25985                     #ifdef HAVE_SYS_SOCKET_H
25986                     # include <sys/socket.h>
25987                     #endif
25988                     #ifdef HAVE_NETINET_IN_H
25989                     # include <netinet/in.h>
25990                     #endif
25991
25992 int
25993 main ()
25994 {
25995
25996                     struct sockaddr_storage s;
25997                     s.__ss_family = 1;
25998
25999
26000   ;
26001   return 0;
26002 }
26003 _ACEOF
26004 if ac_fn_c_try_compile "$LINENO"; then :
26005   ntp_cv_have___ss_family=yes
26006 else
26007   ntp_cv_have___ss_family=no
26008
26009 fi
26010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26011
26012 fi
26013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
26014 $as_echo "$ntp_cv_have___ss_family" >&6; }
26015     case "$ntp_cv_have___ss_family" in
26016      yes)
26017
26018 $as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
26019
26020     esac
26021
26022 esac
26023
26024
26025 #
26026 # Look for in_port_t.
26027 #
26028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
26029 $as_echo_n "checking for in_port_t... " >&6; }
26030 if ${isc_cv_have_in_port_t+:} false; then :
26031   $as_echo_n "(cached) " >&6
26032 else
26033   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26034 /* end confdefs.h.  */
26035
26036                 #include <sys/types.h>
26037                 #include <netinet/in.h>
26038
26039 int
26040 main ()
26041 {
26042
26043                 in_port_t port = 25;
26044                 return (0);
26045
26046
26047   ;
26048   return 0;
26049 }
26050 _ACEOF
26051 if ac_fn_c_try_compile "$LINENO"; then :
26052   isc_cv_have_in_port_t=yes
26053 else
26054   isc_cv_have_in_port_t=no
26055
26056 fi
26057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26058
26059 fi
26060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
26061 $as_echo "$isc_cv_have_in_port_t" >&6; }
26062 case "$isc_cv_have_in_port_t" in
26063  no)
26064
26065 $as_echo "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
26066
26067 esac
26068
26069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
26070 $as_echo_n "checking type of socklen arg for getsockname()... " >&6; }
26071 if ${ntp_cv_getsockname_socklen_type+:} false; then :
26072   $as_echo_n "(cached) " >&6
26073 else
26074
26075     getsockname_socklen_type_found=no
26076     for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
26077         for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
26078             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26079 /* end confdefs.h.  */
26080
26081                         #ifdef HAVE_SYS_TYPES_H
26082                         # include <sys/types.h>
26083                         #endif
26084                         #ifdef HAVE_SYS_SOCKET_H
26085                         # include <sys/socket.h>
26086                         #endif
26087
26088 int
26089 main ()
26090 {
26091
26092                         extern
26093                         getsockname(int, $getsockname_arg2,
26094                                 $ntp_cv_getsockname_socklen_type *);
26095
26096
26097   ;
26098   return 0;
26099 }
26100 _ACEOF
26101 if ac_fn_c_try_compile "$LINENO"; then :
26102   getsockname_socklen_type_found=yes ; break 2
26103 fi
26104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26105         done
26106     done
26107     case "$getsockname_socklen_type_found" in
26108      no)
26109         ntp_cv_getsockname_socklen_type='socklen_t'
26110     esac
26111     { getsockname_arg2=; unset getsockname_arg2;}
26112     { getsockname_socklen_type_found=; unset getsockname_socklen_type_found;}
26113
26114
26115 fi
26116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
26117 $as_echo "$ntp_cv_getsockname_socklen_type" >&6; }
26118
26119 cat >>confdefs.h <<_ACEOF
26120 #define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type
26121 _ACEOF
26122
26123
26124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
26125 $as_echo_n "checking struct sockaddr for sa_len... " >&6; }
26126 if ${isc_cv_platform_havesalen+:} false; then :
26127   $as_echo_n "(cached) " >&6
26128 else
26129   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26130 /* end confdefs.h.  */
26131
26132                 #include <sys/types.h>
26133                 #include <sys/socket.h>
26134
26135 int
26136 main ()
26137 {
26138
26139                 extern struct sockaddr *ps;
26140                 return ps->sa_len;
26141
26142
26143   ;
26144   return 0;
26145 }
26146 _ACEOF
26147 if ac_fn_c_try_compile "$LINENO"; then :
26148   isc_cv_platform_havesalen=yes
26149 else
26150   isc_cv_platform_havesalen=no
26151
26152 fi
26153 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26154
26155 fi
26156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_platform_havesalen" >&5
26157 $as_echo "$isc_cv_platform_havesalen" >&6; }
26158 case "$isc_cv_platform_havesalen" in
26159  yes)
26160
26161 $as_echo "#define ISC_PLATFORM_HAVESALEN 1" >>confdefs.h
26162
26163 esac
26164
26165 # Check whether --enable-ipv6 was given.
26166 if test "${enable_ipv6+set}" = set; then :
26167   enableval=$enable_ipv6;
26168 fi
26169
26170
26171 case "$enable_ipv6" in
26172  yes|''|autodetect)
26173     case "$host" in
26174      powerpc-ibm-aix4*)
26175         ;;
26176      *)
26177
26178 $as_echo "#define WANT_IPV6 1" >>confdefs.h
26179
26180         ;;
26181     esac
26182     ;;
26183  no)
26184     ;;
26185 esac
26186
26187
26188 case "$host" in
26189  *-*-darwin*)
26190
26191 $as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
26192
26193 esac
26194
26195
26196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5
26197 $as_echo_n "checking for IPv6 structures... " >&6; }
26198 if ${isc_cv_found_ipv6+:} false; then :
26199   $as_echo_n "(cached) " >&6
26200 else
26201   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26202 /* end confdefs.h.  */
26203
26204                 #include <sys/types.h>
26205                 #include <sys/socket.h>
26206                 #include <netinet/in.h>
26207
26208 int
26209 main ()
26210 {
26211
26212                 struct sockaddr_in6 sin6;
26213
26214
26215   ;
26216   return 0;
26217 }
26218 _ACEOF
26219 if ac_fn_c_try_compile "$LINENO"; then :
26220   isc_cv_found_ipv6=yes
26221 else
26222   isc_cv_found_ipv6=no
26223
26224 fi
26225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26226
26227 fi
26228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_found_ipv6" >&5
26229 $as_echo "$isc_cv_found_ipv6" >&6; }
26230
26231 #
26232 # See whether IPv6 support is provided via a Kame add-on.
26233 # This is done before other IPv6 linking tests so LIBS is properly set.
26234 #
26235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kame IPv6 support" >&5
26236 $as_echo_n "checking for Kame IPv6 support... " >&6; }
26237
26238 # Check whether --with-kame was given.
26239 if test "${with_kame+set}" = set; then :
26240   withval=$with_kame; use_kame="$withval"
26241 else
26242   use_kame="no"
26243
26244 fi
26245
26246 case "$use_kame" in
26247  no)
26248     ;;
26249  yes)
26250     kame_path=/usr/local/v6
26251     ;;
26252  *)
26253     kame_path="$use_kame"
26254     ;;
26255 esac
26256 case "$use_kame" in
26257  no)
26258     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26259 $as_echo "no" >&6; }
26260     ;;
26261  *)
26262     if test -f $kame_path/lib/libinet6.a; then
26263         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kame_path/lib/libinet6.a" >&5
26264 $as_echo "$kame_path/lib/libinet6.a" >&6; }
26265         LIBS="-L$kame_path/lib -linet6 $LIBS"
26266     else
26267         as_fn_error $? "$kame_path/lib/libinet6.a not found.
26268
26269 Please choose the proper path with the following command:
26270
26271     configure --with-kame=PATH
26272 " "$LINENO" 5
26273     fi
26274     ;;
26275 esac
26276
26277 #
26278 # Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
26279 # Including it on Kame-using platforms is very bad, though, because
26280 # Kame uses #error against direct inclusion.   So include it on only
26281 # the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
26282 # This is done before the in6_pktinfo check because that's what
26283 # netinet6/in6.h is needed for.
26284 #
26285 case "$host" in
26286  *-bsdi4.[01]*)
26287
26288 $as_echo "#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >>confdefs.h
26289
26290     isc_netinet6in6_hack="#include <netinet6/in6.h>"
26291     ;;
26292  *)
26293     isc_netinet6in6_hack=""
26294     ;;
26295 esac
26296
26297 #
26298 # This is similar to the netinet6/in6.h issue.
26299 #
26300 case "$host" in
26301  *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
26302
26303 $as_echo "#define ISC_PLATFORM_FIXIN6ISADDR 1" >>confdefs.h
26304
26305     isc_netinetin6_hack="#include <netinet/in6.h>"
26306     ;;
26307  *)
26308     isc_netinetin6_hack=""
26309     ;;
26310 esac
26311
26312
26313 case "$isc_cv_found_ipv6" in
26314  yes)
26315
26316 $as_echo "#define ISC_PLATFORM_HAVEIPV6 1" >>confdefs.h
26317
26318     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
26319 $as_echo_n "checking for in6_pktinfo... " >&6; }
26320 if ${isc_cv_have_in6_pktinfo+:} false; then :
26321   $as_echo_n "(cached) " >&6
26322 else
26323   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26324 /* end confdefs.h.  */
26325
26326                     #include <sys/types.h>
26327                     #include <sys/socket.h>
26328                     #include <netinet/in.h>
26329                     $isc_netinetin6_hack
26330                     $isc_netinet6in6_hack
26331
26332 int
26333 main ()
26334 {
26335
26336                     struct in6_pktinfo xyzzy;
26337
26338
26339   ;
26340   return 0;
26341 }
26342 _ACEOF
26343 if ac_fn_c_try_compile "$LINENO"; then :
26344   isc_cv_have_in6_pktinfo=yes
26345 else
26346   isc_cv_have_in6_pktinfo=no
26347
26348 fi
26349 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26350
26351 fi
26352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6_pktinfo" >&5
26353 $as_echo "$isc_cv_have_in6_pktinfo" >&6; }
26354     case "$isc_cv_have_in6_pktinfo" in
26355      yes)
26356
26357 $as_echo "#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >>confdefs.h
26358
26359     esac
26360
26361
26362     # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
26363     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_in6.sin6_scope_id" >&5
26364 $as_echo_n "checking for sockaddr_in6.sin6_scope_id... " >&6; }
26365 if ${isc_cv_have_sin6_scope_id+:} false; then :
26366   $as_echo_n "(cached) " >&6
26367 else
26368   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26369 /* end confdefs.h.  */
26370
26371                     #include <sys/types.h>
26372                     #include <sys/socket.h>
26373                     #include <netinet/in.h>
26374                     $isc_netinetin6_hack
26375                     $isc_netinet6in6_hack
26376
26377 int
26378 main ()
26379 {
26380
26381                     struct sockaddr_in6 xyzzy;
26382                     xyzzy.sin6_scope_id = 0;
26383
26384
26385   ;
26386   return 0;
26387 }
26388 _ACEOF
26389 if ac_fn_c_try_compile "$LINENO"; then :
26390   isc_cv_have_sin6_scope_id=yes
26391 else
26392   isc_cv_have_sin6_scope_id=no
26393
26394 fi
26395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26396
26397 fi
26398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_sin6_scope_id" >&5
26399 $as_echo "$isc_cv_have_sin6_scope_id" >&6; }
26400
26401     case "$isc_cv_have_sin6_scope_id" in
26402      yes)
26403
26404 $as_echo "#define ISC_PLATFORM_HAVESCOPEID 1" >>confdefs.h
26405
26406     esac
26407 esac
26408
26409
26410 # We need this check run even without isc_cv_found_ipv6=yes
26411
26412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
26413 $as_echo_n "checking for in6addr_any... " >&6; }
26414 if ${isc_cv_in6addr_any_links+:} false; then :
26415   $as_echo_n "(cached) " >&6
26416 else
26417
26418         SAVED_LIBS="$LIBS"
26419         LIBS="$LDADD_LIBNTP $LIBS"
26420         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26421 /* end confdefs.h.  */
26422 $ac_includes_default
26423                     #include <sys/socket.h>
26424                     #include <netinet/in.h>
26425                     $isc_netinetin6_hack
26426                     $isc_netinet6in6_hack
26427
26428 int
26429 main ()
26430 {
26431
26432                     printf("%x", in6addr_any.s6_addr[15]);
26433
26434
26435   ;
26436   return 0;
26437 }
26438 _ACEOF
26439 if ac_fn_c_try_link "$LINENO"; then :
26440   isc_cv_in6addr_any_links=yes
26441 else
26442   isc_cv_in6addr_any_links=no
26443
26444 fi
26445 rm -f core conftest.err conftest.$ac_objext \
26446     conftest$ac_exeext conftest.$ac_ext
26447         LIBS="$SAVED_LIBS"
26448         { SAVED_LIBS=; unset SAVED_LIBS;}
26449
26450
26451 fi
26452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
26453 $as_echo "$isc_cv_in6addr_any_links" >&6; }
26454
26455 case "$isc_cv_in6addr_any_links" in
26456  no)
26457
26458 $as_echo "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
26459
26460 esac
26461
26462
26463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5
26464 $as_echo_n "checking for struct if_laddrconf... " >&6; }
26465 if ${isc_cv_struct_if_laddrconf+:} false; then :
26466   $as_echo_n "(cached) " >&6
26467 else
26468   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26469 /* end confdefs.h.  */
26470
26471                 #include <sys/types.h>
26472                 #include <net/if6.h>
26473
26474 int
26475 main ()
26476 {
26477
26478                 struct if_laddrconf a;
26479
26480
26481   ;
26482   return 0;
26483 }
26484 _ACEOF
26485 if ac_fn_c_try_compile "$LINENO"; then :
26486   isc_cv_struct_if_laddrconf=yes
26487 else
26488   isc_cv_struct_if_laddrconf=no
26489
26490 fi
26491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26492
26493 fi
26494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrconf" >&5
26495 $as_echo "$isc_cv_struct_if_laddrconf" >&6; }
26496
26497 case "$isc_cv_struct_if_laddrconf" in
26498  yes)
26499
26500 $as_echo "#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" >>confdefs.h
26501
26502 esac
26503
26504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
26505 $as_echo_n "checking for struct if_laddrreq... " >&6; }
26506 if ${isc_cv_struct_if_laddrreq+:} false; then :
26507   $as_echo_n "(cached) " >&6
26508 else
26509   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26510 /* end confdefs.h.  */
26511
26512                 #include <sys/types.h>
26513                 #include <net/if6.h>
26514
26515 int
26516 main ()
26517 {
26518
26519                 struct if_laddrreq a;
26520
26521
26522   ;
26523   return 0;
26524 }
26525 _ACEOF
26526 if ac_fn_c_try_compile "$LINENO"; then :
26527   isc_cv_struct_if_laddrreq=yes
26528 else
26529   isc_cv_struct_if_laddrreq=no
26530
26531 fi
26532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26533
26534 fi
26535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrreq" >&5
26536 $as_echo "$isc_cv_struct_if_laddrreq" >&6; }
26537
26538 case "$isc_cv_struct_if_laddrreq" in
26539  yes)
26540
26541 $as_echo "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
26542
26543 esac
26544
26545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
26546 $as_echo_n "checking for multicast IP support... " >&6; }
26547 if ${ntp_cv_multicast+:} false; then :
26548   $as_echo_n "(cached) " >&6
26549 else
26550
26551         ntp_cv_multicast=no
26552         case "$host" in
26553          i386-sequent-sysv4)
26554             ;;
26555          *)
26556             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26557 /* end confdefs.h.  */
26558
26559                         #ifdef HAVE_NETINET_IN_H
26560                         # include <netinet/in.h>
26561                         #endif
26562
26563 int
26564 main ()
26565 {
26566
26567                         struct ip_mreq ipmr;
26568                         ipmr.imr_interface.s_addr = 0;
26569
26570
26571   ;
26572   return 0;
26573 }
26574 _ACEOF
26575 if ac_fn_c_try_compile "$LINENO"; then :
26576   ntp_cv_multicast=yes
26577 fi
26578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26579             ;;
26580         esac
26581
26582
26583 fi
26584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
26585 $as_echo "$ntp_cv_multicast" >&6; }
26586 case "$ntp_cv_multicast" in
26587  yes)
26588
26589 $as_echo "#define MCAST 1" >>confdefs.h
26590
26591     { $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
26592 $as_echo_n "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
26593 if ${ntp_cv_typeof_ip_multicast_loop+:} false; then :
26594   $as_echo_n "(cached) " >&6
26595 else
26596
26597             case "$host" in
26598              *-*-netbsd*|*-*-*linux*)
26599                 ntp_cv_typeof_ip_multicast_loop=u_int
26600                 ;;
26601              *)
26602                 ntp_cv_typeof_ip_multicast_loop=u_char
26603                 ;;
26604             esac
26605
26606
26607 fi
26608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
26609 $as_echo "$ntp_cv_typeof_ip_multicast_loop" >&6; }
26610
26611 cat >>confdefs.h <<_ACEOF
26612 #define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop
26613 _ACEOF
26614
26615 esac
26616
26617 # Check whether --enable-getifaddrs was given.
26618 if test "${enable_getifaddrs+set}" = set; then :
26619   enableval=$enable_getifaddrs; want_getifaddrs="$enableval"
26620 else
26621   want_getifaddrs="yes"
26622
26623 fi
26624
26625
26626 case $want_getifaddrs in
26627  glibc)
26628     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
26629 $as_echo "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
26630 esac
26631 case $want_getifaddrs in
26632  no)
26633     ;;
26634  *)
26635     SAVED_LIBS="$LIBS"
26636     LIBS="$LDADD_LIBNTP $LIBS"
26637     for ac_func in getifaddrs
26638 do :
26639   ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
26640 if test "x$ac_cv_func_getifaddrs" = xyes; then :
26641   cat >>confdefs.h <<_ACEOF
26642 #define HAVE_GETIFADDRS 1
26643 _ACEOF
26644
26645 fi
26646 done
26647
26648     LIBS="$SAVED_LIBS"
26649     { SAVED_LIBS=; unset SAVED_LIBS;}
26650     ;;
26651 esac
26652
26653 #
26654 # Check for if_nametoindex() for IPv6 scoped addresses support
26655 #
26656 case "$host" in
26657  *-hp-hpux*)
26658     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
26659 $as_echo_n "checking for library containing if_nametoindex... " >&6; }
26660 if ${ac_cv_search_if_nametoindex+:} false; then :
26661   $as_echo_n "(cached) " >&6
26662 else
26663   ac_func_search_save_LIBS=$LIBS
26664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26665 /* end confdefs.h.  */
26666
26667 /* Override any GCC internal prototype to avoid an error.
26668    Use char because int might match the return type of a GCC
26669    builtin and then its argument prototype would still apply.  */
26670 #ifdef __cplusplus
26671 extern "C"
26672 #endif
26673 char if_nametoindex ();
26674 int
26675 main ()
26676 {
26677 return if_nametoindex ();
26678   ;
26679   return 0;
26680 }
26681 _ACEOF
26682 for ac_lib in '' ipv6; do
26683   if test -z "$ac_lib"; then
26684     ac_res="none required"
26685   else
26686     ac_res=-l$ac_lib
26687     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26688   fi
26689   if ac_fn_c_try_link "$LINENO"; then :
26690   ac_cv_search_if_nametoindex=$ac_res
26691 fi
26692 rm -f core conftest.err conftest.$ac_objext \
26693     conftest$ac_exeext
26694   if ${ac_cv_search_if_nametoindex+:} false; then :
26695   break
26696 fi
26697 done
26698 if ${ac_cv_search_if_nametoindex+:} false; then :
26699
26700 else
26701   ac_cv_search_if_nametoindex=no
26702 fi
26703 rm conftest.$ac_ext
26704 LIBS=$ac_func_search_save_LIBS
26705 fi
26706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
26707 $as_echo "$ac_cv_search_if_nametoindex" >&6; }
26708 ac_res=$ac_cv_search_if_nametoindex
26709 if test "$ac_res" != no; then :
26710   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26711
26712 fi
26713
26714 esac
26715 SAVED_LIBS="$LIBS"
26716 LIBS="$LDADD_LIBNTP $LIBS"
26717 for ac_func in if_nametoindex
26718 do :
26719   ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
26720 if test "x$ac_cv_func_if_nametoindex" = xyes; then :
26721   cat >>confdefs.h <<_ACEOF
26722 #define HAVE_IF_NAMETOINDEX 1
26723 _ACEOF
26724
26725 fi
26726 done
26727
26728 LIBS="$SAVED_LIBS"
26729 { SAVED_LIBS=; unset SAVED_LIBS;}
26730 case "$ac_cv_func_if_nametoindex" in
26731  yes)
26732
26733 $as_echo "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
26734
26735 esac
26736
26737
26738
26739 ###
26740
26741 # Hacks
26742 # these need work if we're to move libntp under sntp
26743
26744 $as_echo "#define HAVE_NO_NICE 1" >>confdefs.h
26745
26746
26747 $as_echo "#define HAVE_TERMIOS 1" >>confdefs.h
26748
26749
26750 # Checks for library functions.
26751 for ac_func in socket
26752 do :
26753   ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
26754 if test "x$ac_cv_func_socket" = xyes; then :
26755   cat >>confdefs.h <<_ACEOF
26756 #define HAVE_SOCKET 1
26757 _ACEOF
26758
26759 fi
26760 done
26761
26762
26763
26764 # We may not need have_unity
26765 have_unity=false
26766 # Extract the first word of "ruby", so it can be a program name with args.
26767 set dummy ruby; ac_word=$2
26768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26769 $as_echo_n "checking for $ac_word... " >&6; }
26770 if ${ac_cv_path_PATH_RUBY+:} false; then :
26771   $as_echo_n "(cached) " >&6
26772 else
26773   case $PATH_RUBY in
26774   [\\/]* | ?:[\\/]*)
26775   ac_cv_path_PATH_RUBY="$PATH_RUBY" # Let the user override the test with a path.
26776   ;;
26777   *)
26778   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26779 for as_dir in $PATH
26780 do
26781   IFS=$as_save_IFS
26782   test -z "$as_dir" && as_dir=.
26783     for ac_exec_ext in '' $ac_executable_extensions; do
26784   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26785     ac_cv_path_PATH_RUBY="$as_dir/$ac_word$ac_exec_ext"
26786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26787     break 2
26788   fi
26789 done
26790   done
26791 IFS=$as_save_IFS
26792
26793   ;;
26794 esac
26795 fi
26796 PATH_RUBY=$ac_cv_path_PATH_RUBY
26797 if test -n "$PATH_RUBY"; then
26798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_RUBY" >&5
26799 $as_echo "$PATH_RUBY" >&6; }
26800 else
26801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26802 $as_echo "no" >&6; }
26803 fi
26804
26805
26806 case "$PATH_RUBY" in
26807  /*)
26808     have_unity=true
26809     ;;
26810  *) PATH_RUBY="false"
26811     ;;
26812 esac
26813 # We may not need UNITYBUILD_AVAILABLE
26814  if $have_unity; then
26815   UNITYBUILD_AVAILABLE_TRUE=
26816   UNITYBUILD_AVAILABLE_FALSE='#'
26817 else
26818   UNITYBUILD_AVAILABLE_TRUE='#'
26819   UNITYBUILD_AVAILABLE_FALSE=
26820 fi
26821
26822
26823
26824 # HMS: if we don't find c++ we should not look for gtest.
26825 ac_ext=cpp
26826 ac_cpp='$CXXCPP $CPPFLAGS'
26827 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26828 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26829 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26830 if test -z "$CXX"; then
26831   if test -n "$CCC"; then
26832     CXX=$CCC
26833   else
26834     if test -n "$ac_tool_prefix"; then
26835   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
26836   do
26837     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26838 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26840 $as_echo_n "checking for $ac_word... " >&6; }
26841 if ${ac_cv_prog_CXX+:} false; then :
26842   $as_echo_n "(cached) " >&6
26843 else
26844   if test -n "$CXX"; then
26845   ac_cv_prog_CXX="$CXX" # Let the user override the test.
26846 else
26847 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26848 for as_dir in $PATH
26849 do
26850   IFS=$as_save_IFS
26851   test -z "$as_dir" && as_dir=.
26852     for ac_exec_ext in '' $ac_executable_extensions; do
26853   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26854     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
26855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26856     break 2
26857   fi
26858 done
26859   done
26860 IFS=$as_save_IFS
26861
26862 fi
26863 fi
26864 CXX=$ac_cv_prog_CXX
26865 if test -n "$CXX"; then
26866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
26867 $as_echo "$CXX" >&6; }
26868 else
26869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26870 $as_echo "no" >&6; }
26871 fi
26872
26873
26874     test -n "$CXX" && break
26875   done
26876 fi
26877 if test -z "$CXX"; then
26878   ac_ct_CXX=$CXX
26879   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
26880 do
26881   # Extract the first word of "$ac_prog", so it can be a program name with args.
26882 set dummy $ac_prog; ac_word=$2
26883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26884 $as_echo_n "checking for $ac_word... " >&6; }
26885 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
26886   $as_echo_n "(cached) " >&6
26887 else
26888   if test -n "$ac_ct_CXX"; then
26889   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
26890 else
26891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26892 for as_dir in $PATH
26893 do
26894   IFS=$as_save_IFS
26895   test -z "$as_dir" && as_dir=.
26896     for ac_exec_ext in '' $ac_executable_extensions; do
26897   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26898     ac_cv_prog_ac_ct_CXX="$ac_prog"
26899     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26900     break 2
26901   fi
26902 done
26903   done
26904 IFS=$as_save_IFS
26905
26906 fi
26907 fi
26908 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
26909 if test -n "$ac_ct_CXX"; then
26910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
26911 $as_echo "$ac_ct_CXX" >&6; }
26912 else
26913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26914 $as_echo "no" >&6; }
26915 fi
26916
26917
26918   test -n "$ac_ct_CXX" && break
26919 done
26920
26921   if test "x$ac_ct_CXX" = x; then
26922     CXX="g++"
26923   else
26924     case $cross_compiling:$ac_tool_warned in
26925 yes:)
26926 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26927 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26928 ac_tool_warned=yes ;;
26929 esac
26930     CXX=$ac_ct_CXX
26931   fi
26932 fi
26933
26934   fi
26935 fi
26936 # Provide some information about the compiler.
26937 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
26938 set X $ac_compile
26939 ac_compiler=$2
26940 for ac_option in --version -v -V -qversion; do
26941   { { ac_try="$ac_compiler $ac_option >&5"
26942 case "(($ac_try" in
26943   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26944   *) ac_try_echo=$ac_try;;
26945 esac
26946 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
26947 $as_echo "$ac_try_echo"; } >&5
26948   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
26949   ac_status=$?
26950   if test -s conftest.err; then
26951     sed '10a\
26952 ... rest of stderr output deleted ...
26953          10q' conftest.err >conftest.er1
26954     cat conftest.er1 >&5
26955   fi
26956   rm -f conftest.er1 conftest.err
26957   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26958   test $ac_status = 0; }
26959 done
26960
26961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
26962 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
26963 if ${ac_cv_cxx_compiler_gnu+:} false; then :
26964   $as_echo_n "(cached) " >&6
26965 else
26966   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26967 /* end confdefs.h.  */
26968
26969 int
26970 main ()
26971 {
26972 #ifndef __GNUC__
26973        choke me
26974 #endif
26975
26976   ;
26977   return 0;
26978 }
26979 _ACEOF
26980 if ac_fn_cxx_try_compile "$LINENO"; then :
26981   ac_compiler_gnu=yes
26982 else
26983   ac_compiler_gnu=no
26984 fi
26985 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26986 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
26987
26988 fi
26989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
26990 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
26991 if test $ac_compiler_gnu = yes; then
26992   GXX=yes
26993 else
26994   GXX=
26995 fi
26996 ac_test_CXXFLAGS=${CXXFLAGS+set}
26997 ac_save_CXXFLAGS=$CXXFLAGS
26998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
26999 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
27000 if ${ac_cv_prog_cxx_g+:} false; then :
27001   $as_echo_n "(cached) " >&6
27002 else
27003   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
27004    ac_cxx_werror_flag=yes
27005    ac_cv_prog_cxx_g=no
27006    CXXFLAGS="-g"
27007    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27008 /* end confdefs.h.  */
27009
27010 int
27011 main ()
27012 {
27013
27014   ;
27015   return 0;
27016 }
27017 _ACEOF
27018 if ac_fn_cxx_try_compile "$LINENO"; then :
27019   ac_cv_prog_cxx_g=yes
27020 else
27021   CXXFLAGS=""
27022       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27023 /* end confdefs.h.  */
27024
27025 int
27026 main ()
27027 {
27028
27029   ;
27030   return 0;
27031 }
27032 _ACEOF
27033 if ac_fn_cxx_try_compile "$LINENO"; then :
27034
27035 else
27036   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
27037          CXXFLAGS="-g"
27038          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27039 /* end confdefs.h.  */
27040
27041 int
27042 main ()
27043 {
27044
27045   ;
27046   return 0;
27047 }
27048 _ACEOF
27049 if ac_fn_cxx_try_compile "$LINENO"; then :
27050   ac_cv_prog_cxx_g=yes
27051 fi
27052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27053 fi
27054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27055 fi
27056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27057    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
27058 fi
27059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
27060 $as_echo "$ac_cv_prog_cxx_g" >&6; }
27061 if test "$ac_test_CXXFLAGS" = set; then
27062   CXXFLAGS=$ac_save_CXXFLAGS
27063 elif test $ac_cv_prog_cxx_g = yes; then
27064   if test "$GXX" = yes; then
27065     CXXFLAGS="-g -O2"
27066   else
27067     CXXFLAGS="-g"
27068   fi
27069 else
27070   if test "$GXX" = yes; then
27071     CXXFLAGS="-O2"
27072   else
27073     CXXFLAGS=
27074   fi
27075 fi
27076 ac_ext=c
27077 ac_cpp='$CPP $CPPFLAGS'
27078 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27079 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27080 ac_compiler_gnu=$ac_cv_c_compiler_gnu
27081
27082 depcc="$CXX"  am_compiler_list=
27083
27084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
27085 $as_echo_n "checking dependency style of $depcc... " >&6; }
27086 if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
27087   $as_echo_n "(cached) " >&6
27088 else
27089   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
27090   # We make a subdir and do the tests there.  Otherwise we can end up
27091   # making bogus files that we don't know about and never remove.  For
27092   # instance it was reported that on HP-UX the gcc test will end up
27093   # making a dummy file named 'D' -- because '-MD' means "put the output
27094   # in D".
27095   rm -rf conftest.dir
27096   mkdir conftest.dir
27097   # Copy depcomp to subdir because otherwise we won't find it if we're
27098   # using a relative directory.
27099   cp "$am_depcomp" conftest.dir
27100   cd conftest.dir
27101   # We will build objects and dependencies in a subdirectory because
27102   # it helps to detect inapplicable dependency modes.  For instance
27103   # both Tru64's cc and ICC support -MD to output dependencies as a
27104   # side effect of compilation, but ICC will put the dependencies in
27105   # the current directory while Tru64 will put them in the object
27106   # directory.
27107   mkdir sub
27108
27109   am_cv_CXX_dependencies_compiler_type=none
27110   if test "$am_compiler_list" = ""; then
27111      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
27112   fi
27113   am__universal=false
27114   case " $depcc " in #(
27115      *\ -arch\ *\ -arch\ *) am__universal=true ;;
27116      esac
27117
27118   for depmode in $am_compiler_list; do
27119     # Setup a source with many dependencies, because some compilers
27120     # like to wrap large dependency lists on column 80 (with \), and
27121     # we should not choose a depcomp mode which is confused by this.
27122     #
27123     # We need to recreate these files for each test, as the compiler may
27124     # overwrite some of them when testing with obscure command lines.
27125     # This happens at least with the AIX C compiler.
27126     : > sub/conftest.c
27127     for i in 1 2 3 4 5 6; do
27128       echo '#include "conftst'$i'.h"' >> sub/conftest.c
27129       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
27130       # Solaris 10 /bin/sh.
27131       echo '/* dummy */' > sub/conftst$i.h
27132     done
27133     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
27134
27135     # We check with '-c' and '-o' for the sake of the "dashmstdout"
27136     # mode.  It turns out that the SunPro C++ compiler does not properly
27137     # handle '-M -o', and we need to detect this.  Also, some Intel
27138     # versions had trouble with output in subdirs.
27139     am__obj=sub/conftest.${OBJEXT-o}
27140     am__minus_obj="-o $am__obj"
27141     case $depmode in
27142     gcc)
27143       # This depmode causes a compiler race in universal mode.
27144       test "$am__universal" = false || continue
27145       ;;
27146     nosideeffect)
27147       # After this tag, mechanisms are not by side-effect, so they'll
27148       # only be used when explicitly requested.
27149       if test "x$enable_dependency_tracking" = xyes; then
27150         continue
27151       else
27152         break
27153       fi
27154       ;;
27155     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
27156       # This compiler won't grok '-c -o', but also, the minuso test has
27157       # not run yet.  These depmodes are late enough in the game, and
27158       # so weak that their functioning should not be impacted.
27159       am__obj=conftest.${OBJEXT-o}
27160       am__minus_obj=
27161       ;;
27162     none) break ;;
27163     esac
27164     if depmode=$depmode \
27165        source=sub/conftest.c object=$am__obj \
27166        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
27167        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
27168          >/dev/null 2>conftest.err &&
27169        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
27170        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
27171        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
27172        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
27173       # icc doesn't choke on unknown options, it will just issue warnings
27174       # or remarks (even with -Werror).  So we grep stderr for any message
27175       # that says an option was ignored or not supported.
27176       # When given -MP, icc 7.0 and 7.1 complain thusly:
27177       #   icc: Command line warning: ignoring option '-M'; no argument required
27178       # The diagnosis changed in icc 8.0:
27179       #   icc: Command line remark: option '-MP' not supported
27180       if (grep 'ignoring option' conftest.err ||
27181           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
27182         am_cv_CXX_dependencies_compiler_type=$depmode
27183         break
27184       fi
27185     fi
27186   done
27187
27188   cd ..
27189   rm -rf conftest.dir
27190 else
27191   am_cv_CXX_dependencies_compiler_type=none
27192 fi
27193
27194 fi
27195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
27196 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
27197 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
27198
27199  if
27200   test "x$enable_dependency_tracking" != xno \
27201   && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
27202   am__fastdepCXX_TRUE=
27203   am__fastdepCXX_FALSE='#'
27204 else
27205   am__fastdepCXX_TRUE='#'
27206   am__fastdepCXX_FALSE=
27207 fi
27208
27209
27210
27211
27212 func_stripname_cnf ()
27213 {
27214   case ${2} in
27215   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
27216   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
27217   esac
27218 } # func_stripname_cnf
27219
27220       if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
27221     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
27222     (test "X$CXX" != "Xg++"))) ; then
27223   ac_ext=cpp
27224 ac_cpp='$CXXCPP $CPPFLAGS'
27225 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27226 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27227 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
27229 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
27230 if test -z "$CXXCPP"; then
27231   if ${ac_cv_prog_CXXCPP+:} false; then :
27232   $as_echo_n "(cached) " >&6
27233 else
27234       # Double quotes because CXXCPP needs to be expanded
27235     for CXXCPP in "$CXX -E" "/lib/cpp"
27236     do
27237       ac_preproc_ok=false
27238 for ac_cxx_preproc_warn_flag in '' yes
27239 do
27240   # Use a header file that comes with gcc, so configuring glibc
27241   # with a fresh cross-compiler works.
27242   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27243   # <limits.h> exists even on freestanding compilers.
27244   # On the NeXT, cc -E runs the code through the compiler's parser,
27245   # not just through cpp. "Syntax error" is here to catch this case.
27246   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27247 /* end confdefs.h.  */
27248 #ifdef __STDC__
27249 # include <limits.h>
27250 #else
27251 # include <assert.h>
27252 #endif
27253                      Syntax error
27254 _ACEOF
27255 if ac_fn_cxx_try_cpp "$LINENO"; then :
27256
27257 else
27258   # Broken: fails on valid input.
27259 continue
27260 fi
27261 rm -f conftest.err conftest.i conftest.$ac_ext
27262
27263   # OK, works on sane cases.  Now check whether nonexistent headers
27264   # can be detected and how.
27265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27266 /* end confdefs.h.  */
27267 #include <ac_nonexistent.h>
27268 _ACEOF
27269 if ac_fn_cxx_try_cpp "$LINENO"; then :
27270   # Broken: success on invalid input.
27271 continue
27272 else
27273   # Passes both tests.
27274 ac_preproc_ok=:
27275 break
27276 fi
27277 rm -f conftest.err conftest.i conftest.$ac_ext
27278
27279 done
27280 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
27281 rm -f conftest.i conftest.err conftest.$ac_ext
27282 if $ac_preproc_ok; then :
27283   break
27284 fi
27285
27286     done
27287     ac_cv_prog_CXXCPP=$CXXCPP
27288
27289 fi
27290   CXXCPP=$ac_cv_prog_CXXCPP
27291 else
27292   ac_cv_prog_CXXCPP=$CXXCPP
27293 fi
27294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
27295 $as_echo "$CXXCPP" >&6; }
27296 ac_preproc_ok=false
27297 for ac_cxx_preproc_warn_flag in '' yes
27298 do
27299   # Use a header file that comes with gcc, so configuring glibc
27300   # with a fresh cross-compiler works.
27301   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27302   # <limits.h> exists even on freestanding compilers.
27303   # On the NeXT, cc -E runs the code through the compiler's parser,
27304   # not just through cpp. "Syntax error" is here to catch this case.
27305   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27306 /* end confdefs.h.  */
27307 #ifdef __STDC__
27308 # include <limits.h>
27309 #else
27310 # include <assert.h>
27311 #endif
27312                      Syntax error
27313 _ACEOF
27314 if ac_fn_cxx_try_cpp "$LINENO"; then :
27315
27316 else
27317   # Broken: fails on valid input.
27318 continue
27319 fi
27320 rm -f conftest.err conftest.i conftest.$ac_ext
27321
27322   # OK, works on sane cases.  Now check whether nonexistent headers
27323   # can be detected and how.
27324   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27325 /* end confdefs.h.  */
27326 #include <ac_nonexistent.h>
27327 _ACEOF
27328 if ac_fn_cxx_try_cpp "$LINENO"; then :
27329   # Broken: success on invalid input.
27330 continue
27331 else
27332   # Passes both tests.
27333 ac_preproc_ok=:
27334 break
27335 fi
27336 rm -f conftest.err conftest.i conftest.$ac_ext
27337
27338 done
27339 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
27340 rm -f conftest.i conftest.err conftest.$ac_ext
27341 if $ac_preproc_ok; then :
27342
27343 else
27344   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27345 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27346 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
27347 See \`config.log' for more details" "$LINENO" 5; }
27348 fi
27349
27350 ac_ext=c
27351 ac_cpp='$CPP $CPPFLAGS'
27352 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27353 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27354 ac_compiler_gnu=$ac_cv_c_compiler_gnu
27355
27356 else
27357   _lt_caught_CXX_error=yes
27358 fi
27359
27360 ac_ext=cpp
27361 ac_cpp='$CXXCPP $CPPFLAGS'
27362 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27363 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27364 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27365
27366 archive_cmds_need_lc_CXX=no
27367 allow_undefined_flag_CXX=
27368 always_export_symbols_CXX=no
27369 archive_expsym_cmds_CXX=
27370 compiler_needs_object_CXX=no
27371 export_dynamic_flag_spec_CXX=
27372 hardcode_direct_CXX=no
27373 hardcode_direct_absolute_CXX=no
27374 hardcode_libdir_flag_spec_CXX=
27375 hardcode_libdir_flag_spec_ld_CXX=
27376 hardcode_libdir_separator_CXX=
27377 hardcode_minus_L_CXX=no
27378 hardcode_shlibpath_var_CXX=unsupported
27379 hardcode_automatic_CXX=no
27380 inherit_rpath_CXX=no
27381 module_cmds_CXX=
27382 module_expsym_cmds_CXX=
27383 link_all_deplibs_CXX=unknown
27384 old_archive_cmds_CXX=$old_archive_cmds
27385 reload_flag_CXX=$reload_flag
27386 reload_cmds_CXX=$reload_cmds
27387 no_undefined_flag_CXX=
27388 whole_archive_flag_spec_CXX=
27389 enable_shared_with_static_runtimes_CXX=no
27390
27391 # Source file extension for C++ test sources.
27392 ac_ext=cpp
27393
27394 # Object file extension for compiled C++ test sources.
27395 objext=o
27396 objext_CXX=$objext
27397
27398 # No sense in running all these tests if we already determined that
27399 # the CXX compiler isn't working.  Some variables (like enable_shared)
27400 # are currently assumed to apply to all compilers on this platform,
27401 # and will be corrupted by setting them based on a non-working compiler.
27402 if test "$_lt_caught_CXX_error" != yes; then
27403   # Code to be used in simple compile tests
27404   lt_simple_compile_test_code="int some_variable = 0;"
27405
27406   # Code to be used in simple link tests
27407   lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
27408
27409   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
27410
27411
27412
27413
27414
27415
27416 # If no C compiler was specified, use CC.
27417 LTCC=${LTCC-"$CC"}
27418
27419 # If no C compiler flags were specified, use CFLAGS.
27420 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
27421
27422 # Allow CC to be a program name with arguments.
27423 compiler=$CC
27424
27425
27426   # save warnings/boilerplate of simple test code
27427   ac_outfile=conftest.$ac_objext
27428 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
27429 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
27430 _lt_compiler_boilerplate=`cat conftest.err`
27431 $RM conftest*
27432
27433   ac_outfile=conftest.$ac_objext
27434 echo "$lt_simple_link_test_code" >conftest.$ac_ext
27435 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
27436 _lt_linker_boilerplate=`cat conftest.err`
27437 $RM -r conftest*
27438
27439
27440   # Allow CC to be a program name with arguments.
27441   lt_save_CC=$CC
27442   lt_save_CFLAGS=$CFLAGS
27443   lt_save_LD=$LD
27444   lt_save_GCC=$GCC
27445   GCC=$GXX
27446   lt_save_with_gnu_ld=$with_gnu_ld
27447   lt_save_path_LD=$lt_cv_path_LD
27448   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
27449     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
27450   else
27451     $as_unset lt_cv_prog_gnu_ld
27452   fi
27453   if test -n "${lt_cv_path_LDCXX+set}"; then
27454     lt_cv_path_LD=$lt_cv_path_LDCXX
27455   else
27456     $as_unset lt_cv_path_LD
27457   fi
27458   test -z "${LDCXX+set}" || LD=$LDCXX
27459   CC=${CXX-"c++"}
27460   CFLAGS=$CXXFLAGS
27461   compiler=$CC
27462   compiler_CXX=$CC
27463   for cc_temp in $compiler""; do
27464   case $cc_temp in
27465     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
27466     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
27467     \-*) ;;
27468     *) break;;
27469   esac
27470 done
27471 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
27472
27473
27474   if test -n "$compiler"; then
27475     # We don't want -fno-exception when compiling C++ code, so set the
27476     # no_builtin_flag separately
27477     if test "$GXX" = yes; then
27478       lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
27479     else
27480       lt_prog_compiler_no_builtin_flag_CXX=
27481     fi
27482
27483     if test "$GXX" = yes; then
27484       # Set up default GNU C++ configuration
27485
27486
27487
27488 # Check whether --with-gnu-ld was given.
27489 if test "${with_gnu_ld+set}" = set; then :
27490   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
27491 else
27492   with_gnu_ld=no
27493 fi
27494
27495 ac_prog=ld
27496 if test "$GCC" = yes; then
27497   # Check if gcc -print-prog-name=ld gives a path.
27498   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
27499 $as_echo_n "checking for ld used by $CC... " >&6; }
27500   case $host in
27501   *-*-mingw*)
27502     # gcc leaves a trailing carriage return which upsets mingw
27503     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
27504   *)
27505     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
27506   esac
27507   case $ac_prog in
27508     # Accept absolute paths.
27509     [\\/]* | ?:[\\/]*)
27510       re_direlt='/[^/][^/]*/\.\./'
27511       # Canonicalize the pathname of ld
27512       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
27513       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
27514         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
27515       done
27516       test -z "$LD" && LD="$ac_prog"
27517       ;;
27518   "")
27519     # If it fails, then pretend we aren't using GCC.
27520     ac_prog=ld
27521     ;;
27522   *)
27523     # If it is relative, then search for the first ld in PATH.
27524     with_gnu_ld=unknown
27525     ;;
27526   esac
27527 elif test "$with_gnu_ld" = yes; then
27528   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
27529 $as_echo_n "checking for GNU ld... " >&6; }
27530 else
27531   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
27532 $as_echo_n "checking for non-GNU ld... " >&6; }
27533 fi
27534 if ${lt_cv_path_LD+:} false; then :
27535   $as_echo_n "(cached) " >&6
27536 else
27537   if test -z "$LD"; then
27538   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
27539   for ac_dir in $PATH; do
27540     IFS="$lt_save_ifs"
27541     test -z "$ac_dir" && ac_dir=.
27542     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
27543       lt_cv_path_LD="$ac_dir/$ac_prog"
27544       # Check to see if the program is GNU ld.  I'd rather use --version,
27545       # but apparently some variants of GNU ld only accept -v.
27546       # Break only if it was the GNU/non-GNU ld that we prefer.
27547       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
27548       *GNU* | *'with BFD'*)
27549         test "$with_gnu_ld" != no && break
27550         ;;
27551       *)
27552         test "$with_gnu_ld" != yes && break
27553         ;;
27554       esac
27555     fi
27556   done
27557   IFS="$lt_save_ifs"
27558 else
27559   lt_cv_path_LD="$LD" # Let the user override the test with a path.
27560 fi
27561 fi
27562
27563 LD="$lt_cv_path_LD"
27564 if test -n "$LD"; then
27565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
27566 $as_echo "$LD" >&6; }
27567 else
27568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27569 $as_echo "no" >&6; }
27570 fi
27571 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
27572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
27573 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
27574 if ${lt_cv_prog_gnu_ld+:} false; then :
27575   $as_echo_n "(cached) " >&6
27576 else
27577   # I'd rather use --version here, but apparently some GNU lds only accept -v.
27578 case `$LD -v 2>&1 </dev/null` in
27579 *GNU* | *'with BFD'*)
27580   lt_cv_prog_gnu_ld=yes
27581   ;;
27582 *)
27583   lt_cv_prog_gnu_ld=no
27584   ;;
27585 esac
27586 fi
27587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
27588 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
27589 with_gnu_ld=$lt_cv_prog_gnu_ld
27590
27591
27592
27593
27594
27595
27596
27597       # Check if GNU C++ uses GNU ld as the underlying linker, since the
27598       # archiving commands below assume that GNU ld is being used.
27599       if test "$with_gnu_ld" = yes; then
27600         archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
27601         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'
27602
27603         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
27604         export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
27605
27606         # If archive_cmds runs LD, not CC, wlarc should be empty
27607         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
27608         #     investigate it a little bit more. (MM)
27609         wlarc='${wl}'
27610
27611         # ancient GNU ld didn't support --whole-archive et. al.
27612         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
27613           $GREP 'no-whole-archive' > /dev/null; then
27614           whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
27615         else
27616           whole_archive_flag_spec_CXX=
27617         fi
27618       else
27619         with_gnu_ld=no
27620         wlarc=
27621
27622         # A generic and very simple default shared library creation
27623         # command for GNU C++ for the case where it uses the native
27624         # linker, instead of GNU ld.  If possible, this setting should
27625         # overridden to take advantage of the native linker features on
27626         # the platform it is being used on.
27627         archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
27628       fi
27629
27630       # Commands to make compiler produce verbose output that lists
27631       # what "hidden" libraries, object files and flags are used when
27632       # linking a shared library.
27633       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
27634
27635     else
27636       GXX=no
27637       with_gnu_ld=no
27638       wlarc=
27639     fi
27640
27641     # PORTME: fill in a description of your system's C++ link characteristics
27642     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
27643 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
27644     ld_shlibs_CXX=yes
27645     case $host_os in
27646       aix3*)
27647         # FIXME: insert proper C++ library support
27648         ld_shlibs_CXX=no
27649         ;;
27650       aix[4-9]*)
27651         if test "$host_cpu" = ia64; then
27652           # On IA64, the linker does run time linking by default, so we don't
27653           # have to do anything special.
27654           aix_use_runtimelinking=no
27655           exp_sym_flag='-Bexport'
27656           no_entry_flag=""
27657         else
27658           aix_use_runtimelinking=no
27659
27660           # Test if we are trying to use run time linking or normal
27661           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
27662           # need to do runtime linking.
27663           case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
27664             for ld_flag in $LDFLAGS; do
27665               case $ld_flag in
27666               *-brtl*)
27667                 aix_use_runtimelinking=yes
27668                 break
27669                 ;;
27670               esac
27671             done
27672             ;;
27673           esac
27674
27675           exp_sym_flag='-bexport'
27676           no_entry_flag='-bnoentry'
27677         fi
27678
27679         # When large executables or shared objects are built, AIX ld can
27680         # have problems creating the table of contents.  If linking a library
27681         # or program results in "error TOC overflow" add -mminimal-toc to
27682         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
27683         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
27684
27685         archive_cmds_CXX=''
27686         hardcode_direct_CXX=yes
27687         hardcode_direct_absolute_CXX=yes
27688         hardcode_libdir_separator_CXX=':'
27689         link_all_deplibs_CXX=yes
27690         file_list_spec_CXX='${wl}-f,'
27691
27692         if test "$GXX" = yes; then
27693           case $host_os in aix4.[012]|aix4.[012].*)
27694           # We only want to do this on AIX 4.2 and lower, the check
27695           # below for broken collect2 doesn't work under 4.3+
27696           collect2name=`${CC} -print-prog-name=collect2`
27697           if test -f "$collect2name" &&
27698              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
27699           then
27700             # We have reworked collect2
27701             :
27702           else
27703             # We have old collect2
27704             hardcode_direct_CXX=unsupported
27705             # It fails to find uninstalled libraries when the uninstalled
27706             # path is not listed in the libpath.  Setting hardcode_minus_L
27707             # to unsupported forces relinking
27708             hardcode_minus_L_CXX=yes
27709             hardcode_libdir_flag_spec_CXX='-L$libdir'
27710             hardcode_libdir_separator_CXX=
27711           fi
27712           esac
27713           shared_flag='-shared'
27714           if test "$aix_use_runtimelinking" = yes; then
27715             shared_flag="$shared_flag "'${wl}-G'
27716           fi
27717         else
27718           # not using gcc
27719           if test "$host_cpu" = ia64; then
27720           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
27721           # chokes on -Wl,-G. The following line is correct:
27722           shared_flag='-G'
27723           else
27724             if test "$aix_use_runtimelinking" = yes; then
27725               shared_flag='${wl}-G'
27726             else
27727               shared_flag='${wl}-bM:SRE'
27728             fi
27729           fi
27730         fi
27731
27732         export_dynamic_flag_spec_CXX='${wl}-bexpall'
27733         # It seems that -bexpall does not export symbols beginning with
27734         # underscore (_), so it is better to generate a list of symbols to
27735         # export.
27736         always_export_symbols_CXX=yes
27737         if test "$aix_use_runtimelinking" = yes; then
27738           # Warning - without using the other runtime loading flags (-brtl),
27739           # -berok will link without error, but may produce a broken library.
27740           allow_undefined_flag_CXX='-berok'
27741           # Determine the default libpath from the value encoded in an empty
27742           # executable.
27743           if test "${lt_cv_aix_libpath+set}" = set; then
27744   aix_libpath=$lt_cv_aix_libpath
27745 else
27746   if ${lt_cv_aix_libpath__CXX+:} false; then :
27747   $as_echo_n "(cached) " >&6
27748 else
27749   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27750 /* end confdefs.h.  */
27751
27752 int
27753 main ()
27754 {
27755
27756   ;
27757   return 0;
27758 }
27759 _ACEOF
27760 if ac_fn_cxx_try_link "$LINENO"; then :
27761
27762   lt_aix_libpath_sed='
27763       /Import File Strings/,/^$/ {
27764           /^0/ {
27765               s/^0  *\([^ ]*\) *$/\1/
27766               p
27767           }
27768       }'
27769   lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
27770   # Check for a 64-bit object if we didn't find anything.
27771   if test -z "$lt_cv_aix_libpath__CXX"; then
27772     lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
27773   fi
27774 fi
27775 rm -f core conftest.err conftest.$ac_objext \
27776     conftest$ac_exeext conftest.$ac_ext
27777   if test -z "$lt_cv_aix_libpath__CXX"; then
27778     lt_cv_aix_libpath__CXX="/usr/lib:/lib"
27779   fi
27780
27781 fi
27782
27783   aix_libpath=$lt_cv_aix_libpath__CXX
27784 fi
27785
27786           hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
27787
27788           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"
27789         else
27790           if test "$host_cpu" = ia64; then
27791             hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
27792             allow_undefined_flag_CXX="-z nodefs"
27793             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"
27794           else
27795             # Determine the default libpath from the value encoded in an
27796             # empty executable.
27797             if test "${lt_cv_aix_libpath+set}" = set; then
27798   aix_libpath=$lt_cv_aix_libpath
27799 else
27800   if ${lt_cv_aix_libpath__CXX+:} false; then :
27801   $as_echo_n "(cached) " >&6
27802 else
27803   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27804 /* end confdefs.h.  */
27805
27806 int
27807 main ()
27808 {
27809
27810   ;
27811   return 0;
27812 }
27813 _ACEOF
27814 if ac_fn_cxx_try_link "$LINENO"; then :
27815
27816   lt_aix_libpath_sed='
27817       /Import File Strings/,/^$/ {
27818           /^0/ {
27819               s/^0  *\([^ ]*\) *$/\1/
27820               p
27821           }
27822       }'
27823   lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
27824   # Check for a 64-bit object if we didn't find anything.
27825   if test -z "$lt_cv_aix_libpath__CXX"; then
27826     lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
27827   fi
27828 fi
27829 rm -f core conftest.err conftest.$ac_objext \
27830     conftest$ac_exeext conftest.$ac_ext
27831   if test -z "$lt_cv_aix_libpath__CXX"; then
27832     lt_cv_aix_libpath__CXX="/usr/lib:/lib"
27833   fi
27834
27835 fi
27836
27837   aix_libpath=$lt_cv_aix_libpath__CXX
27838 fi
27839
27840             hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
27841             # Warning - without using the other run time loading flags,
27842             # -berok will link without error, but may produce a broken library.
27843             no_undefined_flag_CXX=' ${wl}-bernotok'
27844             allow_undefined_flag_CXX=' ${wl}-berok'
27845             if test "$with_gnu_ld" = yes; then
27846               # We only use this code for GNU lds that support --whole-archive.
27847               whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
27848             else
27849               # Exported symbols can be pulled into shared objects from archives
27850               whole_archive_flag_spec_CXX='$convenience'
27851             fi
27852             archive_cmds_need_lc_CXX=yes
27853             # This is similar to how AIX traditionally builds its shared
27854             # libraries.
27855             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'
27856           fi
27857         fi
27858         ;;
27859
27860       beos*)
27861         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
27862           allow_undefined_flag_CXX=unsupported
27863           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
27864           # support --undefined.  This deserves some investigation.  FIXME
27865           archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
27866         else
27867           ld_shlibs_CXX=no
27868         fi
27869         ;;
27870
27871       chorus*)
27872         case $cc_basename in
27873           *)
27874           # FIXME: insert proper C++ library support
27875           ld_shlibs_CXX=no
27876           ;;
27877         esac
27878         ;;
27879
27880       cygwin* | mingw* | pw32* | cegcc*)
27881         case $GXX,$cc_basename in
27882         ,cl* | no,cl*)
27883           # Native MSVC
27884           # hardcode_libdir_flag_spec is actually meaningless, as there is
27885           # no search path for DLLs.
27886           hardcode_libdir_flag_spec_CXX=' '
27887           allow_undefined_flag_CXX=unsupported
27888           always_export_symbols_CXX=yes
27889           file_list_spec_CXX='@'
27890           # Tell ltmain to make .lib files, not .a files.
27891           libext=lib
27892           # Tell ltmain to make .dll files, not .so files.
27893           shrext_cmds=".dll"
27894           # FIXME: Setting linknames here is a bad hack.
27895           archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
27896           archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
27897               $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
27898             else
27899               $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
27900             fi~
27901             $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
27902             linknames='
27903           # The linker will not automatically build a static lib if we build a DLL.
27904           # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
27905           enable_shared_with_static_runtimes_CXX=yes
27906           # Don't use ranlib
27907           old_postinstall_cmds_CXX='chmod 644 $oldlib'
27908           postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
27909             lt_tool_outputfile="@TOOL_OUTPUT@"~
27910             case $lt_outputfile in
27911               *.exe|*.EXE) ;;
27912               *)
27913                 lt_outputfile="$lt_outputfile.exe"
27914                 lt_tool_outputfile="$lt_tool_outputfile.exe"
27915                 ;;
27916             esac~
27917             func_to_tool_file "$lt_outputfile"~
27918             if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
27919               $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
27920               $RM "$lt_outputfile.manifest";
27921             fi'
27922           ;;
27923         *)
27924           # g++
27925           # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
27926           # as there is no search path for DLLs.
27927           hardcode_libdir_flag_spec_CXX='-L$libdir'
27928           export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
27929           allow_undefined_flag_CXX=unsupported
27930           always_export_symbols_CXX=no
27931           enable_shared_with_static_runtimes_CXX=yes
27932
27933           if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
27934             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'
27935             # If the export-symbols file already is a .def file (1st line
27936             # is EXPORTS), use it as is; otherwise, prepend...
27937             archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
27938               cp $export_symbols $output_objdir/$soname.def;
27939             else
27940               echo EXPORTS > $output_objdir/$soname.def;
27941               cat $export_symbols >> $output_objdir/$soname.def;
27942             fi~
27943             $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'
27944           else
27945             ld_shlibs_CXX=no
27946           fi
27947           ;;
27948         esac
27949         ;;
27950       darwin* | rhapsody*)
27951
27952
27953   archive_cmds_need_lc_CXX=no
27954   hardcode_direct_CXX=no
27955   hardcode_automatic_CXX=yes
27956   hardcode_shlibpath_var_CXX=unsupported
27957   if test "$lt_cv_ld_force_load" = "yes"; then
27958     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\"`'
27959   else
27960     whole_archive_flag_spec_CXX=''
27961   fi
27962   link_all_deplibs_CXX=yes
27963   allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
27964   case $cc_basename in
27965      ifort*) _lt_dar_can_shared=yes ;;
27966      *) _lt_dar_can_shared=$GCC ;;
27967   esac
27968   if test "$_lt_dar_can_shared" = "yes"; then
27969     output_verbose_link_cmd=func_echo_all
27970     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}"
27971     module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
27972     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}"
27973     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}"
27974        if test "$lt_cv_apple_cc_single_mod" != "yes"; then
27975       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}"
27976       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}"
27977     fi
27978
27979   else
27980   ld_shlibs_CXX=no
27981   fi
27982
27983         ;;
27984
27985       dgux*)
27986         case $cc_basename in
27987           ec++*)
27988             # FIXME: insert proper C++ library support
27989             ld_shlibs_CXX=no
27990             ;;
27991           ghcx*)
27992             # Green Hills C++ Compiler
27993             # FIXME: insert proper C++ library support
27994             ld_shlibs_CXX=no
27995             ;;
27996           *)
27997             # FIXME: insert proper C++ library support
27998             ld_shlibs_CXX=no
27999             ;;
28000         esac
28001         ;;
28002
28003       freebsd[12]*)
28004         # C++ shared libraries reported to be fairly broken before
28005         # switch to ELF
28006         ld_shlibs_CXX=no
28007         ;;
28008
28009       freebsd-elf*)
28010         archive_cmds_need_lc_CXX=no
28011         ;;
28012
28013       freebsd* | dragonfly*)
28014         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
28015         # conventions
28016         ld_shlibs_CXX=yes
28017         ;;
28018
28019       gnu*)
28020         ;;
28021
28022       haiku*)
28023         archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28024         link_all_deplibs_CXX=yes
28025         ;;
28026
28027       hpux9*)
28028         hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
28029         hardcode_libdir_separator_CXX=:
28030         export_dynamic_flag_spec_CXX='${wl}-E'
28031         hardcode_direct_CXX=yes
28032         hardcode_minus_L_CXX=yes # Not in the search PATH,
28033                                              # but as the default
28034                                              # location of the library.
28035
28036         case $cc_basename in
28037           CC*)
28038             # FIXME: insert proper C++ library support
28039             ld_shlibs_CXX=no
28040             ;;
28041           aCC*)
28042             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'
28043             # Commands to make compiler produce verbose output that lists
28044             # what "hidden" libraries, object files and flags are used when
28045             # linking a shared library.
28046             #
28047             # There doesn't appear to be a way to prevent this compiler from
28048             # explicitly linking system object files so we need to strip them
28049             # from the output so that they don't get included in the library
28050             # dependencies.
28051             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"'
28052             ;;
28053           *)
28054             if test "$GXX" = yes; then
28055               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'
28056             else
28057               # FIXME: insert proper C++ library support
28058               ld_shlibs_CXX=no
28059             fi
28060             ;;
28061         esac
28062         ;;
28063
28064       hpux10*|hpux11*)
28065         if test $with_gnu_ld = no; then
28066           hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
28067           hardcode_libdir_separator_CXX=:
28068
28069           case $host_cpu in
28070             hppa*64*|ia64*)
28071               ;;
28072             *)
28073               export_dynamic_flag_spec_CXX='${wl}-E'
28074               ;;
28075           esac
28076         fi
28077         case $host_cpu in
28078           hppa*64*|ia64*)
28079             hardcode_direct_CXX=no
28080             hardcode_shlibpath_var_CXX=no
28081             ;;
28082           *)
28083             hardcode_direct_CXX=yes
28084             hardcode_direct_absolute_CXX=yes
28085             hardcode_minus_L_CXX=yes # Not in the search PATH,
28086                                                  # but as the default
28087                                                  # location of the library.
28088             ;;
28089         esac
28090
28091         case $cc_basename in
28092           CC*)
28093             # FIXME: insert proper C++ library support
28094             ld_shlibs_CXX=no
28095             ;;
28096           aCC*)
28097             case $host_cpu in
28098               hppa*64*)
28099                 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28100                 ;;
28101               ia64*)
28102                 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28103                 ;;
28104               *)
28105                 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28106                 ;;
28107             esac
28108             # Commands to make compiler produce verbose output that lists
28109             # what "hidden" libraries, object files and flags are used when
28110             # linking a shared library.
28111             #
28112             # There doesn't appear to be a way to prevent this compiler from
28113             # explicitly linking system object files so we need to strip them
28114             # from the output so that they don't get included in the library
28115             # dependencies.
28116             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"'
28117             ;;
28118           *)
28119             if test "$GXX" = yes; then
28120               if test $with_gnu_ld = no; then
28121                 case $host_cpu in
28122                   hppa*64*)
28123                     archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28124                     ;;
28125                   ia64*)
28126                     archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28127                     ;;
28128                   *)
28129                     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'
28130                     ;;
28131                 esac
28132               fi
28133             else
28134               # FIXME: insert proper C++ library support
28135               ld_shlibs_CXX=no
28136             fi
28137             ;;
28138         esac
28139         ;;
28140
28141       interix[3-9]*)
28142         hardcode_direct_CXX=no
28143         hardcode_shlibpath_var_CXX=no
28144         hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28145         export_dynamic_flag_spec_CXX='${wl}-E'
28146         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
28147         # Instead, shared libraries are loaded at an image base (0x10000000 by
28148         # default) and relocated if they conflict, which is a slow very memory
28149         # consuming and fragmenting process.  To avoid this, we pick a random,
28150         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
28151         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
28152         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'
28153         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'
28154         ;;
28155       irix5* | irix6*)
28156         case $cc_basename in
28157           CC*)
28158             # SGI C++
28159             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'
28160
28161             # Archives containing C++ object files must be created using
28162             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
28163             # necessary to make sure instantiated templates are included
28164             # in the archive.
28165             old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
28166             ;;
28167           *)
28168             if test "$GXX" = yes; then
28169               if test "$with_gnu_ld" = no; then
28170                 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'
28171               else
28172                 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'
28173               fi
28174             fi
28175             link_all_deplibs_CXX=yes
28176             ;;
28177         esac
28178         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
28179         hardcode_libdir_separator_CXX=:
28180         inherit_rpath_CXX=yes
28181         ;;
28182
28183       linux* | k*bsd*-gnu | kopensolaris*-gnu)
28184         case $cc_basename in
28185           KCC*)
28186             # Kuck and Associates, Inc. (KAI) C++ Compiler
28187
28188             # KCC will only create a shared library if the output file
28189             # ends with ".so" (or ".sl" for HP-UX), so rename the library
28190             # to its proper name (with version) after linking.
28191             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'
28192             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'
28193             # Commands to make compiler produce verbose output that lists
28194             # what "hidden" libraries, object files and flags are used when
28195             # linking a shared library.
28196             #
28197             # There doesn't appear to be a way to prevent this compiler from
28198             # explicitly linking system object files so we need to strip them
28199             # from the output so that they don't get included in the library
28200             # dependencies.
28201             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"'
28202
28203             hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28204             export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
28205
28206             # Archives containing C++ object files must be created using
28207             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
28208             old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
28209             ;;
28210           icpc* | ecpc* )
28211             # Intel C++
28212             with_gnu_ld=yes
28213             # version 8.0 and above of icpc choke on multiply defined symbols
28214             # if we add $predep_objects and $postdep_objects, however 7.1 and
28215             # earlier do not add the objects themselves.
28216             case `$CC -V 2>&1` in
28217               *"Version 7."*)
28218                 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
28219                 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'
28220                 ;;
28221               *)  # Version 8.0 or newer
28222                 tmp_idyn=
28223                 case $host_cpu in
28224                   ia64*) tmp_idyn=' -i_dynamic';;
28225                 esac
28226                 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28227                 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'
28228                 ;;
28229             esac
28230             archive_cmds_need_lc_CXX=no
28231             hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28232             export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
28233             whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
28234             ;;
28235           pgCC* | pgcpp*)
28236             # Portland Group C++ compiler
28237             case `$CC -V` in
28238             *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
28239               prelink_cmds_CXX='tpldir=Template.dir~
28240                 rm -rf $tpldir~
28241                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
28242                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
28243               old_archive_cmds_CXX='tpldir=Template.dir~
28244                 rm -rf $tpldir~
28245                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
28246                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
28247                 $RANLIB $oldlib'
28248               archive_cmds_CXX='tpldir=Template.dir~
28249                 rm -rf $tpldir~
28250                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
28251                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
28252               archive_expsym_cmds_CXX='tpldir=Template.dir~
28253                 rm -rf $tpldir~
28254                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
28255                 $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'
28256               ;;
28257             *) # Version 6 and above use weak symbols
28258               archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
28259               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'
28260               ;;
28261             esac
28262
28263             hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
28264             export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
28265             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'
28266             ;;
28267           cxx*)
28268             # Compaq C++
28269             archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
28270             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'
28271
28272             runpath_var=LD_RUN_PATH
28273             hardcode_libdir_flag_spec_CXX='-rpath $libdir'
28274             hardcode_libdir_separator_CXX=:
28275
28276             # Commands to make compiler produce verbose output that lists
28277             # what "hidden" libraries, object files and flags are used when
28278             # linking a shared library.
28279             #
28280             # There doesn't appear to be a way to prevent this compiler from
28281             # explicitly linking system object files so we need to strip them
28282             # from the output so that they don't get included in the library
28283             # dependencies.
28284             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'
28285             ;;
28286           xl* | mpixl* | bgxl*)
28287             # IBM XL 8.0 on PPC, with GNU ld
28288             hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
28289             export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
28290             archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28291             if test "x$supports_anon_versioning" = xyes; then
28292               archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
28293                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
28294                 echo "local: *; };" >> $output_objdir/$libname.ver~
28295                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
28296             fi
28297             ;;
28298           *)
28299             case `$CC -V 2>&1 | sed 5q` in
28300             *Sun\ C*)
28301               # Sun C++ 5.9
28302               no_undefined_flag_CXX=' -zdefs'
28303               archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28304               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'
28305               hardcode_libdir_flag_spec_CXX='-R$libdir'
28306               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'
28307               compiler_needs_object_CXX=yes
28308
28309               # Not sure whether something based on
28310               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
28311               # would be better.
28312               output_verbose_link_cmd='func_echo_all'
28313
28314               # Archives containing C++ object files must be created using
28315               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
28316               # necessary to make sure instantiated templates are included
28317               # in the archive.
28318               old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
28319               ;;
28320             esac
28321             ;;
28322         esac
28323         ;;
28324
28325       lynxos*)
28326         # FIXME: insert proper C++ library support
28327         ld_shlibs_CXX=no
28328         ;;
28329
28330       m88k*)
28331         # FIXME: insert proper C++ library support
28332         ld_shlibs_CXX=no
28333         ;;
28334
28335       mvs*)
28336         case $cc_basename in
28337           cxx*)
28338             # FIXME: insert proper C++ library support
28339             ld_shlibs_CXX=no
28340             ;;
28341           *)
28342             # FIXME: insert proper C++ library support
28343             ld_shlibs_CXX=no
28344             ;;
28345         esac
28346         ;;
28347
28348       netbsd*)
28349         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
28350           archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
28351           wlarc=
28352           hardcode_libdir_flag_spec_CXX='-R$libdir'
28353           hardcode_direct_CXX=yes
28354           hardcode_shlibpath_var_CXX=no
28355         fi
28356         # Workaround some broken pre-1.5 toolchains
28357         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
28358         ;;
28359
28360       *nto* | *qnx*)
28361         ld_shlibs_CXX=yes
28362         ;;
28363
28364       openbsd2*)
28365         # C++ shared libraries are fairly broken
28366         ld_shlibs_CXX=no
28367         ;;
28368
28369       openbsd*)
28370         if test -f /usr/libexec/ld.so; then
28371           hardcode_direct_CXX=yes
28372           hardcode_shlibpath_var_CXX=no
28373           hardcode_direct_absolute_CXX=yes
28374           archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
28375           hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28376           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
28377             archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
28378             export_dynamic_flag_spec_CXX='${wl}-E'
28379             whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
28380           fi
28381           output_verbose_link_cmd=func_echo_all
28382         else
28383           ld_shlibs_CXX=no
28384         fi
28385         ;;
28386
28387       osf3* | osf4* | osf5*)
28388         case $cc_basename in
28389           KCC*)
28390             # Kuck and Associates, Inc. (KAI) C++ Compiler
28391
28392             # KCC will only create a shared library if the output file
28393             # ends with ".so" (or ".sl" for HP-UX), so rename the library
28394             # to its proper name (with version) after linking.
28395             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'
28396
28397             hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28398             hardcode_libdir_separator_CXX=:
28399
28400             # Archives containing C++ object files must be created using
28401             # the KAI C++ compiler.
28402             case $host in
28403               osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
28404               *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
28405             esac
28406             ;;
28407           RCC*)
28408             # Rational C++ 2.4.1
28409             # FIXME: insert proper C++ library support
28410             ld_shlibs_CXX=no
28411             ;;
28412           cxx*)
28413             case $host in
28414               osf3*)
28415                 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
28416                 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'
28417                 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
28418                 ;;
28419               *)
28420                 allow_undefined_flag_CXX=' -expect_unresolved \*'
28421                 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'
28422                 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
28423                   echo "-hidden">> $lib.exp~
28424                   $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~
28425                   $RM $lib.exp'
28426                 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
28427                 ;;
28428             esac
28429
28430             hardcode_libdir_separator_CXX=:
28431
28432             # Commands to make compiler produce verbose output that lists
28433             # what "hidden" libraries, object files and flags are used when
28434             # linking a shared library.
28435             #
28436             # There doesn't appear to be a way to prevent this compiler from
28437             # explicitly linking system object files so we need to strip them
28438             # from the output so that they don't get included in the library
28439             # dependencies.
28440             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"'
28441             ;;
28442           *)
28443             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
28444               allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
28445               case $host in
28446                 osf3*)
28447                   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'
28448                   ;;
28449                 *)
28450                   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'
28451                   ;;
28452               esac
28453
28454               hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
28455               hardcode_libdir_separator_CXX=:
28456
28457               # Commands to make compiler produce verbose output that lists
28458               # what "hidden" libraries, object files and flags are used when
28459               # linking a shared library.
28460               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
28461
28462             else
28463               # FIXME: insert proper C++ library support
28464               ld_shlibs_CXX=no
28465             fi
28466             ;;
28467         esac
28468         ;;
28469
28470       psos*)
28471         # FIXME: insert proper C++ library support
28472         ld_shlibs_CXX=no
28473         ;;
28474
28475       sunos4*)
28476         case $cc_basename in
28477           CC*)
28478             # Sun C++ 4.x
28479             # FIXME: insert proper C++ library support
28480             ld_shlibs_CXX=no
28481             ;;
28482           lcc*)
28483             # Lucid
28484             # FIXME: insert proper C++ library support
28485             ld_shlibs_CXX=no
28486             ;;
28487           *)
28488             # FIXME: insert proper C++ library support
28489             ld_shlibs_CXX=no
28490             ;;
28491         esac
28492         ;;
28493
28494       solaris*)
28495         case $cc_basename in
28496           CC* | sunCC*)
28497             # Sun C++ 4.2, 5.x and Centerline C++
28498             archive_cmds_need_lc_CXX=yes
28499             no_undefined_flag_CXX=' -zdefs'
28500             archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28501             archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
28502               $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'
28503
28504             hardcode_libdir_flag_spec_CXX='-R$libdir'
28505             hardcode_shlibpath_var_CXX=no
28506             case $host_os in
28507               solaris2.[0-5] | solaris2.[0-5].*) ;;
28508               *)
28509                 # The compiler driver will combine and reorder linker options,
28510                 # but understands `-z linker_flag'.
28511                 # Supported since Solaris 2.6 (maybe 2.5.1?)
28512                 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
28513                 ;;
28514             esac
28515             link_all_deplibs_CXX=yes
28516
28517             output_verbose_link_cmd='func_echo_all'
28518
28519             # Archives containing C++ object files must be created using
28520             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
28521             # necessary to make sure instantiated templates are included
28522             # in the archive.
28523             old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
28524             ;;
28525           gcx*)
28526             # Green Hills C++ Compiler
28527             archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
28528
28529             # The C++ compiler must be used to create the archive.
28530             old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
28531             ;;
28532           *)
28533             # GNU C++ compiler with Solaris linker
28534             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
28535               no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
28536               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
28537                 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
28538                 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
28539                   $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
28540
28541                 # Commands to make compiler produce verbose output that lists
28542                 # what "hidden" libraries, object files and flags are used when
28543                 # linking a shared library.
28544                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
28545               else
28546                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
28547                 # platform.
28548                 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
28549                 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
28550                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
28551
28552                 # Commands to make compiler produce verbose output that lists
28553                 # what "hidden" libraries, object files and flags are used when
28554                 # linking a shared library.
28555                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
28556               fi
28557
28558               hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
28559               case $host_os in
28560                 solaris2.[0-5] | solaris2.[0-5].*) ;;
28561                 *)
28562                   whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
28563                   ;;
28564               esac
28565             fi
28566             ;;
28567         esac
28568         ;;
28569
28570     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
28571       no_undefined_flag_CXX='${wl}-z,text'
28572       archive_cmds_need_lc_CXX=no
28573       hardcode_shlibpath_var_CXX=no
28574       runpath_var='LD_RUN_PATH'
28575
28576       case $cc_basename in
28577         CC*)
28578           archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28579           archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28580           ;;
28581         *)
28582           archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28583           archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28584           ;;
28585       esac
28586       ;;
28587
28588       sysv5* | sco3.2v5* | sco5v6*)
28589         # Note: We can NOT use -z defs as we might desire, because we do not
28590         # link with -lc, and that would cause any symbols used from libc to
28591         # always be unresolved, which means just about no library would
28592         # ever link correctly.  If we're not using GNU ld we use -z text
28593         # though, which does catch some bad symbols but isn't as heavy-handed
28594         # as -z defs.
28595         no_undefined_flag_CXX='${wl}-z,text'
28596         allow_undefined_flag_CXX='${wl}-z,nodefs'
28597         archive_cmds_need_lc_CXX=no
28598         hardcode_shlibpath_var_CXX=no
28599         hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
28600         hardcode_libdir_separator_CXX=':'
28601         link_all_deplibs_CXX=yes
28602         export_dynamic_flag_spec_CXX='${wl}-Bexport'
28603         runpath_var='LD_RUN_PATH'
28604
28605         case $cc_basename in
28606           CC*)
28607             archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28608             archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28609             old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
28610               '"$old_archive_cmds_CXX"
28611             reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
28612               '"$reload_cmds_CXX"
28613             ;;
28614           *)
28615             archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28616             archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28617             ;;
28618         esac
28619       ;;
28620
28621       tandem*)
28622         case $cc_basename in
28623           NCC*)
28624             # NonStop-UX NCC 3.20
28625             # FIXME: insert proper C++ library support
28626             ld_shlibs_CXX=no
28627             ;;
28628           *)
28629             # FIXME: insert proper C++ library support
28630             ld_shlibs_CXX=no
28631             ;;
28632         esac
28633         ;;
28634
28635       vxworks*)
28636         # FIXME: insert proper C++ library support
28637         ld_shlibs_CXX=no
28638         ;;
28639
28640       *)
28641         # FIXME: insert proper C++ library support
28642         ld_shlibs_CXX=no
28643         ;;
28644     esac
28645
28646     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
28647 $as_echo "$ld_shlibs_CXX" >&6; }
28648     test "$ld_shlibs_CXX" = no && can_build_shared=no
28649
28650     GCC_CXX="$GXX"
28651     LD_CXX="$LD"
28652
28653     ## CAVEAT EMPTOR:
28654     ## There is no encapsulation within the following macros, do not change
28655     ## the running order or otherwise move them around unless you know exactly
28656     ## what you are doing...
28657     # Dependencies to place before and after the object being linked:
28658 predep_objects_CXX=
28659 postdep_objects_CXX=
28660 predeps_CXX=
28661 postdeps_CXX=
28662 compiler_lib_search_path_CXX=
28663
28664 cat > conftest.$ac_ext <<_LT_EOF
28665 class Foo
28666 {
28667 public:
28668   Foo (void) { a = 0; }
28669 private:
28670   int a;
28671 };
28672 _LT_EOF
28673
28674
28675 _lt_libdeps_save_CFLAGS=$CFLAGS
28676 case "$CC $CFLAGS " in #(
28677 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
28678 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
28679 esac
28680
28681 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
28682   (eval $ac_compile) 2>&5
28683   ac_status=$?
28684   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28685   test $ac_status = 0; }; then
28686   # Parse the compiler output and extract the necessary
28687   # objects, libraries and library flags.
28688
28689   # Sentinel used to keep track of whether or not we are before
28690   # the conftest object file.
28691   pre_test_object_deps_done=no
28692
28693   for p in `eval "$output_verbose_link_cmd"`; do
28694     case ${prev}${p} in
28695
28696     -L* | -R* | -l*)
28697        # Some compilers place space between "-{L,R}" and the path.
28698        # Remove the space.
28699        if test $p = "-L" ||
28700           test $p = "-R"; then
28701          prev=$p
28702          continue
28703        fi
28704
28705        # Expand the sysroot to ease extracting the directories later.
28706        if test -z "$prev"; then
28707          case $p in
28708          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
28709          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
28710          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
28711          esac
28712        fi
28713        case $p in
28714        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
28715        esac
28716        if test "$pre_test_object_deps_done" = no; then
28717          case ${prev} in
28718          -L | -R)
28719            # Internal compiler library paths should come after those
28720            # provided the user.  The postdeps already come after the
28721            # user supplied libs so there is no need to process them.
28722            if test -z "$compiler_lib_search_path_CXX"; then
28723              compiler_lib_search_path_CXX="${prev}${p}"
28724            else
28725              compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
28726            fi
28727            ;;
28728          # The "-l" case would never come before the object being
28729          # linked, so don't bother handling this case.
28730          esac
28731        else
28732          if test -z "$postdeps_CXX"; then
28733            postdeps_CXX="${prev}${p}"
28734          else
28735            postdeps_CXX="${postdeps_CXX} ${prev}${p}"
28736          fi
28737        fi
28738        prev=
28739        ;;
28740
28741     *.lto.$objext) ;; # Ignore GCC LTO objects
28742     *.$objext)
28743        # This assumes that the test object file only shows up
28744        # once in the compiler output.
28745        if test "$p" = "conftest.$objext"; then
28746          pre_test_object_deps_done=yes
28747          continue
28748        fi
28749
28750        if test "$pre_test_object_deps_done" = no; then
28751          if test -z "$predep_objects_CXX"; then
28752            predep_objects_CXX="$p"
28753          else
28754            predep_objects_CXX="$predep_objects_CXX $p"
28755          fi
28756        else
28757          if test -z "$postdep_objects_CXX"; then
28758            postdep_objects_CXX="$p"
28759          else
28760            postdep_objects_CXX="$postdep_objects_CXX $p"
28761          fi
28762        fi
28763        ;;
28764
28765     *) ;; # Ignore the rest.
28766
28767     esac
28768   done
28769
28770   # Clean up.
28771   rm -f a.out a.exe
28772 else
28773   echo "libtool.m4: error: problem compiling CXX test program"
28774 fi
28775
28776 $RM -f confest.$objext
28777 CFLAGS=$_lt_libdeps_save_CFLAGS
28778
28779 # PORTME: override above test on systems where it is broken
28780 case $host_os in
28781 interix[3-9]*)
28782   # Interix 3.5 installs completely hosed .la files for C++, so rather than
28783   # hack all around it, let's just trust "g++" to DTRT.
28784   predep_objects_CXX=
28785   postdep_objects_CXX=
28786   postdeps_CXX=
28787   ;;
28788
28789 linux*)
28790   case `$CC -V 2>&1 | sed 5q` in
28791   *Sun\ C*)
28792     # Sun C++ 5.9
28793
28794     # The more standards-conforming stlport4 library is
28795     # incompatible with the Cstd library. Avoid specifying
28796     # it if it's in CXXFLAGS. Ignore libCrun as
28797     # -library=stlport4 depends on it.
28798     case " $CXX $CXXFLAGS " in
28799     *" -library=stlport4 "*)
28800       solaris_use_stlport4=yes
28801       ;;
28802     esac
28803
28804     if test "$solaris_use_stlport4" != yes; then
28805       postdeps_CXX='-library=Cstd -library=Crun'
28806     fi
28807     ;;
28808   esac
28809   ;;
28810
28811 solaris*)
28812   case $cc_basename in
28813   CC* | sunCC*)
28814     # The more standards-conforming stlport4 library is
28815     # incompatible with the Cstd library. Avoid specifying
28816     # it if it's in CXXFLAGS. Ignore libCrun as
28817     # -library=stlport4 depends on it.
28818     case " $CXX $CXXFLAGS " in
28819     *" -library=stlport4 "*)
28820       solaris_use_stlport4=yes
28821       ;;
28822     esac
28823
28824     # Adding this requires a known-good setup of shared libraries for
28825     # Sun compiler versions before 5.6, else PIC objects from an old
28826     # archive will be linked into the output, leading to subtle bugs.
28827     if test "$solaris_use_stlport4" != yes; then
28828       postdeps_CXX='-library=Cstd -library=Crun'
28829     fi
28830     ;;
28831   esac
28832   ;;
28833 esac
28834
28835
28836 case " $postdeps_CXX " in
28837 *" -lc "*) archive_cmds_need_lc_CXX=no ;;
28838 esac
28839  compiler_lib_search_dirs_CXX=
28840 if test -n "${compiler_lib_search_path_CXX}"; then
28841  compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
28842 fi
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
28872
28873
28874     lt_prog_compiler_wl_CXX=
28875 lt_prog_compiler_pic_CXX=
28876 lt_prog_compiler_static_CXX=
28877
28878
28879   # C++ specific cases for pic, static, wl, etc.
28880   if test "$GXX" = yes; then
28881     lt_prog_compiler_wl_CXX='-Wl,'
28882     lt_prog_compiler_static_CXX='-static'
28883
28884     case $host_os in
28885     aix*)
28886       # All AIX code is PIC.
28887       if test "$host_cpu" = ia64; then
28888         # AIX 5 now supports IA64 processor
28889         lt_prog_compiler_static_CXX='-Bstatic'
28890       fi
28891       ;;
28892
28893     amigaos*)
28894       case $host_cpu in
28895       powerpc)
28896             # see comment about AmigaOS4 .so support
28897             lt_prog_compiler_pic_CXX='-fPIC'
28898         ;;
28899       m68k)
28900             # FIXME: we need at least 68020 code to build shared libraries, but
28901             # adding the `-m68020' flag to GCC prevents building anything better,
28902             # like `-m68040'.
28903             lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
28904         ;;
28905       esac
28906       ;;
28907
28908     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
28909       # PIC is the default for these OSes.
28910       ;;
28911     mingw* | cygwin* | os2* | pw32* | cegcc*)
28912       # This hack is so that the source file can tell whether it is being
28913       # built for inclusion in a dll (and should export symbols for example).
28914       # Although the cygwin gcc ignores -fPIC, still need this for old-style
28915       # (--disable-auto-import) libraries
28916       lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
28917       ;;
28918     darwin* | rhapsody*)
28919       # PIC is the default on this platform
28920       # Common symbols not allowed in MH_DYLIB files
28921       lt_prog_compiler_pic_CXX='-fno-common'
28922       ;;
28923     *djgpp*)
28924       # DJGPP does not support shared libraries at all
28925       lt_prog_compiler_pic_CXX=
28926       ;;
28927     haiku*)
28928       # PIC is the default for Haiku.
28929       # The "-static" flag exists, but is broken.
28930       lt_prog_compiler_static_CXX=
28931       ;;
28932     interix[3-9]*)
28933       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
28934       # Instead, we relocate shared libraries at runtime.
28935       ;;
28936     sysv4*MP*)
28937       if test -d /usr/nec; then
28938         lt_prog_compiler_pic_CXX=-Kconform_pic
28939       fi
28940       ;;
28941     hpux*)
28942       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
28943       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
28944       # sets the default TLS model and affects inlining.
28945       case $host_cpu in
28946       hppa*64*)
28947         ;;
28948       *)
28949         lt_prog_compiler_pic_CXX='-fPIC'
28950         ;;
28951       esac
28952       ;;
28953     *qnx* | *nto*)
28954       # QNX uses GNU C++, but need to define -shared option too, otherwise
28955       # it will coredump.
28956       lt_prog_compiler_pic_CXX='-fPIC -shared'
28957       ;;
28958     *)
28959       lt_prog_compiler_pic_CXX='-fPIC'
28960       ;;
28961     esac
28962   else
28963     case $host_os in
28964       aix[4-9]*)
28965         # All AIX code is PIC.
28966         if test "$host_cpu" = ia64; then
28967           # AIX 5 now supports IA64 processor
28968           lt_prog_compiler_static_CXX='-Bstatic'
28969         else
28970           lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
28971         fi
28972         ;;
28973       chorus*)
28974         case $cc_basename in
28975         cxch68*)
28976           # Green Hills C++ Compiler
28977           # _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"
28978           ;;
28979         esac
28980         ;;
28981       mingw* | cygwin* | os2* | pw32* | cegcc*)
28982         # This hack is so that the source file can tell whether it is being
28983         # built for inclusion in a dll (and should export symbols for example).
28984         lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
28985         ;;
28986       dgux*)
28987         case $cc_basename in
28988           ec++*)
28989             lt_prog_compiler_pic_CXX='-KPIC'
28990             ;;
28991           ghcx*)
28992             # Green Hills C++ Compiler
28993             lt_prog_compiler_pic_CXX='-pic'
28994             ;;
28995           *)
28996             ;;
28997         esac
28998         ;;
28999       freebsd* | dragonfly*)
29000         # FreeBSD uses GNU C++
29001         ;;
29002       hpux9* | hpux10* | hpux11*)
29003         case $cc_basename in
29004           CC*)
29005             lt_prog_compiler_wl_CXX='-Wl,'
29006             lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
29007             if test "$host_cpu" != ia64; then
29008               lt_prog_compiler_pic_CXX='+Z'
29009             fi
29010             ;;
29011           aCC*)
29012             lt_prog_compiler_wl_CXX='-Wl,'
29013             lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
29014             case $host_cpu in
29015             hppa*64*|ia64*)
29016               # +Z the default
29017               ;;
29018             *)
29019               lt_prog_compiler_pic_CXX='+Z'
29020               ;;
29021             esac
29022             ;;
29023           *)
29024             ;;
29025         esac
29026         ;;
29027       interix*)
29028         # This is c89, which is MS Visual C++ (no shared libs)
29029         # Anyone wants to do a port?
29030         ;;
29031       irix5* | irix6* | nonstopux*)
29032         case $cc_basename in
29033           CC*)
29034             lt_prog_compiler_wl_CXX='-Wl,'
29035             lt_prog_compiler_static_CXX='-non_shared'
29036             # CC pic flag -KPIC is the default.
29037             ;;
29038           *)
29039             ;;
29040         esac
29041         ;;
29042       linux* | k*bsd*-gnu | kopensolaris*-gnu)
29043         case $cc_basename in
29044           KCC*)
29045             # KAI C++ Compiler
29046             lt_prog_compiler_wl_CXX='--backend -Wl,'
29047             lt_prog_compiler_pic_CXX='-fPIC'
29048             ;;
29049           ecpc* )
29050             # old Intel C++ for x86_64 which still supported -KPIC.
29051             lt_prog_compiler_wl_CXX='-Wl,'
29052             lt_prog_compiler_pic_CXX='-KPIC'
29053             lt_prog_compiler_static_CXX='-static'
29054             ;;
29055           icpc* )
29056             # Intel C++, used to be incompatible with GCC.
29057             # ICC 10 doesn't accept -KPIC any more.
29058             lt_prog_compiler_wl_CXX='-Wl,'
29059             lt_prog_compiler_pic_CXX='-fPIC'
29060             lt_prog_compiler_static_CXX='-static'
29061             ;;
29062           pgCC* | pgcpp*)
29063             # Portland Group C++ compiler
29064             lt_prog_compiler_wl_CXX='-Wl,'
29065             lt_prog_compiler_pic_CXX='-fpic'
29066             lt_prog_compiler_static_CXX='-Bstatic'
29067             ;;
29068           cxx*)
29069             # Compaq C++
29070             # Make sure the PIC flag is empty.  It appears that all Alpha
29071             # Linux and Compaq Tru64 Unix objects are PIC.
29072             lt_prog_compiler_pic_CXX=
29073             lt_prog_compiler_static_CXX='-non_shared'
29074             ;;
29075           xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
29076             # IBM XL 8.0, 9.0 on PPC and BlueGene
29077             lt_prog_compiler_wl_CXX='-Wl,'
29078             lt_prog_compiler_pic_CXX='-qpic'
29079             lt_prog_compiler_static_CXX='-qstaticlink'
29080             ;;
29081           *)
29082             case `$CC -V 2>&1 | sed 5q` in
29083             *Sun\ C*)
29084               # Sun C++ 5.9
29085               lt_prog_compiler_pic_CXX='-KPIC'
29086               lt_prog_compiler_static_CXX='-Bstatic'
29087               lt_prog_compiler_wl_CXX='-Qoption ld '
29088               ;;
29089             esac
29090             ;;
29091         esac
29092         ;;
29093       lynxos*)
29094         ;;
29095       m88k*)
29096         ;;
29097       mvs*)
29098         case $cc_basename in
29099           cxx*)
29100             lt_prog_compiler_pic_CXX='-W c,exportall'
29101             ;;
29102           *)
29103             ;;
29104         esac
29105         ;;
29106       netbsd*)
29107         ;;
29108       *qnx* | *nto*)
29109         # QNX uses GNU C++, but need to define -shared option too, otherwise
29110         # it will coredump.
29111         lt_prog_compiler_pic_CXX='-fPIC -shared'
29112         ;;
29113       osf3* | osf4* | osf5*)
29114         case $cc_basename in
29115           KCC*)
29116             lt_prog_compiler_wl_CXX='--backend -Wl,'
29117             ;;
29118           RCC*)
29119             # Rational C++ 2.4.1
29120             lt_prog_compiler_pic_CXX='-pic'
29121             ;;
29122           cxx*)
29123             # Digital/Compaq C++
29124             lt_prog_compiler_wl_CXX='-Wl,'
29125             # Make sure the PIC flag is empty.  It appears that all Alpha
29126             # Linux and Compaq Tru64 Unix objects are PIC.
29127             lt_prog_compiler_pic_CXX=
29128             lt_prog_compiler_static_CXX='-non_shared'
29129             ;;
29130           *)
29131             ;;
29132         esac
29133         ;;
29134       psos*)
29135         ;;
29136       solaris*)
29137         case $cc_basename in
29138           CC* | sunCC*)
29139             # Sun C++ 4.2, 5.x and Centerline C++
29140             lt_prog_compiler_pic_CXX='-KPIC'
29141             lt_prog_compiler_static_CXX='-Bstatic'
29142             lt_prog_compiler_wl_CXX='-Qoption ld '
29143             ;;
29144           gcx*)
29145             # Green Hills C++ Compiler
29146             lt_prog_compiler_pic_CXX='-PIC'
29147             ;;
29148           *)
29149             ;;
29150         esac
29151         ;;
29152       sunos4*)
29153         case $cc_basename in
29154           CC*)
29155             # Sun C++ 4.x
29156             lt_prog_compiler_pic_CXX='-pic'
29157             lt_prog_compiler_static_CXX='-Bstatic'
29158             ;;
29159           lcc*)
29160             # Lucid
29161             lt_prog_compiler_pic_CXX='-pic'
29162             ;;
29163           *)
29164             ;;
29165         esac
29166         ;;
29167       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
29168         case $cc_basename in
29169           CC*)
29170             lt_prog_compiler_wl_CXX='-Wl,'
29171             lt_prog_compiler_pic_CXX='-KPIC'
29172             lt_prog_compiler_static_CXX='-Bstatic'
29173             ;;
29174         esac
29175         ;;
29176       tandem*)
29177         case $cc_basename in
29178           NCC*)
29179             # NonStop-UX NCC 3.20
29180             lt_prog_compiler_pic_CXX='-KPIC'
29181             ;;
29182           *)
29183             ;;
29184         esac
29185         ;;
29186       vxworks*)
29187         ;;
29188       *)
29189         lt_prog_compiler_can_build_shared_CXX=no
29190         ;;
29191     esac
29192   fi
29193
29194 case $host_os in
29195   # For platforms which do not support PIC, -DPIC is meaningless:
29196   *djgpp*)
29197     lt_prog_compiler_pic_CXX=
29198     ;;
29199   *)
29200     lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
29201     ;;
29202 esac
29203
29204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
29205 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
29206 if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
29207   $as_echo_n "(cached) " >&6
29208 else
29209   lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
29210 fi
29211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
29212 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
29213 lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
29214
29215 #
29216 # Check to make sure the PIC flag actually works.
29217 #
29218 if test -n "$lt_prog_compiler_pic_CXX"; then
29219   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
29220 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
29221 if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
29222   $as_echo_n "(cached) " >&6
29223 else
29224   lt_cv_prog_compiler_pic_works_CXX=no
29225    ac_outfile=conftest.$ac_objext
29226    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
29227    lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
29228    # Insert the option either (1) after the last *FLAGS variable, or
29229    # (2) before a word containing "conftest.", or (3) at the end.
29230    # Note that $ac_compile itself does not contain backslashes and begins
29231    # with a dollar sign (not a hyphen), so the echo should work correctly.
29232    # The option is referenced via a variable to avoid confusing sed.
29233    lt_compile=`echo "$ac_compile" | $SED \
29234    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
29235    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
29236    -e 's:$: $lt_compiler_flag:'`
29237    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
29238    (eval "$lt_compile" 2>conftest.err)
29239    ac_status=$?
29240    cat conftest.err >&5
29241    echo "$as_me:$LINENO: \$? = $ac_status" >&5
29242    if (exit $ac_status) && test -s "$ac_outfile"; then
29243      # The compiler can only warn and ignore the option if not recognized
29244      # So say no if there are warnings other than the usual output.
29245      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
29246      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
29247      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
29248        lt_cv_prog_compiler_pic_works_CXX=yes
29249      fi
29250    fi
29251    $RM conftest*
29252
29253 fi
29254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
29255 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
29256
29257 if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
29258     case $lt_prog_compiler_pic_CXX in
29259      "" | " "*) ;;
29260      *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
29261      esac
29262 else
29263     lt_prog_compiler_pic_CXX=
29264      lt_prog_compiler_can_build_shared_CXX=no
29265 fi
29266
29267 fi
29268
29269
29270
29271
29272
29273 #
29274 # Check to make sure the static flag actually works.
29275 #
29276 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
29277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
29278 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
29279 if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
29280   $as_echo_n "(cached) " >&6
29281 else
29282   lt_cv_prog_compiler_static_works_CXX=no
29283    save_LDFLAGS="$LDFLAGS"
29284    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
29285    echo "$lt_simple_link_test_code" > conftest.$ac_ext
29286    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
29287      # The linker can only warn and ignore the option if not recognized
29288      # So say no if there are warnings
29289      if test -s conftest.err; then
29290        # Append any errors to the config.log.
29291        cat conftest.err 1>&5
29292        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
29293        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
29294        if diff conftest.exp conftest.er2 >/dev/null; then
29295          lt_cv_prog_compiler_static_works_CXX=yes
29296        fi
29297      else
29298        lt_cv_prog_compiler_static_works_CXX=yes
29299      fi
29300    fi
29301    $RM -r conftest*
29302    LDFLAGS="$save_LDFLAGS"
29303
29304 fi
29305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
29306 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
29307
29308 if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
29309     :
29310 else
29311     lt_prog_compiler_static_CXX=
29312 fi
29313
29314
29315
29316
29317     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
29318 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
29319 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
29320   $as_echo_n "(cached) " >&6
29321 else
29322   lt_cv_prog_compiler_c_o_CXX=no
29323    $RM -r conftest 2>/dev/null
29324    mkdir conftest
29325    cd conftest
29326    mkdir out
29327    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
29328
29329    lt_compiler_flag="-o out/conftest2.$ac_objext"
29330    # Insert the option either (1) after the last *FLAGS variable, or
29331    # (2) before a word containing "conftest.", or (3) at the end.
29332    # Note that $ac_compile itself does not contain backslashes and begins
29333    # with a dollar sign (not a hyphen), so the echo should work correctly.
29334    lt_compile=`echo "$ac_compile" | $SED \
29335    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
29336    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
29337    -e 's:$: $lt_compiler_flag:'`
29338    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
29339    (eval "$lt_compile" 2>out/conftest.err)
29340    ac_status=$?
29341    cat out/conftest.err >&5
29342    echo "$as_me:$LINENO: \$? = $ac_status" >&5
29343    if (exit $ac_status) && test -s out/conftest2.$ac_objext
29344    then
29345      # The compiler can only warn and ignore the option if not recognized
29346      # So say no if there are warnings
29347      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
29348      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
29349      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
29350        lt_cv_prog_compiler_c_o_CXX=yes
29351      fi
29352    fi
29353    chmod u+w . 2>&5
29354    $RM conftest*
29355    # SGI C++ compiler will create directory out/ii_files/ for
29356    # template instantiation
29357    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
29358    $RM out/* && rmdir out
29359    cd ..
29360    $RM -r conftest
29361    $RM conftest*
29362
29363 fi
29364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
29365 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
29366
29367
29368
29369     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
29370 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
29371 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
29372   $as_echo_n "(cached) " >&6
29373 else
29374   lt_cv_prog_compiler_c_o_CXX=no
29375    $RM -r conftest 2>/dev/null
29376    mkdir conftest
29377    cd conftest
29378    mkdir out
29379    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
29380
29381    lt_compiler_flag="-o out/conftest2.$ac_objext"
29382    # Insert the option either (1) after the last *FLAGS variable, or
29383    # (2) before a word containing "conftest.", or (3) at the end.
29384    # Note that $ac_compile itself does not contain backslashes and begins
29385    # with a dollar sign (not a hyphen), so the echo should work correctly.
29386    lt_compile=`echo "$ac_compile" | $SED \
29387    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
29388    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
29389    -e 's:$: $lt_compiler_flag:'`
29390    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
29391    (eval "$lt_compile" 2>out/conftest.err)
29392    ac_status=$?
29393    cat out/conftest.err >&5
29394    echo "$as_me:$LINENO: \$? = $ac_status" >&5
29395    if (exit $ac_status) && test -s out/conftest2.$ac_objext
29396    then
29397      # The compiler can only warn and ignore the option if not recognized
29398      # So say no if there are warnings
29399      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
29400      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
29401      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
29402        lt_cv_prog_compiler_c_o_CXX=yes
29403      fi
29404    fi
29405    chmod u+w . 2>&5
29406    $RM conftest*
29407    # SGI C++ compiler will create directory out/ii_files/ for
29408    # template instantiation
29409    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
29410    $RM out/* && rmdir out
29411    cd ..
29412    $RM -r conftest
29413    $RM conftest*
29414
29415 fi
29416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
29417 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
29418
29419
29420
29421
29422 hard_links="nottested"
29423 if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
29424   # do not overwrite the value of need_locks provided by the user
29425   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
29426 $as_echo_n "checking if we can lock with hard links... " >&6; }
29427   hard_links=yes
29428   $RM conftest*
29429   ln conftest.a conftest.b 2>/dev/null && hard_links=no
29430   touch conftest.a
29431   ln conftest.a conftest.b 2>&5 || hard_links=no
29432   ln conftest.a conftest.b 2>/dev/null && hard_links=no
29433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
29434 $as_echo "$hard_links" >&6; }
29435   if test "$hard_links" = no; then
29436     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
29437 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
29438     need_locks=warn
29439   fi
29440 else
29441   need_locks=no
29442 fi
29443
29444
29445
29446     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
29447 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
29448
29449   export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
29450   exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
29451   case $host_os in
29452   aix[4-9]*)
29453     # If we're using GNU nm, then we don't want the "-C" option.
29454     # -C means demangle to AIX nm, but means don't demangle with GNU nm
29455     # Also, AIX nm treats weak defined symbols like other global defined
29456     # symbols, whereas GNU nm marks them as "W".
29457     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
29458       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'
29459     else
29460       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'
29461     fi
29462     ;;
29463   pw32*)
29464     export_symbols_cmds_CXX="$ltdll_cmds"
29465     ;;
29466   cygwin* | mingw* | cegcc*)
29467     case $cc_basename in
29468     cl*) ;;
29469     *)
29470       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'
29471       exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
29472       ;;
29473     esac
29474     ;;
29475   *)
29476     export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
29477     ;;
29478   esac
29479
29480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
29481 $as_echo "$ld_shlibs_CXX" >&6; }
29482 test "$ld_shlibs_CXX" = no && can_build_shared=no
29483
29484 with_gnu_ld_CXX=$with_gnu_ld
29485
29486
29487
29488
29489
29490
29491 #
29492 # Do we need to explicitly link libc?
29493 #
29494 case "x$archive_cmds_need_lc_CXX" in
29495 x|xyes)
29496   # Assume -lc should be added
29497   archive_cmds_need_lc_CXX=yes
29498
29499   if test "$enable_shared" = yes && test "$GCC" = yes; then
29500     case $archive_cmds_CXX in
29501     *'~'*)
29502       # FIXME: we may have to deal with multi-command sequences.
29503       ;;
29504     '$CC '*)
29505       # Test whether the compiler implicitly links with -lc since on some
29506       # systems, -lgcc has to come before -lc. If gcc already passes -lc
29507       # to ld, don't add -lc before -lgcc.
29508       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
29509 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
29510 if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
29511   $as_echo_n "(cached) " >&6
29512 else
29513   $RM conftest*
29514         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
29515
29516         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
29517   (eval $ac_compile) 2>&5
29518   ac_status=$?
29519   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29520   test $ac_status = 0; } 2>conftest.err; then
29521           soname=conftest
29522           lib=conftest
29523           libobjs=conftest.$ac_objext
29524           deplibs=
29525           wl=$lt_prog_compiler_wl_CXX
29526           pic_flag=$lt_prog_compiler_pic_CXX
29527           compiler_flags=-v
29528           linker_flags=-v
29529           verstring=
29530           output_objdir=.
29531           libname=conftest
29532           lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
29533           allow_undefined_flag_CXX=
29534           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
29535   (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
29536   ac_status=$?
29537   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29538   test $ac_status = 0; }
29539           then
29540             lt_cv_archive_cmds_need_lc_CXX=no
29541           else
29542             lt_cv_archive_cmds_need_lc_CXX=yes
29543           fi
29544           allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
29545         else
29546           cat conftest.err 1>&5
29547         fi
29548         $RM conftest*
29549
29550 fi
29551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
29552 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
29553       archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
29554       ;;
29555     esac
29556   fi
29557   ;;
29558 esac
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
29621
29622
29623     { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
29624 $as_echo_n "checking dynamic linker characteristics... " >&6; }
29625
29626 library_names_spec=
29627 libname_spec='lib$name'
29628 soname_spec=
29629 shrext_cmds=".so"
29630 postinstall_cmds=
29631 postuninstall_cmds=
29632 finish_cmds=
29633 finish_eval=
29634 shlibpath_var=
29635 shlibpath_overrides_runpath=unknown
29636 version_type=none
29637 dynamic_linker="$host_os ld.so"
29638 sys_lib_dlsearch_path_spec="/lib /usr/lib"
29639 need_lib_prefix=unknown
29640 hardcode_into_libs=no
29641
29642 # when you set need_version to no, make sure it does not cause -set_version
29643 # flags to be left without arguments
29644 need_version=unknown
29645
29646 case $host_os in
29647 aix3*)
29648   version_type=linux
29649   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
29650   shlibpath_var=LIBPATH
29651
29652   # AIX 3 has no versioning support, so we append a major version to the name.
29653   soname_spec='${libname}${release}${shared_ext}$major'
29654   ;;
29655
29656 aix[4-9]*)
29657   version_type=linux
29658   need_lib_prefix=no
29659   need_version=no
29660   hardcode_into_libs=yes
29661   if test "$host_cpu" = ia64; then
29662     # AIX 5 supports IA64
29663     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
29664     shlibpath_var=LD_LIBRARY_PATH
29665   else
29666     # With GCC up to 2.95.x, collect2 would create an import file
29667     # for dependence libraries.  The import file would start with
29668     # the line `#! .'.  This would cause the generated library to
29669     # depend on `.', always an invalid library.  This was fixed in
29670     # development snapshots of GCC prior to 3.0.
29671     case $host_os in
29672       aix4 | aix4.[01] | aix4.[01].*)
29673       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
29674            echo ' yes '
29675            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
29676         :
29677       else
29678         can_build_shared=no
29679       fi
29680       ;;
29681     esac
29682     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
29683     # soname into executable. Probably we can add versioning support to
29684     # collect2, so additional links can be useful in future.
29685     if test "$aix_use_runtimelinking" = yes; then
29686       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
29687       # instead of lib<name>.a to let people know that these are not
29688       # typical AIX shared libraries.
29689       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29690     else
29691       # We preserve .a as extension for shared libraries through AIX4.2
29692       # and later when we are not doing run time linking.
29693       library_names_spec='${libname}${release}.a $libname.a'
29694       soname_spec='${libname}${release}${shared_ext}$major'
29695     fi
29696     shlibpath_var=LIBPATH
29697   fi
29698   ;;
29699
29700 amigaos*)
29701   case $host_cpu in
29702   powerpc)
29703     # Since July 2007 AmigaOS4 officially supports .so libraries.
29704     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
29705     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29706     ;;
29707   m68k)
29708     library_names_spec='$libname.ixlibrary $libname.a'
29709     # Create ${libname}_ixlibrary.a entries in /sys/libs.
29710     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'
29711     ;;
29712   esac
29713   ;;
29714
29715 beos*)
29716   library_names_spec='${libname}${shared_ext}'
29717   dynamic_linker="$host_os ld.so"
29718   shlibpath_var=LIBRARY_PATH
29719   ;;
29720
29721 bsdi[45]*)
29722   version_type=linux
29723   need_version=no
29724   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29725   soname_spec='${libname}${release}${shared_ext}$major'
29726   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
29727   shlibpath_var=LD_LIBRARY_PATH
29728   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
29729   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
29730   # the default ld.so.conf also contains /usr/contrib/lib and
29731   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
29732   # libtool to hard-code these into programs
29733   ;;
29734
29735 cygwin* | mingw* | pw32* | cegcc*)
29736   version_type=windows
29737   shrext_cmds=".dll"
29738   need_version=no
29739   need_lib_prefix=no
29740
29741   case $GCC,$cc_basename in
29742   yes,*)
29743     # gcc
29744     library_names_spec='$libname.dll.a'
29745     # DLL is installed to $(libdir)/../bin by postinstall_cmds
29746     postinstall_cmds='base_file=`basename \${file}`~
29747       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
29748       dldir=$destdir/`dirname \$dlpath`~
29749       test -d \$dldir || mkdir -p \$dldir~
29750       $install_prog $dir/$dlname \$dldir/$dlname~
29751       chmod a+x \$dldir/$dlname~
29752       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
29753         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
29754       fi'
29755     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
29756       dlpath=$dir/\$dldll~
29757        $RM \$dlpath'
29758     shlibpath_overrides_runpath=yes
29759
29760     case $host_os in
29761     cygwin*)
29762       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
29763       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
29764
29765       ;;
29766     mingw* | cegcc*)
29767       # MinGW DLLs use traditional 'lib' prefix
29768       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
29769       ;;
29770     pw32*)
29771       # pw32 DLLs use 'pw' prefix rather than 'lib'
29772       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
29773       ;;
29774     esac
29775     dynamic_linker='Win32 ld.exe'
29776     ;;
29777
29778   *,cl*)
29779     # Native MSVC
29780     libname_spec='$name'
29781     soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
29782     library_names_spec='${libname}.dll.lib'
29783
29784     case $build_os in
29785     mingw*)
29786       sys_lib_search_path_spec=
29787       lt_save_ifs=$IFS
29788       IFS=';'
29789       for lt_path in $LIB
29790       do
29791         IFS=$lt_save_ifs
29792         # Let DOS variable expansion print the short 8.3 style file name.
29793         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
29794         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
29795       done
29796       IFS=$lt_save_ifs
29797       # Convert to MSYS style.
29798       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
29799       ;;
29800     cygwin*)
29801       # Convert to unix form, then to dos form, then back to unix form
29802       # but this time dos style (no spaces!) so that the unix form looks
29803       # like /cygdrive/c/PROGRA~1:/cygdr...
29804       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
29805       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
29806       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
29807       ;;
29808     *)
29809       sys_lib_search_path_spec="$LIB"
29810       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
29811         # It is most probably a Windows format PATH.
29812         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
29813       else
29814         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
29815       fi
29816       # FIXME: find the short name or the path components, as spaces are
29817       # common. (e.g. "Program Files" -> "PROGRA~1")
29818       ;;
29819     esac
29820
29821     # DLL is installed to $(libdir)/../bin by postinstall_cmds
29822     postinstall_cmds='base_file=`basename \${file}`~
29823       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
29824       dldir=$destdir/`dirname \$dlpath`~
29825       test -d \$dldir || mkdir -p \$dldir~
29826       $install_prog $dir/$dlname \$dldir/$dlname'
29827     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
29828       dlpath=$dir/\$dldll~
29829        $RM \$dlpath'
29830     shlibpath_overrides_runpath=yes
29831     dynamic_linker='Win32 link.exe'
29832     ;;
29833
29834   *)
29835     # Assume MSVC wrapper
29836     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
29837     dynamic_linker='Win32 ld.exe'
29838     ;;
29839   esac
29840   # FIXME: first we should search . and the directory the executable is in
29841   shlibpath_var=PATH
29842   ;;
29843
29844 darwin* | rhapsody*)
29845   dynamic_linker="$host_os dyld"
29846   version_type=darwin
29847   need_lib_prefix=no
29848   need_version=no
29849   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
29850   soname_spec='${libname}${release}${major}$shared_ext'
29851   shlibpath_overrides_runpath=yes
29852   shlibpath_var=DYLD_LIBRARY_PATH
29853   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
29854
29855   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
29856   ;;
29857
29858 dgux*)
29859   version_type=linux
29860   need_lib_prefix=no
29861   need_version=no
29862   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
29863   soname_spec='${libname}${release}${shared_ext}$major'
29864   shlibpath_var=LD_LIBRARY_PATH
29865   ;;
29866
29867 freebsd1*)
29868   dynamic_linker=no
29869   ;;
29870
29871 freebsd* | dragonfly*)
29872   # DragonFly does not have aout.  When/if they implement a new
29873   # versioning mechanism, adjust this.
29874   if test -x /usr/bin/objformat; then
29875     objformat=`/usr/bin/objformat`
29876   else
29877     case $host_os in
29878     freebsd[123]*) objformat=aout ;;
29879     *) objformat=elf ;;
29880     esac
29881   fi
29882   version_type=freebsd-$objformat
29883   case $version_type in
29884     freebsd-elf*)
29885       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
29886       need_version=no
29887       need_lib_prefix=no
29888       ;;
29889     freebsd-*)
29890       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
29891       need_version=yes
29892       ;;
29893   esac
29894   shlibpath_var=LD_LIBRARY_PATH
29895   case $host_os in
29896   freebsd2*)
29897     shlibpath_overrides_runpath=yes
29898     ;;
29899   freebsd3.[01]* | freebsdelf3.[01]*)
29900     shlibpath_overrides_runpath=yes
29901     hardcode_into_libs=yes
29902     ;;
29903   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
29904   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
29905     shlibpath_overrides_runpath=no
29906     hardcode_into_libs=yes
29907     ;;
29908   *) # from 4.6 on, and DragonFly
29909     shlibpath_overrides_runpath=yes
29910     hardcode_into_libs=yes
29911     ;;
29912   esac
29913   ;;
29914
29915 gnu*)
29916   version_type=linux
29917   need_lib_prefix=no
29918   need_version=no
29919   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
29920   soname_spec='${libname}${release}${shared_ext}$major'
29921   shlibpath_var=LD_LIBRARY_PATH
29922   hardcode_into_libs=yes
29923   ;;
29924
29925 haiku*)
29926   version_type=linux
29927   need_lib_prefix=no
29928   need_version=no
29929   dynamic_linker="$host_os runtime_loader"
29930   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
29931   soname_spec='${libname}${release}${shared_ext}$major'
29932   shlibpath_var=LIBRARY_PATH
29933   shlibpath_overrides_runpath=yes
29934   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
29935   hardcode_into_libs=yes
29936   ;;
29937
29938 hpux9* | hpux10* | hpux11*)
29939   # Give a soname corresponding to the major version so that dld.sl refuses to
29940   # link against other versions.
29941   version_type=sunos
29942   need_lib_prefix=no
29943   need_version=no
29944   case $host_cpu in
29945   ia64*)
29946     shrext_cmds='.so'
29947     hardcode_into_libs=yes
29948     dynamic_linker="$host_os dld.so"
29949     shlibpath_var=LD_LIBRARY_PATH
29950     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
29951     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29952     soname_spec='${libname}${release}${shared_ext}$major'
29953     if test "X$HPUX_IA64_MODE" = X32; then
29954       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
29955     else
29956       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
29957     fi
29958     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
29959     ;;
29960   hppa*64*)
29961     shrext_cmds='.sl'
29962     hardcode_into_libs=yes
29963     dynamic_linker="$host_os dld.sl"
29964     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
29965     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
29966     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29967     soname_spec='${libname}${release}${shared_ext}$major'
29968     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
29969     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
29970     ;;
29971   *)
29972     shrext_cmds='.sl'
29973     dynamic_linker="$host_os dld.sl"
29974     shlibpath_var=SHLIB_PATH
29975     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
29976     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29977     soname_spec='${libname}${release}${shared_ext}$major'
29978     ;;
29979   esac
29980   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
29981   postinstall_cmds='chmod 555 $lib'
29982   # or fails outright, so override atomically:
29983   install_override_mode=555
29984   ;;
29985
29986 interix[3-9]*)
29987   version_type=linux
29988   need_lib_prefix=no
29989   need_version=no
29990   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
29991   soname_spec='${libname}${release}${shared_ext}$major'
29992   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
29993   shlibpath_var=LD_LIBRARY_PATH
29994   shlibpath_overrides_runpath=no
29995   hardcode_into_libs=yes
29996   ;;
29997
29998 irix5* | irix6* | nonstopux*)
29999   case $host_os in
30000     nonstopux*) version_type=nonstopux ;;
30001     *)
30002         if test "$lt_cv_prog_gnu_ld" = yes; then
30003                 version_type=linux
30004         else
30005                 version_type=irix
30006         fi ;;
30007   esac
30008   need_lib_prefix=no
30009   need_version=no
30010   soname_spec='${libname}${release}${shared_ext}$major'
30011   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
30012   case $host_os in
30013   irix5* | nonstopux*)
30014     libsuff= shlibsuff=
30015     ;;
30016   *)
30017     case $LD in # libtool.m4 will add one of these switches to LD
30018     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
30019       libsuff= shlibsuff= libmagic=32-bit;;
30020     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
30021       libsuff=32 shlibsuff=N32 libmagic=N32;;
30022     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
30023       libsuff=64 shlibsuff=64 libmagic=64-bit;;
30024     *) libsuff= shlibsuff= libmagic=never-match;;
30025     esac
30026     ;;
30027   esac
30028   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
30029   shlibpath_overrides_runpath=no
30030   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
30031   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
30032   hardcode_into_libs=yes
30033   ;;
30034
30035 # No shared lib support for Linux oldld, aout, or coff.
30036 linux*oldld* | linux*aout* | linux*coff*)
30037   dynamic_linker=no
30038   ;;
30039
30040 # This must be Linux ELF.
30041 linux* | k*bsd*-gnu | kopensolaris*-gnu)
30042   version_type=linux
30043   need_lib_prefix=no
30044   need_version=no
30045   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30046   soname_spec='${libname}${release}${shared_ext}$major'
30047   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
30048   shlibpath_var=LD_LIBRARY_PATH
30049   shlibpath_overrides_runpath=no
30050
30051   # Some binutils ld are patched to set DT_RUNPATH
30052   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
30053   $as_echo_n "(cached) " >&6
30054 else
30055   lt_cv_shlibpath_overrides_runpath=no
30056     save_LDFLAGS=$LDFLAGS
30057     save_libdir=$libdir
30058     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
30059          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
30060     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30061 /* end confdefs.h.  */
30062
30063 int
30064 main ()
30065 {
30066
30067   ;
30068   return 0;
30069 }
30070 _ACEOF
30071 if ac_fn_cxx_try_link "$LINENO"; then :
30072   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
30073   lt_cv_shlibpath_overrides_runpath=yes
30074 fi
30075 fi
30076 rm -f core conftest.err conftest.$ac_objext \
30077     conftest$ac_exeext conftest.$ac_ext
30078     LDFLAGS=$save_LDFLAGS
30079     libdir=$save_libdir
30080
30081 fi
30082
30083   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
30084
30085   # This implies no fast_install, which is unacceptable.
30086   # Some rework will be needed to allow for fast_install
30087   # before this can be enabled.
30088   hardcode_into_libs=yes
30089
30090   # Append ld.so.conf contents to the search path
30091   if test -f /etc/ld.so.conf; then
30092     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' ' '`
30093     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
30094   fi
30095
30096   # We used to test for /lib/ld.so.1 and disable shared libraries on
30097   # powerpc, because MkLinux only supported shared libraries with the
30098   # GNU dynamic linker.  Since this was broken with cross compilers,
30099   # most powerpc-linux boxes support dynamic linking these days and
30100   # people can always --disable-shared, the test was removed, and we
30101   # assume the GNU/Linux dynamic linker is in use.
30102   dynamic_linker='GNU/Linux ld.so'
30103   ;;
30104
30105 netbsd*)
30106   version_type=sunos
30107   need_lib_prefix=no
30108   need_version=no
30109   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
30110     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
30111     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
30112     dynamic_linker='NetBSD (a.out) ld.so'
30113   else
30114     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
30115     soname_spec='${libname}${release}${shared_ext}$major'
30116     dynamic_linker='NetBSD ld.elf_so'
30117   fi
30118   shlibpath_var=LD_LIBRARY_PATH
30119   shlibpath_overrides_runpath=yes
30120   hardcode_into_libs=yes
30121   ;;
30122
30123 newsos6)
30124   version_type=linux
30125   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30126   shlibpath_var=LD_LIBRARY_PATH
30127   shlibpath_overrides_runpath=yes
30128   ;;
30129
30130 *nto* | *qnx*)
30131   version_type=qnx
30132   need_lib_prefix=no
30133   need_version=no
30134   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30135   soname_spec='${libname}${release}${shared_ext}$major'
30136   shlibpath_var=LD_LIBRARY_PATH
30137   shlibpath_overrides_runpath=no
30138   hardcode_into_libs=yes
30139   dynamic_linker='ldqnx.so'
30140   ;;
30141
30142 openbsd*)
30143   version_type=sunos
30144   sys_lib_dlsearch_path_spec="/usr/lib"
30145   need_lib_prefix=no
30146   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
30147   case $host_os in
30148     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
30149     *)                          need_version=no  ;;
30150   esac
30151   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
30152   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
30153   shlibpath_var=LD_LIBRARY_PATH
30154   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
30155     case $host_os in
30156       openbsd2.[89] | openbsd2.[89].*)
30157         shlibpath_overrides_runpath=no
30158         ;;
30159       *)
30160         shlibpath_overrides_runpath=yes
30161         ;;
30162       esac
30163   else
30164     shlibpath_overrides_runpath=yes
30165   fi
30166   ;;
30167
30168 os2*)
30169   libname_spec='$name'
30170   shrext_cmds=".dll"
30171   need_lib_prefix=no
30172   library_names_spec='$libname${shared_ext} $libname.a'
30173   dynamic_linker='OS/2 ld.exe'
30174   shlibpath_var=LIBPATH
30175   ;;
30176
30177 osf3* | osf4* | osf5*)
30178   version_type=osf
30179   need_lib_prefix=no
30180   need_version=no
30181   soname_spec='${libname}${release}${shared_ext}$major'
30182   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30183   shlibpath_var=LD_LIBRARY_PATH
30184   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
30185   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
30186   ;;
30187
30188 rdos*)
30189   dynamic_linker=no
30190   ;;
30191
30192 solaris*)
30193   version_type=linux
30194   need_lib_prefix=no
30195   need_version=no
30196   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30197   soname_spec='${libname}${release}${shared_ext}$major'
30198   shlibpath_var=LD_LIBRARY_PATH
30199   shlibpath_overrides_runpath=yes
30200   hardcode_into_libs=yes
30201   # ldd complains unless libraries are executable
30202   postinstall_cmds='chmod +x $lib'
30203   ;;
30204
30205 sunos4*)
30206   version_type=sunos
30207   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
30208   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
30209   shlibpath_var=LD_LIBRARY_PATH
30210   shlibpath_overrides_runpath=yes
30211   if test "$with_gnu_ld" = yes; then
30212     need_lib_prefix=no
30213   fi
30214   need_version=yes
30215   ;;
30216
30217 sysv4 | sysv4.3*)
30218   version_type=linux
30219   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30220   soname_spec='${libname}${release}${shared_ext}$major'
30221   shlibpath_var=LD_LIBRARY_PATH
30222   case $host_vendor in
30223     sni)
30224       shlibpath_overrides_runpath=no
30225       need_lib_prefix=no
30226       runpath_var=LD_RUN_PATH
30227       ;;
30228     siemens)
30229       need_lib_prefix=no
30230       ;;
30231     motorola)
30232       need_lib_prefix=no
30233       need_version=no
30234       shlibpath_overrides_runpath=no
30235       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
30236       ;;
30237   esac
30238   ;;
30239
30240 sysv4*MP*)
30241   if test -d /usr/nec ;then
30242     version_type=linux
30243     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
30244     soname_spec='$libname${shared_ext}.$major'
30245     shlibpath_var=LD_LIBRARY_PATH
30246   fi
30247   ;;
30248
30249 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
30250   version_type=freebsd-elf
30251   need_lib_prefix=no
30252   need_version=no
30253   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
30254   soname_spec='${libname}${release}${shared_ext}$major'
30255   shlibpath_var=LD_LIBRARY_PATH
30256   shlibpath_overrides_runpath=yes
30257   hardcode_into_libs=yes
30258   if test "$with_gnu_ld" = yes; then
30259     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
30260   else
30261     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
30262     case $host_os in
30263       sco3.2v5*)
30264         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
30265         ;;
30266     esac
30267   fi
30268   sys_lib_dlsearch_path_spec='/usr/lib'
30269   ;;
30270
30271 tpf*)
30272   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
30273   version_type=linux
30274   need_lib_prefix=no
30275   need_version=no
30276   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30277   shlibpath_var=LD_LIBRARY_PATH
30278   shlibpath_overrides_runpath=no
30279   hardcode_into_libs=yes
30280   ;;
30281
30282 uts4*)
30283   version_type=linux
30284   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30285   soname_spec='${libname}${release}${shared_ext}$major'
30286   shlibpath_var=LD_LIBRARY_PATH
30287   ;;
30288
30289 *)
30290   dynamic_linker=no
30291   ;;
30292 esac
30293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
30294 $as_echo "$dynamic_linker" >&6; }
30295 test "$dynamic_linker" = no && can_build_shared=no
30296
30297 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
30298 if test "$GCC" = yes; then
30299   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
30300 fi
30301
30302 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
30303   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
30304 fi
30305 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
30306   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
30307 fi
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
30344
30345
30346     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
30347 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
30348 hardcode_action_CXX=
30349 if test -n "$hardcode_libdir_flag_spec_CXX" ||
30350    test -n "$runpath_var_CXX" ||
30351    test "X$hardcode_automatic_CXX" = "Xyes" ; then
30352
30353   # We can hardcode non-existent directories.
30354   if test "$hardcode_direct_CXX" != no &&
30355      # If the only mechanism to avoid hardcoding is shlibpath_var, we
30356      # have to relink, otherwise we might link with an installed library
30357      # when we should be linking with a yet-to-be-installed one
30358      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
30359      test "$hardcode_minus_L_CXX" != no; then
30360     # Linking always hardcodes the temporary library directory.
30361     hardcode_action_CXX=relink
30362   else
30363     # We can link without hardcoding, and we can hardcode nonexisting dirs.
30364     hardcode_action_CXX=immediate
30365   fi
30366 else
30367   # We cannot hardcode anything, or else we can only hardcode existing
30368   # directories.
30369   hardcode_action_CXX=unsupported
30370 fi
30371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
30372 $as_echo "$hardcode_action_CXX" >&6; }
30373
30374 if test "$hardcode_action_CXX" = relink ||
30375    test "$inherit_rpath_CXX" = yes; then
30376   # Fast installation is not supported
30377   enable_fast_install=no
30378 elif test "$shlibpath_overrides_runpath" = yes ||
30379      test "$enable_shared" = no; then
30380   # Fast installation is not necessary
30381   enable_fast_install=needless
30382 fi
30383
30384
30385
30386
30387
30388
30389
30390   fi # test -n "$compiler"
30391
30392   CC=$lt_save_CC
30393   CFLAGS=$lt_save_CFLAGS
30394   LDCXX=$LD
30395   LD=$lt_save_LD
30396   GCC=$lt_save_GCC
30397   with_gnu_ld=$lt_save_with_gnu_ld
30398   lt_cv_path_LDCXX=$lt_cv_path_LD
30399   lt_cv_path_LD=$lt_save_path_LD
30400   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
30401   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
30402 fi # test "$_lt_caught_CXX_error" != yes
30403
30404 ac_ext=c
30405 ac_cpp='$CPP $CPPFLAGS'
30406 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30407 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30408 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30409
30410
30411
30412 gta=false
30413
30414 # Check whether --with-gtest was given.
30415 if test "${with_gtest+set}" = set; then :
30416   withval=$with_gtest; try_gtest=$withval
30417 else
30418   try_gtest=yes
30419
30420 fi
30421
30422 case "$try_gtest" in
30423  yes)
30424     # Extract the first word of "gtest-config", so it can be a program name with args.
30425 set dummy gtest-config; ac_word=$2
30426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30427 $as_echo_n "checking for $ac_word... " >&6; }
30428 if ${ac_cv_path_GTEST_CONFIG+:} false; then :
30429   $as_echo_n "(cached) " >&6
30430 else
30431   case $GTEST_CONFIG in
30432   [\\/]* | ?:[\\/]*)
30433   ac_cv_path_GTEST_CONFIG="$GTEST_CONFIG" # Let the user override the test with a path.
30434   ;;
30435   *)
30436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30437 for as_dir in $PATH
30438 do
30439   IFS=$as_save_IFS
30440   test -z "$as_dir" && as_dir=.
30441     for ac_exec_ext in '' $ac_executable_extensions; do
30442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30443     ac_cv_path_GTEST_CONFIG="$as_dir/$ac_word$ac_exec_ext"
30444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30445     break 2
30446   fi
30447 done
30448   done
30449 IFS=$as_save_IFS
30450
30451   ;;
30452 esac
30453 fi
30454 GTEST_CONFIG=$ac_cv_path_GTEST_CONFIG
30455 if test -n "$GTEST_CONFIG"; then
30456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTEST_CONFIG" >&5
30457 $as_echo "$GTEST_CONFIG" >&6; }
30458 else
30459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30460 $as_echo "no" >&6; }
30461 fi
30462
30463
30464     { ac_cv_path_GTEST_CONFIG=; unset ac_cv_path_GTEST_CONFIG;}
30465     case x${GTEST_CONFIG} in
30466      x) ;;
30467      *)
30468         { $as_echo "$as_me:${as_lineno-$LINENO}: checking gtest version" >&5
30469 $as_echo_n "checking gtest version... " >&6; }
30470         gtest_version_test=`$GTEST_CONFIG --min-version=1.5 || echo toolow`
30471         case "$gtest_version_test" in
30472          toolow*)
30473             ;;
30474          *)
30475             GTEST_LDFLAGS=`$GTEST_CONFIG --ldflags`
30476             GTEST_LIBS=`$GTEST_CONFIG --libs`
30477             GTEST_CXXFLAGS=`$GTEST_CONFIG --cxxflags`
30478             GTEST_CPPFLAGS=`$GTEST_CONFIG --cppflags`
30479
30480
30481
30482
30483             gta=true
30484             ;;
30485         esac
30486         gtest_version=`$GTEST_CONFIG --version`
30487         case "$gta" in
30488          true)
30489             { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($gtest_version) ok" >&5
30490 $as_echo "($gtest_version) ok" >&6; }
30491             ;;
30492          *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($gtest_version) not ok" >&5
30493 $as_echo "($gtest_version) not ok" >&6; }
30494             ;;
30495         esac
30496         { gtest_version_test=; unset gtest_version_test;}
30497         { gtest_version=; unset gtest_version;}
30498     esac
30499 esac
30500  if $gta; then
30501   GTEST_AVAILABLE_TRUE=
30502   GTEST_AVAILABLE_FALSE='#'
30503 else
30504   GTEST_AVAILABLE_TRUE='#'
30505   GTEST_AVAILABLE_FALSE=
30506 fi
30507
30508
30509
30510
30511 # All libraries should be in various LIB_* variables now.
30512 #LIBS=
30513 # Sadly not.  There is a gettext() check somewhere, and on Solaris this pulls
30514 # in -lintl -lgen, outside our "scope".
30515
30516 ac_config_files="$ac_config_files Makefile"
30517
30518 ac_config_files="$ac_config_files include/Makefile"
30519
30520 ac_config_files="$ac_config_files scripts/Makefile"
30521
30522 ac_config_files="$ac_config_files tests/Makefile"
30523
30524 ac_config_files="$ac_config_files tests/fileHandlingTest.h"
30525
30526 ac_config_files="$ac_config_files unity/Makefile"
30527
30528
30529 cat >confcache <<\_ACEOF
30530 # This file is a shell script that caches the results of configure
30531 # tests run on this system so they can be shared between configure
30532 # scripts and configure runs, see configure's option --config-cache.
30533 # It is not useful on other systems.  If it contains results you don't
30534 # want to keep, you may remove or edit it.
30535 #
30536 # config.status only pays attention to the cache file if you give it
30537 # the --recheck option to rerun configure.
30538 #
30539 # `ac_cv_env_foo' variables (set or unset) will be overridden when
30540 # loading this file, other *unset* `ac_cv_foo' will be assigned the
30541 # following values.
30542
30543 _ACEOF
30544
30545 # The following way of writing the cache mishandles newlines in values,
30546 # but we know of no workaround that is simple, portable, and efficient.
30547 # So, we kill variables containing newlines.
30548 # Ultrix sh set writes to stderr and can't be redirected directly,
30549 # and sets the high bit in the cache file unless we assign to the vars.
30550 (
30551   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
30552     eval ac_val=\$$ac_var
30553     case $ac_val in #(
30554     *${as_nl}*)
30555       case $ac_var in #(
30556       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
30557 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
30558       esac
30559       case $ac_var in #(
30560       _ | IFS | as_nl) ;; #(
30561       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
30562       *) { eval $ac_var=; unset $ac_var;} ;;
30563       esac ;;
30564     esac
30565   done
30566
30567   (set) 2>&1 |
30568     case $as_nl`(ac_space=' '; set) 2>&1` in #(
30569     *${as_nl}ac_space=\ *)
30570       # `set' does not quote correctly, so add quotes: double-quote
30571       # substitution turns \\\\ into \\, and sed turns \\ into \.
30572       sed -n \
30573         "s/'/'\\\\''/g;
30574           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
30575       ;; #(
30576     *)
30577       # `set' quotes correctly as required by POSIX, so do not add quotes.
30578       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
30579       ;;
30580     esac |
30581     sort
30582 ) |
30583   sed '
30584      /^ac_cv_env_/b end
30585      t clear
30586      :clear
30587      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
30588      t end
30589      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
30590      :end' >>confcache
30591 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
30592   if test -w "$cache_file"; then
30593     if test "x$cache_file" != "x/dev/null"; then
30594       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
30595 $as_echo "$as_me: updating cache $cache_file" >&6;}
30596       if test ! -f "$cache_file" || test -h "$cache_file"; then
30597         cat confcache >"$cache_file"
30598       else
30599         case $cache_file in #(
30600         */* | ?:*)
30601           mv -f confcache "$cache_file"$$ &&
30602           mv -f "$cache_file"$$ "$cache_file" ;; #(
30603         *)
30604           mv -f confcache "$cache_file" ;;
30605         esac
30606       fi
30607     fi
30608   else
30609     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
30610 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
30611   fi
30612 fi
30613 rm -f confcache
30614
30615 test "x$prefix" = xNONE && prefix=$ac_default_prefix
30616 # Let make expand exec_prefix.
30617 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
30618
30619 DEFS=-DHAVE_CONFIG_H
30620
30621 ac_libobjs=
30622 ac_ltlibobjs=
30623 U=
30624 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
30625   # 1. Remove the extension, and $U if already installed.
30626   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
30627   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
30628   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
30629   #    will be set to the directory where LIBOBJS objects are built.
30630   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
30631   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
30632 done
30633 LIBOBJS=$ac_libobjs
30634
30635 LTLIBOBJS=$ac_ltlibobjs
30636
30637
30638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
30639 $as_echo_n "checking that generated files are newer than configure... " >&6; }
30640    if test -n "$am_sleep_pid"; then
30641      # Hide warnings about reused PIDs.
30642      wait $am_sleep_pid 2>/dev/null
30643    fi
30644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
30645 $as_echo "done" >&6; }
30646  if test -n "$EXEEXT"; then
30647   am__EXEEXT_TRUE=
30648   am__EXEEXT_FALSE='#'
30649 else
30650   am__EXEEXT_TRUE='#'
30651   am__EXEEXT_FALSE=
30652 fi
30653
30654 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
30655   as_fn_error $? "conditional \"AMDEP\" was never defined.
30656 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30657 fi
30658 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
30659   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
30660 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30661 fi
30662 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
30663   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
30664 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30665 fi
30666
30667 if test -z "${WANT_CALC_TICKADJ_MS_TRUE}" && test -z "${WANT_CALC_TICKADJ_MS_FALSE}"; then
30668   as_fn_error $? "conditional \"WANT_CALC_TICKADJ_MS\" was never defined.
30669 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30670 fi
30671 if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; then
30672   as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
30673 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30674 fi
30675 if test -z "${INSTALL_UPDATE_LEAP_TRUE}" && test -z "${INSTALL_UPDATE_LEAP_FALSE}"; then
30676   as_fn_error $? "conditional \"INSTALL_UPDATE_LEAP\" was never defined.
30677 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30678 fi
30679 if test -z "${NTP_CROSSCOMPILE_TRUE}" && test -z "${NTP_CROSSCOMPILE_FALSE}"; then
30680   as_fn_error $? "conditional \"NTP_CROSSCOMPILE\" was never defined.
30681 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30682 fi
30683 if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
30684   as_fn_error $? "conditional \"PTHREADS\" was never defined.
30685 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30686 fi
30687 if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then
30688   as_fn_error $? "conditional \"BUILD_SNTP\" was never defined.
30689 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30690 fi
30691 if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
30692   as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
30693 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30694 fi
30695 if test -z "${INSTALL_LIBOPTS_TRUE}" && test -z "${INSTALL_LIBOPTS_FALSE}"; then
30696   as_fn_error $? "conditional \"INSTALL_LIBOPTS\" was never defined.
30697 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30698 fi
30699 if test -z "${NEED_LIBOPTS_TRUE}" && test -z "${NEED_LIBOPTS_FALSE}"; then
30700   as_fn_error $? "conditional \"NEED_LIBOPTS\" was never defined.
30701 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30702 fi
30703 if test -z "${BUILD_LIBEVENT_TRUE}" && test -z "${BUILD_LIBEVENT_FALSE}"; then
30704   as_fn_error $? "conditional \"BUILD_LIBEVENT\" was never defined.
30705 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30706 fi
30707 if test -z "${UNITYBUILD_AVAILABLE_TRUE}" && test -z "${UNITYBUILD_AVAILABLE_FALSE}"; then
30708   as_fn_error $? "conditional \"UNITYBUILD_AVAILABLE\" was never defined.
30709 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30710 fi
30711 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
30712   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
30713 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30714 fi
30715 if test -z "${GTEST_AVAILABLE_TRUE}" && test -z "${GTEST_AVAILABLE_FALSE}"; then
30716   as_fn_error $? "conditional \"GTEST_AVAILABLE\" was never defined.
30717 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30718 fi
30719
30720 : "${CONFIG_STATUS=./config.status}"
30721 ac_write_fail=0
30722 ac_clean_files_save=$ac_clean_files
30723 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
30724 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
30725 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
30726 as_write_fail=0
30727 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
30728 #! $SHELL
30729 # Generated by $as_me.
30730 # Run this file to recreate the current configuration.
30731 # Compiler output produced by configure, useful for debugging
30732 # configure, is in config.log if it exists.
30733
30734 debug=false
30735 ac_cs_recheck=false
30736 ac_cs_silent=false
30737
30738 SHELL=\${CONFIG_SHELL-$SHELL}
30739 export SHELL
30740 _ASEOF
30741 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
30742 ## -------------------- ##
30743 ## M4sh Initialization. ##
30744 ## -------------------- ##
30745
30746 # Be more Bourne compatible
30747 DUALCASE=1; export DUALCASE # for MKS sh
30748 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
30749   emulate sh
30750   NULLCMD=:
30751   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
30752   # is contrary to our usage.  Disable this feature.
30753   alias -g '${1+"$@"}'='"$@"'
30754   setopt NO_GLOB_SUBST
30755 else
30756   case `(set -o) 2>/dev/null` in #(
30757   *posix*) :
30758     set -o posix ;; #(
30759   *) :
30760      ;;
30761 esac
30762 fi
30763
30764
30765 as_nl='
30766 '
30767 export as_nl
30768 # Printing a long string crashes Solaris 7 /usr/bin/printf.
30769 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
30770 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
30771 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
30772 # Prefer a ksh shell builtin over an external printf program on Solaris,
30773 # but without wasting forks for bash or zsh.
30774 if test -z "$BASH_VERSION$ZSH_VERSION" \
30775     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
30776   as_echo='print -r --'
30777   as_echo_n='print -rn --'
30778 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
30779   as_echo='printf %s\n'
30780   as_echo_n='printf %s'
30781 else
30782   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
30783     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
30784     as_echo_n='/usr/ucb/echo -n'
30785   else
30786     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
30787     as_echo_n_body='eval
30788       arg=$1;
30789       case $arg in #(
30790       *"$as_nl"*)
30791         expr "X$arg" : "X\\(.*\\)$as_nl";
30792         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
30793       esac;
30794       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
30795     '
30796     export as_echo_n_body
30797     as_echo_n='sh -c $as_echo_n_body as_echo'
30798   fi
30799   export as_echo_body
30800   as_echo='sh -c $as_echo_body as_echo'
30801 fi
30802
30803 # The user is always right.
30804 if test "${PATH_SEPARATOR+set}" != set; then
30805   PATH_SEPARATOR=:
30806   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
30807     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
30808       PATH_SEPARATOR=';'
30809   }
30810 fi
30811
30812
30813 # IFS
30814 # We need space, tab and new line, in precisely that order.  Quoting is
30815 # there to prevent editors from complaining about space-tab.
30816 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
30817 # splitting by setting IFS to empty value.)
30818 IFS=" ""        $as_nl"
30819
30820 # Find who we are.  Look in the path if we contain no directory separator.
30821 as_myself=
30822 case $0 in #((
30823   *[\\/]* ) as_myself=$0 ;;
30824   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30825 for as_dir in $PATH
30826 do
30827   IFS=$as_save_IFS
30828   test -z "$as_dir" && as_dir=.
30829     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
30830   done
30831 IFS=$as_save_IFS
30832
30833      ;;
30834 esac
30835 # We did not find ourselves, most probably we were run as `sh COMMAND'
30836 # in which case we are not to be found in the path.
30837 if test "x$as_myself" = x; then
30838   as_myself=$0
30839 fi
30840 if test ! -f "$as_myself"; then
30841   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
30842   exit 1
30843 fi
30844
30845 # Unset variables that we do not need and which cause bugs (e.g. in
30846 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
30847 # suppresses any "Segmentation fault" message there.  '((' could
30848 # trigger a bug in pdksh 5.2.14.
30849 for as_var in BASH_ENV ENV MAIL MAILPATH
30850 do eval test x\${$as_var+set} = xset \
30851   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
30852 done
30853 PS1='$ '
30854 PS2='> '
30855 PS4='+ '
30856
30857 # NLS nuisances.
30858 LC_ALL=C
30859 export LC_ALL
30860 LANGUAGE=C
30861 export LANGUAGE
30862
30863 # CDPATH.
30864 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
30865
30866
30867 # as_fn_error STATUS ERROR [LINENO LOG_FD]
30868 # ----------------------------------------
30869 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
30870 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
30871 # script with STATUS, using 1 if that was 0.
30872 as_fn_error ()
30873 {
30874   as_status=$1; test $as_status -eq 0 && as_status=1
30875   if test "$4"; then
30876     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
30877     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
30878   fi
30879   $as_echo "$as_me: error: $2" >&2
30880   as_fn_exit $as_status
30881 } # as_fn_error
30882
30883
30884 # as_fn_set_status STATUS
30885 # -----------------------
30886 # Set $? to STATUS, without forking.
30887 as_fn_set_status ()
30888 {
30889   return $1
30890 } # as_fn_set_status
30891
30892 # as_fn_exit STATUS
30893 # -----------------
30894 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
30895 as_fn_exit ()
30896 {
30897   set +e
30898   as_fn_set_status $1
30899   exit $1
30900 } # as_fn_exit
30901
30902 # as_fn_unset VAR
30903 # ---------------
30904 # Portably unset VAR.
30905 as_fn_unset ()
30906 {
30907   { eval $1=; unset $1;}
30908 }
30909 as_unset=as_fn_unset
30910 # as_fn_append VAR VALUE
30911 # ----------------------
30912 # Append the text in VALUE to the end of the definition contained in VAR. Take
30913 # advantage of any shell optimizations that allow amortized linear growth over
30914 # repeated appends, instead of the typical quadratic growth present in naive
30915 # implementations.
30916 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
30917   eval 'as_fn_append ()
30918   {
30919     eval $1+=\$2
30920   }'
30921 else
30922   as_fn_append ()
30923   {
30924     eval $1=\$$1\$2
30925   }
30926 fi # as_fn_append
30927
30928 # as_fn_arith ARG...
30929 # ------------------
30930 # Perform arithmetic evaluation on the ARGs, and store the result in the
30931 # global $as_val. Take advantage of shells that can avoid forks. The arguments
30932 # must be portable across $(()) and expr.
30933 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
30934   eval 'as_fn_arith ()
30935   {
30936     as_val=$(( $* ))
30937   }'
30938 else
30939   as_fn_arith ()
30940   {
30941     as_val=`expr "$@" || test $? -eq 1`
30942   }
30943 fi # as_fn_arith
30944
30945
30946 if expr a : '\(a\)' >/dev/null 2>&1 &&
30947    test "X`expr 00001 : '.*\(...\)'`" = X001; then
30948   as_expr=expr
30949 else
30950   as_expr=false
30951 fi
30952
30953 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
30954   as_basename=basename
30955 else
30956   as_basename=false
30957 fi
30958
30959 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
30960   as_dirname=dirname
30961 else
30962   as_dirname=false
30963 fi
30964
30965 as_me=`$as_basename -- "$0" ||
30966 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
30967          X"$0" : 'X\(//\)$' \| \
30968          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
30969 $as_echo X/"$0" |
30970     sed '/^.*\/\([^/][^/]*\)\/*$/{
30971             s//\1/
30972             q
30973           }
30974           /^X\/\(\/\/\)$/{
30975             s//\1/
30976             q
30977           }
30978           /^X\/\(\/\).*/{
30979             s//\1/
30980             q
30981           }
30982           s/.*/./; q'`
30983
30984 # Avoid depending upon Character Ranges.
30985 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
30986 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
30987 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
30988 as_cr_digits='0123456789'
30989 as_cr_alnum=$as_cr_Letters$as_cr_digits
30990
30991 ECHO_C= ECHO_N= ECHO_T=
30992 case `echo -n x` in #(((((
30993 -n*)
30994   case `echo 'xy\c'` in
30995   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
30996   xy)  ECHO_C='\c';;
30997   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
30998        ECHO_T=' ';;
30999   esac;;
31000 *)
31001   ECHO_N='-n';;
31002 esac
31003
31004 rm -f conf$$ conf$$.exe conf$$.file
31005 if test -d conf$$.dir; then
31006   rm -f conf$$.dir/conf$$.file
31007 else
31008   rm -f conf$$.dir
31009   mkdir conf$$.dir 2>/dev/null
31010 fi
31011 if (echo >conf$$.file) 2>/dev/null; then
31012   if ln -s conf$$.file conf$$ 2>/dev/null; then
31013     as_ln_s='ln -s'
31014     # ... but there are two gotchas:
31015     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
31016     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
31017     # In both cases, we have to default to `cp -pR'.
31018     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
31019       as_ln_s='cp -pR'
31020   elif ln conf$$.file conf$$ 2>/dev/null; then
31021     as_ln_s=ln
31022   else
31023     as_ln_s='cp -pR'
31024   fi
31025 else
31026   as_ln_s='cp -pR'
31027 fi
31028 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
31029 rmdir conf$$.dir 2>/dev/null
31030
31031
31032 # as_fn_mkdir_p
31033 # -------------
31034 # Create "$as_dir" as a directory, including parents if necessary.
31035 as_fn_mkdir_p ()
31036 {
31037
31038   case $as_dir in #(
31039   -*) as_dir=./$as_dir;;
31040   esac
31041   test -d "$as_dir" || eval $as_mkdir_p || {
31042     as_dirs=
31043     while :; do
31044       case $as_dir in #(
31045       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
31046       *) as_qdir=$as_dir;;
31047       esac
31048       as_dirs="'$as_qdir' $as_dirs"
31049       as_dir=`$as_dirname -- "$as_dir" ||
31050 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31051          X"$as_dir" : 'X\(//\)[^/]' \| \
31052          X"$as_dir" : 'X\(//\)$' \| \
31053          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31054 $as_echo X"$as_dir" |
31055     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31056             s//\1/
31057             q
31058           }
31059           /^X\(\/\/\)[^/].*/{
31060             s//\1/
31061             q
31062           }
31063           /^X\(\/\/\)$/{
31064             s//\1/
31065             q
31066           }
31067           /^X\(\/\).*/{
31068             s//\1/
31069             q
31070           }
31071           s/.*/./; q'`
31072       test -d "$as_dir" && break
31073     done
31074     test -z "$as_dirs" || eval "mkdir $as_dirs"
31075   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
31076
31077
31078 } # as_fn_mkdir_p
31079 if mkdir -p . 2>/dev/null; then
31080   as_mkdir_p='mkdir -p "$as_dir"'
31081 else
31082   test -d ./-p && rmdir ./-p
31083   as_mkdir_p=false
31084 fi
31085
31086
31087 # as_fn_executable_p FILE
31088 # -----------------------
31089 # Test if FILE is an executable regular file.
31090 as_fn_executable_p ()
31091 {
31092   test -f "$1" && test -x "$1"
31093 } # as_fn_executable_p
31094 as_test_x='test -x'
31095 as_executable_p=as_fn_executable_p
31096
31097 # Sed expression to map a string onto a valid CPP name.
31098 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
31099
31100 # Sed expression to map a string onto a valid variable name.
31101 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
31102
31103
31104 exec 6>&1
31105 ## ----------------------------------- ##
31106 ## Main body of $CONFIG_STATUS script. ##
31107 ## ----------------------------------- ##
31108 _ASEOF
31109 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
31110
31111 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31112 # Save the log message, to keep $0 and so on meaningful, and to
31113 # report actual input values of CONFIG_FILES etc. instead of their
31114 # values after options handling.
31115 ac_log="
31116 This file was extended by sntp $as_me 4.2.8p7, which was
31117 generated by GNU Autoconf 2.69.  Invocation command line was
31118
31119   CONFIG_FILES    = $CONFIG_FILES
31120   CONFIG_HEADERS  = $CONFIG_HEADERS
31121   CONFIG_LINKS    = $CONFIG_LINKS
31122   CONFIG_COMMANDS = $CONFIG_COMMANDS
31123   $ $0 $@
31124
31125 on `(hostname || uname -n) 2>/dev/null | sed 1q`
31126 "
31127
31128 _ACEOF
31129
31130 case $ac_config_files in *"
31131 "*) set x $ac_config_files; shift; ac_config_files=$*;;
31132 esac
31133
31134 case $ac_config_headers in *"
31135 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
31136 esac
31137
31138
31139 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31140 # Files that config.status was made for.
31141 config_files="$ac_config_files"
31142 config_headers="$ac_config_headers"
31143 config_commands="$ac_config_commands"
31144
31145 _ACEOF
31146
31147 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31148 ac_cs_usage="\
31149 \`$as_me' instantiates files and other configuration actions
31150 from templates according to the current configuration.  Unless the files
31151 and actions are specified as TAGs, all are instantiated by default.
31152
31153 Usage: $0 [OPTION]... [TAG]...
31154
31155   -h, --help       print this help, then exit
31156   -V, --version    print version number and configuration settings, then exit
31157       --config     print configuration, then exit
31158   -q, --quiet, --silent
31159                    do not print progress messages
31160   -d, --debug      don't remove temporary files
31161       --recheck    update $as_me by reconfiguring in the same conditions
31162       --file=FILE[:TEMPLATE]
31163                    instantiate the configuration file FILE
31164       --header=FILE[:TEMPLATE]
31165                    instantiate the configuration header FILE
31166
31167 Configuration files:
31168 $config_files
31169
31170 Configuration headers:
31171 $config_headers
31172
31173 Configuration commands:
31174 $config_commands
31175
31176 Report bugs to <http://bugs.ntp.org./>.
31177 sntp home page: <http://www.ntp.org./>."
31178
31179 _ACEOF
31180 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31181 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31182 ac_cs_version="\\
31183 sntp config.status 4.2.8p7
31184 configured by $0, generated by GNU Autoconf 2.69,
31185   with options \\"\$ac_cs_config\\"
31186
31187 Copyright (C) 2012 Free Software Foundation, Inc.
31188 This config.status script is free software; the Free Software Foundation
31189 gives unlimited permission to copy, distribute and modify it."
31190
31191 ac_pwd='$ac_pwd'
31192 srcdir='$srcdir'
31193 INSTALL='$INSTALL'
31194 MKDIR_P='$MKDIR_P'
31195 AWK='$AWK'
31196 test -n "\$AWK" || AWK=awk
31197 _ACEOF
31198
31199 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31200 # The default lists apply if the user does not specify any file.
31201 ac_need_defaults=:
31202 while test $# != 0
31203 do
31204   case $1 in
31205   --*=?*)
31206     ac_option=`expr "X$1" : 'X\([^=]*\)='`
31207     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31208     ac_shift=:
31209     ;;
31210   --*=)
31211     ac_option=`expr "X$1" : 'X\([^=]*\)='`
31212     ac_optarg=
31213     ac_shift=:
31214     ;;
31215   *)
31216     ac_option=$1
31217     ac_optarg=$2
31218     ac_shift=shift
31219     ;;
31220   esac
31221
31222   case $ac_option in
31223   # Handling of the options.
31224   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31225     ac_cs_recheck=: ;;
31226   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31227     $as_echo "$ac_cs_version"; exit ;;
31228   --config | --confi | --conf | --con | --co | --c )
31229     $as_echo "$ac_cs_config"; exit ;;
31230   --debug | --debu | --deb | --de | --d | -d )
31231     debug=: ;;
31232   --file | --fil | --fi | --f )
31233     $ac_shift
31234     case $ac_optarg in
31235     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31236     '') as_fn_error $? "missing file argument" ;;
31237     esac
31238     as_fn_append CONFIG_FILES " '$ac_optarg'"
31239     ac_need_defaults=false;;
31240   --header | --heade | --head | --hea )
31241     $ac_shift
31242     case $ac_optarg in
31243     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31244     esac
31245     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31246     ac_need_defaults=false;;
31247   --he | --h)
31248     # Conflict between --help and --header
31249     as_fn_error $? "ambiguous option: \`$1'
31250 Try \`$0 --help' for more information.";;
31251   --help | --hel | -h )
31252     $as_echo "$ac_cs_usage"; exit ;;
31253   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31254   | -silent | --silent | --silen | --sile | --sil | --si | --s)
31255     ac_cs_silent=: ;;
31256
31257   # This is an error.
31258   -*) as_fn_error $? "unrecognized option: \`$1'
31259 Try \`$0 --help' for more information." ;;
31260
31261   *) as_fn_append ac_config_targets " $1"
31262      ac_need_defaults=false ;;
31263
31264   esac
31265   shift
31266 done
31267
31268 ac_configure_extra_args=
31269
31270 if $ac_cs_silent; then
31271   exec 6>/dev/null
31272   ac_configure_extra_args="$ac_configure_extra_args --silent"
31273 fi
31274
31275 _ACEOF
31276 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31277 if \$ac_cs_recheck; then
31278   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31279   shift
31280   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
31281   CONFIG_SHELL='$SHELL'
31282   export CONFIG_SHELL
31283   exec "\$@"
31284 fi
31285
31286 _ACEOF
31287 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31288 exec 5>>config.log
31289 {
31290   echo
31291   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31292 ## Running $as_me. ##
31293 _ASBOX
31294   $as_echo "$ac_log"
31295 } >&5
31296
31297 _ACEOF
31298 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31299 #
31300 # INIT-COMMANDS
31301 #
31302 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
31303
31304
31305 # The HP-UX ksh and POSIX shell print the target directory to stdout
31306 # if CDPATH is set.
31307 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31308
31309 sed_quote_subst='$sed_quote_subst'
31310 double_quote_subst='$double_quote_subst'
31311 delay_variable_subst='$delay_variable_subst'
31312 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
31313 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
31314 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
31315 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
31316 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
31317 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
31318 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
31319 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
31320 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
31321 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
31322 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
31323 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
31324 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
31325 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
31326 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
31327 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
31328 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
31329 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
31330 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
31331 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
31332 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
31333 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
31334 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
31335 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
31336 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
31337 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
31338 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
31339 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
31340 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
31341 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
31342 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
31343 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
31344 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
31345 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
31346 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
31347 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
31348 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
31349 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
31350 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
31351 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
31352 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
31353 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
31354 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
31355 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
31356 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
31357 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
31358 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
31359 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
31360 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
31361 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
31362 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
31363 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
31364 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
31365 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
31366 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
31367 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"`'
31368 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
31369 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
31370 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
31371 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
31372 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
31373 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
31374 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
31375 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
31376 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
31377 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
31378 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
31379 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
31380 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
31381 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
31382 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
31383 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
31384 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
31385 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
31386 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
31387 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
31388 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
31389 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
31390 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
31391 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
31392 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
31393 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
31394 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
31395 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
31396 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
31397 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
31398 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
31399 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
31400 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
31401 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
31402 hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
31403 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
31404 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
31405 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
31406 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
31407 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
31408 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
31409 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
31410 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
31411 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
31412 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
31413 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
31414 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
31415 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
31416 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
31417 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
31418 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
31419 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
31420 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
31421 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
31422 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
31423 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
31424 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
31425 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
31426 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
31427 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
31428 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
31429 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
31430 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
31431 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
31432 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
31433 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
31434 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
31435 sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
31436 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
31437 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
31438 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
31439 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
31440 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
31441 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
31442 compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
31443 predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
31444 postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
31445 predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
31446 postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
31447 compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
31448 LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
31449 reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
31450 reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31451 old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31452 compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
31453 GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
31454 lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
31455 lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
31456 lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
31457 lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
31458 lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
31459 archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
31460 enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
31461 export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
31462 whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
31463 compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
31464 old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31465 old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31466 archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31467 archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31468 module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31469 module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31470 with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
31471 allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
31472 no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
31473 hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
31474 hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`'
31475 hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
31476 hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
31477 hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
31478 hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
31479 hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
31480 hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
31481 inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
31482 link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
31483 always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
31484 export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31485 exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
31486 include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
31487 prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31488 postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31489 file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
31490 hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
31491 compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
31492 predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
31493 postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
31494 predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
31495 postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
31496 compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
31497
31498 LTCC='$LTCC'
31499 LTCFLAGS='$LTCFLAGS'
31500 compiler='$compiler_DEFAULT'
31501
31502 # A function that is used when there is no print builtin or printf.
31503 func_fallback_echo ()
31504 {
31505   eval 'cat <<_LTECHO_EOF
31506 \$1
31507 _LTECHO_EOF'
31508 }
31509
31510 # Quote evaled strings.
31511 for var in SED \
31512 GREP \
31513 EGREP \
31514 FGREP \
31515 SHELL \
31516 ECHO \
31517 LD \
31518 NM \
31519 LN_S \
31520 lt_SP2NL \
31521 lt_NL2SP \
31522 reload_flag \
31523 OBJDUMP \
31524 deplibs_check_method \
31525 file_magic_cmd \
31526 file_magic_glob \
31527 want_nocaseglob \
31528 DLLTOOL \
31529 sharedlib_from_linklib_cmd \
31530 AR \
31531 AR_FLAGS \
31532 archiver_list_spec \
31533 STRIP \
31534 RANLIB \
31535 CC \
31536 CFLAGS \
31537 compiler \
31538 lt_cv_sys_global_symbol_pipe \
31539 lt_cv_sys_global_symbol_to_cdecl \
31540 lt_cv_sys_global_symbol_to_c_name_address \
31541 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
31542 nm_file_list_spec \
31543 lt_prog_compiler_no_builtin_flag \
31544 lt_prog_compiler_pic \
31545 lt_prog_compiler_wl \
31546 lt_prog_compiler_static \
31547 lt_cv_prog_compiler_c_o \
31548 need_locks \
31549 MANIFEST_TOOL \
31550 DSYMUTIL \
31551 NMEDIT \
31552 LIPO \
31553 OTOOL \
31554 OTOOL64 \
31555 shrext_cmds \
31556 export_dynamic_flag_spec \
31557 whole_archive_flag_spec \
31558 compiler_needs_object \
31559 with_gnu_ld \
31560 allow_undefined_flag \
31561 no_undefined_flag \
31562 hardcode_libdir_flag_spec \
31563 hardcode_libdir_flag_spec_ld \
31564 hardcode_libdir_separator \
31565 exclude_expsyms \
31566 include_expsyms \
31567 file_list_spec \
31568 variables_saved_for_relink \
31569 libname_spec \
31570 library_names_spec \
31571 soname_spec \
31572 install_override_mode \
31573 finish_eval \
31574 old_striplib \
31575 striplib \
31576 compiler_lib_search_dirs \
31577 predep_objects \
31578 postdep_objects \
31579 predeps \
31580 postdeps \
31581 compiler_lib_search_path \
31582 LD_CXX \
31583 reload_flag_CXX \
31584 compiler_CXX \
31585 lt_prog_compiler_no_builtin_flag_CXX \
31586 lt_prog_compiler_pic_CXX \
31587 lt_prog_compiler_wl_CXX \
31588 lt_prog_compiler_static_CXX \
31589 lt_cv_prog_compiler_c_o_CXX \
31590 export_dynamic_flag_spec_CXX \
31591 whole_archive_flag_spec_CXX \
31592 compiler_needs_object_CXX \
31593 with_gnu_ld_CXX \
31594 allow_undefined_flag_CXX \
31595 no_undefined_flag_CXX \
31596 hardcode_libdir_flag_spec_CXX \
31597 hardcode_libdir_flag_spec_ld_CXX \
31598 hardcode_libdir_separator_CXX \
31599 exclude_expsyms_CXX \
31600 include_expsyms_CXX \
31601 file_list_spec_CXX \
31602 compiler_lib_search_dirs_CXX \
31603 predep_objects_CXX \
31604 postdep_objects_CXX \
31605 predeps_CXX \
31606 postdeps_CXX \
31607 compiler_lib_search_path_CXX; do
31608     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
31609     *[\\\\\\\`\\"\\\$]*)
31610       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
31611       ;;
31612     *)
31613       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
31614       ;;
31615     esac
31616 done
31617
31618 # Double-quote double-evaled strings.
31619 for var in reload_cmds \
31620 old_postinstall_cmds \
31621 old_postuninstall_cmds \
31622 old_archive_cmds \
31623 extract_expsyms_cmds \
31624 old_archive_from_new_cmds \
31625 old_archive_from_expsyms_cmds \
31626 archive_cmds \
31627 archive_expsym_cmds \
31628 module_cmds \
31629 module_expsym_cmds \
31630 export_symbols_cmds \
31631 prelink_cmds \
31632 postlink_cmds \
31633 postinstall_cmds \
31634 postuninstall_cmds \
31635 finish_cmds \
31636 sys_lib_search_path_spec \
31637 sys_lib_dlsearch_path_spec \
31638 reload_cmds_CXX \
31639 old_archive_cmds_CXX \
31640 old_archive_from_new_cmds_CXX \
31641 old_archive_from_expsyms_cmds_CXX \
31642 archive_cmds_CXX \
31643 archive_expsym_cmds_CXX \
31644 module_cmds_CXX \
31645 module_expsym_cmds_CXX \
31646 export_symbols_cmds_CXX \
31647 prelink_cmds_CXX \
31648 postlink_cmds_CXX; do
31649     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
31650     *[\\\\\\\`\\"\\\$]*)
31651       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
31652       ;;
31653     *)
31654       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
31655       ;;
31656     esac
31657 done
31658
31659 ac_aux_dir='$ac_aux_dir'
31660 xsi_shell='$xsi_shell'
31661 lt_shell_append='$lt_shell_append'
31662
31663 # See if we are running on zsh, and set the options which allow our
31664 # commands through without removal of \ escapes INIT.
31665 if test -n "\${ZSH_VERSION+set}" ; then
31666    setopt NO_GLOB_SUBST
31667 fi
31668
31669
31670     PACKAGE='$PACKAGE'
31671     VERSION='$VERSION'
31672     TIMESTAMP='$TIMESTAMP'
31673     RM='$RM'
31674     ofile='$ofile'
31675
31676
31677
31678
31679
31680
31681 _ACEOF
31682
31683 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31684
31685 # Handling of arguments.
31686 for ac_config_target in $ac_config_targets
31687 do
31688   case $ac_config_target in
31689     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
31690     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
31691     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
31692     "libopts/Makefile") CONFIG_FILES="$CONFIG_FILES libopts/Makefile" ;;
31693     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
31694     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
31695     "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
31696     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
31697     "tests/fileHandlingTest.h") CONFIG_FILES="$CONFIG_FILES tests/fileHandlingTest.h" ;;
31698     "unity/Makefile") CONFIG_FILES="$CONFIG_FILES unity/Makefile" ;;
31699
31700   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
31701   esac
31702 done
31703
31704
31705 # If the user did not use the arguments to specify the items to instantiate,
31706 # then the envvar interface is used.  Set only those that are not.
31707 # We use the long form for the default assignment because of an extremely
31708 # bizarre bug on SunOS 4.1.3.
31709 if $ac_need_defaults; then
31710   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
31711   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
31712   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
31713 fi
31714
31715 # Have a temporary directory for convenience.  Make it in the build tree
31716 # simply because there is no reason against having it here, and in addition,
31717 # creating and moving files from /tmp can sometimes cause problems.
31718 # Hook for its removal unless debugging.
31719 # Note that there is a small window in which the directory will not be cleaned:
31720 # after its creation but before its name has been assigned to `$tmp'.
31721 $debug ||
31722 {
31723   tmp= ac_tmp=
31724   trap 'exit_status=$?
31725   : "${ac_tmp:=$tmp}"
31726   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
31727 ' 0
31728   trap 'as_fn_exit 1' 1 2 13 15
31729 }
31730 # Create a (secure) tmp directory for tmp files.
31731
31732 {
31733   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31734   test -d "$tmp"
31735 }  ||
31736 {
31737   tmp=./conf$$-$RANDOM
31738   (umask 077 && mkdir "$tmp")
31739 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31740 ac_tmp=$tmp
31741
31742 # Set up the scripts for CONFIG_FILES section.
31743 # No need to generate them if there are no CONFIG_FILES.
31744 # This happens for instance with `./config.status config.h'.
31745 if test -n "$CONFIG_FILES"; then
31746
31747
31748 ac_cr=`echo X | tr X '\015'`
31749 # On cygwin, bash can eat \r inside `` if the user requested igncr.
31750 # But we know of no other shell where ac_cr would be empty at this
31751 # point, so we can use a bashism as a fallback.
31752 if test "x$ac_cr" = x; then
31753   eval ac_cr=\$\'\\r\'
31754 fi
31755 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31756 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31757   ac_cs_awk_cr='\\r'
31758 else
31759   ac_cs_awk_cr=$ac_cr
31760 fi
31761
31762 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
31763 _ACEOF
31764
31765
31766 {
31767   echo "cat >conf$$subs.awk <<_ACEOF" &&
31768   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31769   echo "_ACEOF"
31770 } >conf$$subs.sh ||
31771   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31772 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
31773 ac_delim='%!_!# '
31774 for ac_last_try in false false false false false :; do
31775   . ./conf$$subs.sh ||
31776     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31777
31778   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31779   if test $ac_delim_n = $ac_delim_num; then
31780     break
31781   elif $ac_last_try; then
31782     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31783   else
31784     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31785   fi
31786 done
31787 rm -f conf$$subs.sh
31788
31789 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31790 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
31791 _ACEOF
31792 sed -n '
31793 h
31794 s/^/S["/; s/!.*/"]=/
31795 p
31796 g
31797 s/^[^!]*!//
31798 :repl
31799 t repl
31800 s/'"$ac_delim"'$//
31801 t delim
31802 :nl
31803 h
31804 s/\(.\{148\}\)..*/\1/
31805 t more1
31806 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31807 p
31808 n
31809 b repl
31810 :more1
31811 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31812 p
31813 g
31814 s/.\{148\}//
31815 t nl
31816 :delim
31817 h
31818 s/\(.\{148\}\)..*/\1/
31819 t more2
31820 s/["\\]/\\&/g; s/^/"/; s/$/"/
31821 p
31822 b
31823 :more2
31824 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31825 p
31826 g
31827 s/.\{148\}//
31828 t delim
31829 ' <conf$$subs.awk | sed '
31830 /^[^""]/{
31831   N
31832   s/\n//
31833 }
31834 ' >>$CONFIG_STATUS || ac_write_fail=1
31835 rm -f conf$$subs.awk
31836 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31837 _ACAWK
31838 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
31839   for (key in S) S_is_set[key] = 1
31840   FS = "\a"
31841
31842 }
31843 {
31844   line = $ 0
31845   nfields = split(line, field, "@")
31846   substed = 0
31847   len = length(field[1])
31848   for (i = 2; i < nfields; i++) {
31849     key = field[i]
31850     keylen = length(key)
31851     if (S_is_set[key]) {
31852       value = S[key]
31853       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31854       len += length(value) + length(field[++i])
31855       substed = 1
31856     } else
31857       len += 1 + keylen
31858   }
31859
31860   print line
31861 }
31862
31863 _ACAWK
31864 _ACEOF
31865 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31866 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31867   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31868 else
31869   cat
31870 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
31871   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
31872 _ACEOF
31873
31874 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
31875 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
31876 # trailing colons and then remove the whole line if VPATH becomes empty
31877 # (actually we leave an empty line to preserve line numbers).
31878 if test "x$srcdir" = x.; then
31879   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
31880 h
31881 s///
31882 s/^/:/
31883 s/[      ]*$/:/
31884 s/:\$(srcdir):/:/g
31885 s/:\${srcdir}:/:/g
31886 s/:@srcdir@:/:/g
31887 s/^:*//
31888 s/:*$//
31889 x
31890 s/\(=[   ]*\).*/\1/
31891 G
31892 s/\n//
31893 s/^[^=]*=[       ]*$//
31894 }'
31895 fi
31896
31897 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31898 fi # test -n "$CONFIG_FILES"
31899
31900 # Set up the scripts for CONFIG_HEADERS section.
31901 # No need to generate them if there are no CONFIG_HEADERS.
31902 # This happens for instance with `./config.status Makefile'.
31903 if test -n "$CONFIG_HEADERS"; then
31904 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
31905 BEGIN {
31906 _ACEOF
31907
31908 # Transform confdefs.h into an awk script `defines.awk', embedded as
31909 # here-document in config.status, that substitutes the proper values into
31910 # config.h.in to produce config.h.
31911
31912 # Create a delimiter string that does not exist in confdefs.h, to ease
31913 # handling of long lines.
31914 ac_delim='%!_!# '
31915 for ac_last_try in false false :; do
31916   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
31917   if test -z "$ac_tt"; then
31918     break
31919   elif $ac_last_try; then
31920     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
31921   else
31922     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31923   fi
31924 done
31925
31926 # For the awk script, D is an array of macro values keyed by name,
31927 # likewise P contains macro parameters if any.  Preserve backslash
31928 # newline sequences.
31929
31930 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31931 sed -n '
31932 s/.\{148\}/&'"$ac_delim"'/g
31933 t rset
31934 :rset
31935 s/^[     ]*#[    ]*define[       ][      ]*/ /
31936 t def
31937 d
31938 :def
31939 s/\\$//
31940 t bsnl
31941 s/["\\]/\\&/g
31942 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
31943 D["\1"]=" \3"/p
31944 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
31945 d
31946 :bsnl
31947 s/["\\]/\\&/g
31948 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
31949 D["\1"]=" \3\\\\\\n"\\/p
31950 t cont
31951 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
31952 t cont
31953 d
31954 :cont
31955 n
31956 s/.\{148\}/&'"$ac_delim"'/g
31957 t clear
31958 :clear
31959 s/\\$//
31960 t bsnlc
31961 s/["\\]/\\&/g; s/^/"/; s/$/"/p
31962 d
31963 :bsnlc
31964 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
31965 b cont
31966 ' <confdefs.h | sed '
31967 s/'"$ac_delim"'/"\\\
31968 "/g' >>$CONFIG_STATUS || ac_write_fail=1
31969
31970 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31971   for (key in D) D_is_set[key] = 1
31972   FS = "\a"
31973 }
31974 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
31975   line = \$ 0
31976   split(line, arg, " ")
31977   if (arg[1] == "#") {
31978     defundef = arg[2]
31979     mac1 = arg[3]
31980   } else {
31981     defundef = substr(arg[1], 2)
31982     mac1 = arg[2]
31983   }
31984   split(mac1, mac2, "(") #)
31985   macro = mac2[1]
31986   prefix = substr(line, 1, index(line, defundef) - 1)
31987   if (D_is_set[macro]) {
31988     # Preserve the white space surrounding the "#".
31989     print prefix "define", macro P[macro] D[macro]
31990     next
31991   } else {
31992     # Replace #undef with comments.  This is necessary, for example,
31993     # in the case of _POSIX_SOURCE, which is predefined and required
31994     # on some systems where configure will not decide to define it.
31995     if (defundef == "undef") {
31996       print "/*", prefix defundef, macro, "*/"
31997       next
31998     }
31999   }
32000 }
32001 { print }
32002 _ACAWK
32003 _ACEOF
32004 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32005   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32006 fi # test -n "$CONFIG_HEADERS"
32007
32008
32009 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
32010 shift
32011 for ac_tag
32012 do
32013   case $ac_tag in
32014   :[FHLC]) ac_mode=$ac_tag; continue;;
32015   esac
32016   case $ac_mode$ac_tag in
32017   :[FHL]*:*);;
32018   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
32019   :[FH]-) ac_tag=-:-;;
32020   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32021   esac
32022   ac_save_IFS=$IFS
32023   IFS=:
32024   set x $ac_tag
32025   IFS=$ac_save_IFS
32026   shift
32027   ac_file=$1
32028   shift
32029
32030   case $ac_mode in
32031   :L) ac_source=$1;;
32032   :[FH])
32033     ac_file_inputs=
32034     for ac_f
32035     do
32036       case $ac_f in
32037       -) ac_f="$ac_tmp/stdin";;
32038       *) # Look for the file first in the build tree, then in the source tree
32039          # (if the path is not absolute).  The absolute path cannot be DOS-style,
32040          # because $ac_f cannot contain `:'.
32041          test -f "$ac_f" ||
32042            case $ac_f in
32043            [\\/$]*) false;;
32044            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32045            esac ||
32046            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
32047       esac
32048       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32049       as_fn_append ac_file_inputs " '$ac_f'"
32050     done
32051
32052     # Let's still pretend it is `configure' which instantiates (i.e., don't
32053     # use $as_me), people would be surprised to read:
32054     #    /* config.h.  Generated by config.status.  */
32055     configure_input='Generated from '`
32056           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32057         `' by configure.'
32058     if test x"$ac_file" != x-; then
32059       configure_input="$ac_file.  $configure_input"
32060       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32061 $as_echo "$as_me: creating $ac_file" >&6;}
32062     fi
32063     # Neutralize special characters interpreted by sed in replacement strings.
32064     case $configure_input in #(
32065     *\&* | *\|* | *\\* )
32066        ac_sed_conf_input=`$as_echo "$configure_input" |
32067        sed 's/[\\\\&|]/\\\\&/g'`;; #(
32068     *) ac_sed_conf_input=$configure_input;;
32069     esac
32070
32071     case $ac_tag in
32072     *:-:* | *:-) cat >"$ac_tmp/stdin" \
32073       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
32074     esac
32075     ;;
32076   esac
32077
32078   ac_dir=`$as_dirname -- "$ac_file" ||
32079 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32080          X"$ac_file" : 'X\(//\)[^/]' \| \
32081          X"$ac_file" : 'X\(//\)$' \| \
32082          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32083 $as_echo X"$ac_file" |
32084     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32085             s//\1/
32086             q
32087           }
32088           /^X\(\/\/\)[^/].*/{
32089             s//\1/
32090             q
32091           }
32092           /^X\(\/\/\)$/{
32093             s//\1/
32094             q
32095           }
32096           /^X\(\/\).*/{
32097             s//\1/
32098             q
32099           }
32100           s/.*/./; q'`
32101   as_dir="$ac_dir"; as_fn_mkdir_p
32102   ac_builddir=.
32103
32104 case "$ac_dir" in
32105 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32106 *)
32107   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32108   # A ".." for each directory in $ac_dir_suffix.
32109   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32110   case $ac_top_builddir_sub in
32111   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32112   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32113   esac ;;
32114 esac
32115 ac_abs_top_builddir=$ac_pwd
32116 ac_abs_builddir=$ac_pwd$ac_dir_suffix
32117 # for backward compatibility:
32118 ac_top_builddir=$ac_top_build_prefix
32119
32120 case $srcdir in
32121   .)  # We are building in place.
32122     ac_srcdir=.
32123     ac_top_srcdir=$ac_top_builddir_sub
32124     ac_abs_top_srcdir=$ac_pwd ;;
32125   [\\/]* | ?:[\\/]* )  # Absolute name.
32126     ac_srcdir=$srcdir$ac_dir_suffix;
32127     ac_top_srcdir=$srcdir
32128     ac_abs_top_srcdir=$srcdir ;;
32129   *) # Relative name.
32130     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32131     ac_top_srcdir=$ac_top_build_prefix$srcdir
32132     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32133 esac
32134 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32135
32136
32137   case $ac_mode in
32138   :F)
32139   #
32140   # CONFIG_FILE
32141   #
32142
32143   case $INSTALL in
32144   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
32145   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
32146   esac
32147   ac_MKDIR_P=$MKDIR_P
32148   case $MKDIR_P in
32149   [\\/$]* | ?:[\\/]* ) ;;
32150   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
32151   esac
32152 _ACEOF
32153
32154 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32155 # If the template does not know about datarootdir, expand it.
32156 # FIXME: This hack should be removed a few years after 2.60.
32157 ac_datarootdir_hack=; ac_datarootdir_seen=
32158 ac_sed_dataroot='
32159 /datarootdir/ {
32160   p
32161   q
32162 }
32163 /@datadir@/p
32164 /@docdir@/p
32165 /@infodir@/p
32166 /@localedir@/p
32167 /@mandir@/p'
32168 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32169 *datarootdir*) ac_datarootdir_seen=yes;;
32170 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32171   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32172 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32173 _ACEOF
32174 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32175   ac_datarootdir_hack='
32176   s&@datadir@&$datadir&g
32177   s&@docdir@&$docdir&g
32178   s&@infodir@&$infodir&g
32179   s&@localedir@&$localedir&g
32180   s&@mandir@&$mandir&g
32181   s&\\\${datarootdir}&$datarootdir&g' ;;
32182 esac
32183 _ACEOF
32184
32185 # Neutralize VPATH when `$srcdir' = `.'.
32186 # Shell code in configure.ac might set extrasub.
32187 # FIXME: do we really want to maintain this feature?
32188 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32189 ac_sed_extra="$ac_vpsub
32190 $extrasub
32191 _ACEOF
32192 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32193 :t
32194 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32195 s|@configure_input@|$ac_sed_conf_input|;t t
32196 s&@top_builddir@&$ac_top_builddir_sub&;t t
32197 s&@top_build_prefix@&$ac_top_build_prefix&;t t
32198 s&@srcdir@&$ac_srcdir&;t t
32199 s&@abs_srcdir@&$ac_abs_srcdir&;t t
32200 s&@top_srcdir@&$ac_top_srcdir&;t t
32201 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32202 s&@builddir@&$ac_builddir&;t t
32203 s&@abs_builddir@&$ac_abs_builddir&;t t
32204 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32205 s&@INSTALL@&$ac_INSTALL&;t t
32206 s&@MKDIR_P@&$ac_MKDIR_P&;t t
32207 $ac_datarootdir_hack
32208 "
32209 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
32210   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32211
32212 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32213   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
32214   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
32215       "$ac_tmp/out"`; test -z "$ac_out"; } &&
32216   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32217 which seems to be undefined.  Please make sure it is defined" >&5
32218 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32219 which seems to be undefined.  Please make sure it is defined" >&2;}
32220
32221   rm -f "$ac_tmp/stdin"
32222   case $ac_file in
32223   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
32224   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
32225   esac \
32226   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32227  ;;
32228   :H)
32229   #
32230   # CONFIG_HEADER
32231   #
32232   if test x"$ac_file" != x-; then
32233     {
32234       $as_echo "/* $configure_input  */" \
32235       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
32236     } >"$ac_tmp/config.h" \
32237       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32238     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
32239       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32240 $as_echo "$as_me: $ac_file is unchanged" >&6;}
32241     else
32242       rm -f "$ac_file"
32243       mv "$ac_tmp/config.h" "$ac_file" \
32244         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32245     fi
32246   else
32247     $as_echo "/* $configure_input  */" \
32248       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
32249       || as_fn_error $? "could not create -" "$LINENO" 5
32250   fi
32251 # Compute "$ac_file"'s index in $config_headers.
32252 _am_arg="$ac_file"
32253 _am_stamp_count=1
32254 for _am_header in $config_headers :; do
32255   case $_am_header in
32256     $_am_arg | $_am_arg:* )
32257       break ;;
32258     * )
32259       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
32260   esac
32261 done
32262 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
32263 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32264          X"$_am_arg" : 'X\(//\)[^/]' \| \
32265          X"$_am_arg" : 'X\(//\)$' \| \
32266          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
32267 $as_echo X"$_am_arg" |
32268     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32269             s//\1/
32270             q
32271           }
32272           /^X\(\/\/\)[^/].*/{
32273             s//\1/
32274             q
32275           }
32276           /^X\(\/\/\)$/{
32277             s//\1/
32278             q
32279           }
32280           /^X\(\/\).*/{
32281             s//\1/
32282             q
32283           }
32284           s/.*/./; q'`/stamp-h$_am_stamp_count
32285  ;;
32286
32287   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
32288 $as_echo "$as_me: executing $ac_file commands" >&6;}
32289  ;;
32290   esac
32291
32292
32293   case $ac_file$ac_mode in
32294     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
32295   # Older Autoconf quotes --file arguments for eval, but not when files
32296   # are listed without --file.  Let's play safe and only enable the eval
32297   # if we detect the quoting.
32298   case $CONFIG_FILES in
32299   *\'*) eval set x "$CONFIG_FILES" ;;
32300   *)   set x $CONFIG_FILES ;;
32301   esac
32302   shift
32303   for mf
32304   do
32305     # Strip MF so we end up with the name of the file.
32306     mf=`echo "$mf" | sed -e 's/:.*$//'`
32307     # Check whether this is an Automake generated Makefile or not.
32308     # We used to match only the files named 'Makefile.in', but
32309     # some people rename them; so instead we look at the file content.
32310     # Grep'ing the first line is not enough: some people post-process
32311     # each Makefile.in and add a new line on top of each file to say so.
32312     # Grep'ing the whole file is not good either: AIX grep has a line
32313     # limit of 2048, but all sed's we know have understand at least 4000.
32314     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
32315       dirpart=`$as_dirname -- "$mf" ||
32316 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32317          X"$mf" : 'X\(//\)[^/]' \| \
32318          X"$mf" : 'X\(//\)$' \| \
32319          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
32320 $as_echo X"$mf" |
32321     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32322             s//\1/
32323             q
32324           }
32325           /^X\(\/\/\)[^/].*/{
32326             s//\1/
32327             q
32328           }
32329           /^X\(\/\/\)$/{
32330             s//\1/
32331             q
32332           }
32333           /^X\(\/\).*/{
32334             s//\1/
32335             q
32336           }
32337           s/.*/./; q'`
32338     else
32339       continue
32340     fi
32341     # Extract the definition of DEPDIR, am__include, and am__quote
32342     # from the Makefile without running 'make'.
32343     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
32344     test -z "$DEPDIR" && continue
32345     am__include=`sed -n 's/^am__include = //p' < "$mf"`
32346     test -z "$am__include" && continue
32347     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
32348     # Find all dependency output files, they are included files with
32349     # $(DEPDIR) in their names.  We invoke sed twice because it is the
32350     # simplest approach to changing $(DEPDIR) to its actual value in the
32351     # expansion.
32352     for file in `sed -n "
32353       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
32354          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
32355       # Make sure the directory exists.
32356       test -f "$dirpart/$file" && continue
32357       fdir=`$as_dirname -- "$file" ||
32358 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32359          X"$file" : 'X\(//\)[^/]' \| \
32360          X"$file" : 'X\(//\)$' \| \
32361          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
32362 $as_echo X"$file" |
32363     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32364             s//\1/
32365             q
32366           }
32367           /^X\(\/\/\)[^/].*/{
32368             s//\1/
32369             q
32370           }
32371           /^X\(\/\/\)$/{
32372             s//\1/
32373             q
32374           }
32375           /^X\(\/\).*/{
32376             s//\1/
32377             q
32378           }
32379           s/.*/./; q'`
32380       as_dir=$dirpart/$fdir; as_fn_mkdir_p
32381       # echo "creating $dirpart/$file"
32382       echo '# dummy' > "$dirpart/$file"
32383     done
32384   done
32385 }
32386  ;;
32387     "libtool":C)
32388
32389     # See if we are running on zsh, and set the options which allow our
32390     # commands through without removal of \ escapes.
32391     if test -n "${ZSH_VERSION+set}" ; then
32392       setopt NO_GLOB_SUBST
32393     fi
32394
32395     cfgfile="${ofile}T"
32396     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
32397     $RM "$cfgfile"
32398
32399     cat <<_LT_EOF >> "$cfgfile"
32400 #! $SHELL
32401
32402 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
32403 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
32404 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
32405 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
32406 #
32407 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
32408 #                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
32409 #                 Inc.
32410 #   Written by Gordon Matzigkeit, 1996
32411 #
32412 #   This file is part of GNU Libtool.
32413 #
32414 # GNU Libtool is free software; you can redistribute it and/or
32415 # modify it under the terms of the GNU General Public License as
32416 # published by the Free Software Foundation; either version 2 of
32417 # the License, or (at your option) any later version.
32418 #
32419 # As a special exception to the GNU General Public License,
32420 # if you distribute this file as part of a program or library that
32421 # is built using GNU Libtool, you may include this file under the
32422 # same distribution terms that you use for the rest of that program.
32423 #
32424 # GNU Libtool is distributed in the hope that it will be useful,
32425 # but WITHOUT ANY WARRANTY; without even the implied warranty of
32426 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
32427 # GNU General Public License for more details.
32428 #
32429 # You should have received a copy of the GNU General Public License
32430 # along with GNU Libtool; see the file COPYING.  If not, a copy
32431 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
32432 # obtained by writing to the Free Software Foundation, Inc.,
32433 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
32434
32435
32436 # The names of the tagged configurations supported by this script.
32437 available_tags="CXX "
32438
32439 # ### BEGIN LIBTOOL CONFIG
32440
32441 # A sed program that does not truncate output.
32442 SED=$lt_SED
32443
32444 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
32445 Xsed="\$SED -e 1s/^X//"
32446
32447 # A grep program that handles long lines.
32448 GREP=$lt_GREP
32449
32450 # An ERE matcher.
32451 EGREP=$lt_EGREP
32452
32453 # A literal string matcher.
32454 FGREP=$lt_FGREP
32455
32456 # Shell to use when invoking shell scripts.
32457 SHELL=$lt_SHELL
32458
32459 # An echo program that protects backslashes.
32460 ECHO=$lt_ECHO
32461
32462 # Whether or not to build shared libraries.
32463 build_libtool_libs=$enable_shared
32464
32465 # Which release of libtool.m4 was used?
32466 macro_version=$macro_version
32467 macro_revision=$macro_revision
32468
32469 # Whether or not to build static libraries.
32470 build_old_libs=$enable_static
32471
32472 # What type of objects to build.
32473 pic_mode=$pic_mode
32474
32475 # Whether or not to optimize for fast installation.
32476 fast_install=$enable_fast_install
32477
32478 # The host system.
32479 host_alias=$host_alias
32480 host=$host
32481 host_os=$host_os
32482
32483 # The build system.
32484 build_alias=$build_alias
32485 build=$build
32486 build_os=$build_os
32487
32488 # A BSD- or MS-compatible name lister.
32489 NM=$lt_NM
32490
32491 # Whether we need soft or hard links.
32492 LN_S=$lt_LN_S
32493
32494 # What is the maximum length of a command?
32495 max_cmd_len=$max_cmd_len
32496
32497 # Object file suffix (normally "o").
32498 objext=$ac_objext
32499
32500 # Executable file suffix (normally "").
32501 exeext=$exeext
32502
32503 # whether the shell understands "unset".
32504 lt_unset=$lt_unset
32505
32506 # turn spaces into newlines.
32507 SP2NL=$lt_lt_SP2NL
32508
32509 # turn newlines into spaces.
32510 NL2SP=$lt_lt_NL2SP
32511
32512 # convert \$build file names to \$host format.
32513 to_host_file_cmd=$lt_cv_to_host_file_cmd
32514
32515 # convert \$build files to toolchain format.
32516 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
32517
32518 # An object symbol dumper.
32519 OBJDUMP=$lt_OBJDUMP
32520
32521 # Method to check whether dependent libraries are shared objects.
32522 deplibs_check_method=$lt_deplibs_check_method
32523
32524 # Command to use when deplibs_check_method = "file_magic".
32525 file_magic_cmd=$lt_file_magic_cmd
32526
32527 # How to find potential files when deplibs_check_method = "file_magic".
32528 file_magic_glob=$lt_file_magic_glob
32529
32530 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
32531 want_nocaseglob=$lt_want_nocaseglob
32532
32533 # DLL creation program.
32534 DLLTOOL=$lt_DLLTOOL
32535
32536 # Command to associate shared and link libraries.
32537 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
32538
32539 # The archiver.
32540 AR=$lt_AR
32541
32542 # Flags to create an archive.
32543 AR_FLAGS=$lt_AR_FLAGS
32544
32545 # How to feed a file listing to the archiver.
32546 archiver_list_spec=$lt_archiver_list_spec
32547
32548 # A symbol stripping program.
32549 STRIP=$lt_STRIP
32550
32551 # Commands used to install an old-style archive.
32552 RANLIB=$lt_RANLIB
32553 old_postinstall_cmds=$lt_old_postinstall_cmds
32554 old_postuninstall_cmds=$lt_old_postuninstall_cmds
32555
32556 # Whether to use a lock for old archive extraction.
32557 lock_old_archive_extraction=$lock_old_archive_extraction
32558
32559 # A C compiler.
32560 LTCC=$lt_CC
32561
32562 # LTCC compiler flags.
32563 LTCFLAGS=$lt_CFLAGS
32564
32565 # Take the output of nm and produce a listing of raw symbols and C names.
32566 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
32567
32568 # Transform the output of nm in a proper C declaration.
32569 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
32570
32571 # Transform the output of nm in a C name address pair.
32572 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
32573
32574 # Transform the output of nm in a C name address pair when lib prefix is needed.
32575 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
32576
32577 # Specify filename containing input files for \$NM.
32578 nm_file_list_spec=$lt_nm_file_list_spec
32579
32580 # The root where to search for dependent libraries,and in which our libraries should be installed.
32581 lt_sysroot=$lt_sysroot
32582
32583 # The name of the directory that contains temporary libtool files.
32584 objdir=$objdir
32585
32586 # Used to examine libraries when file_magic_cmd begins with "file".
32587 MAGIC_CMD=$MAGIC_CMD
32588
32589 # Must we lock files when doing compilation?
32590 need_locks=$lt_need_locks
32591
32592 # Manifest tool.
32593 MANIFEST_TOOL=$lt_MANIFEST_TOOL
32594
32595 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
32596 DSYMUTIL=$lt_DSYMUTIL
32597
32598 # Tool to change global to local symbols on Mac OS X.
32599 NMEDIT=$lt_NMEDIT
32600
32601 # Tool to manipulate fat objects and archives on Mac OS X.
32602 LIPO=$lt_LIPO
32603
32604 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
32605 OTOOL=$lt_OTOOL
32606
32607 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
32608 OTOOL64=$lt_OTOOL64
32609
32610 # Old archive suffix (normally "a").
32611 libext=$libext
32612
32613 # Shared library suffix (normally ".so").
32614 shrext_cmds=$lt_shrext_cmds
32615
32616 # The commands to extract the exported symbol list from a shared archive.
32617 extract_expsyms_cmds=$lt_extract_expsyms_cmds
32618
32619 # Variables whose values should be saved in libtool wrapper scripts and
32620 # restored at link time.
32621 variables_saved_for_relink=$lt_variables_saved_for_relink
32622
32623 # Do we need the "lib" prefix for modules?
32624 need_lib_prefix=$need_lib_prefix
32625
32626 # Do we need a version for libraries?
32627 need_version=$need_version
32628
32629 # Library versioning type.
32630 version_type=$version_type
32631
32632 # Shared library runtime path variable.
32633 runpath_var=$runpath_var
32634
32635 # Shared library path variable.
32636 shlibpath_var=$shlibpath_var
32637
32638 # Is shlibpath searched before the hard-coded library search path?
32639 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
32640
32641 # Format of library name prefix.
32642 libname_spec=$lt_libname_spec
32643
32644 # List of archive names.  First name is the real one, the rest are links.
32645 # The last name is the one that the linker finds with -lNAME
32646 library_names_spec=$lt_library_names_spec
32647
32648 # The coded name of the library, if different from the real name.
32649 soname_spec=$lt_soname_spec
32650
32651 # Permission mode override for installation of shared libraries.
32652 install_override_mode=$lt_install_override_mode
32653
32654 # Command to use after installation of a shared archive.
32655 postinstall_cmds=$lt_postinstall_cmds
32656
32657 # Command to use after uninstallation of a shared archive.
32658 postuninstall_cmds=$lt_postuninstall_cmds
32659
32660 # Commands used to finish a libtool library installation in a directory.
32661 finish_cmds=$lt_finish_cmds
32662
32663 # As "finish_cmds", except a single script fragment to be evaled but
32664 # not shown.
32665 finish_eval=$lt_finish_eval
32666
32667 # Whether we should hardcode library paths into libraries.
32668 hardcode_into_libs=$hardcode_into_libs
32669
32670 # Compile-time system search path for libraries.
32671 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
32672
32673 # Run-time system search path for libraries.
32674 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
32675
32676 # Whether dlopen is supported.
32677 dlopen_support=$enable_dlopen
32678
32679 # Whether dlopen of programs is supported.
32680 dlopen_self=$enable_dlopen_self
32681
32682 # Whether dlopen of statically linked programs is supported.
32683 dlopen_self_static=$enable_dlopen_self_static
32684
32685 # Commands to strip libraries.
32686 old_striplib=$lt_old_striplib
32687 striplib=$lt_striplib
32688
32689
32690 # The linker used to build libraries.
32691 LD=$lt_LD
32692
32693 # How to create reloadable object files.
32694 reload_flag=$lt_reload_flag
32695 reload_cmds=$lt_reload_cmds
32696
32697 # Commands used to build an old-style archive.
32698 old_archive_cmds=$lt_old_archive_cmds
32699
32700 # A language specific compiler.
32701 CC=$lt_compiler
32702
32703 # Is the compiler the GNU compiler?
32704 with_gcc=$GCC
32705
32706 # Compiler flag to turn off builtin functions.
32707 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
32708
32709 # Additional compiler flags for building library objects.
32710 pic_flag=$lt_lt_prog_compiler_pic
32711
32712 # How to pass a linker flag through the compiler.
32713 wl=$lt_lt_prog_compiler_wl
32714
32715 # Compiler flag to prevent dynamic linking.
32716 link_static_flag=$lt_lt_prog_compiler_static
32717
32718 # Does compiler simultaneously support -c and -o options?
32719 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
32720
32721 # Whether or not to add -lc for building shared libraries.
32722 build_libtool_need_lc=$archive_cmds_need_lc
32723
32724 # Whether or not to disallow shared libs when runtime libs are static.
32725 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
32726
32727 # Compiler flag to allow reflexive dlopens.
32728 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
32729
32730 # Compiler flag to generate shared objects directly from archives.
32731 whole_archive_flag_spec=$lt_whole_archive_flag_spec
32732
32733 # Whether the compiler copes with passing no objects directly.
32734 compiler_needs_object=$lt_compiler_needs_object
32735
32736 # Create an old-style archive from a shared archive.
32737 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
32738
32739 # Create a temporary old-style archive to link instead of a shared archive.
32740 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
32741
32742 # Commands used to build a shared archive.
32743 archive_cmds=$lt_archive_cmds
32744 archive_expsym_cmds=$lt_archive_expsym_cmds
32745
32746 # Commands used to build a loadable module if different from building
32747 # a shared archive.
32748 module_cmds=$lt_module_cmds
32749 module_expsym_cmds=$lt_module_expsym_cmds
32750
32751 # Whether we are building with GNU ld or not.
32752 with_gnu_ld=$lt_with_gnu_ld
32753
32754 # Flag that allows shared libraries with undefined symbols to be built.
32755 allow_undefined_flag=$lt_allow_undefined_flag
32756
32757 # Flag that enforces no undefined symbols.
32758 no_undefined_flag=$lt_no_undefined_flag
32759
32760 # Flag to hardcode \$libdir into a binary during linking.
32761 # This must work even if \$libdir does not exist
32762 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
32763
32764 # If ld is used when linking, flag to hardcode \$libdir into a binary
32765 # during linking.  This must work even if \$libdir does not exist.
32766 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
32767
32768 # Whether we need a single "-rpath" flag with a separated argument.
32769 hardcode_libdir_separator=$lt_hardcode_libdir_separator
32770
32771 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
32772 # DIR into the resulting binary.
32773 hardcode_direct=$hardcode_direct
32774
32775 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
32776 # DIR into the resulting binary and the resulting library dependency is
32777 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
32778 # library is relocated.
32779 hardcode_direct_absolute=$hardcode_direct_absolute
32780
32781 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
32782 # into the resulting binary.
32783 hardcode_minus_L=$hardcode_minus_L
32784
32785 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
32786 # into the resulting binary.
32787 hardcode_shlibpath_var=$hardcode_shlibpath_var
32788
32789 # Set to "yes" if building a shared library automatically hardcodes DIR
32790 # into the library and all subsequent libraries and executables linked
32791 # against it.
32792 hardcode_automatic=$hardcode_automatic
32793
32794 # Set to yes if linker adds runtime paths of dependent libraries
32795 # to runtime path list.
32796 inherit_rpath=$inherit_rpath
32797
32798 # Whether libtool must link a program against all its dependency libraries.
32799 link_all_deplibs=$link_all_deplibs
32800
32801 # Set to "yes" if exported symbols are required.
32802 always_export_symbols=$always_export_symbols
32803
32804 # The commands to list exported symbols.
32805 export_symbols_cmds=$lt_export_symbols_cmds
32806
32807 # Symbols that should not be listed in the preloaded symbols.
32808 exclude_expsyms=$lt_exclude_expsyms
32809
32810 # Symbols that must always be exported.
32811 include_expsyms=$lt_include_expsyms
32812
32813 # Commands necessary for linking programs (against libraries) with templates.
32814 prelink_cmds=$lt_prelink_cmds
32815
32816 # Commands necessary for finishing linking programs.
32817 postlink_cmds=$lt_postlink_cmds
32818
32819 # Specify filename containing input files.
32820 file_list_spec=$lt_file_list_spec
32821
32822 # How to hardcode a shared library path into an executable.
32823 hardcode_action=$hardcode_action
32824
32825 # The directories searched by this compiler when creating a shared library.
32826 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
32827
32828 # Dependencies to place before and after the objects being linked to
32829 # create a shared library.
32830 predep_objects=$lt_predep_objects
32831 postdep_objects=$lt_postdep_objects
32832 predeps=$lt_predeps
32833 postdeps=$lt_postdeps
32834
32835 # The library search path used internally by the compiler when linking
32836 # a shared library.
32837 compiler_lib_search_path=$lt_compiler_lib_search_path
32838
32839 # ### END LIBTOOL CONFIG
32840
32841 _LT_EOF
32842
32843   case $host_os in
32844   aix3*)
32845     cat <<\_LT_EOF >> "$cfgfile"
32846 # AIX sometimes has problems with the GCC collect2 program.  For some
32847 # reason, if we set the COLLECT_NAMES environment variable, the problems
32848 # vanish in a puff of smoke.
32849 if test "X${COLLECT_NAMES+set}" != Xset; then
32850   COLLECT_NAMES=
32851   export COLLECT_NAMES
32852 fi
32853 _LT_EOF
32854     ;;
32855   esac
32856
32857
32858 ltmain="$ac_aux_dir/ltmain.sh"
32859
32860
32861   # We use sed instead of cat because bash on DJGPP gets confused if
32862   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
32863   # text mode, it properly converts lines to CR/LF.  This bash problem
32864   # is reportedly fixed, but why not run on old versions too?
32865   sed '$q' "$ltmain" >> "$cfgfile" \
32866      || (rm -f "$cfgfile"; exit 1)
32867
32868   if test x"$xsi_shell" = xyes; then
32869   sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
32870 func_dirname ()\
32871 {\
32872 \    case ${1} in\
32873 \      */*) func_dirname_result="${1%/*}${2}" ;;\
32874 \      *  ) func_dirname_result="${3}" ;;\
32875 \    esac\
32876 } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
32877   && mv -f "$cfgfile.tmp" "$cfgfile" \
32878     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32879 test 0 -eq $? || _lt_function_replace_fail=:
32880
32881
32882   sed -e '/^func_basename ()$/,/^} # func_basename /c\
32883 func_basename ()\
32884 {\
32885 \    func_basename_result="${1##*/}"\
32886 } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
32887   && mv -f "$cfgfile.tmp" "$cfgfile" \
32888     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32889 test 0 -eq $? || _lt_function_replace_fail=:
32890
32891
32892   sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
32893 func_dirname_and_basename ()\
32894 {\
32895 \    case ${1} in\
32896 \      */*) func_dirname_result="${1%/*}${2}" ;;\
32897 \      *  ) func_dirname_result="${3}" ;;\
32898 \    esac\
32899 \    func_basename_result="${1##*/}"\
32900 } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
32901   && mv -f "$cfgfile.tmp" "$cfgfile" \
32902     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32903 test 0 -eq $? || _lt_function_replace_fail=:
32904
32905
32906   sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
32907 func_stripname ()\
32908 {\
32909 \    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
32910 \    # positional parameters, so assign one to ordinary parameter first.\
32911 \    func_stripname_result=${3}\
32912 \    func_stripname_result=${func_stripname_result#"${1}"}\
32913 \    func_stripname_result=${func_stripname_result%"${2}"}\
32914 } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
32915   && mv -f "$cfgfile.tmp" "$cfgfile" \
32916     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32917 test 0 -eq $? || _lt_function_replace_fail=:
32918
32919
32920   sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
32921 func_split_long_opt ()\
32922 {\
32923 \    func_split_long_opt_name=${1%%=*}\
32924 \    func_split_long_opt_arg=${1#*=}\
32925 } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
32926   && mv -f "$cfgfile.tmp" "$cfgfile" \
32927     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32928 test 0 -eq $? || _lt_function_replace_fail=:
32929
32930
32931   sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
32932 func_split_short_opt ()\
32933 {\
32934 \    func_split_short_opt_arg=${1#??}\
32935 \    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
32936 } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
32937   && mv -f "$cfgfile.tmp" "$cfgfile" \
32938     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32939 test 0 -eq $? || _lt_function_replace_fail=:
32940
32941
32942   sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
32943 func_lo2o ()\
32944 {\
32945 \    case ${1} in\
32946 \      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
32947 \      *)    func_lo2o_result=${1} ;;\
32948 \    esac\
32949 } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
32950   && mv -f "$cfgfile.tmp" "$cfgfile" \
32951     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32952 test 0 -eq $? || _lt_function_replace_fail=:
32953
32954
32955   sed -e '/^func_xform ()$/,/^} # func_xform /c\
32956 func_xform ()\
32957 {\
32958     func_xform_result=${1%.*}.lo\
32959 } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
32960   && mv -f "$cfgfile.tmp" "$cfgfile" \
32961     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32962 test 0 -eq $? || _lt_function_replace_fail=:
32963
32964
32965   sed -e '/^func_arith ()$/,/^} # func_arith /c\
32966 func_arith ()\
32967 {\
32968     func_arith_result=$(( $* ))\
32969 } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
32970   && mv -f "$cfgfile.tmp" "$cfgfile" \
32971     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32972 test 0 -eq $? || _lt_function_replace_fail=:
32973
32974
32975   sed -e '/^func_len ()$/,/^} # func_len /c\
32976 func_len ()\
32977 {\
32978     func_len_result=${#1}\
32979 } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
32980   && mv -f "$cfgfile.tmp" "$cfgfile" \
32981     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32982 test 0 -eq $? || _lt_function_replace_fail=:
32983
32984 fi
32985
32986 if test x"$lt_shell_append" = xyes; then
32987   sed -e '/^func_append ()$/,/^} # func_append /c\
32988 func_append ()\
32989 {\
32990     eval "${1}+=\\${2}"\
32991 } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
32992   && mv -f "$cfgfile.tmp" "$cfgfile" \
32993     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32994 test 0 -eq $? || _lt_function_replace_fail=:
32995
32996
32997   sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
32998 func_append_quoted ()\
32999 {\
33000 \    func_quote_for_eval "${2}"\
33001 \    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
33002 } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
33003   && mv -f "$cfgfile.tmp" "$cfgfile" \
33004     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33005 test 0 -eq $? || _lt_function_replace_fail=:
33006
33007
33008   # Save a `func_append' function call where possible by direct use of '+='
33009   sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
33010     && mv -f "$cfgfile.tmp" "$cfgfile" \
33011       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33012   test 0 -eq $? || _lt_function_replace_fail=:
33013 else
33014   # Save a `func_append' function call even when '+=' is not available
33015   sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
33016     && mv -f "$cfgfile.tmp" "$cfgfile" \
33017       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33018   test 0 -eq $? || _lt_function_replace_fail=:
33019 fi
33020
33021 if test x"$_lt_function_replace_fail" = x":"; then
33022   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
33023 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
33024 fi
33025
33026
33027    mv -f "$cfgfile" "$ofile" ||
33028     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
33029   chmod +x "$ofile"
33030
33031
33032     cat <<_LT_EOF >> "$ofile"
33033
33034 # ### BEGIN LIBTOOL TAG CONFIG: CXX
33035
33036 # The linker used to build libraries.
33037 LD=$lt_LD_CXX
33038
33039 # How to create reloadable object files.
33040 reload_flag=$lt_reload_flag_CXX
33041 reload_cmds=$lt_reload_cmds_CXX
33042
33043 # Commands used to build an old-style archive.
33044 old_archive_cmds=$lt_old_archive_cmds_CXX
33045
33046 # A language specific compiler.
33047 CC=$lt_compiler_CXX
33048
33049 # Is the compiler the GNU compiler?
33050 with_gcc=$GCC_CXX
33051
33052 # Compiler flag to turn off builtin functions.
33053 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
33054
33055 # Additional compiler flags for building library objects.
33056 pic_flag=$lt_lt_prog_compiler_pic_CXX
33057
33058 # How to pass a linker flag through the compiler.
33059 wl=$lt_lt_prog_compiler_wl_CXX
33060
33061 # Compiler flag to prevent dynamic linking.
33062 link_static_flag=$lt_lt_prog_compiler_static_CXX
33063
33064 # Does compiler simultaneously support -c and -o options?
33065 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
33066
33067 # Whether or not to add -lc for building shared libraries.
33068 build_libtool_need_lc=$archive_cmds_need_lc_CXX
33069
33070 # Whether or not to disallow shared libs when runtime libs are static.
33071 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
33072
33073 # Compiler flag to allow reflexive dlopens.
33074 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
33075
33076 # Compiler flag to generate shared objects directly from archives.
33077 whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
33078
33079 # Whether the compiler copes with passing no objects directly.
33080 compiler_needs_object=$lt_compiler_needs_object_CXX
33081
33082 # Create an old-style archive from a shared archive.
33083 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
33084
33085 # Create a temporary old-style archive to link instead of a shared archive.
33086 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
33087
33088 # Commands used to build a shared archive.
33089 archive_cmds=$lt_archive_cmds_CXX
33090 archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
33091
33092 # Commands used to build a loadable module if different from building
33093 # a shared archive.
33094 module_cmds=$lt_module_cmds_CXX
33095 module_expsym_cmds=$lt_module_expsym_cmds_CXX
33096
33097 # Whether we are building with GNU ld or not.
33098 with_gnu_ld=$lt_with_gnu_ld_CXX
33099
33100 # Flag that allows shared libraries with undefined symbols to be built.
33101 allow_undefined_flag=$lt_allow_undefined_flag_CXX
33102
33103 # Flag that enforces no undefined symbols.
33104 no_undefined_flag=$lt_no_undefined_flag_CXX
33105
33106 # Flag to hardcode \$libdir into a binary during linking.
33107 # This must work even if \$libdir does not exist
33108 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
33109
33110 # If ld is used when linking, flag to hardcode \$libdir into a binary
33111 # during linking.  This must work even if \$libdir does not exist.
33112 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
33113
33114 # Whether we need a single "-rpath" flag with a separated argument.
33115 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
33116
33117 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
33118 # DIR into the resulting binary.
33119 hardcode_direct=$hardcode_direct_CXX
33120
33121 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
33122 # DIR into the resulting binary and the resulting library dependency is
33123 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
33124 # library is relocated.
33125 hardcode_direct_absolute=$hardcode_direct_absolute_CXX
33126
33127 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
33128 # into the resulting binary.
33129 hardcode_minus_L=$hardcode_minus_L_CXX
33130
33131 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
33132 # into the resulting binary.
33133 hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
33134
33135 # Set to "yes" if building a shared library automatically hardcodes DIR
33136 # into the library and all subsequent libraries and executables linked
33137 # against it.
33138 hardcode_automatic=$hardcode_automatic_CXX
33139
33140 # Set to yes if linker adds runtime paths of dependent libraries
33141 # to runtime path list.
33142 inherit_rpath=$inherit_rpath_CXX
33143
33144 # Whether libtool must link a program against all its dependency libraries.
33145 link_all_deplibs=$link_all_deplibs_CXX
33146
33147 # Set to "yes" if exported symbols are required.
33148 always_export_symbols=$always_export_symbols_CXX
33149
33150 # The commands to list exported symbols.
33151 export_symbols_cmds=$lt_export_symbols_cmds_CXX
33152
33153 # Symbols that should not be listed in the preloaded symbols.
33154 exclude_expsyms=$lt_exclude_expsyms_CXX
33155
33156 # Symbols that must always be exported.
33157 include_expsyms=$lt_include_expsyms_CXX
33158
33159 # Commands necessary for linking programs (against libraries) with templates.
33160 prelink_cmds=$lt_prelink_cmds_CXX
33161
33162 # Commands necessary for finishing linking programs.
33163 postlink_cmds=$lt_postlink_cmds_CXX
33164
33165 # Specify filename containing input files.
33166 file_list_spec=$lt_file_list_spec_CXX
33167
33168 # How to hardcode a shared library path into an executable.
33169 hardcode_action=$hardcode_action_CXX
33170
33171 # The directories searched by this compiler when creating a shared library.
33172 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
33173
33174 # Dependencies to place before and after the objects being linked to
33175 # create a shared library.
33176 predep_objects=$lt_predep_objects_CXX
33177 postdep_objects=$lt_postdep_objects_CXX
33178 predeps=$lt_predeps_CXX
33179 postdeps=$lt_postdeps_CXX
33180
33181 # The library search path used internally by the compiler when linking
33182 # a shared library.
33183 compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
33184
33185 # ### END LIBTOOL TAG CONFIG: CXX
33186 _LT_EOF
33187
33188  ;;
33189
33190   esac
33191 done # for ac_tag
33192
33193
33194 as_fn_exit 0
33195 _ACEOF
33196 ac_clean_files=$ac_clean_files_save
33197
33198 test $ac_write_fail = 0 ||
33199   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33200
33201
33202 # configure is writing to config.log, and then calls config.status.
33203 # config.status does its own redirection, appending to config.log.
33204 # Unfortunately, on DOS this fails, as config.log is still kept open
33205 # by configure, so config.status won't be able to write to it; its
33206 # output is simply discarded.  So we exec the FD to /dev/null,
33207 # effectively closing config.log, so it can be properly (re)opened and
33208 # appended to by config.status.  When coming back to configure, we
33209 # need to make the FD available again.
33210 if test "$no_create" != yes; then
33211   ac_cs_success=:
33212   ac_config_status_args=
33213   test "$silent" = yes &&
33214     ac_config_status_args="$ac_config_status_args --quiet"
33215   exec 5>/dev/null
33216   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33217   exec 5>>config.log
33218   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33219   # would make configure fail if this is the last instruction.
33220   $ac_cs_success || as_fn_exit 1
33221 fi
33222
33223 #
33224 # CONFIG_SUBDIRS section.
33225 #
33226 if test "$no_recursion" != yes; then
33227
33228   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
33229   # so they do not pile up.
33230   ac_sub_configure_args=
33231   ac_prev=
33232   eval "set x $ac_configure_args"
33233   shift
33234   for ac_arg
33235   do
33236     if test -n "$ac_prev"; then
33237       ac_prev=
33238       continue
33239     fi
33240     case $ac_arg in
33241     -cache-file | --cache-file | --cache-fil | --cache-fi \
33242     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
33243       ac_prev=cache_file ;;
33244     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
33245     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
33246     | --c=*)
33247       ;;
33248     --config-cache | -C)
33249       ;;
33250     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
33251       ac_prev=srcdir ;;
33252     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
33253       ;;
33254     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
33255       ac_prev=prefix ;;
33256     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
33257       ;;
33258     --disable-option-checking)
33259       ;;
33260     *)
33261       case $ac_arg in
33262       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
33263       esac
33264       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
33265     esac
33266   done
33267
33268   # Always prepend --prefix to ensure using the same prefix
33269   # in subdir configurations.
33270   ac_arg="--prefix=$prefix"
33271   case $ac_arg in
33272   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
33273   esac
33274   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
33275
33276   # Pass --silent
33277   if test "$silent" = yes; then
33278     ac_sub_configure_args="--silent $ac_sub_configure_args"
33279   fi
33280
33281   # Always prepend --disable-option-checking to silence warnings, since
33282   # different subdirs can have different --enable and --with options.
33283   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
33284
33285   ac_popdir=`pwd`
33286   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
33287
33288     # Do not complain, so a configure script can configure whichever
33289     # parts of a large source tree are present.
33290     test -d "$srcdir/$ac_dir" || continue
33291
33292     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
33293     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
33294     $as_echo "$ac_msg" >&6
33295     as_dir="$ac_dir"; as_fn_mkdir_p
33296     ac_builddir=.
33297
33298 case "$ac_dir" in
33299 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33300 *)
33301   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33302   # A ".." for each directory in $ac_dir_suffix.
33303   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33304   case $ac_top_builddir_sub in
33305   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33306   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33307   esac ;;
33308 esac
33309 ac_abs_top_builddir=$ac_pwd
33310 ac_abs_builddir=$ac_pwd$ac_dir_suffix
33311 # for backward compatibility:
33312 ac_top_builddir=$ac_top_build_prefix
33313
33314 case $srcdir in
33315   .)  # We are building in place.
33316     ac_srcdir=.
33317     ac_top_srcdir=$ac_top_builddir_sub
33318     ac_abs_top_srcdir=$ac_pwd ;;
33319   [\\/]* | ?:[\\/]* )  # Absolute name.
33320     ac_srcdir=$srcdir$ac_dir_suffix;
33321     ac_top_srcdir=$srcdir
33322     ac_abs_top_srcdir=$srcdir ;;
33323   *) # Relative name.
33324     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
33325     ac_top_srcdir=$ac_top_build_prefix$srcdir
33326     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
33327 esac
33328 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
33329
33330
33331     cd "$ac_dir"
33332
33333     # Check for guested configure; otherwise get Cygnus style configure.
33334     if test -f "$ac_srcdir/configure.gnu"; then
33335       ac_sub_configure=$ac_srcdir/configure.gnu
33336     elif test -f "$ac_srcdir/configure"; then
33337       ac_sub_configure=$ac_srcdir/configure
33338     elif test -f "$ac_srcdir/configure.in"; then
33339       # This should be Cygnus configure.
33340       ac_sub_configure=$ac_aux_dir/configure
33341     else
33342       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
33343 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
33344       ac_sub_configure=
33345     fi
33346
33347     # The recursion is here.
33348     if test -n "$ac_sub_configure"; then
33349       # Make the cache file name correct relative to the subdirectory.
33350       case $cache_file in
33351       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
33352       *) # Relative name.
33353         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
33354       esac
33355
33356       { $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
33357 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
33358       # The eval makes quoting arguments work.
33359       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
33360            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
33361         as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
33362     fi
33363
33364     cd "$ac_popdir"
33365   done
33366 fi
33367 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33368   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33369 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33370 fi
33371