]> CyberLeo.Net >> Repos - FreeBSD/releng/10.1.git/blob - contrib/ntp/sntp/configure
Upgrade NTP to 4.2.8p4.
[FreeBSD/releng/10.1.git] / contrib / ntp / sntp / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for sntp 4.2.8p4.
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.8p4'
594 PACKAGE_STRING='sntp 4.2.8p4'
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.8p4 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.8p4:";;
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.8p4
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.8p4, 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.8p4'
3537
3538
3539 cat >>confdefs.h <<_ACEOF
3540 #define PACKAGE "$PACKAGE"
3541 _ACEOF
3542
3543
3544 cat >>confdefs.h <<_ACEOF
3545 #define VERSION "$VERSION"
3546 _ACEOF
3547
3548 # Some tools Automake needs.
3549
3550 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3551
3552
3553 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3554
3555
3556 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3557
3558
3559 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3560
3561
3562 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3563
3564 # For better backward compatibility.  To be removed once Automake 1.9.x
3565 # dies out for good.  For more background, see:
3566 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3567 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3568 mkdir_p='$(MKDIR_P)'
3569
3570 # We need awk for the "check" target (and possibly the TAP driver).  The
3571 # system "awk" is bad on some platforms.
3572 # Always define AMTAR for backward compatibility.  Yes, it's still used
3573 # in the wild :-(  We should find a proper way to deprecate it ...
3574 AMTAR='$${TAR-tar}'
3575
3576
3577 # We'll loop over all known methods to create a tar archive until one works.
3578 _am_tools='gnutar  pax cpio none'
3579
3580 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3581
3582
3583
3584
3585
3586
3587 # POSIX will say in a future version that running "rm -f" with no argument
3588 # is OK; and we want to be able to make that assumption in our Makefile
3589 # recipes.  So use an aggressive probe to check that the usage we want is
3590 # actually supported "in the wild" to an acceptable degree.
3591 # See automake bug#10828.
3592 # To make any issue more visible, cause the running configure to be aborted
3593 # by default if the 'rm' program in use doesn't match our expectations; the
3594 # user can still override this though.
3595 if rm -f && rm -fr && rm -rf; then : OK; else
3596   cat >&2 <<'END'
3597 Oops!
3598
3599 Your 'rm' program seems unable to run without file operands specified
3600 on the command line, even when the '-f' option is present.  This is contrary
3601 to the behaviour of most rm programs out there, and not conforming with
3602 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3603
3604 Please tell bug-automake@gnu.org about your system, including the value
3605 of your $PATH and any error possibly output before this message.  This
3606 can help us improve future automake versions.
3607
3608 END
3609   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3610     echo 'Configuration will proceed anyway, since you have set the' >&2
3611     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3612     echo >&2
3613   else
3614     cat >&2 <<'END'
3615 Aborting the configuration process, to ensure you take notice of the issue.
3616
3617 You can download and install GNU coreutils to get an 'rm' implementation
3618 that behaves properly: <http://www.gnu.org/software/coreutils/>.
3619
3620 If you want to complete the configuration process using your problematic
3621 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3622 to "yes", and re-run configure.
3623
3624 END
3625     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3626   fi
3627 fi
3628
3629 # Check whether --enable-silent-rules was given.
3630 if test "${enable_silent_rules+set}" = set; then :
3631   enableval=$enable_silent_rules;
3632 fi
3633
3634 case $enable_silent_rules in # (((
3635   yes) AM_DEFAULT_VERBOSITY=0;;
3636    no) AM_DEFAULT_VERBOSITY=1;;
3637     *) AM_DEFAULT_VERBOSITY=0;;
3638 esac
3639 am_make=${MAKE-make}
3640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3641 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3642 if ${am_cv_make_support_nested_variables+:} false; then :
3643   $as_echo_n "(cached) " >&6
3644 else
3645   if $as_echo 'TRUE=$(BAR$(V))
3646 BAR0=false
3647 BAR1=true
3648 V=1
3649 am__doit:
3650         @$(TRUE)
3651 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3652   am_cv_make_support_nested_variables=yes
3653 else
3654   am_cv_make_support_nested_variables=no
3655 fi
3656 fi
3657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3658 $as_echo "$am_cv_make_support_nested_variables" >&6; }
3659 if test $am_cv_make_support_nested_variables = yes; then
3660     AM_V='$(V)'
3661   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3662 else
3663   AM_V=$AM_DEFAULT_VERBOSITY
3664   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3665 fi
3666 AM_BACKSLASH='\'
3667
3668
3669 # Make sure we can run config.sub.
3670 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3671   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3672
3673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3674 $as_echo_n "checking build system type... " >&6; }
3675 if ${ac_cv_build+:} false; then :
3676   $as_echo_n "(cached) " >&6
3677 else
3678   ac_build_alias=$build_alias
3679 test "x$ac_build_alias" = x &&
3680   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3681 test "x$ac_build_alias" = x &&
3682   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3683 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3684   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3685
3686 fi
3687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3688 $as_echo "$ac_cv_build" >&6; }
3689 case $ac_cv_build in
3690 *-*-*) ;;
3691 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3692 esac
3693 build=$ac_cv_build
3694 ac_save_IFS=$IFS; IFS='-'
3695 set x $ac_cv_build
3696 shift
3697 build_cpu=$1
3698 build_vendor=$2
3699 shift; shift
3700 # Remember, the first character of IFS is used to create $*,
3701 # except with old shells:
3702 build_os=$*
3703 IFS=$ac_save_IFS
3704 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3705
3706
3707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3708 $as_echo_n "checking host system type... " >&6; }
3709 if ${ac_cv_host+:} false; then :
3710   $as_echo_n "(cached) " >&6
3711 else
3712   if test "x$host_alias" = x; then
3713   ac_cv_host=$ac_cv_build
3714 else
3715   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3716     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3717 fi
3718
3719 fi
3720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3721 $as_echo "$ac_cv_host" >&6; }
3722 case $ac_cv_host in
3723 *-*-*) ;;
3724 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3725 esac
3726 host=$ac_cv_host
3727 ac_save_IFS=$IFS; IFS='-'
3728 set x $ac_cv_host
3729 shift
3730 host_cpu=$1
3731 host_vendor=$2
3732 shift; shift
3733 # Remember, the first character of IFS is used to create $*,
3734 # except with old shells:
3735 host_os=$*
3736 IFS=$ac_save_IFS
3737 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3738
3739
3740
3741 cat >>confdefs.h <<_ACEOF
3742 #define STR_SYSTEM "$host"
3743 _ACEOF
3744
3745 ac_config_headers="$ac_config_headers config.h"
3746
3747
3748 DEPDIR="${am__leading_dot}deps"
3749
3750 ac_config_commands="$ac_config_commands depfiles"
3751
3752
3753 am_make=${MAKE-make}
3754 cat > confinc << 'END'
3755 am__doit:
3756         @echo this is the am__doit target
3757 .PHONY: am__doit
3758 END
3759 # If we don't find an include directive, just comment out the code.
3760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3761 $as_echo_n "checking for style of include used by $am_make... " >&6; }
3762 am__include="#"
3763 am__quote=
3764 _am_result=none
3765 # First try GNU make style include.
3766 echo "include confinc" > confmf
3767 # Ignore all kinds of additional output from 'make'.
3768 case `$am_make -s -f confmf 2> /dev/null` in #(
3769 *the\ am__doit\ target*)
3770   am__include=include
3771   am__quote=
3772   _am_result=GNU
3773   ;;
3774 esac
3775 # Now try BSD make style include.
3776 if test "$am__include" = "#"; then
3777    echo '.include "confinc"' > confmf
3778    case `$am_make -s -f confmf 2> /dev/null` in #(
3779    *the\ am__doit\ target*)
3780      am__include=.include
3781      am__quote="\""
3782      _am_result=BSD
3783      ;;
3784    esac
3785 fi
3786
3787
3788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3789 $as_echo "$_am_result" >&6; }
3790 rm -f confinc confmf
3791
3792 # Check whether --enable-dependency-tracking was given.
3793 if test "${enable_dependency_tracking+set}" = set; then :
3794   enableval=$enable_dependency_tracking;
3795 fi
3796
3797 if test "x$enable_dependency_tracking" != xno; then
3798   am_depcomp="$ac_aux_dir/depcomp"
3799   AMDEPBACKSLASH='\'
3800   am__nodep='_no'
3801 fi
3802  if test "x$enable_dependency_tracking" != xno; then
3803   AMDEP_TRUE=
3804   AMDEP_FALSE='#'
3805 else
3806   AMDEP_TRUE='#'
3807   AMDEP_FALSE=
3808 fi
3809
3810
3811 ac_ext=c
3812 ac_cpp='$CPP $CPPFLAGS'
3813 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3814 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3815 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3816 if test -n "$ac_tool_prefix"; then
3817   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3818 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3820 $as_echo_n "checking for $ac_word... " >&6; }
3821 if ${ac_cv_prog_CC+:} false; then :
3822   $as_echo_n "(cached) " >&6
3823 else
3824   if test -n "$CC"; then
3825   ac_cv_prog_CC="$CC" # Let the user override the test.
3826 else
3827 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3828 for as_dir in $PATH
3829 do
3830   IFS=$as_save_IFS
3831   test -z "$as_dir" && as_dir=.
3832     for ac_exec_ext in '' $ac_executable_extensions; do
3833   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3834     ac_cv_prog_CC="${ac_tool_prefix}gcc"
3835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3836     break 2
3837   fi
3838 done
3839   done
3840 IFS=$as_save_IFS
3841
3842 fi
3843 fi
3844 CC=$ac_cv_prog_CC
3845 if test -n "$CC"; then
3846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3847 $as_echo "$CC" >&6; }
3848 else
3849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3850 $as_echo "no" >&6; }
3851 fi
3852
3853
3854 fi
3855 if test -z "$ac_cv_prog_CC"; then
3856   ac_ct_CC=$CC
3857   # Extract the first word of "gcc", so it can be a program name with args.
3858 set dummy gcc; ac_word=$2
3859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3860 $as_echo_n "checking for $ac_word... " >&6; }
3861 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3862   $as_echo_n "(cached) " >&6
3863 else
3864   if test -n "$ac_ct_CC"; then
3865   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3866 else
3867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3868 for as_dir in $PATH
3869 do
3870   IFS=$as_save_IFS
3871   test -z "$as_dir" && as_dir=.
3872     for ac_exec_ext in '' $ac_executable_extensions; do
3873   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3874     ac_cv_prog_ac_ct_CC="gcc"
3875     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3876     break 2
3877   fi
3878 done
3879   done
3880 IFS=$as_save_IFS
3881
3882 fi
3883 fi
3884 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3885 if test -n "$ac_ct_CC"; then
3886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3887 $as_echo "$ac_ct_CC" >&6; }
3888 else
3889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3890 $as_echo "no" >&6; }
3891 fi
3892
3893   if test "x$ac_ct_CC" = x; then
3894     CC=""
3895   else
3896     case $cross_compiling:$ac_tool_warned in
3897 yes:)
3898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3899 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3900 ac_tool_warned=yes ;;
3901 esac
3902     CC=$ac_ct_CC
3903   fi
3904 else
3905   CC="$ac_cv_prog_CC"
3906 fi
3907
3908 if test -z "$CC"; then
3909           if test -n "$ac_tool_prefix"; then
3910     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3911 set dummy ${ac_tool_prefix}cc; ac_word=$2
3912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3913 $as_echo_n "checking for $ac_word... " >&6; }
3914 if ${ac_cv_prog_CC+:} false; then :
3915   $as_echo_n "(cached) " >&6
3916 else
3917   if test -n "$CC"; then
3918   ac_cv_prog_CC="$CC" # Let the user override the test.
3919 else
3920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3921 for as_dir in $PATH
3922 do
3923   IFS=$as_save_IFS
3924   test -z "$as_dir" && as_dir=.
3925     for ac_exec_ext in '' $ac_executable_extensions; do
3926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3927     ac_cv_prog_CC="${ac_tool_prefix}cc"
3928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3929     break 2
3930   fi
3931 done
3932   done
3933 IFS=$as_save_IFS
3934
3935 fi
3936 fi
3937 CC=$ac_cv_prog_CC
3938 if test -n "$CC"; then
3939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3940 $as_echo "$CC" >&6; }
3941 else
3942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3943 $as_echo "no" >&6; }
3944 fi
3945
3946
3947   fi
3948 fi
3949 if test -z "$CC"; then
3950   # Extract the first word of "cc", so it can be a program name with args.
3951 set dummy cc; ac_word=$2
3952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3953 $as_echo_n "checking for $ac_word... " >&6; }
3954 if ${ac_cv_prog_CC+:} false; then :
3955   $as_echo_n "(cached) " >&6
3956 else
3957   if test -n "$CC"; then
3958   ac_cv_prog_CC="$CC" # Let the user override the test.
3959 else
3960   ac_prog_rejected=no
3961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3962 for as_dir in $PATH
3963 do
3964   IFS=$as_save_IFS
3965   test -z "$as_dir" && as_dir=.
3966     for ac_exec_ext in '' $ac_executable_extensions; do
3967   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3968     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3969        ac_prog_rejected=yes
3970        continue
3971      fi
3972     ac_cv_prog_CC="cc"
3973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3974     break 2
3975   fi
3976 done
3977   done
3978 IFS=$as_save_IFS
3979
3980 if test $ac_prog_rejected = yes; then
3981   # We found a bogon in the path, so make sure we never use it.
3982   set dummy $ac_cv_prog_CC
3983   shift
3984   if test $# != 0; then
3985     # We chose a different compiler from the bogus one.
3986     # However, it has the same basename, so the bogon will be chosen
3987     # first if we set CC to just the basename; use the full file name.
3988     shift
3989     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3990   fi
3991 fi
3992 fi
3993 fi
3994 CC=$ac_cv_prog_CC
3995 if test -n "$CC"; then
3996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3997 $as_echo "$CC" >&6; }
3998 else
3999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4000 $as_echo "no" >&6; }
4001 fi
4002
4003
4004 fi
4005 if test -z "$CC"; then
4006   if test -n "$ac_tool_prefix"; then
4007   for ac_prog in cl.exe
4008   do
4009     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4010 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4012 $as_echo_n "checking for $ac_word... " >&6; }
4013 if ${ac_cv_prog_CC+:} false; then :
4014   $as_echo_n "(cached) " >&6
4015 else
4016   if test -n "$CC"; then
4017   ac_cv_prog_CC="$CC" # Let the user override the test.
4018 else
4019 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4020 for as_dir in $PATH
4021 do
4022   IFS=$as_save_IFS
4023   test -z "$as_dir" && as_dir=.
4024     for ac_exec_ext in '' $ac_executable_extensions; do
4025   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4026     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4027     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4028     break 2
4029   fi
4030 done
4031   done
4032 IFS=$as_save_IFS
4033
4034 fi
4035 fi
4036 CC=$ac_cv_prog_CC
4037 if test -n "$CC"; then
4038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4039 $as_echo "$CC" >&6; }
4040 else
4041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4042 $as_echo "no" >&6; }
4043 fi
4044
4045
4046     test -n "$CC" && break
4047   done
4048 fi
4049 if test -z "$CC"; then
4050   ac_ct_CC=$CC
4051   for ac_prog in cl.exe
4052 do
4053   # Extract the first word of "$ac_prog", so it can be a program name with args.
4054 set dummy $ac_prog; ac_word=$2
4055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4056 $as_echo_n "checking for $ac_word... " >&6; }
4057 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4058   $as_echo_n "(cached) " >&6
4059 else
4060   if test -n "$ac_ct_CC"; then
4061   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4062 else
4063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4064 for as_dir in $PATH
4065 do
4066   IFS=$as_save_IFS
4067   test -z "$as_dir" && as_dir=.
4068     for ac_exec_ext in '' $ac_executable_extensions; do
4069   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4070     ac_cv_prog_ac_ct_CC="$ac_prog"
4071     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4072     break 2
4073   fi
4074 done
4075   done
4076 IFS=$as_save_IFS
4077
4078 fi
4079 fi
4080 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4081 if test -n "$ac_ct_CC"; then
4082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4083 $as_echo "$ac_ct_CC" >&6; }
4084 else
4085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4086 $as_echo "no" >&6; }
4087 fi
4088
4089
4090   test -n "$ac_ct_CC" && break
4091 done
4092
4093   if test "x$ac_ct_CC" = x; then
4094     CC=""
4095   else
4096     case $cross_compiling:$ac_tool_warned in
4097 yes:)
4098 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4099 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4100 ac_tool_warned=yes ;;
4101 esac
4102     CC=$ac_ct_CC
4103   fi
4104 fi
4105
4106 fi
4107
4108
4109 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4110 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4111 as_fn_error $? "no acceptable C compiler found in \$PATH
4112 See \`config.log' for more details" "$LINENO" 5; }
4113
4114 # Provide some information about the compiler.
4115 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4116 set X $ac_compile
4117 ac_compiler=$2
4118 for ac_option in --version -v -V -qversion; do
4119   { { ac_try="$ac_compiler $ac_option >&5"
4120 case "(($ac_try" in
4121   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4122   *) ac_try_echo=$ac_try;;
4123 esac
4124 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4125 $as_echo "$ac_try_echo"; } >&5
4126   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4127   ac_status=$?
4128   if test -s conftest.err; then
4129     sed '10a\
4130 ... rest of stderr output deleted ...
4131          10q' conftest.err >conftest.er1
4132     cat conftest.er1 >&5
4133   fi
4134   rm -f conftest.er1 conftest.err
4135   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4136   test $ac_status = 0; }
4137 done
4138
4139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4140 /* end confdefs.h.  */
4141
4142 int
4143 main ()
4144 {
4145
4146   ;
4147   return 0;
4148 }
4149 _ACEOF
4150 ac_clean_files_save=$ac_clean_files
4151 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4152 # Try to create an executable without -o first, disregard a.out.
4153 # It will help us diagnose broken compilers, and finding out an intuition
4154 # of exeext.
4155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4156 $as_echo_n "checking whether the C compiler works... " >&6; }
4157 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4158
4159 # The possible output files:
4160 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4161
4162 ac_rmfiles=
4163 for ac_file in $ac_files
4164 do
4165   case $ac_file in
4166     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4167     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4168   esac
4169 done
4170 rm -f $ac_rmfiles
4171
4172 if { { ac_try="$ac_link_default"
4173 case "(($ac_try" in
4174   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4175   *) ac_try_echo=$ac_try;;
4176 esac
4177 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4178 $as_echo "$ac_try_echo"; } >&5
4179   (eval "$ac_link_default") 2>&5
4180   ac_status=$?
4181   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4182   test $ac_status = 0; }; then :
4183   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4184 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4185 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4186 # so that the user can short-circuit this test for compilers unknown to
4187 # Autoconf.
4188 for ac_file in $ac_files ''
4189 do
4190   test -f "$ac_file" || continue
4191   case $ac_file in
4192     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4193         ;;
4194     [ab].out )
4195         # We found the default executable, but exeext='' is most
4196         # certainly right.
4197         break;;
4198     *.* )
4199         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4200         then :; else
4201            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4202         fi
4203         # We set ac_cv_exeext here because the later test for it is not
4204         # safe: cross compilers may not add the suffix if given an `-o'
4205         # argument, so we may need to know it at that point already.
4206         # Even if this section looks crufty: it has the advantage of
4207         # actually working.
4208         break;;
4209     * )
4210         break;;
4211   esac
4212 done
4213 test "$ac_cv_exeext" = no && ac_cv_exeext=
4214
4215 else
4216   ac_file=''
4217 fi
4218 if test -z "$ac_file"; then :
4219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4220 $as_echo "no" >&6; }
4221 $as_echo "$as_me: failed program was:" >&5
4222 sed 's/^/| /' conftest.$ac_ext >&5
4223
4224 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4225 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4226 as_fn_error 77 "C compiler cannot create executables
4227 See \`config.log' for more details" "$LINENO" 5; }
4228 else
4229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4230 $as_echo "yes" >&6; }
4231 fi
4232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4233 $as_echo_n "checking for C compiler default output file name... " >&6; }
4234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4235 $as_echo "$ac_file" >&6; }
4236 ac_exeext=$ac_cv_exeext
4237
4238 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4239 ac_clean_files=$ac_clean_files_save
4240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4241 $as_echo_n "checking for suffix of executables... " >&6; }
4242 if { { ac_try="$ac_link"
4243 case "(($ac_try" in
4244   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4245   *) ac_try_echo=$ac_try;;
4246 esac
4247 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4248 $as_echo "$ac_try_echo"; } >&5
4249   (eval "$ac_link") 2>&5
4250   ac_status=$?
4251   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4252   test $ac_status = 0; }; then :
4253   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4254 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4255 # work properly (i.e., refer to `conftest.exe'), while it won't with
4256 # `rm'.
4257 for ac_file in conftest.exe conftest conftest.*; do
4258   test -f "$ac_file" || continue
4259   case $ac_file in
4260     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4261     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4262           break;;
4263     * ) break;;
4264   esac
4265 done
4266 else
4267   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4268 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4269 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4270 See \`config.log' for more details" "$LINENO" 5; }
4271 fi
4272 rm -f conftest conftest$ac_cv_exeext
4273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4274 $as_echo "$ac_cv_exeext" >&6; }
4275
4276 rm -f conftest.$ac_ext
4277 EXEEXT=$ac_cv_exeext
4278 ac_exeext=$EXEEXT
4279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4280 /* end confdefs.h.  */
4281 #include <stdio.h>
4282 int
4283 main ()
4284 {
4285 FILE *f = fopen ("conftest.out", "w");
4286  return ferror (f) || fclose (f) != 0;
4287
4288   ;
4289   return 0;
4290 }
4291 _ACEOF
4292 ac_clean_files="$ac_clean_files conftest.out"
4293 # Check that the compiler produces executables we can run.  If not, either
4294 # the compiler is broken, or we cross compile.
4295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4296 $as_echo_n "checking whether we are cross compiling... " >&6; }
4297 if test "$cross_compiling" != yes; then
4298   { { ac_try="$ac_link"
4299 case "(($ac_try" in
4300   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4301   *) ac_try_echo=$ac_try;;
4302 esac
4303 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4304 $as_echo "$ac_try_echo"; } >&5
4305   (eval "$ac_link") 2>&5
4306   ac_status=$?
4307   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4308   test $ac_status = 0; }
4309   if { ac_try='./conftest$ac_cv_exeext'
4310   { { case "(($ac_try" in
4311   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4312   *) ac_try_echo=$ac_try;;
4313 esac
4314 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4315 $as_echo "$ac_try_echo"; } >&5
4316   (eval "$ac_try") 2>&5
4317   ac_status=$?
4318   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4319   test $ac_status = 0; }; }; then
4320     cross_compiling=no
4321   else
4322     if test "$cross_compiling" = maybe; then
4323         cross_compiling=yes
4324     else
4325         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4326 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4327 as_fn_error $? "cannot run C compiled programs.
4328 If you meant to cross compile, use \`--host'.
4329 See \`config.log' for more details" "$LINENO" 5; }
4330     fi
4331   fi
4332 fi
4333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4334 $as_echo "$cross_compiling" >&6; }
4335
4336 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4337 ac_clean_files=$ac_clean_files_save
4338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4339 $as_echo_n "checking for suffix of object files... " >&6; }
4340 if ${ac_cv_objext+:} false; then :
4341   $as_echo_n "(cached) " >&6
4342 else
4343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4344 /* end confdefs.h.  */
4345
4346 int
4347 main ()
4348 {
4349
4350   ;
4351   return 0;
4352 }
4353 _ACEOF
4354 rm -f conftest.o conftest.obj
4355 if { { ac_try="$ac_compile"
4356 case "(($ac_try" in
4357   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4358   *) ac_try_echo=$ac_try;;
4359 esac
4360 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4361 $as_echo "$ac_try_echo"; } >&5
4362   (eval "$ac_compile") 2>&5
4363   ac_status=$?
4364   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4365   test $ac_status = 0; }; then :
4366   for ac_file in conftest.o conftest.obj conftest.*; do
4367   test -f "$ac_file" || continue;
4368   case $ac_file in
4369     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4370     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4371        break;;
4372   esac
4373 done
4374 else
4375   $as_echo "$as_me: failed program was:" >&5
4376 sed 's/^/| /' conftest.$ac_ext >&5
4377
4378 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4379 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4380 as_fn_error $? "cannot compute suffix of object files: cannot compile
4381 See \`config.log' for more details" "$LINENO" 5; }
4382 fi
4383 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4384 fi
4385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4386 $as_echo "$ac_cv_objext" >&6; }
4387 OBJEXT=$ac_cv_objext
4388 ac_objext=$OBJEXT
4389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4390 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4391 if ${ac_cv_c_compiler_gnu+:} false; then :
4392   $as_echo_n "(cached) " >&6
4393 else
4394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4395 /* end confdefs.h.  */
4396
4397 int
4398 main ()
4399 {
4400 #ifndef __GNUC__
4401        choke me
4402 #endif
4403
4404   ;
4405   return 0;
4406 }
4407 _ACEOF
4408 if ac_fn_c_try_compile "$LINENO"; then :
4409   ac_compiler_gnu=yes
4410 else
4411   ac_compiler_gnu=no
4412 fi
4413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4414 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4415
4416 fi
4417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4418 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4419 if test $ac_compiler_gnu = yes; then
4420   GCC=yes
4421 else
4422   GCC=
4423 fi
4424 ac_test_CFLAGS=${CFLAGS+set}
4425 ac_save_CFLAGS=$CFLAGS
4426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4427 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4428 if ${ac_cv_prog_cc_g+:} false; then :
4429   $as_echo_n "(cached) " >&6
4430 else
4431   ac_save_c_werror_flag=$ac_c_werror_flag
4432    ac_c_werror_flag=yes
4433    ac_cv_prog_cc_g=no
4434    CFLAGS="-g"
4435    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4436 /* end confdefs.h.  */
4437
4438 int
4439 main ()
4440 {
4441
4442   ;
4443   return 0;
4444 }
4445 _ACEOF
4446 if ac_fn_c_try_compile "$LINENO"; then :
4447   ac_cv_prog_cc_g=yes
4448 else
4449   CFLAGS=""
4450       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4451 /* end confdefs.h.  */
4452
4453 int
4454 main ()
4455 {
4456
4457   ;
4458   return 0;
4459 }
4460 _ACEOF
4461 if ac_fn_c_try_compile "$LINENO"; then :
4462
4463 else
4464   ac_c_werror_flag=$ac_save_c_werror_flag
4465          CFLAGS="-g"
4466          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4467 /* end confdefs.h.  */
4468
4469 int
4470 main ()
4471 {
4472
4473   ;
4474   return 0;
4475 }
4476 _ACEOF
4477 if ac_fn_c_try_compile "$LINENO"; then :
4478   ac_cv_prog_cc_g=yes
4479 fi
4480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4481 fi
4482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4483 fi
4484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4485    ac_c_werror_flag=$ac_save_c_werror_flag
4486 fi
4487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4488 $as_echo "$ac_cv_prog_cc_g" >&6; }
4489 if test "$ac_test_CFLAGS" = set; then
4490   CFLAGS=$ac_save_CFLAGS
4491 elif test $ac_cv_prog_cc_g = yes; then
4492   if test "$GCC" = yes; then
4493     CFLAGS="-g -O2"
4494   else
4495     CFLAGS="-g"
4496   fi
4497 else
4498   if test "$GCC" = yes; then
4499     CFLAGS="-O2"
4500   else
4501     CFLAGS=
4502   fi
4503 fi
4504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4505 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4506 if ${ac_cv_prog_cc_c89+:} false; then :
4507   $as_echo_n "(cached) " >&6
4508 else
4509   ac_cv_prog_cc_c89=no
4510 ac_save_CC=$CC
4511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4512 /* end confdefs.h.  */
4513 #include <stdarg.h>
4514 #include <stdio.h>
4515 struct stat;
4516 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4517 struct buf { int x; };
4518 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4519 static char *e (p, i)
4520      char **p;
4521      int i;
4522 {
4523   return p[i];
4524 }
4525 static char *f (char * (*g) (char **, int), char **p, ...)
4526 {
4527   char *s;
4528   va_list v;
4529   va_start (v,p);
4530   s = g (p, va_arg (v,int));
4531   va_end (v);
4532   return s;
4533 }
4534
4535 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4536    function prototypes and stuff, but not '\xHH' hex character constants.
4537    These don't provoke an error unfortunately, instead are silently treated
4538    as 'x'.  The following induces an error, until -std is added to get
4539    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4540    array size at least.  It's necessary to write '\x00'==0 to get something
4541    that's true only with -std.  */
4542 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4543
4544 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4545    inside strings and character constants.  */
4546 #define FOO(x) 'x'
4547 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4548
4549 int test (int i, double x);
4550 struct s1 {int (*f) (int a);};
4551 struct s2 {int (*f) (double a);};
4552 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4553 int argc;
4554 char **argv;
4555 int
4556 main ()
4557 {
4558 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4559   ;
4560   return 0;
4561 }
4562 _ACEOF
4563 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4564         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4565 do
4566   CC="$ac_save_CC $ac_arg"
4567   if ac_fn_c_try_compile "$LINENO"; then :
4568   ac_cv_prog_cc_c89=$ac_arg
4569 fi
4570 rm -f core conftest.err conftest.$ac_objext
4571   test "x$ac_cv_prog_cc_c89" != "xno" && break
4572 done
4573 rm -f conftest.$ac_ext
4574 CC=$ac_save_CC
4575
4576 fi
4577 # AC_CACHE_VAL
4578 case "x$ac_cv_prog_cc_c89" in
4579   x)
4580     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4581 $as_echo "none needed" >&6; } ;;
4582   xno)
4583     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4584 $as_echo "unsupported" >&6; } ;;
4585   *)
4586     CC="$CC $ac_cv_prog_cc_c89"
4587     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4588 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4589 esac
4590 if test "x$ac_cv_prog_cc_c89" != xno; then :
4591
4592 fi
4593
4594 ac_ext=c
4595 ac_cpp='$CPP $CPPFLAGS'
4596 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4597 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4598 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4599
4600 ac_ext=c
4601 ac_cpp='$CPP $CPPFLAGS'
4602 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4603 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4604 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4606 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4607 if ${am_cv_prog_cc_c_o+:} false; then :
4608   $as_echo_n "(cached) " >&6
4609 else
4610   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4611 /* end confdefs.h.  */
4612
4613 int
4614 main ()
4615 {
4616
4617   ;
4618   return 0;
4619 }
4620 _ACEOF
4621   # Make sure it works both with $CC and with simple cc.
4622   # Following AC_PROG_CC_C_O, we do the test twice because some
4623   # compilers refuse to overwrite an existing .o file with -o,
4624   # though they will create one.
4625   am_cv_prog_cc_c_o=yes
4626   for am_i in 1 2; do
4627     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4628    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4629    ac_status=$?
4630    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4631    (exit $ac_status); } \
4632          && test -f conftest2.$ac_objext; then
4633       : OK
4634     else
4635       am_cv_prog_cc_c_o=no
4636       break
4637     fi
4638   done
4639   rm -f core conftest*
4640   unset am_i
4641 fi
4642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4643 $as_echo "$am_cv_prog_cc_c_o" >&6; }
4644 if test "$am_cv_prog_cc_c_o" != yes; then
4645    # Losing compiler, so override with the script.
4646    # FIXME: It is wrong to rewrite CC.
4647    # But if we don't then we get into trouble of one sort or another.
4648    # A longer-term fix would be to have automake use am__CC in this case,
4649    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4650    CC="$am_aux_dir/compile $CC"
4651 fi
4652 ac_ext=c
4653 ac_cpp='$CPP $CPPFLAGS'
4654 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4655 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4656 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4657
4658
4659 depcc="$CC"   am_compiler_list=
4660
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4662 $as_echo_n "checking dependency style of $depcc... " >&6; }
4663 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4664   $as_echo_n "(cached) " >&6
4665 else
4666   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4667   # We make a subdir and do the tests there.  Otherwise we can end up
4668   # making bogus files that we don't know about and never remove.  For
4669   # instance it was reported that on HP-UX the gcc test will end up
4670   # making a dummy file named 'D' -- because '-MD' means "put the output
4671   # in D".
4672   rm -rf conftest.dir
4673   mkdir conftest.dir
4674   # Copy depcomp to subdir because otherwise we won't find it if we're
4675   # using a relative directory.
4676   cp "$am_depcomp" conftest.dir
4677   cd conftest.dir
4678   # We will build objects and dependencies in a subdirectory because
4679   # it helps to detect inapplicable dependency modes.  For instance
4680   # both Tru64's cc and ICC support -MD to output dependencies as a
4681   # side effect of compilation, but ICC will put the dependencies in
4682   # the current directory while Tru64 will put them in the object
4683   # directory.
4684   mkdir sub
4685
4686   am_cv_CC_dependencies_compiler_type=none
4687   if test "$am_compiler_list" = ""; then
4688      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4689   fi
4690   am__universal=false
4691   case " $depcc " in #(
4692      *\ -arch\ *\ -arch\ *) am__universal=true ;;
4693      esac
4694
4695   for depmode in $am_compiler_list; do
4696     # Setup a source with many dependencies, because some compilers
4697     # like to wrap large dependency lists on column 80 (with \), and
4698     # we should not choose a depcomp mode which is confused by this.
4699     #
4700     # We need to recreate these files for each test, as the compiler may
4701     # overwrite some of them when testing with obscure command lines.
4702     # This happens at least with the AIX C compiler.
4703     : > sub/conftest.c
4704     for i in 1 2 3 4 5 6; do
4705       echo '#include "conftst'$i'.h"' >> sub/conftest.c
4706       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4707       # Solaris 10 /bin/sh.
4708       echo '/* dummy */' > sub/conftst$i.h
4709     done
4710     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4711
4712     # We check with '-c' and '-o' for the sake of the "dashmstdout"
4713     # mode.  It turns out that the SunPro C++ compiler does not properly
4714     # handle '-M -o', and we need to detect this.  Also, some Intel
4715     # versions had trouble with output in subdirs.
4716     am__obj=sub/conftest.${OBJEXT-o}
4717     am__minus_obj="-o $am__obj"
4718     case $depmode in
4719     gcc)
4720       # This depmode causes a compiler race in universal mode.
4721       test "$am__universal" = false || continue
4722       ;;
4723     nosideeffect)
4724       # After this tag, mechanisms are not by side-effect, so they'll
4725       # only be used when explicitly requested.
4726       if test "x$enable_dependency_tracking" = xyes; then
4727         continue
4728       else
4729         break
4730       fi
4731       ;;
4732     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4733       # This compiler won't grok '-c -o', but also, the minuso test has
4734       # not run yet.  These depmodes are late enough in the game, and
4735       # so weak that their functioning should not be impacted.
4736       am__obj=conftest.${OBJEXT-o}
4737       am__minus_obj=
4738       ;;
4739     none) break ;;
4740     esac
4741     if depmode=$depmode \
4742        source=sub/conftest.c object=$am__obj \
4743        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4744        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4745          >/dev/null 2>conftest.err &&
4746        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4747        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4748        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4749        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4750       # icc doesn't choke on unknown options, it will just issue warnings
4751       # or remarks (even with -Werror).  So we grep stderr for any message
4752       # that says an option was ignored or not supported.
4753       # When given -MP, icc 7.0 and 7.1 complain thusly:
4754       #   icc: Command line warning: ignoring option '-M'; no argument required
4755       # The diagnosis changed in icc 8.0:
4756       #   icc: Command line remark: option '-MP' not supported
4757       if (grep 'ignoring option' conftest.err ||
4758           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4759         am_cv_CC_dependencies_compiler_type=$depmode
4760         break
4761       fi
4762     fi
4763   done
4764
4765   cd ..
4766   rm -rf conftest.dir
4767 else
4768   am_cv_CC_dependencies_compiler_type=none
4769 fi
4770
4771 fi
4772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4773 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4774 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4775
4776  if
4777   test "x$enable_dependency_tracking" != xno \
4778   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4779   am__fastdepCC_TRUE=
4780   am__fastdepCC_FALSE='#'
4781 else
4782   am__fastdepCC_TRUE='#'
4783   am__fastdepCC_FALSE=
4784 fi
4785
4786
4787
4788 ac_ext=c
4789 ac_cpp='$CPP $CPPFLAGS'
4790 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4791 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4792 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4794 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4795 # On Suns, sometimes $CPP names a directory.
4796 if test -n "$CPP" && test -d "$CPP"; then
4797   CPP=
4798 fi
4799 if test -z "$CPP"; then
4800   if ${ac_cv_prog_CPP+:} false; then :
4801   $as_echo_n "(cached) " >&6
4802 else
4803       # Double quotes because CPP needs to be expanded
4804     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4805     do
4806       ac_preproc_ok=false
4807 for ac_c_preproc_warn_flag in '' yes
4808 do
4809   # Use a header file that comes with gcc, so configuring glibc
4810   # with a fresh cross-compiler works.
4811   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4812   # <limits.h> exists even on freestanding compilers.
4813   # On the NeXT, cc -E runs the code through the compiler's parser,
4814   # not just through cpp. "Syntax error" is here to catch this case.
4815   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4816 /* end confdefs.h.  */
4817 #ifdef __STDC__
4818 # include <limits.h>
4819 #else
4820 # include <assert.h>
4821 #endif
4822                      Syntax error
4823 _ACEOF
4824 if ac_fn_c_try_cpp "$LINENO"; then :
4825
4826 else
4827   # Broken: fails on valid input.
4828 continue
4829 fi
4830 rm -f conftest.err conftest.i conftest.$ac_ext
4831
4832   # OK, works on sane cases.  Now check whether nonexistent headers
4833   # can be detected and how.
4834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4835 /* end confdefs.h.  */
4836 #include <ac_nonexistent.h>
4837 _ACEOF
4838 if ac_fn_c_try_cpp "$LINENO"; then :
4839   # Broken: success on invalid input.
4840 continue
4841 else
4842   # Passes both tests.
4843 ac_preproc_ok=:
4844 break
4845 fi
4846 rm -f conftest.err conftest.i conftest.$ac_ext
4847
4848 done
4849 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4850 rm -f conftest.i conftest.err conftest.$ac_ext
4851 if $ac_preproc_ok; then :
4852   break
4853 fi
4854
4855     done
4856     ac_cv_prog_CPP=$CPP
4857
4858 fi
4859   CPP=$ac_cv_prog_CPP
4860 else
4861   ac_cv_prog_CPP=$CPP
4862 fi
4863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4864 $as_echo "$CPP" >&6; }
4865 ac_preproc_ok=false
4866 for ac_c_preproc_warn_flag in '' yes
4867 do
4868   # Use a header file that comes with gcc, so configuring glibc
4869   # with a fresh cross-compiler works.
4870   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4871   # <limits.h> exists even on freestanding compilers.
4872   # On the NeXT, cc -E runs the code through the compiler's parser,
4873   # not just through cpp. "Syntax error" is here to catch this case.
4874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4875 /* end confdefs.h.  */
4876 #ifdef __STDC__
4877 # include <limits.h>
4878 #else
4879 # include <assert.h>
4880 #endif
4881                      Syntax error
4882 _ACEOF
4883 if ac_fn_c_try_cpp "$LINENO"; then :
4884
4885 else
4886   # Broken: fails on valid input.
4887 continue
4888 fi
4889 rm -f conftest.err conftest.i conftest.$ac_ext
4890
4891   # OK, works on sane cases.  Now check whether nonexistent headers
4892   # can be detected and how.
4893   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4894 /* end confdefs.h.  */
4895 #include <ac_nonexistent.h>
4896 _ACEOF
4897 if ac_fn_c_try_cpp "$LINENO"; then :
4898   # Broken: success on invalid input.
4899 continue
4900 else
4901   # Passes both tests.
4902 ac_preproc_ok=:
4903 break
4904 fi
4905 rm -f conftest.err conftest.i conftest.$ac_ext
4906
4907 done
4908 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4909 rm -f conftest.i conftest.err conftest.$ac_ext
4910 if $ac_preproc_ok; then :
4911
4912 else
4913   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4914 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4915 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4916 See \`config.log' for more details" "$LINENO" 5; }
4917 fi
4918
4919 ac_ext=c
4920 ac_cpp='$CPP $CPPFLAGS'
4921 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4922 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4923 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4924
4925
4926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4927 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4928 if ${ac_cv_path_GREP+:} false; then :
4929   $as_echo_n "(cached) " >&6
4930 else
4931   if test -z "$GREP"; then
4932   ac_path_GREP_found=false
4933   # Loop through the user's path and test for each of PROGNAME-LIST
4934   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4935 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4936 do
4937   IFS=$as_save_IFS
4938   test -z "$as_dir" && as_dir=.
4939     for ac_prog in grep ggrep; do
4940     for ac_exec_ext in '' $ac_executable_extensions; do
4941       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4942       as_fn_executable_p "$ac_path_GREP" || continue
4943 # Check for GNU ac_path_GREP and select it if it is found.
4944   # Check for GNU $ac_path_GREP
4945 case `"$ac_path_GREP" --version 2>&1` in
4946 *GNU*)
4947   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4948 *)
4949   ac_count=0
4950   $as_echo_n 0123456789 >"conftest.in"
4951   while :
4952   do
4953     cat "conftest.in" "conftest.in" >"conftest.tmp"
4954     mv "conftest.tmp" "conftest.in"
4955     cp "conftest.in" "conftest.nl"
4956     $as_echo 'GREP' >> "conftest.nl"
4957     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4958     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4959     as_fn_arith $ac_count + 1 && ac_count=$as_val
4960     if test $ac_count -gt ${ac_path_GREP_max-0}; then
4961       # Best one so far, save it but keep looking for a better one
4962       ac_cv_path_GREP="$ac_path_GREP"
4963       ac_path_GREP_max=$ac_count
4964     fi
4965     # 10*(2^10) chars as input seems more than enough
4966     test $ac_count -gt 10 && break
4967   done
4968   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4969 esac
4970
4971       $ac_path_GREP_found && break 3
4972     done
4973   done
4974   done
4975 IFS=$as_save_IFS
4976   if test -z "$ac_cv_path_GREP"; then
4977     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4978   fi
4979 else
4980   ac_cv_path_GREP=$GREP
4981 fi
4982
4983 fi
4984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4985 $as_echo "$ac_cv_path_GREP" >&6; }
4986  GREP="$ac_cv_path_GREP"
4987
4988
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4990 $as_echo_n "checking for egrep... " >&6; }
4991 if ${ac_cv_path_EGREP+:} false; then :
4992   $as_echo_n "(cached) " >&6
4993 else
4994   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4995    then ac_cv_path_EGREP="$GREP -E"
4996    else
4997      if test -z "$EGREP"; then
4998   ac_path_EGREP_found=false
4999   # Loop through the user's path and test for each of PROGNAME-LIST
5000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5001 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5002 do
5003   IFS=$as_save_IFS
5004   test -z "$as_dir" && as_dir=.
5005     for ac_prog in egrep; do
5006     for ac_exec_ext in '' $ac_executable_extensions; do
5007       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5008       as_fn_executable_p "$ac_path_EGREP" || continue
5009 # Check for GNU ac_path_EGREP and select it if it is found.
5010   # Check for GNU $ac_path_EGREP
5011 case `"$ac_path_EGREP" --version 2>&1` in
5012 *GNU*)
5013   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5014 *)
5015   ac_count=0
5016   $as_echo_n 0123456789 >"conftest.in"
5017   while :
5018   do
5019     cat "conftest.in" "conftest.in" >"conftest.tmp"
5020     mv "conftest.tmp" "conftest.in"
5021     cp "conftest.in" "conftest.nl"
5022     $as_echo 'EGREP' >> "conftest.nl"
5023     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5024     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5025     as_fn_arith $ac_count + 1 && ac_count=$as_val
5026     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5027       # Best one so far, save it but keep looking for a better one
5028       ac_cv_path_EGREP="$ac_path_EGREP"
5029       ac_path_EGREP_max=$ac_count
5030     fi
5031     # 10*(2^10) chars as input seems more than enough
5032     test $ac_count -gt 10 && break
5033   done
5034   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5035 esac
5036
5037       $ac_path_EGREP_found && break 3
5038     done
5039   done
5040   done
5041 IFS=$as_save_IFS
5042   if test -z "$ac_cv_path_EGREP"; then
5043     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5044   fi
5045 else
5046   ac_cv_path_EGREP=$EGREP
5047 fi
5048
5049    fi
5050 fi
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5052 $as_echo "$ac_cv_path_EGREP" >&6; }
5053  EGREP="$ac_cv_path_EGREP"
5054
5055
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5057 $as_echo_n "checking for ANSI C header files... " >&6; }
5058 if ${ac_cv_header_stdc+:} false; then :
5059   $as_echo_n "(cached) " >&6
5060 else
5061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5062 /* end confdefs.h.  */
5063 #include <stdlib.h>
5064 #include <stdarg.h>
5065 #include <string.h>
5066 #include <float.h>
5067
5068 int
5069 main ()
5070 {
5071
5072   ;
5073   return 0;
5074 }
5075 _ACEOF
5076 if ac_fn_c_try_compile "$LINENO"; then :
5077   ac_cv_header_stdc=yes
5078 else
5079   ac_cv_header_stdc=no
5080 fi
5081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5082
5083 if test $ac_cv_header_stdc = yes; then
5084   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5085   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5086 /* end confdefs.h.  */
5087 #include <string.h>
5088
5089 _ACEOF
5090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5091   $EGREP "memchr" >/dev/null 2>&1; then :
5092
5093 else
5094   ac_cv_header_stdc=no
5095 fi
5096 rm -f conftest*
5097
5098 fi
5099
5100 if test $ac_cv_header_stdc = yes; then
5101   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5103 /* end confdefs.h.  */
5104 #include <stdlib.h>
5105
5106 _ACEOF
5107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5108   $EGREP "free" >/dev/null 2>&1; then :
5109
5110 else
5111   ac_cv_header_stdc=no
5112 fi
5113 rm -f conftest*
5114
5115 fi
5116
5117 if test $ac_cv_header_stdc = yes; then
5118   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5119   if test "$cross_compiling" = yes; then :
5120   :
5121 else
5122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5123 /* end confdefs.h.  */
5124 #include <ctype.h>
5125 #include <stdlib.h>
5126 #if ((' ' & 0x0FF) == 0x020)
5127 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5128 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5129 #else
5130 # define ISLOWER(c) \
5131                    (('a' <= (c) && (c) <= 'i') \
5132                      || ('j' <= (c) && (c) <= 'r') \
5133                      || ('s' <= (c) && (c) <= 'z'))
5134 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5135 #endif
5136
5137 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5138 int
5139 main ()
5140 {
5141   int i;
5142   for (i = 0; i < 256; i++)
5143     if (XOR (islower (i), ISLOWER (i))
5144         || toupper (i) != TOUPPER (i))
5145       return 2;
5146   return 0;
5147 }
5148 _ACEOF
5149 if ac_fn_c_try_run "$LINENO"; then :
5150
5151 else
5152   ac_cv_header_stdc=no
5153 fi
5154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5155   conftest.$ac_objext conftest.beam conftest.$ac_ext
5156 fi
5157
5158 fi
5159 fi
5160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5161 $as_echo "$ac_cv_header_stdc" >&6; }
5162 if test $ac_cv_header_stdc = yes; then
5163
5164 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5165
5166 fi
5167
5168 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5169 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5170                   inttypes.h stdint.h unistd.h
5171 do :
5172   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5173 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5174 "
5175 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5176   cat >>confdefs.h <<_ACEOF
5177 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5178 _ACEOF
5179
5180 fi
5181
5182 done
5183
5184
5185
5186
5187
5188   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5189 if test "x$ac_cv_header_minix_config_h" = xyes; then :
5190   MINIX=yes
5191 else
5192   MINIX=
5193 fi
5194
5195
5196   if test "$MINIX" = yes; then
5197
5198 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5199
5200
5201 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5202
5203
5204 $as_echo "#define _MINIX 1" >>confdefs.h
5205
5206   fi
5207
5208         case "$host_os" in
5209     hpux*)
5210
5211 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5212
5213       ;;
5214   esac
5215
5216
5217   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5218 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5219 if ${ac_cv_safe_to_define___extensions__+:} false; then :
5220   $as_echo_n "(cached) " >&6
5221 else
5222   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5223 /* end confdefs.h.  */
5224
5225 #         define __EXTENSIONS__ 1
5226           $ac_includes_default
5227 int
5228 main ()
5229 {
5230
5231   ;
5232   return 0;
5233 }
5234 _ACEOF
5235 if ac_fn_c_try_compile "$LINENO"; then :
5236   ac_cv_safe_to_define___extensions__=yes
5237 else
5238   ac_cv_safe_to_define___extensions__=no
5239 fi
5240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5241 fi
5242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5243 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5244   test $ac_cv_safe_to_define___extensions__ = yes &&
5245     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5246
5247   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5248
5249   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5250
5251   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5252
5253   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5254
5255
5256
5257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5258 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5259 if ${ac_cv_prog_cc_c89+:} false; then :
5260   $as_echo_n "(cached) " >&6
5261 else
5262   ac_cv_prog_cc_c89=no
5263 ac_save_CC=$CC
5264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5265 /* end confdefs.h.  */
5266 #include <stdarg.h>
5267 #include <stdio.h>
5268 struct stat;
5269 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5270 struct buf { int x; };
5271 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5272 static char *e (p, i)
5273      char **p;
5274      int i;
5275 {
5276   return p[i];
5277 }
5278 static char *f (char * (*g) (char **, int), char **p, ...)
5279 {
5280   char *s;
5281   va_list v;
5282   va_start (v,p);
5283   s = g (p, va_arg (v,int));
5284   va_end (v);
5285   return s;
5286 }
5287
5288 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5289    function prototypes and stuff, but not '\xHH' hex character constants.
5290    These don't provoke an error unfortunately, instead are silently treated
5291    as 'x'.  The following induces an error, until -std is added to get
5292    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5293    array size at least.  It's necessary to write '\x00'==0 to get something
5294    that's true only with -std.  */
5295 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5296
5297 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5298    inside strings and character constants.  */
5299 #define FOO(x) 'x'
5300 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5301
5302 int test (int i, double x);
5303 struct s1 {int (*f) (int a);};
5304 struct s2 {int (*f) (double a);};
5305 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5306 int argc;
5307 char **argv;
5308 int
5309 main ()
5310 {
5311 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5312   ;
5313   return 0;
5314 }
5315 _ACEOF
5316 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5317         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5318 do
5319   CC="$ac_save_CC $ac_arg"
5320   if ac_fn_c_try_compile "$LINENO"; then :
5321   ac_cv_prog_cc_c89=$ac_arg
5322 fi
5323 rm -f core conftest.err conftest.$ac_objext
5324   test "x$ac_cv_prog_cc_c89" != "xno" && break
5325 done
5326 rm -f conftest.$ac_ext
5327 CC=$ac_save_CC
5328
5329 fi
5330 # AC_CACHE_VAL
5331 case "x$ac_cv_prog_cc_c89" in
5332   x)
5333     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5334 $as_echo "none needed" >&6; } ;;
5335   xno)
5336     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5337 $as_echo "unsupported" >&6; } ;;
5338   *)
5339     CC="$CC $ac_cv_prog_cc_c89"
5340     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5341 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5342 esac
5343 if test "x$ac_cv_prog_cc_c89" != xno; then :
5344
5345 fi
5346
5347
5348    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
5349 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
5350 if ${ac_cv_prog_cc_c99+:} false; then :
5351   $as_echo_n "(cached) " >&6
5352 else
5353   ac_cv_prog_cc_c99=no
5354 ac_save_CC=$CC
5355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5356 /* end confdefs.h.  */
5357 #include <stdarg.h>
5358 #include <stdbool.h>
5359 #include <stdlib.h>
5360 #include <wchar.h>
5361 #include <stdio.h>
5362
5363 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
5364 #define debug(...) fprintf (stderr, __VA_ARGS__)
5365 #define showlist(...) puts (#__VA_ARGS__)
5366 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5367 static void
5368 test_varargs_macros (void)
5369 {
5370   int x = 1234;
5371   int y = 5678;
5372   debug ("Flag");
5373   debug ("X = %d\n", x);
5374   showlist (The first, second, and third items.);
5375   report (x>y, "x is %d but y is %d", x, y);
5376 }
5377
5378 // Check long long types.
5379 #define BIG64 18446744073709551615ull
5380 #define BIG32 4294967295ul
5381 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5382 #if !BIG_OK
5383   your preprocessor is broken;
5384 #endif
5385 #if BIG_OK
5386 #else
5387   your preprocessor is broken;
5388 #endif
5389 static long long int bignum = -9223372036854775807LL;
5390 static unsigned long long int ubignum = BIG64;
5391
5392 struct incomplete_array
5393 {
5394   int datasize;
5395   double data[];
5396 };
5397
5398 struct named_init {
5399   int number;
5400   const wchar_t *name;
5401   double average;
5402 };
5403
5404 typedef const char *ccp;
5405
5406 static inline int
5407 test_restrict (ccp restrict text)
5408 {
5409   // See if C++-style comments work.
5410   // Iterate through items via the restricted pointer.
5411   // Also check for declarations in for loops.
5412   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5413     continue;
5414   return 0;
5415 }
5416
5417 // Check varargs and va_copy.
5418 static void
5419 test_varargs (const char *format, ...)
5420 {
5421   va_list args;
5422   va_start (args, format);
5423   va_list args_copy;
5424   va_copy (args_copy, args);
5425
5426   const char *str;
5427   int number;
5428   float fnumber;
5429
5430   while (*format)
5431     {
5432       switch (*format++)
5433         {
5434         case 's': // string
5435           str = va_arg (args_copy, const char *);
5436           break;
5437         case 'd': // int
5438           number = va_arg (args_copy, int);
5439           break;
5440         case 'f': // float
5441           fnumber = va_arg (args_copy, double);
5442           break;
5443         default:
5444           break;
5445         }
5446     }
5447   va_end (args_copy);
5448   va_end (args);
5449 }
5450
5451 int
5452 main ()
5453 {
5454
5455   // Check bool.
5456   _Bool success = false;
5457
5458   // Check restrict.
5459   if (test_restrict ("String literal") == 0)
5460     success = true;
5461   char *restrict newvar = "Another string";
5462
5463   // Check varargs.
5464   test_varargs ("s, d' f .", "string", 65, 34.234);
5465   test_varargs_macros ();
5466
5467   // Check flexible array members.
5468   struct incomplete_array *ia =
5469     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5470   ia->datasize = 10;
5471   for (int i = 0; i < ia->datasize; ++i)
5472     ia->data[i] = i * 1.234;
5473
5474   // Check named initializers.
5475   struct named_init ni = {
5476     .number = 34,
5477     .name = L"Test wide string",
5478     .average = 543.34343,
5479   };
5480
5481   ni.number = 58;
5482
5483   int dynamic_array[ni.number];
5484   dynamic_array[ni.number - 1] = 543;
5485
5486   // work around unused variable warnings
5487   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5488           || dynamic_array[ni.number - 1] != 543);
5489
5490   ;
5491   return 0;
5492 }
5493 _ACEOF
5494 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
5495 do
5496   CC="$ac_save_CC $ac_arg"
5497   if ac_fn_c_try_compile "$LINENO"; then :
5498   ac_cv_prog_cc_c99=$ac_arg
5499 fi
5500 rm -f core conftest.err conftest.$ac_objext
5501   test "x$ac_cv_prog_cc_c99" != "xno" && break
5502 done
5503 rm -f conftest.$ac_ext
5504 CC=$ac_save_CC
5505
5506 fi
5507 # AC_CACHE_VAL
5508 case "x$ac_cv_prog_cc_c99" in
5509   x)
5510     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5511 $as_echo "none needed" >&6; } ;;
5512   xno)
5513     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5514 $as_echo "unsupported" >&6; } ;;
5515   *)
5516     CC="$CC $ac_cv_prog_cc_c99"
5517     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5518 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5519 esac
5520 if test "x$ac_cv_prog_cc_c99" != xno; then :
5521
5522 fi
5523
5524
5525
5526
5527
5528
5529 ac_ext=c
5530 ac_cpp='$CPP $CPPFLAGS'
5531 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5532 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5533 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5534 if test -n "$ac_tool_prefix"; then
5535   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5536 set dummy ${ac_tool_prefix}gcc; ac_word=$2
5537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5538 $as_echo_n "checking for $ac_word... " >&6; }
5539 if ${ac_cv_prog_CC+:} false; then :
5540   $as_echo_n "(cached) " >&6
5541 else
5542   if test -n "$CC"; then
5543   ac_cv_prog_CC="$CC" # Let the user override the test.
5544 else
5545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5546 for as_dir in $PATH
5547 do
5548   IFS=$as_save_IFS
5549   test -z "$as_dir" && as_dir=.
5550     for ac_exec_ext in '' $ac_executable_extensions; do
5551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5552     ac_cv_prog_CC="${ac_tool_prefix}gcc"
5553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5554     break 2
5555   fi
5556 done
5557   done
5558 IFS=$as_save_IFS
5559
5560 fi
5561 fi
5562 CC=$ac_cv_prog_CC
5563 if test -n "$CC"; then
5564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5565 $as_echo "$CC" >&6; }
5566 else
5567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5568 $as_echo "no" >&6; }
5569 fi
5570
5571
5572 fi
5573 if test -z "$ac_cv_prog_CC"; then
5574   ac_ct_CC=$CC
5575   # Extract the first word of "gcc", so it can be a program name with args.
5576 set dummy gcc; ac_word=$2
5577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5578 $as_echo_n "checking for $ac_word... " >&6; }
5579 if ${ac_cv_prog_ac_ct_CC+:} false; then :
5580   $as_echo_n "(cached) " >&6
5581 else
5582   if test -n "$ac_ct_CC"; then
5583   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5584 else
5585 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5586 for as_dir in $PATH
5587 do
5588   IFS=$as_save_IFS
5589   test -z "$as_dir" && as_dir=.
5590     for ac_exec_ext in '' $ac_executable_extensions; do
5591   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5592     ac_cv_prog_ac_ct_CC="gcc"
5593     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5594     break 2
5595   fi
5596 done
5597   done
5598 IFS=$as_save_IFS
5599
5600 fi
5601 fi
5602 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5603 if test -n "$ac_ct_CC"; then
5604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5605 $as_echo "$ac_ct_CC" >&6; }
5606 else
5607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5608 $as_echo "no" >&6; }
5609 fi
5610
5611   if test "x$ac_ct_CC" = x; then
5612     CC=""
5613   else
5614     case $cross_compiling:$ac_tool_warned in
5615 yes:)
5616 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5617 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5618 ac_tool_warned=yes ;;
5619 esac
5620     CC=$ac_ct_CC
5621   fi
5622 else
5623   CC="$ac_cv_prog_CC"
5624 fi
5625
5626 if test -z "$CC"; then
5627           if test -n "$ac_tool_prefix"; then
5628     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5629 set dummy ${ac_tool_prefix}cc; ac_word=$2
5630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5631 $as_echo_n "checking for $ac_word... " >&6; }
5632 if ${ac_cv_prog_CC+:} false; then :
5633   $as_echo_n "(cached) " >&6
5634 else
5635   if test -n "$CC"; then
5636   ac_cv_prog_CC="$CC" # Let the user override the test.
5637 else
5638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5639 for as_dir in $PATH
5640 do
5641   IFS=$as_save_IFS
5642   test -z "$as_dir" && as_dir=.
5643     for ac_exec_ext in '' $ac_executable_extensions; do
5644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5645     ac_cv_prog_CC="${ac_tool_prefix}cc"
5646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5647     break 2
5648   fi
5649 done
5650   done
5651 IFS=$as_save_IFS
5652
5653 fi
5654 fi
5655 CC=$ac_cv_prog_CC
5656 if test -n "$CC"; then
5657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5658 $as_echo "$CC" >&6; }
5659 else
5660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5661 $as_echo "no" >&6; }
5662 fi
5663
5664
5665   fi
5666 fi
5667 if test -z "$CC"; then
5668   # Extract the first word of "cc", so it can be a program name with args.
5669 set dummy cc; ac_word=$2
5670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5671 $as_echo_n "checking for $ac_word... " >&6; }
5672 if ${ac_cv_prog_CC+:} false; then :
5673   $as_echo_n "(cached) " >&6
5674 else
5675   if test -n "$CC"; then
5676   ac_cv_prog_CC="$CC" # Let the user override the test.
5677 else
5678   ac_prog_rejected=no
5679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5680 for as_dir in $PATH
5681 do
5682   IFS=$as_save_IFS
5683   test -z "$as_dir" && as_dir=.
5684     for ac_exec_ext in '' $ac_executable_extensions; do
5685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5686     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5687        ac_prog_rejected=yes
5688        continue
5689      fi
5690     ac_cv_prog_CC="cc"
5691     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5692     break 2
5693   fi
5694 done
5695   done
5696 IFS=$as_save_IFS
5697
5698 if test $ac_prog_rejected = yes; then
5699   # We found a bogon in the path, so make sure we never use it.
5700   set dummy $ac_cv_prog_CC
5701   shift
5702   if test $# != 0; then
5703     # We chose a different compiler from the bogus one.
5704     # However, it has the same basename, so the bogon will be chosen
5705     # first if we set CC to just the basename; use the full file name.
5706     shift
5707     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5708   fi
5709 fi
5710 fi
5711 fi
5712 CC=$ac_cv_prog_CC
5713 if test -n "$CC"; then
5714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5715 $as_echo "$CC" >&6; }
5716 else
5717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5718 $as_echo "no" >&6; }
5719 fi
5720
5721
5722 fi
5723 if test -z "$CC"; then
5724   if test -n "$ac_tool_prefix"; then
5725   for ac_prog in cl.exe
5726   do
5727     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5728 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5730 $as_echo_n "checking for $ac_word... " >&6; }
5731 if ${ac_cv_prog_CC+:} false; then :
5732   $as_echo_n "(cached) " >&6
5733 else
5734   if test -n "$CC"; then
5735   ac_cv_prog_CC="$CC" # Let the user override the test.
5736 else
5737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5738 for as_dir in $PATH
5739 do
5740   IFS=$as_save_IFS
5741   test -z "$as_dir" && as_dir=.
5742     for ac_exec_ext in '' $ac_executable_extensions; do
5743   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5744     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5746     break 2
5747   fi
5748 done
5749   done
5750 IFS=$as_save_IFS
5751
5752 fi
5753 fi
5754 CC=$ac_cv_prog_CC
5755 if test -n "$CC"; then
5756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5757 $as_echo "$CC" >&6; }
5758 else
5759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5760 $as_echo "no" >&6; }
5761 fi
5762
5763
5764     test -n "$CC" && break
5765   done
5766 fi
5767 if test -z "$CC"; then
5768   ac_ct_CC=$CC
5769   for ac_prog in cl.exe
5770 do
5771   # Extract the first word of "$ac_prog", so it can be a program name with args.
5772 set dummy $ac_prog; ac_word=$2
5773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5774 $as_echo_n "checking for $ac_word... " >&6; }
5775 if ${ac_cv_prog_ac_ct_CC+:} false; then :
5776   $as_echo_n "(cached) " >&6
5777 else
5778   if test -n "$ac_ct_CC"; then
5779   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5780 else
5781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5782 for as_dir in $PATH
5783 do
5784   IFS=$as_save_IFS
5785   test -z "$as_dir" && as_dir=.
5786     for ac_exec_ext in '' $ac_executable_extensions; do
5787   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5788     ac_cv_prog_ac_ct_CC="$ac_prog"
5789     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5790     break 2
5791   fi
5792 done
5793   done
5794 IFS=$as_save_IFS
5795
5796 fi
5797 fi
5798 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5799 if test -n "$ac_ct_CC"; then
5800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5801 $as_echo "$ac_ct_CC" >&6; }
5802 else
5803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5804 $as_echo "no" >&6; }
5805 fi
5806
5807
5808   test -n "$ac_ct_CC" && break
5809 done
5810
5811   if test "x$ac_ct_CC" = x; then
5812     CC=""
5813   else
5814     case $cross_compiling:$ac_tool_warned in
5815 yes:)
5816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5817 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5818 ac_tool_warned=yes ;;
5819 esac
5820     CC=$ac_ct_CC
5821   fi
5822 fi
5823
5824 fi
5825
5826
5827 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5828 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5829 as_fn_error $? "no acceptable C compiler found in \$PATH
5830 See \`config.log' for more details" "$LINENO" 5; }
5831
5832 # Provide some information about the compiler.
5833 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5834 set X $ac_compile
5835 ac_compiler=$2
5836 for ac_option in --version -v -V -qversion; do
5837   { { ac_try="$ac_compiler $ac_option >&5"
5838 case "(($ac_try" in
5839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5840   *) ac_try_echo=$ac_try;;
5841 esac
5842 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5843 $as_echo "$ac_try_echo"; } >&5
5844   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5845   ac_status=$?
5846   if test -s conftest.err; then
5847     sed '10a\
5848 ... rest of stderr output deleted ...
5849          10q' conftest.err >conftest.er1
5850     cat conftest.er1 >&5
5851   fi
5852   rm -f conftest.er1 conftest.err
5853   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5854   test $ac_status = 0; }
5855 done
5856
5857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5858 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5859 if ${ac_cv_c_compiler_gnu+:} false; then :
5860   $as_echo_n "(cached) " >&6
5861 else
5862   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5863 /* end confdefs.h.  */
5864
5865 int
5866 main ()
5867 {
5868 #ifndef __GNUC__
5869        choke me
5870 #endif
5871
5872   ;
5873   return 0;
5874 }
5875 _ACEOF
5876 if ac_fn_c_try_compile "$LINENO"; then :
5877   ac_compiler_gnu=yes
5878 else
5879   ac_compiler_gnu=no
5880 fi
5881 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5882 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5883
5884 fi
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5886 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5887 if test $ac_compiler_gnu = yes; then
5888   GCC=yes
5889 else
5890   GCC=
5891 fi
5892 ac_test_CFLAGS=${CFLAGS+set}
5893 ac_save_CFLAGS=$CFLAGS
5894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5895 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5896 if ${ac_cv_prog_cc_g+:} false; then :
5897   $as_echo_n "(cached) " >&6
5898 else
5899   ac_save_c_werror_flag=$ac_c_werror_flag
5900    ac_c_werror_flag=yes
5901    ac_cv_prog_cc_g=no
5902    CFLAGS="-g"
5903    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5904 /* end confdefs.h.  */
5905
5906 int
5907 main ()
5908 {
5909
5910   ;
5911   return 0;
5912 }
5913 _ACEOF
5914 if ac_fn_c_try_compile "$LINENO"; then :
5915   ac_cv_prog_cc_g=yes
5916 else
5917   CFLAGS=""
5918       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5919 /* end confdefs.h.  */
5920
5921 int
5922 main ()
5923 {
5924
5925   ;
5926   return 0;
5927 }
5928 _ACEOF
5929 if ac_fn_c_try_compile "$LINENO"; then :
5930
5931 else
5932   ac_c_werror_flag=$ac_save_c_werror_flag
5933          CFLAGS="-g"
5934          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5935 /* end confdefs.h.  */
5936
5937 int
5938 main ()
5939 {
5940
5941   ;
5942   return 0;
5943 }
5944 _ACEOF
5945 if ac_fn_c_try_compile "$LINENO"; then :
5946   ac_cv_prog_cc_g=yes
5947 fi
5948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5949 fi
5950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5951 fi
5952 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5953    ac_c_werror_flag=$ac_save_c_werror_flag
5954 fi
5955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5956 $as_echo "$ac_cv_prog_cc_g" >&6; }
5957 if test "$ac_test_CFLAGS" = set; then
5958   CFLAGS=$ac_save_CFLAGS
5959 elif test $ac_cv_prog_cc_g = yes; then
5960   if test "$GCC" = yes; then
5961     CFLAGS="-g -O2"
5962   else
5963     CFLAGS="-g"
5964   fi
5965 else
5966   if test "$GCC" = yes; then
5967     CFLAGS="-O2"
5968   else
5969     CFLAGS=
5970   fi
5971 fi
5972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5973 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5974 if ${ac_cv_prog_cc_c89+:} false; then :
5975   $as_echo_n "(cached) " >&6
5976 else
5977   ac_cv_prog_cc_c89=no
5978 ac_save_CC=$CC
5979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5980 /* end confdefs.h.  */
5981 #include <stdarg.h>
5982 #include <stdio.h>
5983 struct stat;
5984 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5985 struct buf { int x; };
5986 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5987 static char *e (p, i)
5988      char **p;
5989      int i;
5990 {
5991   return p[i];
5992 }
5993 static char *f (char * (*g) (char **, int), char **p, ...)
5994 {
5995   char *s;
5996   va_list v;
5997   va_start (v,p);
5998   s = g (p, va_arg (v,int));
5999   va_end (v);
6000   return s;
6001 }
6002
6003 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6004    function prototypes and stuff, but not '\xHH' hex character constants.
6005    These don't provoke an error unfortunately, instead are silently treated
6006    as 'x'.  The following induces an error, until -std is added to get
6007    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6008    array size at least.  It's necessary to write '\x00'==0 to get something
6009    that's true only with -std.  */
6010 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6011
6012 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6013    inside strings and character constants.  */
6014 #define FOO(x) 'x'
6015 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6016
6017 int test (int i, double x);
6018 struct s1 {int (*f) (int a);};
6019 struct s2 {int (*f) (double a);};
6020 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6021 int argc;
6022 char **argv;
6023 int
6024 main ()
6025 {
6026 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6027   ;
6028   return 0;
6029 }
6030 _ACEOF
6031 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6032         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6033 do
6034   CC="$ac_save_CC $ac_arg"
6035   if ac_fn_c_try_compile "$LINENO"; then :
6036   ac_cv_prog_cc_c89=$ac_arg
6037 fi
6038 rm -f core conftest.err conftest.$ac_objext
6039   test "x$ac_cv_prog_cc_c89" != "xno" && break
6040 done
6041 rm -f conftest.$ac_ext
6042 CC=$ac_save_CC
6043
6044 fi
6045 # AC_CACHE_VAL
6046 case "x$ac_cv_prog_cc_c89" in
6047   x)
6048     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6049 $as_echo "none needed" >&6; } ;;
6050   xno)
6051     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6052 $as_echo "unsupported" >&6; } ;;
6053   *)
6054     CC="$CC $ac_cv_prog_cc_c89"
6055     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6056 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6057 esac
6058 if test "x$ac_cv_prog_cc_c89" != xno; then :
6059
6060 fi
6061
6062 ac_ext=c
6063 ac_cpp='$CPP $CPPFLAGS'
6064 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6065 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6066 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6067
6068 ac_ext=c
6069 ac_cpp='$CPP $CPPFLAGS'
6070 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6071 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6072 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6074 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
6075 if ${am_cv_prog_cc_c_o+:} false; then :
6076   $as_echo_n "(cached) " >&6
6077 else
6078   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6079 /* end confdefs.h.  */
6080
6081 int
6082 main ()
6083 {
6084
6085   ;
6086   return 0;
6087 }
6088 _ACEOF
6089   # Make sure it works both with $CC and with simple cc.
6090   # Following AC_PROG_CC_C_O, we do the test twice because some
6091   # compilers refuse to overwrite an existing .o file with -o,
6092   # though they will create one.
6093   am_cv_prog_cc_c_o=yes
6094   for am_i in 1 2; do
6095     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6096    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6097    ac_status=$?
6098    echo "$as_me:$LINENO: \$? = $ac_status" >&5
6099    (exit $ac_status); } \
6100          && test -f conftest2.$ac_objext; then
6101       : OK
6102     else
6103       am_cv_prog_cc_c_o=no
6104       break
6105     fi
6106   done
6107   rm -f core conftest*
6108   unset am_i
6109 fi
6110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6111 $as_echo "$am_cv_prog_cc_c_o" >&6; }
6112 if test "$am_cv_prog_cc_c_o" != yes; then
6113    # Losing compiler, so override with the script.
6114    # FIXME: It is wrong to rewrite CC.
6115    # But if we don't then we get into trouble of one sort or another.
6116    # A longer-term fix would be to have automake use am__CC in this case,
6117    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6118    CC="$am_aux_dir/compile $CC"
6119 fi
6120 ac_ext=c
6121 ac_cpp='$CPP $CPPFLAGS'
6122 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6123 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6124 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6125
6126
6127 depcc="$CC"   am_compiler_list=
6128
6129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6130 $as_echo_n "checking dependency style of $depcc... " >&6; }
6131 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6132   $as_echo_n "(cached) " >&6
6133 else
6134   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6135   # We make a subdir and do the tests there.  Otherwise we can end up
6136   # making bogus files that we don't know about and never remove.  For
6137   # instance it was reported that on HP-UX the gcc test will end up
6138   # making a dummy file named 'D' -- because '-MD' means "put the output
6139   # in D".
6140   rm -rf conftest.dir
6141   mkdir conftest.dir
6142   # Copy depcomp to subdir because otherwise we won't find it if we're
6143   # using a relative directory.
6144   cp "$am_depcomp" conftest.dir
6145   cd conftest.dir
6146   # We will build objects and dependencies in a subdirectory because
6147   # it helps to detect inapplicable dependency modes.  For instance
6148   # both Tru64's cc and ICC support -MD to output dependencies as a
6149   # side effect of compilation, but ICC will put the dependencies in
6150   # the current directory while Tru64 will put them in the object
6151   # directory.
6152   mkdir sub
6153
6154   am_cv_CC_dependencies_compiler_type=none
6155   if test "$am_compiler_list" = ""; then
6156      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6157   fi
6158   am__universal=false
6159   case " $depcc " in #(
6160      *\ -arch\ *\ -arch\ *) am__universal=true ;;
6161      esac
6162
6163   for depmode in $am_compiler_list; do
6164     # Setup a source with many dependencies, because some compilers
6165     # like to wrap large dependency lists on column 80 (with \), and
6166     # we should not choose a depcomp mode which is confused by this.
6167     #
6168     # We need to recreate these files for each test, as the compiler may
6169     # overwrite some of them when testing with obscure command lines.
6170     # This happens at least with the AIX C compiler.
6171     : > sub/conftest.c
6172     for i in 1 2 3 4 5 6; do
6173       echo '#include "conftst'$i'.h"' >> sub/conftest.c
6174       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6175       # Solaris 10 /bin/sh.
6176       echo '/* dummy */' > sub/conftst$i.h
6177     done
6178     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6179
6180     # We check with '-c' and '-o' for the sake of the "dashmstdout"
6181     # mode.  It turns out that the SunPro C++ compiler does not properly
6182     # handle '-M -o', and we need to detect this.  Also, some Intel
6183     # versions had trouble with output in subdirs.
6184     am__obj=sub/conftest.${OBJEXT-o}
6185     am__minus_obj="-o $am__obj"
6186     case $depmode in
6187     gcc)
6188       # This depmode causes a compiler race in universal mode.
6189       test "$am__universal" = false || continue
6190       ;;
6191     nosideeffect)
6192       # After this tag, mechanisms are not by side-effect, so they'll
6193       # only be used when explicitly requested.
6194       if test "x$enable_dependency_tracking" = xyes; then
6195         continue
6196       else
6197         break
6198       fi
6199       ;;
6200     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6201       # This compiler won't grok '-c -o', but also, the minuso test has
6202       # not run yet.  These depmodes are late enough in the game, and
6203       # so weak that their functioning should not be impacted.
6204       am__obj=conftest.${OBJEXT-o}
6205       am__minus_obj=
6206       ;;
6207     none) break ;;
6208     esac
6209     if depmode=$depmode \
6210        source=sub/conftest.c object=$am__obj \
6211        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6212        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6213          >/dev/null 2>conftest.err &&
6214        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6215        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6216        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6217        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6218       # icc doesn't choke on unknown options, it will just issue warnings
6219       # or remarks (even with -Werror).  So we grep stderr for any message
6220       # that says an option was ignored or not supported.
6221       # When given -MP, icc 7.0 and 7.1 complain thusly:
6222       #   icc: Command line warning: ignoring option '-M'; no argument required
6223       # The diagnosis changed in icc 8.0:
6224       #   icc: Command line remark: option '-MP' not supported
6225       if (grep 'ignoring option' conftest.err ||
6226           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6227         am_cv_CC_dependencies_compiler_type=$depmode
6228         break
6229       fi
6230     fi
6231   done
6232
6233   cd ..
6234   rm -rf conftest.dir
6235 else
6236   am_cv_CC_dependencies_compiler_type=none
6237 fi
6238
6239 fi
6240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6241 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6242 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6243
6244  if
6245   test "x$enable_dependency_tracking" != xno \
6246   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6247   am__fastdepCC_TRUE=
6248   am__fastdepCC_FALSE='#'
6249 else
6250   am__fastdepCC_TRUE='#'
6251   am__fastdepCC_FALSE=
6252 fi
6253
6254
6255 # Ralf Wildenhues: With per-target flags we need CC_C_O
6256 # AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
6257
6258 if test $ac_cv_c_compiler_gnu = yes; then
6259     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
6260 $as_echo_n "checking whether $CC needs -traditional... " >&6; }
6261 if ${ac_cv_prog_gcc_traditional+:} false; then :
6262   $as_echo_n "(cached) " >&6
6263 else
6264     ac_pattern="Autoconf.*'x'"
6265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6266 /* end confdefs.h.  */
6267 #include <sgtty.h>
6268 Autoconf TIOCGETP
6269 _ACEOF
6270 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6271   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
6272   ac_cv_prog_gcc_traditional=yes
6273 else
6274   ac_cv_prog_gcc_traditional=no
6275 fi
6276 rm -f conftest*
6277
6278
6279   if test $ac_cv_prog_gcc_traditional = no; then
6280     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6281 /* end confdefs.h.  */
6282 #include <termio.h>
6283 Autoconf TCGETA
6284 _ACEOF
6285 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6286   $EGREP "$ac_pattern" >/dev/null 2>&1; then :
6287   ac_cv_prog_gcc_traditional=yes
6288 fi
6289 rm -f conftest*
6290
6291   fi
6292 fi
6293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
6294 $as_echo "$ac_cv_prog_gcc_traditional" >&6; }
6295   if test $ac_cv_prog_gcc_traditional = yes; then
6296     CC="$CC -traditional"
6297   fi
6298 fi
6299
6300
6301
6302
6303
6304 CFLAGS_NTP=
6305 CPPFLAGS_NTP=
6306 LDADD_NTP=
6307 LDFLAGS_NTP=
6308
6309
6310
6311
6312
6313 case "$ac_cv_prog_cc_c89" in
6314  no)
6315     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
6316                  version 4.2.5 and higher." >&5
6317 $as_echo "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
6318                  version 4.2.5 and higher." >&2;}
6319     ;;
6320 esac
6321
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
6323 $as_echo_n "checking if $CC can handle #warning... " >&6; }
6324 if ${ntp_cv_cpp_warning+:} false; then :
6325   $as_echo_n "(cached) " >&6
6326 else
6327   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6328 /* end confdefs.h.  */
6329
6330 int
6331 main ()
6332 {
6333 #warning foo
6334   ;
6335   return 0;
6336 }
6337 _ACEOF
6338 if ac_fn_c_try_compile "$LINENO"; then :
6339   ntp_cv_cpp_warning=yes
6340 else
6341   ntp_cv_cpp_warning=no
6342
6343 fi
6344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6345
6346 fi
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cpp_warning" >&5
6348 $as_echo "$ntp_cv_cpp_warning" >&6; }
6349 case "$ntp_cv_cpp_warning" in
6350  no)
6351
6352 $as_echo "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
6353
6354 esac
6355
6356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__((...))" >&5
6357 $as_echo_n "checking if $CC supports __attribute__((...))... " >&6; }
6358 if ${ntp_cv_cc_attribute+:} false; then :
6359   $as_echo_n "(cached) " >&6
6360 else
6361   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6362 /* end confdefs.h.  */
6363
6364 int
6365 main ()
6366 {
6367 void foo(void) __attribute__((__noreturn__));
6368
6369   ;
6370   return 0;
6371 }
6372 _ACEOF
6373 if ac_fn_c_try_compile "$LINENO"; then :
6374   ntp_cv_cc_attribute=yes
6375 else
6376   ntp_cv_cc_attribute=no
6377
6378 fi
6379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6380
6381 fi
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cc_attribute" >&5
6383 $as_echo "$ntp_cv_cc_attribute" >&6; }
6384 case "$ntp_cv_cc_attribute" in
6385  yes)
6386
6387 $as_echo "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h
6388
6389 esac
6390
6391
6392 case "$GCC" in
6393  yes)
6394     SAVED_CFLAGS="$CFLAGS"
6395     CFLAGS="$CFLAGS -Wstrict-overflow"
6396     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
6397 $as_echo_n "checking if $CC can handle -Wstrict-overflow... " >&6; }
6398 if ${ntp_cv_gcc_Wstrict_overflow+:} false; then :
6399   $as_echo_n "(cached) " >&6
6400 else
6401   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6402 /* end confdefs.h.  */
6403
6404 int
6405 main ()
6406 {
6407
6408   ;
6409   return 0;
6410 }
6411 _ACEOF
6412 if ac_fn_c_try_compile "$LINENO"; then :
6413   ntp_cv_gcc_Wstrict_overflow=yes
6414 else
6415   ntp_cv_gcc_Wstrict_overflow=no
6416
6417 fi
6418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6419
6420 fi
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wstrict_overflow" >&5
6422 $as_echo "$ntp_cv_gcc_Wstrict_overflow" >&6; }
6423     #
6424     # $ntp_cv_gcc_Wstrict_overflow is tested later to add the
6425     # flag to CFLAGS.
6426     #
6427     CFLAGS="$SAVED_CFLAGS -Winit-self"
6428     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
6429 $as_echo_n "checking if $CC can handle -Winit-self... " >&6; }
6430 if ${ntp_cv_gcc_Winit_self+:} false; then :
6431   $as_echo_n "(cached) " >&6
6432 else
6433
6434             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6435 /* end confdefs.h.  */
6436
6437 int
6438 main ()
6439 {
6440
6441   ;
6442   return 0;
6443 }
6444 _ACEOF
6445 if ac_fn_c_try_compile "$LINENO"; then :
6446   ntp_cv_gcc_Winit_self=yes
6447 else
6448   ntp_cv_gcc_Winit_self=no
6449
6450 fi
6451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6452
6453
6454 fi
6455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
6456 $as_echo "$ntp_cv_gcc_Winit_self" >&6; }
6457     CFLAGS="$SAVED_CFLAGS"
6458     { SAVED_CFLAGS=; unset SAVED_CFLAGS;}
6459     #
6460     # $ntp_cv_gcc_Winit_self is tested later to add the
6461     # flag to CFLAGS_NTP.
6462     #
6463     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
6464 $as_echo_n "checking if linker supports omitting unused code and data... " >&6; }
6465 if ${ntp_cv_gc_sections_runs+:} false; then :
6466   $as_echo_n "(cached) " >&6
6467 else
6468
6469                                                                                             origCFLAGS="$CFLAGS"
6470             CFLAGS="$CFLAGS -Wl,--gc-sections"
6471             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6472 /* end confdefs.h.  */
6473
6474                         #include <stdlib.h>
6475                         #include <stdio.h>
6476
6477 int
6478 main ()
6479 {
6480
6481                         FILE *  fpC;
6482                         char    buf[32];
6483                         size_t  cch;
6484                         int     read_success_once;
6485
6486                         fpC = fopen("conftest.c", "r");
6487                         if (NULL == fpC)
6488                                 exit(1);
6489                         do {
6490                                 cch = fread(buf, sizeof(buf), 1, fpC);
6491                                 read_success_once |= (0 != cch);
6492                         } while (0 != cch);
6493                         if (!read_success_once)
6494                                 exit(2);
6495                         if (!feof(fpC))
6496                                 exit(3);
6497                         if (0 != fclose(fpC))
6498                                 exit(4);
6499
6500                         exit(EXIT_SUCCESS);
6501
6502
6503   ;
6504   return 0;
6505 }
6506 _ACEOF
6507 if ac_fn_c_try_link "$LINENO"; then :
6508
6509                     if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
6510                         ntp_cv_gc_sections_runs=no
6511                     else
6512                         ntp_cv_gc_sections_runs=no
6513                         ./conftest >/dev/null 2>&1 && ntp_cv_gc_sections_runs=yes
6514                     fi
6515
6516 else
6517   ntp_cv_gc_sections_runs=no
6518
6519 fi
6520 rm -f core conftest.err conftest.$ac_objext \
6521     conftest$ac_exeext conftest.$ac_ext
6522             CFLAGS="$origCFLAGS"
6523             { origCFLAGS=; unset origCFLAGS;}
6524
6525
6526 fi
6527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gc_sections_runs" >&5
6528 $as_echo "$ntp_cv_gc_sections_runs" >&6; }
6529     case "$ntp_cv_gc_sections_runs" in
6530      yes)
6531         LDADD_LIBNTP="-Wl,--gc-sections"
6532         CFLAGS_NTP="$CFLAGS_NTP -ffunction-sections -fdata-sections"
6533         ;;
6534      no)
6535         LDADD_LIBNTP=
6536         ;;
6537     esac
6538     CFLAGS_NTP="$CFLAGS_NTP -Wall"
6539     CFLAGS_NTP="$CFLAGS_NTP -Wcast-align"
6540     CFLAGS_NTP="$CFLAGS_NTP -Wcast-qual"
6541     # CFLAGS_NTP="$CFLAGS_NTP -Wconversion"
6542     # CFLAGS_NTP="$CFLAGS_NTP -Werror"
6543     # CFLAGS_NTP="$CFLAGS_NTP -Wextra"
6544     # CFLAGS_NTP="$CFLAGS_NTP -Wfloat-equal"
6545     CFLAGS_NTP="$CFLAGS_NTP -Wmissing-prototypes"
6546     CFLAGS_NTP="$CFLAGS_NTP -Wpointer-arith"
6547     CFLAGS_NTP="$CFLAGS_NTP -Wshadow"
6548     # CFLAGS_NTP="$CFLAGS_NTP -Wtraditional"
6549     # CFLAGS_NTP="$CFLAGS_NTP -Wwrite-strings"
6550     case "$ntp_cv_gcc_Winit_self" in
6551      yes)
6552         CFLAGS_NTP="$CFLAGS_NTP -Winit-self"
6553     esac
6554     case "$ntp_cv_gcc_Wstrict_overflow" in
6555      yes)
6556         CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
6557     esac
6558     # -W[no-]strict-prototypes might be added by NTP_OPENSSL
6559 esac
6560
6561
6562     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
6563 $as_echo_n "checking additional compiler flags... " >&6; }
6564     # allow ntp_os_cflags to be preset to skip this stuff
6565     case "${ntp_os_cflags+set}" in
6566      set)
6567         ;;
6568      *)
6569         ntp_os_cflags=
6570         case "$host_os" in
6571          aix[1-3]*)
6572             ;;
6573          aix4.[0-2]*)
6574             # turn on additional headers
6575             ntp_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
6576             ;;
6577          aix5.3*)
6578             # avoid circular dependencies in yp headers, and more
6579             ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
6580             ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS -D_MSGQSUPPORT"
6581             ;;
6582          aix*)
6583             # XXX Only verified thru AIX6.
6584             # aix7 seems to need a different XOPEN_SOURCE_EXTENDED thing.
6585             # avoid circular dependencies in yp headers
6586             # _XOPEN_SOURCE=500 = X/Open 5: POSIX 1995
6587             # _XOPEN_SOURCE=600 = X/Open 6: POSIX 2004
6588             # _XOPEN_SOURCE=700 = X/Open 7: POSIX 2008
6589             ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_SOURCE=600"
6590             ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS"
6591             ;;
6592          amigaos)
6593             ntp_os_cflags="-DSYS_AMIGA"
6594             ;;
6595          darwin*|macosx*|rhapsody*)
6596             ntp_os_cflags="-D_P1003_1B_VISIBLE"
6597             ;;
6598          hpux10.*)              # at least for hppa2.0-hp-hpux10.20
6599             case "$GCC" in
6600              yes)
6601                 ;;
6602              *)
6603                 # use Ansi compiler on HPUX, and some -Wp magic
6604                 ntp_os_cflags="-Ae -Wp,-H18816"
6605                 ;;
6606             esac
6607             ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
6608             ;;
6609          hpux*)
6610             case "$GCC" in
6611              yes)
6612                 ;;
6613              *)
6614                 # use Ansi compiler on HPUX
6615                 ntp_os_cflags="-Ae"
6616             esac
6617             ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
6618             ;;
6619          irix6*)
6620             case "$CC" in
6621              cc)
6622                 # do not use 64-bit compiler
6623                 ntp_os_cflags="-n32 -mips3 -Wl,-woff,84"
6624             esac
6625             ;;
6626          nextstep3)
6627             ntp_os_cflags="-posix"
6628             ;;
6629          solaris1*|solaris2.[0-5]|solaris2.5.*)
6630             ;;
6631          sunos[34]*|sunos5.[0-5]|sunos5.5.*)
6632             ;;
6633          solaris2*|sunos5*)
6634             # turn on 64-bit file offset interface
6635             ntp_os_cflags="-D_LARGEFILE64_SOURCE"
6636             ;;
6637          vxworks*)
6638             case "$build" in
6639              $host)
6640                 ;;
6641              *)
6642                 # Quick and dirty sanity check
6643                 case "$VX_KERNEL" in
6644                  '')
6645                     as_fn_error $? "See html/build/hints/vxworks.html" "$LINENO" 5
6646                 esac
6647                 ntp_os_cflags="-DSYS_VXWORKS"
6648             esac
6649             ;;
6650         esac
6651     esac
6652     case "$ntp_os_cflags" in
6653      '')
6654         ntp_os_cflags_msg="none needed"
6655         ;;
6656      *)
6657         ntp_os_cflags_msg="$ntp_os_cflags"
6658     esac
6659     CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
6660     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
6661 $as_echo "$ntp_os_cflags_msg" >&6; }
6662     { ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
6663     ###
6664     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5
6665 $as_echo_n "checking additional linker flags... " >&6; }
6666     # HMS: The following might still need tweaking
6667     # allow ntp_os_ldflags to be preset to skip this stuff
6668     case "${ntp_os_ldflags+set}" in
6669      set)
6670         ;;
6671      *)
6672         ntp_os_ldflags=
6673         case "$host_os" in
6674          hpux*)
6675             case "$GCC" in
6676              yes)
6677                 ntp_os_ldflags="-Wl,+allowdups"
6678                 ;;
6679             esac
6680             ;;
6681         esac
6682         ;;
6683     esac
6684     case "$ntp_os_ldflags" in
6685      '')
6686         ntp_os_ldflags_msg="none needed"
6687         ;;
6688      *)
6689         ntp_os_ldflags_msg="$ntp_os_ldflags"
6690     esac
6691     LDFLAGS_NTP="$LDFLAGS_NTP $ntp_os_ldflags"
6692     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_ldflags_msg" >&5
6693 $as_echo "$ntp_os_ldflags_msg" >&6; }
6694     { ntp_os_ldflags_msg=; unset ntp_os_ldflags_msg;}
6695
6696
6697
6698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
6699 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
6700 if ${ac_cv_c_bigendian+:} false; then :
6701   $as_echo_n "(cached) " >&6
6702 else
6703   ac_cv_c_bigendian=unknown
6704     # See if we're dealing with a universal compiler.
6705     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6706 /* end confdefs.h.  */
6707 #ifndef __APPLE_CC__
6708                not a universal capable compiler
6709              #endif
6710              typedef int dummy;
6711
6712 _ACEOF
6713 if ac_fn_c_try_compile "$LINENO"; then :
6714
6715         # Check for potential -arch flags.  It is not universal unless
6716         # there are at least two -arch flags with different values.
6717         ac_arch=
6718         ac_prev=
6719         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
6720          if test -n "$ac_prev"; then
6721            case $ac_word in
6722              i?86 | x86_64 | ppc | ppc64)
6723                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
6724                  ac_arch=$ac_word
6725                else
6726                  ac_cv_c_bigendian=universal
6727                  break
6728                fi
6729                ;;
6730            esac
6731            ac_prev=
6732          elif test "x$ac_word" = "x-arch"; then
6733            ac_prev=arch
6734          fi
6735        done
6736 fi
6737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6738     if test $ac_cv_c_bigendian = unknown; then
6739       # See if sys/param.h defines the BYTE_ORDER macro.
6740       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6741 /* end confdefs.h.  */
6742 #include <sys/types.h>
6743              #include <sys/param.h>
6744
6745 int
6746 main ()
6747 {
6748 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
6749                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
6750                      && LITTLE_ENDIAN)
6751               bogus endian macros
6752              #endif
6753
6754   ;
6755   return 0;
6756 }
6757 _ACEOF
6758 if ac_fn_c_try_compile "$LINENO"; then :
6759   # It does; now see whether it defined to BIG_ENDIAN or not.
6760          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6761 /* end confdefs.h.  */
6762 #include <sys/types.h>
6763                 #include <sys/param.h>
6764
6765 int
6766 main ()
6767 {
6768 #if BYTE_ORDER != BIG_ENDIAN
6769                  not big endian
6770                 #endif
6771
6772   ;
6773   return 0;
6774 }
6775 _ACEOF
6776 if ac_fn_c_try_compile "$LINENO"; then :
6777   ac_cv_c_bigendian=yes
6778 else
6779   ac_cv_c_bigendian=no
6780 fi
6781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6782 fi
6783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6784     fi
6785     if test $ac_cv_c_bigendian = unknown; then
6786       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
6787       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6788 /* end confdefs.h.  */
6789 #include <limits.h>
6790
6791 int
6792 main ()
6793 {
6794 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
6795               bogus endian macros
6796              #endif
6797
6798   ;
6799   return 0;
6800 }
6801 _ACEOF
6802 if ac_fn_c_try_compile "$LINENO"; then :
6803   # It does; now see whether it defined to _BIG_ENDIAN or not.
6804          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6805 /* end confdefs.h.  */
6806 #include <limits.h>
6807
6808 int
6809 main ()
6810 {
6811 #ifndef _BIG_ENDIAN
6812                  not big endian
6813                 #endif
6814
6815   ;
6816   return 0;
6817 }
6818 _ACEOF
6819 if ac_fn_c_try_compile "$LINENO"; then :
6820   ac_cv_c_bigendian=yes
6821 else
6822   ac_cv_c_bigendian=no
6823 fi
6824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6825 fi
6826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6827     fi
6828     if test $ac_cv_c_bigendian = unknown; then
6829       # Compile a test program.
6830       if test "$cross_compiling" = yes; then :
6831   # Try to guess by grepping values from an object file.
6832          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6833 /* end confdefs.h.  */
6834 short int ascii_mm[] =
6835                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
6836                 short int ascii_ii[] =
6837                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
6838                 int use_ascii (int i) {
6839                   return ascii_mm[i] + ascii_ii[i];
6840                 }
6841                 short int ebcdic_ii[] =
6842                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
6843                 short int ebcdic_mm[] =
6844                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
6845                 int use_ebcdic (int i) {
6846                   return ebcdic_mm[i] + ebcdic_ii[i];
6847                 }
6848                 extern int foo;
6849
6850 int
6851 main ()
6852 {
6853 return use_ascii (foo) == use_ebcdic (foo);
6854   ;
6855   return 0;
6856 }
6857 _ACEOF
6858 if ac_fn_c_try_compile "$LINENO"; then :
6859   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
6860               ac_cv_c_bigendian=yes
6861             fi
6862             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
6863               if test "$ac_cv_c_bigendian" = unknown; then
6864                 ac_cv_c_bigendian=no
6865               else
6866                 # finding both strings is unlikely to happen, but who knows?
6867                 ac_cv_c_bigendian=unknown
6868               fi
6869             fi
6870 fi
6871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6872 else
6873   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6874 /* end confdefs.h.  */
6875 $ac_includes_default
6876 int
6877 main ()
6878 {
6879
6880              /* Are we little or big endian?  From Harbison&Steele.  */
6881              union
6882              {
6883                long int l;
6884                char c[sizeof (long int)];
6885              } u;
6886              u.l = 1;
6887              return u.c[sizeof (long int) - 1] == 1;
6888
6889   ;
6890   return 0;
6891 }
6892 _ACEOF
6893 if ac_fn_c_try_run "$LINENO"; then :
6894   ac_cv_c_bigendian=no
6895 else
6896   ac_cv_c_bigendian=yes
6897 fi
6898 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6899   conftest.$ac_objext conftest.beam conftest.$ac_ext
6900 fi
6901
6902     fi
6903 fi
6904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
6905 $as_echo "$ac_cv_c_bigendian" >&6; }
6906  case $ac_cv_c_bigendian in #(
6907    yes)
6908      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
6909 ;; #(
6910    no)
6911       ;; #(
6912    universal)
6913
6914 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
6915
6916      ;; #(
6917    *)
6918      as_fn_error $? "unknown endianness
6919  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
6920  esac
6921
6922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
6923 $as_echo_n "checking for working volatile... " >&6; }
6924 if ${ac_cv_c_volatile+:} false; then :
6925   $as_echo_n "(cached) " >&6
6926 else
6927   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6928 /* end confdefs.h.  */
6929
6930 int
6931 main ()
6932 {
6933
6934 volatile int x;
6935 int * volatile y = (int *) 0;
6936 return !x && !y;
6937   ;
6938   return 0;
6939 }
6940 _ACEOF
6941 if ac_fn_c_try_compile "$LINENO"; then :
6942   ac_cv_c_volatile=yes
6943 else
6944   ac_cv_c_volatile=no
6945 fi
6946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6947 fi
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
6949 $as_echo "$ac_cv_c_volatile" >&6; }
6950 if test $ac_cv_c_volatile = no; then
6951
6952 $as_echo "#define volatile /**/" >>confdefs.h
6953
6954 fi
6955
6956 ac_ext=c
6957 ac_cpp='$CPP $CPPFLAGS'
6958 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6959 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6960 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6962 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6963 # On Suns, sometimes $CPP names a directory.
6964 if test -n "$CPP" && test -d "$CPP"; then
6965   CPP=
6966 fi
6967 if test -z "$CPP"; then
6968   if ${ac_cv_prog_CPP+:} false; then :
6969   $as_echo_n "(cached) " >&6
6970 else
6971       # Double quotes because CPP needs to be expanded
6972     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6973     do
6974       ac_preproc_ok=false
6975 for ac_c_preproc_warn_flag in '' yes
6976 do
6977   # Use a header file that comes with gcc, so configuring glibc
6978   # with a fresh cross-compiler works.
6979   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6980   # <limits.h> exists even on freestanding compilers.
6981   # On the NeXT, cc -E runs the code through the compiler's parser,
6982   # not just through cpp. "Syntax error" is here to catch this case.
6983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6984 /* end confdefs.h.  */
6985 #ifdef __STDC__
6986 # include <limits.h>
6987 #else
6988 # include <assert.h>
6989 #endif
6990                      Syntax error
6991 _ACEOF
6992 if ac_fn_c_try_cpp "$LINENO"; then :
6993
6994 else
6995   # Broken: fails on valid input.
6996 continue
6997 fi
6998 rm -f conftest.err conftest.i conftest.$ac_ext
6999
7000   # OK, works on sane cases.  Now check whether nonexistent headers
7001   # can be detected and how.
7002   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7003 /* end confdefs.h.  */
7004 #include <ac_nonexistent.h>
7005 _ACEOF
7006 if ac_fn_c_try_cpp "$LINENO"; then :
7007   # Broken: success on invalid input.
7008 continue
7009 else
7010   # Passes both tests.
7011 ac_preproc_ok=:
7012 break
7013 fi
7014 rm -f conftest.err conftest.i conftest.$ac_ext
7015
7016 done
7017 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7018 rm -f conftest.i conftest.err conftest.$ac_ext
7019 if $ac_preproc_ok; then :
7020   break
7021 fi
7022
7023     done
7024     ac_cv_prog_CPP=$CPP
7025
7026 fi
7027   CPP=$ac_cv_prog_CPP
7028 else
7029   ac_cv_prog_CPP=$CPP
7030 fi
7031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7032 $as_echo "$CPP" >&6; }
7033 ac_preproc_ok=false
7034 for ac_c_preproc_warn_flag in '' yes
7035 do
7036   # Use a header file that comes with gcc, so configuring glibc
7037   # with a fresh cross-compiler works.
7038   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7039   # <limits.h> exists even on freestanding compilers.
7040   # On the NeXT, cc -E runs the code through the compiler's parser,
7041   # not just through cpp. "Syntax error" is here to catch this case.
7042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7043 /* end confdefs.h.  */
7044 #ifdef __STDC__
7045 # include <limits.h>
7046 #else
7047 # include <assert.h>
7048 #endif
7049                      Syntax error
7050 _ACEOF
7051 if ac_fn_c_try_cpp "$LINENO"; then :
7052
7053 else
7054   # Broken: fails on valid input.
7055 continue
7056 fi
7057 rm -f conftest.err conftest.i conftest.$ac_ext
7058
7059   # OK, works on sane cases.  Now check whether nonexistent headers
7060   # can be detected and how.
7061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7062 /* end confdefs.h.  */
7063 #include <ac_nonexistent.h>
7064 _ACEOF
7065 if ac_fn_c_try_cpp "$LINENO"; then :
7066   # Broken: success on invalid input.
7067 continue
7068 else
7069   # Passes both tests.
7070 ac_preproc_ok=:
7071 break
7072 fi
7073 rm -f conftest.err conftest.i conftest.$ac_ext
7074
7075 done
7076 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7077 rm -f conftest.i conftest.err conftest.$ac_ext
7078 if $ac_preproc_ok; then :
7079
7080 else
7081   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7082 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7083 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7084 See \`config.log' for more details" "$LINENO" 5; }
7085 fi
7086
7087 ac_ext=c
7088 ac_cpp='$CPP $CPPFLAGS'
7089 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7090 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7091 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7092
7093
7094
7095
7096
7097
7098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for install dir and man conventions" >&5
7099 $as_echo_n "checking for install dir and man conventions... " >&6; }
7100
7101
7102 # Check whether --with-locfile was given.
7103 if test "${with_locfile+set}" = set; then :
7104   withval=$with_locfile;
7105 else
7106   with_locfile=no
7107
7108 fi
7109
7110
7111 (                                                                       \
7112     SENTINEL_DIR="$PWD" &&                                              \
7113     cd $srcdir/ &&                                                      \
7114     case "$with_locfile" in                                             \
7115      yes|no|'')                                                         \
7116         scripts/genLocInfo -d "$SENTINEL_DIR"                           \
7117         ;;                                                              \
7118      *)                                                                 \
7119         scripts/genLocInfo -d "$SENTINEL_DIR" -f "$with_locfile"        \
7120         ;;                                                              \
7121     esac                                                                \
7122 ) > genLocInfo.i 2> genLocInfo.err
7123 . ./genLocInfo.i
7124
7125 case "$GENLOCINFO" in
7126  OK)
7127     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENLOCINFOFILE" >&5
7128 $as_echo "in file $GENLOCINFOFILE" >&6; }
7129     rm genLocInfo.err genLocInfo.i
7130     ;;
7131  *)
7132     { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
7133 $as_echo "failed." >&6; }
7134     as_fn_error $? "Problem with genLocInfo!" "$LINENO" 5
7135     ;;
7136 esac
7137
7138  if test "$CALC_TICKADJ_MS" ; then
7139   WANT_CALC_TICKADJ_MS_TRUE=
7140   WANT_CALC_TICKADJ_MS_FALSE='#'
7141 else
7142   WANT_CALC_TICKADJ_MS_TRUE='#'
7143   WANT_CALC_TICKADJ_MS_FALSE=
7144 fi
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188  if test -z "$NTPSWEEP_NI" ; then
7189   INSTALL_NTPSWEEP_TRUE=
7190   INSTALL_NTPSWEEP_FALSE='#'
7191 else
7192   INSTALL_NTPSWEEP_TRUE='#'
7193   INSTALL_NTPSWEEP_FALSE=
7194 fi
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236  if test -z "$UPDATE_LEAP_NI" ; then
7237   INSTALL_UPDATE_LEAP_TRUE=
7238   INSTALL_UPDATE_LEAP_FALSE='#'
7239 else
7240   INSTALL_UPDATE_LEAP_TRUE='#'
7241   INSTALL_UPDATE_LEAP_FALSE=
7242 fi
7243
7244
7245
7246
7247 if test -n "$ac_tool_prefix"; then
7248   for ac_prog in ar lib "link -lib"
7249   do
7250     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7251 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7253 $as_echo_n "checking for $ac_word... " >&6; }
7254 if ${ac_cv_prog_AR+:} false; then :
7255   $as_echo_n "(cached) " >&6
7256 else
7257   if test -n "$AR"; then
7258   ac_cv_prog_AR="$AR" # Let the user override the test.
7259 else
7260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7261 for as_dir in $PATH
7262 do
7263   IFS=$as_save_IFS
7264   test -z "$as_dir" && as_dir=.
7265     for ac_exec_ext in '' $ac_executable_extensions; do
7266   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7267     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
7268     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7269     break 2
7270   fi
7271 done
7272   done
7273 IFS=$as_save_IFS
7274
7275 fi
7276 fi
7277 AR=$ac_cv_prog_AR
7278 if test -n "$AR"; then
7279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7280 $as_echo "$AR" >&6; }
7281 else
7282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7283 $as_echo "no" >&6; }
7284 fi
7285
7286
7287     test -n "$AR" && break
7288   done
7289 fi
7290 if test -z "$AR"; then
7291   ac_ct_AR=$AR
7292   for ac_prog in ar lib "link -lib"
7293 do
7294   # Extract the first word of "$ac_prog", so it can be a program name with args.
7295 set dummy $ac_prog; ac_word=$2
7296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7297 $as_echo_n "checking for $ac_word... " >&6; }
7298 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7299   $as_echo_n "(cached) " >&6
7300 else
7301   if test -n "$ac_ct_AR"; then
7302   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7303 else
7304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7305 for as_dir in $PATH
7306 do
7307   IFS=$as_save_IFS
7308   test -z "$as_dir" && as_dir=.
7309     for ac_exec_ext in '' $ac_executable_extensions; do
7310   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7311     ac_cv_prog_ac_ct_AR="$ac_prog"
7312     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7313     break 2
7314   fi
7315 done
7316   done
7317 IFS=$as_save_IFS
7318
7319 fi
7320 fi
7321 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7322 if test -n "$ac_ct_AR"; then
7323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7324 $as_echo "$ac_ct_AR" >&6; }
7325 else
7326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7327 $as_echo "no" >&6; }
7328 fi
7329
7330
7331   test -n "$ac_ct_AR" && break
7332 done
7333
7334   if test "x$ac_ct_AR" = x; then
7335     AR="false"
7336   else
7337     case $cross_compiling:$ac_tool_warned in
7338 yes:)
7339 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7340 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7341 ac_tool_warned=yes ;;
7342 esac
7343     AR=$ac_ct_AR
7344   fi
7345 fi
7346
7347 : ${AR=ar}
7348
7349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
7350 $as_echo_n "checking the archiver ($AR) interface... " >&6; }
7351 if ${am_cv_ar_interface+:} false; then :
7352   $as_echo_n "(cached) " >&6
7353 else
7354   ac_ext=c
7355 ac_cpp='$CPP $CPPFLAGS'
7356 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7357 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7358 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7359
7360    am_cv_ar_interface=ar
7361    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7362 /* end confdefs.h.  */
7363 int some_variable = 0;
7364 _ACEOF
7365 if ac_fn_c_try_compile "$LINENO"; then :
7366   am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
7367       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
7368   (eval $am_ar_try) 2>&5
7369   ac_status=$?
7370   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7371   test $ac_status = 0; }
7372       if test "$ac_status" -eq 0; then
7373         am_cv_ar_interface=ar
7374       else
7375         am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
7376         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
7377   (eval $am_ar_try) 2>&5
7378   ac_status=$?
7379   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7380   test $ac_status = 0; }
7381         if test "$ac_status" -eq 0; then
7382           am_cv_ar_interface=lib
7383         else
7384           am_cv_ar_interface=unknown
7385         fi
7386       fi
7387       rm -f conftest.lib libconftest.a
7388
7389 fi
7390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7391    ac_ext=c
7392 ac_cpp='$CPP $CPPFLAGS'
7393 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7394 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7395 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7396
7397 fi
7398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
7399 $as_echo "$am_cv_ar_interface" >&6; }
7400
7401 case $am_cv_ar_interface in
7402 ar)
7403   ;;
7404 lib)
7405   # Microsoft lib, so override with the ar-lib wrapper script.
7406   # FIXME: It is wrong to rewrite AR.
7407   # But if we don't then we get into trouble of one sort or another.
7408   # A longer-term fix would be to have automake use am__AR in this case,
7409   # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
7410   # similar.
7411   AR="$am_aux_dir/ar-lib $AR"
7412   ;;
7413 unknown)
7414   as_fn_error $? "could not determine $AR interface" "$LINENO" 5
7415   ;;
7416 esac
7417
7418
7419
7420
7421
7422 # Expose a cross-compilation indicator to makefiles
7423  if test $build != $host; then
7424   NTP_CROSSCOMPILE_TRUE=
7425   NTP_CROSSCOMPILE_FALSE='#'
7426 else
7427   NTP_CROSSCOMPILE_TRUE='#'
7428   NTP_CROSSCOMPILE_FALSE=
7429 fi
7430
7431
7432
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7434 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
7435 if ${ac_cv_path_SED+:} false; then :
7436   $as_echo_n "(cached) " >&6
7437 else
7438             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7439      for ac_i in 1 2 3 4 5 6 7; do
7440        ac_script="$ac_script$as_nl$ac_script"
7441      done
7442      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7443      { ac_script=; unset ac_script;}
7444      if test -z "$SED"; then
7445   ac_path_SED_found=false
7446   # Loop through the user's path and test for each of PROGNAME-LIST
7447   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7448 for as_dir in $PATH
7449 do
7450   IFS=$as_save_IFS
7451   test -z "$as_dir" && as_dir=.
7452     for ac_prog in sed gsed; do
7453     for ac_exec_ext in '' $ac_executable_extensions; do
7454       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
7455       as_fn_executable_p "$ac_path_SED" || continue
7456 # Check for GNU ac_path_SED and select it if it is found.
7457   # Check for GNU $ac_path_SED
7458 case `"$ac_path_SED" --version 2>&1` in
7459 *GNU*)
7460   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7461 *)
7462   ac_count=0
7463   $as_echo_n 0123456789 >"conftest.in"
7464   while :
7465   do
7466     cat "conftest.in" "conftest.in" >"conftest.tmp"
7467     mv "conftest.tmp" "conftest.in"
7468     cp "conftest.in" "conftest.nl"
7469     $as_echo '' >> "conftest.nl"
7470     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7471     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7472     as_fn_arith $ac_count + 1 && ac_count=$as_val
7473     if test $ac_count -gt ${ac_path_SED_max-0}; then
7474       # Best one so far, save it but keep looking for a better one
7475       ac_cv_path_SED="$ac_path_SED"
7476       ac_path_SED_max=$ac_count
7477     fi
7478     # 10*(2^10) chars as input seems more than enough
7479     test $ac_count -gt 10 && break
7480   done
7481   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7482 esac
7483
7484       $ac_path_SED_found && break 3
7485     done
7486   done
7487   done
7488 IFS=$as_save_IFS
7489   if test -z "$ac_cv_path_SED"; then
7490     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7491   fi
7492 else
7493   ac_cv_path_SED=$SED
7494 fi
7495
7496 fi
7497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7498 $as_echo "$ac_cv_path_SED" >&6; }
7499  SED="$ac_cv_path_SED"
7500   rm -f conftest.sed
7501
7502 test -z "$SED" && SED=sed
7503 Xsed="$SED -e 1s/^X//"
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7516 $as_echo_n "checking for fgrep... " >&6; }
7517 if ${ac_cv_path_FGREP+:} false; then :
7518   $as_echo_n "(cached) " >&6
7519 else
7520   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7521    then ac_cv_path_FGREP="$GREP -F"
7522    else
7523      if test -z "$FGREP"; then
7524   ac_path_FGREP_found=false
7525   # Loop through the user's path and test for each of PROGNAME-LIST
7526   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7527 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7528 do
7529   IFS=$as_save_IFS
7530   test -z "$as_dir" && as_dir=.
7531     for ac_prog in fgrep; do
7532     for ac_exec_ext in '' $ac_executable_extensions; do
7533       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
7534       as_fn_executable_p "$ac_path_FGREP" || continue
7535 # Check for GNU ac_path_FGREP and select it if it is found.
7536   # Check for GNU $ac_path_FGREP
7537 case `"$ac_path_FGREP" --version 2>&1` in
7538 *GNU*)
7539   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7540 *)
7541   ac_count=0
7542   $as_echo_n 0123456789 >"conftest.in"
7543   while :
7544   do
7545     cat "conftest.in" "conftest.in" >"conftest.tmp"
7546     mv "conftest.tmp" "conftest.in"
7547     cp "conftest.in" "conftest.nl"
7548     $as_echo 'FGREP' >> "conftest.nl"
7549     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7550     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7551     as_fn_arith $ac_count + 1 && ac_count=$as_val
7552     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7553       # Best one so far, save it but keep looking for a better one
7554       ac_cv_path_FGREP="$ac_path_FGREP"
7555       ac_path_FGREP_max=$ac_count
7556     fi
7557     # 10*(2^10) chars as input seems more than enough
7558     test $ac_count -gt 10 && break
7559   done
7560   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7561 esac
7562
7563       $ac_path_FGREP_found && break 3
7564     done
7565   done
7566   done
7567 IFS=$as_save_IFS
7568   if test -z "$ac_cv_path_FGREP"; then
7569     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7570   fi
7571 else
7572   ac_cv_path_FGREP=$FGREP
7573 fi
7574
7575    fi
7576 fi
7577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7578 $as_echo "$ac_cv_path_FGREP" >&6; }
7579  FGREP="$ac_cv_path_FGREP"
7580
7581
7582 test -z "$GREP" && GREP=grep
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7601 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7602 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7603
7604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7605 $as_echo_n "checking how to print strings... " >&6; }
7606 # Test print first, because it will be a builtin if present.
7607 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7608    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7609   ECHO='print -r --'
7610 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7611   ECHO='printf %s\n'
7612 else
7613   # Use this function as a fallback that always works.
7614   func_fallback_echo ()
7615   {
7616     eval 'cat <<_LTECHO_EOF
7617 $1
7618 _LTECHO_EOF'
7619   }
7620   ECHO='func_fallback_echo'
7621 fi
7622
7623 # func_echo_all arg...
7624 # Invoke $ECHO with all args, space-separated.
7625 func_echo_all ()
7626 {
7627     $ECHO ""
7628 }
7629
7630 case "$ECHO" in
7631   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
7632 $as_echo "printf" >&6; } ;;
7633   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
7634 $as_echo "print -r" >&6; } ;;
7635   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
7636 $as_echo "cat" >&6; } ;;
7637 esac
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7653 if test "x$ac_cv_type_pid_t" = xyes; then :
7654
7655 else
7656
7657 cat >>confdefs.h <<_ACEOF
7658 #define pid_t int
7659 _ACEOF
7660
7661 fi
7662
7663 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7664 if test "x$ac_cv_type_size_t" = xyes; then :
7665
7666 else
7667
7668 cat >>confdefs.h <<_ACEOF
7669 #define size_t unsigned int
7670 _ACEOF
7671
7672 fi
7673
7674
7675             # Check whether --enable-c99-snprintf was given.
7676 if test "${enable_c99_snprintf+set}" = set; then :
7677   enableval=$enable_c99_snprintf; force_c99_snprintf=$enableval
7678 else
7679   force_c99_snprintf=no
7680
7681 fi
7682
7683     case "$force_c99_snprintf" in
7684      yes)
7685         hw_force_rpl_snprintf=yes
7686         hw_force_rpl_vsnprintf=yes
7687     esac
7688
7689
7690
7691
7692
7693
7694   for ac_header in $ac_header_list
7695 do :
7696   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7697 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7698 "
7699 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7700   cat >>confdefs.h <<_ACEOF
7701 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7702 _ACEOF
7703
7704 fi
7705
7706 done
7707
7708
7709
7710
7711
7712
7713
7714   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7715 $as_echo_n "checking for unsigned long long int... " >&6; }
7716 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
7717   $as_echo_n "(cached) " >&6
7718 else
7719   ac_cv_type_unsigned_long_long_int=yes
7720      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7721        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7722 /* end confdefs.h.  */
7723
7724   /* For now, do not test the preprocessor; as of 2007 there are too many
7725          implementations with broken preprocessors.  Perhaps this can
7726          be revisited in 2012.  In the meantime, code should not expect
7727          #if to work with literals wider than 32 bits.  */
7728       /* Test literals.  */
7729       long long int ll = 9223372036854775807ll;
7730       long long int nll = -9223372036854775807LL;
7731       unsigned long long int ull = 18446744073709551615ULL;
7732       /* Test constant expressions.   */
7733       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
7734                      ? 1 : -1)];
7735       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
7736                      ? 1 : -1)];
7737       int i = 63;
7738 int
7739 main ()
7740 {
7741 /* Test availability of runtime routines for shift and division.  */
7742       long long int llmax = 9223372036854775807ll;
7743       unsigned long long int ullmax = 18446744073709551615ull;
7744       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
7745               | (llmax / ll) | (llmax % ll)
7746               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
7747               | (ullmax / ull) | (ullmax % ull));
7748   ;
7749   return 0;
7750 }
7751
7752 _ACEOF
7753 if ac_fn_c_try_link "$LINENO"; then :
7754
7755 else
7756   ac_cv_type_unsigned_long_long_int=no
7757 fi
7758 rm -f core conftest.err conftest.$ac_objext \
7759     conftest$ac_exeext conftest.$ac_ext
7760      fi
7761 fi
7762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
7763 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
7764   if test $ac_cv_type_unsigned_long_long_int = yes; then
7765
7766 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
7767
7768   fi
7769
7770
7771       ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
7772 if test "x$ac_cv_func_vsnprintf" = xyes; then :
7773   hw_cv_func_vsnprintf=yes
7774 else
7775   hw_cv_func_vsnprintf=no
7776 fi
7777
7778   if test "$hw_cv_func_vsnprintf" = yes; then :
7779   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
7780 $as_echo_n "checking whether vsnprintf is C99 compliant... " >&6; }
7781 if ${hw_cv_func_vsnprintf_c99+:} false; then :
7782   $as_echo_n "(cached) " >&6
7783 else
7784   if test "$cross_compiling" = yes; then :
7785   hw_cv_func_vsnprintf_c99=no
7786 else
7787   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7788 /* end confdefs.h.  */
7789 #if HAVE_STDARG_H
7790           #include <stdarg.h>
7791           #endif
7792           #include <stdio.h>
7793           static int testprintf(char *buf, size_t size, const char *format, ...)
7794           {
7795             int result;
7796             va_list ap;
7797             va_start(ap, format);
7798             result = vsnprintf(buf, size, format, ap);
7799             va_end(ap);
7800             return result;
7801           }
7802 int
7803 main ()
7804 {
7805 char buf[43];
7806           if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
7807               testprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
7808               buf[0] != 'T' || buf[3] != '\0')
7809             return 1;
7810   ;
7811   return 0;
7812 }
7813 _ACEOF
7814 if ac_fn_c_try_run "$LINENO"; then :
7815   hw_cv_func_vsnprintf_c99=yes
7816 else
7817   hw_cv_func_vsnprintf_c99=no
7818 fi
7819 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7820   conftest.$ac_objext conftest.beam conftest.$ac_ext
7821 fi
7822
7823 fi
7824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
7825 $as_echo "$hw_cv_func_vsnprintf_c99" >&6; }
7826 else
7827   hw_cv_func_vsnprintf_c99=no
7828 fi
7829
7830 $as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
7831
7832   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement vsnprintf will be used" >&5
7833 $as_echo_n "checking if C99-snprintf replacement vsnprintf will be used... " >&6; }
7834   if test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no; then :
7835   hw_use_rpl_vsnprintf=yes
7836 else
7837   hw_use_rpl_vsnprintf=no
7838 fi
7839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_vsnprintf" >&5
7840 $as_echo "$hw_use_rpl_vsnprintf" >&6; }
7841   if test "$hw_use_rpl_vsnprintf" = yes; then :
7842
7843 $as_echo "#define HW_WANT_RPL_VSNPRINTF 1" >>confdefs.h
7844
7845     if test ${hw_nodef_vsnprintf=no} = no; then :
7846
7847 $as_echo "#define vsnprintf rpl_vsnprintf" >>confdefs.h
7848
7849 fi
7850     for ac_header in inttypes.h locale.h stddef.h stdint.h
7851 do :
7852   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7853 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7854 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7855   cat >>confdefs.h <<_ACEOF
7856 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7857 _ACEOF
7858
7859 fi
7860
7861 done
7862
7863     ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
7864 "
7865 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
7866
7867 cat >>confdefs.h <<_ACEOF
7868 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
7869 _ACEOF
7870
7871
7872 fi
7873 ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include <locale.h>
7874 "
7875 if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes; then :
7876
7877 cat >>confdefs.h <<_ACEOF
7878 #define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1
7879 _ACEOF
7880
7881
7882 fi
7883
7884
7885   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
7886 $as_echo_n "checking for long double... " >&6; }
7887 if ${ac_cv_type_long_double+:} false; then :
7888   $as_echo_n "(cached) " >&6
7889 else
7890   if test "$GCC" = yes; then
7891        ac_cv_type_long_double=yes
7892      else
7893        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7894 /* end confdefs.h.  */
7895 /* The Stardent Vistra knows sizeof (long double), but does
7896                  not support it.  */
7897               long double foo = 0.0L;
7898 int
7899 main ()
7900 {
7901 static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
7902               sizeof (double) <= sizeof (long double))];
7903 test_array [0] = 0;
7904 return test_array [0];
7905
7906   ;
7907   return 0;
7908 }
7909 _ACEOF
7910 if ac_fn_c_try_compile "$LINENO"; then :
7911   ac_cv_type_long_double=yes
7912 else
7913   ac_cv_type_long_double=no
7914 fi
7915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7916      fi
7917 fi
7918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
7919 $as_echo "$ac_cv_type_long_double" >&6; }
7920   if test $ac_cv_type_long_double = yes; then
7921
7922 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
7923
7924   fi
7925
7926
7927
7928   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
7929 $as_echo_n "checking for long long int... " >&6; }
7930 if ${ac_cv_type_long_long_int+:} false; then :
7931   $as_echo_n "(cached) " >&6
7932 else
7933   ac_cv_type_long_long_int=yes
7934       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7935         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
7936         if test $ac_cv_type_long_long_int = yes; then
7937                                   if test "$cross_compiling" = yes; then :
7938   :
7939 else
7940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7941 /* end confdefs.h.  */
7942 #include <limits.h>
7943                  #ifndef LLONG_MAX
7944                  # define HALF \
7945                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
7946                  # define LLONG_MAX (HALF - 1 + HALF)
7947                  #endif
7948 int
7949 main ()
7950 {
7951 long long int n = 1;
7952                  int i;
7953                  for (i = 0; ; i++)
7954                    {
7955                      long long int m = n << i;
7956                      if (m >> i != n)
7957                        return 1;
7958                      if (LLONG_MAX / 2 < m)
7959                        break;
7960                    }
7961                  return 0;
7962   ;
7963   return 0;
7964 }
7965 _ACEOF
7966 if ac_fn_c_try_run "$LINENO"; then :
7967
7968 else
7969   ac_cv_type_long_long_int=no
7970 fi
7971 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7972   conftest.$ac_objext conftest.beam conftest.$ac_ext
7973 fi
7974
7975         fi
7976       fi
7977 fi
7978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
7979 $as_echo "$ac_cv_type_long_long_int" >&6; }
7980   if test $ac_cv_type_long_long_int = yes; then
7981
7982 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
7983
7984   fi
7985
7986
7987   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7988 $as_echo_n "checking for unsigned long long int... " >&6; }
7989 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
7990   $as_echo_n "(cached) " >&6
7991 else
7992   ac_cv_type_unsigned_long_long_int=yes
7993      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7994        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7995 /* end confdefs.h.  */
7996
7997   /* For now, do not test the preprocessor; as of 2007 there are too many
7998          implementations with broken preprocessors.  Perhaps this can
7999          be revisited in 2012.  In the meantime, code should not expect
8000          #if to work with literals wider than 32 bits.  */
8001       /* Test literals.  */
8002       long long int ll = 9223372036854775807ll;
8003       long long int nll = -9223372036854775807LL;
8004       unsigned long long int ull = 18446744073709551615ULL;
8005       /* Test constant expressions.   */
8006       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
8007                      ? 1 : -1)];
8008       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
8009                      ? 1 : -1)];
8010       int i = 63;
8011 int
8012 main ()
8013 {
8014 /* Test availability of runtime routines for shift and division.  */
8015       long long int llmax = 9223372036854775807ll;
8016       unsigned long long int ullmax = 18446744073709551615ull;
8017       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
8018               | (llmax / ll) | (llmax % ll)
8019               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
8020               | (ullmax / ull) | (ullmax % ull));
8021   ;
8022   return 0;
8023 }
8024
8025 _ACEOF
8026 if ac_fn_c_try_link "$LINENO"; then :
8027
8028 else
8029   ac_cv_type_unsigned_long_long_int=no
8030 fi
8031 rm -f core conftest.err conftest.$ac_objext \
8032     conftest$ac_exeext conftest.$ac_ext
8033      fi
8034 fi
8035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
8036 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
8037   if test $ac_cv_type_unsigned_long_long_int = yes; then
8038
8039 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8040
8041   fi
8042
8043     ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
8044 if test "x$ac_cv_type_size_t" = xyes; then :
8045
8046 else
8047
8048 cat >>confdefs.h <<_ACEOF
8049 #define size_t unsigned int
8050 _ACEOF
8051
8052 fi
8053
8054
8055
8056   ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
8057 if test "x$ac_cv_type_intmax_t" = xyes; then :
8058
8059 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
8060
8061 else
8062   test $ac_cv_type_long_long_int = yes \
8063        && ac_type='long long int' \
8064        || ac_type='long int'
8065
8066 cat >>confdefs.h <<_ACEOF
8067 #define intmax_t $ac_type
8068 _ACEOF
8069
8070 fi
8071
8072
8073
8074
8075   ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
8076 if test "x$ac_cv_type_uintmax_t" = xyes; then :
8077
8078 $as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
8079
8080 else
8081   test $ac_cv_type_unsigned_long_long_int = yes \
8082        && ac_type='unsigned long long int' \
8083        || ac_type='unsigned long int'
8084
8085 cat >>confdefs.h <<_ACEOF
8086 #define uintmax_t $ac_type
8087 _ACEOF
8088
8089 fi
8090
8091
8092
8093   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
8094 if test "x$ac_cv_type_uintptr_t" = xyes; then :
8095
8096 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
8097
8098 else
8099   for ac_type in 'unsigned int' 'unsigned long int' \
8100         'unsigned long long int'; do
8101        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8102 /* end confdefs.h.  */
8103 $ac_includes_default
8104 int
8105 main ()
8106 {
8107 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
8108 test_array [0] = 0;
8109 return test_array [0];
8110
8111   ;
8112   return 0;
8113 }
8114 _ACEOF
8115 if ac_fn_c_try_compile "$LINENO"; then :
8116
8117 cat >>confdefs.h <<_ACEOF
8118 #define uintptr_t $ac_type
8119 _ACEOF
8120
8121           ac_type=
8122 fi
8123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8124        test -z "$ac_type" && break
8125      done
8126 fi
8127
8128
8129     ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
8130 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
8131
8132 cat >>confdefs.h <<_ACEOF
8133 #define HAVE_PTRDIFF_T 1
8134 _ACEOF
8135
8136
8137 fi
8138
8139     for ac_func in localeconv
8140 do :
8141   ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
8142 if test "x$ac_cv_func_localeconv" = xyes; then :
8143   cat >>confdefs.h <<_ACEOF
8144 #define HAVE_LOCALECONV 1
8145 _ACEOF
8146
8147 fi
8148 done
8149
8150
8151   if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
8152   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
8153 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
8154 if ${ac_cv_c_const+:} false; then :
8155   $as_echo_n "(cached) " >&6
8156 else
8157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8158 /* end confdefs.h.  */
8159
8160 int
8161 main ()
8162 {
8163
8164 #ifndef __cplusplus
8165   /* Ultrix mips cc rejects this sort of thing.  */
8166   typedef int charset[2];
8167   const charset cs = { 0, 0 };
8168   /* SunOS 4.1.1 cc rejects this.  */
8169   char const *const *pcpcc;
8170   char **ppc;
8171   /* NEC SVR4.0.2 mips cc rejects this.  */
8172   struct point {int x, y;};
8173   static struct point const zero = {0,0};
8174   /* AIX XL C 1.02.0.0 rejects this.
8175      It does not let you subtract one const X* pointer from another in
8176      an arm of an if-expression whose if-part is not a constant
8177      expression */
8178   const char *g = "string";
8179   pcpcc = &g + (g ? g-g : 0);
8180   /* HPUX 7.0 cc rejects these. */
8181   ++pcpcc;
8182   ppc = (char**) pcpcc;
8183   pcpcc = (char const *const *) ppc;
8184   { /* SCO 3.2v4 cc rejects this sort of thing.  */
8185     char tx;
8186     char *t = &tx;
8187     char const *s = 0 ? (char *) 0 : (char const *) 0;
8188
8189     *t++ = 0;
8190     if (s) return 0;
8191   }
8192   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
8193     int x[] = {25, 17};
8194     const int *foo = &x[0];
8195     ++foo;
8196   }
8197   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8198     typedef const int *iptr;
8199     iptr p = 0;
8200     ++p;
8201   }
8202   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
8203        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8204     struct s { int j; const int *ap[3]; } bx;
8205     struct s *b = &bx; b->j = 5;
8206   }
8207   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8208     const int foo = 10;
8209     if (!foo) return 0;
8210   }
8211   return !cs[0] && !zero.x;
8212 #endif
8213
8214   ;
8215   return 0;
8216 }
8217 _ACEOF
8218 if ac_fn_c_try_compile "$LINENO"; then :
8219   ac_cv_c_const=yes
8220 else
8221   ac_cv_c_const=no
8222 fi
8223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8224 fi
8225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
8226 $as_echo "$ac_cv_c_const" >&6; }
8227 if test $ac_cv_c_const = no; then
8228
8229 $as_echo "#define const /**/" >>confdefs.h
8230
8231 fi
8232
8233
8234
8235
8236     case " $LIBOBJS " in
8237   *" snprintf.$ac_objext "* ) ;;
8238   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
8239  ;;
8240 esac
8241
8242     _hw_cv_func_xprintf_replace_done=yes
8243 fi
8244
8245 fi
8246
8247
8248     ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
8249 if test "x$ac_cv_func_snprintf" = xyes; then :
8250   hw_cv_func_snprintf=yes
8251 else
8252   hw_cv_func_snprintf=no
8253 fi
8254
8255   if test "$hw_cv_func_snprintf" = yes; then :
8256   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
8257 $as_echo_n "checking whether snprintf is C99 compliant... " >&6; }
8258 if ${hw_cv_func_snprintf_c99+:} false; then :
8259   $as_echo_n "(cached) " >&6
8260 else
8261   if test "$cross_compiling" = yes; then :
8262   hw_cv_func_snprintf_c99=no
8263 else
8264   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8265 /* end confdefs.h.  */
8266 #include <stdio.h>
8267 int
8268 main ()
8269 {
8270 char buf[43];
8271           if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
8272               snprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
8273               buf[0] != 'T' || buf[3] != '\0')
8274             return 1;
8275   ;
8276   return 0;
8277 }
8278 _ACEOF
8279 if ac_fn_c_try_run "$LINENO"; then :
8280   hw_cv_func_snprintf_c99=yes
8281 else
8282   hw_cv_func_snprintf_c99=no
8283 fi
8284 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8285   conftest.$ac_objext conftest.beam conftest.$ac_ext
8286 fi
8287
8288 fi
8289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
8290 $as_echo "$hw_cv_func_snprintf_c99" >&6; }
8291 else
8292   hw_cv_func_snprintf_c99=no
8293 fi
8294
8295 $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
8296
8297   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement snprintf will be used" >&5
8298 $as_echo_n "checking if C99-snprintf replacement snprintf will be used... " >&6; }
8299   if test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no; then :
8300   hw_use_rpl_snprintf=yes
8301 else
8302   hw_use_rpl_snprintf=no
8303 fi
8304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_snprintf" >&5
8305 $as_echo "$hw_use_rpl_snprintf" >&6; }
8306   if test "$hw_use_rpl_snprintf" = yes; then :
8307
8308 $as_echo "#define HW_WANT_RPL_SNPRINTF 1" >>confdefs.h
8309
8310     if test ${hw_nodef_snprintf=no} = no; then :
8311
8312 $as_echo "#define snprintf rpl_snprintf" >>confdefs.h
8313
8314 fi
8315
8316   if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
8317   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
8318 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
8319 if ${ac_cv_c_const+:} false; then :
8320   $as_echo_n "(cached) " >&6
8321 else
8322   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8323 /* end confdefs.h.  */
8324
8325 int
8326 main ()
8327 {
8328
8329 #ifndef __cplusplus
8330   /* Ultrix mips cc rejects this sort of thing.  */
8331   typedef int charset[2];
8332   const charset cs = { 0, 0 };
8333   /* SunOS 4.1.1 cc rejects this.  */
8334   char const *const *pcpcc;
8335   char **ppc;
8336   /* NEC SVR4.0.2 mips cc rejects this.  */
8337   struct point {int x, y;};
8338   static struct point const zero = {0,0};
8339   /* AIX XL C 1.02.0.0 rejects this.
8340      It does not let you subtract one const X* pointer from another in
8341      an arm of an if-expression whose if-part is not a constant
8342      expression */
8343   const char *g = "string";
8344   pcpcc = &g + (g ? g-g : 0);
8345   /* HPUX 7.0 cc rejects these. */
8346   ++pcpcc;
8347   ppc = (char**) pcpcc;
8348   pcpcc = (char const *const *) ppc;
8349   { /* SCO 3.2v4 cc rejects this sort of thing.  */
8350     char tx;
8351     char *t = &tx;
8352     char const *s = 0 ? (char *) 0 : (char const *) 0;
8353
8354     *t++ = 0;
8355     if (s) return 0;
8356   }
8357   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
8358     int x[] = {25, 17};
8359     const int *foo = &x[0];
8360     ++foo;
8361   }
8362   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8363     typedef const int *iptr;
8364     iptr p = 0;
8365     ++p;
8366   }
8367   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
8368        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8369     struct s { int j; const int *ap[3]; } bx;
8370     struct s *b = &bx; b->j = 5;
8371   }
8372   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8373     const int foo = 10;
8374     if (!foo) return 0;
8375   }
8376   return !cs[0] && !zero.x;
8377 #endif
8378
8379   ;
8380   return 0;
8381 }
8382 _ACEOF
8383 if ac_fn_c_try_compile "$LINENO"; then :
8384   ac_cv_c_const=yes
8385 else
8386   ac_cv_c_const=no
8387 fi
8388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8389 fi
8390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
8391 $as_echo "$ac_cv_c_const" >&6; }
8392 if test $ac_cv_c_const = no; then
8393
8394 $as_echo "#define const /**/" >>confdefs.h
8395
8396 fi
8397
8398
8399
8400
8401     case " $LIBOBJS " in
8402   *" snprintf.$ac_objext "* ) ;;
8403   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
8404  ;;
8405 esac
8406
8407     _hw_cv_func_xprintf_replace_done=yes
8408 fi
8409
8410 fi
8411
8412
8413
8414
8415
8416 # HMS: Save $LIBS and empty it.
8417 # any LIBS we add here should go in to LDADD_LIBNTP
8418
8419 __LIBS=$LIBS
8420 LIBS=
8421
8422
8423
8424 # [Bug 2332] because we need to know if we are using GNU ld...
8425
8426
8427 # Check whether --with-gnu-ld was given.
8428 if test "${with_gnu_ld+set}" = set; then :
8429   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8430 else
8431   with_gnu_ld=no
8432 fi
8433
8434 ac_prog=ld
8435 if test "$GCC" = yes; then
8436   # Check if gcc -print-prog-name=ld gives a path.
8437   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8438 $as_echo_n "checking for ld used by $CC... " >&6; }
8439   case $host in
8440   *-*-mingw*)
8441     # gcc leaves a trailing carriage return which upsets mingw
8442     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8443   *)
8444     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8445   esac
8446   case $ac_prog in
8447     # Accept absolute paths.
8448     [\\/]* | ?:[\\/]*)
8449       re_direlt='/[^/][^/]*/\.\./'
8450       # Canonicalize the pathname of ld
8451       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
8452       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
8453         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
8454       done
8455       test -z "$LD" && LD="$ac_prog"
8456       ;;
8457   "")
8458     # If it fails, then pretend we aren't using GCC.
8459     ac_prog=ld
8460     ;;
8461   *)
8462     # If it is relative, then search for the first ld in PATH.
8463     with_gnu_ld=unknown
8464     ;;
8465   esac
8466 elif test "$with_gnu_ld" = yes; then
8467   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8468 $as_echo_n "checking for GNU ld... " >&6; }
8469 else
8470   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8471 $as_echo_n "checking for non-GNU ld... " >&6; }
8472 fi
8473 if ${lt_cv_path_LD+:} false; then :
8474   $as_echo_n "(cached) " >&6
8475 else
8476   if test -z "$LD"; then
8477   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8478   for ac_dir in $PATH; do
8479     IFS="$lt_save_ifs"
8480     test -z "$ac_dir" && ac_dir=.
8481     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8482       lt_cv_path_LD="$ac_dir/$ac_prog"
8483       # Check to see if the program is GNU ld.  I'd rather use --version,
8484       # but apparently some variants of GNU ld only accept -v.
8485       # Break only if it was the GNU/non-GNU ld that we prefer.
8486       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
8487       *GNU* | *'with BFD'*)
8488         test "$with_gnu_ld" != no && break
8489         ;;
8490       *)
8491         test "$with_gnu_ld" != yes && break
8492         ;;
8493       esac
8494     fi
8495   done
8496   IFS="$lt_save_ifs"
8497 else
8498   lt_cv_path_LD="$LD" # Let the user override the test with a path.
8499 fi
8500 fi
8501
8502 LD="$lt_cv_path_LD"
8503 if test -n "$LD"; then
8504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8505 $as_echo "$LD" >&6; }
8506 else
8507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8508 $as_echo "no" >&6; }
8509 fi
8510 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8512 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8513 if ${lt_cv_prog_gnu_ld+:} false; then :
8514   $as_echo_n "(cached) " >&6
8515 else
8516   # I'd rather use --version here, but apparently some GNU lds only accept -v.
8517 case `$LD -v 2>&1 </dev/null` in
8518 *GNU* | *'with BFD'*)
8519   lt_cv_prog_gnu_ld=yes
8520   ;;
8521 *)
8522   lt_cv_prog_gnu_ld=no
8523   ;;
8524 esac
8525 fi
8526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
8527 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
8528 with_gnu_ld=$lt_cv_prog_gnu_ld
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
8541 $as_echo_n "checking for directory path separator... " >&6; }
8542 if ${ntp_cv_dir_sep+:} false; then :
8543   $as_echo_n "(cached) " >&6
8544 else
8545
8546         case "$ntp_cv_dir_sep" in
8547          '')
8548             case "$host_os" in
8549              *djgpp | *mingw32* | *emx*)
8550                 ntp_cv_dir_sep="'\\'"
8551                 ;;
8552              *)
8553                 ntp_cv_dir_sep="'/'"
8554                 ;;
8555             esac
8556         esac
8557
8558
8559 fi
8560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
8561 $as_echo "$ntp_cv_dir_sep" >&6; }
8562
8563 cat >>confdefs.h <<_ACEOF
8564 #define DIR_SEP $ntp_cv_dir_sep
8565 _ACEOF
8566
8567
8568
8569     NTP_ORIG_LIBS="$LIBS"
8570
8571 # Check whether --with-lineeditlibs was given.
8572 if test "${with_lineeditlibs+set}" = set; then :
8573   withval=$with_lineeditlibs; use_lineeditlibs="$withval"
8574 else
8575   use_lineeditlibs="edit,editline"
8576
8577 fi
8578
8579     { $as_echo "$as_me:${as_lineno-$LINENO}: checking line editing libraries" >&5
8580 $as_echo_n "checking line editing libraries... " >&6; }
8581     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_lineeditlibs" >&5
8582 $as_echo "$use_lineeditlibs" >&6; }
8583     case "$use_lineeditlibs" in
8584      no)
8585         ntp_lib_lineedit=no
8586         ;;
8587      *)
8588         for lineedit_lib in `echo $use_lineeditlibs | sed -e 's/,/ /'`; do
8589             for term_lib in "" termcap curses ncurses; do
8590                 case "$term_lib" in
8591                  '')
8592                     TRY_LIB="-l$lineedit_lib"
8593                     ;;
8594                  *)
8595                     TRY_LIB="-l$lineedit_lib -l$term_lib"
8596                     ;;
8597                 esac
8598                 LIBS="$NTP_ORIG_LIBS $TRY_LIB"
8599                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline() with $TRY_LIB" >&5
8600 $as_echo_n "checking for readline() with $TRY_LIB... " >&6; }
8601                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8602 /* end confdefs.h.  */
8603
8604 /* Override any GCC internal prototype to avoid an error.
8605    Use char because int might match the return type of a GCC
8606    builtin and then its argument prototype would still apply.  */
8607 #ifdef __cplusplus
8608 extern "C"
8609 #endif
8610 char readline ();
8611 int
8612 main ()
8613 {
8614 return readline ();
8615   ;
8616   return 0;
8617 }
8618 _ACEOF
8619 if ac_fn_c_try_link "$LINENO"; then :
8620   ntp_lib_lineedit="$TRY_LIB"
8621 fi
8622 rm -f core conftest.err conftest.$ac_objext \
8623     conftest$ac_exeext conftest.$ac_ext
8624                 case "$ntp_lib_lineedit" in
8625                  '')
8626                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8627 $as_echo "no" >&6; }
8628                     ;;
8629                  *)
8630                     # Use readline()
8631                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8632 $as_echo "yes" >&6; }
8633                     break
8634                 esac
8635                 case "$term_lib" in
8636                  '')
8637                     # do not try el_gets without a terminal library
8638                     ;;
8639                  *)
8640                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_gets() with $TRY_LIB" >&5
8641 $as_echo_n "checking for el_gets() with $TRY_LIB... " >&6; }
8642                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8643 /* end confdefs.h.  */
8644
8645 /* Override any GCC internal prototype to avoid an error.
8646    Use char because int might match the return type of a GCC
8647    builtin and then its argument prototype would still apply.  */
8648 #ifdef __cplusplus
8649 extern "C"
8650 #endif
8651 char el_gets ();
8652 int
8653 main ()
8654 {
8655 return el_gets ();
8656   ;
8657   return 0;
8658 }
8659 _ACEOF
8660 if ac_fn_c_try_link "$LINENO"; then :
8661   ntp_lib_lineedit="$TRY_LIB"
8662 fi
8663 rm -f core conftest.err conftest.$ac_objext \
8664     conftest$ac_exeext conftest.$ac_ext
8665                     case "$ntp_lib_lineedit" in
8666                      '')
8667                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8668 $as_echo "no" >&6; }
8669                         ;;
8670                      *) # Use el_gets()
8671                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8672 $as_echo "yes" >&6; }
8673                         break
8674                         ;;
8675                     esac        # $ntp_lib_lineedit
8676                 esac            # $term_lib
8677             done
8678             case "$ntp_lib_lineedit" in
8679              '')
8680                 ;;
8681              *)
8682                 break
8683                 ;;
8684             esac
8685         done
8686         LIBS="$NTP_ORIG_LIBS"
8687         ;;
8688     esac        # $use_lineeditlibs
8689
8690     case "$ntp_lib_lineedit" in
8691      '')
8692         ntp_lib_lineedit="no"
8693         ;;
8694      no)
8695         ;;
8696      *)
8697         EDITLINE_LIBS="$ntp_lib_lineedit"
8698
8699         ;;
8700     esac        # $ntp_lib_lineedit
8701
8702     case "$ntp_lib_lineedit" in
8703      no)
8704         ;;
8705      *)
8706         for ac_header in readline.h readline/readline.h histedit.h
8707 do :
8708   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8709 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8710 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8711   cat >>confdefs.h <<_ACEOF
8712 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8713 _ACEOF
8714
8715 fi
8716
8717 done
8718
8719         for ac_header in history.h readline/history.h
8720 do :
8721   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8722 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8723 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8724   cat >>confdefs.h <<_ACEOF
8725 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8726 _ACEOF
8727
8728 fi
8729
8730 done
8731
8732
8733         case "$ac_cv_header_histedit_h" in
8734          yes)
8735             { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to el_init()" >&5
8736 $as_echo_n "checking number of arguments to el_init()... " >&6; }
8737 if ${ntp_cv_el_init_args+:} false; then :
8738   $as_echo_n "(cached) " >&6
8739 else
8740   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8741 /* end confdefs.h.  */
8742
8743                             #include <stdio.h>
8744                             #include <histedit.h>
8745
8746 int
8747 main ()
8748 {
8749
8750                             el_init("conftest", stdin, stdout, stderr);
8751
8752
8753   ;
8754   return 0;
8755 }
8756 _ACEOF
8757 if ac_fn_c_try_compile "$LINENO"; then :
8758   ntp_cv_el_init_args=4
8759 else
8760   ntp_cv_el_init_args=3
8761
8762 fi
8763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8764
8765 fi
8766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_el_init_args" >&5
8767 $as_echo "$ntp_cv_el_init_args" >&6; }
8768
8769 cat >>confdefs.h <<_ACEOF
8770 #define EL_INIT_ARGS $ntp_cv_el_init_args
8771 _ACEOF
8772
8773         esac
8774
8775         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
8776 $as_echo_n "checking whether readline supports history... " >&6; }
8777
8778         ntp_lib_lineedit_history="no"
8779         ORIG_LIBS="$LIBS"
8780         LIBS="$ORIG_LIBS $ntp_lib_lineedit"
8781         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8782 /* end confdefs.h.  */
8783
8784 /* Override any GCC internal prototype to avoid an error.
8785    Use char because int might match the return type of a GCC
8786    builtin and then its argument prototype would still apply.  */
8787 #ifdef __cplusplus
8788 extern "C"
8789 #endif
8790 char add_history ();
8791 int
8792 main ()
8793 {
8794 return add_history ();
8795   ;
8796   return 0;
8797 }
8798 _ACEOF
8799 if ac_fn_c_try_link "$LINENO"; then :
8800   ntp_lib_lineedit_history="yes"
8801 fi
8802 rm -f core conftest.err conftest.$ac_objext \
8803     conftest$ac_exeext conftest.$ac_ext
8804         LIBS="$ORIG_LIBS"
8805
8806         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_lib_lineedit_history" >&5
8807 $as_echo "$ntp_lib_lineedit_history" >&6; }
8808
8809         case "$ntp_lib_lineedit_history" in
8810          yes)
8811
8812 $as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
8813
8814         esac
8815     esac        # $ntp_lib_lineedit
8816     { NTP_ORIG_LIBS=; unset NTP_ORIG_LIBS;}
8817     { ORIG_LIBS=; unset ORIG_LIBS;}
8818     { TRY_LIB=; unset TRY_LIB;}
8819     { use_lineeditlibs=; unset use_lineeditlibs;}
8820
8821
8822 LIBM=
8823 case "$host" in
8824  *-*-darwin*)
8825     ;;
8826  *)
8827     _libs=$LIBS
8828     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
8829 $as_echo_n "checking for library containing cos... " >&6; }
8830 if ${ac_cv_search_cos+:} false; then :
8831   $as_echo_n "(cached) " >&6
8832 else
8833   ac_func_search_save_LIBS=$LIBS
8834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8835 /* end confdefs.h.  */
8836
8837 /* Override any GCC internal prototype to avoid an error.
8838    Use char because int might match the return type of a GCC
8839    builtin and then its argument prototype would still apply.  */
8840 #ifdef __cplusplus
8841 extern "C"
8842 #endif
8843 char cos ();
8844 int
8845 main ()
8846 {
8847 return cos ();
8848   ;
8849   return 0;
8850 }
8851 _ACEOF
8852 for ac_lib in '' m; do
8853   if test -z "$ac_lib"; then
8854     ac_res="none required"
8855   else
8856     ac_res=-l$ac_lib
8857     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8858   fi
8859   if ac_fn_c_try_link "$LINENO"; then :
8860   ac_cv_search_cos=$ac_res
8861 fi
8862 rm -f core conftest.err conftest.$ac_objext \
8863     conftest$ac_exeext
8864   if ${ac_cv_search_cos+:} false; then :
8865   break
8866 fi
8867 done
8868 if ${ac_cv_search_cos+:} false; then :
8869
8870 else
8871   ac_cv_search_cos=no
8872 fi
8873 rm conftest.$ac_ext
8874 LIBS=$ac_func_search_save_LIBS
8875 fi
8876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
8877 $as_echo "$ac_cv_search_cos" >&6; }
8878 ac_res=$ac_cv_search_cos
8879 if test "$ac_res" != no; then :
8880   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8881   LIBM="-lm"
8882 fi
8883
8884     LIBS=$_libs
8885     ;;
8886 esac
8887
8888 { _libs=; unset _libs;}
8889
8890
8891 for ac_header in vfork.h
8892 do :
8893   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
8894 if test "x$ac_cv_header_vfork_h" = xyes; then :
8895   cat >>confdefs.h <<_ACEOF
8896 #define HAVE_VFORK_H 1
8897 _ACEOF
8898
8899 fi
8900
8901 done
8902
8903 for ac_func in fork vfork
8904 do :
8905   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8906 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8907 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8908   cat >>confdefs.h <<_ACEOF
8909 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8910 _ACEOF
8911
8912 fi
8913 done
8914
8915 if test "x$ac_cv_func_fork" = xyes; then
8916   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
8917 $as_echo_n "checking for working fork... " >&6; }
8918 if ${ac_cv_func_fork_works+:} false; then :
8919   $as_echo_n "(cached) " >&6
8920 else
8921   if test "$cross_compiling" = yes; then :
8922   ac_cv_func_fork_works=cross
8923 else
8924   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8925 /* end confdefs.h.  */
8926 $ac_includes_default
8927 int
8928 main ()
8929 {
8930
8931           /* By Ruediger Kuhlmann. */
8932           return fork () < 0;
8933
8934   ;
8935   return 0;
8936 }
8937 _ACEOF
8938 if ac_fn_c_try_run "$LINENO"; then :
8939   ac_cv_func_fork_works=yes
8940 else
8941   ac_cv_func_fork_works=no
8942 fi
8943 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8944   conftest.$ac_objext conftest.beam conftest.$ac_ext
8945 fi
8946
8947 fi
8948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
8949 $as_echo "$ac_cv_func_fork_works" >&6; }
8950
8951 else
8952   ac_cv_func_fork_works=$ac_cv_func_fork
8953 fi
8954 if test "x$ac_cv_func_fork_works" = xcross; then
8955   case $host in
8956     *-*-amigaos* | *-*-msdosdjgpp*)
8957       # Override, as these systems have only a dummy fork() stub
8958       ac_cv_func_fork_works=no
8959       ;;
8960     *)
8961       ac_cv_func_fork_works=yes
8962       ;;
8963   esac
8964   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
8965 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
8966 fi
8967 ac_cv_func_vfork_works=$ac_cv_func_vfork
8968 if test "x$ac_cv_func_vfork" = xyes; then
8969   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
8970 $as_echo_n "checking for working vfork... " >&6; }
8971 if ${ac_cv_func_vfork_works+:} false; then :
8972   $as_echo_n "(cached) " >&6
8973 else
8974   if test "$cross_compiling" = yes; then :
8975   ac_cv_func_vfork_works=cross
8976 else
8977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8978 /* end confdefs.h.  */
8979 /* Thanks to Paul Eggert for this test.  */
8980 $ac_includes_default
8981 #include <sys/wait.h>
8982 #ifdef HAVE_VFORK_H
8983 # include <vfork.h>
8984 #endif
8985 /* On some sparc systems, changes by the child to local and incoming
8986    argument registers are propagated back to the parent.  The compiler
8987    is told about this with #include <vfork.h>, but some compilers
8988    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
8989    static variable whose address is put into a register that is
8990    clobbered by the vfork.  */
8991 static void
8992 #ifdef __cplusplus
8993 sparc_address_test (int arg)
8994 # else
8995 sparc_address_test (arg) int arg;
8996 #endif
8997 {
8998   static pid_t child;
8999   if (!child) {
9000     child = vfork ();
9001     if (child < 0) {
9002       perror ("vfork");
9003       _exit(2);
9004     }
9005     if (!child) {
9006       arg = getpid();
9007       write(-1, "", 0);
9008       _exit (arg);
9009     }
9010   }
9011 }
9012
9013 int
9014 main ()
9015 {
9016   pid_t parent = getpid ();
9017   pid_t child;
9018
9019   sparc_address_test (0);
9020
9021   child = vfork ();
9022
9023   if (child == 0) {
9024     /* Here is another test for sparc vfork register problems.  This
9025        test uses lots of local variables, at least as many local
9026        variables as main has allocated so far including compiler
9027        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
9028        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
9029        reuse the register of parent for one of the local variables,
9030        since it will think that parent can't possibly be used any more
9031        in this routine.  Assigning to the local variable will thus
9032        munge parent in the parent process.  */
9033     pid_t
9034       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9035       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9036     /* Convince the compiler that p..p7 are live; otherwise, it might
9037        use the same hardware register for all 8 local variables.  */
9038     if (p != p1 || p != p2 || p != p3 || p != p4
9039         || p != p5 || p != p6 || p != p7)
9040       _exit(1);
9041
9042     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
9043        from child file descriptors.  If the child closes a descriptor
9044        before it execs or exits, this munges the parent's descriptor
9045        as well.  Test for this by closing stdout in the child.  */
9046     _exit(close(fileno(stdout)) != 0);
9047   } else {
9048     int status;
9049     struct stat st;
9050
9051     while (wait(&status) != child)
9052       ;
9053     return (
9054          /* Was there some problem with vforking?  */
9055          child < 0
9056
9057          /* Did the child fail?  (This shouldn't happen.)  */
9058          || status
9059
9060          /* Did the vfork/compiler bug occur?  */
9061          || parent != getpid()
9062
9063          /* Did the file descriptor bug occur?  */
9064          || fstat(fileno(stdout), &st) != 0
9065          );
9066   }
9067 }
9068 _ACEOF
9069 if ac_fn_c_try_run "$LINENO"; then :
9070   ac_cv_func_vfork_works=yes
9071 else
9072   ac_cv_func_vfork_works=no
9073 fi
9074 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9075   conftest.$ac_objext conftest.beam conftest.$ac_ext
9076 fi
9077
9078 fi
9079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
9080 $as_echo "$ac_cv_func_vfork_works" >&6; }
9081
9082 fi;
9083 if test "x$ac_cv_func_fork_works" = xcross; then
9084   ac_cv_func_vfork_works=$ac_cv_func_vfork
9085   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
9086 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
9087 fi
9088
9089 if test "x$ac_cv_func_vfork_works" = xyes; then
9090
9091 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
9092
9093 else
9094
9095 $as_echo "#define vfork fork" >>confdefs.h
9096
9097 fi
9098 if test "x$ac_cv_func_fork_works" = xyes; then
9099
9100 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
9101
9102 fi
9103
9104 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9105 # for constant arguments.  Useless!
9106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9107 $as_echo_n "checking for working alloca.h... " >&6; }
9108 if ${ac_cv_working_alloca_h+:} false; then :
9109   $as_echo_n "(cached) " >&6
9110 else
9111   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9112 /* end confdefs.h.  */
9113 #include <alloca.h>
9114 int
9115 main ()
9116 {
9117 char *p = (char *) alloca (2 * sizeof (int));
9118                           if (p) return 0;
9119   ;
9120   return 0;
9121 }
9122 _ACEOF
9123 if ac_fn_c_try_link "$LINENO"; then :
9124   ac_cv_working_alloca_h=yes
9125 else
9126   ac_cv_working_alloca_h=no
9127 fi
9128 rm -f core conftest.err conftest.$ac_objext \
9129     conftest$ac_exeext conftest.$ac_ext
9130 fi
9131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9132 $as_echo "$ac_cv_working_alloca_h" >&6; }
9133 if test $ac_cv_working_alloca_h = yes; then
9134
9135 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
9136
9137 fi
9138
9139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9140 $as_echo_n "checking for alloca... " >&6; }
9141 if ${ac_cv_func_alloca_works+:} false; then :
9142   $as_echo_n "(cached) " >&6
9143 else
9144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9145 /* end confdefs.h.  */
9146 #ifdef __GNUC__
9147 # define alloca __builtin_alloca
9148 #else
9149 # ifdef _MSC_VER
9150 #  include <malloc.h>
9151 #  define alloca _alloca
9152 # else
9153 #  ifdef HAVE_ALLOCA_H
9154 #   include <alloca.h>
9155 #  else
9156 #   ifdef _AIX
9157  #pragma alloca
9158 #   else
9159 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9160 void *alloca (size_t);
9161 #    endif
9162 #   endif
9163 #  endif
9164 # endif
9165 #endif
9166
9167 int
9168 main ()
9169 {
9170 char *p = (char *) alloca (1);
9171                                     if (p) return 0;
9172   ;
9173   return 0;
9174 }
9175 _ACEOF
9176 if ac_fn_c_try_link "$LINENO"; then :
9177   ac_cv_func_alloca_works=yes
9178 else
9179   ac_cv_func_alloca_works=no
9180 fi
9181 rm -f core conftest.err conftest.$ac_objext \
9182     conftest$ac_exeext conftest.$ac_ext
9183 fi
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9185 $as_echo "$ac_cv_func_alloca_works" >&6; }
9186
9187 if test $ac_cv_func_alloca_works = yes; then
9188
9189 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
9190
9191 else
9192   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9193 # that cause trouble.  Some versions do not even contain alloca or
9194 # contain a buggy version.  If you still want to use their alloca,
9195 # use ar to extract alloca.o from them instead of compiling alloca.c.
9196
9197 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
9198
9199 $as_echo "#define C_ALLOCA 1" >>confdefs.h
9200
9201
9202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9203 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9204 if ${ac_cv_os_cray+:} false; then :
9205   $as_echo_n "(cached) " >&6
9206 else
9207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9208 /* end confdefs.h.  */
9209 #if defined CRAY && ! defined CRAY2
9210 webecray
9211 #else
9212 wenotbecray
9213 #endif
9214
9215 _ACEOF
9216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9217   $EGREP "webecray" >/dev/null 2>&1; then :
9218   ac_cv_os_cray=yes
9219 else
9220   ac_cv_os_cray=no
9221 fi
9222 rm -f conftest*
9223
9224 fi
9225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9226 $as_echo "$ac_cv_os_cray" >&6; }
9227 if test $ac_cv_os_cray = yes; then
9228   for ac_func in _getb67 GETB67 getb67; do
9229     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9230 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9231 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9232
9233 cat >>confdefs.h <<_ACEOF
9234 #define CRAY_STACKSEG_END $ac_func
9235 _ACEOF
9236
9237     break
9238 fi
9239
9240   done
9241 fi
9242
9243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9244 $as_echo_n "checking stack direction for C alloca... " >&6; }
9245 if ${ac_cv_c_stack_direction+:} false; then :
9246   $as_echo_n "(cached) " >&6
9247 else
9248   if test "$cross_compiling" = yes; then :
9249   ac_cv_c_stack_direction=0
9250 else
9251   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9252 /* end confdefs.h.  */
9253 $ac_includes_default
9254 int
9255 find_stack_direction (int *addr, int depth)
9256 {
9257   int dir, dummy = 0;
9258   if (! addr)
9259     addr = &dummy;
9260   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
9261   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
9262   return dir + dummy;
9263 }
9264
9265 int
9266 main (int argc, char **argv)
9267 {
9268   return find_stack_direction (0, argc + !argv + 20) < 0;
9269 }
9270 _ACEOF
9271 if ac_fn_c_try_run "$LINENO"; then :
9272   ac_cv_c_stack_direction=1
9273 else
9274   ac_cv_c_stack_direction=-1
9275 fi
9276 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9277   conftest.$ac_objext conftest.beam conftest.$ac_ext
9278 fi
9279
9280 fi
9281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9282 $as_echo "$ac_cv_c_stack_direction" >&6; }
9283 cat >>confdefs.h <<_ACEOF
9284 #define STACK_DIRECTION $ac_cv_c_stack_direction
9285 _ACEOF
9286
9287
9288 fi
9289
9290 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
9291 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
9292   ac_have_decl=1
9293 else
9294   ac_have_decl=0
9295 fi
9296
9297 cat >>confdefs.h <<_ACEOF
9298 #define HAVE_DECL_STRERROR_R $ac_have_decl
9299 _ACEOF
9300
9301 for ac_func in strerror_r
9302 do :
9303   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
9304 if test "x$ac_cv_func_strerror_r" = xyes; then :
9305   cat >>confdefs.h <<_ACEOF
9306 #define HAVE_STRERROR_R 1
9307 _ACEOF
9308
9309 fi
9310 done
9311
9312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
9313 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
9314 if ${ac_cv_func_strerror_r_char_p+:} false; then :
9315   $as_echo_n "(cached) " >&6
9316 else
9317
9318     ac_cv_func_strerror_r_char_p=no
9319     if test $ac_cv_have_decl_strerror_r = yes; then
9320       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9321 /* end confdefs.h.  */
9322 $ac_includes_default
9323 int
9324 main ()
9325 {
9326
9327           char buf[100];
9328           char x = *strerror_r (0, buf, sizeof buf);
9329           char *p = strerror_r (0, buf, sizeof buf);
9330           return !p || x;
9331
9332   ;
9333   return 0;
9334 }
9335 _ACEOF
9336 if ac_fn_c_try_compile "$LINENO"; then :
9337   ac_cv_func_strerror_r_char_p=yes
9338 fi
9339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9340     else
9341       # strerror_r is not declared.  Choose between
9342       # systems that have relatively inaccessible declarations for the
9343       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
9344       # former has a strerror_r that returns char*, while the latter
9345       # has a strerror_r that returns `int'.
9346       # This test should segfault on the DEC system.
9347       if test "$cross_compiling" = yes; then :
9348   :
9349 else
9350   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9351 /* end confdefs.h.  */
9352 $ac_includes_default
9353         extern char *strerror_r ();
9354 int
9355 main ()
9356 {
9357 char buf[100];
9358           char x = *strerror_r (0, buf, sizeof buf);
9359           return ! isalpha (x);
9360   ;
9361   return 0;
9362 }
9363 _ACEOF
9364 if ac_fn_c_try_run "$LINENO"; then :
9365   ac_cv_func_strerror_r_char_p=yes
9366 fi
9367 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9368   conftest.$ac_objext conftest.beam conftest.$ac_ext
9369 fi
9370
9371     fi
9372
9373 fi
9374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
9375 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
9376 if test $ac_cv_func_strerror_r_char_p = yes; then
9377
9378 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
9379
9380 fi
9381
9382
9383 ac_busted_vpath_in_make=no
9384 case "$build" in
9385  *-*-irix6.1*)  # 64 bit only
9386     # busted vpath?
9387     ;;
9388  *-*-irix6*)    # 6.2 (and later?)
9389     ac_busted_vpath_in_make=yes
9390     ;;
9391  *-*-solaris2.5.1)
9392     ac_busted_vpath_in_make=yes
9393     ;;
9394  *-*-unicosmp*)
9395     ac_busted_vpath_in_make=yes
9396     ;;
9397 esac
9398
9399 case "$ac_busted_vpath_in_make$srcdir" in
9400  yes.|no*)
9401     ;;
9402  *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
9403      '')
9404         as_fn_error $? "building outside of the main directory requires GNU make" "$LINENO" 5
9405     esac
9406     ;;
9407 esac
9408
9409 case "$host" in
9410  *-*-aix4*)
9411         # Bug 2516:
9412         # Was *-*-aix[[4-9]]*
9413         # XXX only verified thru AIX6.  But...
9414         # Ken Link says this is fine for AIX 5.3 and 7.1, and sees no reason
9415         # that this support would be in 5.3, removed in 6, and added back.
9416         #
9417         # (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
9418         # (returning ENOSYS).  I didn't check 4.2.  If, in the future,
9419         # IBM pulls its thumbs out long enough to implement clock_settime,
9420         # this conditional will need to change.  Maybe use AC_TRY_RUN
9421         # instead to try to set the time to itself and check errno.
9422     ;;
9423  *)
9424     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
9425 $as_echo_n "checking for library containing clock_gettime... " >&6; }
9426 if ${ac_cv_search_clock_gettime+:} false; then :
9427   $as_echo_n "(cached) " >&6
9428 else
9429   ac_func_search_save_LIBS=$LIBS
9430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9431 /* end confdefs.h.  */
9432
9433 /* Override any GCC internal prototype to avoid an error.
9434    Use char because int might match the return type of a GCC
9435    builtin and then its argument prototype would still apply.  */
9436 #ifdef __cplusplus
9437 extern "C"
9438 #endif
9439 char clock_gettime ();
9440 int
9441 main ()
9442 {
9443 return clock_gettime ();
9444   ;
9445   return 0;
9446 }
9447 _ACEOF
9448 for ac_lib in '' rt; do
9449   if test -z "$ac_lib"; then
9450     ac_res="none required"
9451   else
9452     ac_res=-l$ac_lib
9453     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9454   fi
9455   if ac_fn_c_try_link "$LINENO"; then :
9456   ac_cv_search_clock_gettime=$ac_res
9457 fi
9458 rm -f core conftest.err conftest.$ac_objext \
9459     conftest$ac_exeext
9460   if ${ac_cv_search_clock_gettime+:} false; then :
9461   break
9462 fi
9463 done
9464 if ${ac_cv_search_clock_gettime+:} false; then :
9465
9466 else
9467   ac_cv_search_clock_gettime=no
9468 fi
9469 rm conftest.$ac_ext
9470 LIBS=$ac_func_search_save_LIBS
9471 fi
9472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
9473 $as_echo "$ac_cv_search_clock_gettime" >&6; }
9474 ac_res=$ac_cv_search_clock_gettime
9475 if test "$ac_res" != no; then :
9476   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9477   case "$ac_cv_search_clock_gettime" in
9478  'none required') ;;
9479  no) ;;
9480  *) LDADD_LIBNTP="$ac_cv_search_clock_gettime $LDADD_LIBNTP" ;;
9481  esac
9482
9483 fi
9484
9485     for ac_func in clock_getres clock_gettime clock_settime
9486 do :
9487   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9488 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9489 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9490   cat >>confdefs.h <<_ACEOF
9491 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9492 _ACEOF
9493
9494 fi
9495 done
9496
9497     ;;
9498 esac
9499
9500 for ac_func in getclock stime timegm strlcpy strlcat
9501 do :
9502   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9503 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9504 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9505   cat >>confdefs.h <<_ACEOF
9506 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9507 _ACEOF
9508
9509 fi
9510 done
9511
9512
9513 # Bug 2713
9514 LDADD_LIBUTIL=
9515
9516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing snprintb" >&5
9517 $as_echo_n "checking for library containing snprintb... " >&6; }
9518 if ${ac_cv_search_snprintb+:} false; then :
9519   $as_echo_n "(cached) " >&6
9520 else
9521   ac_func_search_save_LIBS=$LIBS
9522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9523 /* end confdefs.h.  */
9524
9525 /* Override any GCC internal prototype to avoid an error.
9526    Use char because int might match the return type of a GCC
9527    builtin and then its argument prototype would still apply.  */
9528 #ifdef __cplusplus
9529 extern "C"
9530 #endif
9531 char snprintb ();
9532 int
9533 main ()
9534 {
9535 return snprintb ();
9536   ;
9537   return 0;
9538 }
9539 _ACEOF
9540 for ac_lib in '' util; do
9541   if test -z "$ac_lib"; then
9542     ac_res="none required"
9543   else
9544     ac_res=-l$ac_lib
9545     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9546   fi
9547   if ac_fn_c_try_link "$LINENO"; then :
9548   ac_cv_search_snprintb=$ac_res
9549 fi
9550 rm -f core conftest.err conftest.$ac_objext \
9551     conftest$ac_exeext
9552   if ${ac_cv_search_snprintb+:} false; then :
9553   break
9554 fi
9555 done
9556 if ${ac_cv_search_snprintb+:} false; then :
9557
9558 else
9559   ac_cv_search_snprintb=no
9560 fi
9561 rm conftest.$ac_ext
9562 LIBS=$ac_func_search_save_LIBS
9563 fi
9564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_snprintb" >&5
9565 $as_echo "$ac_cv_search_snprintb" >&6; }
9566 ac_res=$ac_cv_search_snprintb
9567 if test "$ac_res" != no; then :
9568   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9569   case "$ac_cv_search_snprintb" in
9570  'none required') ;;
9571  no) ;;
9572  *) LDADD_LIBUTIL="$ac_cv_search_snprintb $LDADD_LIBUTIL" ;;
9573  esac
9574
9575 $as_echo "#define USE_SNPRINTB 1" >>confdefs.h
9576
9577 fi
9578
9579
9580 #
9581 for ac_header in errno.h sys/socket.h sys/types.h time.h
9582 do :
9583   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9584 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9585 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9586   cat >>confdefs.h <<_ACEOF
9587 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9588 _ACEOF
9589
9590 fi
9591
9592 done
9593
9594 for ac_header in net/if.h
9595 do :
9596   ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
9597     #ifdef HAVE_SYS_SOCKET_H
9598     # include <sys/socket.h>
9599     #endif
9600
9601 "
9602 if test "x$ac_cv_header_net_if_h" = xyes; then :
9603   cat >>confdefs.h <<_ACEOF
9604 #define HAVE_NET_IF_H 1
9605 _ACEOF
9606
9607 fi
9608
9609 done
9610
9611 case "$host" in
9612  *-hp-hpux*)
9613     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/if.h requires mpinfou predeclaration" >&5
9614 $as_echo_n "checking if net/if.h requires mpinfou predeclaration... " >&6; }
9615 if ${ntp_cv_predecl_mpinfou+:} false; then :
9616   $as_echo_n "(cached) " >&6
9617 else
9618
9619             np_cv_predecl_mpinfou=no
9620             case "$ac_cv_header_net_if_h" in
9621              no)
9622                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9623 /* end confdefs.h.  */
9624
9625                             typedef union mpinfou {
9626                                     struct pdk_mpinfo *pdkptr;
9627                                     struct mpinfo *pikptr;
9628                             } mpinfou_t;
9629                             #ifdef HAVE_SYS_SOCKET_H
9630                             # include <sys/socket.h>
9631                             #endif
9632                             #include <net/if.h>
9633
9634 int
9635 main ()
9636 {
9637
9638
9639
9640   ;
9641   return 0;
9642 }
9643 _ACEOF
9644 if ac_fn_c_try_compile "$LINENO"; then :
9645
9646                         ntp_cv_predecl_mpinfou=yes
9647                         ac_cv_header_net_if_h=yes
9648
9649
9650 fi
9651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9652             esac
9653
9654
9655 fi
9656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_predecl_mpinfou" >&5
9657 $as_echo "$ntp_cv_predecl_mpinfou" >&6; }
9658     case "$ntp_cv_predecl_mpinfou" in
9659      yes)
9660         cat >>confdefs.h <<_ACEOF
9661 #ifndef MPINFOU_PREDECLARED
9662 # define MPINFOU_PREDECLARED
9663 typedef union mpinfou {
9664         struct pdk_mpinfo *pdkptr;
9665         struct mpinfo *pikptr;
9666 } mpinfou_t;
9667 #endif
9668 _ACEOF
9669
9670     esac
9671 esac
9672
9673 case "$host" in
9674  *-linux*)
9675     for ac_header in linux/if_addr.h
9676 do :
9677   ac_fn_c_check_header_compile "$LINENO" "linux/if_addr.h" "ac_cv_header_linux_if_addr_h" "
9678         #ifdef HAVE_SYS_SOCKET_H
9679         # include <sys/socket.h>
9680         #endif
9681
9682 "
9683 if test "x$ac_cv_header_linux_if_addr_h" = xyes; then :
9684   cat >>confdefs.h <<_ACEOF
9685 #define HAVE_LINUX_IF_ADDR_H 1
9686 _ACEOF
9687
9688 fi
9689
9690 done
9691
9692 esac
9693
9694 for ac_header in arpa/nameser.h sys/param.h sys/time.h sys/timers.h
9695 do :
9696   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9697 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9698 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9699   cat >>confdefs.h <<_ACEOF
9700 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9701 _ACEOF
9702
9703 fi
9704
9705 done
9706
9707 # sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
9708 for ac_header in sys/sysctl.h
9709 do :
9710   ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
9711     #if defined HAVE_SYS_PARAM_H
9712     # include <sys/param.h>
9713     #endif
9714
9715 "
9716 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
9717   cat >>confdefs.h <<_ACEOF
9718 #define HAVE_SYS_SYSCTL_H 1
9719 _ACEOF
9720
9721 fi
9722
9723 done
9724
9725 for ac_header in netinet/in_system.h netinet/in_systm.h netinet/in.h
9726 do :
9727   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9728 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9729 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9730   cat >>confdefs.h <<_ACEOF
9731 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9732 _ACEOF
9733
9734 fi
9735
9736 done
9737
9738
9739 for ac_header in resolv.h
9740 do :
9741   ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
9742     #ifdef HAVE_SYS_TYPES_H
9743     # include <sys/types.h>
9744     #endif
9745     #ifdef HAVE_NETINET_IN_H
9746     # include <netinet/in.h>
9747     #endif
9748     #ifdef HAVE_ARPA_NAMESER_H
9749     # include <arpa/nameser.h>
9750     #endif
9751
9752 "
9753 if test "x$ac_cv_header_resolv_h" = xyes; then :
9754   cat >>confdefs.h <<_ACEOF
9755 #define HAVE_RESOLV_H 1
9756 _ACEOF
9757
9758 fi
9759
9760 done
9761
9762
9763 for ac_header in net/if_var.h
9764 do :
9765   ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
9766     #if HAVE_SYS_TYPES_H
9767     # include <sys/types.h>
9768     #endif
9769     #ifdef HAVE_SYS_SOCKET_H
9770     # include <sys/socket.h>
9771     #endif
9772     #ifdef HAVE_NETINET_IN_H
9773     # include <netinet/in.h>
9774     #endif
9775     #ifdef HAVE_NET_IF_H
9776     # include <net/if.h>
9777     #endif
9778
9779 "
9780 if test "x$ac_cv_header_net_if_var_h" = xyes; then :
9781   cat >>confdefs.h <<_ACEOF
9782 #define HAVE_NET_IF_VAR_H 1
9783 _ACEOF
9784
9785 fi
9786
9787 done
9788
9789
9790 for ac_header in netinet/ip.h netinet/in_var.h
9791 do :
9792   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9793 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
9794     #ifdef HAVE_SYS_TYPES_H
9795     # include <sys/types.h>
9796     #endif
9797     #ifdef HAVE_SYS_SOCKET_H
9798     # include <sys/socket.h>
9799     #endif
9800     #ifdef HAVE_NET_IF_H
9801     # include <net/if.h>
9802     #endif
9803     #ifdef HAVE_NETINET_IN_H
9804     # include <netinet/in.h>
9805     #endif
9806     #ifdef HAVE_NET_IF_VAR_H
9807     # include <net/if_var.h>
9808     #endif
9809     #ifdef HAVE_NETINET_IN_SYSTM_H
9810     # include <netinet/in_systm.h>
9811     #endif
9812
9813 "
9814 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9815   cat >>confdefs.h <<_ACEOF
9816 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9817 _ACEOF
9818
9819 fi
9820
9821 done
9822
9823
9824 # HMS: Do we need to check for -lsocket before or after these tests?
9825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
9826 $as_echo_n "checking for library containing inet_pton... " >&6; }
9827 if ${ac_cv_search_inet_pton+:} false; then :
9828   $as_echo_n "(cached) " >&6
9829 else
9830   ac_func_search_save_LIBS=$LIBS
9831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9832 /* end confdefs.h.  */
9833
9834 /* Override any GCC internal prototype to avoid an error.
9835    Use char because int might match the return type of a GCC
9836    builtin and then its argument prototype would still apply.  */
9837 #ifdef __cplusplus
9838 extern "C"
9839 #endif
9840 char inet_pton ();
9841 int
9842 main ()
9843 {
9844 return inet_pton ();
9845   ;
9846   return 0;
9847 }
9848 _ACEOF
9849 for ac_lib in '' nsl; do
9850   if test -z "$ac_lib"; then
9851     ac_res="none required"
9852   else
9853     ac_res=-l$ac_lib
9854     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9855   fi
9856   if ac_fn_c_try_link "$LINENO"; then :
9857   ac_cv_search_inet_pton=$ac_res
9858 fi
9859 rm -f core conftest.err conftest.$ac_objext \
9860     conftest$ac_exeext
9861   if ${ac_cv_search_inet_pton+:} false; then :
9862   break
9863 fi
9864 done
9865 if ${ac_cv_search_inet_pton+:} false; then :
9866
9867 else
9868   ac_cv_search_inet_pton=no
9869 fi
9870 rm conftest.$ac_ext
9871 LIBS=$ac_func_search_save_LIBS
9872 fi
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
9874 $as_echo "$ac_cv_search_inet_pton" >&6; }
9875 ac_res=$ac_cv_search_inet_pton
9876 if test "$ac_res" != no; then :
9877   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9878   case "$ac_cv_search_inet_pton" in
9879  'none required') ;;
9880  no) ;;
9881  *) LDADD_LIBNTP="$ac_cv_search_inet_pton $LDADD_LIBNTP" ;;
9882  esac
9883
9884 fi
9885
9886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
9887 $as_echo_n "checking for library containing inet_ntop... " >&6; }
9888 if ${ac_cv_search_inet_ntop+:} false; then :
9889   $as_echo_n "(cached) " >&6
9890 else
9891   ac_func_search_save_LIBS=$LIBS
9892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9893 /* end confdefs.h.  */
9894
9895 /* Override any GCC internal prototype to avoid an error.
9896    Use char because int might match the return type of a GCC
9897    builtin and then its argument prototype would still apply.  */
9898 #ifdef __cplusplus
9899 extern "C"
9900 #endif
9901 char inet_ntop ();
9902 int
9903 main ()
9904 {
9905 return inet_ntop ();
9906   ;
9907   return 0;
9908 }
9909 _ACEOF
9910 for ac_lib in '' resolv; do
9911   if test -z "$ac_lib"; then
9912     ac_res="none required"
9913   else
9914     ac_res=-l$ac_lib
9915     LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
9916   fi
9917   if ac_fn_c_try_link "$LINENO"; then :
9918   ac_cv_search_inet_ntop=$ac_res
9919 fi
9920 rm -f core conftest.err conftest.$ac_objext \
9921     conftest$ac_exeext
9922   if ${ac_cv_search_inet_ntop+:} false; then :
9923   break
9924 fi
9925 done
9926 if ${ac_cv_search_inet_ntop+:} false; then :
9927
9928 else
9929   ac_cv_search_inet_ntop=no
9930 fi
9931 rm conftest.$ac_ext
9932 LIBS=$ac_func_search_save_LIBS
9933 fi
9934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
9935 $as_echo "$ac_cv_search_inet_ntop" >&6; }
9936 ac_res=$ac_cv_search_inet_ntop
9937 if test "$ac_res" != no; then :
9938   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9939   case "$ac_cv_search_inet_ntop" in
9940  'none required') ;;
9941  no) ;;
9942  *) LDADD_LIBNTP="$ac_cv_search_inet_ntop $LDADD_LIBNTP" ;;
9943  esac
9944
9945 fi
9946
9947
9948 # [Bug 1628] On Solaris, we need -lxnet -lsocket.  Generalize this to
9949 # avoid keying on the OS name:  If we find socket functions in
9950 # libsocket, next try for them in libxnet without libsocket, if found,
9951 # list both.  If we simply tested libxnet first, we would find the
9952 # functions there and never add libsocket.  See also [Bug 660]
9953 # http://bugs.ntp.org/show_bug.cgi?id=660#c9
9954 saved_LIBS=$LIBS
9955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
9956 $as_echo_n "checking for library containing setsockopt... " >&6; }
9957 if ${ac_cv_search_setsockopt+:} false; then :
9958   $as_echo_n "(cached) " >&6
9959 else
9960   ac_func_search_save_LIBS=$LIBS
9961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9962 /* end confdefs.h.  */
9963
9964 /* Override any GCC internal prototype to avoid an error.
9965    Use char because int might match the return type of a GCC
9966    builtin and then its argument prototype would still apply.  */
9967 #ifdef __cplusplus
9968 extern "C"
9969 #endif
9970 char setsockopt ();
9971 int
9972 main ()
9973 {
9974 return setsockopt ();
9975   ;
9976   return 0;
9977 }
9978 _ACEOF
9979 for ac_lib in '' socket; do
9980   if test -z "$ac_lib"; then
9981     ac_res="none required"
9982   else
9983     ac_res=-l$ac_lib
9984     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9985   fi
9986   if ac_fn_c_try_link "$LINENO"; then :
9987   ac_cv_search_setsockopt=$ac_res
9988 fi
9989 rm -f core conftest.err conftest.$ac_objext \
9990     conftest$ac_exeext
9991   if ${ac_cv_search_setsockopt+:} false; then :
9992   break
9993 fi
9994 done
9995 if ${ac_cv_search_setsockopt+:} false; then :
9996
9997 else
9998   ac_cv_search_setsockopt=no
9999 fi
10000 rm conftest.$ac_ext
10001 LIBS=$ac_func_search_save_LIBS
10002 fi
10003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
10004 $as_echo "$ac_cv_search_setsockopt" >&6; }
10005 ac_res=$ac_cv_search_setsockopt
10006 if test "$ac_res" != no; then :
10007   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10008   case "$ac_cv_search_setsockopt" in
10009  'none required') ;;
10010  no) ;;
10011  *) LDADD_LIBNTP="$ac_cv_search_setsockopt $LDADD_LIBNTP" ;;
10012  esac
10013
10014 fi
10015
10016 case "$ac_cv_search_setsockopt" in
10017  -lsocket)
10018     LIBS="$saved_LIBS"
10019     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
10020 $as_echo_n "checking for library containing getsockopt... " >&6; }
10021 if ${ac_cv_search_getsockopt+:} false; then :
10022   $as_echo_n "(cached) " >&6
10023 else
10024   ac_func_search_save_LIBS=$LIBS
10025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10026 /* end confdefs.h.  */
10027
10028 /* Override any GCC internal prototype to avoid an error.
10029    Use char because int might match the return type of a GCC
10030    builtin and then its argument prototype would still apply.  */
10031 #ifdef __cplusplus
10032 extern "C"
10033 #endif
10034 char getsockopt ();
10035 int
10036 main ()
10037 {
10038 return getsockopt ();
10039   ;
10040   return 0;
10041 }
10042 _ACEOF
10043 for ac_lib in '' xnet; do
10044   if test -z "$ac_lib"; then
10045     ac_res="none required"
10046   else
10047     ac_res=-l$ac_lib
10048     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10049   fi
10050   if ac_fn_c_try_link "$LINENO"; then :
10051   ac_cv_search_getsockopt=$ac_res
10052 fi
10053 rm -f core conftest.err conftest.$ac_objext \
10054     conftest$ac_exeext
10055   if ${ac_cv_search_getsockopt+:} false; then :
10056   break
10057 fi
10058 done
10059 if ${ac_cv_search_getsockopt+:} false; then :
10060
10061 else
10062   ac_cv_search_getsockopt=no
10063 fi
10064 rm conftest.$ac_ext
10065 LIBS=$ac_func_search_save_LIBS
10066 fi
10067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
10068 $as_echo "$ac_cv_search_getsockopt" >&6; }
10069 ac_res=$ac_cv_search_getsockopt
10070 if test "$ac_res" != no; then :
10071   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10072   case "$ac_cv_search_getsockopt" in
10073  'none required') ;;
10074  no) ;;
10075  *) LDADD_LIBNTP="$ac_cv_search_getsockopt $LDADD_LIBNTP" ;;
10076  esac
10077
10078 fi
10079
10080     # XXX Possible trouble here - reading the comments above and looking at the
10081     # code below I wonder if we'll add -lxnet when we don't need it.
10082     # Also, do we need to add -lxnet to LDADD_LIBNTP, or perhaps see if it's
10083     # there when it is not needed?
10084     case "$ac_cv_search_getsockopt" in
10085      -lxnet)
10086         LIBS="-lxnet -lsocket $saved_LIBS"
10087         ;;
10088      *) LIBS="-lsocket $saved_LIBS"
10089         ;;
10090     esac
10091     ;;
10092 esac
10093 { saved_LIBS=; unset saved_LIBS;}
10094
10095 # Bug 2427 - look for recvmsg here.
10096 for ac_func in recvmsg
10097 do :
10098   ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
10099 if test "x$ac_cv_func_recvmsg" = xyes; then :
10100   cat >>confdefs.h <<_ACEOF
10101 #define HAVE_RECVMSG 1
10102 _ACEOF
10103
10104 fi
10105 done
10106
10107
10108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
10109 $as_echo_n "checking for inline... " >&6; }
10110 if ${ac_cv_c_inline+:} false; then :
10111   $as_echo_n "(cached) " >&6
10112 else
10113   ac_cv_c_inline=no
10114 for ac_kw in inline __inline__ __inline; do
10115   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10116 /* end confdefs.h.  */
10117 #ifndef __cplusplus
10118 typedef int foo_t;
10119 static $ac_kw foo_t static_foo () {return 0; }
10120 $ac_kw foo_t foo () {return 0; }
10121 #endif
10122
10123 _ACEOF
10124 if ac_fn_c_try_compile "$LINENO"; then :
10125   ac_cv_c_inline=$ac_kw
10126 fi
10127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10128   test "$ac_cv_c_inline" != no && break
10129 done
10130
10131 fi
10132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
10133 $as_echo "$ac_cv_c_inline" >&6; }
10134
10135 case $ac_cv_c_inline in
10136   inline | yes) ;;
10137   *)
10138     case $ac_cv_c_inline in
10139       no) ac_val=;;
10140       *) ac_val=$ac_cv_c_inline;;
10141     esac
10142     cat >>confdefs.h <<_ACEOF
10143 #ifndef __cplusplus
10144 #define inline $ac_val
10145 #endif
10146 _ACEOF
10147     ;;
10148 esac
10149
10150
10151 case "$ac_cv_c_inline" in
10152  '')
10153     ;;
10154  *)
10155
10156 $as_echo "#define HAVE_INLINE 1" >>confdefs.h
10157
10158
10159 esac
10160
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10162 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10163 if ${ac_cv_header_time+:} false; then :
10164   $as_echo_n "(cached) " >&6
10165 else
10166   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10167 /* end confdefs.h.  */
10168 #include <sys/types.h>
10169 #include <sys/time.h>
10170 #include <time.h>
10171
10172 int
10173 main ()
10174 {
10175 if ((struct tm *) 0)
10176 return 0;
10177   ;
10178   return 0;
10179 }
10180 _ACEOF
10181 if ac_fn_c_try_compile "$LINENO"; then :
10182   ac_cv_header_time=yes
10183 else
10184   ac_cv_header_time=no
10185 fi
10186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10187 fi
10188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10189 $as_echo "$ac_cv_header_time" >&6; }
10190 if test $ac_cv_header_time = yes; then
10191
10192 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
10193
10194 fi
10195
10196 # The cast to long int works around a bug in the HP C Compiler
10197 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10198 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10199 # This bug is HP SR number 8606223364.
10200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
10201 $as_echo_n "checking size of time_t... " >&6; }
10202 if ${ac_cv_sizeof_time_t+:} false; then :
10203   $as_echo_n "(cached) " >&6
10204 else
10205   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
10206
10207 else
10208   if test "$ac_cv_type_time_t" = yes; then
10209      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10210 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10211 as_fn_error 77 "cannot compute sizeof (time_t)
10212 See \`config.log' for more details" "$LINENO" 5; }
10213    else
10214      ac_cv_sizeof_time_t=0
10215    fi
10216 fi
10217
10218 fi
10219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
10220 $as_echo "$ac_cv_sizeof_time_t" >&6; }
10221
10222
10223
10224 cat >>confdefs.h <<_ACEOF
10225 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
10226 _ACEOF
10227
10228
10229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10230 $as_echo_n "checking whether char is unsigned... " >&6; }
10231 if ${ac_cv_c_char_unsigned+:} false; then :
10232   $as_echo_n "(cached) " >&6
10233 else
10234   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10235 /* end confdefs.h.  */
10236 $ac_includes_default
10237 int
10238 main ()
10239 {
10240 static int test_array [1 - 2 * !(((char) -1) < 0)];
10241 test_array [0] = 0;
10242 return test_array [0];
10243
10244   ;
10245   return 0;
10246 }
10247 _ACEOF
10248 if ac_fn_c_try_compile "$LINENO"; then :
10249   ac_cv_c_char_unsigned=no
10250 else
10251   ac_cv_c_char_unsigned=yes
10252 fi
10253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10254 fi
10255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10256 $as_echo "$ac_cv_c_char_unsigned" >&6; }
10257 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
10258   $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
10259
10260 fi
10261                 # The cast to long int works around a bug in the HP C Compiler
10262 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10263 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10264 # This bug is HP SR number 8606223364.
10265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
10266 $as_echo_n "checking size of signed char... " >&6; }
10267 if ${ac_cv_sizeof_signed_char+:} false; then :
10268   $as_echo_n "(cached) " >&6
10269 else
10270   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char"        "$ac_includes_default"; then :
10271
10272 else
10273   if test "$ac_cv_type_signed_char" = yes; then
10274      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10275 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10276 as_fn_error 77 "cannot compute sizeof (signed char)
10277 See \`config.log' for more details" "$LINENO" 5; }
10278    else
10279      ac_cv_sizeof_signed_char=0
10280    fi
10281 fi
10282
10283 fi
10284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
10285 $as_echo "$ac_cv_sizeof_signed_char" >&6; }
10286
10287
10288
10289 cat >>confdefs.h <<_ACEOF
10290 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10291 _ACEOF
10292
10293
10294 ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
10295 if test "x$ac_cv_type_s_char" = xyes; then :
10296
10297 cat >>confdefs.h <<_ACEOF
10298 #define HAVE_S_CHAR 1
10299 _ACEOF
10300
10301
10302 fi
10303 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
10304 if test "x$ac_cv_type_long_long" = xyes; then :
10305
10306 cat >>confdefs.h <<_ACEOF
10307 #define HAVE_LONG_LONG 1
10308 _ACEOF
10309
10310
10311 fi
10312
10313 # The cast to long int works around a bug in the HP C Compiler
10314 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10315 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10316 # This bug is HP SR number 8606223364.
10317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
10318 $as_echo_n "checking size of short... " >&6; }
10319 if ${ac_cv_sizeof_short+:} false; then :
10320   $as_echo_n "(cached) " >&6
10321 else
10322   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
10323
10324 else
10325   if test "$ac_cv_type_short" = yes; then
10326      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10327 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10328 as_fn_error 77 "cannot compute sizeof (short)
10329 See \`config.log' for more details" "$LINENO" 5; }
10330    else
10331      ac_cv_sizeof_short=0
10332    fi
10333 fi
10334
10335 fi
10336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
10337 $as_echo "$ac_cv_sizeof_short" >&6; }
10338
10339
10340
10341 cat >>confdefs.h <<_ACEOF
10342 #define SIZEOF_SHORT $ac_cv_sizeof_short
10343 _ACEOF
10344
10345
10346 # The cast to long int works around a bug in the HP C Compiler
10347 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10348 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10349 # This bug is HP SR number 8606223364.
10350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
10351 $as_echo_n "checking size of int... " >&6; }
10352 if ${ac_cv_sizeof_int+:} false; then :
10353   $as_echo_n "(cached) " >&6
10354 else
10355   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
10356
10357 else
10358   if test "$ac_cv_type_int" = yes; then
10359      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10360 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10361 as_fn_error 77 "cannot compute sizeof (int)
10362 See \`config.log' for more details" "$LINENO" 5; }
10363    else
10364      ac_cv_sizeof_int=0
10365    fi
10366 fi
10367
10368 fi
10369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
10370 $as_echo "$ac_cv_sizeof_int" >&6; }
10371
10372
10373
10374 cat >>confdefs.h <<_ACEOF
10375 #define SIZEOF_INT $ac_cv_sizeof_int
10376 _ACEOF
10377
10378
10379 # The cast to long int works around a bug in the HP C Compiler
10380 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10381 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10382 # This bug is HP SR number 8606223364.
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
10384 $as_echo_n "checking size of long... " >&6; }
10385 if ${ac_cv_sizeof_long+:} false; then :
10386   $as_echo_n "(cached) " >&6
10387 else
10388   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
10389
10390 else
10391   if test "$ac_cv_type_long" = yes; then
10392      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10393 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10394 as_fn_error 77 "cannot compute sizeof (long)
10395 See \`config.log' for more details" "$LINENO" 5; }
10396    else
10397      ac_cv_sizeof_long=0
10398    fi
10399 fi
10400
10401 fi
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
10403 $as_echo "$ac_cv_sizeof_long" >&6; }
10404
10405
10406
10407 cat >>confdefs.h <<_ACEOF
10408 #define SIZEOF_LONG $ac_cv_sizeof_long
10409 _ACEOF
10410
10411
10412
10413 case "$ac_cv_type_long_long" in
10414  no)
10415     ;;
10416  *)
10417     # The cast to long int works around a bug in the HP C Compiler
10418 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10419 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10420 # This bug is HP SR number 8606223364.
10421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
10422 $as_echo_n "checking size of long long... " >&6; }
10423 if ${ac_cv_sizeof_long_long+:} false; then :
10424   $as_echo_n "(cached) " >&6
10425 else
10426   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
10427
10428 else
10429   if test "$ac_cv_type_long_long" = yes; then
10430      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10431 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10432 as_fn_error 77 "cannot compute sizeof (long long)
10433 See \`config.log' for more details" "$LINENO" 5; }
10434    else
10435      ac_cv_sizeof_long_long=0
10436    fi
10437 fi
10438
10439 fi
10440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
10441 $as_echo "$ac_cv_sizeof_long_long" >&6; }
10442
10443
10444
10445 cat >>confdefs.h <<_ACEOF
10446 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
10447 _ACEOF
10448
10449
10450     ;;
10451 esac
10452
10453 case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
10454  *yes)
10455     # We have a typedef for s_char.  Might as well believe it...
10456     ;;
10457  no0no)
10458     # We have signed chars, can't say 'signed char', no s_char typedef.
10459
10460 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
10461
10462     ;;
10463  no1no)
10464     # We have signed chars, can say 'signed char', no s_char typedef.
10465
10466 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
10467
10468     ;;
10469  yes0no)
10470     # We have unsigned chars, can't say 'signed char', no s_char typedef.
10471     as_fn_error $? "No way to specify a signed character!" "$LINENO" 5
10472     ;;
10473  yes1no)
10474     # We have unsigned chars, can say 'signed char', no s_char typedef.
10475
10476 $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
10477
10478     ;;
10479 esac
10480
10481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
10482 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
10483 if ${ac_cv_type_uid_t+:} false; then :
10484   $as_echo_n "(cached) " >&6
10485 else
10486   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10487 /* end confdefs.h.  */
10488 #include <sys/types.h>
10489
10490 _ACEOF
10491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10492   $EGREP "uid_t" >/dev/null 2>&1; then :
10493   ac_cv_type_uid_t=yes
10494 else
10495   ac_cv_type_uid_t=no
10496 fi
10497 rm -f conftest*
10498
10499 fi
10500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
10501 $as_echo "$ac_cv_type_uid_t" >&6; }
10502 if test $ac_cv_type_uid_t = no; then
10503
10504 $as_echo "#define uid_t int" >>confdefs.h
10505
10506
10507 $as_echo "#define gid_t int" >>confdefs.h
10508
10509 fi
10510
10511
10512
10513
10514
10515
10516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
10517 $as_echo_n "checking if we're including debugging code... " >&6; }
10518 # Check whether --enable-debugging was given.
10519 if test "${enable_debugging+set}" = set; then :
10520   enableval=$enable_debugging; ntp_ok=$enableval
10521 else
10522   ntp_ok=yes
10523
10524 fi
10525
10526 case "$ntp_ok" in
10527  yes)
10528
10529 $as_echo "#define DEBUG 1" >>confdefs.h
10530
10531 esac
10532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
10533 $as_echo "$ntp_ok" >&6; }
10534
10535
10536
10537 # check if we can compile with pthreads
10538 for ac_header in semaphore.h
10539 do :
10540   ac_fn_c_check_header_mongrel "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
10541 if test "x$ac_cv_header_semaphore_h" = xyes; then :
10542   cat >>confdefs.h <<_ACEOF
10543 #define HAVE_SEMAPHORE_H 1
10544 _ACEOF
10545
10546 fi
10547
10548 done
10549
10550 for ac_func in socketpair
10551 do :
10552   ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
10553 if test "x$ac_cv_func_socketpair" = xyes; then :
10554   cat >>confdefs.h <<_ACEOF
10555 #define HAVE_SOCKETPAIR 1
10556 _ACEOF
10557
10558 fi
10559 done
10560
10561 # Check whether --enable-thread-support was given.
10562 if test "${enable_thread_support+set}" = set; then :
10563   enableval=$enable_thread_support;
10564 else
10565   enable_thread_support=yes
10566
10567 fi
10568
10569 have_pthreads=no
10570 case "$enable_thread_support" in
10571  no) ;;
10572  *)
10573     ol_found_pthreads=no
10574
10575
10576
10577 ac_ext=c
10578 ac_cpp='$CPP $CPPFLAGS'
10579 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10580 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10581 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10582
10583 # OpenLDAP --with-threads
10584
10585 # Check whether --with-threads was given.
10586 if test "${with_threads+set}" = set; then :
10587   withval=$with_threads;
10588         ol_arg=invalid
10589         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
10590                 if test "$withval" = "$ol_val" ; then
10591                         ol_arg="$ol_val"
10592                 fi
10593         done
10594         if test "$ol_arg" = "invalid" ; then
10595                 as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
10596         fi
10597         ol_with_threads="$ol_arg"
10598
10599 else
10600         ol_with_threads="auto"
10601 fi
10602 # end --with-threads
10603
10604
10605 case "$ol_with_threads$host" in
10606  auto*-*-solaris2.[0-6])
10607         ol_with_threads=no
10608     ;;
10609 esac
10610
10611
10612 ol_aix_threads=no
10613 case "$host" in
10614 *-*-aix*)       if test -z "$CC" ; then
10615                 case "$ol_with_threads" in
10616                 auto | yes |  posix) ol_aix_threads=yes ;;
10617                 esac
10618         fi
10619 ;;
10620 esac
10621
10622 if test $ol_aix_threads = yes ; then
10623         if test -z "${CC}" ; then
10624                 for ac_prog in cc_r xlc_r cc
10625 do
10626   # Extract the first word of "$ac_prog", so it can be a program name with args.
10627 set dummy $ac_prog; ac_word=$2
10628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10629 $as_echo_n "checking for $ac_word... " >&6; }
10630 if ${ac_cv_prog_CC+:} false; then :
10631   $as_echo_n "(cached) " >&6
10632 else
10633   if test -n "$CC"; then
10634   ac_cv_prog_CC="$CC" # Let the user override the test.
10635 else
10636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10637 for as_dir in $PATH
10638 do
10639   IFS=$as_save_IFS
10640   test -z "$as_dir" && as_dir=.
10641     for ac_exec_ext in '' $ac_executable_extensions; do
10642   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10643     ac_cv_prog_CC="$ac_prog"
10644     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10645     break 2
10646   fi
10647 done
10648   done
10649 IFS=$as_save_IFS
10650
10651 fi
10652 fi
10653 CC=$ac_cv_prog_CC
10654 if test -n "$CC"; then
10655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
10656 $as_echo "$CC" >&6; }
10657 else
10658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10659 $as_echo "no" >&6; }
10660 fi
10661
10662
10663   test -n "$CC" && break
10664 done
10665
10666
10667                 if test "$CC" = cc ; then
10668                                                 if test $ol_with_threads != auto ; then
10669                                 as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
10670                         else
10671                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
10672 $as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
10673                         fi
10674                         ol_with_threads=no
10675                 fi
10676         fi
10677
10678         case ${CC} in cc_r | xlc_r)
10679                 ol_with_threads=posix
10680                 ol_cv_pthread_create=yes
10681                 ;;
10682         esac
10683 fi
10684
10685 ol_link_threads=no
10686 # OpenLDAP --with-yielding_select
10687
10688 # Check whether --with-yielding_select was given.
10689 if test "${with_yielding_select+set}" = set; then :
10690   withval=$with_yielding_select;
10691         ol_arg=invalid
10692         for ol_val in auto yes no manual  ; do
10693                 if test "$withval" = "$ol_val" ; then
10694                         ol_arg="$ol_val"
10695                 fi
10696         done
10697         if test "$ol_arg" = "invalid" ; then
10698                 as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
10699         fi
10700         ol_with_yielding_select="$ol_arg"
10701
10702 else
10703         ol_with_yielding_select="auto"
10704 fi
10705 # end --with-yielding_select
10706
10707
10708 case $ol_with_threads in auto | yes | nt)
10709
10710
10711         ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
10712 if test "x$ac_cv_func__beginthread" = xyes; then :
10713
10714 fi
10715
10716
10717         if test $ac_cv_func__beginthread = yes ; then
10718
10719 $as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
10720
10721                 ol_cv_nt_threads=yes
10722         fi
10723
10724
10725         if test "$ol_cv_nt_threads" = yes ; then
10726                 ol_link_threads=nt
10727                 ol_with_threads=found
10728                 ol_with_yielding_select=yes
10729
10730
10731 $as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
10732
10733
10734 $as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
10735
10736         fi
10737
10738         if test $ol_with_threads = nt ; then
10739                 as_fn_error $? "could not locate NT Threads" "$LINENO" 5
10740         fi
10741         ;;
10742 esac
10743
10744 case $ol_with_threads in auto | yes | posix)
10745
10746         for ac_header in pthread.h
10747 do :
10748   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10749 if test "x$ac_cv_header_pthread_h" = xyes; then :
10750   cat >>confdefs.h <<_ACEOF
10751 #define HAVE_PTHREAD_H 1
10752 _ACEOF
10753
10754 fi
10755
10756 done
10757
10758
10759         if test $ac_cv_header_pthread_h = yes ; then
10760                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
10761 $as_echo_n "checking POSIX thread version... " >&6; }
10762 if ${ol_cv_pthread_version+:} false; then :
10763   $as_echo_n "(cached) " >&6
10764 else
10765
10766         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10767 /* end confdefs.h.  */
10768
10769 #               include <pthread.h>
10770
10771 int
10772 main ()
10773 {
10774
10775                 int i = PTHREAD_CREATE_JOINABLE;
10776
10777   ;
10778   return 0;
10779 }
10780 _ACEOF
10781 if ac_fn_c_try_compile "$LINENO"; then :
10782
10783         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10784 /* end confdefs.h.  */
10785 #include <pthread.h>
10786
10787 _ACEOF
10788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10789   $EGREP "pthread_detach" >/dev/null 2>&1; then :
10790   ol_cv_pthread_version=10
10791 else
10792   ol_cv_pthread_version=8
10793 fi
10794 rm -f conftest*
10795
10796 else
10797
10798         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10799 /* end confdefs.h.  */
10800
10801 #               include <pthread.h>
10802 #               ifdef PTHREAD_CREATE_UNDETACHED
10803                 draft7
10804 #               endif
10805
10806 _ACEOF
10807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10808   $EGREP "draft7" >/dev/null 2>&1; then :
10809   ol_cv_pthread_version=7
10810 else
10811
10812         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10813 /* end confdefs.h.  */
10814 #include <pthread.h>
10815
10816 _ACEOF
10817 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10818   $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
10819   ol_cv_pthread_version=6
10820 else
10821
10822         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10823 /* end confdefs.h.  */
10824
10825 #               include <pthread.h>
10826 #ifdef          PTHREAD_MUTEX_INITIALIZER
10827                 draft5
10828 #endif
10829
10830 _ACEOF
10831 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10832   $EGREP "draft5" >/dev/null 2>&1; then :
10833   ol_cv_pthread_version=5
10834 else
10835   ol_cv_pthread_version=4
10836 fi
10837 rm -f conftest*
10838
10839 fi
10840 rm -f conftest*
10841
10842 fi
10843 rm -f conftest*
10844
10845 fi
10846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10847
10848 fi
10849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
10850 $as_echo "$ol_cv_pthread_version" >&6; }
10851
10852
10853                 if test $ol_cv_pthread_version != 0 ; then
10854
10855 cat >>confdefs.h <<_ACEOF
10856 #define HAVE_PTHREADS $ol_cv_pthread_version
10857 _ACEOF
10858
10859                 else
10860                         as_fn_error $? "unknown pthread version" "$LINENO" 5
10861                 fi
10862
10863                 # consider threads found
10864                 ol_with_threads=found
10865
10866
10867         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
10868 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
10869 if ${ol_cv_header_linux_threads+:} false; then :
10870   $as_echo_n "(cached) " >&6
10871 else
10872   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10873 /* end confdefs.h.  */
10874 #include <pthread.h>
10875 _ACEOF
10876 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10877   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
10878   ol_cv_header_linux_threads=yes
10879 else
10880   ol_cv_header_linux_threads=no
10881 fi
10882 rm -f conftest*
10883
10884
10885 fi
10886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
10887 $as_echo "$ol_cv_header_linux_threads" >&6; }
10888         if test $ol_cv_header_linux_threads = yes; then
10889
10890 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
10891
10892         fi
10893
10894
10895         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
10896 $as_echo_n "checking for GNU Pth pthread.h... " >&6; }
10897 if ${ol_cv_header_gnu_pth_pthread_h+:} false; then :
10898   $as_echo_n "(cached) " >&6
10899 else
10900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10901 /* end confdefs.h.  */
10902 #include <pthread.h>
10903 #ifdef _POSIX_THREAD_IS_GNU_PTH
10904         __gnu_pth__;
10905 #endif
10906
10907 _ACEOF
10908 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10909   $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
10910   ol_cv_header_gnu_pth_pthread_h=yes
10911 else
10912   ol_cv_header_gnu_pth_pthread_h=no
10913 fi
10914 rm -f conftest*
10915
10916
10917 fi
10918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
10919 $as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
10920
10921
10922                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
10923                         for ac_header in sched.h
10924 do :
10925   ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
10926 if test "x$ac_cv_header_sched_h" = xyes; then :
10927   cat >>confdefs.h <<_ACEOF
10928 #define HAVE_SCHED_H 1
10929 _ACEOF
10930
10931 fi
10932
10933 done
10934
10935                 fi
10936
10937
10938                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
10939 $as_echo_n "checking for pthread_create in default libraries... " >&6; }
10940 if ${ol_cv_pthread_create+:} false; then :
10941   $as_echo_n "(cached) " >&6
10942 else
10943
10944                         if test "$cross_compiling" = yes; then :
10945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10946 /* end confdefs.h.  */
10947
10948 /* pthread test headers */
10949 #include <pthread.h>
10950 #if HAVE_PTHREADS < 7
10951 #include <errno.h>
10952 #endif
10953 #ifndef NULL
10954 #define NULL (void*)0
10955 #endif
10956
10957 static void *task(p)
10958         void *p;
10959 {
10960         return (void *) (p == NULL);
10961 }
10962
10963 int
10964 main ()
10965 {
10966
10967         /* pthread test function */
10968 #ifndef PTHREAD_CREATE_DETACHED
10969 #define PTHREAD_CREATE_DETACHED 1
10970 #endif
10971         pthread_t t;
10972         int status;
10973         int detach = PTHREAD_CREATE_DETACHED;
10974
10975 #if HAVE_PTHREADS > 4
10976         /* Final pthreads */
10977         pthread_attr_t attr;
10978
10979         status = pthread_attr_init(&attr);
10980         if( status ) return status;
10981
10982 #if HAVE_PTHREADS < 7
10983         status = pthread_attr_setdetachstate(&attr, &detach);
10984         if( status < 0 ) status = errno;
10985 #else
10986         status = pthread_attr_setdetachstate(&attr, detach);
10987 #endif
10988         if( status ) return status;
10989         status = pthread_create( &t, &attr, task, NULL );
10990 #if HAVE_PTHREADS < 7
10991         if( status < 0 ) status = errno;
10992 #endif
10993         if( status ) return status;
10994 #else
10995         /* Draft 4 pthreads */
10996         status = pthread_create( &t, pthread_attr_default, task, NULL );
10997         if( status ) return errno;
10998
10999         /* give thread a chance to complete */
11000         /* it should remain joinable and hence detachable */
11001         sleep( 1 );
11002
11003         status = pthread_detach( &t );
11004         if( status ) return errno;
11005 #endif
11006
11007 #ifdef HAVE_LINUX_THREADS
11008         pthread_kill_other_threads_np();
11009 #endif
11010
11011         return 0;
11012
11013   ;
11014   return 0;
11015 }
11016 _ACEOF
11017 if ac_fn_c_try_link "$LINENO"; then :
11018   ol_cv_pthread_create=yes
11019 else
11020   ol_cv_pthread_create=no
11021 fi
11022 rm -f core conftest.err conftest.$ac_objext \
11023     conftest$ac_exeext conftest.$ac_ext
11024 else
11025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11026 /* end confdefs.h.  */
11027
11028
11029 /* pthread test headers */
11030 #include <pthread.h>
11031 #if HAVE_PTHREADS < 7
11032 #include <errno.h>
11033 #endif
11034 #ifndef NULL
11035 #define NULL (void*)0
11036 #endif
11037
11038 static void *task(p)
11039         void *p;
11040 {
11041         return (void *) (p == NULL);
11042 }
11043
11044
11045 int main(argc, argv)
11046         int argc;
11047         char **argv;
11048 {
11049
11050         /* pthread test function */
11051 #ifndef PTHREAD_CREATE_DETACHED
11052 #define PTHREAD_CREATE_DETACHED 1
11053 #endif
11054         pthread_t t;
11055         int status;
11056         int detach = PTHREAD_CREATE_DETACHED;
11057
11058 #if HAVE_PTHREADS > 4
11059         /* Final pthreads */
11060         pthread_attr_t attr;
11061
11062         status = pthread_attr_init(&attr);
11063         if( status ) return status;
11064
11065 #if HAVE_PTHREADS < 7
11066         status = pthread_attr_setdetachstate(&attr, &detach);
11067         if( status < 0 ) status = errno;
11068 #else
11069         status = pthread_attr_setdetachstate(&attr, detach);
11070 #endif
11071         if( status ) return status;
11072         status = pthread_create( &t, &attr, task, NULL );
11073 #if HAVE_PTHREADS < 7
11074         if( status < 0 ) status = errno;
11075 #endif
11076         if( status ) return status;
11077 #else
11078         /* Draft 4 pthreads */
11079         status = pthread_create( &t, pthread_attr_default, task, NULL );
11080         if( status ) return errno;
11081
11082         /* give thread a chance to complete */
11083         /* it should remain joinable and hence detachable */
11084         sleep( 1 );
11085
11086         status = pthread_detach( &t );
11087         if( status ) return errno;
11088 #endif
11089
11090 #ifdef HAVE_LINUX_THREADS
11091         pthread_kill_other_threads_np();
11092 #endif
11093
11094         return 0;
11095
11096 }
11097
11098 _ACEOF
11099 if ac_fn_c_try_run "$LINENO"; then :
11100   ol_cv_pthread_create=yes
11101 else
11102   ol_cv_pthread_create=no
11103 fi
11104 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11105   conftest.$ac_objext conftest.beam conftest.$ac_ext
11106 fi
11107
11108 fi
11109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
11110 $as_echo "$ol_cv_pthread_create" >&6; }
11111
11112                 if test $ol_cv_pthread_create != no ; then
11113                         ol_link_threads=posix
11114                         ol_link_pthreads=""
11115                 fi
11116
11117                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11118 if test "$ol_link_threads" = no ; then
11119         # try -kthread
11120         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
11121 $as_echo_n "checking for pthread link with -kthread... " >&6; }
11122 if ${ol_cv_pthread_kthread+:} false; then :
11123   $as_echo_n "(cached) " >&6
11124 else
11125
11126                 # save the flags
11127                 ol_LIBS="$LIBS"
11128                 LIBS="-kthread $LIBS"
11129
11130                 if test "$cross_compiling" = yes; then :
11131   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11132 /* end confdefs.h.  */
11133
11134 /* pthread test headers */
11135 #include <pthread.h>
11136 #if HAVE_PTHREADS < 7
11137 #include <errno.h>
11138 #endif
11139 #ifndef NULL
11140 #define NULL (void*)0
11141 #endif
11142
11143 static void *task(p)
11144         void *p;
11145 {
11146         return (void *) (p == NULL);
11147 }
11148
11149 int
11150 main ()
11151 {
11152
11153         /* pthread test function */
11154 #ifndef PTHREAD_CREATE_DETACHED
11155 #define PTHREAD_CREATE_DETACHED 1
11156 #endif
11157         pthread_t t;
11158         int status;
11159         int detach = PTHREAD_CREATE_DETACHED;
11160
11161 #if HAVE_PTHREADS > 4
11162         /* Final pthreads */
11163         pthread_attr_t attr;
11164
11165         status = pthread_attr_init(&attr);
11166         if( status ) return status;
11167
11168 #if HAVE_PTHREADS < 7
11169         status = pthread_attr_setdetachstate(&attr, &detach);
11170         if( status < 0 ) status = errno;
11171 #else
11172         status = pthread_attr_setdetachstate(&attr, detach);
11173 #endif
11174         if( status ) return status;
11175         status = pthread_create( &t, &attr, task, NULL );
11176 #if HAVE_PTHREADS < 7
11177         if( status < 0 ) status = errno;
11178 #endif
11179         if( status ) return status;
11180 #else
11181         /* Draft 4 pthreads */
11182         status = pthread_create( &t, pthread_attr_default, task, NULL );
11183         if( status ) return errno;
11184
11185         /* give thread a chance to complete */
11186         /* it should remain joinable and hence detachable */
11187         sleep( 1 );
11188
11189         status = pthread_detach( &t );
11190         if( status ) return errno;
11191 #endif
11192
11193 #ifdef HAVE_LINUX_THREADS
11194         pthread_kill_other_threads_np();
11195 #endif
11196
11197         return 0;
11198
11199   ;
11200   return 0;
11201 }
11202 _ACEOF
11203 if ac_fn_c_try_link "$LINENO"; then :
11204   ol_cv_pthread_kthread=yes
11205 else
11206   ol_cv_pthread_kthread=no
11207 fi
11208 rm -f core conftest.err conftest.$ac_objext \
11209     conftest$ac_exeext conftest.$ac_ext
11210 else
11211   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11212 /* end confdefs.h.  */
11213
11214
11215 /* pthread test headers */
11216 #include <pthread.h>
11217 #if HAVE_PTHREADS < 7
11218 #include <errno.h>
11219 #endif
11220 #ifndef NULL
11221 #define NULL (void*)0
11222 #endif
11223
11224 static void *task(p)
11225         void *p;
11226 {
11227         return (void *) (p == NULL);
11228 }
11229
11230
11231 int main(argc, argv)
11232         int argc;
11233         char **argv;
11234 {
11235
11236         /* pthread test function */
11237 #ifndef PTHREAD_CREATE_DETACHED
11238 #define PTHREAD_CREATE_DETACHED 1
11239 #endif
11240         pthread_t t;
11241         int status;
11242         int detach = PTHREAD_CREATE_DETACHED;
11243
11244 #if HAVE_PTHREADS > 4
11245         /* Final pthreads */
11246         pthread_attr_t attr;
11247
11248         status = pthread_attr_init(&attr);
11249         if( status ) return status;
11250
11251 #if HAVE_PTHREADS < 7
11252         status = pthread_attr_setdetachstate(&attr, &detach);
11253         if( status < 0 ) status = errno;
11254 #else
11255         status = pthread_attr_setdetachstate(&attr, detach);
11256 #endif
11257         if( status ) return status;
11258         status = pthread_create( &t, &attr, task, NULL );
11259 #if HAVE_PTHREADS < 7
11260         if( status < 0 ) status = errno;
11261 #endif
11262         if( status ) return status;
11263 #else
11264         /* Draft 4 pthreads */
11265         status = pthread_create( &t, pthread_attr_default, task, NULL );
11266         if( status ) return errno;
11267
11268         /* give thread a chance to complete */
11269         /* it should remain joinable and hence detachable */
11270         sleep( 1 );
11271
11272         status = pthread_detach( &t );
11273         if( status ) return errno;
11274 #endif
11275
11276 #ifdef HAVE_LINUX_THREADS
11277         pthread_kill_other_threads_np();
11278 #endif
11279
11280         return 0;
11281
11282 }
11283
11284 _ACEOF
11285 if ac_fn_c_try_run "$LINENO"; then :
11286   ol_cv_pthread_kthread=yes
11287 else
11288   ol_cv_pthread_kthread=no
11289 fi
11290 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11291   conftest.$ac_objext conftest.beam conftest.$ac_ext
11292 fi
11293
11294
11295                 # restore the LIBS
11296                 LIBS="$ol_LIBS"
11297
11298 fi
11299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
11300 $as_echo "$ol_cv_pthread_kthread" >&6; }
11301
11302         if test $ol_cv_pthread_kthread = yes ; then
11303                 ol_link_pthreads="-kthread"
11304                 ol_link_threads=posix
11305         fi
11306 fi
11307
11308                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11309 if test "$ol_link_threads" = no ; then
11310         # try -pthread
11311         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
11312 $as_echo_n "checking for pthread link with -pthread... " >&6; }
11313 if ${ol_cv_pthread_pthread+:} false; then :
11314   $as_echo_n "(cached) " >&6
11315 else
11316
11317                 # save the flags
11318                 ol_LIBS="$LIBS"
11319                 LIBS="-pthread $LIBS"
11320
11321                 if test "$cross_compiling" = yes; then :
11322   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11323 /* end confdefs.h.  */
11324
11325 /* pthread test headers */
11326 #include <pthread.h>
11327 #if HAVE_PTHREADS < 7
11328 #include <errno.h>
11329 #endif
11330 #ifndef NULL
11331 #define NULL (void*)0
11332 #endif
11333
11334 static void *task(p)
11335         void *p;
11336 {
11337         return (void *) (p == NULL);
11338 }
11339
11340 int
11341 main ()
11342 {
11343
11344         /* pthread test function */
11345 #ifndef PTHREAD_CREATE_DETACHED
11346 #define PTHREAD_CREATE_DETACHED 1
11347 #endif
11348         pthread_t t;
11349         int status;
11350         int detach = PTHREAD_CREATE_DETACHED;
11351
11352 #if HAVE_PTHREADS > 4
11353         /* Final pthreads */
11354         pthread_attr_t attr;
11355
11356         status = pthread_attr_init(&attr);
11357         if( status ) return status;
11358
11359 #if HAVE_PTHREADS < 7
11360         status = pthread_attr_setdetachstate(&attr, &detach);
11361         if( status < 0 ) status = errno;
11362 #else
11363         status = pthread_attr_setdetachstate(&attr, detach);
11364 #endif
11365         if( status ) return status;
11366         status = pthread_create( &t, &attr, task, NULL );
11367 #if HAVE_PTHREADS < 7
11368         if( status < 0 ) status = errno;
11369 #endif
11370         if( status ) return status;
11371 #else
11372         /* Draft 4 pthreads */
11373         status = pthread_create( &t, pthread_attr_default, task, NULL );
11374         if( status ) return errno;
11375
11376         /* give thread a chance to complete */
11377         /* it should remain joinable and hence detachable */
11378         sleep( 1 );
11379
11380         status = pthread_detach( &t );
11381         if( status ) return errno;
11382 #endif
11383
11384 #ifdef HAVE_LINUX_THREADS
11385         pthread_kill_other_threads_np();
11386 #endif
11387
11388         return 0;
11389
11390   ;
11391   return 0;
11392 }
11393 _ACEOF
11394 if ac_fn_c_try_link "$LINENO"; then :
11395   ol_cv_pthread_pthread=yes
11396 else
11397   ol_cv_pthread_pthread=no
11398 fi
11399 rm -f core conftest.err conftest.$ac_objext \
11400     conftest$ac_exeext conftest.$ac_ext
11401 else
11402   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11403 /* end confdefs.h.  */
11404
11405
11406 /* pthread test headers */
11407 #include <pthread.h>
11408 #if HAVE_PTHREADS < 7
11409 #include <errno.h>
11410 #endif
11411 #ifndef NULL
11412 #define NULL (void*)0
11413 #endif
11414
11415 static void *task(p)
11416         void *p;
11417 {
11418         return (void *) (p == NULL);
11419 }
11420
11421
11422 int main(argc, argv)
11423         int argc;
11424         char **argv;
11425 {
11426
11427         /* pthread test function */
11428 #ifndef PTHREAD_CREATE_DETACHED
11429 #define PTHREAD_CREATE_DETACHED 1
11430 #endif
11431         pthread_t t;
11432         int status;
11433         int detach = PTHREAD_CREATE_DETACHED;
11434
11435 #if HAVE_PTHREADS > 4
11436         /* Final pthreads */
11437         pthread_attr_t attr;
11438
11439         status = pthread_attr_init(&attr);
11440         if( status ) return status;
11441
11442 #if HAVE_PTHREADS < 7
11443         status = pthread_attr_setdetachstate(&attr, &detach);
11444         if( status < 0 ) status = errno;
11445 #else
11446         status = pthread_attr_setdetachstate(&attr, detach);
11447 #endif
11448         if( status ) return status;
11449         status = pthread_create( &t, &attr, task, NULL );
11450 #if HAVE_PTHREADS < 7
11451         if( status < 0 ) status = errno;
11452 #endif
11453         if( status ) return status;
11454 #else
11455         /* Draft 4 pthreads */
11456         status = pthread_create( &t, pthread_attr_default, task, NULL );
11457         if( status ) return errno;
11458
11459         /* give thread a chance to complete */
11460         /* it should remain joinable and hence detachable */
11461         sleep( 1 );
11462
11463         status = pthread_detach( &t );
11464         if( status ) return errno;
11465 #endif
11466
11467 #ifdef HAVE_LINUX_THREADS
11468         pthread_kill_other_threads_np();
11469 #endif
11470
11471         return 0;
11472
11473 }
11474
11475 _ACEOF
11476 if ac_fn_c_try_run "$LINENO"; then :
11477   ol_cv_pthread_pthread=yes
11478 else
11479   ol_cv_pthread_pthread=no
11480 fi
11481 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11482   conftest.$ac_objext conftest.beam conftest.$ac_ext
11483 fi
11484
11485
11486                 # restore the LIBS
11487                 LIBS="$ol_LIBS"
11488
11489 fi
11490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
11491 $as_echo "$ol_cv_pthread_pthread" >&6; }
11492
11493         if test $ol_cv_pthread_pthread = yes ; then
11494                 ol_link_pthreads="-pthread"
11495                 ol_link_threads=posix
11496         fi
11497 fi
11498
11499                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
11500 if test "$ol_link_threads" = no ; then
11501         # try -pthreads
11502         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
11503 $as_echo_n "checking for pthread link with -pthreads... " >&6; }
11504 if ${ol_cv_pthread_pthreads+:} false; then :
11505   $as_echo_n "(cached) " >&6
11506 else
11507
11508                 # save the flags
11509                 ol_LIBS="$LIBS"
11510                 LIBS="-pthreads $LIBS"
11511
11512                 if test "$cross_compiling" = yes; then :
11513   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11514 /* end confdefs.h.  */
11515
11516 /* pthread test headers */
11517 #include <pthread.h>
11518 #if HAVE_PTHREADS < 7
11519 #include <errno.h>
11520 #endif
11521 #ifndef NULL
11522 #define NULL (void*)0
11523 #endif
11524
11525 static void *task(p)
11526         void *p;
11527 {
11528         return (void *) (p == NULL);
11529 }
11530
11531 int
11532 main ()
11533 {
11534
11535         /* pthread test function */
11536 #ifndef PTHREAD_CREATE_DETACHED
11537 #define PTHREAD_CREATE_DETACHED 1
11538 #endif
11539         pthread_t t;
11540         int status;
11541         int detach = PTHREAD_CREATE_DETACHED;
11542
11543 #if HAVE_PTHREADS > 4
11544         /* Final pthreads */
11545         pthread_attr_t attr;
11546
11547         status = pthread_attr_init(&attr);
11548         if( status ) return status;
11549
11550 #if HAVE_PTHREADS < 7
11551         status = pthread_attr_setdetachstate(&attr, &detach);
11552         if( status < 0 ) status = errno;
11553 #else
11554         status = pthread_attr_setdetachstate(&attr, detach);
11555 #endif
11556         if( status ) return status;
11557         status = pthread_create( &t, &attr, task, NULL );
11558 #if HAVE_PTHREADS < 7
11559         if( status < 0 ) status = errno;
11560 #endif
11561         if( status ) return status;
11562 #else
11563         /* Draft 4 pthreads */
11564         status = pthread_create( &t, pthread_attr_default, task, NULL );
11565         if( status ) return errno;
11566
11567         /* give thread a chance to complete */
11568         /* it should remain joinable and hence detachable */
11569         sleep( 1 );
11570
11571         status = pthread_detach( &t );
11572         if( status ) return errno;
11573 #endif
11574
11575 #ifdef HAVE_LINUX_THREADS
11576         pthread_kill_other_threads_np();
11577 #endif
11578
11579         return 0;
11580
11581   ;
11582   return 0;
11583 }
11584 _ACEOF
11585 if ac_fn_c_try_link "$LINENO"; then :
11586   ol_cv_pthread_pthreads=yes
11587 else
11588   ol_cv_pthread_pthreads=no
11589 fi
11590 rm -f core conftest.err conftest.$ac_objext \
11591     conftest$ac_exeext conftest.$ac_ext
11592 else
11593   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11594 /* end confdefs.h.  */
11595
11596
11597 /* pthread test headers */
11598 #include <pthread.h>
11599 #if HAVE_PTHREADS < 7
11600 #include <errno.h>
11601 #endif
11602 #ifndef NULL
11603 #define NULL (void*)0
11604 #endif
11605
11606 static void *task(p)
11607         void *p;
11608 {
11609         return (void *) (p == NULL);
11610 }
11611
11612
11613 int main(argc, argv)
11614         int argc;
11615         char **argv;
11616 {
11617
11618         /* pthread test function */
11619 #ifndef PTHREAD_CREATE_DETACHED
11620 #define PTHREAD_CREATE_DETACHED 1
11621 #endif
11622         pthread_t t;
11623         int status;
11624         int detach = PTHREAD_CREATE_DETACHED;
11625
11626 #if HAVE_PTHREADS > 4
11627         /* Final pthreads */
11628         pthread_attr_t attr;
11629
11630         status = pthread_attr_init(&attr);
11631         if( status ) return status;
11632
11633 #if HAVE_PTHREADS < 7
11634         status = pthread_attr_setdetachstate(&attr, &detach);
11635         if( status < 0 ) status = errno;
11636 #else
11637         status = pthread_attr_setdetachstate(&attr, detach);
11638 #endif
11639         if( status ) return status;
11640         status = pthread_create( &t, &attr, task, NULL );
11641 #if HAVE_PTHREADS < 7
11642         if( status < 0 ) status = errno;
11643 #endif
11644         if( status ) return status;
11645 #else
11646         /* Draft 4 pthreads */
11647         status = pthread_create( &t, pthread_attr_default, task, NULL );
11648         if( status ) return errno;
11649
11650         /* give thread a chance to complete */
11651         /* it should remain joinable and hence detachable */
11652         sleep( 1 );
11653
11654         status = pthread_detach( &t );
11655         if( status ) return errno;
11656 #endif
11657
11658 #ifdef HAVE_LINUX_THREADS
11659         pthread_kill_other_threads_np();
11660 #endif
11661
11662         return 0;
11663
11664 }
11665
11666 _ACEOF
11667 if ac_fn_c_try_run "$LINENO"; then :
11668   ol_cv_pthread_pthreads=yes
11669 else
11670   ol_cv_pthread_pthreads=no
11671 fi
11672 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11673   conftest.$ac_objext conftest.beam conftest.$ac_ext
11674 fi
11675
11676
11677                 # restore the LIBS
11678                 LIBS="$ol_LIBS"
11679
11680 fi
11681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
11682 $as_echo "$ol_cv_pthread_pthreads" >&6; }
11683
11684         if test $ol_cv_pthread_pthreads = yes ; then
11685                 ol_link_pthreads="-pthreads"
11686                 ol_link_threads=posix
11687         fi
11688 fi
11689
11690                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
11691 if test "$ol_link_threads" = no ; then
11692         # try -mthreads
11693         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
11694 $as_echo_n "checking for pthread link with -mthreads... " >&6; }
11695 if ${ol_cv_pthread_mthreads+:} false; then :
11696   $as_echo_n "(cached) " >&6
11697 else
11698
11699                 # save the flags
11700                 ol_LIBS="$LIBS"
11701                 LIBS="-mthreads $LIBS"
11702
11703                 if test "$cross_compiling" = yes; then :
11704   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11705 /* end confdefs.h.  */
11706
11707 /* pthread test headers */
11708 #include <pthread.h>
11709 #if HAVE_PTHREADS < 7
11710 #include <errno.h>
11711 #endif
11712 #ifndef NULL
11713 #define NULL (void*)0
11714 #endif
11715
11716 static void *task(p)
11717         void *p;
11718 {
11719         return (void *) (p == NULL);
11720 }
11721
11722 int
11723 main ()
11724 {
11725
11726         /* pthread test function */
11727 #ifndef PTHREAD_CREATE_DETACHED
11728 #define PTHREAD_CREATE_DETACHED 1
11729 #endif
11730         pthread_t t;
11731         int status;
11732         int detach = PTHREAD_CREATE_DETACHED;
11733
11734 #if HAVE_PTHREADS > 4
11735         /* Final pthreads */
11736         pthread_attr_t attr;
11737
11738         status = pthread_attr_init(&attr);
11739         if( status ) return status;
11740
11741 #if HAVE_PTHREADS < 7
11742         status = pthread_attr_setdetachstate(&attr, &detach);
11743         if( status < 0 ) status = errno;
11744 #else
11745         status = pthread_attr_setdetachstate(&attr, detach);
11746 #endif
11747         if( status ) return status;
11748         status = pthread_create( &t, &attr, task, NULL );
11749 #if HAVE_PTHREADS < 7
11750         if( status < 0 ) status = errno;
11751 #endif
11752         if( status ) return status;
11753 #else
11754         /* Draft 4 pthreads */
11755         status = pthread_create( &t, pthread_attr_default, task, NULL );
11756         if( status ) return errno;
11757
11758         /* give thread a chance to complete */
11759         /* it should remain joinable and hence detachable */
11760         sleep( 1 );
11761
11762         status = pthread_detach( &t );
11763         if( status ) return errno;
11764 #endif
11765
11766 #ifdef HAVE_LINUX_THREADS
11767         pthread_kill_other_threads_np();
11768 #endif
11769
11770         return 0;
11771
11772   ;
11773   return 0;
11774 }
11775 _ACEOF
11776 if ac_fn_c_try_link "$LINENO"; then :
11777   ol_cv_pthread_mthreads=yes
11778 else
11779   ol_cv_pthread_mthreads=no
11780 fi
11781 rm -f core conftest.err conftest.$ac_objext \
11782     conftest$ac_exeext conftest.$ac_ext
11783 else
11784   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11785 /* end confdefs.h.  */
11786
11787
11788 /* pthread test headers */
11789 #include <pthread.h>
11790 #if HAVE_PTHREADS < 7
11791 #include <errno.h>
11792 #endif
11793 #ifndef NULL
11794 #define NULL (void*)0
11795 #endif
11796
11797 static void *task(p)
11798         void *p;
11799 {
11800         return (void *) (p == NULL);
11801 }
11802
11803
11804 int main(argc, argv)
11805         int argc;
11806         char **argv;
11807 {
11808
11809         /* pthread test function */
11810 #ifndef PTHREAD_CREATE_DETACHED
11811 #define PTHREAD_CREATE_DETACHED 1
11812 #endif
11813         pthread_t t;
11814         int status;
11815         int detach = PTHREAD_CREATE_DETACHED;
11816
11817 #if HAVE_PTHREADS > 4
11818         /* Final pthreads */
11819         pthread_attr_t attr;
11820
11821         status = pthread_attr_init(&attr);
11822         if( status ) return status;
11823
11824 #if HAVE_PTHREADS < 7
11825         status = pthread_attr_setdetachstate(&attr, &detach);
11826         if( status < 0 ) status = errno;
11827 #else
11828         status = pthread_attr_setdetachstate(&attr, detach);
11829 #endif
11830         if( status ) return status;
11831         status = pthread_create( &t, &attr, task, NULL );
11832 #if HAVE_PTHREADS < 7
11833         if( status < 0 ) status = errno;
11834 #endif
11835         if( status ) return status;
11836 #else
11837         /* Draft 4 pthreads */
11838         status = pthread_create( &t, pthread_attr_default, task, NULL );
11839         if( status ) return errno;
11840
11841         /* give thread a chance to complete */
11842         /* it should remain joinable and hence detachable */
11843         sleep( 1 );
11844
11845         status = pthread_detach( &t );
11846         if( status ) return errno;
11847 #endif
11848
11849 #ifdef HAVE_LINUX_THREADS
11850         pthread_kill_other_threads_np();
11851 #endif
11852
11853         return 0;
11854
11855 }
11856
11857 _ACEOF
11858 if ac_fn_c_try_run "$LINENO"; then :
11859   ol_cv_pthread_mthreads=yes
11860 else
11861   ol_cv_pthread_mthreads=no
11862 fi
11863 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11864   conftest.$ac_objext conftest.beam conftest.$ac_ext
11865 fi
11866
11867
11868                 # restore the LIBS
11869                 LIBS="$ol_LIBS"
11870
11871 fi
11872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
11873 $as_echo "$ol_cv_pthread_mthreads" >&6; }
11874
11875         if test $ol_cv_pthread_mthreads = yes ; then
11876                 ol_link_pthreads="-mthreads"
11877                 ol_link_threads=posix
11878         fi
11879 fi
11880
11881                 # Pthread try link: -thread (ol_cv_pthread_thread)
11882 if test "$ol_link_threads" = no ; then
11883         # try -thread
11884         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
11885 $as_echo_n "checking for pthread link with -thread... " >&6; }
11886 if ${ol_cv_pthread_thread+:} false; then :
11887   $as_echo_n "(cached) " >&6
11888 else
11889
11890                 # save the flags
11891                 ol_LIBS="$LIBS"
11892                 LIBS="-thread $LIBS"
11893
11894                 if test "$cross_compiling" = yes; then :
11895   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11896 /* end confdefs.h.  */
11897
11898 /* pthread test headers */
11899 #include <pthread.h>
11900 #if HAVE_PTHREADS < 7
11901 #include <errno.h>
11902 #endif
11903 #ifndef NULL
11904 #define NULL (void*)0
11905 #endif
11906
11907 static void *task(p)
11908         void *p;
11909 {
11910         return (void *) (p == NULL);
11911 }
11912
11913 int
11914 main ()
11915 {
11916
11917         /* pthread test function */
11918 #ifndef PTHREAD_CREATE_DETACHED
11919 #define PTHREAD_CREATE_DETACHED 1
11920 #endif
11921         pthread_t t;
11922         int status;
11923         int detach = PTHREAD_CREATE_DETACHED;
11924
11925 #if HAVE_PTHREADS > 4
11926         /* Final pthreads */
11927         pthread_attr_t attr;
11928
11929         status = pthread_attr_init(&attr);
11930         if( status ) return status;
11931
11932 #if HAVE_PTHREADS < 7
11933         status = pthread_attr_setdetachstate(&attr, &detach);
11934         if( status < 0 ) status = errno;
11935 #else
11936         status = pthread_attr_setdetachstate(&attr, detach);
11937 #endif
11938         if( status ) return status;
11939         status = pthread_create( &t, &attr, task, NULL );
11940 #if HAVE_PTHREADS < 7
11941         if( status < 0 ) status = errno;
11942 #endif
11943         if( status ) return status;
11944 #else
11945         /* Draft 4 pthreads */
11946         status = pthread_create( &t, pthread_attr_default, task, NULL );
11947         if( status ) return errno;
11948
11949         /* give thread a chance to complete */
11950         /* it should remain joinable and hence detachable */
11951         sleep( 1 );
11952
11953         status = pthread_detach( &t );
11954         if( status ) return errno;
11955 #endif
11956
11957 #ifdef HAVE_LINUX_THREADS
11958         pthread_kill_other_threads_np();
11959 #endif
11960
11961         return 0;
11962
11963   ;
11964   return 0;
11965 }
11966 _ACEOF
11967 if ac_fn_c_try_link "$LINENO"; then :
11968   ol_cv_pthread_thread=yes
11969 else
11970   ol_cv_pthread_thread=no
11971 fi
11972 rm -f core conftest.err conftest.$ac_objext \
11973     conftest$ac_exeext conftest.$ac_ext
11974 else
11975   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11976 /* end confdefs.h.  */
11977
11978
11979 /* pthread test headers */
11980 #include <pthread.h>
11981 #if HAVE_PTHREADS < 7
11982 #include <errno.h>
11983 #endif
11984 #ifndef NULL
11985 #define NULL (void*)0
11986 #endif
11987
11988 static void *task(p)
11989         void *p;
11990 {
11991         return (void *) (p == NULL);
11992 }
11993
11994
11995 int main(argc, argv)
11996         int argc;
11997         char **argv;
11998 {
11999
12000         /* pthread test function */
12001 #ifndef PTHREAD_CREATE_DETACHED
12002 #define PTHREAD_CREATE_DETACHED 1
12003 #endif
12004         pthread_t t;
12005         int status;
12006         int detach = PTHREAD_CREATE_DETACHED;
12007
12008 #if HAVE_PTHREADS > 4
12009         /* Final pthreads */
12010         pthread_attr_t attr;
12011
12012         status = pthread_attr_init(&attr);
12013         if( status ) return status;
12014
12015 #if HAVE_PTHREADS < 7
12016         status = pthread_attr_setdetachstate(&attr, &detach);
12017         if( status < 0 ) status = errno;
12018 #else
12019         status = pthread_attr_setdetachstate(&attr, detach);
12020 #endif
12021         if( status ) return status;
12022         status = pthread_create( &t, &attr, task, NULL );
12023 #if HAVE_PTHREADS < 7
12024         if( status < 0 ) status = errno;
12025 #endif
12026         if( status ) return status;
12027 #else
12028         /* Draft 4 pthreads */
12029         status = pthread_create( &t, pthread_attr_default, task, NULL );
12030         if( status ) return errno;
12031
12032         /* give thread a chance to complete */
12033         /* it should remain joinable and hence detachable */
12034         sleep( 1 );
12035
12036         status = pthread_detach( &t );
12037         if( status ) return errno;
12038 #endif
12039
12040 #ifdef HAVE_LINUX_THREADS
12041         pthread_kill_other_threads_np();
12042 #endif
12043
12044         return 0;
12045
12046 }
12047
12048 _ACEOF
12049 if ac_fn_c_try_run "$LINENO"; then :
12050   ol_cv_pthread_thread=yes
12051 else
12052   ol_cv_pthread_thread=no
12053 fi
12054 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12055   conftest.$ac_objext conftest.beam conftest.$ac_ext
12056 fi
12057
12058
12059                 # restore the LIBS
12060                 LIBS="$ol_LIBS"
12061
12062 fi
12063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
12064 $as_echo "$ol_cv_pthread_thread" >&6; }
12065
12066         if test $ol_cv_pthread_thread = yes ; then
12067                 ol_link_pthreads="-thread"
12068                 ol_link_threads=posix
12069         fi
12070 fi
12071
12072
12073                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12074 if test "$ol_link_threads" = no ; then
12075         # try -lpthread -lmach -lexc -lc_r
12076         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12077 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
12078 if ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+:} false; then :
12079   $as_echo_n "(cached) " >&6
12080 else
12081
12082                 # save the flags
12083                 ol_LIBS="$LIBS"
12084                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12085
12086                 if test "$cross_compiling" = yes; then :
12087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12088 /* end confdefs.h.  */
12089
12090 /* pthread test headers */
12091 #include <pthread.h>
12092 #if HAVE_PTHREADS < 7
12093 #include <errno.h>
12094 #endif
12095 #ifndef NULL
12096 #define NULL (void*)0
12097 #endif
12098
12099 static void *task(p)
12100         void *p;
12101 {
12102         return (void *) (p == NULL);
12103 }
12104
12105 int
12106 main ()
12107 {
12108
12109         /* pthread test function */
12110 #ifndef PTHREAD_CREATE_DETACHED
12111 #define PTHREAD_CREATE_DETACHED 1
12112 #endif
12113         pthread_t t;
12114         int status;
12115         int detach = PTHREAD_CREATE_DETACHED;
12116
12117 #if HAVE_PTHREADS > 4
12118         /* Final pthreads */
12119         pthread_attr_t attr;
12120
12121         status = pthread_attr_init(&attr);
12122         if( status ) return status;
12123
12124 #if HAVE_PTHREADS < 7
12125         status = pthread_attr_setdetachstate(&attr, &detach);
12126         if( status < 0 ) status = errno;
12127 #else
12128         status = pthread_attr_setdetachstate(&attr, detach);
12129 #endif
12130         if( status ) return status;
12131         status = pthread_create( &t, &attr, task, NULL );
12132 #if HAVE_PTHREADS < 7
12133         if( status < 0 ) status = errno;
12134 #endif
12135         if( status ) return status;
12136 #else
12137         /* Draft 4 pthreads */
12138         status = pthread_create( &t, pthread_attr_default, task, NULL );
12139         if( status ) return errno;
12140
12141         /* give thread a chance to complete */
12142         /* it should remain joinable and hence detachable */
12143         sleep( 1 );
12144
12145         status = pthread_detach( &t );
12146         if( status ) return errno;
12147 #endif
12148
12149 #ifdef HAVE_LINUX_THREADS
12150         pthread_kill_other_threads_np();
12151 #endif
12152
12153         return 0;
12154
12155   ;
12156   return 0;
12157 }
12158 _ACEOF
12159 if ac_fn_c_try_link "$LINENO"; then :
12160   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12161 else
12162   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12163 fi
12164 rm -f core conftest.err conftest.$ac_objext \
12165     conftest$ac_exeext conftest.$ac_ext
12166 else
12167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12168 /* end confdefs.h.  */
12169
12170
12171 /* pthread test headers */
12172 #include <pthread.h>
12173 #if HAVE_PTHREADS < 7
12174 #include <errno.h>
12175 #endif
12176 #ifndef NULL
12177 #define NULL (void*)0
12178 #endif
12179
12180 static void *task(p)
12181         void *p;
12182 {
12183         return (void *) (p == NULL);
12184 }
12185
12186
12187 int main(argc, argv)
12188         int argc;
12189         char **argv;
12190 {
12191
12192         /* pthread test function */
12193 #ifndef PTHREAD_CREATE_DETACHED
12194 #define PTHREAD_CREATE_DETACHED 1
12195 #endif
12196         pthread_t t;
12197         int status;
12198         int detach = PTHREAD_CREATE_DETACHED;
12199
12200 #if HAVE_PTHREADS > 4
12201         /* Final pthreads */
12202         pthread_attr_t attr;
12203
12204         status = pthread_attr_init(&attr);
12205         if( status ) return status;
12206
12207 #if HAVE_PTHREADS < 7
12208         status = pthread_attr_setdetachstate(&attr, &detach);
12209         if( status < 0 ) status = errno;
12210 #else
12211         status = pthread_attr_setdetachstate(&attr, detach);
12212 #endif
12213         if( status ) return status;
12214         status = pthread_create( &t, &attr, task, NULL );
12215 #if HAVE_PTHREADS < 7
12216         if( status < 0 ) status = errno;
12217 #endif
12218         if( status ) return status;
12219 #else
12220         /* Draft 4 pthreads */
12221         status = pthread_create( &t, pthread_attr_default, task, NULL );
12222         if( status ) return errno;
12223
12224         /* give thread a chance to complete */
12225         /* it should remain joinable and hence detachable */
12226         sleep( 1 );
12227
12228         status = pthread_detach( &t );
12229         if( status ) return errno;
12230 #endif
12231
12232 #ifdef HAVE_LINUX_THREADS
12233         pthread_kill_other_threads_np();
12234 #endif
12235
12236         return 0;
12237
12238 }
12239
12240 _ACEOF
12241 if ac_fn_c_try_run "$LINENO"; then :
12242   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12243 else
12244   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12245 fi
12246 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12247   conftest.$ac_objext conftest.beam conftest.$ac_ext
12248 fi
12249
12250
12251                 # restore the LIBS
12252                 LIBS="$ol_LIBS"
12253
12254 fi
12255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
12256 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
12257
12258         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12259                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12260                 ol_link_threads=posix
12261         fi
12262 fi
12263
12264                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12265 if test "$ol_link_threads" = no ; then
12266         # try -lpthread -lmach -lexc
12267         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
12268 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
12269 if ${ol_cv_pthread_lpthread_lmach_lexc+:} false; then :
12270   $as_echo_n "(cached) " >&6
12271 else
12272
12273                 # save the flags
12274                 ol_LIBS="$LIBS"
12275                 LIBS="-lpthread -lmach -lexc $LIBS"
12276
12277                 if test "$cross_compiling" = yes; then :
12278   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12279 /* end confdefs.h.  */
12280
12281 /* pthread test headers */
12282 #include <pthread.h>
12283 #if HAVE_PTHREADS < 7
12284 #include <errno.h>
12285 #endif
12286 #ifndef NULL
12287 #define NULL (void*)0
12288 #endif
12289
12290 static void *task(p)
12291         void *p;
12292 {
12293         return (void *) (p == NULL);
12294 }
12295
12296 int
12297 main ()
12298 {
12299
12300         /* pthread test function */
12301 #ifndef PTHREAD_CREATE_DETACHED
12302 #define PTHREAD_CREATE_DETACHED 1
12303 #endif
12304         pthread_t t;
12305         int status;
12306         int detach = PTHREAD_CREATE_DETACHED;
12307
12308 #if HAVE_PTHREADS > 4
12309         /* Final pthreads */
12310         pthread_attr_t attr;
12311
12312         status = pthread_attr_init(&attr);
12313         if( status ) return status;
12314
12315 #if HAVE_PTHREADS < 7
12316         status = pthread_attr_setdetachstate(&attr, &detach);
12317         if( status < 0 ) status = errno;
12318 #else
12319         status = pthread_attr_setdetachstate(&attr, detach);
12320 #endif
12321         if( status ) return status;
12322         status = pthread_create( &t, &attr, task, NULL );
12323 #if HAVE_PTHREADS < 7
12324         if( status < 0 ) status = errno;
12325 #endif
12326         if( status ) return status;
12327 #else
12328         /* Draft 4 pthreads */
12329         status = pthread_create( &t, pthread_attr_default, task, NULL );
12330         if( status ) return errno;
12331
12332         /* give thread a chance to complete */
12333         /* it should remain joinable and hence detachable */
12334         sleep( 1 );
12335
12336         status = pthread_detach( &t );
12337         if( status ) return errno;
12338 #endif
12339
12340 #ifdef HAVE_LINUX_THREADS
12341         pthread_kill_other_threads_np();
12342 #endif
12343
12344         return 0;
12345
12346   ;
12347   return 0;
12348 }
12349 _ACEOF
12350 if ac_fn_c_try_link "$LINENO"; then :
12351   ol_cv_pthread_lpthread_lmach_lexc=yes
12352 else
12353   ol_cv_pthread_lpthread_lmach_lexc=no
12354 fi
12355 rm -f core conftest.err conftest.$ac_objext \
12356     conftest$ac_exeext conftest.$ac_ext
12357 else
12358   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12359 /* end confdefs.h.  */
12360
12361
12362 /* pthread test headers */
12363 #include <pthread.h>
12364 #if HAVE_PTHREADS < 7
12365 #include <errno.h>
12366 #endif
12367 #ifndef NULL
12368 #define NULL (void*)0
12369 #endif
12370
12371 static void *task(p)
12372         void *p;
12373 {
12374         return (void *) (p == NULL);
12375 }
12376
12377
12378 int main(argc, argv)
12379         int argc;
12380         char **argv;
12381 {
12382
12383         /* pthread test function */
12384 #ifndef PTHREAD_CREATE_DETACHED
12385 #define PTHREAD_CREATE_DETACHED 1
12386 #endif
12387         pthread_t t;
12388         int status;
12389         int detach = PTHREAD_CREATE_DETACHED;
12390
12391 #if HAVE_PTHREADS > 4
12392         /* Final pthreads */
12393         pthread_attr_t attr;
12394
12395         status = pthread_attr_init(&attr);
12396         if( status ) return status;
12397
12398 #if HAVE_PTHREADS < 7
12399         status = pthread_attr_setdetachstate(&attr, &detach);
12400         if( status < 0 ) status = errno;
12401 #else
12402         status = pthread_attr_setdetachstate(&attr, detach);
12403 #endif
12404         if( status ) return status;
12405         status = pthread_create( &t, &attr, task, NULL );
12406 #if HAVE_PTHREADS < 7
12407         if( status < 0 ) status = errno;
12408 #endif
12409         if( status ) return status;
12410 #else
12411         /* Draft 4 pthreads */
12412         status = pthread_create( &t, pthread_attr_default, task, NULL );
12413         if( status ) return errno;
12414
12415         /* give thread a chance to complete */
12416         /* it should remain joinable and hence detachable */
12417         sleep( 1 );
12418
12419         status = pthread_detach( &t );
12420         if( status ) return errno;
12421 #endif
12422
12423 #ifdef HAVE_LINUX_THREADS
12424         pthread_kill_other_threads_np();
12425 #endif
12426
12427         return 0;
12428
12429 }
12430
12431 _ACEOF
12432 if ac_fn_c_try_run "$LINENO"; then :
12433   ol_cv_pthread_lpthread_lmach_lexc=yes
12434 else
12435   ol_cv_pthread_lpthread_lmach_lexc=no
12436 fi
12437 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12438   conftest.$ac_objext conftest.beam conftest.$ac_ext
12439 fi
12440
12441
12442                 # restore the LIBS
12443                 LIBS="$ol_LIBS"
12444
12445 fi
12446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
12447 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
12448
12449         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
12450                 ol_link_pthreads="-lpthread -lmach -lexc"
12451                 ol_link_threads=posix
12452         fi
12453 fi
12454
12455
12456                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
12457 if test "$ol_link_threads" = no ; then
12458         # try -lpthread -Wl,-woff,85
12459         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
12460 $as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
12461 if ${ol_cv_pthread_lib_lpthread_woff+:} false; then :
12462   $as_echo_n "(cached) " >&6
12463 else
12464
12465                 # save the flags
12466                 ol_LIBS="$LIBS"
12467                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
12468
12469                 if test "$cross_compiling" = yes; then :
12470   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12471 /* end confdefs.h.  */
12472
12473 /* pthread test headers */
12474 #include <pthread.h>
12475 #if HAVE_PTHREADS < 7
12476 #include <errno.h>
12477 #endif
12478 #ifndef NULL
12479 #define NULL (void*)0
12480 #endif
12481
12482 static void *task(p)
12483         void *p;
12484 {
12485         return (void *) (p == NULL);
12486 }
12487
12488 int
12489 main ()
12490 {
12491
12492         /* pthread test function */
12493 #ifndef PTHREAD_CREATE_DETACHED
12494 #define PTHREAD_CREATE_DETACHED 1
12495 #endif
12496         pthread_t t;
12497         int status;
12498         int detach = PTHREAD_CREATE_DETACHED;
12499
12500 #if HAVE_PTHREADS > 4
12501         /* Final pthreads */
12502         pthread_attr_t attr;
12503
12504         status = pthread_attr_init(&attr);
12505         if( status ) return status;
12506
12507 #if HAVE_PTHREADS < 7
12508         status = pthread_attr_setdetachstate(&attr, &detach);
12509         if( status < 0 ) status = errno;
12510 #else
12511         status = pthread_attr_setdetachstate(&attr, detach);
12512 #endif
12513         if( status ) return status;
12514         status = pthread_create( &t, &attr, task, NULL );
12515 #if HAVE_PTHREADS < 7
12516         if( status < 0 ) status = errno;
12517 #endif
12518         if( status ) return status;
12519 #else
12520         /* Draft 4 pthreads */
12521         status = pthread_create( &t, pthread_attr_default, task, NULL );
12522         if( status ) return errno;
12523
12524         /* give thread a chance to complete */
12525         /* it should remain joinable and hence detachable */
12526         sleep( 1 );
12527
12528         status = pthread_detach( &t );
12529         if( status ) return errno;
12530 #endif
12531
12532 #ifdef HAVE_LINUX_THREADS
12533         pthread_kill_other_threads_np();
12534 #endif
12535
12536         return 0;
12537
12538   ;
12539   return 0;
12540 }
12541 _ACEOF
12542 if ac_fn_c_try_link "$LINENO"; then :
12543   ol_cv_pthread_lib_lpthread_woff=yes
12544 else
12545   ol_cv_pthread_lib_lpthread_woff=no
12546 fi
12547 rm -f core conftest.err conftest.$ac_objext \
12548     conftest$ac_exeext conftest.$ac_ext
12549 else
12550   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12551 /* end confdefs.h.  */
12552
12553
12554 /* pthread test headers */
12555 #include <pthread.h>
12556 #if HAVE_PTHREADS < 7
12557 #include <errno.h>
12558 #endif
12559 #ifndef NULL
12560 #define NULL (void*)0
12561 #endif
12562
12563 static void *task(p)
12564         void *p;
12565 {
12566         return (void *) (p == NULL);
12567 }
12568
12569
12570 int main(argc, argv)
12571         int argc;
12572         char **argv;
12573 {
12574
12575         /* pthread test function */
12576 #ifndef PTHREAD_CREATE_DETACHED
12577 #define PTHREAD_CREATE_DETACHED 1
12578 #endif
12579         pthread_t t;
12580         int status;
12581         int detach = PTHREAD_CREATE_DETACHED;
12582
12583 #if HAVE_PTHREADS > 4
12584         /* Final pthreads */
12585         pthread_attr_t attr;
12586
12587         status = pthread_attr_init(&attr);
12588         if( status ) return status;
12589
12590 #if HAVE_PTHREADS < 7
12591         status = pthread_attr_setdetachstate(&attr, &detach);
12592         if( status < 0 ) status = errno;
12593 #else
12594         status = pthread_attr_setdetachstate(&attr, detach);
12595 #endif
12596         if( status ) return status;
12597         status = pthread_create( &t, &attr, task, NULL );
12598 #if HAVE_PTHREADS < 7
12599         if( status < 0 ) status = errno;
12600 #endif
12601         if( status ) return status;
12602 #else
12603         /* Draft 4 pthreads */
12604         status = pthread_create( &t, pthread_attr_default, task, NULL );
12605         if( status ) return errno;
12606
12607         /* give thread a chance to complete */
12608         /* it should remain joinable and hence detachable */
12609         sleep( 1 );
12610
12611         status = pthread_detach( &t );
12612         if( status ) return errno;
12613 #endif
12614
12615 #ifdef HAVE_LINUX_THREADS
12616         pthread_kill_other_threads_np();
12617 #endif
12618
12619         return 0;
12620
12621 }
12622
12623 _ACEOF
12624 if ac_fn_c_try_run "$LINENO"; then :
12625   ol_cv_pthread_lib_lpthread_woff=yes
12626 else
12627   ol_cv_pthread_lib_lpthread_woff=no
12628 fi
12629 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12630   conftest.$ac_objext conftest.beam conftest.$ac_ext
12631 fi
12632
12633
12634                 # restore the LIBS
12635                 LIBS="$ol_LIBS"
12636
12637 fi
12638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
12639 $as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
12640
12641         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
12642                 ol_link_pthreads="-lpthread -Wl,-woff,85"
12643                 ol_link_threads=posix
12644         fi
12645 fi
12646
12647
12648                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
12649 if test "$ol_link_threads" = no ; then
12650         # try -lpthread
12651         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
12652 $as_echo_n "checking for pthread link with -lpthread... " >&6; }
12653 if ${ol_cv_pthread_lpthread+:} false; then :
12654   $as_echo_n "(cached) " >&6
12655 else
12656
12657                 # save the flags
12658                 ol_LIBS="$LIBS"
12659                 LIBS="-lpthread $LIBS"
12660
12661                 if test "$cross_compiling" = yes; then :
12662   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12663 /* end confdefs.h.  */
12664
12665 /* pthread test headers */
12666 #include <pthread.h>
12667 #if HAVE_PTHREADS < 7
12668 #include <errno.h>
12669 #endif
12670 #ifndef NULL
12671 #define NULL (void*)0
12672 #endif
12673
12674 static void *task(p)
12675         void *p;
12676 {
12677         return (void *) (p == NULL);
12678 }
12679
12680 int
12681 main ()
12682 {
12683
12684         /* pthread test function */
12685 #ifndef PTHREAD_CREATE_DETACHED
12686 #define PTHREAD_CREATE_DETACHED 1
12687 #endif
12688         pthread_t t;
12689         int status;
12690         int detach = PTHREAD_CREATE_DETACHED;
12691
12692 #if HAVE_PTHREADS > 4
12693         /* Final pthreads */
12694         pthread_attr_t attr;
12695
12696         status = pthread_attr_init(&attr);
12697         if( status ) return status;
12698
12699 #if HAVE_PTHREADS < 7
12700         status = pthread_attr_setdetachstate(&attr, &detach);
12701         if( status < 0 ) status = errno;
12702 #else
12703         status = pthread_attr_setdetachstate(&attr, detach);
12704 #endif
12705         if( status ) return status;
12706         status = pthread_create( &t, &attr, task, NULL );
12707 #if HAVE_PTHREADS < 7
12708         if( status < 0 ) status = errno;
12709 #endif
12710         if( status ) return status;
12711 #else
12712         /* Draft 4 pthreads */
12713         status = pthread_create( &t, pthread_attr_default, task, NULL );
12714         if( status ) return errno;
12715
12716         /* give thread a chance to complete */
12717         /* it should remain joinable and hence detachable */
12718         sleep( 1 );
12719
12720         status = pthread_detach( &t );
12721         if( status ) return errno;
12722 #endif
12723
12724 #ifdef HAVE_LINUX_THREADS
12725         pthread_kill_other_threads_np();
12726 #endif
12727
12728         return 0;
12729
12730   ;
12731   return 0;
12732 }
12733 _ACEOF
12734 if ac_fn_c_try_link "$LINENO"; then :
12735   ol_cv_pthread_lpthread=yes
12736 else
12737   ol_cv_pthread_lpthread=no
12738 fi
12739 rm -f core conftest.err conftest.$ac_objext \
12740     conftest$ac_exeext conftest.$ac_ext
12741 else
12742   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12743 /* end confdefs.h.  */
12744
12745
12746 /* pthread test headers */
12747 #include <pthread.h>
12748 #if HAVE_PTHREADS < 7
12749 #include <errno.h>
12750 #endif
12751 #ifndef NULL
12752 #define NULL (void*)0
12753 #endif
12754
12755 static void *task(p)
12756         void *p;
12757 {
12758         return (void *) (p == NULL);
12759 }
12760
12761
12762 int main(argc, argv)
12763         int argc;
12764         char **argv;
12765 {
12766
12767         /* pthread test function */
12768 #ifndef PTHREAD_CREATE_DETACHED
12769 #define PTHREAD_CREATE_DETACHED 1
12770 #endif
12771         pthread_t t;
12772         int status;
12773         int detach = PTHREAD_CREATE_DETACHED;
12774
12775 #if HAVE_PTHREADS > 4
12776         /* Final pthreads */
12777         pthread_attr_t attr;
12778
12779         status = pthread_attr_init(&attr);
12780         if( status ) return status;
12781
12782 #if HAVE_PTHREADS < 7
12783         status = pthread_attr_setdetachstate(&attr, &detach);
12784         if( status < 0 ) status = errno;
12785 #else
12786         status = pthread_attr_setdetachstate(&attr, detach);
12787 #endif
12788         if( status ) return status;
12789         status = pthread_create( &t, &attr, task, NULL );
12790 #if HAVE_PTHREADS < 7
12791         if( status < 0 ) status = errno;
12792 #endif
12793         if( status ) return status;
12794 #else
12795         /* Draft 4 pthreads */
12796         status = pthread_create( &t, pthread_attr_default, task, NULL );
12797         if( status ) return errno;
12798
12799         /* give thread a chance to complete */
12800         /* it should remain joinable and hence detachable */
12801         sleep( 1 );
12802
12803         status = pthread_detach( &t );
12804         if( status ) return errno;
12805 #endif
12806
12807 #ifdef HAVE_LINUX_THREADS
12808         pthread_kill_other_threads_np();
12809 #endif
12810
12811         return 0;
12812
12813 }
12814
12815 _ACEOF
12816 if ac_fn_c_try_run "$LINENO"; then :
12817   ol_cv_pthread_lpthread=yes
12818 else
12819   ol_cv_pthread_lpthread=no
12820 fi
12821 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12822   conftest.$ac_objext conftest.beam conftest.$ac_ext
12823 fi
12824
12825
12826                 # restore the LIBS
12827                 LIBS="$ol_LIBS"
12828
12829 fi
12830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
12831 $as_echo "$ol_cv_pthread_lpthread" >&6; }
12832
12833         if test $ol_cv_pthread_lpthread = yes ; then
12834                 ol_link_pthreads="-lpthread"
12835                 ol_link_threads=posix
12836         fi
12837 fi
12838
12839                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
12840 if test "$ol_link_threads" = no ; then
12841         # try -lc_r
12842         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
12843 $as_echo_n "checking for pthread link with -lc_r... " >&6; }
12844 if ${ol_cv_pthread_lc_r+:} false; then :
12845   $as_echo_n "(cached) " >&6
12846 else
12847
12848                 # save the flags
12849                 ol_LIBS="$LIBS"
12850                 LIBS="-lc_r $LIBS"
12851
12852                 if test "$cross_compiling" = yes; then :
12853   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12854 /* end confdefs.h.  */
12855
12856 /* pthread test headers */
12857 #include <pthread.h>
12858 #if HAVE_PTHREADS < 7
12859 #include <errno.h>
12860 #endif
12861 #ifndef NULL
12862 #define NULL (void*)0
12863 #endif
12864
12865 static void *task(p)
12866         void *p;
12867 {
12868         return (void *) (p == NULL);
12869 }
12870
12871 int
12872 main ()
12873 {
12874
12875         /* pthread test function */
12876 #ifndef PTHREAD_CREATE_DETACHED
12877 #define PTHREAD_CREATE_DETACHED 1
12878 #endif
12879         pthread_t t;
12880         int status;
12881         int detach = PTHREAD_CREATE_DETACHED;
12882
12883 #if HAVE_PTHREADS > 4
12884         /* Final pthreads */
12885         pthread_attr_t attr;
12886
12887         status = pthread_attr_init(&attr);
12888         if( status ) return status;
12889
12890 #if HAVE_PTHREADS < 7
12891         status = pthread_attr_setdetachstate(&attr, &detach);
12892         if( status < 0 ) status = errno;
12893 #else
12894         status = pthread_attr_setdetachstate(&attr, detach);
12895 #endif
12896         if( status ) return status;
12897         status = pthread_create( &t, &attr, task, NULL );
12898 #if HAVE_PTHREADS < 7
12899         if( status < 0 ) status = errno;
12900 #endif
12901         if( status ) return status;
12902 #else
12903         /* Draft 4 pthreads */
12904         status = pthread_create( &t, pthread_attr_default, task, NULL );
12905         if( status ) return errno;
12906
12907         /* give thread a chance to complete */
12908         /* it should remain joinable and hence detachable */
12909         sleep( 1 );
12910
12911         status = pthread_detach( &t );
12912         if( status ) return errno;
12913 #endif
12914
12915 #ifdef HAVE_LINUX_THREADS
12916         pthread_kill_other_threads_np();
12917 #endif
12918
12919         return 0;
12920
12921   ;
12922   return 0;
12923 }
12924 _ACEOF
12925 if ac_fn_c_try_link "$LINENO"; then :
12926   ol_cv_pthread_lc_r=yes
12927 else
12928   ol_cv_pthread_lc_r=no
12929 fi
12930 rm -f core conftest.err conftest.$ac_objext \
12931     conftest$ac_exeext conftest.$ac_ext
12932 else
12933   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12934 /* end confdefs.h.  */
12935
12936
12937 /* pthread test headers */
12938 #include <pthread.h>
12939 #if HAVE_PTHREADS < 7
12940 #include <errno.h>
12941 #endif
12942 #ifndef NULL
12943 #define NULL (void*)0
12944 #endif
12945
12946 static void *task(p)
12947         void *p;
12948 {
12949         return (void *) (p == NULL);
12950 }
12951
12952
12953 int main(argc, argv)
12954         int argc;
12955         char **argv;
12956 {
12957
12958         /* pthread test function */
12959 #ifndef PTHREAD_CREATE_DETACHED
12960 #define PTHREAD_CREATE_DETACHED 1
12961 #endif
12962         pthread_t t;
12963         int status;
12964         int detach = PTHREAD_CREATE_DETACHED;
12965
12966 #if HAVE_PTHREADS > 4
12967         /* Final pthreads */
12968         pthread_attr_t attr;
12969
12970         status = pthread_attr_init(&attr);
12971         if( status ) return status;
12972
12973 #if HAVE_PTHREADS < 7
12974         status = pthread_attr_setdetachstate(&attr, &detach);
12975         if( status < 0 ) status = errno;
12976 #else
12977         status = pthread_attr_setdetachstate(&attr, detach);
12978 #endif
12979         if( status ) return status;
12980         status = pthread_create( &t, &attr, task, NULL );
12981 #if HAVE_PTHREADS < 7
12982         if( status < 0 ) status = errno;
12983 #endif
12984         if( status ) return status;
12985 #else
12986         /* Draft 4 pthreads */
12987         status = pthread_create( &t, pthread_attr_default, task, NULL );
12988         if( status ) return errno;
12989
12990         /* give thread a chance to complete */
12991         /* it should remain joinable and hence detachable */
12992         sleep( 1 );
12993
12994         status = pthread_detach( &t );
12995         if( status ) return errno;
12996 #endif
12997
12998 #ifdef HAVE_LINUX_THREADS
12999         pthread_kill_other_threads_np();
13000 #endif
13001
13002         return 0;
13003
13004 }
13005
13006 _ACEOF
13007 if ac_fn_c_try_run "$LINENO"; then :
13008   ol_cv_pthread_lc_r=yes
13009 else
13010   ol_cv_pthread_lc_r=no
13011 fi
13012 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13013   conftest.$ac_objext conftest.beam conftest.$ac_ext
13014 fi
13015
13016
13017                 # restore the LIBS
13018                 LIBS="$ol_LIBS"
13019
13020 fi
13021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
13022 $as_echo "$ol_cv_pthread_lc_r" >&6; }
13023
13024         if test $ol_cv_pthread_lc_r = yes ; then
13025                 ol_link_pthreads="-lc_r"
13026                 ol_link_threads=posix
13027         fi
13028 fi
13029
13030
13031                 # Pthread try link: -threads (ol_cv_pthread_threads)
13032 if test "$ol_link_threads" = no ; then
13033         # try -threads
13034         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
13035 $as_echo_n "checking for pthread link with -threads... " >&6; }
13036 if ${ol_cv_pthread_threads+:} false; then :
13037   $as_echo_n "(cached) " >&6
13038 else
13039
13040                 # save the flags
13041                 ol_LIBS="$LIBS"
13042                 LIBS="-threads $LIBS"
13043
13044                 if test "$cross_compiling" = yes; then :
13045   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13046 /* end confdefs.h.  */
13047
13048 /* pthread test headers */
13049 #include <pthread.h>
13050 #if HAVE_PTHREADS < 7
13051 #include <errno.h>
13052 #endif
13053 #ifndef NULL
13054 #define NULL (void*)0
13055 #endif
13056
13057 static void *task(p)
13058         void *p;
13059 {
13060         return (void *) (p == NULL);
13061 }
13062
13063 int
13064 main ()
13065 {
13066
13067         /* pthread test function */
13068 #ifndef PTHREAD_CREATE_DETACHED
13069 #define PTHREAD_CREATE_DETACHED 1
13070 #endif
13071         pthread_t t;
13072         int status;
13073         int detach = PTHREAD_CREATE_DETACHED;
13074
13075 #if HAVE_PTHREADS > 4
13076         /* Final pthreads */
13077         pthread_attr_t attr;
13078
13079         status = pthread_attr_init(&attr);
13080         if( status ) return status;
13081
13082 #if HAVE_PTHREADS < 7
13083         status = pthread_attr_setdetachstate(&attr, &detach);
13084         if( status < 0 ) status = errno;
13085 #else
13086         status = pthread_attr_setdetachstate(&attr, detach);
13087 #endif
13088         if( status ) return status;
13089         status = pthread_create( &t, &attr, task, NULL );
13090 #if HAVE_PTHREADS < 7
13091         if( status < 0 ) status = errno;
13092 #endif
13093         if( status ) return status;
13094 #else
13095         /* Draft 4 pthreads */
13096         status = pthread_create( &t, pthread_attr_default, task, NULL );
13097         if( status ) return errno;
13098
13099         /* give thread a chance to complete */
13100         /* it should remain joinable and hence detachable */
13101         sleep( 1 );
13102
13103         status = pthread_detach( &t );
13104         if( status ) return errno;
13105 #endif
13106
13107 #ifdef HAVE_LINUX_THREADS
13108         pthread_kill_other_threads_np();
13109 #endif
13110
13111         return 0;
13112
13113   ;
13114   return 0;
13115 }
13116 _ACEOF
13117 if ac_fn_c_try_link "$LINENO"; then :
13118   ol_cv_pthread_threads=yes
13119 else
13120   ol_cv_pthread_threads=no
13121 fi
13122 rm -f core conftest.err conftest.$ac_objext \
13123     conftest$ac_exeext conftest.$ac_ext
13124 else
13125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13126 /* end confdefs.h.  */
13127
13128
13129 /* pthread test headers */
13130 #include <pthread.h>
13131 #if HAVE_PTHREADS < 7
13132 #include <errno.h>
13133 #endif
13134 #ifndef NULL
13135 #define NULL (void*)0
13136 #endif
13137
13138 static void *task(p)
13139         void *p;
13140 {
13141         return (void *) (p == NULL);
13142 }
13143
13144
13145 int main(argc, argv)
13146         int argc;
13147         char **argv;
13148 {
13149
13150         /* pthread test function */
13151 #ifndef PTHREAD_CREATE_DETACHED
13152 #define PTHREAD_CREATE_DETACHED 1
13153 #endif
13154         pthread_t t;
13155         int status;
13156         int detach = PTHREAD_CREATE_DETACHED;
13157
13158 #if HAVE_PTHREADS > 4
13159         /* Final pthreads */
13160         pthread_attr_t attr;
13161
13162         status = pthread_attr_init(&attr);
13163         if( status ) return status;
13164
13165 #if HAVE_PTHREADS < 7
13166         status = pthread_attr_setdetachstate(&attr, &detach);
13167         if( status < 0 ) status = errno;
13168 #else
13169         status = pthread_attr_setdetachstate(&attr, detach);
13170 #endif
13171         if( status ) return status;
13172         status = pthread_create( &t, &attr, task, NULL );
13173 #if HAVE_PTHREADS < 7
13174         if( status < 0 ) status = errno;
13175 #endif
13176         if( status ) return status;
13177 #else
13178         /* Draft 4 pthreads */
13179         status = pthread_create( &t, pthread_attr_default, task, NULL );
13180         if( status ) return errno;
13181
13182         /* give thread a chance to complete */
13183         /* it should remain joinable and hence detachable */
13184         sleep( 1 );
13185
13186         status = pthread_detach( &t );
13187         if( status ) return errno;
13188 #endif
13189
13190 #ifdef HAVE_LINUX_THREADS
13191         pthread_kill_other_threads_np();
13192 #endif
13193
13194         return 0;
13195
13196 }
13197
13198 _ACEOF
13199 if ac_fn_c_try_run "$LINENO"; then :
13200   ol_cv_pthread_threads=yes
13201 else
13202   ol_cv_pthread_threads=no
13203 fi
13204 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13205   conftest.$ac_objext conftest.beam conftest.$ac_ext
13206 fi
13207
13208
13209                 # restore the LIBS
13210                 LIBS="$ol_LIBS"
13211
13212 fi
13213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
13214 $as_echo "$ol_cv_pthread_threads" >&6; }
13215
13216         if test $ol_cv_pthread_threads = yes ; then
13217                 ol_link_pthreads="-threads"
13218                 ol_link_threads=posix
13219         fi
13220 fi
13221
13222
13223                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13224 if test "$ol_link_threads" = no ; then
13225         # try -lpthreads -lmach -lexc -lc_r
13226         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13227 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
13228 if ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+:} false; then :
13229   $as_echo_n "(cached) " >&6
13230 else
13231
13232                 # save the flags
13233                 ol_LIBS="$LIBS"
13234                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13235
13236                 if test "$cross_compiling" = yes; then :
13237   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13238 /* end confdefs.h.  */
13239
13240 /* pthread test headers */
13241 #include <pthread.h>
13242 #if HAVE_PTHREADS < 7
13243 #include <errno.h>
13244 #endif
13245 #ifndef NULL
13246 #define NULL (void*)0
13247 #endif
13248
13249 static void *task(p)
13250         void *p;
13251 {
13252         return (void *) (p == NULL);
13253 }
13254
13255 int
13256 main ()
13257 {
13258
13259         /* pthread test function */
13260 #ifndef PTHREAD_CREATE_DETACHED
13261 #define PTHREAD_CREATE_DETACHED 1
13262 #endif
13263         pthread_t t;
13264         int status;
13265         int detach = PTHREAD_CREATE_DETACHED;
13266
13267 #if HAVE_PTHREADS > 4
13268         /* Final pthreads */
13269         pthread_attr_t attr;
13270
13271         status = pthread_attr_init(&attr);
13272         if( status ) return status;
13273
13274 #if HAVE_PTHREADS < 7
13275         status = pthread_attr_setdetachstate(&attr, &detach);
13276         if( status < 0 ) status = errno;
13277 #else
13278         status = pthread_attr_setdetachstate(&attr, detach);
13279 #endif
13280         if( status ) return status;
13281         status = pthread_create( &t, &attr, task, NULL );
13282 #if HAVE_PTHREADS < 7
13283         if( status < 0 ) status = errno;
13284 #endif
13285         if( status ) return status;
13286 #else
13287         /* Draft 4 pthreads */
13288         status = pthread_create( &t, pthread_attr_default, task, NULL );
13289         if( status ) return errno;
13290
13291         /* give thread a chance to complete */
13292         /* it should remain joinable and hence detachable */
13293         sleep( 1 );
13294
13295         status = pthread_detach( &t );
13296         if( status ) return errno;
13297 #endif
13298
13299 #ifdef HAVE_LINUX_THREADS
13300         pthread_kill_other_threads_np();
13301 #endif
13302
13303         return 0;
13304
13305   ;
13306   return 0;
13307 }
13308 _ACEOF
13309 if ac_fn_c_try_link "$LINENO"; then :
13310   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13311 else
13312   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13313 fi
13314 rm -f core conftest.err conftest.$ac_objext \
13315     conftest$ac_exeext conftest.$ac_ext
13316 else
13317   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13318 /* end confdefs.h.  */
13319
13320
13321 /* pthread test headers */
13322 #include <pthread.h>
13323 #if HAVE_PTHREADS < 7
13324 #include <errno.h>
13325 #endif
13326 #ifndef NULL
13327 #define NULL (void*)0
13328 #endif
13329
13330 static void *task(p)
13331         void *p;
13332 {
13333         return (void *) (p == NULL);
13334 }
13335
13336
13337 int main(argc, argv)
13338         int argc;
13339         char **argv;
13340 {
13341
13342         /* pthread test function */
13343 #ifndef PTHREAD_CREATE_DETACHED
13344 #define PTHREAD_CREATE_DETACHED 1
13345 #endif
13346         pthread_t t;
13347         int status;
13348         int detach = PTHREAD_CREATE_DETACHED;
13349
13350 #if HAVE_PTHREADS > 4
13351         /* Final pthreads */
13352         pthread_attr_t attr;
13353
13354         status = pthread_attr_init(&attr);
13355         if( status ) return status;
13356
13357 #if HAVE_PTHREADS < 7
13358         status = pthread_attr_setdetachstate(&attr, &detach);
13359         if( status < 0 ) status = errno;
13360 #else
13361         status = pthread_attr_setdetachstate(&attr, detach);
13362 #endif
13363         if( status ) return status;
13364         status = pthread_create( &t, &attr, task, NULL );
13365 #if HAVE_PTHREADS < 7
13366         if( status < 0 ) status = errno;
13367 #endif
13368         if( status ) return status;
13369 #else
13370         /* Draft 4 pthreads */
13371         status = pthread_create( &t, pthread_attr_default, task, NULL );
13372         if( status ) return errno;
13373
13374         /* give thread a chance to complete */
13375         /* it should remain joinable and hence detachable */
13376         sleep( 1 );
13377
13378         status = pthread_detach( &t );
13379         if( status ) return errno;
13380 #endif
13381
13382 #ifdef HAVE_LINUX_THREADS
13383         pthread_kill_other_threads_np();
13384 #endif
13385
13386         return 0;
13387
13388 }
13389
13390 _ACEOF
13391 if ac_fn_c_try_run "$LINENO"; then :
13392   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13393 else
13394   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13395 fi
13396 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13397   conftest.$ac_objext conftest.beam conftest.$ac_ext
13398 fi
13399
13400
13401                 # restore the LIBS
13402                 LIBS="$ol_LIBS"
13403
13404 fi
13405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
13406 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
13407
13408         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
13409                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
13410                 ol_link_threads=posix
13411         fi
13412 fi
13413
13414                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
13415 if test "$ol_link_threads" = no ; then
13416         # try -lpthreads -lmach -lexc
13417         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
13418 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
13419 if ${ol_cv_pthread_lpthreads_lmach_lexc+:} false; then :
13420   $as_echo_n "(cached) " >&6
13421 else
13422
13423                 # save the flags
13424                 ol_LIBS="$LIBS"
13425                 LIBS="-lpthreads -lmach -lexc $LIBS"
13426
13427                 if test "$cross_compiling" = yes; then :
13428   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13429 /* end confdefs.h.  */
13430
13431 /* pthread test headers */
13432 #include <pthread.h>
13433 #if HAVE_PTHREADS < 7
13434 #include <errno.h>
13435 #endif
13436 #ifndef NULL
13437 #define NULL (void*)0
13438 #endif
13439
13440 static void *task(p)
13441         void *p;
13442 {
13443         return (void *) (p == NULL);
13444 }
13445
13446 int
13447 main ()
13448 {
13449
13450         /* pthread test function */
13451 #ifndef PTHREAD_CREATE_DETACHED
13452 #define PTHREAD_CREATE_DETACHED 1
13453 #endif
13454         pthread_t t;
13455         int status;
13456         int detach = PTHREAD_CREATE_DETACHED;
13457
13458 #if HAVE_PTHREADS > 4
13459         /* Final pthreads */
13460         pthread_attr_t attr;
13461
13462         status = pthread_attr_init(&attr);
13463         if( status ) return status;
13464
13465 #if HAVE_PTHREADS < 7
13466         status = pthread_attr_setdetachstate(&attr, &detach);
13467         if( status < 0 ) status = errno;
13468 #else
13469         status = pthread_attr_setdetachstate(&attr, detach);
13470 #endif
13471         if( status ) return status;
13472         status = pthread_create( &t, &attr, task, NULL );
13473 #if HAVE_PTHREADS < 7
13474         if( status < 0 ) status = errno;
13475 #endif
13476         if( status ) return status;
13477 #else
13478         /* Draft 4 pthreads */
13479         status = pthread_create( &t, pthread_attr_default, task, NULL );
13480         if( status ) return errno;
13481
13482         /* give thread a chance to complete */
13483         /* it should remain joinable and hence detachable */
13484         sleep( 1 );
13485
13486         status = pthread_detach( &t );
13487         if( status ) return errno;
13488 #endif
13489
13490 #ifdef HAVE_LINUX_THREADS
13491         pthread_kill_other_threads_np();
13492 #endif
13493
13494         return 0;
13495
13496   ;
13497   return 0;
13498 }
13499 _ACEOF
13500 if ac_fn_c_try_link "$LINENO"; then :
13501   ol_cv_pthread_lpthreads_lmach_lexc=yes
13502 else
13503   ol_cv_pthread_lpthreads_lmach_lexc=no
13504 fi
13505 rm -f core conftest.err conftest.$ac_objext \
13506     conftest$ac_exeext conftest.$ac_ext
13507 else
13508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13509 /* end confdefs.h.  */
13510
13511
13512 /* pthread test headers */
13513 #include <pthread.h>
13514 #if HAVE_PTHREADS < 7
13515 #include <errno.h>
13516 #endif
13517 #ifndef NULL
13518 #define NULL (void*)0
13519 #endif
13520
13521 static void *task(p)
13522         void *p;
13523 {
13524         return (void *) (p == NULL);
13525 }
13526
13527
13528 int main(argc, argv)
13529         int argc;
13530         char **argv;
13531 {
13532
13533         /* pthread test function */
13534 #ifndef PTHREAD_CREATE_DETACHED
13535 #define PTHREAD_CREATE_DETACHED 1
13536 #endif
13537         pthread_t t;
13538         int status;
13539         int detach = PTHREAD_CREATE_DETACHED;
13540
13541 #if HAVE_PTHREADS > 4
13542         /* Final pthreads */
13543         pthread_attr_t attr;
13544
13545         status = pthread_attr_init(&attr);
13546         if( status ) return status;
13547
13548 #if HAVE_PTHREADS < 7
13549         status = pthread_attr_setdetachstate(&attr, &detach);
13550         if( status < 0 ) status = errno;
13551 #else
13552         status = pthread_attr_setdetachstate(&attr, detach);
13553 #endif
13554         if( status ) return status;
13555         status = pthread_create( &t, &attr, task, NULL );
13556 #if HAVE_PTHREADS < 7
13557         if( status < 0 ) status = errno;
13558 #endif
13559         if( status ) return status;
13560 #else
13561         /* Draft 4 pthreads */
13562         status = pthread_create( &t, pthread_attr_default, task, NULL );
13563         if( status ) return errno;
13564
13565         /* give thread a chance to complete */
13566         /* it should remain joinable and hence detachable */
13567         sleep( 1 );
13568
13569         status = pthread_detach( &t );
13570         if( status ) return errno;
13571 #endif
13572
13573 #ifdef HAVE_LINUX_THREADS
13574         pthread_kill_other_threads_np();
13575 #endif
13576
13577         return 0;
13578
13579 }
13580
13581 _ACEOF
13582 if ac_fn_c_try_run "$LINENO"; then :
13583   ol_cv_pthread_lpthreads_lmach_lexc=yes
13584 else
13585   ol_cv_pthread_lpthreads_lmach_lexc=no
13586 fi
13587 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13588   conftest.$ac_objext conftest.beam conftest.$ac_ext
13589 fi
13590
13591
13592                 # restore the LIBS
13593                 LIBS="$ol_LIBS"
13594
13595 fi
13596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
13597 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
13598
13599         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
13600                 ol_link_pthreads="-lpthreads -lmach -lexc"
13601                 ol_link_threads=posix
13602         fi
13603 fi
13604
13605                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
13606 if test "$ol_link_threads" = no ; then
13607         # try -lpthreads -lexc
13608         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
13609 $as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
13610 if ${ol_cv_pthread_lpthreads_lexc+:} false; then :
13611   $as_echo_n "(cached) " >&6
13612 else
13613
13614                 # save the flags
13615                 ol_LIBS="$LIBS"
13616                 LIBS="-lpthreads -lexc $LIBS"
13617
13618                 if test "$cross_compiling" = yes; then :
13619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13620 /* end confdefs.h.  */
13621
13622 /* pthread test headers */
13623 #include <pthread.h>
13624 #if HAVE_PTHREADS < 7
13625 #include <errno.h>
13626 #endif
13627 #ifndef NULL
13628 #define NULL (void*)0
13629 #endif
13630
13631 static void *task(p)
13632         void *p;
13633 {
13634         return (void *) (p == NULL);
13635 }
13636
13637 int
13638 main ()
13639 {
13640
13641         /* pthread test function */
13642 #ifndef PTHREAD_CREATE_DETACHED
13643 #define PTHREAD_CREATE_DETACHED 1
13644 #endif
13645         pthread_t t;
13646         int status;
13647         int detach = PTHREAD_CREATE_DETACHED;
13648
13649 #if HAVE_PTHREADS > 4
13650         /* Final pthreads */
13651         pthread_attr_t attr;
13652
13653         status = pthread_attr_init(&attr);
13654         if( status ) return status;
13655
13656 #if HAVE_PTHREADS < 7
13657         status = pthread_attr_setdetachstate(&attr, &detach);
13658         if( status < 0 ) status = errno;
13659 #else
13660         status = pthread_attr_setdetachstate(&attr, detach);
13661 #endif
13662         if( status ) return status;
13663         status = pthread_create( &t, &attr, task, NULL );
13664 #if HAVE_PTHREADS < 7
13665         if( status < 0 ) status = errno;
13666 #endif
13667         if( status ) return status;
13668 #else
13669         /* Draft 4 pthreads */
13670         status = pthread_create( &t, pthread_attr_default, task, NULL );
13671         if( status ) return errno;
13672
13673         /* give thread a chance to complete */
13674         /* it should remain joinable and hence detachable */
13675         sleep( 1 );
13676
13677         status = pthread_detach( &t );
13678         if( status ) return errno;
13679 #endif
13680
13681 #ifdef HAVE_LINUX_THREADS
13682         pthread_kill_other_threads_np();
13683 #endif
13684
13685         return 0;
13686
13687   ;
13688   return 0;
13689 }
13690 _ACEOF
13691 if ac_fn_c_try_link "$LINENO"; then :
13692   ol_cv_pthread_lpthreads_lexc=yes
13693 else
13694   ol_cv_pthread_lpthreads_lexc=no
13695 fi
13696 rm -f core conftest.err conftest.$ac_objext \
13697     conftest$ac_exeext conftest.$ac_ext
13698 else
13699   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13700 /* end confdefs.h.  */
13701
13702
13703 /* pthread test headers */
13704 #include <pthread.h>
13705 #if HAVE_PTHREADS < 7
13706 #include <errno.h>
13707 #endif
13708 #ifndef NULL
13709 #define NULL (void*)0
13710 #endif
13711
13712 static void *task(p)
13713         void *p;
13714 {
13715         return (void *) (p == NULL);
13716 }
13717
13718
13719 int main(argc, argv)
13720         int argc;
13721         char **argv;
13722 {
13723
13724         /* pthread test function */
13725 #ifndef PTHREAD_CREATE_DETACHED
13726 #define PTHREAD_CREATE_DETACHED 1
13727 #endif
13728         pthread_t t;
13729         int status;
13730         int detach = PTHREAD_CREATE_DETACHED;
13731
13732 #if HAVE_PTHREADS > 4
13733         /* Final pthreads */
13734         pthread_attr_t attr;
13735
13736         status = pthread_attr_init(&attr);
13737         if( status ) return status;
13738
13739 #if HAVE_PTHREADS < 7
13740         status = pthread_attr_setdetachstate(&attr, &detach);
13741         if( status < 0 ) status = errno;
13742 #else
13743         status = pthread_attr_setdetachstate(&attr, detach);
13744 #endif
13745         if( status ) return status;
13746         status = pthread_create( &t, &attr, task, NULL );
13747 #if HAVE_PTHREADS < 7
13748         if( status < 0 ) status = errno;
13749 #endif
13750         if( status ) return status;
13751 #else
13752         /* Draft 4 pthreads */
13753         status = pthread_create( &t, pthread_attr_default, task, NULL );
13754         if( status ) return errno;
13755
13756         /* give thread a chance to complete */
13757         /* it should remain joinable and hence detachable */
13758         sleep( 1 );
13759
13760         status = pthread_detach( &t );
13761         if( status ) return errno;
13762 #endif
13763
13764 #ifdef HAVE_LINUX_THREADS
13765         pthread_kill_other_threads_np();
13766 #endif
13767
13768         return 0;
13769
13770 }
13771
13772 _ACEOF
13773 if ac_fn_c_try_run "$LINENO"; then :
13774   ol_cv_pthread_lpthreads_lexc=yes
13775 else
13776   ol_cv_pthread_lpthreads_lexc=no
13777 fi
13778 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13779   conftest.$ac_objext conftest.beam conftest.$ac_ext
13780 fi
13781
13782
13783                 # restore the LIBS
13784                 LIBS="$ol_LIBS"
13785
13786 fi
13787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
13788 $as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
13789
13790         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
13791                 ol_link_pthreads="-lpthreads -lexc"
13792                 ol_link_threads=posix
13793         fi
13794 fi
13795
13796
13797                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
13798 if test "$ol_link_threads" = no ; then
13799         # try -lpthreads
13800         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
13801 $as_echo_n "checking for pthread link with -lpthreads... " >&6; }
13802 if ${ol_cv_pthread_lib_lpthreads+:} false; then :
13803   $as_echo_n "(cached) " >&6
13804 else
13805
13806                 # save the flags
13807                 ol_LIBS="$LIBS"
13808                 LIBS="-lpthreads $LIBS"
13809
13810                 if test "$cross_compiling" = yes; then :
13811   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13812 /* end confdefs.h.  */
13813
13814 /* pthread test headers */
13815 #include <pthread.h>
13816 #if HAVE_PTHREADS < 7
13817 #include <errno.h>
13818 #endif
13819 #ifndef NULL
13820 #define NULL (void*)0
13821 #endif
13822
13823 static void *task(p)
13824         void *p;
13825 {
13826         return (void *) (p == NULL);
13827 }
13828
13829 int
13830 main ()
13831 {
13832
13833         /* pthread test function */
13834 #ifndef PTHREAD_CREATE_DETACHED
13835 #define PTHREAD_CREATE_DETACHED 1
13836 #endif
13837         pthread_t t;
13838         int status;
13839         int detach = PTHREAD_CREATE_DETACHED;
13840
13841 #if HAVE_PTHREADS > 4
13842         /* Final pthreads */
13843         pthread_attr_t attr;
13844
13845         status = pthread_attr_init(&attr);
13846         if( status ) return status;
13847
13848 #if HAVE_PTHREADS < 7
13849         status = pthread_attr_setdetachstate(&attr, &detach);
13850         if( status < 0 ) status = errno;
13851 #else
13852         status = pthread_attr_setdetachstate(&attr, detach);
13853 #endif
13854         if( status ) return status;
13855         status = pthread_create( &t, &attr, task, NULL );
13856 #if HAVE_PTHREADS < 7
13857         if( status < 0 ) status = errno;
13858 #endif
13859         if( status ) return status;
13860 #else
13861         /* Draft 4 pthreads */
13862         status = pthread_create( &t, pthread_attr_default, task, NULL );
13863         if( status ) return errno;
13864
13865         /* give thread a chance to complete */
13866         /* it should remain joinable and hence detachable */
13867         sleep( 1 );
13868
13869         status = pthread_detach( &t );
13870         if( status ) return errno;
13871 #endif
13872
13873 #ifdef HAVE_LINUX_THREADS
13874         pthread_kill_other_threads_np();
13875 #endif
13876
13877         return 0;
13878
13879   ;
13880   return 0;
13881 }
13882 _ACEOF
13883 if ac_fn_c_try_link "$LINENO"; then :
13884   ol_cv_pthread_lib_lpthreads=yes
13885 else
13886   ol_cv_pthread_lib_lpthreads=no
13887 fi
13888 rm -f core conftest.err conftest.$ac_objext \
13889     conftest$ac_exeext conftest.$ac_ext
13890 else
13891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13892 /* end confdefs.h.  */
13893
13894
13895 /* pthread test headers */
13896 #include <pthread.h>
13897 #if HAVE_PTHREADS < 7
13898 #include <errno.h>
13899 #endif
13900 #ifndef NULL
13901 #define NULL (void*)0
13902 #endif
13903
13904 static void *task(p)
13905         void *p;
13906 {
13907         return (void *) (p == NULL);
13908 }
13909
13910
13911 int main(argc, argv)
13912         int argc;
13913         char **argv;
13914 {
13915
13916         /* pthread test function */
13917 #ifndef PTHREAD_CREATE_DETACHED
13918 #define PTHREAD_CREATE_DETACHED 1
13919 #endif
13920         pthread_t t;
13921         int status;
13922         int detach = PTHREAD_CREATE_DETACHED;
13923
13924 #if HAVE_PTHREADS > 4
13925         /* Final pthreads */
13926         pthread_attr_t attr;
13927
13928         status = pthread_attr_init(&attr);
13929         if( status ) return status;
13930
13931 #if HAVE_PTHREADS < 7
13932         status = pthread_attr_setdetachstate(&attr, &detach);
13933         if( status < 0 ) status = errno;
13934 #else
13935         status = pthread_attr_setdetachstate(&attr, detach);
13936 #endif
13937         if( status ) return status;
13938         status = pthread_create( &t, &attr, task, NULL );
13939 #if HAVE_PTHREADS < 7
13940         if( status < 0 ) status = errno;
13941 #endif
13942         if( status ) return status;
13943 #else
13944         /* Draft 4 pthreads */
13945         status = pthread_create( &t, pthread_attr_default, task, NULL );
13946         if( status ) return errno;
13947
13948         /* give thread a chance to complete */
13949         /* it should remain joinable and hence detachable */
13950         sleep( 1 );
13951
13952         status = pthread_detach( &t );
13953         if( status ) return errno;
13954 #endif
13955
13956 #ifdef HAVE_LINUX_THREADS
13957         pthread_kill_other_threads_np();
13958 #endif
13959
13960         return 0;
13961
13962 }
13963
13964 _ACEOF
13965 if ac_fn_c_try_run "$LINENO"; then :
13966   ol_cv_pthread_lib_lpthreads=yes
13967 else
13968   ol_cv_pthread_lib_lpthreads=no
13969 fi
13970 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13971   conftest.$ac_objext conftest.beam conftest.$ac_ext
13972 fi
13973
13974
13975                 # restore the LIBS
13976                 LIBS="$ol_LIBS"
13977
13978 fi
13979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
13980 $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
13981
13982         if test $ol_cv_pthread_lib_lpthreads = yes ; then
13983                 ol_link_pthreads="-lpthreads"
13984                 ol_link_threads=posix
13985         fi
13986 fi
13987
13988
13989 { $as_echo "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
13990 $as_echo "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
13991
13992                 if test $ol_link_threads != no ; then
13993                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
13994
13995                                                 save_CPPFLAGS="$CPPFLAGS"
13996                         save_LIBS="$LIBS"
13997                         LIBS="$LTHREAD_LIBS $LIBS"
13998
13999                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14000 do :
14001   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14002 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14003 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14004   cat >>confdefs.h <<_ACEOF
14005 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14006 _ACEOF
14007
14008 fi
14009 done
14010
14011
14012                         if test $ac_cv_func_sched_yield = no &&
14013                            test $ac_cv_func_pthread_yield = no &&
14014                            test $ac_cv_func_thr_yield = no ; then
14015                                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
14016 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
14017 if ${ac_cv_lib_rt_sched_yield+:} false; then :
14018   $as_echo_n "(cached) " >&6
14019 else
14020   ac_check_lib_save_LIBS=$LIBS
14021 LIBS="-lrt  $LIBS"
14022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14023 /* end confdefs.h.  */
14024
14025 /* Override any GCC internal prototype to avoid an error.
14026    Use char because int might match the return type of a GCC
14027    builtin and then its argument prototype would still apply.  */
14028 #ifdef __cplusplus
14029 extern "C"
14030 #endif
14031 char sched_yield ();
14032 int
14033 main ()
14034 {
14035 return sched_yield ();
14036   ;
14037   return 0;
14038 }
14039 _ACEOF
14040 if ac_fn_c_try_link "$LINENO"; then :
14041   ac_cv_lib_rt_sched_yield=yes
14042 else
14043   ac_cv_lib_rt_sched_yield=no
14044 fi
14045 rm -f core conftest.err conftest.$ac_objext \
14046     conftest$ac_exeext conftest.$ac_ext
14047 LIBS=$ac_check_lib_save_LIBS
14048 fi
14049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
14050 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
14051 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
14052   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14053
14054 $as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
14055
14056                                         ac_cv_func_sched_yield=yes
14057 else
14058   ac_cv_func_sched_yield=no
14059 fi
14060
14061                         fi
14062                         if test $ac_cv_func_sched_yield = no &&
14063                            test $ac_cv_func_pthread_yield = no &&
14064                            test "$ac_cv_func_thr_yield" = no ; then
14065                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
14066 $as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
14067                         fi
14068
14069                                                 for ac_func in pthread_kill
14070 do :
14071   ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
14072 if test "x$ac_cv_func_pthread_kill" = xyes; then :
14073   cat >>confdefs.h <<_ACEOF
14074 #define HAVE_PTHREAD_KILL 1
14075 _ACEOF
14076
14077 fi
14078 done
14079
14080
14081                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
14082 $as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
14083 if ${ol_cv_func_pthread_rwlock_destroy+:} false; then :
14084   $as_echo_n "(cached) " >&6
14085 else
14086
14087                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14088 /* end confdefs.h.  */
14089
14090 #include <pthread.h>
14091 pthread_rwlock_t rwlock;
14092
14093 int
14094 main ()
14095 {
14096 pthread_rwlock_destroy(&rwlock);
14097   ;
14098   return 0;
14099 }
14100 _ACEOF
14101 if ac_fn_c_try_link "$LINENO"; then :
14102   ol_cv_func_pthread_rwlock_destroy=yes
14103 else
14104   ol_cv_func_pthread_rwlock_destroy=no
14105 fi
14106 rm -f core conftest.err conftest.$ac_objext \
14107     conftest$ac_exeext conftest.$ac_ext
14108
14109 fi
14110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
14111 $as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
14112                         if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
14113
14114 $as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
14115
14116                         fi
14117
14118                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
14119 $as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
14120 if ${ol_cv_func_pthread_detach+:} false; then :
14121   $as_echo_n "(cached) " >&6
14122 else
14123
14124                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14125 /* end confdefs.h.  */
14126
14127 #include <pthread.h>
14128 #ifndef NULL
14129 #define NULL (void*)0
14130 #endif
14131
14132 int
14133 main ()
14134 {
14135 pthread_detach(NULL);
14136   ;
14137   return 0;
14138 }
14139 _ACEOF
14140 if ac_fn_c_try_link "$LINENO"; then :
14141   ol_cv_func_pthread_detach=yes
14142 else
14143   ol_cv_func_pthread_detach=no
14144 fi
14145 rm -f core conftest.err conftest.$ac_objext \
14146     conftest$ac_exeext conftest.$ac_ext
14147
14148 fi
14149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
14150 $as_echo "$ol_cv_func_pthread_detach" >&6; }
14151
14152                         if test $ol_cv_func_pthread_detach = no ; then
14153                                 as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
14154                         fi
14155
14156
14157 $as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
14158
14159
14160                                                 for ac_func in \
14161                                 pthread_setconcurrency \
14162                                 pthread_getconcurrency \
14163                                 thr_setconcurrency \
14164                                 thr_getconcurrency \
14165
14166 do :
14167   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14168 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14169 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14170   cat >>confdefs.h <<_ACEOF
14171 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14172 _ACEOF
14173
14174 fi
14175 done
14176
14177
14178
14179         for ac_func in pthread_kill_other_threads_np
14180 do :
14181   ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
14182 if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes; then :
14183   cat >>confdefs.h <<_ACEOF
14184 #define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
14185 _ACEOF
14186
14187 fi
14188 done
14189
14190         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
14191 $as_echo_n "checking for LinuxThreads implementation... " >&6; }
14192 if ${ol_cv_sys_linux_threads+:} false; then :
14193   $as_echo_n "(cached) " >&6
14194 else
14195   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14196 fi
14197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
14198 $as_echo "$ol_cv_sys_linux_threads" >&6; }
14199
14200
14201
14202
14203         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
14204 $as_echo_n "checking for LinuxThreads consistency... " >&6; }
14205 if ${ol_cv_linux_threads+:} false; then :
14206   $as_echo_n "(cached) " >&6
14207 else
14208
14209                 if test $ol_cv_header_linux_threads = yes &&
14210                    test $ol_cv_sys_linux_threads = yes; then
14211                         ol_cv_linux_threads=yes
14212                 elif test $ol_cv_header_linux_threads = no &&
14213                      test $ol_cv_sys_linux_threads = no; then
14214                         ol_cv_linux_threads=no
14215                 else
14216                         ol_cv_linux_threads=error
14217                 fi
14218
14219 fi
14220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
14221 $as_echo "$ol_cv_linux_threads" >&6; }
14222
14223
14224                         if test $ol_cv_linux_threads = error; then
14225                                 as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
14226                         fi
14227
14228                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
14229 $as_echo_n "checking if pthread_create() works... " >&6; }
14230 if ${ol_cv_pthread_create_works+:} false; then :
14231   $as_echo_n "(cached) " >&6
14232 else
14233
14234                         if test "$cross_compiling" = yes; then :
14235                                 ol_cv_pthread_create_works=yes
14236 else
14237   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14238 /* end confdefs.h.  */
14239
14240
14241 /* pthread test headers */
14242 #include <pthread.h>
14243 #if HAVE_PTHREADS < 7
14244 #include <errno.h>
14245 #endif
14246 #ifndef NULL
14247 #define NULL (void*)0
14248 #endif
14249
14250 static void *task(p)
14251         void *p;
14252 {
14253         return (void *) (p == NULL);
14254 }
14255
14256
14257 int main(argc, argv)
14258         int argc;
14259         char **argv;
14260 {
14261
14262         /* pthread test function */
14263 #ifndef PTHREAD_CREATE_DETACHED
14264 #define PTHREAD_CREATE_DETACHED 1
14265 #endif
14266         pthread_t t;
14267         int status;
14268         int detach = PTHREAD_CREATE_DETACHED;
14269
14270 #if HAVE_PTHREADS > 4
14271         /* Final pthreads */
14272         pthread_attr_t attr;
14273
14274         status = pthread_attr_init(&attr);
14275         if( status ) return status;
14276
14277 #if HAVE_PTHREADS < 7
14278         status = pthread_attr_setdetachstate(&attr, &detach);
14279         if( status < 0 ) status = errno;
14280 #else
14281         status = pthread_attr_setdetachstate(&attr, detach);
14282 #endif
14283         if( status ) return status;
14284         status = pthread_create( &t, &attr, task, NULL );
14285 #if HAVE_PTHREADS < 7
14286         if( status < 0 ) status = errno;
14287 #endif
14288         if( status ) return status;
14289 #else
14290         /* Draft 4 pthreads */
14291         status = pthread_create( &t, pthread_attr_default, task, NULL );
14292         if( status ) return errno;
14293
14294         /* give thread a chance to complete */
14295         /* it should remain joinable and hence detachable */
14296         sleep( 1 );
14297
14298         status = pthread_detach( &t );
14299         if( status ) return errno;
14300 #endif
14301
14302 #ifdef HAVE_LINUX_THREADS
14303         pthread_kill_other_threads_np();
14304 #endif
14305
14306         return 0;
14307
14308 }
14309
14310 _ACEOF
14311 if ac_fn_c_try_run "$LINENO"; then :
14312   ol_cv_pthread_create_works=yes
14313 else
14314   ol_cv_pthread_create_works=no
14315 fi
14316 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14317   conftest.$ac_objext conftest.beam conftest.$ac_ext
14318 fi
14319
14320 fi
14321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
14322 $as_echo "$ol_cv_pthread_create_works" >&6; }
14323
14324                         if test $ol_cv_pthread_create_works = no ; then
14325                                 as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
14326                         fi
14327
14328                         ol_replace_broken_yield=no
14329
14330                         if test $ol_replace_broken_yield = yes ; then
14331
14332 $as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
14333
14334                         fi
14335
14336                                                 if test x$ol_with_yielding_select = xauto ; then
14337                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
14338 $as_echo_n "checking if select yields when using pthreads... " >&6; }
14339 if ${ol_cv_pthread_select_yields+:} false; then :
14340   $as_echo_n "(cached) " >&6
14341 else
14342
14343                                 if test "$cross_compiling" = yes; then :
14344   ol_cv_pthread_select_yields=cross
14345 else
14346   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14347 /* end confdefs.h.  */
14348
14349 #include <sys/types.h>
14350 #include <sys/time.h>
14351 #include <unistd.h>
14352 #include <pthread.h>
14353 #ifndef NULL
14354 #define NULL (void*) 0
14355 #endif
14356
14357 static int fildes[2];
14358
14359 static void *task(p)
14360         void *p;
14361 {
14362         int i;
14363         struct timeval tv;
14364
14365         fd_set rfds;
14366
14367         tv.tv_sec=10;
14368         tv.tv_usec=0;
14369
14370         FD_ZERO(&rfds);
14371         FD_SET(fildes[0], &rfds);
14372
14373         /* we're not interested in any fds */
14374         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
14375
14376         if(i < 0) {
14377                 perror("select");
14378                 exit(10);
14379         }
14380
14381         exit(0); /* if we exit here, the select blocked the whole process */
14382 }
14383
14384 int main(argc, argv)
14385         int argc;
14386         char **argv;
14387 {
14388         pthread_t t;
14389
14390         /* create a pipe to select */
14391         if(pipe(&fildes[0])) {
14392                 perror("select");
14393                 exit(1);
14394         }
14395
14396 #ifdef HAVE_PTHREAD_SETCONCURRENCY
14397         (void) pthread_setconcurrency(2);
14398 #else
14399 #ifdef HAVE_THR_SETCONCURRENCY
14400         /* Set Solaris LWP concurrency to 2 */
14401         thr_setconcurrency(2);
14402 #endif
14403 #endif
14404
14405 #if HAVE_PTHREADS < 6
14406         pthread_create(&t, pthread_attr_default, task, NULL);
14407 #else
14408         pthread_create(&t, NULL, task, NULL);
14409 #endif
14410
14411         /* make sure task runs first */
14412 #ifdef HAVE_THR_YIELD
14413         thr_yield();
14414 #elif defined( HAVE_SCHED_YIELD )
14415         sched_yield();
14416 #elif defined( HAVE_PTHREAD_YIELD )
14417         pthread_yield();
14418 #endif
14419
14420         exit(2);
14421 }
14422 _ACEOF
14423 if ac_fn_c_try_run "$LINENO"; then :
14424   ol_cv_pthread_select_yields=no
14425 else
14426   ol_cv_pthread_select_yields=yes
14427 fi
14428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14429   conftest.$ac_objext conftest.beam conftest.$ac_ext
14430 fi
14431
14432 fi
14433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
14434 $as_echo "$ol_cv_pthread_select_yields" >&6; }
14435
14436                                 if test $ol_cv_pthread_select_yields = cross ; then
14437                                         as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
14438                                 fi
14439
14440                                 if test $ol_cv_pthread_select_yields = yes ; then
14441                                         ol_with_yielding_select=yes
14442                                 fi
14443                         fi
14444
14445                                                 CPPFLAGS="$save_CPPFLAGS"
14446                         LIBS="$save_LIBS"
14447                 else
14448                         as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
14449                 fi
14450         fi
14451
14452         if test $ol_with_threads = posix ; then
14453                 as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
14454         fi
14455         ;;
14456 esac
14457
14458 case $ol_with_threads in auto | yes | mach)
14459
14460                 for ac_header in mach/cthreads.h cthreads.h
14461 do :
14462   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14463 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14464 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14465   cat >>confdefs.h <<_ACEOF
14466 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14467 _ACEOF
14468
14469 fi
14470
14471 done
14472
14473         if test $ac_cv_header_mach_cthreads_h = yes ; then
14474                 ol_with_threads=found
14475
14476                                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
14477 if test "x$ac_cv_func_cthread_fork" = xyes; then :
14478   ol_link_threads=yes
14479 fi
14480
14481
14482                 if test $ol_link_threads = no ; then
14483                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
14484 $as_echo_n "checking for cthread_fork with -all_load... " >&6; }
14485 if ${ol_cv_cthread_all_load+:} false; then :
14486   $as_echo_n "(cached) " >&6
14487 else
14488
14489                                                                 save_LIBS="$LIBS"
14490                                 LIBS="-all_load $LIBS"
14491                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14492 /* end confdefs.h.  */
14493 #include <mach/cthreads.h>
14494 int
14495 main ()
14496 {
14497
14498                                         cthread_fork((void *)0, (void *)0);
14499
14500   ;
14501   return 0;
14502 }
14503 _ACEOF
14504 if ac_fn_c_try_link "$LINENO"; then :
14505   ol_cv_cthread_all_load=yes
14506 else
14507   ol_cv_cthread_all_load=no
14508 fi
14509 rm -f core conftest.err conftest.$ac_objext \
14510     conftest$ac_exeext conftest.$ac_ext
14511                                                                 LIBS="$save_LIBS"
14512
14513 fi
14514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
14515 $as_echo "$ol_cv_cthread_all_load" >&6; }
14516
14517                         if test $ol_cv_cthread_all_load = yes ; then
14518                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
14519                                 ol_link_threads=mach
14520                                 ol_with_threads=found
14521                         fi
14522                 fi
14523
14524         elif test $ac_cv_header_cthreads_h = yes ; then
14525
14526                 ol_with_threads=found
14527
14528                                 save_LIBS="$LIBS"
14529                 LIBS="$LIBS -lthreads"
14530                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
14531 if test "x$ac_cv_func_cthread_fork" = xyes; then :
14532   ol_link_threads=yes
14533 fi
14534
14535                 LIBS="$save_LIBS"
14536
14537                 if test $ol_link_threads = yes ; then
14538                         LTHREAD_LIBS="-lthreads"
14539                         ol_link_threads=mach
14540                         ol_with_threads=found
14541                 else
14542                         as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
14543                 fi
14544
14545         elif test $ol_with_threads = mach ; then
14546                 as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
14547         fi
14548
14549         if test $ol_link_threads = mach ; then
14550
14551 $as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
14552
14553         elif test $ol_with_threads = found ; then
14554                 as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
14555         fi
14556         ;;
14557 esac
14558
14559 case $ol_with_threads in auto | yes | pth)
14560
14561         for ac_header in pth.h
14562 do :
14563   ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
14564 if test "x$ac_cv_header_pth_h" = xyes; then :
14565   cat >>confdefs.h <<_ACEOF
14566 #define HAVE_PTH_H 1
14567 _ACEOF
14568
14569 fi
14570
14571 done
14572
14573
14574         if test $ac_cv_header_pth_h = yes ; then
14575                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
14576 $as_echo_n "checking for pth_version in -lpth... " >&6; }
14577 if ${ac_cv_lib_pth_pth_version+:} false; then :
14578   $as_echo_n "(cached) " >&6
14579 else
14580   ac_check_lib_save_LIBS=$LIBS
14581 LIBS="-lpth  $LIBS"
14582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14583 /* end confdefs.h.  */
14584
14585 /* Override any GCC internal prototype to avoid an error.
14586    Use char because int might match the return type of a GCC
14587    builtin and then its argument prototype would still apply.  */
14588 #ifdef __cplusplus
14589 extern "C"
14590 #endif
14591 char pth_version ();
14592 int
14593 main ()
14594 {
14595 return pth_version ();
14596   ;
14597   return 0;
14598 }
14599 _ACEOF
14600 if ac_fn_c_try_link "$LINENO"; then :
14601   ac_cv_lib_pth_pth_version=yes
14602 else
14603   ac_cv_lib_pth_pth_version=no
14604 fi
14605 rm -f core conftest.err conftest.$ac_objext \
14606     conftest$ac_exeext conftest.$ac_ext
14607 LIBS=$ac_check_lib_save_LIBS
14608 fi
14609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
14610 $as_echo "$ac_cv_lib_pth_pth_version" >&6; }
14611 if test "x$ac_cv_lib_pth_pth_version" = xyes; then :
14612   have_pth=yes
14613 else
14614   have_pth=no
14615 fi
14616
14617
14618                 if test $have_pth = yes ; then
14619
14620 $as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
14621
14622                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
14623                         ol_link_threads=pth
14624                         ol_with_threads=found
14625
14626                         if test x$ol_with_yielding_select = xauto ; then
14627                                 ol_with_yielding_select=yes
14628                         fi
14629                 fi
14630         fi
14631         ;;
14632 esac
14633
14634 case $ol_with_threads in auto | yes | lwp)
14635
14636                 for ac_header in thread.h synch.h
14637 do :
14638   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14639 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14640 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14641   cat >>confdefs.h <<_ACEOF
14642 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14643 _ACEOF
14644
14645 fi
14646
14647 done
14648
14649         if test $ac_cv_header_thread_h = yes &&
14650            test $ac_cv_header_synch_h = yes ; then
14651                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
14652 $as_echo_n "checking for thr_create in -lthread... " >&6; }
14653 if ${ac_cv_lib_thread_thr_create+:} false; then :
14654   $as_echo_n "(cached) " >&6
14655 else
14656   ac_check_lib_save_LIBS=$LIBS
14657 LIBS="-lthread  $LIBS"
14658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14659 /* end confdefs.h.  */
14660
14661 /* Override any GCC internal prototype to avoid an error.
14662    Use char because int might match the return type of a GCC
14663    builtin and then its argument prototype would still apply.  */
14664 #ifdef __cplusplus
14665 extern "C"
14666 #endif
14667 char thr_create ();
14668 int
14669 main ()
14670 {
14671 return thr_create ();
14672   ;
14673   return 0;
14674 }
14675 _ACEOF
14676 if ac_fn_c_try_link "$LINENO"; then :
14677   ac_cv_lib_thread_thr_create=yes
14678 else
14679   ac_cv_lib_thread_thr_create=no
14680 fi
14681 rm -f core conftest.err conftest.$ac_objext \
14682     conftest$ac_exeext conftest.$ac_ext
14683 LIBS=$ac_check_lib_save_LIBS
14684 fi
14685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
14686 $as_echo "$ac_cv_lib_thread_thr_create" >&6; }
14687 if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
14688   have_thr=yes
14689 else
14690   have_thr=no
14691 fi
14692
14693
14694                 if test $have_thr = yes ; then
14695
14696 $as_echo "#define HAVE_THR 1" >>confdefs.h
14697
14698                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
14699                         ol_link_threads=thr
14700
14701                         if test x$ol_with_yielding_select = xauto ; then
14702                                 ol_with_yielding_select=yes
14703                         fi
14704
14705                                                 for ac_func in \
14706                                 thr_setconcurrency \
14707                                 thr_getconcurrency \
14708
14709 do :
14710   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14711 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14712 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14713   cat >>confdefs.h <<_ACEOF
14714 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14715 _ACEOF
14716
14717 fi
14718 done
14719
14720                 fi
14721         fi
14722
14723                 for ac_header in lwp/lwp.h
14724 do :
14725   ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
14726 if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
14727   cat >>confdefs.h <<_ACEOF
14728 #define HAVE_LWP_LWP_H 1
14729 _ACEOF
14730
14731 fi
14732
14733 done
14734
14735         if test $ac_cv_header_lwp_lwp_h = yes ; then
14736                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
14737 $as_echo_n "checking for lwp_create in -llwp... " >&6; }
14738 if ${ac_cv_lib_lwp_lwp_create+:} false; then :
14739   $as_echo_n "(cached) " >&6
14740 else
14741   ac_check_lib_save_LIBS=$LIBS
14742 LIBS="-llwp  $LIBS"
14743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14744 /* end confdefs.h.  */
14745
14746 /* Override any GCC internal prototype to avoid an error.
14747    Use char because int might match the return type of a GCC
14748    builtin and then its argument prototype would still apply.  */
14749 #ifdef __cplusplus
14750 extern "C"
14751 #endif
14752 char lwp_create ();
14753 int
14754 main ()
14755 {
14756 return lwp_create ();
14757   ;
14758   return 0;
14759 }
14760 _ACEOF
14761 if ac_fn_c_try_link "$LINENO"; then :
14762   ac_cv_lib_lwp_lwp_create=yes
14763 else
14764   ac_cv_lib_lwp_lwp_create=no
14765 fi
14766 rm -f core conftest.err conftest.$ac_objext \
14767     conftest$ac_exeext conftest.$ac_ext
14768 LIBS=$ac_check_lib_save_LIBS
14769 fi
14770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
14771 $as_echo "$ac_cv_lib_lwp_lwp_create" >&6; }
14772 if test "x$ac_cv_lib_lwp_lwp_create" = xyes; then :
14773   have_lwp=yes
14774 else
14775   have_lwp=no
14776 fi
14777
14778
14779                 if test $have_lwp = yes ; then
14780
14781 $as_echo "#define HAVE_LWP 1" >>confdefs.h
14782
14783                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
14784                         ol_link_threads=lwp
14785
14786                         if test x$ol_with_yielding_select = xauto ; then
14787                                 ol_with_yielding_select=no
14788                         fi
14789                 fi
14790         fi
14791         ;;
14792 esac
14793
14794 if test $ol_with_yielding_select = yes ; then
14795
14796 $as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
14797
14798 fi
14799
14800 if test $ol_with_threads = manual ; then
14801                 ol_link_threads=yes
14802
14803         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
14804 $as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
14805
14806         for ac_header in pthread.h sched.h
14807 do :
14808   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14809 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14810 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14811   cat >>confdefs.h <<_ACEOF
14812 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14813 _ACEOF
14814
14815 fi
14816
14817 done
14818
14819         for ac_func in sched_yield pthread_yield
14820 do :
14821   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14822 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14823 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14824   cat >>confdefs.h <<_ACEOF
14825 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14826 _ACEOF
14827
14828 fi
14829 done
14830
14831
14832         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
14833 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
14834 if ${ol_cv_header_linux_threads+:} false; then :
14835   $as_echo_n "(cached) " >&6
14836 else
14837   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14838 /* end confdefs.h.  */
14839 #include <pthread.h>
14840 _ACEOF
14841 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14842   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
14843   ol_cv_header_linux_threads=yes
14844 else
14845   ol_cv_header_linux_threads=no
14846 fi
14847 rm -f conftest*
14848
14849
14850 fi
14851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
14852 $as_echo "$ol_cv_header_linux_threads" >&6; }
14853         if test $ol_cv_header_linux_threads = yes; then
14854
14855 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
14856
14857         fi
14858
14859
14860         for ac_header in mach/cthreads.h
14861 do :
14862   ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
14863 if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
14864   cat >>confdefs.h <<_ACEOF
14865 #define HAVE_MACH_CTHREADS_H 1
14866 _ACEOF
14867
14868 fi
14869
14870 done
14871
14872         for ac_header in lwp/lwp.h
14873 do :
14874   ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
14875 if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
14876   cat >>confdefs.h <<_ACEOF
14877 #define HAVE_LWP_LWP_H 1
14878 _ACEOF
14879
14880 fi
14881
14882 done
14883
14884         for ac_header in thread.h synch.h
14885 do :
14886   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14887 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14888 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14889   cat >>confdefs.h <<_ACEOF
14890 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14891 _ACEOF
14892
14893 fi
14894
14895 done
14896
14897 fi
14898
14899 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
14900
14901 $as_echo "#define REENTRANT 1" >>confdefs.h
14902
14903
14904 $as_echo "#define _REENTRANT 1" >>confdefs.h
14905
14906
14907 $as_echo "#define THREAD_SAFE 1" >>confdefs.h
14908
14909
14910 $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
14911
14912
14913 $as_echo "#define THREADSAFE 1" >>confdefs.h
14914
14915
14916 $as_echo "#define _THREADSAFE 1" >>confdefs.h
14917
14918
14919 $as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
14920
14921
14922                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
14923 $as_echo_n "checking for thread specific errno... " >&6; }
14924 if ${ol_cv_errno_thread_specific+:} false; then :
14925   $as_echo_n "(cached) " >&6
14926 else
14927
14928                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14929 /* end confdefs.h.  */
14930 #include <errno.h>
14931 int
14932 main ()
14933 {
14934 errno = 0;
14935   ;
14936   return 0;
14937 }
14938 _ACEOF
14939 if ac_fn_c_try_link "$LINENO"; then :
14940   ol_cv_errno_thread_specific=yes
14941 else
14942   ol_cv_errno_thread_specific=no
14943 fi
14944 rm -f core conftest.err conftest.$ac_objext \
14945     conftest$ac_exeext conftest.$ac_ext
14946
14947 fi
14948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
14949 $as_echo "$ol_cv_errno_thread_specific" >&6; }
14950
14951                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
14952 $as_echo_n "checking for thread specific h_errno... " >&6; }
14953 if ${ol_cv_h_errno_thread_specific+:} false; then :
14954   $as_echo_n "(cached) " >&6
14955 else
14956
14957                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14958 /* end confdefs.h.  */
14959 #include <netdb.h>
14960 int
14961 main ()
14962 {
14963 h_errno = 0;
14964   ;
14965   return 0;
14966 }
14967 _ACEOF
14968 if ac_fn_c_try_link "$LINENO"; then :
14969   ol_cv_h_errno_thread_specific=yes
14970 else
14971   ol_cv_h_errno_thread_specific=no
14972 fi
14973 rm -f core conftest.err conftest.$ac_objext \
14974     conftest$ac_exeext conftest.$ac_ext
14975
14976 fi
14977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
14978 $as_echo "$ol_cv_h_errno_thread_specific" >&6; }
14979
14980         if test $ol_cv_errno_thread_specific != yes ||
14981            test $ol_cv_h_errno_thread_specific != yes ; then
14982                 LIBS="$LTHREAD_LIBS $LIBS"
14983                 LTHREAD_LIBS=""
14984         fi
14985
14986 fi
14987
14988 if test $ol_link_threads = no ; then
14989         if test $ol_with_threads = yes ; then
14990                 as_fn_error $? "no suitable thread support" "$LINENO" 5
14991         fi
14992
14993         if test $ol_with_threads = auto ; then
14994                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
14995 $as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
14996                 ol_with_threads=no
14997         fi
14998
14999
15000 $as_echo "#define NO_THREADS 1" >>confdefs.h
15001
15002         LTHREAD_LIBS=""
15003         BUILD_THREAD=no
15004 else
15005         BUILD_THREAD=yes
15006 fi
15007
15008 if test $ol_link_threads != no ; then
15009
15010 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
15011
15012 fi
15013
15014 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
15015 case "$ol_with_threads" in
15016  no)
15017     ol_pthread_ok=no
15018
15019     ;;
15020  *)
15021     ol_found_pthreads=yes
15022     ;;
15023 esac
15024
15025 ac_ext=c
15026 ac_cpp='$CPP $CPPFLAGS'
15027 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15028 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15029 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15030
15031
15032
15033
15034
15035
15036     case "$ol_found_pthreads" in
15037      yes)
15038         saved_LIBS="$LIBS"
15039         LIBS="$LTHREAD_LIBS $LIBS"
15040         saved_CFLAGS="$CFLAGS"
15041         CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
15042         for ac_func in sem_timedwait
15043 do :
15044   ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
15045 if test "x$ac_cv_func_sem_timedwait" = xyes; then :
15046   cat >>confdefs.h <<_ACEOF
15047 #define HAVE_SEM_TIMEDWAIT 1
15048 _ACEOF
15049
15050 fi
15051 done
15052
15053         LIBS="$saved_LIBS"
15054         { saved_LIBS=; unset saved_LIBS;}
15055         CFLAGS="$saved_CFLAGS"
15056         { saved_CFLAGS=; unset saved_CFLAGS;}
15057         case "$ac_cv_func_sem_timedwait" in
15058          yes)
15059             PTHREAD_LIBS="$LTHREAD_LIBS"
15060             have_pthreads=yes
15061         esac
15062     esac
15063 esac
15064
15065 case "$have_pthreads" in
15066  yes)
15067     CFLAGS_NTP="$CFLAGS_NTP $PTHREAD_CFLAGS"
15068     saved_LIBS="$LIBS"
15069     LIBS="$LTHREAD_LIBS $LIBS"
15070     saved_CFLAGS="$CFLAGS"
15071     CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
15072     # The cast to long int works around a bug in the HP C Compiler
15073 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15074 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15075 # This bug is HP SR number 8606223364.
15076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
15077 $as_echo_n "checking size of pthread_t... " >&6; }
15078 if ${ac_cv_sizeof_pthread_t+:} false; then :
15079   $as_echo_n "(cached) " >&6
15080 else
15081   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "
15082             $ac_includes_default
15083             #include <pthread.h>
15084
15085
15086 "; then :
15087
15088 else
15089   if test "$ac_cv_type_pthread_t" = yes; then
15090      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15091 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15092 as_fn_error 77 "cannot compute sizeof (pthread_t)
15093 See \`config.log' for more details" "$LINENO" 5; }
15094    else
15095      ac_cv_sizeof_pthread_t=0
15096    fi
15097 fi
15098
15099 fi
15100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
15101 $as_echo "$ac_cv_sizeof_pthread_t" >&6; }
15102
15103
15104
15105 cat >>confdefs.h <<_ACEOF
15106 #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
15107 _ACEOF
15108
15109
15110     LIBISC_PTHREADS_NOTHREADS=pthreads
15111
15112 $as_echo "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
15113
15114     #
15115     # We'd like to use sigwait() too
15116     #
15117     ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
15118 if test "x$ac_cv_func_sigwait" = xyes; then :
15119   have_sigwait=yes
15120 else
15121   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
15122 $as_echo_n "checking for sigwait in -lc... " >&6; }
15123 if ${ac_cv_lib_c_sigwait+:} false; then :
15124   $as_echo_n "(cached) " >&6
15125 else
15126   ac_check_lib_save_LIBS=$LIBS
15127 LIBS="-lc  $LIBS"
15128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15129 /* end confdefs.h.  */
15130
15131 /* Override any GCC internal prototype to avoid an error.
15132    Use char because int might match the return type of a GCC
15133    builtin and then its argument prototype would still apply.  */
15134 #ifdef __cplusplus
15135 extern "C"
15136 #endif
15137 char sigwait ();
15138 int
15139 main ()
15140 {
15141 return sigwait ();
15142   ;
15143   return 0;
15144 }
15145 _ACEOF
15146 if ac_fn_c_try_link "$LINENO"; then :
15147   ac_cv_lib_c_sigwait=yes
15148 else
15149   ac_cv_lib_c_sigwait=no
15150 fi
15151 rm -f core conftest.err conftest.$ac_objext \
15152     conftest$ac_exeext conftest.$ac_ext
15153 LIBS=$ac_check_lib_save_LIBS
15154 fi
15155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
15156 $as_echo "$ac_cv_lib_c_sigwait" >&6; }
15157 if test "x$ac_cv_lib_c_sigwait" = xyes; then :
15158   have_sigwait=yes
15159 else
15160   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
15161 $as_echo_n "checking for sigwait in -lpthread... " >&6; }
15162 if ${ac_cv_lib_pthread_sigwait+:} false; then :
15163   $as_echo_n "(cached) " >&6
15164 else
15165   ac_check_lib_save_LIBS=$LIBS
15166 LIBS="-lpthread  $LIBS"
15167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15168 /* end confdefs.h.  */
15169
15170 /* Override any GCC internal prototype to avoid an error.
15171    Use char because int might match the return type of a GCC
15172    builtin and then its argument prototype would still apply.  */
15173 #ifdef __cplusplus
15174 extern "C"
15175 #endif
15176 char sigwait ();
15177 int
15178 main ()
15179 {
15180 return sigwait ();
15181   ;
15182   return 0;
15183 }
15184 _ACEOF
15185 if ac_fn_c_try_link "$LINENO"; then :
15186   ac_cv_lib_pthread_sigwait=yes
15187 else
15188   ac_cv_lib_pthread_sigwait=no
15189 fi
15190 rm -f core conftest.err conftest.$ac_objext \
15191     conftest$ac_exeext conftest.$ac_ext
15192 LIBS=$ac_check_lib_save_LIBS
15193 fi
15194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
15195 $as_echo "$ac_cv_lib_pthread_sigwait" >&6; }
15196 if test "x$ac_cv_lib_pthread_sigwait" = xyes; then :
15197   have_sigwait=yes
15198 else
15199   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
15200 $as_echo_n "checking for _Psigwait in -lpthread... " >&6; }
15201 if ${ac_cv_lib_pthread__Psigwait+:} false; then :
15202   $as_echo_n "(cached) " >&6
15203 else
15204   ac_check_lib_save_LIBS=$LIBS
15205 LIBS="-lpthread  $LIBS"
15206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15207 /* end confdefs.h.  */
15208
15209 /* Override any GCC internal prototype to avoid an error.
15210    Use char because int might match the return type of a GCC
15211    builtin and then its argument prototype would still apply.  */
15212 #ifdef __cplusplus
15213 extern "C"
15214 #endif
15215 char _Psigwait ();
15216 int
15217 main ()
15218 {
15219 return _Psigwait ();
15220   ;
15221   return 0;
15222 }
15223 _ACEOF
15224 if ac_fn_c_try_link "$LINENO"; then :
15225   ac_cv_lib_pthread__Psigwait=yes
15226 else
15227   ac_cv_lib_pthread__Psigwait=no
15228 fi
15229 rm -f core conftest.err conftest.$ac_objext \
15230     conftest$ac_exeext conftest.$ac_ext
15231 LIBS=$ac_check_lib_save_LIBS
15232 fi
15233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
15234 $as_echo "$ac_cv_lib_pthread__Psigwait" >&6; }
15235 if test "x$ac_cv_lib_pthread__Psigwait" = xyes; then :
15236   have_sigwait=yes
15237 else
15238   have_sigwait=no
15239
15240 fi
15241
15242
15243 fi
15244
15245
15246 fi
15247
15248
15249 fi
15250
15251     case "$host:$have_sigwait" in
15252      *-freebsd*:no)
15253         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
15254 $as_echo_n "checking for sigwait in -lc_r... " >&6; }
15255 if ${ac_cv_lib_c_r_sigwait+:} false; then :
15256   $as_echo_n "(cached) " >&6
15257 else
15258   ac_check_lib_save_LIBS=$LIBS
15259 LIBS="-lc_r  $LIBS"
15260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15261 /* end confdefs.h.  */
15262
15263 /* Override any GCC internal prototype to avoid an error.
15264    Use char because int might match the return type of a GCC
15265    builtin and then its argument prototype would still apply.  */
15266 #ifdef __cplusplus
15267 extern "C"
15268 #endif
15269 char sigwait ();
15270 int
15271 main ()
15272 {
15273 return sigwait ();
15274   ;
15275   return 0;
15276 }
15277 _ACEOF
15278 if ac_fn_c_try_link "$LINENO"; then :
15279   ac_cv_lib_c_r_sigwait=yes
15280 else
15281   ac_cv_lib_c_r_sigwait=no
15282 fi
15283 rm -f core conftest.err conftest.$ac_objext \
15284     conftest$ac_exeext conftest.$ac_ext
15285 LIBS=$ac_check_lib_save_LIBS
15286 fi
15287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
15288 $as_echo "$ac_cv_lib_c_r_sigwait" >&6; }
15289 if test "x$ac_cv_lib_c_r_sigwait" = xyes; then :
15290   have_sigwait=yes
15291
15292 fi
15293
15294     esac
15295     case "$have_sigwait" in
15296      yes)
15297         ac_cv_func_sigwait=yes
15298
15299 $as_echo "#define HAVE_SIGWAIT 1" >>confdefs.h
15300
15301     esac
15302
15303     for ac_func in pthread_attr_getstacksize
15304 do :
15305   ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
15306 if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes; then :
15307   cat >>confdefs.h <<_ACEOF
15308 #define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
15309 _ACEOF
15310
15311 fi
15312 done
15313
15314     for ac_func in pthread_attr_setstacksize sysconf
15315 do :
15316   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15317 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15318 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15319   cat >>confdefs.h <<_ACEOF
15320 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15321 _ACEOF
15322
15323 fi
15324 done
15325
15326
15327     case "$host" in
15328      *-freebsd5.[012]|*-freebsd5.[012].*)
15329         ;;
15330      *-freebsd5.[3456789]|*-freebsd5.[3456789].*|*-freebsd6.*)
15331
15332 $as_echo "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
15333
15334         ;;
15335      *-bsdi3.*|*-bsdi4.0*)
15336
15337 $as_echo "#define NEED_PTHREAD_INIT 1" >>confdefs.h
15338
15339         ;;
15340      *-linux*)
15341
15342 $as_echo "#define HAVE_LINUXTHREADS 1" >>confdefs.h
15343
15344         ;;
15345      *-solaris*)
15346         $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
15347
15348         for ac_func in pthread_setconcurrency
15349 do :
15350   ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
15351 if test "x$ac_cv_func_pthread_setconcurrency" = xyes; then :
15352   cat >>confdefs.h <<_ACEOF
15353 #define HAVE_PTHREAD_SETCONCURRENCY 1
15354 _ACEOF
15355
15356 fi
15357 done
15358
15359         case "$ac_cv_func_pthread_setconcurrency" in
15360          yes)
15361
15362 $as_echo "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
15363
15364         esac
15365         ;;
15366      *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
15367
15368 $as_echo "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
15369
15370         ;;
15371     esac
15372     hack_shutup_pthreadonceinit=no
15373     case "$host" in
15374      *-aix5.[123].*)
15375         hack_shutup_pthreadonceinit=yes
15376         ;;
15377      *-solaris2.[89])
15378         hack_shutup_pthreadonceinit=yes
15379         ;;
15380      *-solaris2.1[0-9])
15381         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
15382 $as_echo_n "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
15383 if ${ntp_cv_braces_around_pthread_once_init+:} false; then :
15384   $as_echo_n "(cached) " >&6
15385 else
15386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15387 /* end confdefs.h.  */
15388
15389                         #include <pthread.h>
15390
15391 int
15392 main ()
15393 {
15394
15395                         static pthread_once_t once_test =
15396                                                 PTHREAD_ONCE_INIT;
15397
15398
15399   ;
15400   return 0;
15401 }
15402 _ACEOF
15403 if ac_fn_c_try_compile "$LINENO"; then :
15404   ntp_cv_braces_around_pthread_once_init=no
15405 else
15406   ntp_cv_braces_around_pthread_once_init=yes
15407
15408 fi
15409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15410
15411 fi
15412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
15413 $as_echo "$ntp_cv_braces_around_pthread_once_init" >&6; }
15414         case "$ntp_cv_braces_around_pthread_once_init" in
15415          yes)
15416             hack_shutup_pthreadonceinit=yes
15417         esac
15418         ;;
15419     esac
15420     case "$hack_shutup_pthreadonceinit" in
15421      yes)
15422
15423 $as_echo "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
15424
15425     esac
15426     LIBS="$saved_LIBS"
15427     { saved_LIBS=; unset saved_LIBS;}
15428     CFLAGS="$saved_CFLAGS"
15429     { saved_CFLAGS=; unset saved_CFLAGS;}
15430     ;;
15431  *)
15432     LIBISC_PTHREADS_NOTHREADS=nothreads
15433     ;;
15434 esac
15435
15436  if test "$have_pthreads" != "no"; then
15437   PTHREADS_TRUE=
15438   PTHREADS_FALSE='#'
15439 else
15440   PTHREADS_TRUE='#'
15441   PTHREADS_FALSE=
15442 fi
15443
15444
15445
15446
15447
15448
15449
15450 case "$hw_use_rpl_vsnprintf:$hw_cv_func_vsnprintf" in
15451  no:yes)
15452     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
15453 $as_echo_n "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
15454 if ${ntp_cv_vsnprintf_percent_m+:} false; then :
15455   $as_echo_n "(cached) " >&6
15456 else
15457   if test "$cross_compiling" = yes; then :
15458   ntp_cv_vsnprintf_percent_m=no
15459
15460 else
15461   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15462 /* end confdefs.h.  */
15463
15464                     #include <stdarg.h>
15465                     #include <errno.h>
15466                     #include <stdio.h>
15467                     #include <string.h>
15468
15469                     int call_vsnprintf(
15470                             char *      dst,
15471                             size_t      sz,
15472                             const char *fmt,
15473                             ...
15474                             );
15475
15476                     int call_vsnprintf(
15477                             char *      dst,
15478                             size_t      sz,
15479                             const char *fmt,
15480                             ...
15481                             )
15482                     {
15483                             va_list     ap;
15484                             int         rc;
15485
15486                             va_start(ap, fmt);
15487                             rc = vsnprintf(dst, sz, fmt, ap);
15488                             va_end(ap);
15489
15490                             return rc;
15491                     }
15492
15493 int
15494 main ()
15495 {
15496
15497                     char        sbuf[512];
15498                     char        pbuf[512];
15499                     int         slen;
15500
15501                     strcpy(sbuf, strerror(ENOENT));
15502                     errno = ENOENT;
15503                     slen = call_vsnprintf(pbuf, sizeof(pbuf), "%m",
15504                                           "wrong");
15505                     return strcmp(sbuf, pbuf);
15506
15507
15508   ;
15509   return 0;
15510 }
15511 _ACEOF
15512 if ac_fn_c_try_run "$LINENO"; then :
15513   ntp_cv_vsnprintf_percent_m=yes
15514 else
15515   ntp_cv_vsnprintf_percent_m=no
15516 fi
15517 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15518   conftest.$ac_objext conftest.beam conftest.$ac_ext
15519 fi
15520
15521
15522 fi
15523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
15524 $as_echo "$ntp_cv_vsnprintf_percent_m" >&6; }
15525     case "$ntp_cv_vsnprintf_percent_m" in
15526      yes)
15527
15528 $as_echo "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
15529
15530     esac
15531 esac
15532
15533 for ac_header in sys/clockctl.h
15534 do :
15535   ac_fn_c_check_header_mongrel "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
15536 if test "x$ac_cv_header_sys_clockctl_h" = xyes; then :
15537   cat >>confdefs.h <<_ACEOF
15538 #define HAVE_SYS_CLOCKCTL_H 1
15539 _ACEOF
15540
15541 fi
15542
15543 done
15544
15545
15546 # Check whether --enable-clockctl was given.
15547 if test "${enable_clockctl+set}" = set; then :
15548   enableval=$enable_clockctl; ntp_use_dev_clockctl=$enableval
15549 else
15550   ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h
15551
15552 fi
15553
15554
15555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
15556 $as_echo_n "checking if we should use /dev/clockctl... " >&6; }
15557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
15558 $as_echo "$ntp_use_dev_clockctl" >&6; }
15559
15560
15561 for ac_header in sys/capability.h sys/prctl.h
15562 do :
15563   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15564 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15565 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15566   cat >>confdefs.h <<_ACEOF
15567 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15568 _ACEOF
15569
15570 fi
15571
15572 done
15573
15574
15575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
15576 $as_echo_n "checking if we have linux capabilities (libcap)... " >&6; }
15577
15578 case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
15579  yesyes)
15580     case "$host" in
15581      mips-sgi-irix*)
15582         ntp_have_linuxcaps=no
15583         ;;
15584      *) ntp_have_linuxcaps=yes
15585         ;;
15586     esac
15587     ;;
15588  *)
15589     ntp_have_linuxcaps=no
15590     ;;
15591 esac
15592
15593 # Check whether --enable-linuxcaps was given.
15594 if test "${enable_linuxcaps+set}" = set; then :
15595   enableval=$enable_linuxcaps; ntp_have_linuxcaps=$enableval
15596
15597 fi
15598
15599
15600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
15601 $as_echo "$ntp_have_linuxcaps" >&6; }
15602
15603 case "$ntp_have_linuxcaps" in
15604  yes)
15605
15606 $as_echo "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
15607
15608     LIBS="$LIBS -lcap"
15609     ;;
15610 esac
15611
15612
15613 for ac_header in priv.h
15614 do :
15615   ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
15616 if test "x$ac_cv_header_priv_h" = xyes; then :
15617   cat >>confdefs.h <<_ACEOF
15618 #define HAVE_PRIV_H 1
15619 _ACEOF
15620
15621 fi
15622
15623 done
15624
15625
15626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
15627 $as_echo_n "checking if we have solaris privileges... " >&6; }
15628
15629 case "$ac_cv_header_priv_h" in
15630  yes)
15631     case "$host" in
15632      *-solaris*)
15633         ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
15634 if test "x$ac_cv_func_setppriv" = xyes; then :
15635   ntp_have_solarisprivs=yes
15636 else
15637   ntp_have_solarisprivs=no
15638
15639 fi
15640
15641         ;;
15642     esac
15643 esac
15644
15645 # Check whether --enable-solarisprivs was given.
15646 if test "${enable_solarisprivs+set}" = set; then :
15647   enableval=$enable_solarisprivs; ntp_have_solarisprivs=$enableval
15648
15649 fi
15650
15651
15652
15653 case "$ntp_have_solarisprivs" in
15654  yes)
15655
15656 $as_echo "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
15657
15658 esac
15659
15660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
15661 $as_echo "$ntp_have_solarisprivs" >&6; }
15662
15663 case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs" in
15664  *yes*)
15665
15666 $as_echo "#define HAVE_DROPROOT 1" >>confdefs.h
15667
15668 esac
15669
15670 case "$host" in
15671  *-*-darwin*)
15672     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
15673 $as_echo_n "checking for library containing res_9_init... " >&6; }
15674 if ${ac_cv_search_res_9_init+:} false; then :
15675   $as_echo_n "(cached) " >&6
15676 else
15677   ac_func_search_save_LIBS=$LIBS
15678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15679 /* end confdefs.h.  */
15680
15681 /* Override any GCC internal prototype to avoid an error.
15682    Use char because int might match the return type of a GCC
15683    builtin and then its argument prototype would still apply.  */
15684 #ifdef __cplusplus
15685 extern "C"
15686 #endif
15687 char res_9_init ();
15688 int
15689 main ()
15690 {
15691 return res_9_init ();
15692   ;
15693   return 0;
15694 }
15695 _ACEOF
15696 for ac_lib in '' resolv; do
15697   if test -z "$ac_lib"; then
15698     ac_res="none required"
15699   else
15700     ac_res=-l$ac_lib
15701     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15702   fi
15703   if ac_fn_c_try_link "$LINENO"; then :
15704   ac_cv_search_res_9_init=$ac_res
15705 fi
15706 rm -f core conftest.err conftest.$ac_objext \
15707     conftest$ac_exeext
15708   if ${ac_cv_search_res_9_init+:} false; then :
15709   break
15710 fi
15711 done
15712 if ${ac_cv_search_res_9_init+:} false; then :
15713
15714 else
15715   ac_cv_search_res_9_init=no
15716 fi
15717 rm conftest.$ac_ext
15718 LIBS=$ac_func_search_save_LIBS
15719 fi
15720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
15721 $as_echo "$ac_cv_search_res_9_init" >&6; }
15722 ac_res=$ac_cv_search_res_9_init
15723 if test "$ac_res" != no; then :
15724   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15725
15726 fi
15727
15728     ;;
15729  *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
15730 $as_echo_n "checking for library containing res_init... " >&6; }
15731 if ${ac_cv_search_res_init+:} false; then :
15732   $as_echo_n "(cached) " >&6
15733 else
15734   ac_func_search_save_LIBS=$LIBS
15735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15736 /* end confdefs.h.  */
15737
15738 /* Override any GCC internal prototype to avoid an error.
15739    Use char because int might match the return type of a GCC
15740    builtin and then its argument prototype would still apply.  */
15741 #ifdef __cplusplus
15742 extern "C"
15743 #endif
15744 char res_init ();
15745 int
15746 main ()
15747 {
15748 return res_init ();
15749   ;
15750   return 0;
15751 }
15752 _ACEOF
15753 for ac_lib in '' resolv; do
15754   if test -z "$ac_lib"; then
15755     ac_res="none required"
15756   else
15757     ac_res=-l$ac_lib
15758     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15759   fi
15760   if ac_fn_c_try_link "$LINENO"; then :
15761   ac_cv_search_res_init=$ac_res
15762 fi
15763 rm -f core conftest.err conftest.$ac_objext \
15764     conftest$ac_exeext
15765   if ${ac_cv_search_res_init+:} false; then :
15766   break
15767 fi
15768 done
15769 if ${ac_cv_search_res_init+:} false; then :
15770
15771 else
15772   ac_cv_search_res_init=no
15773 fi
15774 rm conftest.$ac_ext
15775 LIBS=$ac_func_search_save_LIBS
15776 fi
15777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
15778 $as_echo "$ac_cv_search_res_init" >&6; }
15779 ac_res=$ac_cv_search_res_init
15780 if test "$ac_res" != no; then :
15781   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15782
15783 fi
15784
15785     ;;
15786 esac
15787 for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
15788 do :
15789   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15790 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
15791 #  include <sys/types.h>
15792 #endif
15793 #ifdef HAVE_NETINET_IN_H
15794 #  include <netinet/in.h>   /* inet_ functions / structs */
15795 #endif
15796 #ifdef HAVE_ARPA_NAMESER_H
15797 #  include <arpa/nameser.h> /* DNS HEADER struct */
15798 #endif
15799 #ifdef HAVE_NETDB_H
15800 #  include <netdb.h>
15801 #endif
15802 "
15803 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15804   cat >>confdefs.h <<_ACEOF
15805 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15806 _ACEOF
15807
15808 fi
15809
15810 done
15811
15812
15813 #HMS: Why do we do this check so "early"?
15814 for ac_func in res_init
15815 do :
15816   ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
15817 if test "x$ac_cv_func_res_init" = xyes; then :
15818   cat >>confdefs.h <<_ACEOF
15819 #define HAVE_RES_INIT 1
15820 _ACEOF
15821
15822 else
15823   for ac_func in __res_init
15824 do :
15825   ac_fn_c_check_func "$LINENO" "__res_init" "ac_cv_func___res_init"
15826 if test "x$ac_cv_func___res_init" = xyes; then :
15827   cat >>confdefs.h <<_ACEOF
15828 #define HAVE___RES_INIT 1
15829 _ACEOF
15830
15831 fi
15832 done
15833
15834 fi
15835 done
15836
15837
15838 # We also need -lsocket, but we have tested for that already.
15839 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
15840 if test "x$ac_cv_func_inet_ntop" = xyes; then :
15841
15842 else
15843
15844 $as_echo "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
15845
15846 fi
15847
15848 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
15849 if test "x$ac_cv_func_inet_pton" = xyes; then :
15850
15851 else
15852
15853 $as_echo "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
15854
15855 fi
15856
15857
15858 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
15859 if test "x$ac_cv_type_uintptr_t" = xyes; then :
15860
15861 cat >>confdefs.h <<_ACEOF
15862 #define HAVE_UINTPTR_T 1
15863 _ACEOF
15864
15865
15866 fi
15867 ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" "$ac_includes_default"
15868 if test "x$ac_cv_type_int32" = xyes; then :
15869
15870 cat >>confdefs.h <<_ACEOF
15871 #define HAVE_INT32 1
15872 _ACEOF
15873
15874
15875 fi
15876 ac_fn_c_check_type "$LINENO" "u_int32" "ac_cv_type_u_int32" "$ac_includes_default"
15877 if test "x$ac_cv_type_u_int32" = xyes; then :
15878
15879 cat >>confdefs.h <<_ACEOF
15880 #define HAVE_U_INT32 1
15881 _ACEOF
15882
15883
15884 fi
15885
15886
15887
15888
15889 case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
15890  no::yes)
15891     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
15892 $as_echo_n "checking for int32 with DNS headers included... " >&6; }
15893 if ${ntp_cv_type_int32_with_dns+:} false; then :
15894   $as_echo_n "(cached) " >&6
15895 else
15896   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15897 /* end confdefs.h.  */
15898
15899                     #ifdef HAVE_ARPA_NAMESER_H
15900                     # include <arpa/nameser.h>
15901                     #endif
15902                     #include <resolv.h>
15903
15904 int
15905 main ()
15906 {
15907
15908                     size_t cb = sizeof(int32);
15909
15910
15911   ;
15912   return 0;
15913 }
15914 _ACEOF
15915 if ac_fn_c_try_compile "$LINENO"; then :
15916   ntp_cv_type_int32_with_dns=yes
15917 else
15918   ntp_cv_type_int32_with_dns=no
15919
15920 fi
15921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15922
15923 fi
15924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
15925 $as_echo "$ntp_cv_type_int32_with_dns" >&6; }
15926     case "$ntp_cv_type_int32_with_dns" in
15927      yes)
15928
15929 $as_echo "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
15930
15931     esac
15932 esac
15933
15934 case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
15935  no::yes)
15936     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
15937 $as_echo_n "checking for u_int32 with DNS headers included... " >&6; }
15938 if ${ntp_cv_type_u_int32_with_dns+:} false; then :
15939   $as_echo_n "(cached) " >&6
15940 else
15941   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15942 /* end confdefs.h.  */
15943
15944                     #ifdef HAVE_ARPA_NAMESER_H
15945                     # include <arpa/nameser.h>
15946                     #endif
15947                     #include <resolv.h>
15948
15949 int
15950 main ()
15951 {
15952
15953                     size_t cb = sizeof(u_int32);
15954
15955
15956   ;
15957   return 0;
15958 }
15959 _ACEOF
15960 if ac_fn_c_try_compile "$LINENO"; then :
15961   ntp_cv_type_u_int32_with_dns=yes
15962 else
15963   ntp_cv_type_u_int32_with_dns=no
15964
15965 fi
15966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15967
15968 fi
15969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
15970 $as_echo "$ntp_cv_type_u_int32_with_dns" >&6; }
15971     case "$ntp_cv_type_u_int32_with_dns" in
15972      yes)
15973
15974 $as_echo "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
15975
15976     esac
15977 esac
15978
15979 for ac_header in sys/timepps.h
15980 do :
15981   ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
15982         #ifdef HAVE_SYS_TIME_H
15983         # include <sys/time.h>
15984         #endif
15985         #ifdef HAVE_ERRNO_H
15986         # include <errno.h>
15987         #endif
15988
15989
15990 "
15991 if test "x$ac_cv_header_sys_timepps_h" = xyes; then :
15992   cat >>confdefs.h <<_ACEOF
15993 #define HAVE_SYS_TIMEPPS_H 1
15994 _ACEOF
15995
15996 fi
15997
15998 done
15999
16000
16001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
16002 $as_echo_n "checking for struct timespec... " >&6; }
16003 if ${ntp_cv_struct_timespec+:} false; then :
16004   $as_echo_n "(cached) " >&6
16005 else
16006   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16007 /* end confdefs.h.  */
16008
16009                 #include <sys/time.h>
16010                 /* Under SunOS, timespec is in sys/timepps.h,
16011                    which needs errno.h and FRAC */
16012                 #ifdef HAVE_ERRNO_H
16013                 # include <errno.h>
16014                 #endif
16015                 #ifdef HAVE_SYS_TIMEPPS_H
16016                 # define FRAC 4294967296
16017                 # include <sys/timepps.h>
16018                 #endif
16019
16020 int
16021 main ()
16022 {
16023
16024                 struct timespec n;
16025
16026
16027   ;
16028   return 0;
16029 }
16030 _ACEOF
16031 if ac_fn_c_try_compile "$LINENO"; then :
16032   ntp_cv_struct_timespec=yes
16033 else
16034   ntp_cv_struct_timespec=no
16035
16036 fi
16037 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16038
16039 fi
16040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_timespec" >&5
16041 $as_echo "$ntp_cv_struct_timespec" >&6; }
16042 case "$ntp_cv_struct_timespec" in
16043  yes)
16044
16045 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
16046
16047 esac
16048
16049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ntptimeval" >&5
16050 $as_echo_n "checking for struct ntptimeval... " >&6; }
16051 if ${ntp_cv_struct_ntptimeval+:} false; then :
16052   $as_echo_n "(cached) " >&6
16053 else
16054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16055 /* end confdefs.h.  */
16056
16057                 #include <sys/time.h>
16058                 #include <sys/timex.h>
16059
16060 int
16061 main ()
16062 {
16063
16064                 struct ntptimeval n;
16065
16066
16067   ;
16068   return 0;
16069 }
16070 _ACEOF
16071 if ac_fn_c_try_compile "$LINENO"; then :
16072   ntp_cv_struct_ntptimeval=yes
16073 else
16074   ntp_cv_struct_ntptimeval=no
16075
16076 fi
16077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16078
16079 fi
16080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ntptimeval" >&5
16081 $as_echo "$ntp_cv_struct_ntptimeval" >&6; }
16082 case "$ntp_cv_struct_ntptimeval" in
16083  yes)
16084
16085 $as_echo "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
16086
16087 esac
16088
16089 for ac_header in md5.h
16090 do :
16091   ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
16092         #ifdef HAVE_SYS_TYPES_H
16093         # include <sys/types.h>
16094         #endif
16095
16096
16097 "
16098 if test "x$ac_cv_header_md5_h" = xyes; then :
16099   cat >>confdefs.h <<_ACEOF
16100 #define HAVE_MD5_H 1
16101 _ACEOF
16102
16103 fi
16104
16105 done
16106
16107
16108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
16109 $as_echo_n "checking for library containing MD5Init... " >&6; }
16110 if ${ac_cv_search_MD5Init+:} false; then :
16111   $as_echo_n "(cached) " >&6
16112 else
16113   ac_func_search_save_LIBS=$LIBS
16114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16115 /* end confdefs.h.  */
16116
16117 /* Override any GCC internal prototype to avoid an error.
16118    Use char because int might match the return type of a GCC
16119    builtin and then its argument prototype would still apply.  */
16120 #ifdef __cplusplus
16121 extern "C"
16122 #endif
16123 char MD5Init ();
16124 int
16125 main ()
16126 {
16127 return MD5Init ();
16128   ;
16129   return 0;
16130 }
16131 _ACEOF
16132 for ac_lib in '' md5 md; do
16133   if test -z "$ac_lib"; then
16134     ac_res="none required"
16135   else
16136     ac_res=-l$ac_lib
16137     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16138   fi
16139   if ac_fn_c_try_link "$LINENO"; then :
16140   ac_cv_search_MD5Init=$ac_res
16141 fi
16142 rm -f core conftest.err conftest.$ac_objext \
16143     conftest$ac_exeext
16144   if ${ac_cv_search_MD5Init+:} false; then :
16145   break
16146 fi
16147 done
16148 if ${ac_cv_search_MD5Init+:} false; then :
16149
16150 else
16151   ac_cv_search_MD5Init=no
16152 fi
16153 rm conftest.$ac_ext
16154 LIBS=$ac_func_search_save_LIBS
16155 fi
16156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
16157 $as_echo "$ac_cv_search_MD5Init" >&6; }
16158 ac_res=$ac_cv_search_MD5Init
16159 if test "$ac_res" != no; then :
16160   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16161
16162 fi
16163
16164 for ac_func in MD5Init sysconf getdtablesize sigaction sigset sigvec
16165 do :
16166   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16167 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16168 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16169   cat >>confdefs.h <<_ACEOF
16170 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16171 _ACEOF
16172
16173 fi
16174 done
16175
16176
16177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
16178 $as_echo_n "checking for SIGIO... " >&6; }
16179 if ${ntp_cv_hdr_def_sigio+:} false; then :
16180   $as_echo_n "(cached) " >&6
16181 else
16182   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16183 /* end confdefs.h.  */
16184
16185             #include <signal.h>
16186
16187             #ifndef SIGIO
16188             # error
16189             #endif
16190
16191 _ACEOF
16192 if ac_fn_c_try_cpp "$LINENO"; then :
16193   ntp_cv_hdr_def_sigio=yes
16194 else
16195   ntp_cv_hdr_def_sigio=no
16196
16197 fi
16198 rm -f conftest.err conftest.i conftest.$ac_ext
16199
16200 fi
16201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
16202 $as_echo "$ntp_cv_hdr_def_sigio" >&6; }
16203
16204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
16205 $as_echo_n "checking if we want to use SIGIO... " >&6; }
16206 ans=no
16207 case "$ntp_cv_hdr_def_sigio" in
16208  yes)
16209     ans=yes
16210     case "$host" in
16211      alpha*-dec-osf4*|alpha*-dec-osf5*)
16212         ans=no
16213         ;;
16214      *-convex-*)
16215         ans=no
16216         ;;
16217      *-dec-*)
16218         ans=no
16219         ;;
16220      *-pc-cygwin*)
16221         ans=no
16222         ;;
16223      *-sni-sysv*)
16224         ans=no
16225         ;;
16226      *-stratus-vos)
16227         ans=no
16228         ;;
16229      *-univel-sysv*)
16230         ans=no
16231         ;;
16232      *-*-irix6*)
16233         ans=no
16234         ;;
16235      *-*-freebsd*)
16236         ans=no
16237         ;;
16238      *-*-*linux*)
16239         ans=no
16240         ;;
16241      *-*-unicosmp*)
16242         ans=no
16243         ;;
16244      *-*-kfreebsd*)
16245         ans=no
16246         ;;
16247      m68k-*-mint*)
16248         ans=no
16249         ;;
16250     esac
16251     ;;
16252 esac
16253 case "$ans" in
16254  yes)
16255
16256 $as_echo "#define HAVE_SIGNALED_IO 1" >>confdefs.h
16257
16258 esac
16259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16260 $as_echo "$ans" >&6; }
16261
16262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
16263 $as_echo_n "checking for SIGPOLL... " >&6; }
16264 if ${ntp_cv_hdr_def_sigpoll+:} false; then :
16265   $as_echo_n "(cached) " >&6
16266 else
16267   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16268 /* end confdefs.h.  */
16269
16270             #include <signal.h>
16271
16272             #ifndef SIGPOLL
16273             # error
16274             #endif
16275
16276 _ACEOF
16277 if ac_fn_c_try_cpp "$LINENO"; then :
16278   ntp_cv_hdr_def_sigpoll=yes
16279 else
16280   ntp_cv_hdr_def_sigpoll=no
16281
16282 fi
16283 rm -f conftest.err conftest.i conftest.$ac_ext
16284
16285 fi
16286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
16287 $as_echo "$ntp_cv_hdr_def_sigpoll" >&6; }
16288
16289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
16290 $as_echo_n "checking if we can use SIGPOLL for UDP I/O... " >&6; }
16291 ans=no
16292 case "$ntp_cv_hdr_def_sigpoll" in
16293  yes)
16294     case "$host" in
16295      mips-sgi-irix*)
16296         ans=no
16297         ;;
16298      vax-dec-bsd)
16299         ans=no
16300         ;;
16301      *-pc-cygwin*)
16302         ans=no
16303         ;;
16304      *-sni-sysv*)
16305         ans=no
16306         ;;
16307      *-stratus-vos)
16308         ans=no
16309         ;;
16310      *-*-aix[4-9]*)
16311         # XXX Only verified thru AIX6
16312         ans=no
16313         ;;
16314      *-*-hpux*)
16315         ans=no
16316         ;;
16317      *-*-*linux*)
16318         ans=no
16319         ;;
16320      *-*-osf*)
16321         ans=no
16322         ;;
16323      *-*-qnx*)
16324         ans=no
16325         ;;
16326      *-*-sunos*)
16327         ans=no
16328         ;;
16329      *-*-solaris*)
16330         ans=no
16331         ;;
16332      *-*-ultrix*)
16333         ans=no
16334         ;;
16335      *-*-unicosmp*)
16336         ans=no
16337         ;;
16338      *-*-kfreebsd*)
16339         ans=no
16340         ;;
16341      *) ans=yes
16342         ;;
16343     esac
16344     ;;
16345 esac
16346 case "$ans" in
16347  yes)
16348
16349 $as_echo "#define USE_UDP_SIGPOLL 1" >>confdefs.h
16350
16351 esac
16352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16353 $as_echo "$ans" >&6; }
16354
16355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
16356 $as_echo_n "checking if we can use SIGPOLL for TTY I/O... " >&6; }
16357 ans=no
16358 case "$ntp_cv_hdr_def_sigpoll" in
16359  yes)
16360     case "$host" in
16361      mips-sgi-irix*)
16362         ans=no
16363         ;;
16364      vax-dec-bsd)
16365         ans=no
16366         ;;
16367      *-pc-cygwin*)
16368         ans=no
16369         ;;
16370      *-sni-sysv*)
16371         ans=no
16372         ;;
16373      *-stratus-vos)
16374         ans=no
16375         ;;
16376      *-*-aix[4-9]*)
16377         # XXX Only verified thru AIX6
16378         ans=no
16379         ;;
16380      *-*-hpux*)
16381         ans=no
16382         ;;
16383      *-*-*linux*)
16384         ans=no
16385         ;;
16386      *-*-osf*)
16387         ans=no
16388         ;;
16389      *-*-sunos*)
16390         ans=no
16391         ;;
16392      *-*-ultrix*)
16393         ans=no
16394         ;;
16395      *-*-qnx*)
16396         ans=no
16397         ;;
16398      *-*-unicosmp*)
16399         ans=no
16400         ;;
16401      *-*-kfreebsd*)
16402         ans=no
16403         ;;
16404      *) ans=yes
16405         ;;
16406     esac
16407     ;;
16408 esac
16409 case "$ans" in
16410  yes)
16411
16412 $as_echo "#define USE_TTY_SIGPOLL 1" >>confdefs.h
16413
16414 esac
16415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16416 $as_echo "$ans" >&6; }
16417
16418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
16419 $as_echo_n "checking number of arguments to gettimeofday()... " >&6; }
16420 if ${ntp_cv_func_Xettimeofday_nargs+:} false; then :
16421   $as_echo_n "(cached) " >&6
16422 else
16423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16424 /* end confdefs.h.  */
16425
16426                 #include <sys/time.h>
16427
16428 int
16429 main ()
16430 {
16431
16432                 gettimeofday(0, 0);
16433                 settimeofday(0, 0);
16434
16435
16436   ;
16437   return 0;
16438 }
16439 _ACEOF
16440 if ac_fn_c_try_compile "$LINENO"; then :
16441   ntp_cv_func_Xettimeofday_nargs=2
16442 else
16443   ntp_cv_func_Xettimeofday_nargs=1
16444
16445 fi
16446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16447
16448 fi
16449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
16450 $as_echo "$ntp_cv_func_Xettimeofday_nargs" >&6; }
16451 case "$ntp_cv_func_Xettimeofday_nargs" in
16452  1)
16453
16454 $as_echo "#define SYSV_TIMEOFDAY 1" >>confdefs.h
16455
16456 esac
16457
16458 for ac_func in settimeofday
16459 do :
16460   ac_fn_c_check_func "$LINENO" "settimeofday" "ac_cv_func_settimeofday"
16461 if test "x$ac_cv_func_settimeofday" = xyes; then :
16462   cat >>confdefs.h <<_ACEOF
16463 #define HAVE_SETTIMEOFDAY 1
16464 _ACEOF
16465
16466 else
16467
16468     case "$host" in
16469      *-*-mpeix*) ac_cv_func_settimeofday=yes
16470     esac
16471
16472 fi
16473 done
16474
16475
16476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
16477 $as_echo_n "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
16478 ntp_warning='GRONK'
16479 ans=none
16480 case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
16481  yes*)
16482     ntp_warning=''
16483     ans='clock_settime()'
16484     ;;
16485  noyes*)
16486     ntp_warning='But clock_settime() would be better (if we had it)'
16487     ans='settimeofday()'
16488     ;;
16489  nonoyes)
16490     ntp_warning='Which is the worst of the three'
16491     ans='stime()'
16492     ;;
16493  *)
16494     case "$build" in
16495      $host)
16496         ntp_warning='Which leaves us with nothing to use!'
16497     esac
16498 esac
16499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
16500 $as_echo "$ans" >&6; }
16501 case "$ntp_warning" in
16502  '')
16503     ;;
16504  *)
16505     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
16506 $as_echo "$as_me: WARNING: *** $ntp_warning ***" >&2;}
16507     ;;
16508 esac
16509
16510
16511 LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
16512 LIBS=$__LIBS
16513 { __LIBS=; unset __LIBS;}
16514
16515
16516
16517 # Check whether --enable-shared was given.
16518 if test "${enable_shared+set}" = set; then :
16519   enableval=$enable_shared; p=${PACKAGE-default}
16520     case $enableval in
16521     yes) enable_shared=yes ;;
16522     no) enable_shared=no ;;
16523     *)
16524       enable_shared=no
16525       # Look at the argument we got.  We use all the common list separators.
16526       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
16527       for pkg in $enableval; do
16528         IFS="$lt_save_ifs"
16529         if test "X$pkg" = "X$p"; then
16530           enable_shared=yes
16531         fi
16532       done
16533       IFS="$lt_save_ifs"
16534       ;;
16535     esac
16536 else
16537   enable_shared=no
16538 fi
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548 case `pwd` in
16549   *\ * | *\     *)
16550     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
16551 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
16552 esac
16553
16554
16555
16556 macro_version='2.4.2'
16557 macro_revision='1.3337'
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571 ltmain="$ac_aux_dir/ltmain.sh"
16572
16573 # Backslashify metacharacters that are still active within
16574 # double-quoted strings.
16575 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
16576
16577 # Same as above, but do not quote variable references.
16578 double_quote_subst='s/\(["`\\]\)/\\\1/g'
16579
16580 # Sed substitution to delay expansion of an escaped shell variable in a
16581 # double_quote_subst'ed string.
16582 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
16583
16584 # Sed substitution to delay expansion of an escaped single quote.
16585 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
16586
16587 # Sed substitution to avoid accidental globbing in evaled expressions
16588 no_glob_subst='s/\*/\\\*/g'
16589
16590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
16591 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
16592 if ${lt_cv_path_NM+:} false; then :
16593   $as_echo_n "(cached) " >&6
16594 else
16595   if test -n "$NM"; then
16596   # Let the user override the test.
16597   lt_cv_path_NM="$NM"
16598 else
16599   lt_nm_to_check="${ac_tool_prefix}nm"
16600   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
16601     lt_nm_to_check="$lt_nm_to_check nm"
16602   fi
16603   for lt_tmp_nm in $lt_nm_to_check; do
16604     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
16605     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
16606       IFS="$lt_save_ifs"
16607       test -z "$ac_dir" && ac_dir=.
16608       tmp_nm="$ac_dir/$lt_tmp_nm"
16609       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
16610         # Check to see if the nm accepts a BSD-compat flag.
16611         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
16612         #   nm: unknown option "B" ignored
16613         # Tru64's nm complains that /dev/null is an invalid object file
16614         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
16615         */dev/null* | *'Invalid file or object type'*)
16616           lt_cv_path_NM="$tmp_nm -B"
16617           break
16618           ;;
16619         *)
16620           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
16621           */dev/null*)
16622             lt_cv_path_NM="$tmp_nm -p"
16623             break
16624             ;;
16625           *)
16626             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
16627             continue # so that we can try to find one that supports BSD flags
16628             ;;
16629           esac
16630           ;;
16631         esac
16632       fi
16633     done
16634     IFS="$lt_save_ifs"
16635   done
16636   : ${lt_cv_path_NM=no}
16637 fi
16638 fi
16639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
16640 $as_echo "$lt_cv_path_NM" >&6; }
16641 if test "$lt_cv_path_NM" != "no"; then
16642   NM="$lt_cv_path_NM"
16643 else
16644   # Didn't find any BSD compatible name lister, look for dumpbin.
16645   if test -n "$DUMPBIN"; then :
16646     # Let the user override the test.
16647   else
16648     if test -n "$ac_tool_prefix"; then
16649   for ac_prog in dumpbin "link -dump"
16650   do
16651     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16652 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16654 $as_echo_n "checking for $ac_word... " >&6; }
16655 if ${ac_cv_prog_DUMPBIN+:} false; then :
16656   $as_echo_n "(cached) " >&6
16657 else
16658   if test -n "$DUMPBIN"; then
16659   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
16660 else
16661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16662 for as_dir in $PATH
16663 do
16664   IFS=$as_save_IFS
16665   test -z "$as_dir" && as_dir=.
16666     for ac_exec_ext in '' $ac_executable_extensions; do
16667   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16668     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
16669     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16670     break 2
16671   fi
16672 done
16673   done
16674 IFS=$as_save_IFS
16675
16676 fi
16677 fi
16678 DUMPBIN=$ac_cv_prog_DUMPBIN
16679 if test -n "$DUMPBIN"; then
16680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
16681 $as_echo "$DUMPBIN" >&6; }
16682 else
16683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16684 $as_echo "no" >&6; }
16685 fi
16686
16687
16688     test -n "$DUMPBIN" && break
16689   done
16690 fi
16691 if test -z "$DUMPBIN"; then
16692   ac_ct_DUMPBIN=$DUMPBIN
16693   for ac_prog in dumpbin "link -dump"
16694 do
16695   # Extract the first word of "$ac_prog", so it can be a program name with args.
16696 set dummy $ac_prog; ac_word=$2
16697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16698 $as_echo_n "checking for $ac_word... " >&6; }
16699 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
16700   $as_echo_n "(cached) " >&6
16701 else
16702   if test -n "$ac_ct_DUMPBIN"; then
16703   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
16704 else
16705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16706 for as_dir in $PATH
16707 do
16708   IFS=$as_save_IFS
16709   test -z "$as_dir" && as_dir=.
16710     for ac_exec_ext in '' $ac_executable_extensions; do
16711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16712     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
16713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16714     break 2
16715   fi
16716 done
16717   done
16718 IFS=$as_save_IFS
16719
16720 fi
16721 fi
16722 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
16723 if test -n "$ac_ct_DUMPBIN"; then
16724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
16725 $as_echo "$ac_ct_DUMPBIN" >&6; }
16726 else
16727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16728 $as_echo "no" >&6; }
16729 fi
16730
16731
16732   test -n "$ac_ct_DUMPBIN" && break
16733 done
16734
16735   if test "x$ac_ct_DUMPBIN" = x; then
16736     DUMPBIN=":"
16737   else
16738     case $cross_compiling:$ac_tool_warned in
16739 yes:)
16740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16741 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16742 ac_tool_warned=yes ;;
16743 esac
16744     DUMPBIN=$ac_ct_DUMPBIN
16745   fi
16746 fi
16747
16748     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
16749     *COFF*)
16750       DUMPBIN="$DUMPBIN -symbols"
16751       ;;
16752     *)
16753       DUMPBIN=:
16754       ;;
16755     esac
16756   fi
16757
16758   if test "$DUMPBIN" != ":"; then
16759     NM="$DUMPBIN"
16760   fi
16761 fi
16762 test -z "$NM" && NM=nm
16763
16764
16765
16766
16767
16768
16769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
16770 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
16771 if ${lt_cv_nm_interface+:} false; then :
16772   $as_echo_n "(cached) " >&6
16773 else
16774   lt_cv_nm_interface="BSD nm"
16775   echo "int some_variable = 0;" > conftest.$ac_ext
16776   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
16777   (eval "$ac_compile" 2>conftest.err)
16778   cat conftest.err >&5
16779   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
16780   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
16781   cat conftest.err >&5
16782   (eval echo "\"\$as_me:$LINENO: output\"" >&5)
16783   cat conftest.out >&5
16784   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
16785     lt_cv_nm_interface="MS dumpbin"
16786   fi
16787   rm -f conftest*
16788 fi
16789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
16790 $as_echo "$lt_cv_nm_interface" >&6; }
16791
16792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
16793 $as_echo_n "checking whether ln -s works... " >&6; }
16794 LN_S=$as_ln_s
16795 if test "$LN_S" = "ln -s"; then
16796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16797 $as_echo "yes" >&6; }
16798 else
16799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
16800 $as_echo "no, using $LN_S" >&6; }
16801 fi
16802
16803 # find the maximum length of command line arguments
16804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
16805 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
16806 if ${lt_cv_sys_max_cmd_len+:} false; then :
16807   $as_echo_n "(cached) " >&6
16808 else
16809     i=0
16810   teststring="ABCD"
16811
16812   case $build_os in
16813   msdosdjgpp*)
16814     # On DJGPP, this test can blow up pretty badly due to problems in libc
16815     # (any single argument exceeding 2000 bytes causes a buffer overrun
16816     # during glob expansion).  Even if it were fixed, the result of this
16817     # check would be larger than it should be.
16818     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
16819     ;;
16820
16821   gnu*)
16822     # Under GNU Hurd, this test is not required because there is
16823     # no limit to the length of command line arguments.
16824     # Libtool will interpret -1 as no limit whatsoever
16825     lt_cv_sys_max_cmd_len=-1;
16826     ;;
16827
16828   cygwin* | mingw* | cegcc*)
16829     # On Win9x/ME, this test blows up -- it succeeds, but takes
16830     # about 5 minutes as the teststring grows exponentially.
16831     # Worse, since 9x/ME are not pre-emptively multitasking,
16832     # you end up with a "frozen" computer, even though with patience
16833     # the test eventually succeeds (with a max line length of 256k).
16834     # Instead, let's just punt: use the minimum linelength reported by
16835     # all of the supported platforms: 8192 (on NT/2K/XP).
16836     lt_cv_sys_max_cmd_len=8192;
16837     ;;
16838
16839   mint*)
16840     # On MiNT this can take a long time and run out of memory.
16841     lt_cv_sys_max_cmd_len=8192;
16842     ;;
16843
16844   amigaos*)
16845     # On AmigaOS with pdksh, this test takes hours, literally.
16846     # So we just punt and use a minimum line length of 8192.
16847     lt_cv_sys_max_cmd_len=8192;
16848     ;;
16849
16850   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
16851     # This has been around since 386BSD, at least.  Likely further.
16852     if test -x /sbin/sysctl; then
16853       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
16854     elif test -x /usr/sbin/sysctl; then
16855       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
16856     else
16857       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
16858     fi
16859     # And add a safety zone
16860     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
16861     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
16862     ;;
16863
16864   interix*)
16865     # We know the value 262144 and hardcode it with a safety zone (like BSD)
16866     lt_cv_sys_max_cmd_len=196608
16867     ;;
16868
16869   osf*)
16870     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
16871     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
16872     # nice to cause kernel panics so lets avoid the loop below.
16873     # First set a reasonable default.
16874     lt_cv_sys_max_cmd_len=16384
16875     #
16876     if test -x /sbin/sysconfig; then
16877       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
16878         *1*) lt_cv_sys_max_cmd_len=-1 ;;
16879       esac
16880     fi
16881     ;;
16882   sco3.2v5*)
16883     lt_cv_sys_max_cmd_len=102400
16884     ;;
16885   sysv5* | sco5v6* | sysv4.2uw2*)
16886     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
16887     if test -n "$kargmax"; then
16888       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
16889     else
16890       lt_cv_sys_max_cmd_len=32768
16891     fi
16892     ;;
16893   *)
16894     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
16895     if test -n "$lt_cv_sys_max_cmd_len"; then
16896       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
16897       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
16898     else
16899       # Make teststring a little bigger before we do anything with it.
16900       # a 1K string should be a reasonable start.
16901       for i in 1 2 3 4 5 6 7 8 ; do
16902         teststring=$teststring$teststring
16903       done
16904       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
16905       # If test is not a shell built-in, we'll probably end up computing a
16906       # maximum length that is only half of the actual maximum length, but
16907       # we can't tell.
16908       while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
16909                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
16910               test $i != 17 # 1/2 MB should be enough
16911       do
16912         i=`expr $i + 1`
16913         teststring=$teststring$teststring
16914       done
16915       # Only check the string length outside the loop.
16916       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
16917       teststring=
16918       # Add a significant safety factor because C++ compilers can tack on
16919       # massive amounts of additional arguments before passing them to the
16920       # linker.  It appears as though 1/2 is a usable value.
16921       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
16922     fi
16923     ;;
16924   esac
16925
16926 fi
16927
16928 if test -n $lt_cv_sys_max_cmd_len ; then
16929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
16930 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
16931 else
16932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
16933 $as_echo "none" >&6; }
16934 fi
16935 max_cmd_len=$lt_cv_sys_max_cmd_len
16936
16937
16938
16939
16940
16941
16942 : ${CP="cp -f"}
16943 : ${MV="mv -f"}
16944 : ${RM="rm -f"}
16945
16946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
16947 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
16948 # Try some XSI features
16949 xsi_shell=no
16950 ( _lt_dummy="a/b/c"
16951   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
16952       = c,a/b,b/c, \
16953     && eval 'test $(( 1 + 1 )) -eq 2 \
16954     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
16955   && xsi_shell=yes
16956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
16957 $as_echo "$xsi_shell" >&6; }
16958
16959
16960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
16961 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
16962 lt_shell_append=no
16963 ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
16964     >/dev/null 2>&1 \
16965   && lt_shell_append=yes
16966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
16967 $as_echo "$lt_shell_append" >&6; }
16968
16969
16970 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
16971   lt_unset=unset
16972 else
16973   lt_unset=false
16974 fi
16975
16976
16977
16978
16979
16980 # test EBCDIC or ASCII
16981 case `echo X|tr X '\101'` in
16982  A) # ASCII based system
16983     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
16984   lt_SP2NL='tr \040 \012'
16985   lt_NL2SP='tr \015\012 \040\040'
16986   ;;
16987  *) # EBCDIC based system
16988   lt_SP2NL='tr \100 \n'
16989   lt_NL2SP='tr \r\n \100\100'
16990   ;;
16991 esac
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
17002 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
17003 if ${lt_cv_to_host_file_cmd+:} false; then :
17004   $as_echo_n "(cached) " >&6
17005 else
17006   case $host in
17007   *-*-mingw* )
17008     case $build in
17009       *-*-mingw* ) # actually msys
17010         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
17011         ;;
17012       *-*-cygwin* )
17013         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
17014         ;;
17015       * ) # otherwise, assume *nix
17016         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
17017         ;;
17018     esac
17019     ;;
17020   *-*-cygwin* )
17021     case $build in
17022       *-*-mingw* ) # actually msys
17023         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
17024         ;;
17025       *-*-cygwin* )
17026         lt_cv_to_host_file_cmd=func_convert_file_noop
17027         ;;
17028       * ) # otherwise, assume *nix
17029         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
17030         ;;
17031     esac
17032     ;;
17033   * ) # unhandled hosts (and "normal" native builds)
17034     lt_cv_to_host_file_cmd=func_convert_file_noop
17035     ;;
17036 esac
17037
17038 fi
17039
17040 to_host_file_cmd=$lt_cv_to_host_file_cmd
17041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
17042 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
17043
17044
17045
17046
17047
17048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
17049 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
17050 if ${lt_cv_to_tool_file_cmd+:} false; then :
17051   $as_echo_n "(cached) " >&6
17052 else
17053   #assume ordinary cross tools, or native build.
17054 lt_cv_to_tool_file_cmd=func_convert_file_noop
17055 case $host in
17056   *-*-mingw* )
17057     case $build in
17058       *-*-mingw* ) # actually msys
17059         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
17060         ;;
17061     esac
17062     ;;
17063 esac
17064
17065 fi
17066
17067 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
17068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
17069 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
17070
17071
17072
17073
17074
17075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
17076 $as_echo_n "checking for $LD option to reload object files... " >&6; }
17077 if ${lt_cv_ld_reload_flag+:} false; then :
17078   $as_echo_n "(cached) " >&6
17079 else
17080   lt_cv_ld_reload_flag='-r'
17081 fi
17082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
17083 $as_echo "$lt_cv_ld_reload_flag" >&6; }
17084 reload_flag=$lt_cv_ld_reload_flag
17085 case $reload_flag in
17086 "" | " "*) ;;
17087 *) reload_flag=" $reload_flag" ;;
17088 esac
17089 reload_cmds='$LD$reload_flag -o $output$reload_objs'
17090 case $host_os in
17091   cygwin* | mingw* | pw32* | cegcc*)
17092     if test "$GCC" != yes; then
17093       reload_cmds=false
17094     fi
17095     ;;
17096   darwin*)
17097     if test "$GCC" = yes; then
17098       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
17099     else
17100       reload_cmds='$LD$reload_flag -o $output$reload_objs'
17101     fi
17102     ;;
17103 esac
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113 if test -n "$ac_tool_prefix"; then
17114   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
17115 set dummy ${ac_tool_prefix}objdump; ac_word=$2
17116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17117 $as_echo_n "checking for $ac_word... " >&6; }
17118 if ${ac_cv_prog_OBJDUMP+:} false; then :
17119   $as_echo_n "(cached) " >&6
17120 else
17121   if test -n "$OBJDUMP"; then
17122   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
17123 else
17124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17125 for as_dir in $PATH
17126 do
17127   IFS=$as_save_IFS
17128   test -z "$as_dir" && as_dir=.
17129     for ac_exec_ext in '' $ac_executable_extensions; do
17130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17131     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
17132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17133     break 2
17134   fi
17135 done
17136   done
17137 IFS=$as_save_IFS
17138
17139 fi
17140 fi
17141 OBJDUMP=$ac_cv_prog_OBJDUMP
17142 if test -n "$OBJDUMP"; then
17143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
17144 $as_echo "$OBJDUMP" >&6; }
17145 else
17146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17147 $as_echo "no" >&6; }
17148 fi
17149
17150
17151 fi
17152 if test -z "$ac_cv_prog_OBJDUMP"; then
17153   ac_ct_OBJDUMP=$OBJDUMP
17154   # Extract the first word of "objdump", so it can be a program name with args.
17155 set dummy objdump; ac_word=$2
17156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17157 $as_echo_n "checking for $ac_word... " >&6; }
17158 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
17159   $as_echo_n "(cached) " >&6
17160 else
17161   if test -n "$ac_ct_OBJDUMP"; then
17162   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
17163 else
17164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17165 for as_dir in $PATH
17166 do
17167   IFS=$as_save_IFS
17168   test -z "$as_dir" && as_dir=.
17169     for ac_exec_ext in '' $ac_executable_extensions; do
17170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17171     ac_cv_prog_ac_ct_OBJDUMP="objdump"
17172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17173     break 2
17174   fi
17175 done
17176   done
17177 IFS=$as_save_IFS
17178
17179 fi
17180 fi
17181 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
17182 if test -n "$ac_ct_OBJDUMP"; then
17183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
17184 $as_echo "$ac_ct_OBJDUMP" >&6; }
17185 else
17186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17187 $as_echo "no" >&6; }
17188 fi
17189
17190   if test "x$ac_ct_OBJDUMP" = x; then
17191     OBJDUMP="false"
17192   else
17193     case $cross_compiling:$ac_tool_warned in
17194 yes:)
17195 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17196 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17197 ac_tool_warned=yes ;;
17198 esac
17199     OBJDUMP=$ac_ct_OBJDUMP
17200   fi
17201 else
17202   OBJDUMP="$ac_cv_prog_OBJDUMP"
17203 fi
17204
17205 test -z "$OBJDUMP" && OBJDUMP=objdump
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
17216 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
17217 if ${lt_cv_deplibs_check_method+:} false; then :
17218   $as_echo_n "(cached) " >&6
17219 else
17220   lt_cv_file_magic_cmd='$MAGIC_CMD'
17221 lt_cv_file_magic_test_file=
17222 lt_cv_deplibs_check_method='unknown'
17223 # Need to set the preceding variable on all platforms that support
17224 # interlibrary dependencies.
17225 # 'none' -- dependencies not supported.
17226 # `unknown' -- same as none, but documents that we really don't know.
17227 # 'pass_all' -- all dependencies passed with no checks.
17228 # 'test_compile' -- check by making test program.
17229 # 'file_magic [[regex]]' -- check by looking for files in library path
17230 # which responds to the $file_magic_cmd with a given extended regex.
17231 # If you have `file' or equivalent on your system and you're not sure
17232 # whether `pass_all' will *always* work, you probably want this one.
17233
17234 case $host_os in
17235 aix[4-9]*)
17236   lt_cv_deplibs_check_method=pass_all
17237   ;;
17238
17239 beos*)
17240   lt_cv_deplibs_check_method=pass_all
17241   ;;
17242
17243 bsdi[45]*)
17244   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
17245   lt_cv_file_magic_cmd='/usr/bin/file -L'
17246   lt_cv_file_magic_test_file=/shlib/libc.so
17247   ;;
17248
17249 cygwin*)
17250   # func_win32_libid is a shell function defined in ltmain.sh
17251   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
17252   lt_cv_file_magic_cmd='func_win32_libid'
17253   ;;
17254
17255 mingw* | pw32*)
17256   # Base MSYS/MinGW do not provide the 'file' command needed by
17257   # func_win32_libid shell function, so use a weaker test based on 'objdump',
17258   # unless we find 'file', for example because we are cross-compiling.
17259   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
17260   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
17261     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
17262     lt_cv_file_magic_cmd='func_win32_libid'
17263   else
17264     # Keep this pattern in sync with the one in func_win32_libid.
17265     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
17266     lt_cv_file_magic_cmd='$OBJDUMP -f'
17267   fi
17268   ;;
17269
17270 cegcc*)
17271   # use the weaker test based on 'objdump'. See mingw*.
17272   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
17273   lt_cv_file_magic_cmd='$OBJDUMP -f'
17274   ;;
17275
17276 darwin* | rhapsody*)
17277   lt_cv_deplibs_check_method=pass_all
17278   ;;
17279
17280 freebsd* | dragonfly*)
17281   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
17282     case $host_cpu in
17283     i*86 )
17284       # Not sure whether the presence of OpenBSD here was a mistake.
17285       # Let's accept both of them until this is cleared up.
17286       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
17287       lt_cv_file_magic_cmd=/usr/bin/file
17288       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
17289       ;;
17290     esac
17291   else
17292     lt_cv_deplibs_check_method=pass_all
17293   fi
17294   ;;
17295
17296 gnu*)
17297   lt_cv_deplibs_check_method=pass_all
17298   ;;
17299
17300 haiku*)
17301   lt_cv_deplibs_check_method=pass_all
17302   ;;
17303
17304 hpux10.20* | hpux11*)
17305   lt_cv_file_magic_cmd=/usr/bin/file
17306   case $host_cpu in
17307   ia64*)
17308     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
17309     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
17310     ;;
17311   hppa*64*)
17312     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
17313     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
17314     ;;
17315   *)
17316     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
17317     lt_cv_file_magic_test_file=/usr/lib/libc.sl
17318     ;;
17319   esac
17320   ;;
17321
17322 interix[3-9]*)
17323   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
17324   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
17325   ;;
17326
17327 irix5* | irix6* | nonstopux*)
17328   case $LD in
17329   *-32|*"-32 ") libmagic=32-bit;;
17330   *-n32|*"-n32 ") libmagic=N32;;
17331   *-64|*"-64 ") libmagic=64-bit;;
17332   *) libmagic=never-match;;
17333   esac
17334   lt_cv_deplibs_check_method=pass_all
17335   ;;
17336
17337 # This must be Linux ELF.
17338 linux* | k*bsd*-gnu | kopensolaris*-gnu)
17339   lt_cv_deplibs_check_method=pass_all
17340   ;;
17341
17342 netbsd*)
17343   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
17344     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
17345   else
17346     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
17347   fi
17348   ;;
17349
17350 newos6*)
17351   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
17352   lt_cv_file_magic_cmd=/usr/bin/file
17353   lt_cv_file_magic_test_file=/usr/lib/libnls.so
17354   ;;
17355
17356 *nto* | *qnx*)
17357   lt_cv_deplibs_check_method=pass_all
17358   ;;
17359
17360 openbsd*)
17361   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
17362     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
17363   else
17364     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
17365   fi
17366   ;;
17367
17368 osf3* | osf4* | osf5*)
17369   lt_cv_deplibs_check_method=pass_all
17370   ;;
17371
17372 rdos*)
17373   lt_cv_deplibs_check_method=pass_all
17374   ;;
17375
17376 solaris*)
17377   lt_cv_deplibs_check_method=pass_all
17378   ;;
17379
17380 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
17381   lt_cv_deplibs_check_method=pass_all
17382   ;;
17383
17384 sysv4 | sysv4.3*)
17385   case $host_vendor in
17386   motorola)
17387     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
17388     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
17389     ;;
17390   ncr)
17391     lt_cv_deplibs_check_method=pass_all
17392     ;;
17393   sequent)
17394     lt_cv_file_magic_cmd='/bin/file'
17395     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
17396     ;;
17397   sni)
17398     lt_cv_file_magic_cmd='/bin/file'
17399     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
17400     lt_cv_file_magic_test_file=/lib/libc.so
17401     ;;
17402   siemens)
17403     lt_cv_deplibs_check_method=pass_all
17404     ;;
17405   pc)
17406     lt_cv_deplibs_check_method=pass_all
17407     ;;
17408   esac
17409   ;;
17410
17411 tpf*)
17412   lt_cv_deplibs_check_method=pass_all
17413   ;;
17414 esac
17415
17416 fi
17417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
17418 $as_echo "$lt_cv_deplibs_check_method" >&6; }
17419
17420 file_magic_glob=
17421 want_nocaseglob=no
17422 if test "$build" = "$host"; then
17423   case $host_os in
17424   mingw* | pw32*)
17425     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
17426       want_nocaseglob=yes
17427     else
17428       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
17429     fi
17430     ;;
17431   esac
17432 fi
17433
17434 file_magic_cmd=$lt_cv_file_magic_cmd
17435 deplibs_check_method=$lt_cv_deplibs_check_method
17436 test -z "$deplibs_check_method" && deplibs_check_method=unknown
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459 if test -n "$ac_tool_prefix"; then
17460   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
17461 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
17462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17463 $as_echo_n "checking for $ac_word... " >&6; }
17464 if ${ac_cv_prog_DLLTOOL+:} false; then :
17465   $as_echo_n "(cached) " >&6
17466 else
17467   if test -n "$DLLTOOL"; then
17468   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
17469 else
17470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17471 for as_dir in $PATH
17472 do
17473   IFS=$as_save_IFS
17474   test -z "$as_dir" && as_dir=.
17475     for ac_exec_ext in '' $ac_executable_extensions; do
17476   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17477     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
17478     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17479     break 2
17480   fi
17481 done
17482   done
17483 IFS=$as_save_IFS
17484
17485 fi
17486 fi
17487 DLLTOOL=$ac_cv_prog_DLLTOOL
17488 if test -n "$DLLTOOL"; then
17489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
17490 $as_echo "$DLLTOOL" >&6; }
17491 else
17492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17493 $as_echo "no" >&6; }
17494 fi
17495
17496
17497 fi
17498 if test -z "$ac_cv_prog_DLLTOOL"; then
17499   ac_ct_DLLTOOL=$DLLTOOL
17500   # Extract the first word of "dlltool", so it can be a program name with args.
17501 set dummy dlltool; ac_word=$2
17502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17503 $as_echo_n "checking for $ac_word... " >&6; }
17504 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
17505   $as_echo_n "(cached) " >&6
17506 else
17507   if test -n "$ac_ct_DLLTOOL"; then
17508   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
17509 else
17510 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17511 for as_dir in $PATH
17512 do
17513   IFS=$as_save_IFS
17514   test -z "$as_dir" && as_dir=.
17515     for ac_exec_ext in '' $ac_executable_extensions; do
17516   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17517     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
17518     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17519     break 2
17520   fi
17521 done
17522   done
17523 IFS=$as_save_IFS
17524
17525 fi
17526 fi
17527 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
17528 if test -n "$ac_ct_DLLTOOL"; then
17529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
17530 $as_echo "$ac_ct_DLLTOOL" >&6; }
17531 else
17532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17533 $as_echo "no" >&6; }
17534 fi
17535
17536   if test "x$ac_ct_DLLTOOL" = x; then
17537     DLLTOOL="false"
17538   else
17539     case $cross_compiling:$ac_tool_warned in
17540 yes:)
17541 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17542 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17543 ac_tool_warned=yes ;;
17544 esac
17545     DLLTOOL=$ac_ct_DLLTOOL
17546   fi
17547 else
17548   DLLTOOL="$ac_cv_prog_DLLTOOL"
17549 fi
17550
17551 test -z "$DLLTOOL" && DLLTOOL=dlltool
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
17563 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
17564 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
17565   $as_echo_n "(cached) " >&6
17566 else
17567   lt_cv_sharedlib_from_linklib_cmd='unknown'
17568
17569 case $host_os in
17570 cygwin* | mingw* | pw32* | cegcc*)
17571   # two different shell functions defined in ltmain.sh
17572   # decide which to use based on capabilities of $DLLTOOL
17573   case `$DLLTOOL --help 2>&1` in
17574   *--identify-strict*)
17575     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
17576     ;;
17577   *)
17578     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
17579     ;;
17580   esac
17581   ;;
17582 *)
17583   # fallback: assume linklib IS sharedlib
17584   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
17585   ;;
17586 esac
17587
17588 fi
17589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
17590 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
17591 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
17592 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
17593
17594
17595
17596
17597
17598
17599
17600 if test -n "$ac_tool_prefix"; then
17601   for ac_prog in ar
17602   do
17603     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
17604 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
17605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17606 $as_echo_n "checking for $ac_word... " >&6; }
17607 if ${ac_cv_prog_AR+:} false; then :
17608   $as_echo_n "(cached) " >&6
17609 else
17610   if test -n "$AR"; then
17611   ac_cv_prog_AR="$AR" # Let the user override the test.
17612 else
17613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17614 for as_dir in $PATH
17615 do
17616   IFS=$as_save_IFS
17617   test -z "$as_dir" && as_dir=.
17618     for ac_exec_ext in '' $ac_executable_extensions; do
17619   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17620     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
17621     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17622     break 2
17623   fi
17624 done
17625   done
17626 IFS=$as_save_IFS
17627
17628 fi
17629 fi
17630 AR=$ac_cv_prog_AR
17631 if test -n "$AR"; then
17632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
17633 $as_echo "$AR" >&6; }
17634 else
17635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17636 $as_echo "no" >&6; }
17637 fi
17638
17639
17640     test -n "$AR" && break
17641   done
17642 fi
17643 if test -z "$AR"; then
17644   ac_ct_AR=$AR
17645   for ac_prog in ar
17646 do
17647   # Extract the first word of "$ac_prog", so it can be a program name with args.
17648 set dummy $ac_prog; ac_word=$2
17649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17650 $as_echo_n "checking for $ac_word... " >&6; }
17651 if ${ac_cv_prog_ac_ct_AR+:} false; then :
17652   $as_echo_n "(cached) " >&6
17653 else
17654   if test -n "$ac_ct_AR"; then
17655   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
17656 else
17657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17658 for as_dir in $PATH
17659 do
17660   IFS=$as_save_IFS
17661   test -z "$as_dir" && as_dir=.
17662     for ac_exec_ext in '' $ac_executable_extensions; do
17663   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17664     ac_cv_prog_ac_ct_AR="$ac_prog"
17665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17666     break 2
17667   fi
17668 done
17669   done
17670 IFS=$as_save_IFS
17671
17672 fi
17673 fi
17674 ac_ct_AR=$ac_cv_prog_ac_ct_AR
17675 if test -n "$ac_ct_AR"; then
17676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
17677 $as_echo "$ac_ct_AR" >&6; }
17678 else
17679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17680 $as_echo "no" >&6; }
17681 fi
17682
17683
17684   test -n "$ac_ct_AR" && break
17685 done
17686
17687   if test "x$ac_ct_AR" = x; then
17688     AR="false"
17689   else
17690     case $cross_compiling:$ac_tool_warned in
17691 yes:)
17692 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17693 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17694 ac_tool_warned=yes ;;
17695 esac
17696     AR=$ac_ct_AR
17697   fi
17698 fi
17699
17700 : ${AR=ar}
17701 : ${AR_FLAGS=cru}
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
17714 $as_echo_n "checking for archiver @FILE support... " >&6; }
17715 if ${lt_cv_ar_at_file+:} false; then :
17716   $as_echo_n "(cached) " >&6
17717 else
17718   lt_cv_ar_at_file=no
17719    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17720 /* end confdefs.h.  */
17721
17722 int
17723 main ()
17724 {
17725
17726   ;
17727   return 0;
17728 }
17729 _ACEOF
17730 if ac_fn_c_try_compile "$LINENO"; then :
17731   echo conftest.$ac_objext > conftest.lst
17732       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
17733       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
17734   (eval $lt_ar_try) 2>&5
17735   ac_status=$?
17736   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17737   test $ac_status = 0; }
17738       if test "$ac_status" -eq 0; then
17739         # Ensure the archiver fails upon bogus file names.
17740         rm -f conftest.$ac_objext libconftest.a
17741         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
17742   (eval $lt_ar_try) 2>&5
17743   ac_status=$?
17744   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17745   test $ac_status = 0; }
17746         if test "$ac_status" -ne 0; then
17747           lt_cv_ar_at_file=@
17748         fi
17749       fi
17750       rm -f conftest.* libconftest.a
17751
17752 fi
17753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17754
17755 fi
17756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
17757 $as_echo "$lt_cv_ar_at_file" >&6; }
17758
17759 if test "x$lt_cv_ar_at_file" = xno; then
17760   archiver_list_spec=
17761 else
17762   archiver_list_spec=$lt_cv_ar_at_file
17763 fi
17764
17765
17766
17767
17768
17769
17770
17771 if test -n "$ac_tool_prefix"; then
17772   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
17773 set dummy ${ac_tool_prefix}strip; ac_word=$2
17774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17775 $as_echo_n "checking for $ac_word... " >&6; }
17776 if ${ac_cv_prog_STRIP+:} false; then :
17777   $as_echo_n "(cached) " >&6
17778 else
17779   if test -n "$STRIP"; then
17780   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
17781 else
17782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17783 for as_dir in $PATH
17784 do
17785   IFS=$as_save_IFS
17786   test -z "$as_dir" && as_dir=.
17787     for ac_exec_ext in '' $ac_executable_extensions; do
17788   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17789     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
17790     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17791     break 2
17792   fi
17793 done
17794   done
17795 IFS=$as_save_IFS
17796
17797 fi
17798 fi
17799 STRIP=$ac_cv_prog_STRIP
17800 if test -n "$STRIP"; then
17801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
17802 $as_echo "$STRIP" >&6; }
17803 else
17804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17805 $as_echo "no" >&6; }
17806 fi
17807
17808
17809 fi
17810 if test -z "$ac_cv_prog_STRIP"; then
17811   ac_ct_STRIP=$STRIP
17812   # Extract the first word of "strip", so it can be a program name with args.
17813 set dummy strip; ac_word=$2
17814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17815 $as_echo_n "checking for $ac_word... " >&6; }
17816 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
17817   $as_echo_n "(cached) " >&6
17818 else
17819   if test -n "$ac_ct_STRIP"; then
17820   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
17821 else
17822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17823 for as_dir in $PATH
17824 do
17825   IFS=$as_save_IFS
17826   test -z "$as_dir" && as_dir=.
17827     for ac_exec_ext in '' $ac_executable_extensions; do
17828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17829     ac_cv_prog_ac_ct_STRIP="strip"
17830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17831     break 2
17832   fi
17833 done
17834   done
17835 IFS=$as_save_IFS
17836
17837 fi
17838 fi
17839 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
17840 if test -n "$ac_ct_STRIP"; then
17841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
17842 $as_echo "$ac_ct_STRIP" >&6; }
17843 else
17844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17845 $as_echo "no" >&6; }
17846 fi
17847
17848   if test "x$ac_ct_STRIP" = x; then
17849     STRIP=":"
17850   else
17851     case $cross_compiling:$ac_tool_warned in
17852 yes:)
17853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17854 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17855 ac_tool_warned=yes ;;
17856 esac
17857     STRIP=$ac_ct_STRIP
17858   fi
17859 else
17860   STRIP="$ac_cv_prog_STRIP"
17861 fi
17862
17863 test -z "$STRIP" && STRIP=:
17864
17865
17866
17867
17868
17869
17870 if test -n "$ac_tool_prefix"; then
17871   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
17872 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
17873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17874 $as_echo_n "checking for $ac_word... " >&6; }
17875 if ${ac_cv_prog_RANLIB+:} false; then :
17876   $as_echo_n "(cached) " >&6
17877 else
17878   if test -n "$RANLIB"; then
17879   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
17880 else
17881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17882 for as_dir in $PATH
17883 do
17884   IFS=$as_save_IFS
17885   test -z "$as_dir" && as_dir=.
17886     for ac_exec_ext in '' $ac_executable_extensions; do
17887   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17888     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
17889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17890     break 2
17891   fi
17892 done
17893   done
17894 IFS=$as_save_IFS
17895
17896 fi
17897 fi
17898 RANLIB=$ac_cv_prog_RANLIB
17899 if test -n "$RANLIB"; then
17900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
17901 $as_echo "$RANLIB" >&6; }
17902 else
17903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17904 $as_echo "no" >&6; }
17905 fi
17906
17907
17908 fi
17909 if test -z "$ac_cv_prog_RANLIB"; then
17910   ac_ct_RANLIB=$RANLIB
17911   # Extract the first word of "ranlib", so it can be a program name with args.
17912 set dummy ranlib; ac_word=$2
17913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17914 $as_echo_n "checking for $ac_word... " >&6; }
17915 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
17916   $as_echo_n "(cached) " >&6
17917 else
17918   if test -n "$ac_ct_RANLIB"; then
17919   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
17920 else
17921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17922 for as_dir in $PATH
17923 do
17924   IFS=$as_save_IFS
17925   test -z "$as_dir" && as_dir=.
17926     for ac_exec_ext in '' $ac_executable_extensions; do
17927   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17928     ac_cv_prog_ac_ct_RANLIB="ranlib"
17929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17930     break 2
17931   fi
17932 done
17933   done
17934 IFS=$as_save_IFS
17935
17936 fi
17937 fi
17938 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
17939 if test -n "$ac_ct_RANLIB"; then
17940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
17941 $as_echo "$ac_ct_RANLIB" >&6; }
17942 else
17943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17944 $as_echo "no" >&6; }
17945 fi
17946
17947   if test "x$ac_ct_RANLIB" = x; then
17948     RANLIB=":"
17949   else
17950     case $cross_compiling:$ac_tool_warned in
17951 yes:)
17952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17953 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17954 ac_tool_warned=yes ;;
17955 esac
17956     RANLIB=$ac_ct_RANLIB
17957   fi
17958 else
17959   RANLIB="$ac_cv_prog_RANLIB"
17960 fi
17961
17962 test -z "$RANLIB" && RANLIB=:
17963
17964
17965
17966
17967
17968
17969 # Determine commands to create old-style static archives.
17970 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
17971 old_postinstall_cmds='chmod 644 $oldlib'
17972 old_postuninstall_cmds=
17973
17974 if test -n "$RANLIB"; then
17975   case $host_os in
17976   openbsd*)
17977     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
17978     ;;
17979   *)
17980     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
17981     ;;
17982   esac
17983   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
17984 fi
17985
17986 case $host_os in
17987   darwin*)
17988     lock_old_archive_extraction=yes ;;
17989   *)
17990     lock_old_archive_extraction=no ;;
17991 esac
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031 # If no C compiler was specified, use CC.
18032 LTCC=${LTCC-"$CC"}
18033
18034 # If no C compiler flags were specified, use CFLAGS.
18035 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
18036
18037 # Allow CC to be a program name with arguments.
18038 compiler=$CC
18039
18040
18041 # Check for command to grab the raw symbol name followed by C symbol from nm.
18042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
18043 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
18044 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
18045   $as_echo_n "(cached) " >&6
18046 else
18047
18048 # These are sane defaults that work on at least a few old systems.
18049 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
18050
18051 # Character class describing NM global symbol codes.
18052 symcode='[BCDEGRST]'
18053
18054 # Regexp to match symbols that can be accessed directly from C.
18055 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
18056
18057 # Define system-specific variables.
18058 case $host_os in
18059 aix*)
18060   symcode='[BCDT]'
18061   ;;
18062 cygwin* | mingw* | pw32* | cegcc*)
18063   symcode='[ABCDGISTW]'
18064   ;;
18065 hpux*)
18066   if test "$host_cpu" = ia64; then
18067     symcode='[ABCDEGRST]'
18068   fi
18069   ;;
18070 irix* | nonstopux*)
18071   symcode='[BCDEGRST]'
18072   ;;
18073 osf*)
18074   symcode='[BCDEGQRST]'
18075   ;;
18076 solaris*)
18077   symcode='[BDRT]'
18078   ;;
18079 sco3.2v5*)
18080   symcode='[DT]'
18081   ;;
18082 sysv4.2uw2*)
18083   symcode='[DT]'
18084   ;;
18085 sysv5* | sco5v6* | unixware* | OpenUNIX*)
18086   symcode='[ABDT]'
18087   ;;
18088 sysv4)
18089   symcode='[DFNSTU]'
18090   ;;
18091 esac
18092
18093 # If we're using GNU nm, then use its standard symbol codes.
18094 case `$NM -V 2>&1` in
18095 *GNU* | *'with BFD'*)
18096   symcode='[ABCDGIRSTW]' ;;
18097 esac
18098
18099 # Transform an extracted symbol line into a proper C declaration.
18100 # Some systems (esp. on ia64) link data and code symbols differently,
18101 # so use this general approach.
18102 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
18103
18104 # Transform an extracted symbol line into symbol name and symbol address
18105 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
18106 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
18107
18108 # Handle CRLF in mingw tool chain
18109 opt_cr=
18110 case $build_os in
18111 mingw*)
18112   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
18113   ;;
18114 esac
18115
18116 # Try without a prefix underscore, then with it.
18117 for ac_symprfx in "" "_"; do
18118
18119   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
18120   symxfrm="\\1 $ac_symprfx\\2 \\2"
18121
18122   # Write the raw and C identifiers.
18123   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
18124     # Fake it for dumpbin and say T for any non-static function
18125     # and D for any global variable.
18126     # Also find C++ and __fastcall symbols from MSVC++,
18127     # which start with @ or ?.
18128     lt_cv_sys_global_symbol_pipe="$AWK '"\
18129 "     {last_section=section; section=\$ 3};"\
18130 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
18131 "     \$ 0!~/External *\|/{next};"\
18132 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
18133 "     {if(hide[section]) next};"\
18134 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
18135 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
18136 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
18137 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
18138 "     ' prfx=^$ac_symprfx"
18139   else
18140     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
18141   fi
18142   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
18143
18144   # Check to see that the pipe works correctly.
18145   pipe_works=no
18146
18147   rm -f conftest*
18148   cat > conftest.$ac_ext <<_LT_EOF
18149 #ifdef __cplusplus
18150 extern "C" {
18151 #endif
18152 char nm_test_var;
18153 void nm_test_func(void);
18154 void nm_test_func(void){}
18155 #ifdef __cplusplus
18156 }
18157 #endif
18158 int main(){nm_test_var='a';nm_test_func();return(0);}
18159 _LT_EOF
18160
18161   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18162   (eval $ac_compile) 2>&5
18163   ac_status=$?
18164   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18165   test $ac_status = 0; }; then
18166     # Now try to grab the symbols.
18167     nlist=conftest.nm
18168     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
18169   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
18170   ac_status=$?
18171   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18172   test $ac_status = 0; } && test -s "$nlist"; then
18173       # Try sorting and uniquifying the output.
18174       if sort "$nlist" | uniq > "$nlist"T; then
18175         mv -f "$nlist"T "$nlist"
18176       else
18177         rm -f "$nlist"T
18178       fi
18179
18180       # Make sure that we snagged all the symbols we need.
18181       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
18182         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
18183           cat <<_LT_EOF > conftest.$ac_ext
18184 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
18185 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
18186 /* DATA imports from DLLs on WIN32 con't be const, because runtime
18187    relocations are performed -- see ld's documentation on pseudo-relocs.  */
18188 # define LT_DLSYM_CONST
18189 #elif defined(__osf__)
18190 /* This system does not cope well with relocations in const data.  */
18191 # define LT_DLSYM_CONST
18192 #else
18193 # define LT_DLSYM_CONST const
18194 #endif
18195
18196 #ifdef __cplusplus
18197 extern "C" {
18198 #endif
18199
18200 _LT_EOF
18201           # Now generate the symbol file.
18202           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
18203
18204           cat <<_LT_EOF >> conftest.$ac_ext
18205
18206 /* The mapping between symbol names and symbols.  */
18207 LT_DLSYM_CONST struct {
18208   const char *name;
18209   void       *address;
18210 }
18211 lt__PROGRAM__LTX_preloaded_symbols[] =
18212 {
18213   { "@PROGRAM@", (void *) 0 },
18214 _LT_EOF
18215           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
18216           cat <<\_LT_EOF >> conftest.$ac_ext
18217   {0, (void *) 0}
18218 };
18219
18220 /* This works around a problem in FreeBSD linker */
18221 #ifdef FREEBSD_WORKAROUND
18222 static const void *lt_preloaded_setup() {
18223   return lt__PROGRAM__LTX_preloaded_symbols;
18224 }
18225 #endif
18226
18227 #ifdef __cplusplus
18228 }
18229 #endif
18230 _LT_EOF
18231           # Now try linking the two files.
18232           mv conftest.$ac_objext conftstm.$ac_objext
18233           lt_globsym_save_LIBS=$LIBS
18234           lt_globsym_save_CFLAGS=$CFLAGS
18235           LIBS="conftstm.$ac_objext"
18236           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
18237           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
18238   (eval $ac_link) 2>&5
18239   ac_status=$?
18240   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18241   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
18242             pipe_works=yes
18243           fi
18244           LIBS=$lt_globsym_save_LIBS
18245           CFLAGS=$lt_globsym_save_CFLAGS
18246         else
18247           echo "cannot find nm_test_func in $nlist" >&5
18248         fi
18249       else
18250         echo "cannot find nm_test_var in $nlist" >&5
18251       fi
18252     else
18253       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
18254     fi
18255   else
18256     echo "$progname: failed program was:" >&5
18257     cat conftest.$ac_ext >&5
18258   fi
18259   rm -rf conftest* conftst*
18260
18261   # Do not use the global_symbol_pipe unless it works.
18262   if test "$pipe_works" = yes; then
18263     break
18264   else
18265     lt_cv_sys_global_symbol_pipe=
18266   fi
18267 done
18268
18269 fi
18270
18271 if test -z "$lt_cv_sys_global_symbol_pipe"; then
18272   lt_cv_sys_global_symbol_to_cdecl=
18273 fi
18274 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
18275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
18276 $as_echo "failed" >&6; }
18277 else
18278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18279 $as_echo "ok" >&6; }
18280 fi
18281
18282 # Response file support.
18283 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
18284   nm_file_list_spec='@'
18285 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
18286   nm_file_list_spec='@'
18287 fi
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
18316 $as_echo_n "checking for sysroot... " >&6; }
18317
18318 # Check whether --with-sysroot was given.
18319 if test "${with_sysroot+set}" = set; then :
18320   withval=$with_sysroot;
18321 else
18322   with_sysroot=no
18323 fi
18324
18325
18326 lt_sysroot=
18327 case ${with_sysroot} in #(
18328  yes)
18329    if test "$GCC" = yes; then
18330      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
18331    fi
18332    ;; #(
18333  /*)
18334    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
18335    ;; #(
18336  no|'')
18337    ;; #(
18338  *)
18339    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
18340 $as_echo "${with_sysroot}" >&6; }
18341    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
18342    ;;
18343 esac
18344
18345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
18346 $as_echo "${lt_sysroot:-no}" >&6; }
18347
18348
18349
18350
18351
18352 # Check whether --enable-libtool-lock was given.
18353 if test "${enable_libtool_lock+set}" = set; then :
18354   enableval=$enable_libtool_lock;
18355 fi
18356
18357 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
18358
18359 # Some flags need to be propagated to the compiler or linker for good
18360 # libtool support.
18361 case $host in
18362 ia64-*-hpux*)
18363   # Find out which ABI we are using.
18364   echo 'int i;' > conftest.$ac_ext
18365   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18366   (eval $ac_compile) 2>&5
18367   ac_status=$?
18368   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18369   test $ac_status = 0; }; then
18370     case `/usr/bin/file conftest.$ac_objext` in
18371       *ELF-32*)
18372         HPUX_IA64_MODE="32"
18373         ;;
18374       *ELF-64*)
18375         HPUX_IA64_MODE="64"
18376         ;;
18377     esac
18378   fi
18379   rm -rf conftest*
18380   ;;
18381 *-*-irix6*)
18382   # Find out which ABI we are using.
18383   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
18384   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18385   (eval $ac_compile) 2>&5
18386   ac_status=$?
18387   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18388   test $ac_status = 0; }; then
18389     if test "$lt_cv_prog_gnu_ld" = yes; then
18390       case `/usr/bin/file conftest.$ac_objext` in
18391         *32-bit*)
18392           LD="${LD-ld} -melf32bsmip"
18393           ;;
18394         *N32*)
18395           LD="${LD-ld} -melf32bmipn32"
18396           ;;
18397         *64-bit*)
18398           LD="${LD-ld} -melf64bmip"
18399         ;;
18400       esac
18401     else
18402       case `/usr/bin/file conftest.$ac_objext` in
18403         *32-bit*)
18404           LD="${LD-ld} -32"
18405           ;;
18406         *N32*)
18407           LD="${LD-ld} -n32"
18408           ;;
18409         *64-bit*)
18410           LD="${LD-ld} -64"
18411           ;;
18412       esac
18413     fi
18414   fi
18415   rm -rf conftest*
18416   ;;
18417
18418 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
18419 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
18420   # Find out which ABI we are using.
18421   echo 'int i;' > conftest.$ac_ext
18422   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18423   (eval $ac_compile) 2>&5
18424   ac_status=$?
18425   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18426   test $ac_status = 0; }; then
18427     case `/usr/bin/file conftest.o` in
18428       *32-bit*)
18429         case $host in
18430           x86_64-*kfreebsd*-gnu)
18431             LD="${LD-ld} -m elf_i386_fbsd"
18432             ;;
18433           x86_64-*linux*)
18434             LD="${LD-ld} -m elf_i386"
18435             ;;
18436           ppc64-*linux*|powerpc64-*linux*)
18437             LD="${LD-ld} -m elf32ppclinux"
18438             ;;
18439           s390x-*linux*)
18440             LD="${LD-ld} -m elf_s390"
18441             ;;
18442           sparc64-*linux*)
18443             LD="${LD-ld} -m elf32_sparc"
18444             ;;
18445         esac
18446         ;;
18447       *64-bit*)
18448         case $host in
18449           x86_64-*kfreebsd*-gnu)
18450             LD="${LD-ld} -m elf_x86_64_fbsd"
18451             ;;
18452           x86_64-*linux*)
18453             LD="${LD-ld} -m elf_x86_64"
18454             ;;
18455           ppc*-*linux*|powerpc*-*linux*)
18456             LD="${LD-ld} -m elf64ppc"
18457             ;;
18458           s390*-*linux*|s390*-*tpf*)
18459             LD="${LD-ld} -m elf64_s390"
18460             ;;
18461           sparc*-*linux*)
18462             LD="${LD-ld} -m elf64_sparc"
18463             ;;
18464         esac
18465         ;;
18466     esac
18467   fi
18468   rm -rf conftest*
18469   ;;
18470
18471 *-*-sco3.2v5*)
18472   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
18473   SAVE_CFLAGS="$CFLAGS"
18474   CFLAGS="$CFLAGS -belf"
18475   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
18476 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
18477 if ${lt_cv_cc_needs_belf+:} false; then :
18478   $as_echo_n "(cached) " >&6
18479 else
18480   ac_ext=c
18481 ac_cpp='$CPP $CPPFLAGS'
18482 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18483 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18484 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18485
18486      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18487 /* end confdefs.h.  */
18488
18489 int
18490 main ()
18491 {
18492
18493   ;
18494   return 0;
18495 }
18496 _ACEOF
18497 if ac_fn_c_try_link "$LINENO"; then :
18498   lt_cv_cc_needs_belf=yes
18499 else
18500   lt_cv_cc_needs_belf=no
18501 fi
18502 rm -f core conftest.err conftest.$ac_objext \
18503     conftest$ac_exeext conftest.$ac_ext
18504      ac_ext=c
18505 ac_cpp='$CPP $CPPFLAGS'
18506 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18507 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18508 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18509
18510 fi
18511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
18512 $as_echo "$lt_cv_cc_needs_belf" >&6; }
18513   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
18514     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
18515     CFLAGS="$SAVE_CFLAGS"
18516   fi
18517   ;;
18518 sparc*-*solaris*)
18519   # Find out which ABI we are using.
18520   echo 'int i;' > conftest.$ac_ext
18521   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18522   (eval $ac_compile) 2>&5
18523   ac_status=$?
18524   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18525   test $ac_status = 0; }; then
18526     case `/usr/bin/file conftest.o` in
18527     *64-bit*)
18528       case $lt_cv_prog_gnu_ld in
18529       yes*) LD="${LD-ld} -m elf64_sparc" ;;
18530       *)
18531         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
18532           LD="${LD-ld} -64"
18533         fi
18534         ;;
18535       esac
18536       ;;
18537     esac
18538   fi
18539   rm -rf conftest*
18540   ;;
18541 esac
18542
18543 need_locks="$enable_libtool_lock"
18544
18545 if test -n "$ac_tool_prefix"; then
18546   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
18547 set dummy ${ac_tool_prefix}mt; ac_word=$2
18548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18549 $as_echo_n "checking for $ac_word... " >&6; }
18550 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
18551   $as_echo_n "(cached) " >&6
18552 else
18553   if test -n "$MANIFEST_TOOL"; then
18554   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
18555 else
18556 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18557 for as_dir in $PATH
18558 do
18559   IFS=$as_save_IFS
18560   test -z "$as_dir" && as_dir=.
18561     for ac_exec_ext in '' $ac_executable_extensions; do
18562   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18563     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
18564     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18565     break 2
18566   fi
18567 done
18568   done
18569 IFS=$as_save_IFS
18570
18571 fi
18572 fi
18573 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
18574 if test -n "$MANIFEST_TOOL"; then
18575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
18576 $as_echo "$MANIFEST_TOOL" >&6; }
18577 else
18578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18579 $as_echo "no" >&6; }
18580 fi
18581
18582
18583 fi
18584 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
18585   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
18586   # Extract the first word of "mt", so it can be a program name with args.
18587 set dummy mt; ac_word=$2
18588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18589 $as_echo_n "checking for $ac_word... " >&6; }
18590 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
18591   $as_echo_n "(cached) " >&6
18592 else
18593   if test -n "$ac_ct_MANIFEST_TOOL"; then
18594   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
18595 else
18596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18597 for as_dir in $PATH
18598 do
18599   IFS=$as_save_IFS
18600   test -z "$as_dir" && as_dir=.
18601     for ac_exec_ext in '' $ac_executable_extensions; do
18602   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18603     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
18604     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18605     break 2
18606   fi
18607 done
18608   done
18609 IFS=$as_save_IFS
18610
18611 fi
18612 fi
18613 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
18614 if test -n "$ac_ct_MANIFEST_TOOL"; then
18615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
18616 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
18617 else
18618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18619 $as_echo "no" >&6; }
18620 fi
18621
18622   if test "x$ac_ct_MANIFEST_TOOL" = x; then
18623     MANIFEST_TOOL=":"
18624   else
18625     case $cross_compiling:$ac_tool_warned in
18626 yes:)
18627 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18628 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18629 ac_tool_warned=yes ;;
18630 esac
18631     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
18632   fi
18633 else
18634   MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
18635 fi
18636
18637 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
18638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
18639 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
18640 if ${lt_cv_path_mainfest_tool+:} false; then :
18641   $as_echo_n "(cached) " >&6
18642 else
18643   lt_cv_path_mainfest_tool=no
18644   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
18645   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
18646   cat conftest.err >&5
18647   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
18648     lt_cv_path_mainfest_tool=yes
18649   fi
18650   rm -f conftest*
18651 fi
18652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
18653 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
18654 if test "x$lt_cv_path_mainfest_tool" != xyes; then
18655   MANIFEST_TOOL=:
18656 fi
18657
18658
18659
18660
18661
18662
18663   case $host_os in
18664     rhapsody* | darwin*)
18665     if test -n "$ac_tool_prefix"; then
18666   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
18667 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
18668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18669 $as_echo_n "checking for $ac_word... " >&6; }
18670 if ${ac_cv_prog_DSYMUTIL+:} false; then :
18671   $as_echo_n "(cached) " >&6
18672 else
18673   if test -n "$DSYMUTIL"; then
18674   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
18675 else
18676 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18677 for as_dir in $PATH
18678 do
18679   IFS=$as_save_IFS
18680   test -z "$as_dir" && as_dir=.
18681     for ac_exec_ext in '' $ac_executable_extensions; do
18682   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18683     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
18684     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18685     break 2
18686   fi
18687 done
18688   done
18689 IFS=$as_save_IFS
18690
18691 fi
18692 fi
18693 DSYMUTIL=$ac_cv_prog_DSYMUTIL
18694 if test -n "$DSYMUTIL"; then
18695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18696 $as_echo "$DSYMUTIL" >&6; }
18697 else
18698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18699 $as_echo "no" >&6; }
18700 fi
18701
18702
18703 fi
18704 if test -z "$ac_cv_prog_DSYMUTIL"; then
18705   ac_ct_DSYMUTIL=$DSYMUTIL
18706   # Extract the first word of "dsymutil", so it can be a program name with args.
18707 set dummy dsymutil; ac_word=$2
18708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18709 $as_echo_n "checking for $ac_word... " >&6; }
18710 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
18711   $as_echo_n "(cached) " >&6
18712 else
18713   if test -n "$ac_ct_DSYMUTIL"; then
18714   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
18715 else
18716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18717 for as_dir in $PATH
18718 do
18719   IFS=$as_save_IFS
18720   test -z "$as_dir" && as_dir=.
18721     for ac_exec_ext in '' $ac_executable_extensions; do
18722   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18723     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
18724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18725     break 2
18726   fi
18727 done
18728   done
18729 IFS=$as_save_IFS
18730
18731 fi
18732 fi
18733 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
18734 if test -n "$ac_ct_DSYMUTIL"; then
18735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
18736 $as_echo "$ac_ct_DSYMUTIL" >&6; }
18737 else
18738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18739 $as_echo "no" >&6; }
18740 fi
18741
18742   if test "x$ac_ct_DSYMUTIL" = x; then
18743     DSYMUTIL=":"
18744   else
18745     case $cross_compiling:$ac_tool_warned in
18746 yes:)
18747 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18748 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18749 ac_tool_warned=yes ;;
18750 esac
18751     DSYMUTIL=$ac_ct_DSYMUTIL
18752   fi
18753 else
18754   DSYMUTIL="$ac_cv_prog_DSYMUTIL"
18755 fi
18756
18757     if test -n "$ac_tool_prefix"; then
18758   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
18759 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
18760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18761 $as_echo_n "checking for $ac_word... " >&6; }
18762 if ${ac_cv_prog_NMEDIT+:} false; then :
18763   $as_echo_n "(cached) " >&6
18764 else
18765   if test -n "$NMEDIT"; then
18766   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
18767 else
18768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18769 for as_dir in $PATH
18770 do
18771   IFS=$as_save_IFS
18772   test -z "$as_dir" && as_dir=.
18773     for ac_exec_ext in '' $ac_executable_extensions; do
18774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18775     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
18776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18777     break 2
18778   fi
18779 done
18780   done
18781 IFS=$as_save_IFS
18782
18783 fi
18784 fi
18785 NMEDIT=$ac_cv_prog_NMEDIT
18786 if test -n "$NMEDIT"; then
18787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
18788 $as_echo "$NMEDIT" >&6; }
18789 else
18790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18791 $as_echo "no" >&6; }
18792 fi
18793
18794
18795 fi
18796 if test -z "$ac_cv_prog_NMEDIT"; then
18797   ac_ct_NMEDIT=$NMEDIT
18798   # Extract the first word of "nmedit", so it can be a program name with args.
18799 set dummy nmedit; ac_word=$2
18800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18801 $as_echo_n "checking for $ac_word... " >&6; }
18802 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
18803   $as_echo_n "(cached) " >&6
18804 else
18805   if test -n "$ac_ct_NMEDIT"; then
18806   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
18807 else
18808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18809 for as_dir in $PATH
18810 do
18811   IFS=$as_save_IFS
18812   test -z "$as_dir" && as_dir=.
18813     for ac_exec_ext in '' $ac_executable_extensions; do
18814   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18815     ac_cv_prog_ac_ct_NMEDIT="nmedit"
18816     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18817     break 2
18818   fi
18819 done
18820   done
18821 IFS=$as_save_IFS
18822
18823 fi
18824 fi
18825 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
18826 if test -n "$ac_ct_NMEDIT"; then
18827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
18828 $as_echo "$ac_ct_NMEDIT" >&6; }
18829 else
18830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18831 $as_echo "no" >&6; }
18832 fi
18833
18834   if test "x$ac_ct_NMEDIT" = x; then
18835     NMEDIT=":"
18836   else
18837     case $cross_compiling:$ac_tool_warned in
18838 yes:)
18839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18840 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18841 ac_tool_warned=yes ;;
18842 esac
18843     NMEDIT=$ac_ct_NMEDIT
18844   fi
18845 else
18846   NMEDIT="$ac_cv_prog_NMEDIT"
18847 fi
18848
18849     if test -n "$ac_tool_prefix"; then
18850   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
18851 set dummy ${ac_tool_prefix}lipo; ac_word=$2
18852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18853 $as_echo_n "checking for $ac_word... " >&6; }
18854 if ${ac_cv_prog_LIPO+:} false; then :
18855   $as_echo_n "(cached) " >&6
18856 else
18857   if test -n "$LIPO"; then
18858   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
18859 else
18860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18861 for as_dir in $PATH
18862 do
18863   IFS=$as_save_IFS
18864   test -z "$as_dir" && as_dir=.
18865     for ac_exec_ext in '' $ac_executable_extensions; do
18866   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18867     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
18868     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18869     break 2
18870   fi
18871 done
18872   done
18873 IFS=$as_save_IFS
18874
18875 fi
18876 fi
18877 LIPO=$ac_cv_prog_LIPO
18878 if test -n "$LIPO"; then
18879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
18880 $as_echo "$LIPO" >&6; }
18881 else
18882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18883 $as_echo "no" >&6; }
18884 fi
18885
18886
18887 fi
18888 if test -z "$ac_cv_prog_LIPO"; then
18889   ac_ct_LIPO=$LIPO
18890   # Extract the first word of "lipo", so it can be a program name with args.
18891 set dummy lipo; ac_word=$2
18892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18893 $as_echo_n "checking for $ac_word... " >&6; }
18894 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
18895   $as_echo_n "(cached) " >&6
18896 else
18897   if test -n "$ac_ct_LIPO"; then
18898   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
18899 else
18900 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18901 for as_dir in $PATH
18902 do
18903   IFS=$as_save_IFS
18904   test -z "$as_dir" && as_dir=.
18905     for ac_exec_ext in '' $ac_executable_extensions; do
18906   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18907     ac_cv_prog_ac_ct_LIPO="lipo"
18908     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18909     break 2
18910   fi
18911 done
18912   done
18913 IFS=$as_save_IFS
18914
18915 fi
18916 fi
18917 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
18918 if test -n "$ac_ct_LIPO"; then
18919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
18920 $as_echo "$ac_ct_LIPO" >&6; }
18921 else
18922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18923 $as_echo "no" >&6; }
18924 fi
18925
18926   if test "x$ac_ct_LIPO" = x; then
18927     LIPO=":"
18928   else
18929     case $cross_compiling:$ac_tool_warned in
18930 yes:)
18931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18932 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18933 ac_tool_warned=yes ;;
18934 esac
18935     LIPO=$ac_ct_LIPO
18936   fi
18937 else
18938   LIPO="$ac_cv_prog_LIPO"
18939 fi
18940
18941     if test -n "$ac_tool_prefix"; then
18942   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
18943 set dummy ${ac_tool_prefix}otool; ac_word=$2
18944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18945 $as_echo_n "checking for $ac_word... " >&6; }
18946 if ${ac_cv_prog_OTOOL+:} false; then :
18947   $as_echo_n "(cached) " >&6
18948 else
18949   if test -n "$OTOOL"; then
18950   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
18951 else
18952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18953 for as_dir in $PATH
18954 do
18955   IFS=$as_save_IFS
18956   test -z "$as_dir" && as_dir=.
18957     for ac_exec_ext in '' $ac_executable_extensions; do
18958   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18959     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
18960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18961     break 2
18962   fi
18963 done
18964   done
18965 IFS=$as_save_IFS
18966
18967 fi
18968 fi
18969 OTOOL=$ac_cv_prog_OTOOL
18970 if test -n "$OTOOL"; then
18971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18972 $as_echo "$OTOOL" >&6; }
18973 else
18974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18975 $as_echo "no" >&6; }
18976 fi
18977
18978
18979 fi
18980 if test -z "$ac_cv_prog_OTOOL"; then
18981   ac_ct_OTOOL=$OTOOL
18982   # Extract the first word of "otool", so it can be a program name with args.
18983 set dummy otool; ac_word=$2
18984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18985 $as_echo_n "checking for $ac_word... " >&6; }
18986 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
18987   $as_echo_n "(cached) " >&6
18988 else
18989   if test -n "$ac_ct_OTOOL"; then
18990   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
18991 else
18992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18993 for as_dir in $PATH
18994 do
18995   IFS=$as_save_IFS
18996   test -z "$as_dir" && as_dir=.
18997     for ac_exec_ext in '' $ac_executable_extensions; do
18998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18999     ac_cv_prog_ac_ct_OTOOL="otool"
19000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19001     break 2
19002   fi
19003 done
19004   done
19005 IFS=$as_save_IFS
19006
19007 fi
19008 fi
19009 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
19010 if test -n "$ac_ct_OTOOL"; then
19011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
19012 $as_echo "$ac_ct_OTOOL" >&6; }
19013 else
19014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19015 $as_echo "no" >&6; }
19016 fi
19017
19018   if test "x$ac_ct_OTOOL" = x; then
19019     OTOOL=":"
19020   else
19021     case $cross_compiling:$ac_tool_warned in
19022 yes:)
19023 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19024 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19025 ac_tool_warned=yes ;;
19026 esac
19027     OTOOL=$ac_ct_OTOOL
19028   fi
19029 else
19030   OTOOL="$ac_cv_prog_OTOOL"
19031 fi
19032
19033     if test -n "$ac_tool_prefix"; then
19034   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
19035 set dummy ${ac_tool_prefix}otool64; ac_word=$2
19036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19037 $as_echo_n "checking for $ac_word... " >&6; }
19038 if ${ac_cv_prog_OTOOL64+:} false; then :
19039   $as_echo_n "(cached) " >&6
19040 else
19041   if test -n "$OTOOL64"; then
19042   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
19043 else
19044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19045 for as_dir in $PATH
19046 do
19047   IFS=$as_save_IFS
19048   test -z "$as_dir" && as_dir=.
19049     for ac_exec_ext in '' $ac_executable_extensions; do
19050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19051     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
19052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19053     break 2
19054   fi
19055 done
19056   done
19057 IFS=$as_save_IFS
19058
19059 fi
19060 fi
19061 OTOOL64=$ac_cv_prog_OTOOL64
19062 if test -n "$OTOOL64"; then
19063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
19064 $as_echo "$OTOOL64" >&6; }
19065 else
19066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19067 $as_echo "no" >&6; }
19068 fi
19069
19070
19071 fi
19072 if test -z "$ac_cv_prog_OTOOL64"; then
19073   ac_ct_OTOOL64=$OTOOL64
19074   # Extract the first word of "otool64", so it can be a program name with args.
19075 set dummy otool64; ac_word=$2
19076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19077 $as_echo_n "checking for $ac_word... " >&6; }
19078 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
19079   $as_echo_n "(cached) " >&6
19080 else
19081   if test -n "$ac_ct_OTOOL64"; then
19082   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
19083 else
19084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19085 for as_dir in $PATH
19086 do
19087   IFS=$as_save_IFS
19088   test -z "$as_dir" && as_dir=.
19089     for ac_exec_ext in '' $ac_executable_extensions; do
19090   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19091     ac_cv_prog_ac_ct_OTOOL64="otool64"
19092     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19093     break 2
19094   fi
19095 done
19096   done
19097 IFS=$as_save_IFS
19098
19099 fi
19100 fi
19101 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
19102 if test -n "$ac_ct_OTOOL64"; then
19103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
19104 $as_echo "$ac_ct_OTOOL64" >&6; }
19105 else
19106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19107 $as_echo "no" >&6; }
19108 fi
19109
19110   if test "x$ac_ct_OTOOL64" = x; then
19111     OTOOL64=":"
19112   else
19113     case $cross_compiling:$ac_tool_warned in
19114 yes:)
19115 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19116 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19117 ac_tool_warned=yes ;;
19118 esac
19119     OTOOL64=$ac_ct_OTOOL64
19120   fi
19121 else
19122   OTOOL64="$ac_cv_prog_OTOOL64"
19123 fi
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
19152 $as_echo_n "checking for -single_module linker flag... " >&6; }
19153 if ${lt_cv_apple_cc_single_mod+:} false; then :
19154   $as_echo_n "(cached) " >&6
19155 else
19156   lt_cv_apple_cc_single_mod=no
19157       if test -z "${LT_MULTI_MODULE}"; then
19158         # By default we will add the -single_module flag. You can override
19159         # by either setting the environment variable LT_MULTI_MODULE
19160         # non-empty at configure time, or by adding -multi_module to the
19161         # link flags.
19162         rm -rf libconftest.dylib*
19163         echo "int foo(void){return 1;}" > conftest.c
19164         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
19165 -dynamiclib -Wl,-single_module conftest.c" >&5
19166         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
19167           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
19168         _lt_result=$?
19169         if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
19170           lt_cv_apple_cc_single_mod=yes
19171         else
19172           cat conftest.err >&5
19173         fi
19174         rm -rf libconftest.dylib*
19175         rm -f conftest.*
19176       fi
19177 fi
19178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
19179 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
19180     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
19181 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
19182 if ${lt_cv_ld_exported_symbols_list+:} false; then :
19183   $as_echo_n "(cached) " >&6
19184 else
19185   lt_cv_ld_exported_symbols_list=no
19186       save_LDFLAGS=$LDFLAGS
19187       echo "_main" > conftest.sym
19188       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
19189       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19190 /* end confdefs.h.  */
19191
19192 int
19193 main ()
19194 {
19195
19196   ;
19197   return 0;
19198 }
19199 _ACEOF
19200 if ac_fn_c_try_link "$LINENO"; then :
19201   lt_cv_ld_exported_symbols_list=yes
19202 else
19203   lt_cv_ld_exported_symbols_list=no
19204 fi
19205 rm -f core conftest.err conftest.$ac_objext \
19206     conftest$ac_exeext conftest.$ac_ext
19207         LDFLAGS="$save_LDFLAGS"
19208
19209 fi
19210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
19211 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
19212     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
19213 $as_echo_n "checking for -force_load linker flag... " >&6; }
19214 if ${lt_cv_ld_force_load+:} false; then :
19215   $as_echo_n "(cached) " >&6
19216 else
19217   lt_cv_ld_force_load=no
19218       cat > conftest.c << _LT_EOF
19219 int forced_loaded() { return 2;}
19220 _LT_EOF
19221       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
19222       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
19223       echo "$AR cru libconftest.a conftest.o" >&5
19224       $AR cru libconftest.a conftest.o 2>&5
19225       echo "$RANLIB libconftest.a" >&5
19226       $RANLIB libconftest.a 2>&5
19227       cat > conftest.c << _LT_EOF
19228 int main() { return 0;}
19229 _LT_EOF
19230       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
19231       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
19232       _lt_result=$?
19233       if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
19234         lt_cv_ld_force_load=yes
19235       else
19236         cat conftest.err >&5
19237       fi
19238         rm -f conftest.err libconftest.a conftest conftest.c
19239         rm -rf conftest.dSYM
19240
19241 fi
19242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
19243 $as_echo "$lt_cv_ld_force_load" >&6; }
19244     case $host_os in
19245     rhapsody* | darwin1.[012])
19246       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
19247     darwin1.*)
19248       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
19249     darwin*) # darwin 5.x on
19250       # if running on 10.5 or later, the deployment target defaults
19251       # to the OS version, if on x86, and 10.4, the deployment
19252       # target defaults to 10.4. Don't you love it?
19253       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
19254         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
19255           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
19256         10.[012]*)
19257           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
19258         10.*)
19259           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
19260       esac
19261     ;;
19262   esac
19263     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
19264       _lt_dar_single_mod='$single_module'
19265     fi
19266     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
19267       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
19268     else
19269       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
19270     fi
19271     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
19272       _lt_dsymutil='~$DSYMUTIL $lib || :'
19273     else
19274       _lt_dsymutil=
19275     fi
19276     ;;
19277   esac
19278
19279 for ac_header in dlfcn.h
19280 do :
19281   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
19282 "
19283 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
19284   cat >>confdefs.h <<_ACEOF
19285 #define HAVE_DLFCN_H 1
19286 _ACEOF
19287
19288 fi
19289
19290 done
19291
19292
19293
19294
19295
19296 # Set options
19297
19298
19299
19300         enable_dlopen=no
19301
19302
19303   enable_win32_dll=no
19304
19305
19306
19307   # Check whether --enable-static was given.
19308 if test "${enable_static+set}" = set; then :
19309   enableval=$enable_static; p=${PACKAGE-default}
19310     case $enableval in
19311     yes) enable_static=yes ;;
19312     no) enable_static=no ;;
19313     *)
19314      enable_static=no
19315       # Look at the argument we got.  We use all the common list separators.
19316       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
19317       for pkg in $enableval; do
19318         IFS="$lt_save_ifs"
19319         if test "X$pkg" = "X$p"; then
19320           enable_static=yes
19321         fi
19322       done
19323       IFS="$lt_save_ifs"
19324       ;;
19325     esac
19326 else
19327   enable_static=yes
19328 fi
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339 # Check whether --with-pic was given.
19340 if test "${with_pic+set}" = set; then :
19341   withval=$with_pic; pic_mode="$withval"
19342 else
19343   pic_mode=default
19344 fi
19345
19346
19347 test -z "$pic_mode" && pic_mode=default
19348
19349
19350
19351
19352
19353
19354
19355   # Check whether --enable-fast-install was given.
19356 if test "${enable_fast_install+set}" = set; then :
19357   enableval=$enable_fast_install; p=${PACKAGE-default}
19358     case $enableval in
19359     yes) enable_fast_install=yes ;;
19360     no) enable_fast_install=no ;;
19361     *)
19362       enable_fast_install=no
19363       # Look at the argument we got.  We use all the common list separators.
19364       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
19365       for pkg in $enableval; do
19366         IFS="$lt_save_ifs"
19367         if test "X$pkg" = "X$p"; then
19368           enable_fast_install=yes
19369         fi
19370       done
19371       IFS="$lt_save_ifs"
19372       ;;
19373     esac
19374 else
19375   enable_fast_install=yes
19376 fi
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388 # This can be used to rebuild libtool when needed
19389 LIBTOOL_DEPS="$ltmain"
19390
19391 # Always use our own libtool.
19392 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419 test -z "$LN_S" && LN_S="ln -s"
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434 if test -n "${ZSH_VERSION+set}" ; then
19435    setopt NO_GLOB_SUBST
19436 fi
19437
19438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
19439 $as_echo_n "checking for objdir... " >&6; }
19440 if ${lt_cv_objdir+:} false; then :
19441   $as_echo_n "(cached) " >&6
19442 else
19443   rm -f .libs 2>/dev/null
19444 mkdir .libs 2>/dev/null
19445 if test -d .libs; then
19446   lt_cv_objdir=.libs
19447 else
19448   # MS-DOS does not allow filenames that begin with a dot.
19449   lt_cv_objdir=_libs
19450 fi
19451 rmdir .libs 2>/dev/null
19452 fi
19453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
19454 $as_echo "$lt_cv_objdir" >&6; }
19455 objdir=$lt_cv_objdir
19456
19457
19458
19459
19460
19461 cat >>confdefs.h <<_ACEOF
19462 #define LT_OBJDIR "$lt_cv_objdir/"
19463 _ACEOF
19464
19465
19466
19467
19468 case $host_os in
19469 aix3*)
19470   # AIX sometimes has problems with the GCC collect2 program.  For some
19471   # reason, if we set the COLLECT_NAMES environment variable, the problems
19472   # vanish in a puff of smoke.
19473   if test "X${COLLECT_NAMES+set}" != Xset; then
19474     COLLECT_NAMES=
19475     export COLLECT_NAMES
19476   fi
19477   ;;
19478 esac
19479
19480 # Global variables:
19481 ofile=libtool
19482 can_build_shared=yes
19483
19484 # All known linkers require a `.a' archive for static linking (except MSVC,
19485 # which needs '.lib').
19486 libext=a
19487
19488 with_gnu_ld="$lt_cv_prog_gnu_ld"
19489
19490 old_CC="$CC"
19491 old_CFLAGS="$CFLAGS"
19492
19493 # Set sane defaults for various variables
19494 test -z "$CC" && CC=cc
19495 test -z "$LTCC" && LTCC=$CC
19496 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
19497 test -z "$LD" && LD=ld
19498 test -z "$ac_objext" && ac_objext=o
19499
19500 for cc_temp in $compiler""; do
19501   case $cc_temp in
19502     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
19503     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
19504     \-*) ;;
19505     *) break;;
19506   esac
19507 done
19508 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
19509
19510
19511 # Only perform the check for file, if the check method requires it
19512 test -z "$MAGIC_CMD" && MAGIC_CMD=file
19513 case $deplibs_check_method in
19514 file_magic*)
19515   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
19516     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
19517 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
19518 if ${lt_cv_path_MAGIC_CMD+:} false; then :
19519   $as_echo_n "(cached) " >&6
19520 else
19521   case $MAGIC_CMD in
19522 [\\/*] |  ?:[\\/]*)
19523   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
19524   ;;
19525 *)
19526   lt_save_MAGIC_CMD="$MAGIC_CMD"
19527   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
19528   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
19529   for ac_dir in $ac_dummy; do
19530     IFS="$lt_save_ifs"
19531     test -z "$ac_dir" && ac_dir=.
19532     if test -f $ac_dir/${ac_tool_prefix}file; then
19533       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
19534       if test -n "$file_magic_test_file"; then
19535         case $deplibs_check_method in
19536         "file_magic "*)
19537           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
19538           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19539           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
19540             $EGREP "$file_magic_regex" > /dev/null; then
19541             :
19542           else
19543             cat <<_LT_EOF 1>&2
19544
19545 *** Warning: the command libtool uses to detect shared libraries,
19546 *** $file_magic_cmd, produces output that libtool cannot recognize.
19547 *** The result is that libtool may fail to recognize shared libraries
19548 *** as such.  This will affect the creation of libtool libraries that
19549 *** depend on shared libraries, but programs linked with such libtool
19550 *** libraries will work regardless of this problem.  Nevertheless, you
19551 *** may want to report the problem to your system manager and/or to
19552 *** bug-libtool@gnu.org
19553
19554 _LT_EOF
19555           fi ;;
19556         esac
19557       fi
19558       break
19559     fi
19560   done
19561   IFS="$lt_save_ifs"
19562   MAGIC_CMD="$lt_save_MAGIC_CMD"
19563   ;;
19564 esac
19565 fi
19566
19567 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19568 if test -n "$MAGIC_CMD"; then
19569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
19570 $as_echo "$MAGIC_CMD" >&6; }
19571 else
19572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19573 $as_echo "no" >&6; }
19574 fi
19575
19576
19577
19578
19579
19580 if test -z "$lt_cv_path_MAGIC_CMD"; then
19581   if test -n "$ac_tool_prefix"; then
19582     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
19583 $as_echo_n "checking for file... " >&6; }
19584 if ${lt_cv_path_MAGIC_CMD+:} false; then :
19585   $as_echo_n "(cached) " >&6
19586 else
19587   case $MAGIC_CMD in
19588 [\\/*] |  ?:[\\/]*)
19589   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
19590   ;;
19591 *)
19592   lt_save_MAGIC_CMD="$MAGIC_CMD"
19593   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
19594   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
19595   for ac_dir in $ac_dummy; do
19596     IFS="$lt_save_ifs"
19597     test -z "$ac_dir" && ac_dir=.
19598     if test -f $ac_dir/file; then
19599       lt_cv_path_MAGIC_CMD="$ac_dir/file"
19600       if test -n "$file_magic_test_file"; then
19601         case $deplibs_check_method in
19602         "file_magic "*)
19603           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
19604           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19605           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
19606             $EGREP "$file_magic_regex" > /dev/null; then
19607             :
19608           else
19609             cat <<_LT_EOF 1>&2
19610
19611 *** Warning: the command libtool uses to detect shared libraries,
19612 *** $file_magic_cmd, produces output that libtool cannot recognize.
19613 *** The result is that libtool may fail to recognize shared libraries
19614 *** as such.  This will affect the creation of libtool libraries that
19615 *** depend on shared libraries, but programs linked with such libtool
19616 *** libraries will work regardless of this problem.  Nevertheless, you
19617 *** may want to report the problem to your system manager and/or to
19618 *** bug-libtool@gnu.org
19619
19620 _LT_EOF
19621           fi ;;
19622         esac
19623       fi
19624       break
19625     fi
19626   done
19627   IFS="$lt_save_ifs"
19628   MAGIC_CMD="$lt_save_MAGIC_CMD"
19629   ;;
19630 esac
19631 fi
19632
19633 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19634 if test -n "$MAGIC_CMD"; then
19635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
19636 $as_echo "$MAGIC_CMD" >&6; }
19637 else
19638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19639 $as_echo "no" >&6; }
19640 fi
19641
19642
19643   else
19644     MAGIC_CMD=:
19645   fi
19646 fi
19647
19648   fi
19649   ;;
19650 esac
19651
19652 # Use C for the default configuration in the libtool script
19653
19654 lt_save_CC="$CC"
19655 ac_ext=c
19656 ac_cpp='$CPP $CPPFLAGS'
19657 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19658 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19659 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19660
19661
19662 # Source file extension for C test sources.
19663 ac_ext=c
19664
19665 # Object file extension for compiled C test sources.
19666 objext=o
19667 objext=$objext
19668
19669 # Code to be used in simple compile tests
19670 lt_simple_compile_test_code="int some_variable = 0;"
19671
19672 # Code to be used in simple link tests
19673 lt_simple_link_test_code='int main(){return(0);}'
19674
19675
19676
19677
19678
19679
19680
19681 # If no C compiler was specified, use CC.
19682 LTCC=${LTCC-"$CC"}
19683
19684 # If no C compiler flags were specified, use CFLAGS.
19685 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
19686
19687 # Allow CC to be a program name with arguments.
19688 compiler=$CC
19689
19690 # Save the default compiler, since it gets overwritten when the other
19691 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
19692 compiler_DEFAULT=$CC
19693
19694 # save warnings/boilerplate of simple test code
19695 ac_outfile=conftest.$ac_objext
19696 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
19697 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19698 _lt_compiler_boilerplate=`cat conftest.err`
19699 $RM conftest*
19700
19701 ac_outfile=conftest.$ac_objext
19702 echo "$lt_simple_link_test_code" >conftest.$ac_ext
19703 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19704 _lt_linker_boilerplate=`cat conftest.err`
19705 $RM -r conftest*
19706
19707
19708 ## CAVEAT EMPTOR:
19709 ## There is no encapsulation within the following macros, do not change
19710 ## the running order or otherwise move them around unless you know exactly
19711 ## what you are doing...
19712 if test -n "$compiler"; then
19713
19714 lt_prog_compiler_no_builtin_flag=
19715
19716 if test "$GCC" = yes; then
19717   case $cc_basename in
19718   nvcc*)
19719     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
19720   *)
19721     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
19722   esac
19723
19724   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
19725 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
19726 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
19727   $as_echo_n "(cached) " >&6
19728 else
19729   lt_cv_prog_compiler_rtti_exceptions=no
19730    ac_outfile=conftest.$ac_objext
19731    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19732    lt_compiler_flag="-fno-rtti -fno-exceptions"
19733    # Insert the option either (1) after the last *FLAGS variable, or
19734    # (2) before a word containing "conftest.", or (3) at the end.
19735    # Note that $ac_compile itself does not contain backslashes and begins
19736    # with a dollar sign (not a hyphen), so the echo should work correctly.
19737    # The option is referenced via a variable to avoid confusing sed.
19738    lt_compile=`echo "$ac_compile" | $SED \
19739    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19740    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19741    -e 's:$: $lt_compiler_flag:'`
19742    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19743    (eval "$lt_compile" 2>conftest.err)
19744    ac_status=$?
19745    cat conftest.err >&5
19746    echo "$as_me:$LINENO: \$? = $ac_status" >&5
19747    if (exit $ac_status) && test -s "$ac_outfile"; then
19748      # The compiler can only warn and ignore the option if not recognized
19749      # So say no if there are warnings other than the usual output.
19750      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
19751      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19752      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
19753        lt_cv_prog_compiler_rtti_exceptions=yes
19754      fi
19755    fi
19756    $RM conftest*
19757
19758 fi
19759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
19760 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
19761
19762 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
19763     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
19764 else
19765     :
19766 fi
19767
19768 fi
19769
19770
19771
19772
19773
19774
19775   lt_prog_compiler_wl=
19776 lt_prog_compiler_pic=
19777 lt_prog_compiler_static=
19778
19779
19780   if test "$GCC" = yes; then
19781     lt_prog_compiler_wl='-Wl,'
19782     lt_prog_compiler_static='-static'
19783
19784     case $host_os in
19785       aix*)
19786       # All AIX code is PIC.
19787       if test "$host_cpu" = ia64; then
19788         # AIX 5 now supports IA64 processor
19789         lt_prog_compiler_static='-Bstatic'
19790       fi
19791       ;;
19792
19793     amigaos*)
19794       case $host_cpu in
19795       powerpc)
19796             # see comment about AmigaOS4 .so support
19797             lt_prog_compiler_pic='-fPIC'
19798         ;;
19799       m68k)
19800             # FIXME: we need at least 68020 code to build shared libraries, but
19801             # adding the `-m68020' flag to GCC prevents building anything better,
19802             # like `-m68040'.
19803             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
19804         ;;
19805       esac
19806       ;;
19807
19808     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
19809       # PIC is the default for these OSes.
19810       ;;
19811
19812     mingw* | cygwin* | pw32* | os2* | cegcc*)
19813       # This hack is so that the source file can tell whether it is being
19814       # built for inclusion in a dll (and should export symbols for example).
19815       # Although the cygwin gcc ignores -fPIC, still need this for old-style
19816       # (--disable-auto-import) libraries
19817       lt_prog_compiler_pic='-DDLL_EXPORT'
19818       ;;
19819
19820     darwin* | rhapsody*)
19821       # PIC is the default on this platform
19822       # Common symbols not allowed in MH_DYLIB files
19823       lt_prog_compiler_pic='-fno-common'
19824       ;;
19825
19826     haiku*)
19827       # PIC is the default for Haiku.
19828       # The "-static" flag exists, but is broken.
19829       lt_prog_compiler_static=
19830       ;;
19831
19832     hpux*)
19833       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
19834       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
19835       # sets the default TLS model and affects inlining.
19836       case $host_cpu in
19837       hppa*64*)
19838         # +Z the default
19839         ;;
19840       *)
19841         lt_prog_compiler_pic='-fPIC'
19842         ;;
19843       esac
19844       ;;
19845
19846     interix[3-9]*)
19847       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
19848       # Instead, we relocate shared libraries at runtime.
19849       ;;
19850
19851     msdosdjgpp*)
19852       # Just because we use GCC doesn't mean we suddenly get shared libraries
19853       # on systems that don't support them.
19854       lt_prog_compiler_can_build_shared=no
19855       enable_shared=no
19856       ;;
19857
19858     *nto* | *qnx*)
19859       # QNX uses GNU C++, but need to define -shared option too, otherwise
19860       # it will coredump.
19861       lt_prog_compiler_pic='-fPIC -shared'
19862       ;;
19863
19864     sysv4*MP*)
19865       if test -d /usr/nec; then
19866         lt_prog_compiler_pic=-Kconform_pic
19867       fi
19868       ;;
19869
19870     *)
19871       lt_prog_compiler_pic='-fPIC'
19872       ;;
19873     esac
19874
19875     case $cc_basename in
19876     nvcc*) # Cuda Compiler Driver 2.2
19877       lt_prog_compiler_wl='-Xlinker '
19878       lt_prog_compiler_pic='-Xcompiler -fPIC'
19879       ;;
19880     esac
19881   else
19882     # PORTME Check for flag to pass linker flags through the system compiler.
19883     case $host_os in
19884     aix*)
19885       lt_prog_compiler_wl='-Wl,'
19886       if test "$host_cpu" = ia64; then
19887         # AIX 5 now supports IA64 processor
19888         lt_prog_compiler_static='-Bstatic'
19889       else
19890         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
19891       fi
19892       ;;
19893
19894     mingw* | cygwin* | pw32* | os2* | cegcc*)
19895       # This hack is so that the source file can tell whether it is being
19896       # built for inclusion in a dll (and should export symbols for example).
19897       lt_prog_compiler_pic='-DDLL_EXPORT'
19898       ;;
19899
19900     hpux9* | hpux10* | hpux11*)
19901       lt_prog_compiler_wl='-Wl,'
19902       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
19903       # not for PA HP-UX.
19904       case $host_cpu in
19905       hppa*64*|ia64*)
19906         # +Z the default
19907         ;;
19908       *)
19909         lt_prog_compiler_pic='+Z'
19910         ;;
19911       esac
19912       # Is there a better lt_prog_compiler_static that works with the bundled CC?
19913       lt_prog_compiler_static='${wl}-a ${wl}archive'
19914       ;;
19915
19916     irix5* | irix6* | nonstopux*)
19917       lt_prog_compiler_wl='-Wl,'
19918       # PIC (with -KPIC) is the default.
19919       lt_prog_compiler_static='-non_shared'
19920       ;;
19921
19922     linux* | k*bsd*-gnu | kopensolaris*-gnu)
19923       case $cc_basename in
19924       # old Intel for x86_64 which still supported -KPIC.
19925       ecc*)
19926         lt_prog_compiler_wl='-Wl,'
19927         lt_prog_compiler_pic='-KPIC'
19928         lt_prog_compiler_static='-static'
19929         ;;
19930       # icc used to be incompatible with GCC.
19931       # ICC 10 doesn't accept -KPIC any more.
19932       icc* | ifort*)
19933         lt_prog_compiler_wl='-Wl,'
19934         lt_prog_compiler_pic='-fPIC'
19935         lt_prog_compiler_static='-static'
19936         ;;
19937       # Lahey Fortran 8.1.
19938       lf95*)
19939         lt_prog_compiler_wl='-Wl,'
19940         lt_prog_compiler_pic='--shared'
19941         lt_prog_compiler_static='--static'
19942         ;;
19943       nagfor*)
19944         # NAG Fortran compiler
19945         lt_prog_compiler_wl='-Wl,-Wl,,'
19946         lt_prog_compiler_pic='-PIC'
19947         lt_prog_compiler_static='-Bstatic'
19948         ;;
19949       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
19950         # Portland Group compilers (*not* the Pentium gcc compiler,
19951         # which looks to be a dead project)
19952         lt_prog_compiler_wl='-Wl,'
19953         lt_prog_compiler_pic='-fpic'
19954         lt_prog_compiler_static='-Bstatic'
19955         ;;
19956       ccc*)
19957         lt_prog_compiler_wl='-Wl,'
19958         # All Alpha code is PIC.
19959         lt_prog_compiler_static='-non_shared'
19960         ;;
19961       xl* | bgxl* | bgf* | mpixl*)
19962         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
19963         lt_prog_compiler_wl='-Wl,'
19964         lt_prog_compiler_pic='-qpic'
19965         lt_prog_compiler_static='-qstaticlink'
19966         ;;
19967       *)
19968         case `$CC -V 2>&1 | sed 5q` in
19969         *Sun\ F* | *Sun*Fortran*)
19970           # Sun Fortran 8.3 passes all unrecognized flags to the linker
19971           lt_prog_compiler_pic='-KPIC'
19972           lt_prog_compiler_static='-Bstatic'
19973           lt_prog_compiler_wl=''
19974           ;;
19975         *Sun\ C*)
19976           # Sun C 5.9
19977           lt_prog_compiler_pic='-KPIC'
19978           lt_prog_compiler_static='-Bstatic'
19979           lt_prog_compiler_wl='-Wl,'
19980           ;;
19981         esac
19982         ;;
19983       esac
19984       ;;
19985
19986     newsos6)
19987       lt_prog_compiler_pic='-KPIC'
19988       lt_prog_compiler_static='-Bstatic'
19989       ;;
19990
19991     *nto* | *qnx*)
19992       # QNX uses GNU C++, but need to define -shared option too, otherwise
19993       # it will coredump.
19994       lt_prog_compiler_pic='-fPIC -shared'
19995       ;;
19996
19997     osf3* | osf4* | osf5*)
19998       lt_prog_compiler_wl='-Wl,'
19999       # All OSF/1 code is PIC.
20000       lt_prog_compiler_static='-non_shared'
20001       ;;
20002
20003     rdos*)
20004       lt_prog_compiler_static='-non_shared'
20005       ;;
20006
20007     solaris*)
20008       lt_prog_compiler_pic='-KPIC'
20009       lt_prog_compiler_static='-Bstatic'
20010       case $cc_basename in
20011       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
20012         lt_prog_compiler_wl='-Qoption ld ';;
20013       *)
20014         lt_prog_compiler_wl='-Wl,';;
20015       esac
20016       ;;
20017
20018     sunos4*)
20019       lt_prog_compiler_wl='-Qoption ld '
20020       lt_prog_compiler_pic='-PIC'
20021       lt_prog_compiler_static='-Bstatic'
20022       ;;
20023
20024     sysv4 | sysv4.2uw2* | sysv4.3*)
20025       lt_prog_compiler_wl='-Wl,'
20026       lt_prog_compiler_pic='-KPIC'
20027       lt_prog_compiler_static='-Bstatic'
20028       ;;
20029
20030     sysv4*MP*)
20031       if test -d /usr/nec ;then
20032         lt_prog_compiler_pic='-Kconform_pic'
20033         lt_prog_compiler_static='-Bstatic'
20034       fi
20035       ;;
20036
20037     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
20038       lt_prog_compiler_wl='-Wl,'
20039       lt_prog_compiler_pic='-KPIC'
20040       lt_prog_compiler_static='-Bstatic'
20041       ;;
20042
20043     unicos*)
20044       lt_prog_compiler_wl='-Wl,'
20045       lt_prog_compiler_can_build_shared=no
20046       ;;
20047
20048     uts4*)
20049       lt_prog_compiler_pic='-pic'
20050       lt_prog_compiler_static='-Bstatic'
20051       ;;
20052
20053     *)
20054       lt_prog_compiler_can_build_shared=no
20055       ;;
20056     esac
20057   fi
20058
20059 case $host_os in
20060   # For platforms which do not support PIC, -DPIC is meaningless:
20061   *djgpp*)
20062     lt_prog_compiler_pic=
20063     ;;
20064   *)
20065     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
20066     ;;
20067 esac
20068
20069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
20070 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
20071 if ${lt_cv_prog_compiler_pic+:} false; then :
20072   $as_echo_n "(cached) " >&6
20073 else
20074   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
20075 fi
20076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
20077 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
20078 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
20079
20080 #
20081 # Check to make sure the PIC flag actually works.
20082 #
20083 if test -n "$lt_prog_compiler_pic"; then
20084   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
20085 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
20086 if ${lt_cv_prog_compiler_pic_works+:} false; then :
20087   $as_echo_n "(cached) " >&6
20088 else
20089   lt_cv_prog_compiler_pic_works=no
20090    ac_outfile=conftest.$ac_objext
20091    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20092    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
20093    # Insert the option either (1) after the last *FLAGS variable, or
20094    # (2) before a word containing "conftest.", or (3) at the end.
20095    # Note that $ac_compile itself does not contain backslashes and begins
20096    # with a dollar sign (not a hyphen), so the echo should work correctly.
20097    # The option is referenced via a variable to avoid confusing sed.
20098    lt_compile=`echo "$ac_compile" | $SED \
20099    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20100    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
20101    -e 's:$: $lt_compiler_flag:'`
20102    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
20103    (eval "$lt_compile" 2>conftest.err)
20104    ac_status=$?
20105    cat conftest.err >&5
20106    echo "$as_me:$LINENO: \$? = $ac_status" >&5
20107    if (exit $ac_status) && test -s "$ac_outfile"; then
20108      # The compiler can only warn and ignore the option if not recognized
20109      # So say no if there are warnings other than the usual output.
20110      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
20111      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
20112      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
20113        lt_cv_prog_compiler_pic_works=yes
20114      fi
20115    fi
20116    $RM conftest*
20117
20118 fi
20119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
20120 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
20121
20122 if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
20123     case $lt_prog_compiler_pic in
20124      "" | " "*) ;;
20125      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
20126      esac
20127 else
20128     lt_prog_compiler_pic=
20129      lt_prog_compiler_can_build_shared=no
20130 fi
20131
20132 fi
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144 #
20145 # Check to make sure the static flag actually works.
20146 #
20147 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
20148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
20149 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
20150 if ${lt_cv_prog_compiler_static_works+:} false; then :
20151   $as_echo_n "(cached) " >&6
20152 else
20153   lt_cv_prog_compiler_static_works=no
20154    save_LDFLAGS="$LDFLAGS"
20155    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
20156    echo "$lt_simple_link_test_code" > conftest.$ac_ext
20157    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
20158      # The linker can only warn and ignore the option if not recognized
20159      # So say no if there are warnings
20160      if test -s conftest.err; then
20161        # Append any errors to the config.log.
20162        cat conftest.err 1>&5
20163        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
20164        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
20165        if diff conftest.exp conftest.er2 >/dev/null; then
20166          lt_cv_prog_compiler_static_works=yes
20167        fi
20168      else
20169        lt_cv_prog_compiler_static_works=yes
20170      fi
20171    fi
20172    $RM -r conftest*
20173    LDFLAGS="$save_LDFLAGS"
20174
20175 fi
20176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
20177 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
20178
20179 if test x"$lt_cv_prog_compiler_static_works" = xyes; then
20180     :
20181 else
20182     lt_prog_compiler_static=
20183 fi
20184
20185
20186
20187
20188
20189
20190
20191   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
20192 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
20193 if ${lt_cv_prog_compiler_c_o+:} false; then :
20194   $as_echo_n "(cached) " >&6
20195 else
20196   lt_cv_prog_compiler_c_o=no
20197    $RM -r conftest 2>/dev/null
20198    mkdir conftest
20199    cd conftest
20200    mkdir out
20201    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20202
20203    lt_compiler_flag="-o out/conftest2.$ac_objext"
20204    # Insert the option either (1) after the last *FLAGS variable, or
20205    # (2) before a word containing "conftest.", or (3) at the end.
20206    # Note that $ac_compile itself does not contain backslashes and begins
20207    # with a dollar sign (not a hyphen), so the echo should work correctly.
20208    lt_compile=`echo "$ac_compile" | $SED \
20209    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20210    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
20211    -e 's:$: $lt_compiler_flag:'`
20212    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
20213    (eval "$lt_compile" 2>out/conftest.err)
20214    ac_status=$?
20215    cat out/conftest.err >&5
20216    echo "$as_me:$LINENO: \$? = $ac_status" >&5
20217    if (exit $ac_status) && test -s out/conftest2.$ac_objext
20218    then
20219      # The compiler can only warn and ignore the option if not recognized
20220      # So say no if there are warnings
20221      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
20222      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
20223      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
20224        lt_cv_prog_compiler_c_o=yes
20225      fi
20226    fi
20227    chmod u+w . 2>&5
20228    $RM conftest*
20229    # SGI C++ compiler will create directory out/ii_files/ for
20230    # template instantiation
20231    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
20232    $RM out/* && rmdir out
20233    cd ..
20234    $RM -r conftest
20235    $RM conftest*
20236
20237 fi
20238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
20239 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
20240
20241
20242
20243
20244
20245
20246   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
20247 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
20248 if ${lt_cv_prog_compiler_c_o+:} false; then :
20249   $as_echo_n "(cached) " >&6
20250 else
20251   lt_cv_prog_compiler_c_o=no
20252    $RM -r conftest 2>/dev/null
20253    mkdir conftest
20254    cd conftest
20255    mkdir out
20256    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20257
20258    lt_compiler_flag="-o out/conftest2.$ac_objext"
20259    # Insert the option either (1) after the last *FLAGS variable, or
20260    # (2) before a word containing "conftest.", or (3) at the end.
20261    # Note that $ac_compile itself does not contain backslashes and begins
20262    # with a dollar sign (not a hyphen), so the echo should work correctly.
20263    lt_compile=`echo "$ac_compile" | $SED \
20264    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20265    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
20266    -e 's:$: $lt_compiler_flag:'`
20267    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
20268    (eval "$lt_compile" 2>out/conftest.err)
20269    ac_status=$?
20270    cat out/conftest.err >&5
20271    echo "$as_me:$LINENO: \$? = $ac_status" >&5
20272    if (exit $ac_status) && test -s out/conftest2.$ac_objext
20273    then
20274      # The compiler can only warn and ignore the option if not recognized
20275      # So say no if there are warnings
20276      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
20277      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
20278      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
20279        lt_cv_prog_compiler_c_o=yes
20280      fi
20281    fi
20282    chmod u+w . 2>&5
20283    $RM conftest*
20284    # SGI C++ compiler will create directory out/ii_files/ for
20285    # template instantiation
20286    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
20287    $RM out/* && rmdir out
20288    cd ..
20289    $RM -r conftest
20290    $RM conftest*
20291
20292 fi
20293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
20294 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
20295
20296
20297
20298
20299 hard_links="nottested"
20300 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
20301   # do not overwrite the value of need_locks provided by the user
20302   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
20303 $as_echo_n "checking if we can lock with hard links... " >&6; }
20304   hard_links=yes
20305   $RM conftest*
20306   ln conftest.a conftest.b 2>/dev/null && hard_links=no
20307   touch conftest.a
20308   ln conftest.a conftest.b 2>&5 || hard_links=no
20309   ln conftest.a conftest.b 2>/dev/null && hard_links=no
20310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
20311 $as_echo "$hard_links" >&6; }
20312   if test "$hard_links" = no; then
20313     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
20314 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
20315     need_locks=warn
20316   fi
20317 else
20318   need_locks=no
20319 fi
20320
20321
20322
20323
20324
20325
20326   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
20327 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
20328
20329   runpath_var=
20330   allow_undefined_flag=
20331   always_export_symbols=no
20332   archive_cmds=
20333   archive_expsym_cmds=
20334   compiler_needs_object=no
20335   enable_shared_with_static_runtimes=no
20336   export_dynamic_flag_spec=
20337   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
20338   hardcode_automatic=no
20339   hardcode_direct=no
20340   hardcode_direct_absolute=no
20341   hardcode_libdir_flag_spec=
20342   hardcode_libdir_flag_spec_ld=
20343   hardcode_libdir_separator=
20344   hardcode_minus_L=no
20345   hardcode_shlibpath_var=unsupported
20346   inherit_rpath=no
20347   link_all_deplibs=unknown
20348   module_cmds=
20349   module_expsym_cmds=
20350   old_archive_from_new_cmds=
20351   old_archive_from_expsyms_cmds=
20352   thread_safe_flag_spec=
20353   whole_archive_flag_spec=
20354   # include_expsyms should be a list of space-separated symbols to be *always*
20355   # included in the symbol list
20356   include_expsyms=
20357   # exclude_expsyms can be an extended regexp of symbols to exclude
20358   # it will be wrapped by ` (' and `)$', so one must not match beginning or
20359   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
20360   # as well as any symbol that contains `d'.
20361   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
20362   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
20363   # platforms (ab)use it in PIC code, but their linkers get confused if
20364   # the symbol is explicitly referenced.  Since portable code cannot
20365   # rely on this symbol name, it's probably fine to never include it in
20366   # preloaded symbol tables.
20367   # Exclude shared library initialization/finalization symbols.
20368   extract_expsyms_cmds=
20369
20370   case $host_os in
20371   cygwin* | mingw* | pw32* | cegcc*)
20372     # FIXME: the MSVC++ port hasn't been tested in a loooong time
20373     # When not using gcc, we currently assume that we are using
20374     # Microsoft Visual C++.
20375     if test "$GCC" != yes; then
20376       with_gnu_ld=no
20377     fi
20378     ;;
20379   interix*)
20380     # we just hope/assume this is gcc and not c89 (= MSVC++)
20381     with_gnu_ld=yes
20382     ;;
20383   openbsd*)
20384     with_gnu_ld=no
20385     ;;
20386   esac
20387
20388   ld_shlibs=yes
20389
20390   # On some targets, GNU ld is compatible enough with the native linker
20391   # that we're better off using the native interface for both.
20392   lt_use_gnu_ld_interface=no
20393   if test "$with_gnu_ld" = yes; then
20394     case $host_os in
20395       aix*)
20396         # The AIX port of GNU ld has always aspired to compatibility
20397         # with the native linker.  However, as the warning in the GNU ld
20398         # block says, versions before 2.19.5* couldn't really create working
20399         # shared libraries, regardless of the interface used.
20400         case `$LD -v 2>&1` in
20401           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
20402           *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
20403           *\ \(GNU\ Binutils\)\ [3-9]*) ;;
20404           *)
20405             lt_use_gnu_ld_interface=yes
20406             ;;
20407         esac
20408         ;;
20409       *)
20410         lt_use_gnu_ld_interface=yes
20411         ;;
20412     esac
20413   fi
20414
20415   if test "$lt_use_gnu_ld_interface" = yes; then
20416     # If archive_cmds runs LD, not CC, wlarc should be empty
20417     wlarc='${wl}'
20418
20419     # Set some defaults for GNU ld with shared library support. These
20420     # are reset later if shared libraries are not supported. Putting them
20421     # here allows them to be overridden if necessary.
20422     runpath_var=LD_RUN_PATH
20423     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
20424     export_dynamic_flag_spec='${wl}--export-dynamic'
20425     # ancient GNU ld didn't support --whole-archive et. al.
20426     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
20427       whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
20428     else
20429       whole_archive_flag_spec=
20430     fi
20431     supports_anon_versioning=no
20432     case `$LD -v 2>&1` in
20433       *GNU\ gold*) supports_anon_versioning=yes ;;
20434       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
20435       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
20436       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
20437       *\ 2.11.*) ;; # other 2.11 versions
20438       *) supports_anon_versioning=yes ;;
20439     esac
20440
20441     # See if GNU ld supports shared libraries.
20442     case $host_os in
20443     aix[3-9]*)
20444       # On AIX/PPC, the GNU linker is very broken
20445       if test "$host_cpu" != ia64; then
20446         ld_shlibs=no
20447         cat <<_LT_EOF 1>&2
20448
20449 *** Warning: the GNU linker, at least up to release 2.19, is reported
20450 *** to be unable to reliably create shared libraries on AIX.
20451 *** Therefore, libtool is disabling shared libraries support.  If you
20452 *** really care for shared libraries, you may want to install binutils
20453 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
20454 *** You will then need to restart the configuration process.
20455
20456 _LT_EOF
20457       fi
20458       ;;
20459
20460     amigaos*)
20461       case $host_cpu in
20462       powerpc)
20463             # see comment about AmigaOS4 .so support
20464             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20465             archive_expsym_cmds=''
20466         ;;
20467       m68k)
20468             archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
20469             hardcode_libdir_flag_spec='-L$libdir'
20470             hardcode_minus_L=yes
20471         ;;
20472       esac
20473       ;;
20474
20475     beos*)
20476       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20477         allow_undefined_flag=unsupported
20478         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
20479         # support --undefined.  This deserves some investigation.  FIXME
20480         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20481       else
20482         ld_shlibs=no
20483       fi
20484       ;;
20485
20486     cygwin* | mingw* | pw32* | cegcc*)
20487       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
20488       # as there is no search path for DLLs.
20489       hardcode_libdir_flag_spec='-L$libdir'
20490       export_dynamic_flag_spec='${wl}--export-all-symbols'
20491       allow_undefined_flag=unsupported
20492       always_export_symbols=no
20493       enable_shared_with_static_runtimes=yes
20494       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
20495       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
20496
20497       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
20498         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
20499         # If the export-symbols file already is a .def file (1st line
20500         # is EXPORTS), use it as is; otherwise, prepend...
20501         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
20502           cp $export_symbols $output_objdir/$soname.def;
20503         else
20504           echo EXPORTS > $output_objdir/$soname.def;
20505           cat $export_symbols >> $output_objdir/$soname.def;
20506         fi~
20507         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
20508       else
20509         ld_shlibs=no
20510       fi
20511       ;;
20512
20513     haiku*)
20514       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20515       link_all_deplibs=yes
20516       ;;
20517
20518     interix[3-9]*)
20519       hardcode_direct=no
20520       hardcode_shlibpath_var=no
20521       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
20522       export_dynamic_flag_spec='${wl}-E'
20523       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
20524       # Instead, shared libraries are loaded at an image base (0x10000000 by
20525       # default) and relocated if they conflict, which is a slow very memory
20526       # consuming and fragmenting process.  To avoid this, we pick a random,
20527       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
20528       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
20529       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
20530       archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
20531       ;;
20532
20533     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
20534       tmp_diet=no
20535       if test "$host_os" = linux-dietlibc; then
20536         case $cc_basename in
20537           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
20538         esac
20539       fi
20540       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
20541          && test "$tmp_diet" = no
20542       then
20543         tmp_addflag=' $pic_flag'
20544         tmp_sharedflag='-shared'
20545         case $cc_basename,$host_cpu in
20546         pgcc*)                          # Portland Group C compiler
20547           whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
20548           tmp_addflag=' $pic_flag'
20549           ;;
20550         pgf77* | pgf90* | pgf95* | pgfortran*)
20551                                         # Portland Group f77 and f90 compilers
20552           whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
20553           tmp_addflag=' $pic_flag -Mnomain' ;;
20554         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
20555           tmp_addflag=' -i_dynamic' ;;
20556         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
20557           tmp_addflag=' -i_dynamic -nofor_main' ;;
20558         ifc* | ifort*)                  # Intel Fortran compiler
20559           tmp_addflag=' -nofor_main' ;;
20560         lf95*)                          # Lahey Fortran 8.1
20561           whole_archive_flag_spec=
20562           tmp_sharedflag='--shared' ;;
20563         xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
20564           tmp_sharedflag='-qmkshrobj'
20565           tmp_addflag= ;;
20566         nvcc*)  # Cuda Compiler Driver 2.2
20567           whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
20568           compiler_needs_object=yes
20569           ;;
20570         esac
20571         case `$CC -V 2>&1 | sed 5q` in
20572         *Sun\ C*)                       # Sun C 5.9
20573           whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
20574           compiler_needs_object=yes
20575           tmp_sharedflag='-G' ;;
20576         *Sun\ F*)                       # Sun Fortran 8.3
20577           tmp_sharedflag='-G' ;;
20578         esac
20579         archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20580
20581         if test "x$supports_anon_versioning" = xyes; then
20582           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
20583             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
20584             echo "local: *; };" >> $output_objdir/$libname.ver~
20585             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
20586         fi
20587
20588         case $cc_basename in
20589         xlf* | bgf* | bgxlf* | mpixlf*)
20590           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
20591           whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
20592           hardcode_libdir_flag_spec=
20593           hardcode_libdir_flag_spec_ld='-rpath $libdir'
20594           archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
20595           if test "x$supports_anon_versioning" = xyes; then
20596             archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
20597               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
20598               echo "local: *; };" >> $output_objdir/$libname.ver~
20599               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
20600           fi
20601           ;;
20602         esac
20603       else
20604         ld_shlibs=no
20605       fi
20606       ;;
20607
20608     netbsd*)
20609       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
20610         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
20611         wlarc=
20612       else
20613         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20614         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20615       fi
20616       ;;
20617
20618     solaris*)
20619       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
20620         ld_shlibs=no
20621         cat <<_LT_EOF 1>&2
20622
20623 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
20624 *** create shared libraries on Solaris systems.  Therefore, libtool
20625 *** is disabling shared libraries support.  We urge you to upgrade GNU
20626 *** binutils to release 2.9.1 or newer.  Another option is to modify
20627 *** your PATH or compiler configuration so that the native linker is
20628 *** used, and then restart.
20629
20630 _LT_EOF
20631       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20632         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20633         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20634       else
20635         ld_shlibs=no
20636       fi
20637       ;;
20638
20639     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
20640       case `$LD -v 2>&1` in
20641         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
20642         ld_shlibs=no
20643         cat <<_LT_EOF 1>&2
20644
20645 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
20646 *** reliably create shared libraries on SCO systems.  Therefore, libtool
20647 *** is disabling shared libraries support.  We urge you to upgrade GNU
20648 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
20649 *** your PATH or compiler configuration so that the native linker is
20650 *** used, and then restart.
20651
20652 _LT_EOF
20653         ;;
20654         *)
20655           # For security reasons, it is highly recommended that you always
20656           # use absolute paths for naming shared libraries, and exclude the
20657           # DT_RUNPATH tag from executables and libraries.  But doing so
20658           # requires that you compile everything twice, which is a pain.
20659           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20660             hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
20661             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20662             archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20663           else
20664             ld_shlibs=no
20665           fi
20666         ;;
20667       esac
20668       ;;
20669
20670     sunos4*)
20671       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
20672       wlarc=
20673       hardcode_direct=yes
20674       hardcode_shlibpath_var=no
20675       ;;
20676
20677     *)
20678       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20679         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20680         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
20681       else
20682         ld_shlibs=no
20683       fi
20684       ;;
20685     esac
20686
20687     if test "$ld_shlibs" = no; then
20688       runpath_var=
20689       hardcode_libdir_flag_spec=
20690       export_dynamic_flag_spec=
20691       whole_archive_flag_spec=
20692     fi
20693   else
20694     # PORTME fill in a description of your system's linker (not GNU ld)
20695     case $host_os in
20696     aix3*)
20697       allow_undefined_flag=unsupported
20698       always_export_symbols=yes
20699       archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
20700       # Note: this linker hardcodes the directories in LIBPATH if there
20701       # are no directories specified by -L.
20702       hardcode_minus_L=yes
20703       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
20704         # Neither direct hardcoding nor static linking is supported with a
20705         # broken collect2.
20706         hardcode_direct=unsupported
20707       fi
20708       ;;
20709
20710     aix[4-9]*)
20711       if test "$host_cpu" = ia64; then
20712         # On IA64, the linker does run time linking by default, so we don't
20713         # have to do anything special.
20714         aix_use_runtimelinking=no
20715         exp_sym_flag='-Bexport'
20716         no_entry_flag=""
20717       else
20718         # If we're using GNU nm, then we don't want the "-C" option.
20719         # -C means demangle to AIX nm, but means don't demangle with GNU nm
20720         # Also, AIX nm treats weak defined symbols like other global
20721         # defined symbols, whereas GNU nm marks them as "W".
20722         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
20723           export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
20724         else
20725           export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
20726         fi
20727         aix_use_runtimelinking=no
20728
20729         # Test if we are trying to use run time linking or normal
20730         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
20731         # need to do runtime linking.
20732         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
20733           for ld_flag in $LDFLAGS; do
20734           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
20735             aix_use_runtimelinking=yes
20736             break
20737           fi
20738           done
20739           ;;
20740         esac
20741
20742         exp_sym_flag='-bexport'
20743         no_entry_flag='-bnoentry'
20744       fi
20745
20746       # When large executables or shared objects are built, AIX ld can
20747       # have problems creating the table of contents.  If linking a library
20748       # or program results in "error TOC overflow" add -mminimal-toc to
20749       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
20750       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
20751
20752       archive_cmds=''
20753       hardcode_direct=yes
20754       hardcode_direct_absolute=yes
20755       hardcode_libdir_separator=':'
20756       link_all_deplibs=yes
20757       file_list_spec='${wl}-f,'
20758
20759       if test "$GCC" = yes; then
20760         case $host_os in aix4.[012]|aix4.[012].*)
20761         # We only want to do this on AIX 4.2 and lower, the check
20762         # below for broken collect2 doesn't work under 4.3+
20763           collect2name=`${CC} -print-prog-name=collect2`
20764           if test -f "$collect2name" &&
20765            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
20766           then
20767           # We have reworked collect2
20768           :
20769           else
20770           # We have old collect2
20771           hardcode_direct=unsupported
20772           # It fails to find uninstalled libraries when the uninstalled
20773           # path is not listed in the libpath.  Setting hardcode_minus_L
20774           # to unsupported forces relinking
20775           hardcode_minus_L=yes
20776           hardcode_libdir_flag_spec='-L$libdir'
20777           hardcode_libdir_separator=
20778           fi
20779           ;;
20780         esac
20781         shared_flag='-shared'
20782         if test "$aix_use_runtimelinking" = yes; then
20783           shared_flag="$shared_flag "'${wl}-G'
20784         fi
20785       else
20786         # not using gcc
20787         if test "$host_cpu" = ia64; then
20788         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
20789         # chokes on -Wl,-G. The following line is correct:
20790           shared_flag='-G'
20791         else
20792           if test "$aix_use_runtimelinking" = yes; then
20793             shared_flag='${wl}-G'
20794           else
20795             shared_flag='${wl}-bM:SRE'
20796           fi
20797         fi
20798       fi
20799
20800       export_dynamic_flag_spec='${wl}-bexpall'
20801       # It seems that -bexpall does not export symbols beginning with
20802       # underscore (_), so it is better to generate a list of symbols to export.
20803       always_export_symbols=yes
20804       if test "$aix_use_runtimelinking" = yes; then
20805         # Warning - without using the other runtime loading flags (-brtl),
20806         # -berok will link without error, but may produce a broken library.
20807         allow_undefined_flag='-berok'
20808         # Determine the default libpath from the value encoded in an
20809         # empty executable.
20810         if test "${lt_cv_aix_libpath+set}" = set; then
20811   aix_libpath=$lt_cv_aix_libpath
20812 else
20813   if ${lt_cv_aix_libpath_+:} false; then :
20814   $as_echo_n "(cached) " >&6
20815 else
20816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20817 /* end confdefs.h.  */
20818
20819 int
20820 main ()
20821 {
20822
20823   ;
20824   return 0;
20825 }
20826 _ACEOF
20827 if ac_fn_c_try_link "$LINENO"; then :
20828
20829   lt_aix_libpath_sed='
20830       /Import File Strings/,/^$/ {
20831           /^0/ {
20832               s/^0  *\([^ ]*\) *$/\1/
20833               p
20834           }
20835       }'
20836   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20837   # Check for a 64-bit object if we didn't find anything.
20838   if test -z "$lt_cv_aix_libpath_"; then
20839     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20840   fi
20841 fi
20842 rm -f core conftest.err conftest.$ac_objext \
20843     conftest$ac_exeext conftest.$ac_ext
20844   if test -z "$lt_cv_aix_libpath_"; then
20845     lt_cv_aix_libpath_="/usr/lib:/lib"
20846   fi
20847
20848 fi
20849
20850   aix_libpath=$lt_cv_aix_libpath_
20851 fi
20852
20853         hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
20854         archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
20855       else
20856         if test "$host_cpu" = ia64; then
20857           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
20858           allow_undefined_flag="-z nodefs"
20859           archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
20860         else
20861          # Determine the default libpath from the value encoded in an
20862          # empty executable.
20863          if test "${lt_cv_aix_libpath+set}" = set; then
20864   aix_libpath=$lt_cv_aix_libpath
20865 else
20866   if ${lt_cv_aix_libpath_+:} false; then :
20867   $as_echo_n "(cached) " >&6
20868 else
20869   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20870 /* end confdefs.h.  */
20871
20872 int
20873 main ()
20874 {
20875
20876   ;
20877   return 0;
20878 }
20879 _ACEOF
20880 if ac_fn_c_try_link "$LINENO"; then :
20881
20882   lt_aix_libpath_sed='
20883       /Import File Strings/,/^$/ {
20884           /^0/ {
20885               s/^0  *\([^ ]*\) *$/\1/
20886               p
20887           }
20888       }'
20889   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20890   # Check for a 64-bit object if we didn't find anything.
20891   if test -z "$lt_cv_aix_libpath_"; then
20892     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20893   fi
20894 fi
20895 rm -f core conftest.err conftest.$ac_objext \
20896     conftest$ac_exeext conftest.$ac_ext
20897   if test -z "$lt_cv_aix_libpath_"; then
20898     lt_cv_aix_libpath_="/usr/lib:/lib"
20899   fi
20900
20901 fi
20902
20903   aix_libpath=$lt_cv_aix_libpath_
20904 fi
20905
20906          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
20907           # Warning - without using the other run time loading flags,
20908           # -berok will link without error, but may produce a broken library.
20909           no_undefined_flag=' ${wl}-bernotok'
20910           allow_undefined_flag=' ${wl}-berok'
20911           if test "$with_gnu_ld" = yes; then
20912             # We only use this code for GNU lds that support --whole-archive.
20913             whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
20914           else
20915             # Exported symbols can be pulled into shared objects from archives
20916             whole_archive_flag_spec='$convenience'
20917           fi
20918           archive_cmds_need_lc=yes
20919           # This is similar to how AIX traditionally builds its shared libraries.
20920           archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
20921         fi
20922       fi
20923       ;;
20924
20925     amigaos*)
20926       case $host_cpu in
20927       powerpc)
20928             # see comment about AmigaOS4 .so support
20929             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
20930             archive_expsym_cmds=''
20931         ;;
20932       m68k)
20933             archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
20934             hardcode_libdir_flag_spec='-L$libdir'
20935             hardcode_minus_L=yes
20936         ;;
20937       esac
20938       ;;
20939
20940     bsdi[45]*)
20941       export_dynamic_flag_spec=-rdynamic
20942       ;;
20943
20944     cygwin* | mingw* | pw32* | cegcc*)
20945       # When not using gcc, we currently assume that we are using
20946       # Microsoft Visual C++.
20947       # hardcode_libdir_flag_spec is actually meaningless, as there is
20948       # no search path for DLLs.
20949       case $cc_basename in
20950       cl*)
20951         # Native MSVC
20952         hardcode_libdir_flag_spec=' '
20953         allow_undefined_flag=unsupported
20954         always_export_symbols=yes
20955         file_list_spec='@'
20956         # Tell ltmain to make .lib files, not .a files.
20957         libext=lib
20958         # Tell ltmain to make .dll files, not .so files.
20959         shrext_cmds=".dll"
20960         # FIXME: Setting linknames here is a bad hack.
20961         archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
20962         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
20963             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
20964           else
20965             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
20966           fi~
20967           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
20968           linknames='
20969         # The linker will not automatically build a static lib if we build a DLL.
20970         # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
20971         enable_shared_with_static_runtimes=yes
20972         export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
20973         # Don't use ranlib
20974         old_postinstall_cmds='chmod 644 $oldlib'
20975         postlink_cmds='lt_outputfile="@OUTPUT@"~
20976           lt_tool_outputfile="@TOOL_OUTPUT@"~
20977           case $lt_outputfile in
20978             *.exe|*.EXE) ;;
20979             *)
20980               lt_outputfile="$lt_outputfile.exe"
20981               lt_tool_outputfile="$lt_tool_outputfile.exe"
20982               ;;
20983           esac~
20984           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
20985             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
20986             $RM "$lt_outputfile.manifest";
20987           fi'
20988         ;;
20989       *)
20990         # Assume MSVC wrapper
20991         hardcode_libdir_flag_spec=' '
20992         allow_undefined_flag=unsupported
20993         # Tell ltmain to make .lib files, not .a files.
20994         libext=lib
20995         # Tell ltmain to make .dll files, not .so files.
20996         shrext_cmds=".dll"
20997         # FIXME: Setting linknames here is a bad hack.
20998         archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
20999         # The linker will automatically build a .lib file if we build a DLL.
21000         old_archive_from_new_cmds='true'
21001         # FIXME: Should let the user specify the lib program.
21002         old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
21003         enable_shared_with_static_runtimes=yes
21004         ;;
21005       esac
21006       ;;
21007
21008     darwin* | rhapsody*)
21009
21010
21011   archive_cmds_need_lc=no
21012   hardcode_direct=no
21013   hardcode_automatic=yes
21014   hardcode_shlibpath_var=unsupported
21015   if test "$lt_cv_ld_force_load" = "yes"; then
21016     whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
21017   else
21018     whole_archive_flag_spec=''
21019   fi
21020   link_all_deplibs=yes
21021   allow_undefined_flag="$_lt_dar_allow_undefined"
21022   case $cc_basename in
21023      ifort*) _lt_dar_can_shared=yes ;;
21024      *) _lt_dar_can_shared=$GCC ;;
21025   esac
21026   if test "$_lt_dar_can_shared" = "yes"; then
21027     output_verbose_link_cmd=func_echo_all
21028     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
21029     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
21030     archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
21031     module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
21032
21033   else
21034   ld_shlibs=no
21035   fi
21036
21037       ;;
21038
21039     dgux*)
21040       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21041       hardcode_libdir_flag_spec='-L$libdir'
21042       hardcode_shlibpath_var=no
21043       ;;
21044
21045     freebsd1*)
21046       ld_shlibs=no
21047       ;;
21048
21049     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
21050     # support.  Future versions do this automatically, but an explicit c++rt0.o
21051     # does not break anything, and helps significantly (at the cost of a little
21052     # extra space).
21053     freebsd2.2*)
21054       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
21055       hardcode_libdir_flag_spec='-R$libdir'
21056       hardcode_direct=yes
21057       hardcode_shlibpath_var=no
21058       ;;
21059
21060     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
21061     freebsd2*)
21062       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
21063       hardcode_direct=yes
21064       hardcode_minus_L=yes
21065       hardcode_shlibpath_var=no
21066       ;;
21067
21068     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
21069     freebsd* | dragonfly*)
21070       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
21071       hardcode_libdir_flag_spec='-R$libdir'
21072       hardcode_direct=yes
21073       hardcode_shlibpath_var=no
21074       ;;
21075
21076     hpux9*)
21077       if test "$GCC" = yes; then
21078         archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
21079       else
21080         archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
21081       fi
21082       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
21083       hardcode_libdir_separator=:
21084       hardcode_direct=yes
21085
21086       # hardcode_minus_L: Not really in the search PATH,
21087       # but as the default location of the library.
21088       hardcode_minus_L=yes
21089       export_dynamic_flag_spec='${wl}-E'
21090       ;;
21091
21092     hpux10*)
21093       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
21094         archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
21095       else
21096         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
21097       fi
21098       if test "$with_gnu_ld" = no; then
21099         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
21100         hardcode_libdir_flag_spec_ld='+b $libdir'
21101         hardcode_libdir_separator=:
21102         hardcode_direct=yes
21103         hardcode_direct_absolute=yes
21104         export_dynamic_flag_spec='${wl}-E'
21105         # hardcode_minus_L: Not really in the search PATH,
21106         # but as the default location of the library.
21107         hardcode_minus_L=yes
21108       fi
21109       ;;
21110
21111     hpux11*)
21112       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
21113         case $host_cpu in
21114         hppa*64*)
21115           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
21116           ;;
21117         ia64*)
21118           archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
21119           ;;
21120         *)
21121           archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
21122           ;;
21123         esac
21124       else
21125         case $host_cpu in
21126         hppa*64*)
21127           archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
21128           ;;
21129         ia64*)
21130           archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
21131           ;;
21132         *)
21133
21134           # Older versions of the 11.00 compiler do not understand -b yet
21135           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
21136           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
21137 $as_echo_n "checking if $CC understands -b... " >&6; }
21138 if ${lt_cv_prog_compiler__b+:} false; then :
21139   $as_echo_n "(cached) " >&6
21140 else
21141   lt_cv_prog_compiler__b=no
21142    save_LDFLAGS="$LDFLAGS"
21143    LDFLAGS="$LDFLAGS -b"
21144    echo "$lt_simple_link_test_code" > conftest.$ac_ext
21145    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
21146      # The linker can only warn and ignore the option if not recognized
21147      # So say no if there are warnings
21148      if test -s conftest.err; then
21149        # Append any errors to the config.log.
21150        cat conftest.err 1>&5
21151        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
21152        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
21153        if diff conftest.exp conftest.er2 >/dev/null; then
21154          lt_cv_prog_compiler__b=yes
21155        fi
21156      else
21157        lt_cv_prog_compiler__b=yes
21158      fi
21159    fi
21160    $RM -r conftest*
21161    LDFLAGS="$save_LDFLAGS"
21162
21163 fi
21164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
21165 $as_echo "$lt_cv_prog_compiler__b" >&6; }
21166
21167 if test x"$lt_cv_prog_compiler__b" = xyes; then
21168     archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
21169 else
21170     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
21171 fi
21172
21173           ;;
21174         esac
21175       fi
21176       if test "$with_gnu_ld" = no; then
21177         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
21178         hardcode_libdir_separator=:
21179
21180         case $host_cpu in
21181         hppa*64*|ia64*)
21182           hardcode_direct=no
21183           hardcode_shlibpath_var=no
21184           ;;
21185         *)
21186           hardcode_direct=yes
21187           hardcode_direct_absolute=yes
21188           export_dynamic_flag_spec='${wl}-E'
21189
21190           # hardcode_minus_L: Not really in the search PATH,
21191           # but as the default location of the library.
21192           hardcode_minus_L=yes
21193           ;;
21194         esac
21195       fi
21196       ;;
21197
21198     irix5* | irix6* | nonstopux*)
21199       if test "$GCC" = yes; then
21200         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
21201         # Try to use the -exported_symbol ld option, if it does not
21202         # work, assume that -exports_file does not work either and
21203         # implicitly export all symbols.
21204         # This should be the same for all languages, so no per-tag cache variable.
21205         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
21206 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
21207 if ${lt_cv_irix_exported_symbol+:} false; then :
21208   $as_echo_n "(cached) " >&6
21209 else
21210   save_LDFLAGS="$LDFLAGS"
21211            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
21212            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21213 /* end confdefs.h.  */
21214 int foo (void) { return 0; }
21215 _ACEOF
21216 if ac_fn_c_try_link "$LINENO"; then :
21217   lt_cv_irix_exported_symbol=yes
21218 else
21219   lt_cv_irix_exported_symbol=no
21220 fi
21221 rm -f core conftest.err conftest.$ac_objext \
21222     conftest$ac_exeext conftest.$ac_ext
21223            LDFLAGS="$save_LDFLAGS"
21224 fi
21225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
21226 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
21227         if test "$lt_cv_irix_exported_symbol" = yes; then
21228           archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
21229         fi
21230       else
21231         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
21232         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
21233       fi
21234       archive_cmds_need_lc='no'
21235       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
21236       hardcode_libdir_separator=:
21237       inherit_rpath=yes
21238       link_all_deplibs=yes
21239       ;;
21240
21241     netbsd*)
21242       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
21243         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
21244       else
21245         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
21246       fi
21247       hardcode_libdir_flag_spec='-R$libdir'
21248       hardcode_direct=yes
21249       hardcode_shlibpath_var=no
21250       ;;
21251
21252     newsos6)
21253       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21254       hardcode_direct=yes
21255       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
21256       hardcode_libdir_separator=:
21257       hardcode_shlibpath_var=no
21258       ;;
21259
21260     *nto* | *qnx*)
21261       ;;
21262
21263     openbsd*)
21264       if test -f /usr/libexec/ld.so; then
21265         hardcode_direct=yes
21266         hardcode_shlibpath_var=no
21267         hardcode_direct_absolute=yes
21268         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
21269           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
21270           archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
21271           hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
21272           export_dynamic_flag_spec='${wl}-E'
21273         else
21274           case $host_os in
21275            openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
21276              archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
21277              hardcode_libdir_flag_spec='-R$libdir'
21278              ;;
21279            *)
21280              archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
21281              hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
21282              ;;
21283           esac
21284         fi
21285       else
21286         ld_shlibs=no
21287       fi
21288       ;;
21289
21290     os2*)
21291       hardcode_libdir_flag_spec='-L$libdir'
21292       hardcode_minus_L=yes
21293       allow_undefined_flag=unsupported
21294       archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
21295       old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
21296       ;;
21297
21298     osf3*)
21299       if test "$GCC" = yes; then
21300         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
21301         archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
21302       else
21303         allow_undefined_flag=' -expect_unresolved \*'
21304         archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
21305       fi
21306       archive_cmds_need_lc='no'
21307       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
21308       hardcode_libdir_separator=:
21309       ;;
21310
21311     osf4* | osf5*)      # as osf3* with the addition of -msym flag
21312       if test "$GCC" = yes; then
21313         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
21314         archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
21315         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
21316       else
21317         allow_undefined_flag=' -expect_unresolved \*'
21318         archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
21319         archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
21320         $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
21321
21322         # Both c and cxx compiler support -rpath directly
21323         hardcode_libdir_flag_spec='-rpath $libdir'
21324       fi
21325       archive_cmds_need_lc='no'
21326       hardcode_libdir_separator=:
21327       ;;
21328
21329     solaris*)
21330       no_undefined_flag=' -z defs'
21331       if test "$GCC" = yes; then
21332         wlarc='${wl}'
21333         archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
21334         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
21335           $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
21336       else
21337         case `$CC -V 2>&1` in
21338         *"Compilers 5.0"*)
21339           wlarc=''
21340           archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
21341           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
21342           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
21343           ;;
21344         *)
21345           wlarc='${wl}'
21346           archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
21347           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
21348           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
21349           ;;
21350         esac
21351       fi
21352       hardcode_libdir_flag_spec='-R$libdir'
21353       hardcode_shlibpath_var=no
21354       case $host_os in
21355       solaris2.[0-5] | solaris2.[0-5].*) ;;
21356       *)
21357         # The compiler driver will combine and reorder linker options,
21358         # but understands `-z linker_flag'.  GCC discards it without `$wl',
21359         # but is careful enough not to reorder.
21360         # Supported since Solaris 2.6 (maybe 2.5.1?)
21361         if test "$GCC" = yes; then
21362           whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
21363         else
21364           whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
21365         fi
21366         ;;
21367       esac
21368       link_all_deplibs=yes
21369       ;;
21370
21371     sunos4*)
21372       if test "x$host_vendor" = xsequent; then
21373         # Use $CC to link under sequent, because it throws in some extra .o
21374         # files that make .init and .fini sections work.
21375         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
21376       else
21377         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
21378       fi
21379       hardcode_libdir_flag_spec='-L$libdir'
21380       hardcode_direct=yes
21381       hardcode_minus_L=yes
21382       hardcode_shlibpath_var=no
21383       ;;
21384
21385     sysv4)
21386       case $host_vendor in
21387         sni)
21388           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21389           hardcode_direct=yes # is this really true???
21390         ;;
21391         siemens)
21392           ## LD is ld it makes a PLAMLIB
21393           ## CC just makes a GrossModule.
21394           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
21395           reload_cmds='$CC -r -o $output$reload_objs'
21396           hardcode_direct=no
21397         ;;
21398         motorola)
21399           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21400           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
21401         ;;
21402       esac
21403       runpath_var='LD_RUN_PATH'
21404       hardcode_shlibpath_var=no
21405       ;;
21406
21407     sysv4.3*)
21408       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21409       hardcode_shlibpath_var=no
21410       export_dynamic_flag_spec='-Bexport'
21411       ;;
21412
21413     sysv4*MP*)
21414       if test -d /usr/nec; then
21415         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21416         hardcode_shlibpath_var=no
21417         runpath_var=LD_RUN_PATH
21418         hardcode_runpath_var=yes
21419         ld_shlibs=yes
21420       fi
21421       ;;
21422
21423     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
21424       no_undefined_flag='${wl}-z,text'
21425       archive_cmds_need_lc=no
21426       hardcode_shlibpath_var=no
21427       runpath_var='LD_RUN_PATH'
21428
21429       if test "$GCC" = yes; then
21430         archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21431         archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21432       else
21433         archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21434         archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21435       fi
21436       ;;
21437
21438     sysv5* | sco3.2v5* | sco5v6*)
21439       # Note: We can NOT use -z defs as we might desire, because we do not
21440       # link with -lc, and that would cause any symbols used from libc to
21441       # always be unresolved, which means just about no library would
21442       # ever link correctly.  If we're not using GNU ld we use -z text
21443       # though, which does catch some bad symbols but isn't as heavy-handed
21444       # as -z defs.
21445       no_undefined_flag='${wl}-z,text'
21446       allow_undefined_flag='${wl}-z,nodefs'
21447       archive_cmds_need_lc=no
21448       hardcode_shlibpath_var=no
21449       hardcode_libdir_flag_spec='${wl}-R,$libdir'
21450       hardcode_libdir_separator=':'
21451       link_all_deplibs=yes
21452       export_dynamic_flag_spec='${wl}-Bexport'
21453       runpath_var='LD_RUN_PATH'
21454
21455       if test "$GCC" = yes; then
21456         archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21457         archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21458       else
21459         archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21460         archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21461       fi
21462       ;;
21463
21464     uts4*)
21465       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
21466       hardcode_libdir_flag_spec='-L$libdir'
21467       hardcode_shlibpath_var=no
21468       ;;
21469
21470     *)
21471       ld_shlibs=no
21472       ;;
21473     esac
21474
21475     if test x$host_vendor = xsni; then
21476       case $host in
21477       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
21478         export_dynamic_flag_spec='${wl}-Blargedynsym'
21479         ;;
21480       esac
21481     fi
21482   fi
21483
21484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
21485 $as_echo "$ld_shlibs" >&6; }
21486 test "$ld_shlibs" = no && can_build_shared=no
21487
21488 with_gnu_ld=$with_gnu_ld
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504 #
21505 # Do we need to explicitly link libc?
21506 #
21507 case "x$archive_cmds_need_lc" in
21508 x|xyes)
21509   # Assume -lc should be added
21510   archive_cmds_need_lc=yes
21511
21512   if test "$enable_shared" = yes && test "$GCC" = yes; then
21513     case $archive_cmds in
21514     *'~'*)
21515       # FIXME: we may have to deal with multi-command sequences.
21516       ;;
21517     '$CC '*)
21518       # Test whether the compiler implicitly links with -lc since on some
21519       # systems, -lgcc has to come before -lc. If gcc already passes -lc
21520       # to ld, don't add -lc before -lgcc.
21521       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
21522 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
21523 if ${lt_cv_archive_cmds_need_lc+:} false; then :
21524   $as_echo_n "(cached) " >&6
21525 else
21526   $RM conftest*
21527         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
21528
21529         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
21530   (eval $ac_compile) 2>&5
21531   ac_status=$?
21532   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21533   test $ac_status = 0; } 2>conftest.err; then
21534           soname=conftest
21535           lib=conftest
21536           libobjs=conftest.$ac_objext
21537           deplibs=
21538           wl=$lt_prog_compiler_wl
21539           pic_flag=$lt_prog_compiler_pic
21540           compiler_flags=-v
21541           linker_flags=-v
21542           verstring=
21543           output_objdir=.
21544           libname=conftest
21545           lt_save_allow_undefined_flag=$allow_undefined_flag
21546           allow_undefined_flag=
21547           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
21548   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
21549   ac_status=$?
21550   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21551   test $ac_status = 0; }
21552           then
21553             lt_cv_archive_cmds_need_lc=no
21554           else
21555             lt_cv_archive_cmds_need_lc=yes
21556           fi
21557           allow_undefined_flag=$lt_save_allow_undefined_flag
21558         else
21559           cat conftest.err 1>&5
21560         fi
21561         $RM conftest*
21562
21563 fi
21564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
21565 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
21566       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
21567       ;;
21568     esac
21569   fi
21570   ;;
21571 esac
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
21730 $as_echo_n "checking dynamic linker characteristics... " >&6; }
21731
21732 if test "$GCC" = yes; then
21733   case $host_os in
21734     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
21735     *) lt_awk_arg="/^libraries:/" ;;
21736   esac
21737   case $host_os in
21738     mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
21739     *) lt_sed_strip_eq="s,=/,/,g" ;;
21740   esac
21741   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
21742   case $lt_search_path_spec in
21743   *\;*)
21744     # if the path contains ";" then we assume it to be the separator
21745     # otherwise default to the standard path separator (i.e. ":") - it is
21746     # assumed that no part of a normal pathname contains ";" but that should
21747     # okay in the real world where ";" in dirpaths is itself problematic.
21748     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
21749     ;;
21750   *)
21751     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
21752     ;;
21753   esac
21754   # Ok, now we have the path, separated by spaces, we can step through it
21755   # and add multilib dir if necessary.
21756   lt_tmp_lt_search_path_spec=
21757   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
21758   for lt_sys_path in $lt_search_path_spec; do
21759     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
21760       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
21761     else
21762       test -d "$lt_sys_path" && \
21763         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
21764     fi
21765   done
21766   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
21767 BEGIN {RS=" "; FS="/|\n";} {
21768   lt_foo="";
21769   lt_count=0;
21770   for (lt_i = NF; lt_i > 0; lt_i--) {
21771     if ($lt_i != "" && $lt_i != ".") {
21772       if ($lt_i == "..") {
21773         lt_count++;
21774       } else {
21775         if (lt_count == 0) {
21776           lt_foo="/" $lt_i lt_foo;
21777         } else {
21778           lt_count--;
21779         }
21780       }
21781     }
21782   }
21783   if (lt_foo != "") { lt_freq[lt_foo]++; }
21784   if (lt_freq[lt_foo] == 1) { print lt_foo; }
21785 }'`
21786   # AWK program above erroneously prepends '/' to C:/dos/paths
21787   # for these hosts.
21788   case $host_os in
21789     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
21790       $SED 's,/\([A-Za-z]:\),\1,g'` ;;
21791   esac
21792   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
21793 else
21794   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
21795 fi
21796 library_names_spec=
21797 libname_spec='lib$name'
21798 soname_spec=
21799 shrext_cmds=".so"
21800 postinstall_cmds=
21801 postuninstall_cmds=
21802 finish_cmds=
21803 finish_eval=
21804 shlibpath_var=
21805 shlibpath_overrides_runpath=unknown
21806 version_type=none
21807 dynamic_linker="$host_os ld.so"
21808 sys_lib_dlsearch_path_spec="/lib /usr/lib"
21809 need_lib_prefix=unknown
21810 hardcode_into_libs=no
21811
21812 # when you set need_version to no, make sure it does not cause -set_version
21813 # flags to be left without arguments
21814 need_version=unknown
21815
21816 case $host_os in
21817 aix3*)
21818   version_type=linux
21819   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
21820   shlibpath_var=LIBPATH
21821
21822   # AIX 3 has no versioning support, so we append a major version to the name.
21823   soname_spec='${libname}${release}${shared_ext}$major'
21824   ;;
21825
21826 aix[4-9]*)
21827   version_type=linux
21828   need_lib_prefix=no
21829   need_version=no
21830   hardcode_into_libs=yes
21831   if test "$host_cpu" = ia64; then
21832     # AIX 5 supports IA64
21833     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
21834     shlibpath_var=LD_LIBRARY_PATH
21835   else
21836     # With GCC up to 2.95.x, collect2 would create an import file
21837     # for dependence libraries.  The import file would start with
21838     # the line `#! .'.  This would cause the generated library to
21839     # depend on `.', always an invalid library.  This was fixed in
21840     # development snapshots of GCC prior to 3.0.
21841     case $host_os in
21842       aix4 | aix4.[01] | aix4.[01].*)
21843       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
21844            echo ' yes '
21845            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
21846         :
21847       else
21848         can_build_shared=no
21849       fi
21850       ;;
21851     esac
21852     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
21853     # soname into executable. Probably we can add versioning support to
21854     # collect2, so additional links can be useful in future.
21855     if test "$aix_use_runtimelinking" = yes; then
21856       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
21857       # instead of lib<name>.a to let people know that these are not
21858       # typical AIX shared libraries.
21859       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
21860     else
21861       # We preserve .a as extension for shared libraries through AIX4.2
21862       # and later when we are not doing run time linking.
21863       library_names_spec='${libname}${release}.a $libname.a'
21864       soname_spec='${libname}${release}${shared_ext}$major'
21865     fi
21866     shlibpath_var=LIBPATH
21867   fi
21868   ;;
21869
21870 amigaos*)
21871   case $host_cpu in
21872   powerpc)
21873     # Since July 2007 AmigaOS4 officially supports .so libraries.
21874     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
21875     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
21876     ;;
21877   m68k)
21878     library_names_spec='$libname.ixlibrary $libname.a'
21879     # Create ${libname}_ixlibrary.a entries in /sys/libs.
21880     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
21881     ;;
21882   esac
21883   ;;
21884
21885 beos*)
21886   library_names_spec='${libname}${shared_ext}'
21887   dynamic_linker="$host_os ld.so"
21888   shlibpath_var=LIBRARY_PATH
21889   ;;
21890
21891 bsdi[45]*)
21892   version_type=linux
21893   need_version=no
21894   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
21895   soname_spec='${libname}${release}${shared_ext}$major'
21896   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
21897   shlibpath_var=LD_LIBRARY_PATH
21898   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
21899   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
21900   # the default ld.so.conf also contains /usr/contrib/lib and
21901   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
21902   # libtool to hard-code these into programs
21903   ;;
21904
21905 cygwin* | mingw* | pw32* | cegcc*)
21906   version_type=windows
21907   shrext_cmds=".dll"
21908   need_version=no
21909   need_lib_prefix=no
21910
21911   case $GCC,$cc_basename in
21912   yes,*)
21913     # gcc
21914     library_names_spec='$libname.dll.a'
21915     # DLL is installed to $(libdir)/../bin by postinstall_cmds
21916     postinstall_cmds='base_file=`basename \${file}`~
21917       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
21918       dldir=$destdir/`dirname \$dlpath`~
21919       test -d \$dldir || mkdir -p \$dldir~
21920       $install_prog $dir/$dlname \$dldir/$dlname~
21921       chmod a+x \$dldir/$dlname~
21922       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
21923         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
21924       fi'
21925     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
21926       dlpath=$dir/\$dldll~
21927        $RM \$dlpath'
21928     shlibpath_overrides_runpath=yes
21929
21930     case $host_os in
21931     cygwin*)
21932       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
21933       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
21934
21935       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
21936       ;;
21937     mingw* | cegcc*)
21938       # MinGW DLLs use traditional 'lib' prefix
21939       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
21940       ;;
21941     pw32*)
21942       # pw32 DLLs use 'pw' prefix rather than 'lib'
21943       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
21944       ;;
21945     esac
21946     dynamic_linker='Win32 ld.exe'
21947     ;;
21948
21949   *,cl*)
21950     # Native MSVC
21951     libname_spec='$name'
21952     soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
21953     library_names_spec='${libname}.dll.lib'
21954
21955     case $build_os in
21956     mingw*)
21957       sys_lib_search_path_spec=
21958       lt_save_ifs=$IFS
21959       IFS=';'
21960       for lt_path in $LIB
21961       do
21962         IFS=$lt_save_ifs
21963         # Let DOS variable expansion print the short 8.3 style file name.
21964         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
21965         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
21966       done
21967       IFS=$lt_save_ifs
21968       # Convert to MSYS style.
21969       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
21970       ;;
21971     cygwin*)
21972       # Convert to unix form, then to dos form, then back to unix form
21973       # but this time dos style (no spaces!) so that the unix form looks
21974       # like /cygdrive/c/PROGRA~1:/cygdr...
21975       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
21976       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
21977       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
21978       ;;
21979     *)
21980       sys_lib_search_path_spec="$LIB"
21981       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
21982         # It is most probably a Windows format PATH.
21983         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
21984       else
21985         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
21986       fi
21987       # FIXME: find the short name or the path components, as spaces are
21988       # common. (e.g. "Program Files" -> "PROGRA~1")
21989       ;;
21990     esac
21991
21992     # DLL is installed to $(libdir)/../bin by postinstall_cmds
21993     postinstall_cmds='base_file=`basename \${file}`~
21994       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
21995       dldir=$destdir/`dirname \$dlpath`~
21996       test -d \$dldir || mkdir -p \$dldir~
21997       $install_prog $dir/$dlname \$dldir/$dlname'
21998     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
21999       dlpath=$dir/\$dldll~
22000        $RM \$dlpath'
22001     shlibpath_overrides_runpath=yes
22002     dynamic_linker='Win32 link.exe'
22003     ;;
22004
22005   *)
22006     # Assume MSVC wrapper
22007     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
22008     dynamic_linker='Win32 ld.exe'
22009     ;;
22010   esac
22011   # FIXME: first we should search . and the directory the executable is in
22012   shlibpath_var=PATH
22013   ;;
22014
22015 darwin* | rhapsody*)
22016   dynamic_linker="$host_os dyld"
22017   version_type=darwin
22018   need_lib_prefix=no
22019   need_version=no
22020   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
22021   soname_spec='${libname}${release}${major}$shared_ext'
22022   shlibpath_overrides_runpath=yes
22023   shlibpath_var=DYLD_LIBRARY_PATH
22024   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
22025
22026   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
22027   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
22028   ;;
22029
22030 dgux*)
22031   version_type=linux
22032   need_lib_prefix=no
22033   need_version=no
22034   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
22035   soname_spec='${libname}${release}${shared_ext}$major'
22036   shlibpath_var=LD_LIBRARY_PATH
22037   ;;
22038
22039 freebsd1*)
22040   dynamic_linker=no
22041   ;;
22042
22043 freebsd* | dragonfly*)
22044   # DragonFly does not have aout.  When/if they implement a new
22045   # versioning mechanism, adjust this.
22046   if test -x /usr/bin/objformat; then
22047     objformat=`/usr/bin/objformat`
22048   else
22049     case $host_os in
22050     freebsd[123]*) objformat=aout ;;
22051     *) objformat=elf ;;
22052     esac
22053   fi
22054   version_type=freebsd-$objformat
22055   case $version_type in
22056     freebsd-elf*)
22057       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
22058       need_version=no
22059       need_lib_prefix=no
22060       ;;
22061     freebsd-*)
22062       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
22063       need_version=yes
22064       ;;
22065   esac
22066   shlibpath_var=LD_LIBRARY_PATH
22067   case $host_os in
22068   freebsd2*)
22069     shlibpath_overrides_runpath=yes
22070     ;;
22071   freebsd3.[01]* | freebsdelf3.[01]*)
22072     shlibpath_overrides_runpath=yes
22073     hardcode_into_libs=yes
22074     ;;
22075   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
22076   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
22077     shlibpath_overrides_runpath=no
22078     hardcode_into_libs=yes
22079     ;;
22080   *) # from 4.6 on, and DragonFly
22081     shlibpath_overrides_runpath=yes
22082     hardcode_into_libs=yes
22083     ;;
22084   esac
22085   ;;
22086
22087 gnu*)
22088   version_type=linux
22089   need_lib_prefix=no
22090   need_version=no
22091   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
22092   soname_spec='${libname}${release}${shared_ext}$major'
22093   shlibpath_var=LD_LIBRARY_PATH
22094   hardcode_into_libs=yes
22095   ;;
22096
22097 haiku*)
22098   version_type=linux
22099   need_lib_prefix=no
22100   need_version=no
22101   dynamic_linker="$host_os runtime_loader"
22102   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
22103   soname_spec='${libname}${release}${shared_ext}$major'
22104   shlibpath_var=LIBRARY_PATH
22105   shlibpath_overrides_runpath=yes
22106   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
22107   hardcode_into_libs=yes
22108   ;;
22109
22110 hpux9* | hpux10* | hpux11*)
22111   # Give a soname corresponding to the major version so that dld.sl refuses to
22112   # link against other versions.
22113   version_type=sunos
22114   need_lib_prefix=no
22115   need_version=no
22116   case $host_cpu in
22117   ia64*)
22118     shrext_cmds='.so'
22119     hardcode_into_libs=yes
22120     dynamic_linker="$host_os dld.so"
22121     shlibpath_var=LD_LIBRARY_PATH
22122     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
22123     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22124     soname_spec='${libname}${release}${shared_ext}$major'
22125     if test "X$HPUX_IA64_MODE" = X32; then
22126       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
22127     else
22128       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
22129     fi
22130     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
22131     ;;
22132   hppa*64*)
22133     shrext_cmds='.sl'
22134     hardcode_into_libs=yes
22135     dynamic_linker="$host_os dld.sl"
22136     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
22137     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
22138     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22139     soname_spec='${libname}${release}${shared_ext}$major'
22140     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
22141     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
22142     ;;
22143   *)
22144     shrext_cmds='.sl'
22145     dynamic_linker="$host_os dld.sl"
22146     shlibpath_var=SHLIB_PATH
22147     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
22148     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22149     soname_spec='${libname}${release}${shared_ext}$major'
22150     ;;
22151   esac
22152   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
22153   postinstall_cmds='chmod 555 $lib'
22154   # or fails outright, so override atomically:
22155   install_override_mode=555
22156   ;;
22157
22158 interix[3-9]*)
22159   version_type=linux
22160   need_lib_prefix=no
22161   need_version=no
22162   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
22163   soname_spec='${libname}${release}${shared_ext}$major'
22164   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
22165   shlibpath_var=LD_LIBRARY_PATH
22166   shlibpath_overrides_runpath=no
22167   hardcode_into_libs=yes
22168   ;;
22169
22170 irix5* | irix6* | nonstopux*)
22171   case $host_os in
22172     nonstopux*) version_type=nonstopux ;;
22173     *)
22174         if test "$lt_cv_prog_gnu_ld" = yes; then
22175                 version_type=linux
22176         else
22177                 version_type=irix
22178         fi ;;
22179   esac
22180   need_lib_prefix=no
22181   need_version=no
22182   soname_spec='${libname}${release}${shared_ext}$major'
22183   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
22184   case $host_os in
22185   irix5* | nonstopux*)
22186     libsuff= shlibsuff=
22187     ;;
22188   *)
22189     case $LD in # libtool.m4 will add one of these switches to LD
22190     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
22191       libsuff= shlibsuff= libmagic=32-bit;;
22192     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
22193       libsuff=32 shlibsuff=N32 libmagic=N32;;
22194     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
22195       libsuff=64 shlibsuff=64 libmagic=64-bit;;
22196     *) libsuff= shlibsuff= libmagic=never-match;;
22197     esac
22198     ;;
22199   esac
22200   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
22201   shlibpath_overrides_runpath=no
22202   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
22203   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
22204   hardcode_into_libs=yes
22205   ;;
22206
22207 # No shared lib support for Linux oldld, aout, or coff.
22208 linux*oldld* | linux*aout* | linux*coff*)
22209   dynamic_linker=no
22210   ;;
22211
22212 # This must be Linux ELF.
22213 linux* | k*bsd*-gnu | kopensolaris*-gnu)
22214   version_type=linux
22215   need_lib_prefix=no
22216   need_version=no
22217   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22218   soname_spec='${libname}${release}${shared_ext}$major'
22219   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
22220   shlibpath_var=LD_LIBRARY_PATH
22221   shlibpath_overrides_runpath=no
22222
22223   # Some binutils ld are patched to set DT_RUNPATH
22224   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
22225   $as_echo_n "(cached) " >&6
22226 else
22227   lt_cv_shlibpath_overrides_runpath=no
22228     save_LDFLAGS=$LDFLAGS
22229     save_libdir=$libdir
22230     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
22231          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
22232     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22233 /* end confdefs.h.  */
22234
22235 int
22236 main ()
22237 {
22238
22239   ;
22240   return 0;
22241 }
22242 _ACEOF
22243 if ac_fn_c_try_link "$LINENO"; then :
22244   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
22245   lt_cv_shlibpath_overrides_runpath=yes
22246 fi
22247 fi
22248 rm -f core conftest.err conftest.$ac_objext \
22249     conftest$ac_exeext conftest.$ac_ext
22250     LDFLAGS=$save_LDFLAGS
22251     libdir=$save_libdir
22252
22253 fi
22254
22255   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
22256
22257   # This implies no fast_install, which is unacceptable.
22258   # Some rework will be needed to allow for fast_install
22259   # before this can be enabled.
22260   hardcode_into_libs=yes
22261
22262   # Append ld.so.conf contents to the search path
22263   if test -f /etc/ld.so.conf; then
22264     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[       ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
22265     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
22266   fi
22267
22268   # We used to test for /lib/ld.so.1 and disable shared libraries on
22269   # powerpc, because MkLinux only supported shared libraries with the
22270   # GNU dynamic linker.  Since this was broken with cross compilers,
22271   # most powerpc-linux boxes support dynamic linking these days and
22272   # people can always --disable-shared, the test was removed, and we
22273   # assume the GNU/Linux dynamic linker is in use.
22274   dynamic_linker='GNU/Linux ld.so'
22275   ;;
22276
22277 netbsd*)
22278   version_type=sunos
22279   need_lib_prefix=no
22280   need_version=no
22281   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
22282     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
22283     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
22284     dynamic_linker='NetBSD (a.out) ld.so'
22285   else
22286     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
22287     soname_spec='${libname}${release}${shared_ext}$major'
22288     dynamic_linker='NetBSD ld.elf_so'
22289   fi
22290   shlibpath_var=LD_LIBRARY_PATH
22291   shlibpath_overrides_runpath=yes
22292   hardcode_into_libs=yes
22293   ;;
22294
22295 newsos6)
22296   version_type=linux
22297   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22298   shlibpath_var=LD_LIBRARY_PATH
22299   shlibpath_overrides_runpath=yes
22300   ;;
22301
22302 *nto* | *qnx*)
22303   version_type=qnx
22304   need_lib_prefix=no
22305   need_version=no
22306   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22307   soname_spec='${libname}${release}${shared_ext}$major'
22308   shlibpath_var=LD_LIBRARY_PATH
22309   shlibpath_overrides_runpath=no
22310   hardcode_into_libs=yes
22311   dynamic_linker='ldqnx.so'
22312   ;;
22313
22314 openbsd*)
22315   version_type=sunos
22316   sys_lib_dlsearch_path_spec="/usr/lib"
22317   need_lib_prefix=no
22318   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
22319   case $host_os in
22320     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
22321     *)                          need_version=no  ;;
22322   esac
22323   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
22324   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
22325   shlibpath_var=LD_LIBRARY_PATH
22326   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
22327     case $host_os in
22328       openbsd2.[89] | openbsd2.[89].*)
22329         shlibpath_overrides_runpath=no
22330         ;;
22331       *)
22332         shlibpath_overrides_runpath=yes
22333         ;;
22334       esac
22335   else
22336     shlibpath_overrides_runpath=yes
22337   fi
22338   ;;
22339
22340 os2*)
22341   libname_spec='$name'
22342   shrext_cmds=".dll"
22343   need_lib_prefix=no
22344   library_names_spec='$libname${shared_ext} $libname.a'
22345   dynamic_linker='OS/2 ld.exe'
22346   shlibpath_var=LIBPATH
22347   ;;
22348
22349 osf3* | osf4* | osf5*)
22350   version_type=osf
22351   need_lib_prefix=no
22352   need_version=no
22353   soname_spec='${libname}${release}${shared_ext}$major'
22354   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22355   shlibpath_var=LD_LIBRARY_PATH
22356   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
22357   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
22358   ;;
22359
22360 rdos*)
22361   dynamic_linker=no
22362   ;;
22363
22364 solaris*)
22365   version_type=linux
22366   need_lib_prefix=no
22367   need_version=no
22368   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22369   soname_spec='${libname}${release}${shared_ext}$major'
22370   shlibpath_var=LD_LIBRARY_PATH
22371   shlibpath_overrides_runpath=yes
22372   hardcode_into_libs=yes
22373   # ldd complains unless libraries are executable
22374   postinstall_cmds='chmod +x $lib'
22375   ;;
22376
22377 sunos4*)
22378   version_type=sunos
22379   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
22380   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
22381   shlibpath_var=LD_LIBRARY_PATH
22382   shlibpath_overrides_runpath=yes
22383   if test "$with_gnu_ld" = yes; then
22384     need_lib_prefix=no
22385   fi
22386   need_version=yes
22387   ;;
22388
22389 sysv4 | sysv4.3*)
22390   version_type=linux
22391   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22392   soname_spec='${libname}${release}${shared_ext}$major'
22393   shlibpath_var=LD_LIBRARY_PATH
22394   case $host_vendor in
22395     sni)
22396       shlibpath_overrides_runpath=no
22397       need_lib_prefix=no
22398       runpath_var=LD_RUN_PATH
22399       ;;
22400     siemens)
22401       need_lib_prefix=no
22402       ;;
22403     motorola)
22404       need_lib_prefix=no
22405       need_version=no
22406       shlibpath_overrides_runpath=no
22407       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
22408       ;;
22409   esac
22410   ;;
22411
22412 sysv4*MP*)
22413   if test -d /usr/nec ;then
22414     version_type=linux
22415     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
22416     soname_spec='$libname${shared_ext}.$major'
22417     shlibpath_var=LD_LIBRARY_PATH
22418   fi
22419   ;;
22420
22421 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
22422   version_type=freebsd-elf
22423   need_lib_prefix=no
22424   need_version=no
22425   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
22426   soname_spec='${libname}${release}${shared_ext}$major'
22427   shlibpath_var=LD_LIBRARY_PATH
22428   shlibpath_overrides_runpath=yes
22429   hardcode_into_libs=yes
22430   if test "$with_gnu_ld" = yes; then
22431     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
22432   else
22433     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
22434     case $host_os in
22435       sco3.2v5*)
22436         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
22437         ;;
22438     esac
22439   fi
22440   sys_lib_dlsearch_path_spec='/usr/lib'
22441   ;;
22442
22443 tpf*)
22444   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
22445   version_type=linux
22446   need_lib_prefix=no
22447   need_version=no
22448   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22449   shlibpath_var=LD_LIBRARY_PATH
22450   shlibpath_overrides_runpath=no
22451   hardcode_into_libs=yes
22452   ;;
22453
22454 uts4*)
22455   version_type=linux
22456   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22457   soname_spec='${libname}${release}${shared_ext}$major'
22458   shlibpath_var=LD_LIBRARY_PATH
22459   ;;
22460
22461 *)
22462   dynamic_linker=no
22463   ;;
22464 esac
22465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
22466 $as_echo "$dynamic_linker" >&6; }
22467 test "$dynamic_linker" = no && can_build_shared=no
22468
22469 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
22470 if test "$GCC" = yes; then
22471   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
22472 fi
22473
22474 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
22475   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
22476 fi
22477 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
22478   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
22479 fi
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
22573 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
22574 hardcode_action=
22575 if test -n "$hardcode_libdir_flag_spec" ||
22576    test -n "$runpath_var" ||
22577    test "X$hardcode_automatic" = "Xyes" ; then
22578
22579   # We can hardcode non-existent directories.
22580   if test "$hardcode_direct" != no &&
22581      # If the only mechanism to avoid hardcoding is shlibpath_var, we
22582      # have to relink, otherwise we might link with an installed library
22583      # when we should be linking with a yet-to-be-installed one
22584      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
22585      test "$hardcode_minus_L" != no; then
22586     # Linking always hardcodes the temporary library directory.
22587     hardcode_action=relink
22588   else
22589     # We can link without hardcoding, and we can hardcode nonexisting dirs.
22590     hardcode_action=immediate
22591   fi
22592 else
22593   # We cannot hardcode anything, or else we can only hardcode existing
22594   # directories.
22595   hardcode_action=unsupported
22596 fi
22597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
22598 $as_echo "$hardcode_action" >&6; }
22599
22600 if test "$hardcode_action" = relink ||
22601    test "$inherit_rpath" = yes; then
22602   # Fast installation is not supported
22603   enable_fast_install=no
22604 elif test "$shlibpath_overrides_runpath" = yes ||
22605      test "$enable_shared" = no; then
22606   # Fast installation is not necessary
22607   enable_fast_install=needless
22608 fi
22609
22610
22611
22612
22613
22614
22615   if test "x$enable_dlopen" != xyes; then
22616   enable_dlopen=unknown
22617   enable_dlopen_self=unknown
22618   enable_dlopen_self_static=unknown
22619 else
22620   lt_cv_dlopen=no
22621   lt_cv_dlopen_libs=
22622
22623   case $host_os in
22624   beos*)
22625     lt_cv_dlopen="load_add_on"
22626     lt_cv_dlopen_libs=
22627     lt_cv_dlopen_self=yes
22628     ;;
22629
22630   mingw* | pw32* | cegcc*)
22631     lt_cv_dlopen="LoadLibrary"
22632     lt_cv_dlopen_libs=
22633     ;;
22634
22635   cygwin*)
22636     lt_cv_dlopen="dlopen"
22637     lt_cv_dlopen_libs=
22638     ;;
22639
22640   darwin*)
22641   # if libdl is installed we need to link against it
22642     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
22643 $as_echo_n "checking for dlopen in -ldl... " >&6; }
22644 if ${ac_cv_lib_dl_dlopen+:} false; then :
22645   $as_echo_n "(cached) " >&6
22646 else
22647   ac_check_lib_save_LIBS=$LIBS
22648 LIBS="-ldl  $LIBS"
22649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22650 /* end confdefs.h.  */
22651
22652 /* Override any GCC internal prototype to avoid an error.
22653    Use char because int might match the return type of a GCC
22654    builtin and then its argument prototype would still apply.  */
22655 #ifdef __cplusplus
22656 extern "C"
22657 #endif
22658 char dlopen ();
22659 int
22660 main ()
22661 {
22662 return dlopen ();
22663   ;
22664   return 0;
22665 }
22666 _ACEOF
22667 if ac_fn_c_try_link "$LINENO"; then :
22668   ac_cv_lib_dl_dlopen=yes
22669 else
22670   ac_cv_lib_dl_dlopen=no
22671 fi
22672 rm -f core conftest.err conftest.$ac_objext \
22673     conftest$ac_exeext conftest.$ac_ext
22674 LIBS=$ac_check_lib_save_LIBS
22675 fi
22676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
22677 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
22678 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
22679   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
22680 else
22681
22682     lt_cv_dlopen="dyld"
22683     lt_cv_dlopen_libs=
22684     lt_cv_dlopen_self=yes
22685
22686 fi
22687
22688     ;;
22689
22690   *)
22691     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
22692 if test "x$ac_cv_func_shl_load" = xyes; then :
22693   lt_cv_dlopen="shl_load"
22694 else
22695   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
22696 $as_echo_n "checking for shl_load in -ldld... " >&6; }
22697 if ${ac_cv_lib_dld_shl_load+:} false; then :
22698   $as_echo_n "(cached) " >&6
22699 else
22700   ac_check_lib_save_LIBS=$LIBS
22701 LIBS="-ldld  $LIBS"
22702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22703 /* end confdefs.h.  */
22704
22705 /* Override any GCC internal prototype to avoid an error.
22706    Use char because int might match the return type of a GCC
22707    builtin and then its argument prototype would still apply.  */
22708 #ifdef __cplusplus
22709 extern "C"
22710 #endif
22711 char shl_load ();
22712 int
22713 main ()
22714 {
22715 return shl_load ();
22716   ;
22717   return 0;
22718 }
22719 _ACEOF
22720 if ac_fn_c_try_link "$LINENO"; then :
22721   ac_cv_lib_dld_shl_load=yes
22722 else
22723   ac_cv_lib_dld_shl_load=no
22724 fi
22725 rm -f core conftest.err conftest.$ac_objext \
22726     conftest$ac_exeext conftest.$ac_ext
22727 LIBS=$ac_check_lib_save_LIBS
22728 fi
22729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
22730 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
22731 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
22732   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
22733 else
22734   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
22735 if test "x$ac_cv_func_dlopen" = xyes; then :
22736   lt_cv_dlopen="dlopen"
22737 else
22738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
22739 $as_echo_n "checking for dlopen in -ldl... " >&6; }
22740 if ${ac_cv_lib_dl_dlopen+:} false; then :
22741   $as_echo_n "(cached) " >&6
22742 else
22743   ac_check_lib_save_LIBS=$LIBS
22744 LIBS="-ldl  $LIBS"
22745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22746 /* end confdefs.h.  */
22747
22748 /* Override any GCC internal prototype to avoid an error.
22749    Use char because int might match the return type of a GCC
22750    builtin and then its argument prototype would still apply.  */
22751 #ifdef __cplusplus
22752 extern "C"
22753 #endif
22754 char dlopen ();
22755 int
22756 main ()
22757 {
22758 return dlopen ();
22759   ;
22760   return 0;
22761 }
22762 _ACEOF
22763 if ac_fn_c_try_link "$LINENO"; then :
22764   ac_cv_lib_dl_dlopen=yes
22765 else
22766   ac_cv_lib_dl_dlopen=no
22767 fi
22768 rm -f core conftest.err conftest.$ac_objext \
22769     conftest$ac_exeext conftest.$ac_ext
22770 LIBS=$ac_check_lib_save_LIBS
22771 fi
22772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
22773 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
22774 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
22775   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
22776 else
22777   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
22778 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
22779 if ${ac_cv_lib_svld_dlopen+:} false; then :
22780   $as_echo_n "(cached) " >&6
22781 else
22782   ac_check_lib_save_LIBS=$LIBS
22783 LIBS="-lsvld  $LIBS"
22784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22785 /* end confdefs.h.  */
22786
22787 /* Override any GCC internal prototype to avoid an error.
22788    Use char because int might match the return type of a GCC
22789    builtin and then its argument prototype would still apply.  */
22790 #ifdef __cplusplus
22791 extern "C"
22792 #endif
22793 char dlopen ();
22794 int
22795 main ()
22796 {
22797 return dlopen ();
22798   ;
22799   return 0;
22800 }
22801 _ACEOF
22802 if ac_fn_c_try_link "$LINENO"; then :
22803   ac_cv_lib_svld_dlopen=yes
22804 else
22805   ac_cv_lib_svld_dlopen=no
22806 fi
22807 rm -f core conftest.err conftest.$ac_objext \
22808     conftest$ac_exeext conftest.$ac_ext
22809 LIBS=$ac_check_lib_save_LIBS
22810 fi
22811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
22812 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
22813 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
22814   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
22815 else
22816   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
22817 $as_echo_n "checking for dld_link in -ldld... " >&6; }
22818 if ${ac_cv_lib_dld_dld_link+:} false; then :
22819   $as_echo_n "(cached) " >&6
22820 else
22821   ac_check_lib_save_LIBS=$LIBS
22822 LIBS="-ldld  $LIBS"
22823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22824 /* end confdefs.h.  */
22825
22826 /* Override any GCC internal prototype to avoid an error.
22827    Use char because int might match the return type of a GCC
22828    builtin and then its argument prototype would still apply.  */
22829 #ifdef __cplusplus
22830 extern "C"
22831 #endif
22832 char dld_link ();
22833 int
22834 main ()
22835 {
22836 return dld_link ();
22837   ;
22838   return 0;
22839 }
22840 _ACEOF
22841 if ac_fn_c_try_link "$LINENO"; then :
22842   ac_cv_lib_dld_dld_link=yes
22843 else
22844   ac_cv_lib_dld_dld_link=no
22845 fi
22846 rm -f core conftest.err conftest.$ac_objext \
22847     conftest$ac_exeext conftest.$ac_ext
22848 LIBS=$ac_check_lib_save_LIBS
22849 fi
22850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
22851 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
22852 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
22853   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
22854 fi
22855
22856
22857 fi
22858
22859
22860 fi
22861
22862
22863 fi
22864
22865
22866 fi
22867
22868
22869 fi
22870
22871     ;;
22872   esac
22873
22874   if test "x$lt_cv_dlopen" != xno; then
22875     enable_dlopen=yes
22876   else
22877     enable_dlopen=no
22878   fi
22879
22880   case $lt_cv_dlopen in
22881   dlopen)
22882     save_CPPFLAGS="$CPPFLAGS"
22883     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
22884
22885     save_LDFLAGS="$LDFLAGS"
22886     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
22887
22888     save_LIBS="$LIBS"
22889     LIBS="$lt_cv_dlopen_libs $LIBS"
22890
22891     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
22892 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
22893 if ${lt_cv_dlopen_self+:} false; then :
22894   $as_echo_n "(cached) " >&6
22895 else
22896           if test "$cross_compiling" = yes; then :
22897   lt_cv_dlopen_self=cross
22898 else
22899   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
22900   lt_status=$lt_dlunknown
22901   cat > conftest.$ac_ext <<_LT_EOF
22902 #line $LINENO "configure"
22903 #include "confdefs.h"
22904
22905 #if HAVE_DLFCN_H
22906 #include <dlfcn.h>
22907 #endif
22908
22909 #include <stdio.h>
22910
22911 #ifdef RTLD_GLOBAL
22912 #  define LT_DLGLOBAL           RTLD_GLOBAL
22913 #else
22914 #  ifdef DL_GLOBAL
22915 #    define LT_DLGLOBAL         DL_GLOBAL
22916 #  else
22917 #    define LT_DLGLOBAL         0
22918 #  endif
22919 #endif
22920
22921 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
22922    find out it does not work in some platform. */
22923 #ifndef LT_DLLAZY_OR_NOW
22924 #  ifdef RTLD_LAZY
22925 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
22926 #  else
22927 #    ifdef DL_LAZY
22928 #      define LT_DLLAZY_OR_NOW          DL_LAZY
22929 #    else
22930 #      ifdef RTLD_NOW
22931 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
22932 #      else
22933 #        ifdef DL_NOW
22934 #          define LT_DLLAZY_OR_NOW      DL_NOW
22935 #        else
22936 #          define LT_DLLAZY_OR_NOW      0
22937 #        endif
22938 #      endif
22939 #    endif
22940 #  endif
22941 #endif
22942
22943 /* When -fvisbility=hidden is used, assume the code has been annotated
22944    correspondingly for the symbols needed.  */
22945 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
22946 int fnord () __attribute__((visibility("default")));
22947 #endif
22948
22949 int fnord () { return 42; }
22950 int main ()
22951 {
22952   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
22953   int status = $lt_dlunknown;
22954
22955   if (self)
22956     {
22957       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
22958       else
22959         {
22960           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
22961           else puts (dlerror ());
22962         }
22963       /* dlclose (self); */
22964     }
22965   else
22966     puts (dlerror ());
22967
22968   return status;
22969 }
22970 _LT_EOF
22971   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
22972   (eval $ac_link) 2>&5
22973   ac_status=$?
22974   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22975   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
22976     (./conftest; exit; ) >&5 2>/dev/null
22977     lt_status=$?
22978     case x$lt_status in
22979       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
22980       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
22981       x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
22982     esac
22983   else :
22984     # compilation failed
22985     lt_cv_dlopen_self=no
22986   fi
22987 fi
22988 rm -fr conftest*
22989
22990
22991 fi
22992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
22993 $as_echo "$lt_cv_dlopen_self" >&6; }
22994
22995     if test "x$lt_cv_dlopen_self" = xyes; then
22996       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
22997       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
22998 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
22999 if ${lt_cv_dlopen_self_static+:} false; then :
23000   $as_echo_n "(cached) " >&6
23001 else
23002           if test "$cross_compiling" = yes; then :
23003   lt_cv_dlopen_self_static=cross
23004 else
23005   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
23006   lt_status=$lt_dlunknown
23007   cat > conftest.$ac_ext <<_LT_EOF
23008 #line $LINENO "configure"
23009 #include "confdefs.h"
23010
23011 #if HAVE_DLFCN_H
23012 #include <dlfcn.h>
23013 #endif
23014
23015 #include <stdio.h>
23016
23017 #ifdef RTLD_GLOBAL
23018 #  define LT_DLGLOBAL           RTLD_GLOBAL
23019 #else
23020 #  ifdef DL_GLOBAL
23021 #    define LT_DLGLOBAL         DL_GLOBAL
23022 #  else
23023 #    define LT_DLGLOBAL         0
23024 #  endif
23025 #endif
23026
23027 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
23028    find out it does not work in some platform. */
23029 #ifndef LT_DLLAZY_OR_NOW
23030 #  ifdef RTLD_LAZY
23031 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
23032 #  else
23033 #    ifdef DL_LAZY
23034 #      define LT_DLLAZY_OR_NOW          DL_LAZY
23035 #    else
23036 #      ifdef RTLD_NOW
23037 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
23038 #      else
23039 #        ifdef DL_NOW
23040 #          define LT_DLLAZY_OR_NOW      DL_NOW
23041 #        else
23042 #          define LT_DLLAZY_OR_NOW      0
23043 #        endif
23044 #      endif
23045 #    endif
23046 #  endif
23047 #endif
23048
23049 /* When -fvisbility=hidden is used, assume the code has been annotated
23050    correspondingly for the symbols needed.  */
23051 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
23052 int fnord () __attribute__((visibility("default")));
23053 #endif
23054
23055 int fnord () { return 42; }
23056 int main ()
23057 {
23058   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
23059   int status = $lt_dlunknown;
23060
23061   if (self)
23062     {
23063       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
23064       else
23065         {
23066           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
23067           else puts (dlerror ());
23068         }
23069       /* dlclose (self); */
23070     }
23071   else
23072     puts (dlerror ());
23073
23074   return status;
23075 }
23076 _LT_EOF
23077   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
23078   (eval $ac_link) 2>&5
23079   ac_status=$?
23080   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23081   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
23082     (./conftest; exit; ) >&5 2>/dev/null
23083     lt_status=$?
23084     case x$lt_status in
23085       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
23086       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
23087       x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
23088     esac
23089   else :
23090     # compilation failed
23091     lt_cv_dlopen_self_static=no
23092   fi
23093 fi
23094 rm -fr conftest*
23095
23096
23097 fi
23098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
23099 $as_echo "$lt_cv_dlopen_self_static" >&6; }
23100     fi
23101
23102     CPPFLAGS="$save_CPPFLAGS"
23103     LDFLAGS="$save_LDFLAGS"
23104     LIBS="$save_LIBS"
23105     ;;
23106   esac
23107
23108   case $lt_cv_dlopen_self in
23109   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
23110   *) enable_dlopen_self=unknown ;;
23111   esac
23112
23113   case $lt_cv_dlopen_self_static in
23114   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
23115   *) enable_dlopen_self_static=unknown ;;
23116   esac
23117 fi
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135 striplib=
23136 old_striplib=
23137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
23138 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
23139 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
23140   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
23141   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
23142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23143 $as_echo "yes" >&6; }
23144 else
23145 # FIXME - insert some real tests, host_os isn't really good enough
23146   case $host_os in
23147   darwin*)
23148     if test -n "$STRIP" ; then
23149       striplib="$STRIP -x"
23150       old_striplib="$STRIP -S"
23151       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23152 $as_echo "yes" >&6; }
23153     else
23154       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23155 $as_echo "no" >&6; }
23156     fi
23157     ;;
23158   *)
23159     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23160 $as_echo "no" >&6; }
23161     ;;
23162   esac
23163 fi
23164
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176   # Report which library types will actually be built
23177   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
23178 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
23179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
23180 $as_echo "$can_build_shared" >&6; }
23181
23182   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
23183 $as_echo_n "checking whether to build shared libraries... " >&6; }
23184   test "$can_build_shared" = "no" && enable_shared=no
23185
23186   # On AIX, shared libraries and static libraries use the same namespace, and
23187   # are all built from PIC.
23188   case $host_os in
23189   aix3*)
23190     test "$enable_shared" = yes && enable_static=no
23191     if test -n "$RANLIB"; then
23192       archive_cmds="$archive_cmds~\$RANLIB \$lib"
23193       postinstall_cmds='$RANLIB $lib'
23194     fi
23195     ;;
23196
23197   aix[4-9]*)
23198     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
23199       test "$enable_shared" = yes && enable_static=no
23200     fi
23201     ;;
23202   esac
23203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
23204 $as_echo "$enable_shared" >&6; }
23205
23206   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
23207 $as_echo_n "checking whether to build static libraries... " >&6; }
23208   # Make sure either enable_shared or enable_static is yes.
23209   test "$enable_shared" = yes || enable_static=yes
23210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
23211 $as_echo "$enable_static" >&6; }
23212
23213
23214
23215
23216 fi
23217 ac_ext=c
23218 ac_cpp='$CPP $CPPFLAGS'
23219 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23220 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23221 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23222
23223 CC="$lt_save_CC"
23224
23225
23226
23227
23228
23229
23230
23231
23232
23233
23234
23235
23236
23237         ac_config_commands="$ac_config_commands libtool"
23238
23239
23240
23241
23242 # Only expand once:
23243
23244
23245
23246
23247
23248
23249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
23250 $as_echo_n "checking if sntp will be built... " >&6; }
23251
23252 # Check whether --with-sntp was given.
23253 if test "${with_sntp+set}" = set; then :
23254   withval=$with_sntp;
23255 else
23256   with_sntp="${withsntp=yes}"
23257
23258 fi
23259
23260 case "$with_sntp" in
23261  no)
23262     SNTP=
23263     ;;
23264  *)
23265     SNTP=sntp
23266     ;;
23267 esac
23268
23269  if test -n "$SNTP"; then
23270   BUILD_SNTP_TRUE=
23271   BUILD_SNTP_FALSE='#'
23272 else
23273   BUILD_SNTP_TRUE='#'
23274   BUILD_SNTP_FALSE=
23275 fi
23276
23277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
23278 $as_echo "$with_sntp" >&6; }
23279
23280
23281
23282 case "$SNTP" in
23283  '')
23284     SNTP_DB=
23285     SNTP_DL=
23286     SNTP_DS=
23287     ;;
23288 esac
23289
23290 ###
23291
23292 # NTP has (so far) been relying on leading-edge autogen.
23293 # Therefore, by default:
23294 # - use the version we ship with
23295 # - do not install it
23296 # - build a static copy (AC_DISABLE_SHARED - done earlier)
23297 case "${enable_local_libopts+set}" in
23298  set) ;;
23299  *) enable_local_libopts=yes ;;
23300 esac
23301 case "${enable_libopts_install+set}" in
23302  set) ;;
23303  *) enable_libopts_install=no ;;
23304 esac
23305 enable_nls=no
23306
23307
23308   ac_header_dirent=no
23309 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
23310   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
23311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
23312 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
23313 if eval \${$as_ac_Header+:} false; then :
23314   $as_echo_n "(cached) " >&6
23315 else
23316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23317 /* end confdefs.h.  */
23318 #include <sys/types.h>
23319 #include <$ac_hdr>
23320
23321 int
23322 main ()
23323 {
23324 if ((DIR *) 0)
23325 return 0;
23326   ;
23327   return 0;
23328 }
23329 _ACEOF
23330 if ac_fn_c_try_compile "$LINENO"; then :
23331   eval "$as_ac_Header=yes"
23332 else
23333   eval "$as_ac_Header=no"
23334 fi
23335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23336 fi
23337 eval ac_res=\$$as_ac_Header
23338                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23339 $as_echo "$ac_res" >&6; }
23340 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23341   cat >>confdefs.h <<_ACEOF
23342 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
23343 _ACEOF
23344
23345 ac_header_dirent=$ac_hdr; break
23346 fi
23347
23348 done
23349 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
23350 if test $ac_header_dirent = dirent.h; then
23351   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
23352 $as_echo_n "checking for library containing opendir... " >&6; }
23353 if ${ac_cv_search_opendir+:} false; then :
23354   $as_echo_n "(cached) " >&6
23355 else
23356   ac_func_search_save_LIBS=$LIBS
23357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23358 /* end confdefs.h.  */
23359
23360 /* Override any GCC internal prototype to avoid an error.
23361    Use char because int might match the return type of a GCC
23362    builtin and then its argument prototype would still apply.  */
23363 #ifdef __cplusplus
23364 extern "C"
23365 #endif
23366 char opendir ();
23367 int
23368 main ()
23369 {
23370 return opendir ();
23371   ;
23372   return 0;
23373 }
23374 _ACEOF
23375 for ac_lib in '' dir; do
23376   if test -z "$ac_lib"; then
23377     ac_res="none required"
23378   else
23379     ac_res=-l$ac_lib
23380     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23381   fi
23382   if ac_fn_c_try_link "$LINENO"; then :
23383   ac_cv_search_opendir=$ac_res
23384 fi
23385 rm -f core conftest.err conftest.$ac_objext \
23386     conftest$ac_exeext
23387   if ${ac_cv_search_opendir+:} false; then :
23388   break
23389 fi
23390 done
23391 if ${ac_cv_search_opendir+:} false; then :
23392
23393 else
23394   ac_cv_search_opendir=no
23395 fi
23396 rm conftest.$ac_ext
23397 LIBS=$ac_func_search_save_LIBS
23398 fi
23399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
23400 $as_echo "$ac_cv_search_opendir" >&6; }
23401 ac_res=$ac_cv_search_opendir
23402 if test "$ac_res" != no; then :
23403   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23404
23405 fi
23406
23407 else
23408   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
23409 $as_echo_n "checking for library containing opendir... " >&6; }
23410 if ${ac_cv_search_opendir+:} false; then :
23411   $as_echo_n "(cached) " >&6
23412 else
23413   ac_func_search_save_LIBS=$LIBS
23414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23415 /* end confdefs.h.  */
23416
23417 /* Override any GCC internal prototype to avoid an error.
23418    Use char because int might match the return type of a GCC
23419    builtin and then its argument prototype would still apply.  */
23420 #ifdef __cplusplus
23421 extern "C"
23422 #endif
23423 char opendir ();
23424 int
23425 main ()
23426 {
23427 return opendir ();
23428   ;
23429   return 0;
23430 }
23431 _ACEOF
23432 for ac_lib in '' x; do
23433   if test -z "$ac_lib"; then
23434     ac_res="none required"
23435   else
23436     ac_res=-l$ac_lib
23437     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23438   fi
23439   if ac_fn_c_try_link "$LINENO"; then :
23440   ac_cv_search_opendir=$ac_res
23441 fi
23442 rm -f core conftest.err conftest.$ac_objext \
23443     conftest$ac_exeext
23444   if ${ac_cv_search_opendir+:} false; then :
23445   break
23446 fi
23447 done
23448 if ${ac_cv_search_opendir+:} false; then :
23449
23450 else
23451   ac_cv_search_opendir=no
23452 fi
23453 rm conftest.$ac_ext
23454 LIBS=$ac_func_search_save_LIBS
23455 fi
23456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
23457 $as_echo "$ac_cv_search_opendir" >&6; }
23458 ac_res=$ac_cv_search_opendir
23459 if test "$ac_res" != no; then :
23460   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23461
23462 fi
23463
23464 fi
23465
23466
23467   # =================
23468   # AC_CHECK_HEADERS
23469   # =================
23470   for ac_header in  \
23471       sys/mman.h    sys/param.h   sys/poll.h    sys/procset.h \
23472       sys/select.h  sys/socket.h  sys/stropts.h sys/time.h \
23473       sys/un.h      sys/wait.h    dlfcn.h       errno.h \
23474       fcntl.h       libgen.h      libintl.h     memory.h \
23475       netinet/in.h  setjmp.h      stdbool.h     sysexits.h \
23476       unistd.h      utime.h
23477 do :
23478   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23479 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23480 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23481   cat >>confdefs.h <<_ACEOF
23482 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23483 _ACEOF
23484
23485 fi
23486
23487 done
23488
23489
23490   for ac_header in stdarg.h     varargs.h
23491 do :
23492   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23493 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23494 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23495   cat >>confdefs.h <<_ACEOF
23496 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23497 _ACEOF
23498  lo_have_arg_hdr=true;break
23499 else
23500   lo_have_arg_hdr=false
23501 fi
23502
23503 done
23504
23505
23506   for ac_header in string.h     strings.h
23507 do :
23508   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23509 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23510 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23511   cat >>confdefs.h <<_ACEOF
23512 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23513 _ACEOF
23514  lo_have_str_hdr=true;break
23515 else
23516   lo_have_str_hdr=false
23517 fi
23518
23519 done
23520
23521
23522   for ac_header in limits.h     sys/limits.h  values.h
23523 do :
23524   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23525 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23526 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23527   cat >>confdefs.h <<_ACEOF
23528 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23529 _ACEOF
23530  lo_have_lim_hdr=true;break
23531 else
23532   lo_have_lim_hdr=false
23533 fi
23534
23535 done
23536
23537
23538   for ac_header in inttypes.h   stdint.h
23539 do :
23540   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23541 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23542 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23543   cat >>confdefs.h <<_ACEOF
23544 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23545 _ACEOF
23546  lo_have_typ_hdr=true;break
23547 else
23548   lo_have_typ_hdr=false
23549 fi
23550
23551 done
23552
23553
23554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
23555 $as_echo_n "checking for working stdnoreturn.h... " >&6; }
23556 if ${gl_cv_header_working_stdnoreturn_h+:} false; then :
23557   $as_echo_n "(cached) " >&6
23558 else
23559   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23560 /* end confdefs.h.  */
23561 #include <stdlib.h>
23562             #include <stdnoreturn.h>
23563             /* Do not check for 'noreturn' after the return type.
23564                C11 allows it, but it's rarely done that way
23565                and circa-2012 bleeding-edge GCC rejects it when given
23566                -Werror=old-style-declaration.  */
23567             noreturn void foo1 (void) { exit (0); }
23568             _Noreturn void foo2 (void) { exit (0); }
23569             int testit (int argc, char **argv) {
23570               if (argc & 1)
23571                 return 0;
23572               (argv[0][0] ? foo1 : foo2) ();
23573             }
23574
23575 int
23576 main ()
23577 {
23578
23579   ;
23580   return 0;
23581 }
23582 _ACEOF
23583 if ac_fn_c_try_compile "$LINENO"; then :
23584   gl_cv_header_working_stdnoreturn_h=yes
23585 else
23586   gl_cv_header_working_stdnoreturn_h=no
23587 fi
23588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23589 fi
23590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
23591 $as_echo "$gl_cv_header_working_stdnoreturn_h" >&6; }
23592
23593   if test $gl_cv_header_working_stdnoreturn_h = yes; then
23594     STDNORETURN_H=''
23595   else
23596     STDNORETURN_H='stdnoreturn.h'
23597   fi
23598
23599
23600    if test -n "$STDNORETURN_H"; then
23601   GL_GENERATE_STDNORETURN_H_TRUE=
23602   GL_GENERATE_STDNORETURN_H_FALSE='#'
23603 else
23604   GL_GENERATE_STDNORETURN_H_TRUE='#'
23605   GL_GENERATE_STDNORETURN_H_FALSE=
23606 fi
23607
23608
23609
23610   # ----------------------------------------------------------------------
23611   # check for various programs used during the build.
23612   # On OS/X, "wchar.h" needs "runetype.h" to work properly.
23613   # ----------------------------------------------------------------------
23614   for ac_header in runetype.h wchar.h
23615 do :
23616   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23617 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
23618   $ac_includes_default
23619   #if HAVE_RUNETYPE_H
23620   # include <runetype.h>
23621   #endif
23622
23623 "
23624 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23625   cat >>confdefs.h <<_ACEOF
23626 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23627 _ACEOF
23628
23629 fi
23630
23631 done
23632
23633
23634   # Check whether --enable-nls was given.
23635 if test "${enable_nls+set}" = set; then :
23636   enableval=$enable_nls;
23637 fi
23638
23639   if test "x$enable_nls" != "xno" && \
23640   test "X${ac_cv_header_libintl_h}" = Xyes; then :
23641
23642
23643 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
23644
23645 fi
23646
23647   # --------------------------------------------
23648   # Verify certain entries from AC_CHECK_HEADERS
23649   # --------------------------------------------
23650   ${lo_have_arg_hdr} || \
23651     as_fn_error $? "you must have stdarg.h or varargs.h on your system" "$LINENO" 5
23652
23653   ${lo_have_str_hdr} || \
23654     as_fn_error $? "you must have string.h or strings.h on your system" "$LINENO" 5
23655
23656   ${lo_have_lim_hdr} || \
23657     as_fn_error $? "you must have one of limits.h, sys/limits.h or values.h" "$LINENO" 5
23658
23659   ${lo_have_typ_hdr} || \
23660     as_fn_error $? "you must have inttypes.h or stdint.h on your system" "$LINENO" 5
23661
23662   for f in sys_types sys_param sys_stat string errno stdlib memory setjmp
23663   do eval as_ac_var=\${ac_cv_header_${f}_h}
23664      test "X${as_ac_var}" = Xyes || {
23665        as_fn_error $? "you must have ${f}.h on your system" "$LINENO" 5
23666      }
23667   done
23668   test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
23669     echo '#include <stdint.h>' > inttypes.h
23670
23671   # ----------------------------------------------------------------------
23672   # Checks for typedefs
23673   # ----------------------------------------------------------------------
23674   ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
23675 if test "x$ac_cv_type_wchar_t" = xyes; then :
23676
23677 cat >>confdefs.h <<_ACEOF
23678 #define HAVE_WCHAR_T 1
23679 _ACEOF
23680
23681
23682 fi
23683
23684   ac_fn_c_check_type "$LINENO" "wint_t" "ac_cv_type_wint_t" "
23685     $ac_includes_default
23686     #if HAVE_RUNETYPE_H
23687     # include <runetype.h>
23688     #endif
23689     #if HAVE_WCHAR_H
23690     # include <wchar.h>
23691     #endif
23692
23693 "
23694 if test "x$ac_cv_type_wint_t" = xyes; then :
23695
23696 cat >>confdefs.h <<_ACEOF
23697 #define HAVE_WINT_T 1
23698 _ACEOF
23699
23700
23701 fi
23702
23703   ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
23704 if test "x$ac_cv_type_int8_t" = xyes; then :
23705
23706 cat >>confdefs.h <<_ACEOF
23707 #define HAVE_INT8_T 1
23708 _ACEOF
23709
23710
23711 fi
23712 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
23713 if test "x$ac_cv_type_uint8_t" = xyes; then :
23714
23715 cat >>confdefs.h <<_ACEOF
23716 #define HAVE_UINT8_T 1
23717 _ACEOF
23718
23719
23720 fi
23721 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
23722 if test "x$ac_cv_type_int16_t" = xyes; then :
23723
23724 cat >>confdefs.h <<_ACEOF
23725 #define HAVE_INT16_T 1
23726 _ACEOF
23727
23728
23729 fi
23730 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
23731 if test "x$ac_cv_type_uint16_t" = xyes; then :
23732
23733 cat >>confdefs.h <<_ACEOF
23734 #define HAVE_UINT16_T 1
23735 _ACEOF
23736
23737
23738 fi
23739 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
23740 if test "x$ac_cv_type_int32_t" = xyes; then :
23741
23742 cat >>confdefs.h <<_ACEOF
23743 #define HAVE_INT32_T 1
23744 _ACEOF
23745
23746
23747 fi
23748 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
23749 if test "x$ac_cv_type_uint32_t" = xyes; then :
23750
23751 cat >>confdefs.h <<_ACEOF
23752 #define HAVE_UINT32_T 1
23753 _ACEOF
23754
23755
23756 fi
23757 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
23758 if test "x$ac_cv_type_intptr_t" = xyes; then :
23759
23760 cat >>confdefs.h <<_ACEOF
23761 #define HAVE_INTPTR_T 1
23762 _ACEOF
23763
23764
23765 fi
23766 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
23767 if test "x$ac_cv_type_uintptr_t" = xyes; then :
23768
23769 cat >>confdefs.h <<_ACEOF
23770 #define HAVE_UINTPTR_T 1
23771 _ACEOF
23772
23773
23774 fi
23775 ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
23776 if test "x$ac_cv_type_uint_t" = xyes; then :
23777
23778 cat >>confdefs.h <<_ACEOF
23779 #define HAVE_UINT_T 1
23780 _ACEOF
23781
23782
23783 fi
23784 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
23785 if test "x$ac_cv_type_pid_t" = xyes; then :
23786
23787 cat >>confdefs.h <<_ACEOF
23788 #define HAVE_PID_T 1
23789 _ACEOF
23790
23791
23792 fi
23793 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
23794 if test "x$ac_cv_type_size_t" = xyes; then :
23795
23796 cat >>confdefs.h <<_ACEOF
23797 #define HAVE_SIZE_T 1
23798 _ACEOF
23799
23800
23801 fi
23802 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
23803 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
23804
23805 cat >>confdefs.h <<_ACEOF
23806 #define HAVE_PTRDIFF_T 1
23807 _ACEOF
23808
23809
23810 fi
23811
23812   # The cast to long int works around a bug in the HP C Compiler
23813 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23814 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23815 # This bug is HP SR number 8606223364.
23816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
23817 $as_echo_n "checking size of char *... " >&6; }
23818 if ${ac_cv_sizeof_char_p+:} false; then :
23819   $as_echo_n "(cached) " >&6
23820 else
23821   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p"        "$ac_includes_default"; then :
23822
23823 else
23824   if test "$ac_cv_type_char_p" = yes; then
23825      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23826 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23827 as_fn_error 77 "cannot compute sizeof (char *)
23828 See \`config.log' for more details" "$LINENO" 5; }
23829    else
23830      ac_cv_sizeof_char_p=0
23831    fi
23832 fi
23833
23834 fi
23835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
23836 $as_echo "$ac_cv_sizeof_char_p" >&6; }
23837
23838
23839
23840 cat >>confdefs.h <<_ACEOF
23841 #define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
23842 _ACEOF
23843
23844
23845   # The cast to long int works around a bug in the HP C Compiler
23846 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23847 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23848 # This bug is HP SR number 8606223364.
23849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
23850 $as_echo_n "checking size of int... " >&6; }
23851 if ${ac_cv_sizeof_int+:} false; then :
23852   $as_echo_n "(cached) " >&6
23853 else
23854   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
23855
23856 else
23857   if test "$ac_cv_type_int" = yes; then
23858      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23859 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23860 as_fn_error 77 "cannot compute sizeof (int)
23861 See \`config.log' for more details" "$LINENO" 5; }
23862    else
23863      ac_cv_sizeof_int=0
23864    fi
23865 fi
23866
23867 fi
23868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
23869 $as_echo "$ac_cv_sizeof_int" >&6; }
23870
23871
23872
23873 cat >>confdefs.h <<_ACEOF
23874 #define SIZEOF_INT $ac_cv_sizeof_int
23875 _ACEOF
23876
23877
23878   # The cast to long int works around a bug in the HP C Compiler
23879 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23880 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23881 # This bug is HP SR number 8606223364.
23882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
23883 $as_echo_n "checking size of long... " >&6; }
23884 if ${ac_cv_sizeof_long+:} false; then :
23885   $as_echo_n "(cached) " >&6
23886 else
23887   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
23888
23889 else
23890   if test "$ac_cv_type_long" = yes; then
23891      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23892 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23893 as_fn_error 77 "cannot compute sizeof (long)
23894 See \`config.log' for more details" "$LINENO" 5; }
23895    else
23896      ac_cv_sizeof_long=0
23897    fi
23898 fi
23899
23900 fi
23901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
23902 $as_echo "$ac_cv_sizeof_long" >&6; }
23903
23904
23905
23906 cat >>confdefs.h <<_ACEOF
23907 #define SIZEOF_LONG $ac_cv_sizeof_long
23908 _ACEOF
23909
23910
23911   # The cast to long int works around a bug in the HP C Compiler
23912 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23913 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23914 # This bug is HP SR number 8606223364.
23915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
23916 $as_echo_n "checking size of short... " >&6; }
23917 if ${ac_cv_sizeof_short+:} false; then :
23918   $as_echo_n "(cached) " >&6
23919 else
23920   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
23921
23922 else
23923   if test "$ac_cv_type_short" = yes; then
23924      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23925 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23926 as_fn_error 77 "cannot compute sizeof (short)
23927 See \`config.log' for more details" "$LINENO" 5; }
23928    else
23929      ac_cv_sizeof_short=0
23930    fi
23931 fi
23932
23933 fi
23934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
23935 $as_echo "$ac_cv_sizeof_short" >&6; }
23936
23937
23938
23939 cat >>confdefs.h <<_ACEOF
23940 #define SIZEOF_SHORT $ac_cv_sizeof_short
23941 _ACEOF
23942
23943
23944
23945   # ------------
23946   # AC_CHECK_LIB
23947   # ------------
23948   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
23949 $as_echo_n "checking for pathfind in -lgen... " >&6; }
23950 if ${ac_cv_lib_gen_pathfind+:} false; then :
23951   $as_echo_n "(cached) " >&6
23952 else
23953   ac_check_lib_save_LIBS=$LIBS
23954 LIBS="-lgen  $LIBS"
23955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23956 /* end confdefs.h.  */
23957
23958 /* Override any GCC internal prototype to avoid an error.
23959    Use char because int might match the return type of a GCC
23960    builtin and then its argument prototype would still apply.  */
23961 #ifdef __cplusplus
23962 extern "C"
23963 #endif
23964 char pathfind ();
23965 int
23966 main ()
23967 {
23968 return pathfind ();
23969   ;
23970   return 0;
23971 }
23972 _ACEOF
23973 if ac_fn_c_try_link "$LINENO"; then :
23974   ac_cv_lib_gen_pathfind=yes
23975 else
23976   ac_cv_lib_gen_pathfind=no
23977 fi
23978 rm -f core conftest.err conftest.$ac_objext \
23979     conftest$ac_exeext conftest.$ac_ext
23980 LIBS=$ac_check_lib_save_LIBS
23981 fi
23982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
23983 $as_echo "$ac_cv_lib_gen_pathfind" >&6; }
23984 if test "x$ac_cv_lib_gen_pathfind" = xyes; then :
23985   cat >>confdefs.h <<_ACEOF
23986 #define HAVE_LIBGEN 1
23987 _ACEOF
23988
23989   LIBS="-lgen $LIBS"
23990
23991 fi
23992
23993   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
23994 $as_echo_n "checking for gettext in -lintl... " >&6; }
23995 if ${ac_cv_lib_intl_gettext+:} false; then :
23996   $as_echo_n "(cached) " >&6
23997 else
23998   ac_check_lib_save_LIBS=$LIBS
23999 LIBS="-lintl  $LIBS"
24000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24001 /* end confdefs.h.  */
24002
24003 /* Override any GCC internal prototype to avoid an error.
24004    Use char because int might match the return type of a GCC
24005    builtin and then its argument prototype would still apply.  */
24006 #ifdef __cplusplus
24007 extern "C"
24008 #endif
24009 char gettext ();
24010 int
24011 main ()
24012 {
24013 return gettext ();
24014   ;
24015   return 0;
24016 }
24017 _ACEOF
24018 if ac_fn_c_try_link "$LINENO"; then :
24019   ac_cv_lib_intl_gettext=yes
24020 else
24021   ac_cv_lib_intl_gettext=no
24022 fi
24023 rm -f core conftest.err conftest.$ac_objext \
24024     conftest$ac_exeext conftest.$ac_ext
24025 LIBS=$ac_check_lib_save_LIBS
24026 fi
24027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
24028 $as_echo "$ac_cv_lib_intl_gettext" >&6; }
24029 if test "x$ac_cv_lib_intl_gettext" = xyes; then :
24030   cat >>confdefs.h <<_ACEOF
24031 #define HAVE_LIBINTL 1
24032 _ACEOF
24033
24034   LIBS="-lintl $LIBS"
24035
24036 fi
24037
24038   for ac_func in vprintf
24039 do :
24040   ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
24041 if test "x$ac_cv_func_vprintf" = xyes; then :
24042   cat >>confdefs.h <<_ACEOF
24043 #define HAVE_VPRINTF 1
24044 _ACEOF
24045
24046 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
24047 if test "x$ac_cv_func__doprnt" = xyes; then :
24048
24049 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
24050
24051 fi
24052
24053 fi
24054 done
24055
24056
24057   for ac_header in vfork.h
24058 do :
24059   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
24060 if test "x$ac_cv_header_vfork_h" = xyes; then :
24061   cat >>confdefs.h <<_ACEOF
24062 #define HAVE_VFORK_H 1
24063 _ACEOF
24064
24065 fi
24066
24067 done
24068
24069 for ac_func in fork vfork
24070 do :
24071   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24072 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24073 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
24074   cat >>confdefs.h <<_ACEOF
24075 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24076 _ACEOF
24077
24078 fi
24079 done
24080
24081 if test "x$ac_cv_func_fork" = xyes; then
24082   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
24083 $as_echo_n "checking for working fork... " >&6; }
24084 if ${ac_cv_func_fork_works+:} false; then :
24085   $as_echo_n "(cached) " >&6
24086 else
24087   if test "$cross_compiling" = yes; then :
24088   ac_cv_func_fork_works=cross
24089 else
24090   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24091 /* end confdefs.h.  */
24092 $ac_includes_default
24093 int
24094 main ()
24095 {
24096
24097           /* By Ruediger Kuhlmann. */
24098           return fork () < 0;
24099
24100   ;
24101   return 0;
24102 }
24103 _ACEOF
24104 if ac_fn_c_try_run "$LINENO"; then :
24105   ac_cv_func_fork_works=yes
24106 else
24107   ac_cv_func_fork_works=no
24108 fi
24109 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24110   conftest.$ac_objext conftest.beam conftest.$ac_ext
24111 fi
24112
24113 fi
24114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
24115 $as_echo "$ac_cv_func_fork_works" >&6; }
24116
24117 else
24118   ac_cv_func_fork_works=$ac_cv_func_fork
24119 fi
24120 if test "x$ac_cv_func_fork_works" = xcross; then
24121   case $host in
24122     *-*-amigaos* | *-*-msdosdjgpp*)
24123       # Override, as these systems have only a dummy fork() stub
24124       ac_cv_func_fork_works=no
24125       ;;
24126     *)
24127       ac_cv_func_fork_works=yes
24128       ;;
24129   esac
24130   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
24131 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
24132 fi
24133 ac_cv_func_vfork_works=$ac_cv_func_vfork
24134 if test "x$ac_cv_func_vfork" = xyes; then
24135   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
24136 $as_echo_n "checking for working vfork... " >&6; }
24137 if ${ac_cv_func_vfork_works+:} false; then :
24138   $as_echo_n "(cached) " >&6
24139 else
24140   if test "$cross_compiling" = yes; then :
24141   ac_cv_func_vfork_works=cross
24142 else
24143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24144 /* end confdefs.h.  */
24145 /* Thanks to Paul Eggert for this test.  */
24146 $ac_includes_default
24147 #include <sys/wait.h>
24148 #ifdef HAVE_VFORK_H
24149 # include <vfork.h>
24150 #endif
24151 /* On some sparc systems, changes by the child to local and incoming
24152    argument registers are propagated back to the parent.  The compiler
24153    is told about this with #include <vfork.h>, but some compilers
24154    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24155    static variable whose address is put into a register that is
24156    clobbered by the vfork.  */
24157 static void
24158 #ifdef __cplusplus
24159 sparc_address_test (int arg)
24160 # else
24161 sparc_address_test (arg) int arg;
24162 #endif
24163 {
24164   static pid_t child;
24165   if (!child) {
24166     child = vfork ();
24167     if (child < 0) {
24168       perror ("vfork");
24169       _exit(2);
24170     }
24171     if (!child) {
24172       arg = getpid();
24173       write(-1, "", 0);
24174       _exit (arg);
24175     }
24176   }
24177 }
24178
24179 int
24180 main ()
24181 {
24182   pid_t parent = getpid ();
24183   pid_t child;
24184
24185   sparc_address_test (0);
24186
24187   child = vfork ();
24188
24189   if (child == 0) {
24190     /* Here is another test for sparc vfork register problems.  This
24191        test uses lots of local variables, at least as many local
24192        variables as main has allocated so far including compiler
24193        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24194        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24195        reuse the register of parent for one of the local variables,
24196        since it will think that parent can't possibly be used any more
24197        in this routine.  Assigning to the local variable will thus
24198        munge parent in the parent process.  */
24199     pid_t
24200       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24201       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24202     /* Convince the compiler that p..p7 are live; otherwise, it might
24203        use the same hardware register for all 8 local variables.  */
24204     if (p != p1 || p != p2 || p != p3 || p != p4
24205         || p != p5 || p != p6 || p != p7)
24206       _exit(1);
24207
24208     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24209        from child file descriptors.  If the child closes a descriptor
24210        before it execs or exits, this munges the parent's descriptor
24211        as well.  Test for this by closing stdout in the child.  */
24212     _exit(close(fileno(stdout)) != 0);
24213   } else {
24214     int status;
24215     struct stat st;
24216
24217     while (wait(&status) != child)
24218       ;
24219     return (
24220          /* Was there some problem with vforking?  */
24221          child < 0
24222
24223          /* Did the child fail?  (This shouldn't happen.)  */
24224          || status
24225
24226          /* Did the vfork/compiler bug occur?  */
24227          || parent != getpid()
24228
24229          /* Did the file descriptor bug occur?  */
24230          || fstat(fileno(stdout), &st) != 0
24231          );
24232   }
24233 }
24234 _ACEOF
24235 if ac_fn_c_try_run "$LINENO"; then :
24236   ac_cv_func_vfork_works=yes
24237 else
24238   ac_cv_func_vfork_works=no
24239 fi
24240 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24241   conftest.$ac_objext conftest.beam conftest.$ac_ext
24242 fi
24243
24244 fi
24245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
24246 $as_echo "$ac_cv_func_vfork_works" >&6; }
24247
24248 fi;
24249 if test "x$ac_cv_func_fork_works" = xcross; then
24250   ac_cv_func_vfork_works=$ac_cv_func_vfork
24251   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
24252 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
24253 fi
24254
24255 if test "x$ac_cv_func_vfork_works" = xyes; then
24256
24257 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
24258
24259 else
24260
24261 $as_echo "#define vfork fork" >>confdefs.h
24262
24263 fi
24264 if test "x$ac_cv_func_fork_works" = xyes; then
24265
24266 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
24267
24268 fi
24269
24270   for ac_func in mmap canonicalize_file_name snprintf strdup strchr \
24271                  strrchr strsignal fchmod fstat chmod
24272 do :
24273   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24274 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24275 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
24276   cat >>confdefs.h <<_ACEOF
24277 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24278 _ACEOF
24279
24280 fi
24281 done
24282
24283   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
24284 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
24285 if ${ac_cv_path_SED+:} false; then :
24286   $as_echo_n "(cached) " >&6
24287 else
24288             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
24289      for ac_i in 1 2 3 4 5 6 7; do
24290        ac_script="$ac_script$as_nl$ac_script"
24291      done
24292      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
24293      { ac_script=; unset ac_script;}
24294      if test -z "$SED"; then
24295   ac_path_SED_found=false
24296   # Loop through the user's path and test for each of PROGNAME-LIST
24297   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24298 for as_dir in $PATH
24299 do
24300   IFS=$as_save_IFS
24301   test -z "$as_dir" && as_dir=.
24302     for ac_prog in sed gsed; do
24303     for ac_exec_ext in '' $ac_executable_extensions; do
24304       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
24305       as_fn_executable_p "$ac_path_SED" || continue
24306 # Check for GNU ac_path_SED and select it if it is found.
24307   # Check for GNU $ac_path_SED
24308 case `"$ac_path_SED" --version 2>&1` in
24309 *GNU*)
24310   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
24311 *)
24312   ac_count=0
24313   $as_echo_n 0123456789 >"conftest.in"
24314   while :
24315   do
24316     cat "conftest.in" "conftest.in" >"conftest.tmp"
24317     mv "conftest.tmp" "conftest.in"
24318     cp "conftest.in" "conftest.nl"
24319     $as_echo '' >> "conftest.nl"
24320     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
24321     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
24322     as_fn_arith $ac_count + 1 && ac_count=$as_val
24323     if test $ac_count -gt ${ac_path_SED_max-0}; then
24324       # Best one so far, save it but keep looking for a better one
24325       ac_cv_path_SED="$ac_path_SED"
24326       ac_path_SED_max=$ac_count
24327     fi
24328     # 10*(2^10) chars as input seems more than enough
24329     test $ac_count -gt 10 && break
24330   done
24331   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
24332 esac
24333
24334       $ac_path_SED_found && break 3
24335     done
24336   done
24337   done
24338 IFS=$as_save_IFS
24339   if test -z "$ac_cv_path_SED"; then
24340     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
24341   fi
24342 else
24343   ac_cv_path_SED=$SED
24344 fi
24345
24346 fi
24347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
24348 $as_echo "$ac_cv_path_SED" >&6; }
24349  SED="$ac_cv_path_SED"
24350   rm -f conftest.sed
24351
24352   while :
24353   do
24354       POSIX_SHELL=`which bash`
24355       test -x "$POSIX_SHELL" && break
24356       POSIX_SHELL=`which dash`
24357       test -x "$POSIX_SHELL" && break
24358       POSIX_SHELL=/usr/xpg4/bin/sh
24359       test -x "$POSIX_SHELL" && break
24360       POSIX_SHELL=`/bin/sh -c '
24361           exec 2>/dev/null
24362           if ! true ; then exit 1 ; fi
24363           echo /bin/sh'`
24364       test -x "$POSIX_SHELL" && break
24365       as_fn_error $? "cannot locate a working POSIX shell" "$LINENO" 5
24366   done
24367
24368 cat >>confdefs.h <<_ACEOF
24369 #define POSIX_SHELL "${POSIX_SHELL}"
24370 _ACEOF
24371
24372
24373
24374
24375
24376   LIBOPTS_BUILD_BLOCKED=''
24377
24378
24379   NEED_LIBOPTS_DIR=''
24380
24381   # Check whether --enable-local-libopts was given.
24382 if test "${enable_local_libopts+set}" = set; then :
24383   enableval=$enable_local_libopts;
24384     if test x$enableval = xyes ; then
24385        { $as_echo "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
24386 $as_echo "$as_me: Using supplied libopts tearoff" >&6;}
24387        LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
24388        NEED_LIBOPTS_DIR=true
24389        LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
24390     fi
24391 fi
24392
24393
24394   # Check whether --enable-libopts-install was given.
24395 if test "${enable_libopts_install+set}" = set; then :
24396   enableval=$enable_libopts_install;
24397 fi
24398
24399    if test "X${enable_libopts_install}" = Xyes; then
24400   INSTALL_LIBOPTS_TRUE=
24401   INSTALL_LIBOPTS_FALSE='#'
24402 else
24403   INSTALL_LIBOPTS_TRUE='#'
24404   INSTALL_LIBOPTS_FALSE=
24405 fi
24406
24407
24408   if test -z "${NEED_LIBOPTS_DIR}" ; then
24409      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
24410 $as_echo_n "checking whether autoopts-config can be found... " >&6; }
24411
24412 # Check whether --with-autoopts-config was given.
24413 if test "${with_autoopts_config+set}" = set; then :
24414   withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
24415 else
24416   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
24417 $as_echo_n "checking whether autoopts-config is specified... " >&6; }
24418 if ${lo_cv_with_autoopts_config+:} false; then :
24419   $as_echo_n "(cached) " >&6
24420 else
24421   if autoopts-config --help 2>/dev/null 1>&2
24422         then lo_cv_with_autoopts_config=autoopts-config
24423         elif libopts-config --help 2>/dev/null 1>&2
24424         then lo_cv_with_autoopts_config=libopts-config
24425         else lo_cv_with_autoopts_config=no ; fi
24426 fi
24427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
24428 $as_echo "$lo_cv_with_autoopts_config" >&6; }
24429
24430 fi
24431  # end of AC_ARG_WITH
24432
24433      if ${lo_cv_test_autoopts+:} false; then :
24434   $as_echo_n "(cached) " >&6
24435 else
24436
24437         if test -z "${lo_cv_with_autoopts_config}" \
24438                 -o X"${lo_cv_with_autoopts_config}" = Xno
24439         then
24440            if autoopts-config --help 2>/dev/null 1>&2
24441            then lo_cv_with_autoopts_config=autoopts-config
24442            elif libopts-config --help 2>/dev/null 1>&2
24443            then lo_cv_with_autoopts_config=libopts-config
24444            else lo_cv_with_autoopts_config=false ; fi
24445         fi
24446         lo_cv_test_autoopts=`
24447             ${lo_cv_with_autoopts_config} --libs` 2> /dev/null
24448         if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"
24449         then lo_cv_test_autoopts=no ; fi
24450
24451 fi
24452  # end of CACHE_VAL
24453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
24454 $as_echo "${lo_cv_test_autoopts}" >&6; }
24455
24456      if test "X${lo_cv_test_autoopts}" != Xno
24457      then
24458         LIBOPTS_LDADD="${lo_cv_test_autoopts}"
24459         LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
24460      else
24461         LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
24462         LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
24463         NEED_LIBOPTS_DIR=true
24464      fi
24465   fi # end of if test -z "${NEED_LIBOPTS_DIR}"
24466   if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
24467     NEED_LIBOPTS_DIR=''
24468   fi
24469    if test -n "${NEED_LIBOPTS_DIR}"; then
24470   NEED_LIBOPTS_TRUE=
24471   NEED_LIBOPTS_FALSE='#'
24472 else
24473   NEED_LIBOPTS_TRUE='#'
24474   NEED_LIBOPTS_FALSE=
24475 fi
24476
24477
24478
24479   LIBOPTS_DIR=libopts
24480
24481
24482 # end of AC_DEFUN of LIBOPTS_CHECK_COMMON
24483
24484
24485     if test -z "$NEED_LIBOPTS_TRUE"; then :
24486
24487
24488
24489   # Check to see if a reg expr header is specified.
24490
24491
24492 # Check whether --with-regex-header was given.
24493 if test "${with_regex_header+set}" = set; then :
24494   withval=$with_regex_header; libopts_cv_with_regex_header=${with_regex_header}
24495 else
24496   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a reg expr header is specified" >&5
24497 $as_echo_n "checking whether a reg expr header is specified... " >&6; }
24498 if ${libopts_cv_with_regex_header+:} false; then :
24499   $as_echo_n "(cached) " >&6
24500 else
24501   libopts_cv_with_regex_header=no
24502 fi
24503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_regex_header" >&5
24504 $as_echo "$libopts_cv_with_regex_header" >&6; }
24505
24506 fi
24507  # end of AC_ARG_WITH
24508   if test "X${libopts_cv_with_regex_header}" != Xno
24509   then
24510     cat >>confdefs.h <<_ACEOF
24511 #define REGEX_HEADER <${libopts_cv_with_regex_header}>
24512 _ACEOF
24513
24514   else
24515
24516 $as_echo "#define REGEX_HEADER <regex.h>" >>confdefs.h
24517
24518   fi
24519
24520
24521
24522   # Check to see if a working libregex can be found.
24523
24524
24525 # Check whether --with-libregex was given.
24526 if test "${with_libregex+set}" = set; then :
24527   withval=$with_libregex; libopts_cv_with_libregex_root=${with_libregex}
24528 else
24529   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex was specified" >&5
24530 $as_echo_n "checking whether with-libregex was specified... " >&6; }
24531 if ${libopts_cv_with_libregex_root+:} false; then :
24532   $as_echo_n "(cached) " >&6
24533 else
24534   libopts_cv_with_libregex_root=no
24535 fi
24536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_root" >&5
24537 $as_echo "$libopts_cv_with_libregex_root" >&6; }
24538
24539 fi
24540  # end of AC_ARG_WITH libregex
24541
24542   if test "${with_libregex+set}" = set && \
24543      test "X${withval}" = Xno
24544   then ## disabled by request
24545     libopts_cv_with_libregex_root=no
24546     libopts_cv_with_libregex_cflags=no
24547     libopts_cv_with_libregex_libs=no
24548   else
24549
24550
24551 # Check whether --with-libregex-cflags was given.
24552 if test "${with_libregex_cflags+set}" = set; then :
24553   withval=$with_libregex_cflags; libopts_cv_with_libregex_cflags=${with_libregex_cflags}
24554 else
24555   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-cflags was specified" >&5
24556 $as_echo_n "checking whether with-libregex-cflags was specified... " >&6; }
24557 if ${libopts_cv_with_libregex_cflags+:} false; then :
24558   $as_echo_n "(cached) " >&6
24559 else
24560   libopts_cv_with_libregex_cflags=no
24561 fi
24562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_cflags" >&5
24563 $as_echo "$libopts_cv_with_libregex_cflags" >&6; }
24564
24565 fi
24566  # end of AC_ARG_WITH libregex-cflags
24567
24568
24569 # Check whether --with-libregex-libs was given.
24570 if test "${with_libregex_libs+set}" = set; then :
24571   withval=$with_libregex_libs; libopts_cv_with_libregex_libs=${with_libregex_libs}
24572 else
24573   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-libs was specified" >&5
24574 $as_echo_n "checking whether with-libregex-libs was specified... " >&6; }
24575 if ${libopts_cv_with_libregex_libs+:} false; then :
24576   $as_echo_n "(cached) " >&6
24577 else
24578   libopts_cv_with_libregex_libs=no
24579 fi
24580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_libs" >&5
24581 $as_echo "$libopts_cv_with_libregex_libs" >&6; }
24582
24583 fi
24584  # end of AC_ARG_WITH libregex-libs
24585
24586   case "X${libopts_cv_with_libregex_cflags}" in
24587   Xyes|Xno|X )
24588     case "X${libopts_cv_with_libregex_root}" in
24589     Xyes|Xno|X ) libopts_cv_with_libregex_cflags=no ;;
24590     * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;;
24591     esac
24592   esac
24593   case "X${libopts_cv_with_libregex_libs}" in
24594   Xyes|Xno|X )
24595     case "X${libopts_cv_with_libregex_root}" in
24596     Xyes|Xno|X ) libopts_cv_with_libregex_libs=no ;;
24597     * )        libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex" ;;
24598     esac
24599   esac
24600   libopts_save_CPPFLAGS="${CPPFLAGS}"
24601   libopts_save_LIBS="${LIBS}"
24602   case "X${libopts_cv_with_libregex_cflags}" in
24603   Xyes|Xno|X )
24604     libopts_cv_with_libregex_cflags="" ;;
24605   * ) CPPFLAGS="${CPPFLAGS} ${libopts_cv_with_libregex_cflags}" ;;
24606   esac
24607   case "X${libopts_cv_with_libregex_libs}" in
24608   Xyes|Xno|X )
24609     libopts_cv_with_libregex_libs="" ;;
24610   * )
24611     LIBS="${LIBS} ${libopts_cv_with_libregex_libs}" ;;
24612   esac
24613   LIBREGEX_CFLAGS=""
24614   LIBREGEX_LIBS=""
24615   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libregex functions properly" >&5
24616 $as_echo_n "checking whether libregex functions properly... " >&6; }
24617   if ${libopts_cv_with_libregex+:} false; then :
24618   $as_echo_n "(cached) " >&6
24619 else
24620
24621   if test "$cross_compiling" = yes; then :
24622   libopts_cv_with_libregex=no
24623 else
24624   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24625 /* end confdefs.h.  */
24626 #include <stdio.h>
24627 #include <stdlib.h>
24628 #include <sys/types.h>
24629 #include REGEX_HEADER
24630 static regex_t re;
24631 void comp_re(char const * pzPat) {
24632   int res = regcomp( &re, pzPat, REG_EXTENDED|REG_ICASE|REG_NEWLINE );
24633   if (res == 0) return;
24634   exit( res ); }
24635 int main() {
24636   regmatch_t m[2];
24637   comp_re( "^.*\$"   );
24638   comp_re( "()|no.*" );
24639   comp_re( "."       );
24640   if (regexec( &re, "X", 2, m, 0 ) != 0)  return 1;
24641   if ((m[0].rm_so != 0) || (m[0].rm_eo != 1)) {
24642     fputs( "error: regex -->.<-- did not match\n", stderr );
24643     return 1;
24644   }
24645   return 0; }
24646 _ACEOF
24647 if ac_fn_c_try_run "$LINENO"; then :
24648   libopts_cv_with_libregex=yes
24649 else
24650   libopts_cv_with_libregex=no
24651 fi
24652 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24653   conftest.$ac_objext conftest.beam conftest.$ac_ext
24654 fi
24655  # end of AC_RUN_IFELSE
24656
24657 fi
24658  # end of AC_CACHE_VAL for libopts_cv_with_libregex
24659   fi ## disabled by request
24660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_with_libregex}" >&5
24661 $as_echo "${libopts_cv_with_libregex}" >&6; }
24662   if test "X${libopts_cv_with_libregex}" != Xno
24663   then
24664
24665 $as_echo "#define WITH_LIBREGEX 1" >>confdefs.h
24666
24667   else
24668     CPPFLAGS="${libopts_save_CPPFLAGS}"
24669     LIBS="${libopts_save_LIBS}"
24670     libopts_cv_with_libregex_root=no
24671 libopts_cv_with_libregex_cflags=no
24672 libopts_cv_with_libregex_libs=no
24673 libopts_cv_with_libregex=no
24674   fi
24675
24676
24677
24678   # Check to see if pathfind(3) works.
24679
24680   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pathfind(3) works" >&5
24681 $as_echo_n "checking whether pathfind(3) works... " >&6; }
24682   if ${libopts_cv_run_pathfind+:} false; then :
24683   $as_echo_n "(cached) " >&6
24684 else
24685
24686   if test "$cross_compiling" = yes; then :
24687   libopts_cv_run_pathfind=no
24688
24689 else
24690   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24691 /* end confdefs.h.  */
24692 #include <string.h>
24693 #include <stdlib.h>
24694 int main (int argc, char ** argv) {
24695    char * pz = pathfind( getenv( "PATH" ), "sh", "x" );
24696    return (pz == 0) ? 1 : 0;
24697 }
24698 _ACEOF
24699 if ac_fn_c_try_run "$LINENO"; then :
24700   libopts_cv_run_pathfind=yes
24701 else
24702   libopts_cv_run_pathfind=no
24703 fi
24704 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24705   conftest.$ac_objext conftest.beam conftest.$ac_ext
24706 fi
24707  # end of RUN_IFELSE
24708
24709 fi
24710  # end of AC_CACHE_VAL for libopts_cv_run_pathfind
24711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_pathfind}" >&5
24712 $as_echo "${libopts_cv_run_pathfind}" >&6; }
24713   if test "X${libopts_cv_run_pathfind}" != Xno
24714   then
24715
24716 $as_echo "#define HAVE_PATHFIND 1" >>confdefs.h
24717
24718   fi
24719
24720
24721
24722   # Check to see if /dev/zero is readable device.
24723
24724   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/zero is readable device" >&5
24725 $as_echo_n "checking whether /dev/zero is readable device... " >&6; }
24726   if ${libopts_cv_test_dev_zero+:} false; then :
24727   $as_echo_n "(cached) " >&6
24728 else
24729
24730     libopts_cv_test_dev_zero=`exec 2> /dev/null
24731 dzero=\`ls -lL /dev/zero | egrep ^c......r\`
24732 test -z "${dzero}" && exit 1
24733 echo ${dzero}`
24734     if test $? -ne 0 || test -z "$libopts_cv_test_dev_zero"
24735     then libopts_cv_test_dev_zero=no
24736     fi
24737
24738 fi
24739  # end of CACHE_VAL of libopts_cv_test_dev_zero
24740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_test_dev_zero}" >&5
24741 $as_echo "${libopts_cv_test_dev_zero}" >&6; }
24742   if test "X${libopts_cv_test_dev_zero}" != Xno
24743   then
24744
24745 $as_echo "#define HAVE_DEV_ZERO 1" >>confdefs.h
24746
24747   fi
24748
24749
24750
24751   # Check to see if we have a functional realpath(3C).
24752
24753   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a functional realpath(3C)" >&5
24754 $as_echo_n "checking whether we have a functional realpath(3C)... " >&6; }
24755   if ${libopts_cv_run_realpath+:} false; then :
24756   $as_echo_n "(cached) " >&6
24757 else
24758
24759   if test "$cross_compiling" = yes; then :
24760   libopts_cv_run_realpath=no
24761
24762 else
24763   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24764 /* end confdefs.h.  */
24765 #include <limits.h>
24766 #include <stdlib.h>
24767 int main (int argc, char ** argv) {
24768 #ifndef PATH_MAX
24769 choke me!!
24770 #else
24771    char zPath[PATH_MAX+1];
24772 #endif
24773    char *pz = realpath(argv[0], zPath);
24774    return (pz == zPath) ? 0 : 1;
24775 }
24776 _ACEOF
24777 if ac_fn_c_try_run "$LINENO"; then :
24778   libopts_cv_run_realpath=yes
24779 else
24780   libopts_cv_run_realpath=no
24781 fi
24782 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24783   conftest.$ac_objext conftest.beam conftest.$ac_ext
24784 fi
24785  # end of RUN_IFELSE
24786
24787 fi
24788  # end of AC_CACHE_VAL for libopts_cv_run_realpath
24789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_realpath}" >&5
24790 $as_echo "${libopts_cv_run_realpath}" >&6; }
24791   if test "X${libopts_cv_run_realpath}" != Xno
24792   then
24793
24794 $as_echo "#define HAVE_REALPATH 1" >>confdefs.h
24795
24796   fi
24797
24798
24799
24800   # Check to see if strftime() works.
24801
24802   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strftime() works" >&5
24803 $as_echo_n "checking whether strftime() works... " >&6; }
24804   if ${libopts_cv_run_strftime+:} false; then :
24805   $as_echo_n "(cached) " >&6
24806 else
24807
24808   if test "$cross_compiling" = yes; then :
24809   libopts_cv_run_strftime=no
24810
24811 else
24812   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24813 /* end confdefs.h.  */
24814 #include <time.h>
24815 #include <string.h>
24816 char t_buf[ 64 ];
24817 int main() {
24818   static char const z[] = "Thursday Aug 28 240";
24819   struct tm tm;
24820   tm.tm_sec   = 36;  /* seconds after the minute [0, 61]  */
24821   tm.tm_min   = 44;  /* minutes after the hour [0, 59] */
24822   tm.tm_hour  = 12;  /* hour since midnight [0, 23] */
24823   tm.tm_mday  = 28;  /* day of the month [1, 31] */
24824   tm.tm_mon   =  7;  /* months since January [0, 11] */
24825   tm.tm_year  = 86;  /* years since 1900 */
24826   tm.tm_wday  =  4;  /* days since Sunday [0, 6] */
24827   tm.tm_yday  = 239; /* days since January 1 [0, 365] */
24828   tm.tm_isdst =  1;  /* flag for daylight savings time */
24829   strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
24830   return (strcmp( t_buf, z ) != 0); }
24831 _ACEOF
24832 if ac_fn_c_try_run "$LINENO"; then :
24833   libopts_cv_run_strftime=yes
24834 else
24835   libopts_cv_run_strftime=no
24836 fi
24837 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24838   conftest.$ac_objext conftest.beam conftest.$ac_ext
24839 fi
24840  # end of RUN_IFELSE
24841
24842 fi
24843  # end of AC_CACHE_VAL for libopts_cv_run_strftime
24844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_strftime}" >&5
24845 $as_echo "${libopts_cv_run_strftime}" >&6; }
24846   if test "X${libopts_cv_run_strftime}" != Xno
24847   then
24848
24849 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
24850
24851   fi
24852
24853
24854
24855   # Check to see if fopen accepts "b" mode.
24856
24857   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"b\" mode" >&5
24858 $as_echo_n "checking whether fopen accepts \"b\" mode... " >&6; }
24859   if ${libopts_cv_run_fopen_binary+:} false; then :
24860   $as_echo_n "(cached) " >&6
24861 else
24862
24863   if test "$cross_compiling" = yes; then :
24864   libopts_cv_run_fopen_binary=no
24865
24866 else
24867   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24868 /* end confdefs.h.  */
24869 #include <stdio.h>
24870 int main (int argc, char ** argv) {
24871 FILE * fp = fopen("conftest.$ac_ext", "rb");
24872 return (fp == NULL) ? 1 : fclose(fp); }
24873 _ACEOF
24874 if ac_fn_c_try_run "$LINENO"; then :
24875   libopts_cv_run_fopen_binary=yes
24876 else
24877   libopts_cv_run_fopen_binary=no
24878 fi
24879 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24880   conftest.$ac_objext conftest.beam conftest.$ac_ext
24881 fi
24882  # end of RUN_IFELSE
24883
24884 fi
24885  # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
24886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_binary}" >&5
24887 $as_echo "${libopts_cv_run_fopen_binary}" >&6; }
24888   if test "X${libopts_cv_run_fopen_binary}" != Xno
24889   then
24890
24891 $as_echo "#define FOPEN_BINARY_FLAG \"b\"" >>confdefs.h
24892
24893   else
24894
24895 $as_echo "#define FOPEN_BINARY_FLAG \"\"" >>confdefs.h
24896
24897   fi
24898
24899
24900
24901   # Check to see if fopen accepts "t" mode.
24902
24903   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"t\" mode" >&5
24904 $as_echo_n "checking whether fopen accepts \"t\" mode... " >&6; }
24905   if ${libopts_cv_run_fopen_text+:} false; then :
24906   $as_echo_n "(cached) " >&6
24907 else
24908
24909   if test "$cross_compiling" = yes; then :
24910   libopts_cv_run_fopen_text=no
24911
24912 else
24913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24914 /* end confdefs.h.  */
24915 #include <stdio.h>
24916 int main (int argc, char ** argv) {
24917 FILE * fp = fopen("conftest.$ac_ext", "rt");
24918 return (fp == NULL) ? 1 : fclose(fp); }
24919 _ACEOF
24920 if ac_fn_c_try_run "$LINENO"; then :
24921   libopts_cv_run_fopen_text=yes
24922 else
24923   libopts_cv_run_fopen_text=no
24924 fi
24925 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24926   conftest.$ac_objext conftest.beam conftest.$ac_ext
24927 fi
24928  # end of RUN_IFELSE
24929
24930 fi
24931  # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
24932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_text}" >&5
24933 $as_echo "${libopts_cv_run_fopen_text}" >&6; }
24934   if test "X${libopts_cv_run_fopen_text}" != Xno
24935   then
24936
24937 $as_echo "#define FOPEN_TEXT_FLAG \"t\"" >>confdefs.h
24938
24939   else
24940
24941 $as_echo "#define FOPEN_TEXT_FLAG \"\"" >>confdefs.h
24942
24943   fi
24944
24945
24946
24947   # Check to see if not wanting optional option args.
24948
24949   # Check whether --enable-optional-args was given.
24950 if test "${enable_optional_args+set}" = set; then :
24951   enableval=$enable_optional_args; libopts_cv_enable_optional_args=${enable_optional_args}
24952 else
24953   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether not wanting optional option args" >&5
24954 $as_echo_n "checking whether not wanting optional option args... " >&6; }
24955 if ${libopts_cv_enable_optional_args+:} false; then :
24956   $as_echo_n "(cached) " >&6
24957 else
24958   libopts_cv_enable_optional_args=yes
24959 fi
24960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_enable_optional_args" >&5
24961 $as_echo "$libopts_cv_enable_optional_args" >&6; }
24962
24963 fi
24964  # end of AC_ARG_ENABLE
24965   if test "X${libopts_cv_enable_optional_args}" = Xno
24966   then
24967
24968 $as_echo "#define NO_OPTIONAL_OPT_ARGS 1" >>confdefs.h
24969
24970   fi
24971
24972
24973
24974
24975
24976           fi
24977   ac_config_files="$ac_config_files libopts/Makefile"
24978
24979   # end of AC_DEFUN of LIBOPTS_CHECK
24980
24981
24982 # From when we only used libevent for sntp:
24983 #AM_COND_IF(
24984 #    [BUILD_SNTP],
24985 #    [NTP_LIBEVENT_CHECK],
24986 #    [NTP_LIBEVENT_CHECK_NOBUILD]
24987 #)
24988
24989
24990
24991 ntp_pkgconfig_min_version='0.15.0'
24992 if test -n "$ac_tool_prefix"; then
24993   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24994 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24996 $as_echo_n "checking for $ac_word... " >&6; }
24997 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24998   $as_echo_n "(cached) " >&6
24999 else
25000   case $PKG_CONFIG in
25001   [\\/]* | ?:[\\/]*)
25002   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
25003   ;;
25004   *)
25005   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25006 for as_dir in $PATH
25007 do
25008   IFS=$as_save_IFS
25009   test -z "$as_dir" && as_dir=.
25010     for ac_exec_ext in '' $ac_executable_extensions; do
25011   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25012     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
25013     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25014     break 2
25015   fi
25016 done
25017   done
25018 IFS=$as_save_IFS
25019
25020   ;;
25021 esac
25022 fi
25023 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
25024 if test -n "$PKG_CONFIG"; then
25025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
25026 $as_echo "$PKG_CONFIG" >&6; }
25027 else
25028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25029 $as_echo "no" >&6; }
25030 fi
25031
25032
25033 fi
25034 if test -z "$ac_cv_path_PKG_CONFIG"; then
25035   ac_pt_PKG_CONFIG=$PKG_CONFIG
25036   # Extract the first word of "pkg-config", so it can be a program name with args.
25037 set dummy pkg-config; ac_word=$2
25038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25039 $as_echo_n "checking for $ac_word... " >&6; }
25040 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
25041   $as_echo_n "(cached) " >&6
25042 else
25043   case $ac_pt_PKG_CONFIG in
25044   [\\/]* | ?:[\\/]*)
25045   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
25046   ;;
25047   *)
25048   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25049 for as_dir in $PATH
25050 do
25051   IFS=$as_save_IFS
25052   test -z "$as_dir" && as_dir=.
25053     for ac_exec_ext in '' $ac_executable_extensions; do
25054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25055     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
25056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25057     break 2
25058   fi
25059 done
25060   done
25061 IFS=$as_save_IFS
25062
25063   ;;
25064 esac
25065 fi
25066 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
25067 if test -n "$ac_pt_PKG_CONFIG"; then
25068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
25069 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
25070 else
25071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25072 $as_echo "no" >&6; }
25073 fi
25074
25075   if test "x$ac_pt_PKG_CONFIG" = x; then
25076     PKG_CONFIG=""
25077   else
25078     case $cross_compiling:$ac_tool_warned in
25079 yes:)
25080 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25081 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25082 ac_tool_warned=yes ;;
25083 esac
25084     PKG_CONFIG=$ac_pt_PKG_CONFIG
25085   fi
25086 else
25087   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
25088 fi
25089
25090 { ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
25091 { ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
25092
25093 case "$PKG_CONFIG" in
25094  /*)
25095     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
25096 $as_echo_n "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
25097     if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
25098         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25099 $as_echo "yes" >&6; }
25100     else
25101         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25102 $as_echo "no" >&6; }
25103         PKG_CONFIG=""
25104     fi
25105     ;;
25106 esac
25107
25108
25109
25110
25111 # Check whether --enable-local-libevent was given.
25112 if test "${enable_local_libevent+set}" = set; then :
25113   enableval=$enable_local_libevent; ntp_use_local_libevent=$enableval
25114 else
25115   ntp_use_local_libevent=${ntp_use_local_libevent-detect}
25116
25117 fi
25118
25119
25120
25121
25122
25123
25124
25125
25126
25127
25128 ntp_libevent_min_version=2
25129 ntp_libevent_tearoff=libevent
25130
25131
25132
25133
25134
25135 case "$ntp_use_local_libevent" in
25136  yes)
25137     ;;
25138  *) # If we have (a good enough) pkg-config, see if it can find libevent
25139     case "$PKG_CONFIG" in
25140      /*)
25141         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
25142 $as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
25143         if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
25144         then
25145             ntp_use_local_libevent=no
25146             { $as_echo "$as_me:${as_lineno-$LINENO}: Using the installed libevent" >&5
25147 $as_echo "$as_me: Using the installed libevent" >&6;}
25148             CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
25149             CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
25150             # HMS: I hope the following is accurate.
25151             # We don't need -levent, we only need  -levent_core.
25152             # While we could grab only the -L stuff, there *might* be
25153             # other flags there we want.  Originally we just removed -levent
25154             # but then somebody decided to install -levent-2.0
25155             # LDADD_LIBEVENT=`$PKG_CONFIG --libs libevent | sed 's:-levent::'`
25156             # So now we dance...
25157             LDADD_LIBEVENT=
25158             for i in `$PKG_CONFIG --libs libevent`
25159             do
25160                 case "$i" in
25161                  -levent*) ;;
25162                  *) case "$LDADD_LIBEVENT" in
25163                      '') LDADD_LIBEVENT="$i" ;;
25164                      *) LDADD_LIBEVENT="$LDADD_LIBEVENT $i" ;;
25165                     esac
25166                     ;;
25167                 esac
25168             done
25169             case "$LIBISC_PTHREADS_NOTHREADS" in
25170              pthreads)
25171                 LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads"
25172             esac
25173             LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core"
25174             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25175 $as_echo "yes" >&6; }
25176         else
25177             ntp_use_local_libevent=yes
25178             # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
25179             # is "pthreads"?
25180             CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
25181             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25182 $as_echo "no" >&6; }
25183         fi
25184         ;;
25185      *)
25186         ntp_use_local_libevent=yes
25187         ;;
25188     esac
25189     ;;
25190 esac
25191
25192 case "$ntp_use_local_libevent" in
25193  yes)
25194     { $as_echo "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
25195 $as_echo "$as_me: Using libevent tearoff" >&6;}
25196     CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
25197     case "$LIBISC_PTHREADS_NOTHREADS" in
25198      pthreads)
25199         LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_pthreads.la \$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
25200         ;;
25201      *)
25202         LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
25203     esac
25204 esac
25205
25206
25207  if test "x$ntp_use_local_libevent" = "xyes"; then
25208   BUILD_LIBEVENT_TRUE=
25209   BUILD_LIBEVENT_FALSE='#'
25210 else
25211   BUILD_LIBEVENT_TRUE='#'
25212   BUILD_LIBEVENT_FALSE=
25213 fi
25214
25215
25216
25217
25218 case "$ntp_libevent_tearoff" in
25219  libevent)
25220     ;;
25221  *)
25222     as_fn_error $? "ntp_libevent.m4 dir must be libevent, not $ntp_libevent_tearoff" "$LINENO" 5
25223     ;;
25224 esac
25225
25226 case "$ntp_use_local_libevent" in
25227  yes)
25228                         ac_configure_args=" --disable-openssl${ac_configure_args}"
25229     ac_configure_args=" --disable-shared${ac_configure_args}"
25230     ac_configure_args=" --disable-libevent-regress${ac_configure_args}"
25231     ac_configure_args=" --disable-libevent-install${ac_configure_args}"
25232     ac_configure_args=" --enable-silent-rules${ac_configure_args}"
25233     ac_configure_args=" --enable-function-sections${ac_configure_args}"
25234     subdirs="$subdirs libevent"
25235
25236     ;;
25237  *)
25238     NTP_FORCE_LIBEVENT_DIST=libevent
25239     ;;
25240 esac
25241
25242
25243
25244 # Checks for libraries.
25245
25246
25247 LIB_SYSLOG=''
25248
25249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
25250 $as_echo_n "checking for library containing openlog... " >&6; }
25251 if ${ac_cv_search_openlog+:} false; then :
25252   $as_echo_n "(cached) " >&6
25253 else
25254   ac_func_search_save_LIBS=$LIBS
25255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25256 /* end confdefs.h.  */
25257
25258 /* Override any GCC internal prototype to avoid an error.
25259    Use char because int might match the return type of a GCC
25260    builtin and then its argument prototype would still apply.  */
25261 #ifdef __cplusplus
25262 extern "C"
25263 #endif
25264 char openlog ();
25265 int
25266 main ()
25267 {
25268 return openlog ();
25269   ;
25270   return 0;
25271 }
25272 _ACEOF
25273 for ac_lib in '' gen syslog; do
25274   if test -z "$ac_lib"; then
25275     ac_res="none required"
25276   else
25277     ac_res=-l$ac_lib
25278     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25279   fi
25280   if ac_fn_c_try_link "$LINENO"; then :
25281   ac_cv_search_openlog=$ac_res
25282 fi
25283 rm -f core conftest.err conftest.$ac_objext \
25284     conftest$ac_exeext
25285   if ${ac_cv_search_openlog+:} false; then :
25286   break
25287 fi
25288 done
25289 if ${ac_cv_search_openlog+:} false; then :
25290
25291 else
25292   ac_cv_search_openlog=no
25293 fi
25294 rm conftest.$ac_ext
25295 LIBS=$ac_func_search_save_LIBS
25296 fi
25297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
25298 $as_echo "$ac_cv_search_openlog" >&6; }
25299 ac_res=$ac_cv_search_openlog
25300 if test "$ac_res" != no; then :
25301   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25302   case "$ac_cv_search_openlog" in
25303  'none required') ;;
25304  no) ;;
25305  *) LIB_SYSLOG="$ac_cv_search_openlog $LIB_SYSLOG" ;;
25306  esac
25307
25308 fi
25309
25310
25311 # Checks for header files.
25312 for ac_header in netdb.h string.h strings.h syslog.h
25313 do :
25314   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25315 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25316 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25317   cat >>confdefs.h <<_ACEOF
25318 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25319 _ACEOF
25320
25321 fi
25322
25323 done
25324
25325
25326
25327 for ac_header in sysexits.h
25328 do :
25329   ac_fn_c_check_header_mongrel "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
25330 if test "x$ac_cv_header_sysexits_h" = xyes; then :
25331   cat >>confdefs.h <<_ACEOF
25332 #define HAVE_SYSEXITS_H 1
25333 _ACEOF
25334
25335 else
25336
25337
25338 $as_echo "#define EX_OK 0" >>confdefs.h
25339
25340
25341 $as_echo "#define EX_SOFTWARE 70" >>confdefs.h
25342
25343
25344 fi
25345
25346 done
25347
25348
25349
25350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
25351 $as_echo_n "checking for facilitynames in syslog.h... " >&6; }
25352 if ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+:} false; then :
25353   $as_echo_n "(cached) " >&6
25354 else
25355
25356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25357 /* end confdefs.h.  */
25358
25359 #define SYSLOG_NAMES
25360 #include <stdlib.h>
25361 #include <syslog.h>
25362
25363 int
25364 main ()
25365 {
25366  void *fnames; fnames = facilitynames;
25367   ;
25368   return 0;
25369 }
25370 _ACEOF
25371 if ac_fn_c_try_compile "$LINENO"; then :
25372   ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
25373 else
25374   ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
25375 fi
25376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25377 fi
25378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
25379 $as_echo "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
25380 case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
25381  yes)
25382
25383 $as_echo "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
25384
25385     ;;
25386  no)
25387     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
25388 $as_echo "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
25389     ;;
25390  cross)
25391     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
25392 $as_echo "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
25393     ;;
25394 esac
25395
25396
25397 # Checks for typedefs, structures, and compiler characteristics.
25398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
25399 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
25400 if ${ac_cv_header_stdbool_h+:} false; then :
25401   $as_echo_n "(cached) " >&6
25402 else
25403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25404 /* end confdefs.h.  */
25405
25406              #include <stdbool.h>
25407              #ifndef bool
25408               "error: bool is not defined"
25409              #endif
25410              #ifndef false
25411               "error: false is not defined"
25412              #endif
25413              #if false
25414               "error: false is not 0"
25415              #endif
25416              #ifndef true
25417               "error: true is not defined"
25418              #endif
25419              #if true != 1
25420               "error: true is not 1"
25421              #endif
25422              #ifndef __bool_true_false_are_defined
25423               "error: __bool_true_false_are_defined is not defined"
25424              #endif
25425
25426              struct s { _Bool s: 1; _Bool t; } s;
25427
25428              char a[true == 1 ? 1 : -1];
25429              char b[false == 0 ? 1 : -1];
25430              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
25431              char d[(bool) 0.5 == true ? 1 : -1];
25432              /* See body of main program for 'e'.  */
25433              char f[(_Bool) 0.0 == false ? 1 : -1];
25434              char g[true];
25435              char h[sizeof (_Bool)];
25436              char i[sizeof s.t];
25437              enum { j = false, k = true, l = false * true, m = true * 256 };
25438              /* The following fails for
25439                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
25440              _Bool n[m];
25441              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
25442              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
25443              /* Catch a bug in an HP-UX C compiler.  See
25444                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
25445                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
25446               */
25447              _Bool q = true;
25448              _Bool *pq = &q;
25449
25450 int
25451 main ()
25452 {
25453
25454              bool e = &s;
25455              *pq |= q;
25456              *pq |= ! q;
25457              /* Refer to every declared value, to avoid compiler optimizations.  */
25458              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
25459                      + !m + !n + !o + !p + !q + !pq);
25460
25461   ;
25462   return 0;
25463 }
25464 _ACEOF
25465 if ac_fn_c_try_compile "$LINENO"; then :
25466   ac_cv_header_stdbool_h=yes
25467 else
25468   ac_cv_header_stdbool_h=no
25469 fi
25470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25471 fi
25472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
25473 $as_echo "$ac_cv_header_stdbool_h" >&6; }
25474    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
25475 if test "x$ac_cv_type__Bool" = xyes; then :
25476
25477 cat >>confdefs.h <<_ACEOF
25478 #define HAVE__BOOL 1
25479 _ACEOF
25480
25481
25482 fi
25483
25484
25485 if test $ac_cv_header_stdbool_h = yes; then
25486
25487 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
25488
25489 fi
25490
25491
25492
25493
25494
25495 VER_SUFFIX=
25496
25497
25498
25499
25500 # Check whether --with-crypto was given.
25501 if test "${with_crypto+set}" = set; then :
25502   withval=$with_crypto;
25503 fi
25504
25505
25506 # Check whether --with-openssl-libdir was given.
25507 if test "${with_openssl_libdir+set}" = set; then :
25508   withval=$with_openssl_libdir;
25509 fi
25510
25511
25512 # Check whether --with-openssl-incdir was given.
25513 if test "${with_openssl_incdir+set}" = set; then :
25514   withval=$with_openssl_incdir;
25515 fi
25516
25517
25518 # Check whether --with-rpath was given.
25519 if test "${with_rpath+set}" = set; then :
25520   withval=$with_rpath;
25521 fi
25522
25523 ntp_openssl=no
25524 ntp_openssl_from_pkg_config=no
25525 with_crypto=${with_crypto:-openssl,libcrypto}
25526 case "$with_crypto" in
25527  yes)
25528     with_crypto=openssl,libcrypto
25529 esac
25530 case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
25531  no:*) ;;
25532  *:notempty:notgiven:notgiven)
25533     for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
25534         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
25535 $as_echo_n "checking pkg-config for $pkg... " >&6; }
25536         if $PKG_CONFIG --exists $pkg ; then
25537             CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
25538             CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
25539             LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`"
25540             LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l $pkg`"
25541             LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`"
25542             VER_SUFFIX=o
25543             ntp_openssl=yes
25544             ntp_openssl_from_pkg_config=yes
25545             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25546 $as_echo "yes" >&6; }
25547
25548             break
25549         fi
25550         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25551 $as_echo "no" >&6; }
25552     done
25553 esac
25554 case "$with_crypto:$ntp_openssl" in
25555  no:*) ;;
25556  *:no)
25557     need_dash_r=
25558     need_dash_Wlrpath=
25559     case "${with_rpath-notgiven}" in
25560      yes)
25561         # Lame - what to do if we need -Wl... but not -R?
25562         need_dash_r=1
25563         ;;
25564      notgiven)
25565         case "$host" in
25566          *-*-linux*)
25567             # This may really only be true for gcc
25568             need_dash_Wlrpath=1
25569             ;;
25570          *-*-netbsd*)
25571             need_dash_r=1
25572             ;;
25573          *-*-solaris*)
25574             need_dash_r=1
25575             ;;
25576         esac
25577         ;;
25578     esac
25579
25580     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
25581 $as_echo_n "checking for openssl library directory... " >&6; }
25582     with_openssl_libdir=${with_openssl_libdir-notgiven}
25583     case "$with_openssl_libdir" in
25584      notgiven)
25585         case "$build" in
25586          $host)
25587             with_openssl_libdir=default
25588             ;;
25589          *)
25590             with_openssl_libdir=no
25591             ;;
25592         esac
25593     esac
25594     case "$with_openssl_libdir" in
25595      default)
25596         # Look in:
25597         with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib"
25598         with_openssl_libdir="$with_openssl_libdir /usr/local/lib"
25599         with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib"
25600     esac
25601     case "$with_openssl_libdir" in
25602      no)
25603         ;;
25604      *) # Look for libcrypto.a and libssl.a:
25605         for i in $with_openssl_libdir no
25606         do
25607             case "$host" in
25608              *-*-darwin*)
25609                 test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
25610                 ;;
25611              *)
25612                 test -f $i/libcrypto.so -a -f $i/libssl.so && break
25613                 test -f $i/libcrypto.a -a -f $i/libssl.a && break
25614                 ;;
25615             esac
25616         done
25617         openssl_libdir=$i
25618         ;;
25619     esac
25620     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
25621 $as_echo "$openssl_libdir" >&6; }
25622     case "$openssl_libdir" in
25623      no)
25624         openssl_libdir=
25625         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
25626 $as_echo "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
25627     esac
25628
25629     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
25630 $as_echo_n "checking for openssl include directory... " >&6; }
25631     with_openssl_incdir=${with_openssl_incdir-notgiven}
25632     case "$with_openssl_incdir" in
25633      notgiven)
25634         # Look in:
25635         with_openssl_incdir="/usr/include /usr/sfw/include"
25636         with_openssl_incdir="$with_openssl_incdir /usr/local/include"
25637         with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include"
25638     esac
25639     case "$with_openssl_incdir" in
25640      no)
25641         ;;
25642      *) # look for openssl/evp.h:
25643         for i in $with_openssl_incdir no
25644         do
25645             test -f $i/openssl/evp.h && break
25646         done
25647         openssl_incdir=$i
25648         ;;
25649     esac
25650     { i=; unset i;}
25651     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
25652 $as_echo "$openssl_incdir" >&6; }
25653     case "$openssl_incdir" in
25654      no)
25655         openssl_incdir=
25656         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
25657 $as_echo "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
25658     esac
25659     if test -z "$openssl_libdir" -o -z "$openssl_incdir"
25660     then
25661         ntp_openssl=no
25662     else
25663         ntp_openssl=yes
25664         VER_SUFFIX=o
25665     fi
25666     case "$ntp_openssl" in
25667      yes)
25668         # We have OpenSSL inc/lib dirs - use them.
25669         case "$openssl_incdir" in
25670          /usr/include)
25671             ;;
25672          *)
25673             CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir"
25674             ;;
25675         esac
25676         case "$openssl_libdir" in
25677          /usr/lib)
25678             ;;
25679          *)
25680             LDADD_NTP="$LDADD_NTP -L$openssl_libdir"
25681             case "$need_dash_r" in
25682              1)
25683                 LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir"
25684             esac
25685             case "$need_dash_Wlrpath" in
25686              1)
25687                 LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir"
25688             esac
25689             ;;
25690         esac
25691         LDADD_NTP="$LDADD_NTP -lcrypto"
25692     esac
25693 esac
25694
25695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
25696 $as_echo_n "checking if we will use crypto... " >&6; }
25697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
25698 $as_echo "$ntp_openssl" >&6; }
25699
25700 case "$ntp_openssl" in
25701  yes)
25702
25703 $as_echo "#define OPENSSL /**/" >>confdefs.h
25704
25705     case "$VER_SUFFIX" in
25706      *o*) ;;
25707      *) as_fn_error $? "OPENSSL set but no 'o' in VER_SUFFIX!" "$LINENO" 5 ;;
25708     esac
25709     ;;
25710 esac
25711
25712 NTPO_SAVED_CPPFLAGS="$CPPFLAGS"
25713 CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP"
25714 NTPO_SAVED_LIBS="$LIBS"
25715
25716 #
25717 # check for linking with -lcrypto failure, and try -lcrypto -lz.
25718 # Helps m68k-atari-mint
25719 #
25720 case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
25721  yes:no)
25722     LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
25723     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
25724 $as_echo_n "checking if linking with -lcrypto alone works... " >&6; }
25725 if ${ntp_cv_bare_lcrypto+:} false; then :
25726   $as_echo_n "(cached) " >&6
25727 else
25728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25729 /* end confdefs.h.  */
25730
25731                     #include "openssl/err.h"
25732                     #include "openssl/evp.h"
25733
25734 int
25735 main ()
25736 {
25737
25738                     ERR_load_crypto_strings();
25739                     OpenSSL_add_all_algorithms();
25740
25741
25742   ;
25743   return 0;
25744 }
25745 _ACEOF
25746 if ac_fn_c_try_link "$LINENO"; then :
25747   ntp_cv_bare_lcrypto=yes
25748 else
25749   ntp_cv_bare_lcrypto=no
25750
25751 fi
25752 rm -f core conftest.err conftest.$ac_objext \
25753     conftest$ac_exeext conftest.$ac_ext
25754
25755 fi
25756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
25757 $as_echo "$ntp_cv_bare_lcrypto" >&6; }
25758     case "$ntp_cv_bare_lcrypto" in
25759      no)
25760         LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
25761         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
25762 $as_echo_n "checking if linking with -lcrypto -lz works... " >&6; }
25763 if ${ntp_cv_lcrypto_lz+:} false; then :
25764   $as_echo_n "(cached) " >&6
25765 else
25766   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25767 /* end confdefs.h.  */
25768
25769                         #include "openssl/err.h"
25770                         #include "openssl/evp.h"
25771
25772 int
25773 main ()
25774 {
25775
25776                         ERR_load_crypto_strings();
25777                         OpenSSL_add_all_algorithms();
25778
25779
25780   ;
25781   return 0;
25782 }
25783 _ACEOF
25784 if ac_fn_c_try_link "$LINENO"; then :
25785   ntp_cv_lcrypto_lz=yes
25786 else
25787   ntp_cv_lcrypto_lz=no
25788
25789 fi
25790 rm -f core conftest.err conftest.$ac_objext \
25791     conftest$ac_exeext conftest.$ac_ext
25792
25793 fi
25794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
25795 $as_echo "$ntp_cv_lcrypto_lz" >&6; }
25796         case "$ntp_cv_lcrypto_lz" in
25797          yes)
25798              LDADD_NTP="$LDADD_NTP -lz"
25799         esac
25800     esac
25801 esac
25802
25803 #
25804 # Older OpenSSL headers have a number of callback prototypes inside
25805 # other function prototypes which trigger copious warnings with gcc's
25806 # -Wstrict-prototypes, which is included in -Wall.
25807 #
25808 # An example:
25809 #
25810 # int i2d_RSA_NET(const RSA *a, unsigned char **pp,
25811 #                 int (*cb)(), int sgckey);
25812 #                 ^^^^^^^^^^^
25813 #
25814 #
25815 #
25816 openssl_triggers_warnings=unknown
25817 NTPO_SAVED_CFLAGS="$CFLAGS"
25818
25819 case "$ntp_openssl:$GCC" in
25820  yes:yes)
25821     CFLAGS="$CFLAGS -Werror"
25822     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25823 /* end confdefs.h.  */
25824
25825
25826 int
25827 main ()
25828 {
25829
25830                 /* see if -Werror breaks gcc */
25831
25832
25833   ;
25834   return 0;
25835 }
25836 _ACEOF
25837 if ac_fn_c_try_compile "$LINENO"; then :
25838   gcc_handles_Werror=yes
25839 else
25840   gcc_handles_Werror=no
25841
25842 fi
25843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25844     case "$gcc_handles_Werror" in
25845      no)
25846         # if this gcc doesn't do -Werror go ahead and use
25847         # -Wstrict-prototypes.
25848         openssl_triggers_warnings=yes
25849         ;;
25850      yes)
25851         CFLAGS="$CFLAGS -Wstrict-prototypes"
25852         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25853 /* end confdefs.h.  */
25854
25855                     #include "openssl/asn1_mac.h"
25856                     #include "openssl/bn.h"
25857                     #include "openssl/err.h"
25858                     #include "openssl/evp.h"
25859                     #include "openssl/pem.h"
25860                     #include "openssl/rand.h"
25861                     #include "openssl/x509v3.h"
25862
25863 int
25864 main ()
25865 {
25866
25867                     /* empty body */
25868
25869
25870   ;
25871   return 0;
25872 }
25873 _ACEOF
25874 if ac_fn_c_try_compile "$LINENO"; then :
25875   openssl_triggers_warnings=no
25876 else
25877   openssl_triggers_warnings=yes
25878
25879 fi
25880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25881     esac
25882     case "$openssl_triggers_warnings" in
25883      yes)
25884         CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes"
25885         ;;
25886      *)
25887         CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
25888     esac
25889     ;;
25890  no:yes)
25891     # gcc without OpenSSL
25892     CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
25893 esac
25894
25895 # Because we don't want -Werror for the EVP_MD_do_all_sorted check
25896 CFLAGS="$NTPO_SAVED_CFLAGS"
25897
25898 case "$ntp_openssl" in
25899  yes)
25900     LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
25901     for ac_func in EVP_MD_do_all_sorted
25902 do :
25903   ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
25904 if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes; then :
25905   cat >>confdefs.h <<_ACEOF
25906 #define HAVE_EVP_MD_DO_ALL_SORTED 1
25907 _ACEOF
25908
25909 fi
25910 done
25911
25912     ;;
25913 esac
25914
25915 CPPFLAGS="$NTPO_SAVED_CPPFLAGS"
25916 LIBS="$NTPO_SAVED_LIBS"
25917 { NTPO_SAVED_CFLAGS=; unset NTPO_SAVED_CFLAGS;}
25918 { NTPO_SAVED_CPPFLAGS=; unset NTPO_SAVED_CPPFLAGS;}
25919 { NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;}
25920 { openssl_triggers_warnings=; unset openssl_triggers_warnings;}
25921 { ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
25922
25923
25924
25925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
25926 $as_echo_n "checking for struct sockaddr_storage... " >&6; }
25927 if ${ntp_cv_sockaddr_storage+:} false; then :
25928   $as_echo_n "(cached) " >&6
25929 else
25930   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25931 /* end confdefs.h.  */
25932
25933                 #ifdef HAVE_SYS_TYPES_H
25934                 # include <sys/types.h>
25935                 #endif
25936                 #ifdef HAVE_SYS_SOCKET_H
25937                 # include <sys/socket.h>
25938                 #endif
25939                 #ifdef HAVE_NETINET_IN_H
25940                 # include <netinet/in.h>
25941                 #endif
25942
25943 int
25944 main ()
25945 {
25946
25947                 struct sockaddr_storage n;
25948
25949
25950   ;
25951   return 0;
25952 }
25953 _ACEOF
25954 if ac_fn_c_try_compile "$LINENO"; then :
25955   ntp_cv_sockaddr_storage=yes
25956 else
25957   ntp_cv_sockaddr_storage=no
25958
25959 fi
25960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25961
25962 fi
25963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
25964 $as_echo "$ntp_cv_sockaddr_storage" >&6; }
25965 case "$ntp_cv_sockaddr_storage" in
25966  yes)
25967
25968 $as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
25969
25970     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
25971 $as_echo_n "checking for sockaddr_storage.__ss_family... " >&6; }
25972 if ${ntp_cv_have___ss_family+:} false; then :
25973   $as_echo_n "(cached) " >&6
25974 else
25975   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25976 /* end confdefs.h.  */
25977
25978                     #ifdef HAVE_SYS_TYPES_H
25979                     # include <sys/types.h>
25980                     #endif
25981                     #ifdef HAVE_SYS_SOCKET_H
25982                     # include <sys/socket.h>
25983                     #endif
25984                     #ifdef HAVE_NETINET_IN_H
25985                     # include <netinet/in.h>
25986                     #endif
25987
25988 int
25989 main ()
25990 {
25991
25992                     struct sockaddr_storage s;
25993                     s.__ss_family = 1;
25994
25995
25996   ;
25997   return 0;
25998 }
25999 _ACEOF
26000 if ac_fn_c_try_compile "$LINENO"; then :
26001   ntp_cv_have___ss_family=yes
26002 else
26003   ntp_cv_have___ss_family=no
26004
26005 fi
26006 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26007
26008 fi
26009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
26010 $as_echo "$ntp_cv_have___ss_family" >&6; }
26011     case "$ntp_cv_have___ss_family" in
26012      yes)
26013
26014 $as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
26015
26016     esac
26017
26018 esac
26019
26020
26021 #
26022 # Look for in_port_t.
26023 #
26024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
26025 $as_echo_n "checking for in_port_t... " >&6; }
26026 if ${isc_cv_have_in_port_t+:} false; then :
26027   $as_echo_n "(cached) " >&6
26028 else
26029   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26030 /* end confdefs.h.  */
26031
26032                 #include <sys/types.h>
26033                 #include <netinet/in.h>
26034
26035 int
26036 main ()
26037 {
26038
26039                 in_port_t port = 25;
26040                 return (0);
26041
26042
26043   ;
26044   return 0;
26045 }
26046 _ACEOF
26047 if ac_fn_c_try_compile "$LINENO"; then :
26048   isc_cv_have_in_port_t=yes
26049 else
26050   isc_cv_have_in_port_t=no
26051
26052 fi
26053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26054
26055 fi
26056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
26057 $as_echo "$isc_cv_have_in_port_t" >&6; }
26058 case "$isc_cv_have_in_port_t" in
26059  no)
26060
26061 $as_echo "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
26062
26063 esac
26064
26065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
26066 $as_echo_n "checking type of socklen arg for getsockname()... " >&6; }
26067 if ${ntp_cv_getsockname_socklen_type+:} false; then :
26068   $as_echo_n "(cached) " >&6
26069 else
26070
26071     getsockname_socklen_type_found=no
26072     for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
26073         for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
26074             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26075 /* end confdefs.h.  */
26076
26077                         #ifdef HAVE_SYS_TYPES_H
26078                         # include <sys/types.h>
26079                         #endif
26080                         #ifdef HAVE_SYS_SOCKET_H
26081                         # include <sys/socket.h>
26082                         #endif
26083
26084 int
26085 main ()
26086 {
26087
26088                         extern
26089                         getsockname(int, $getsockname_arg2,
26090                                 $ntp_cv_getsockname_socklen_type *);
26091
26092
26093   ;
26094   return 0;
26095 }
26096 _ACEOF
26097 if ac_fn_c_try_compile "$LINENO"; then :
26098   getsockname_socklen_type_found=yes ; break 2
26099 fi
26100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26101         done
26102     done
26103     case "$getsockname_socklen_type_found" in
26104      no)
26105         ntp_cv_getsockname_socklen_type='socklen_t'
26106     esac
26107     { getsockname_arg2=; unset getsockname_arg2;}
26108     { getsockname_socklen_type_found=; unset getsockname_socklen_type_found;}
26109
26110
26111 fi
26112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
26113 $as_echo "$ntp_cv_getsockname_socklen_type" >&6; }
26114
26115 cat >>confdefs.h <<_ACEOF
26116 #define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type
26117 _ACEOF
26118
26119
26120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
26121 $as_echo_n "checking struct sockaddr for sa_len... " >&6; }
26122 if ${isc_cv_platform_havesalen+:} false; then :
26123   $as_echo_n "(cached) " >&6
26124 else
26125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26126 /* end confdefs.h.  */
26127
26128                 #include <sys/types.h>
26129                 #include <sys/socket.h>
26130
26131 int
26132 main ()
26133 {
26134
26135                 extern struct sockaddr *ps;
26136                 return ps->sa_len;
26137
26138
26139   ;
26140   return 0;
26141 }
26142 _ACEOF
26143 if ac_fn_c_try_compile "$LINENO"; then :
26144   isc_cv_platform_havesalen=yes
26145 else
26146   isc_cv_platform_havesalen=no
26147
26148 fi
26149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26150
26151 fi
26152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_platform_havesalen" >&5
26153 $as_echo "$isc_cv_platform_havesalen" >&6; }
26154 case "$isc_cv_platform_havesalen" in
26155  yes)
26156
26157 $as_echo "#define ISC_PLATFORM_HAVESALEN 1" >>confdefs.h
26158
26159 esac
26160
26161 # Check whether --enable-ipv6 was given.
26162 if test "${enable_ipv6+set}" = set; then :
26163   enableval=$enable_ipv6;
26164 fi
26165
26166
26167 case "$enable_ipv6" in
26168  yes|''|autodetect)
26169     case "$host" in
26170      powerpc-ibm-aix4*)
26171         ;;
26172      *)
26173
26174 $as_echo "#define WANT_IPV6 1" >>confdefs.h
26175
26176         ;;
26177     esac
26178     ;;
26179  no)
26180     ;;
26181 esac
26182
26183
26184 case "$host" in
26185  *-*-darwin*)
26186
26187 $as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
26188
26189 esac
26190
26191
26192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5
26193 $as_echo_n "checking for IPv6 structures... " >&6; }
26194 if ${isc_cv_found_ipv6+:} false; then :
26195   $as_echo_n "(cached) " >&6
26196 else
26197   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26198 /* end confdefs.h.  */
26199
26200                 #include <sys/types.h>
26201                 #include <sys/socket.h>
26202                 #include <netinet/in.h>
26203
26204 int
26205 main ()
26206 {
26207
26208                 struct sockaddr_in6 sin6;
26209
26210
26211   ;
26212   return 0;
26213 }
26214 _ACEOF
26215 if ac_fn_c_try_compile "$LINENO"; then :
26216   isc_cv_found_ipv6=yes
26217 else
26218   isc_cv_found_ipv6=no
26219
26220 fi
26221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26222
26223 fi
26224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_found_ipv6" >&5
26225 $as_echo "$isc_cv_found_ipv6" >&6; }
26226
26227 #
26228 # See whether IPv6 support is provided via a Kame add-on.
26229 # This is done before other IPv6 linking tests so LIBS is properly set.
26230 #
26231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kame IPv6 support" >&5
26232 $as_echo_n "checking for Kame IPv6 support... " >&6; }
26233
26234 # Check whether --with-kame was given.
26235 if test "${with_kame+set}" = set; then :
26236   withval=$with_kame; use_kame="$withval"
26237 else
26238   use_kame="no"
26239
26240 fi
26241
26242 case "$use_kame" in
26243  no)
26244     ;;
26245  yes)
26246     kame_path=/usr/local/v6
26247     ;;
26248  *)
26249     kame_path="$use_kame"
26250     ;;
26251 esac
26252 case "$use_kame" in
26253  no)
26254     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26255 $as_echo "no" >&6; }
26256     ;;
26257  *)
26258     if test -f $kame_path/lib/libinet6.a; then
26259         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kame_path/lib/libinet6.a" >&5
26260 $as_echo "$kame_path/lib/libinet6.a" >&6; }
26261         LIBS="-L$kame_path/lib -linet6 $LIBS"
26262     else
26263         as_fn_error $? "$kame_path/lib/libinet6.a not found.
26264
26265 Please choose the proper path with the following command:
26266
26267     configure --with-kame=PATH
26268 " "$LINENO" 5
26269     fi
26270     ;;
26271 esac
26272
26273 #
26274 # Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
26275 # Including it on Kame-using platforms is very bad, though, because
26276 # Kame uses #error against direct inclusion.   So include it on only
26277 # the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
26278 # This is done before the in6_pktinfo check because that's what
26279 # netinet6/in6.h is needed for.
26280 #
26281 case "$host" in
26282  *-bsdi4.[01]*)
26283
26284 $as_echo "#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >>confdefs.h
26285
26286     isc_netinet6in6_hack="#include <netinet6/in6.h>"
26287     ;;
26288  *)
26289     isc_netinet6in6_hack=""
26290     ;;
26291 esac
26292
26293 #
26294 # This is similar to the netinet6/in6.h issue.
26295 #
26296 case "$host" in
26297  *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
26298
26299 $as_echo "#define ISC_PLATFORM_FIXIN6ISADDR 1" >>confdefs.h
26300
26301     isc_netinetin6_hack="#include <netinet/in6.h>"
26302     ;;
26303  *)
26304     isc_netinetin6_hack=""
26305     ;;
26306 esac
26307
26308
26309 case "$isc_cv_found_ipv6" in
26310  yes)
26311
26312 $as_echo "#define ISC_PLATFORM_HAVEIPV6 1" >>confdefs.h
26313
26314     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
26315 $as_echo_n "checking for in6_pktinfo... " >&6; }
26316 if ${isc_cv_have_in6_pktinfo+:} false; then :
26317   $as_echo_n "(cached) " >&6
26318 else
26319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26320 /* end confdefs.h.  */
26321
26322                     #include <sys/types.h>
26323                     #include <sys/socket.h>
26324                     #include <netinet/in.h>
26325                     $isc_netinetin6_hack
26326                     $isc_netinet6in6_hack
26327
26328 int
26329 main ()
26330 {
26331
26332                     struct in6_pktinfo xyzzy;
26333
26334
26335   ;
26336   return 0;
26337 }
26338 _ACEOF
26339 if ac_fn_c_try_compile "$LINENO"; then :
26340   isc_cv_have_in6_pktinfo=yes
26341 else
26342   isc_cv_have_in6_pktinfo=no
26343
26344 fi
26345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26346
26347 fi
26348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6_pktinfo" >&5
26349 $as_echo "$isc_cv_have_in6_pktinfo" >&6; }
26350     case "$isc_cv_have_in6_pktinfo" in
26351      yes)
26352
26353 $as_echo "#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >>confdefs.h
26354
26355     esac
26356
26357
26358     # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
26359     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_in6.sin6_scope_id" >&5
26360 $as_echo_n "checking for sockaddr_in6.sin6_scope_id... " >&6; }
26361 if ${isc_cv_have_sin6_scope_id+:} false; then :
26362   $as_echo_n "(cached) " >&6
26363 else
26364   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26365 /* end confdefs.h.  */
26366
26367                     #include <sys/types.h>
26368                     #include <sys/socket.h>
26369                     #include <netinet/in.h>
26370                     $isc_netinetin6_hack
26371                     $isc_netinet6in6_hack
26372
26373 int
26374 main ()
26375 {
26376
26377                     struct sockaddr_in6 xyzzy;
26378                     xyzzy.sin6_scope_id = 0;
26379
26380
26381   ;
26382   return 0;
26383 }
26384 _ACEOF
26385 if ac_fn_c_try_compile "$LINENO"; then :
26386   isc_cv_have_sin6_scope_id=yes
26387 else
26388   isc_cv_have_sin6_scope_id=no
26389
26390 fi
26391 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26392
26393 fi
26394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_sin6_scope_id" >&5
26395 $as_echo "$isc_cv_have_sin6_scope_id" >&6; }
26396
26397     case "$isc_cv_have_sin6_scope_id" in
26398      yes)
26399
26400 $as_echo "#define ISC_PLATFORM_HAVESCOPEID 1" >>confdefs.h
26401
26402     esac
26403 esac
26404
26405
26406 # We need this check run even without isc_cv_found_ipv6=yes
26407
26408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
26409 $as_echo_n "checking for in6addr_any... " >&6; }
26410 if ${isc_cv_in6addr_any_links+:} false; then :
26411   $as_echo_n "(cached) " >&6
26412 else
26413
26414         SAVED_LIBS="$LIBS"
26415         LIBS="$LDADD_LIBNTP $LIBS"
26416         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26417 /* end confdefs.h.  */
26418 $ac_includes_default
26419                     #include <sys/socket.h>
26420                     #include <netinet/in.h>
26421                     $isc_netinetin6_hack
26422                     $isc_netinet6in6_hack
26423
26424 int
26425 main ()
26426 {
26427
26428                     printf("%x", in6addr_any.s6_addr[15]);
26429
26430
26431   ;
26432   return 0;
26433 }
26434 _ACEOF
26435 if ac_fn_c_try_link "$LINENO"; then :
26436   isc_cv_in6addr_any_links=yes
26437 else
26438   isc_cv_in6addr_any_links=no
26439
26440 fi
26441 rm -f core conftest.err conftest.$ac_objext \
26442     conftest$ac_exeext conftest.$ac_ext
26443         LIBS="$SAVED_LIBS"
26444         { SAVED_LIBS=; unset SAVED_LIBS;}
26445
26446
26447 fi
26448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
26449 $as_echo "$isc_cv_in6addr_any_links" >&6; }
26450
26451 case "$isc_cv_in6addr_any_links" in
26452  no)
26453
26454 $as_echo "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
26455
26456 esac
26457
26458
26459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5
26460 $as_echo_n "checking for struct if_laddrconf... " >&6; }
26461 if ${isc_cv_struct_if_laddrconf+:} false; then :
26462   $as_echo_n "(cached) " >&6
26463 else
26464   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26465 /* end confdefs.h.  */
26466
26467                 #include <sys/types.h>
26468                 #include <net/if6.h>
26469
26470 int
26471 main ()
26472 {
26473
26474                 struct if_laddrconf a;
26475
26476
26477   ;
26478   return 0;
26479 }
26480 _ACEOF
26481 if ac_fn_c_try_compile "$LINENO"; then :
26482   isc_cv_struct_if_laddrconf=yes
26483 else
26484   isc_cv_struct_if_laddrconf=no
26485
26486 fi
26487 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26488
26489 fi
26490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrconf" >&5
26491 $as_echo "$isc_cv_struct_if_laddrconf" >&6; }
26492
26493 case "$isc_cv_struct_if_laddrconf" in
26494  yes)
26495
26496 $as_echo "#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" >>confdefs.h
26497
26498 esac
26499
26500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
26501 $as_echo_n "checking for struct if_laddrreq... " >&6; }
26502 if ${isc_cv_struct_if_laddrreq+:} false; then :
26503   $as_echo_n "(cached) " >&6
26504 else
26505   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26506 /* end confdefs.h.  */
26507
26508                 #include <sys/types.h>
26509                 #include <net/if6.h>
26510
26511 int
26512 main ()
26513 {
26514
26515                 struct if_laddrreq a;
26516
26517
26518   ;
26519   return 0;
26520 }
26521 _ACEOF
26522 if ac_fn_c_try_compile "$LINENO"; then :
26523   isc_cv_struct_if_laddrreq=yes
26524 else
26525   isc_cv_struct_if_laddrreq=no
26526
26527 fi
26528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26529
26530 fi
26531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrreq" >&5
26532 $as_echo "$isc_cv_struct_if_laddrreq" >&6; }
26533
26534 case "$isc_cv_struct_if_laddrreq" in
26535  yes)
26536
26537 $as_echo "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
26538
26539 esac
26540
26541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
26542 $as_echo_n "checking for multicast IP support... " >&6; }
26543 if ${ntp_cv_multicast+:} false; then :
26544   $as_echo_n "(cached) " >&6
26545 else
26546
26547         ntp_cv_multicast=no
26548         case "$host" in
26549          i386-sequent-sysv4)
26550             ;;
26551          *)
26552             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26553 /* end confdefs.h.  */
26554
26555                         #ifdef HAVE_NETINET_IN_H
26556                         # include <netinet/in.h>
26557                         #endif
26558
26559 int
26560 main ()
26561 {
26562
26563                         struct ip_mreq ipmr;
26564                         ipmr.imr_interface.s_addr = 0;
26565
26566
26567   ;
26568   return 0;
26569 }
26570 _ACEOF
26571 if ac_fn_c_try_compile "$LINENO"; then :
26572   ntp_cv_multicast=yes
26573 fi
26574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26575             ;;
26576         esac
26577
26578
26579 fi
26580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
26581 $as_echo "$ntp_cv_multicast" >&6; }
26582 case "$ntp_cv_multicast" in
26583  yes)
26584
26585 $as_echo "#define MCAST 1" >>confdefs.h
26586
26587     { $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
26588 $as_echo_n "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
26589 if ${ntp_cv_typeof_ip_multicast_loop+:} false; then :
26590   $as_echo_n "(cached) " >&6
26591 else
26592
26593             case "$host" in
26594              *-*-netbsd*|*-*-*linux*)
26595                 ntp_cv_typeof_ip_multicast_loop=u_int
26596                 ;;
26597              *)
26598                 ntp_cv_typeof_ip_multicast_loop=u_char
26599                 ;;
26600             esac
26601
26602
26603 fi
26604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
26605 $as_echo "$ntp_cv_typeof_ip_multicast_loop" >&6; }
26606
26607 cat >>confdefs.h <<_ACEOF
26608 #define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop
26609 _ACEOF
26610
26611 esac
26612
26613 # Check whether --enable-getifaddrs was given.
26614 if test "${enable_getifaddrs+set}" = set; then :
26615   enableval=$enable_getifaddrs; want_getifaddrs="$enableval"
26616 else
26617   want_getifaddrs="yes"
26618
26619 fi
26620
26621
26622 case $want_getifaddrs in
26623  glibc)
26624     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
26625 $as_echo "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
26626 esac
26627 case $want_getifaddrs in
26628  no)
26629     ;;
26630  *)
26631     SAVED_LIBS="$LIBS"
26632     LIBS="$LDADD_LIBNTP $LIBS"
26633     for ac_func in getifaddrs
26634 do :
26635   ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
26636 if test "x$ac_cv_func_getifaddrs" = xyes; then :
26637   cat >>confdefs.h <<_ACEOF
26638 #define HAVE_GETIFADDRS 1
26639 _ACEOF
26640
26641 fi
26642 done
26643
26644     LIBS="$SAVED_LIBS"
26645     { SAVED_LIBS=; unset SAVED_LIBS;}
26646     ;;
26647 esac
26648
26649 #
26650 # Check for if_nametoindex() for IPv6 scoped addresses support
26651 #
26652 case "$host" in
26653  *-hp-hpux*)
26654     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
26655 $as_echo_n "checking for library containing if_nametoindex... " >&6; }
26656 if ${ac_cv_search_if_nametoindex+:} false; then :
26657   $as_echo_n "(cached) " >&6
26658 else
26659   ac_func_search_save_LIBS=$LIBS
26660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26661 /* end confdefs.h.  */
26662
26663 /* Override any GCC internal prototype to avoid an error.
26664    Use char because int might match the return type of a GCC
26665    builtin and then its argument prototype would still apply.  */
26666 #ifdef __cplusplus
26667 extern "C"
26668 #endif
26669 char if_nametoindex ();
26670 int
26671 main ()
26672 {
26673 return if_nametoindex ();
26674   ;
26675   return 0;
26676 }
26677 _ACEOF
26678 for ac_lib in '' ipv6; do
26679   if test -z "$ac_lib"; then
26680     ac_res="none required"
26681   else
26682     ac_res=-l$ac_lib
26683     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26684   fi
26685   if ac_fn_c_try_link "$LINENO"; then :
26686   ac_cv_search_if_nametoindex=$ac_res
26687 fi
26688 rm -f core conftest.err conftest.$ac_objext \
26689     conftest$ac_exeext
26690   if ${ac_cv_search_if_nametoindex+:} false; then :
26691   break
26692 fi
26693 done
26694 if ${ac_cv_search_if_nametoindex+:} false; then :
26695
26696 else
26697   ac_cv_search_if_nametoindex=no
26698 fi
26699 rm conftest.$ac_ext
26700 LIBS=$ac_func_search_save_LIBS
26701 fi
26702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
26703 $as_echo "$ac_cv_search_if_nametoindex" >&6; }
26704 ac_res=$ac_cv_search_if_nametoindex
26705 if test "$ac_res" != no; then :
26706   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26707
26708 fi
26709
26710 esac
26711 SAVED_LIBS="$LIBS"
26712 LIBS="$LDADD_LIBNTP $LIBS"
26713 for ac_func in if_nametoindex
26714 do :
26715   ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
26716 if test "x$ac_cv_func_if_nametoindex" = xyes; then :
26717   cat >>confdefs.h <<_ACEOF
26718 #define HAVE_IF_NAMETOINDEX 1
26719 _ACEOF
26720
26721 fi
26722 done
26723
26724 LIBS="$SAVED_LIBS"
26725 { SAVED_LIBS=; unset SAVED_LIBS;}
26726 case "$ac_cv_func_if_nametoindex" in
26727  yes)
26728
26729 $as_echo "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
26730
26731 esac
26732
26733
26734
26735 ###
26736
26737 # Hacks
26738 # these need work if we're to move libntp under sntp
26739
26740 $as_echo "#define HAVE_NO_NICE 1" >>confdefs.h
26741
26742
26743 $as_echo "#define HAVE_TERMIOS 1" >>confdefs.h
26744
26745
26746 # Checks for library functions.
26747 for ac_func in socket
26748 do :
26749   ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
26750 if test "x$ac_cv_func_socket" = xyes; then :
26751   cat >>confdefs.h <<_ACEOF
26752 #define HAVE_SOCKET 1
26753 _ACEOF
26754
26755 fi
26756 done
26757
26758
26759
26760 # We may not need have_unity
26761 have_unity=false
26762 # Extract the first word of "ruby", so it can be a program name with args.
26763 set dummy ruby; ac_word=$2
26764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26765 $as_echo_n "checking for $ac_word... " >&6; }
26766 if ${ac_cv_path_PATH_RUBY+:} false; then :
26767   $as_echo_n "(cached) " >&6
26768 else
26769   case $PATH_RUBY in
26770   [\\/]* | ?:[\\/]*)
26771   ac_cv_path_PATH_RUBY="$PATH_RUBY" # Let the user override the test with a path.
26772   ;;
26773   *)
26774   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26775 for as_dir in $PATH
26776 do
26777   IFS=$as_save_IFS
26778   test -z "$as_dir" && as_dir=.
26779     for ac_exec_ext in '' $ac_executable_extensions; do
26780   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26781     ac_cv_path_PATH_RUBY="$as_dir/$ac_word$ac_exec_ext"
26782     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26783     break 2
26784   fi
26785 done
26786   done
26787 IFS=$as_save_IFS
26788
26789   ;;
26790 esac
26791 fi
26792 PATH_RUBY=$ac_cv_path_PATH_RUBY
26793 if test -n "$PATH_RUBY"; then
26794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_RUBY" >&5
26795 $as_echo "$PATH_RUBY" >&6; }
26796 else
26797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26798 $as_echo "no" >&6; }
26799 fi
26800
26801
26802 case "$PATH_RUBY" in
26803  /*)
26804     have_unity=true
26805     ;;
26806  *) PATH_RUBY="false"
26807     ;;
26808 esac
26809 # We may not need UNITYBUILD_AVAILABLE
26810  if $have_unity; then
26811   UNITYBUILD_AVAILABLE_TRUE=
26812   UNITYBUILD_AVAILABLE_FALSE='#'
26813 else
26814   UNITYBUILD_AVAILABLE_TRUE='#'
26815   UNITYBUILD_AVAILABLE_FALSE=
26816 fi
26817
26818
26819
26820 # HMS: if we don't find c++ we should not look for gtest.
26821 ac_ext=cpp
26822 ac_cpp='$CXXCPP $CPPFLAGS'
26823 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26824 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26825 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26826 if test -z "$CXX"; then
26827   if test -n "$CCC"; then
26828     CXX=$CCC
26829   else
26830     if test -n "$ac_tool_prefix"; then
26831   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
26832   do
26833     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26834 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26836 $as_echo_n "checking for $ac_word... " >&6; }
26837 if ${ac_cv_prog_CXX+:} false; then :
26838   $as_echo_n "(cached) " >&6
26839 else
26840   if test -n "$CXX"; then
26841   ac_cv_prog_CXX="$CXX" # Let the user override the test.
26842 else
26843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26844 for as_dir in $PATH
26845 do
26846   IFS=$as_save_IFS
26847   test -z "$as_dir" && as_dir=.
26848     for ac_exec_ext in '' $ac_executable_extensions; do
26849   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26850     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
26851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26852     break 2
26853   fi
26854 done
26855   done
26856 IFS=$as_save_IFS
26857
26858 fi
26859 fi
26860 CXX=$ac_cv_prog_CXX
26861 if test -n "$CXX"; then
26862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
26863 $as_echo "$CXX" >&6; }
26864 else
26865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26866 $as_echo "no" >&6; }
26867 fi
26868
26869
26870     test -n "$CXX" && break
26871   done
26872 fi
26873 if test -z "$CXX"; then
26874   ac_ct_CXX=$CXX
26875   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
26876 do
26877   # Extract the first word of "$ac_prog", so it can be a program name with args.
26878 set dummy $ac_prog; ac_word=$2
26879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26880 $as_echo_n "checking for $ac_word... " >&6; }
26881 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
26882   $as_echo_n "(cached) " >&6
26883 else
26884   if test -n "$ac_ct_CXX"; then
26885   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
26886 else
26887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26888 for as_dir in $PATH
26889 do
26890   IFS=$as_save_IFS
26891   test -z "$as_dir" && as_dir=.
26892     for ac_exec_ext in '' $ac_executable_extensions; do
26893   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26894     ac_cv_prog_ac_ct_CXX="$ac_prog"
26895     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26896     break 2
26897   fi
26898 done
26899   done
26900 IFS=$as_save_IFS
26901
26902 fi
26903 fi
26904 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
26905 if test -n "$ac_ct_CXX"; then
26906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
26907 $as_echo "$ac_ct_CXX" >&6; }
26908 else
26909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26910 $as_echo "no" >&6; }
26911 fi
26912
26913
26914   test -n "$ac_ct_CXX" && break
26915 done
26916
26917   if test "x$ac_ct_CXX" = x; then
26918     CXX="g++"
26919   else
26920     case $cross_compiling:$ac_tool_warned in
26921 yes:)
26922 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26923 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26924 ac_tool_warned=yes ;;
26925 esac
26926     CXX=$ac_ct_CXX
26927   fi
26928 fi
26929
26930   fi
26931 fi
26932 # Provide some information about the compiler.
26933 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
26934 set X $ac_compile
26935 ac_compiler=$2
26936 for ac_option in --version -v -V -qversion; do
26937   { { ac_try="$ac_compiler $ac_option >&5"
26938 case "(($ac_try" in
26939   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26940   *) ac_try_echo=$ac_try;;
26941 esac
26942 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
26943 $as_echo "$ac_try_echo"; } >&5
26944   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
26945   ac_status=$?
26946   if test -s conftest.err; then
26947     sed '10a\
26948 ... rest of stderr output deleted ...
26949          10q' conftest.err >conftest.er1
26950     cat conftest.er1 >&5
26951   fi
26952   rm -f conftest.er1 conftest.err
26953   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26954   test $ac_status = 0; }
26955 done
26956
26957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
26958 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
26959 if ${ac_cv_cxx_compiler_gnu+:} false; then :
26960   $as_echo_n "(cached) " >&6
26961 else
26962   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26963 /* end confdefs.h.  */
26964
26965 int
26966 main ()
26967 {
26968 #ifndef __GNUC__
26969        choke me
26970 #endif
26971
26972   ;
26973   return 0;
26974 }
26975 _ACEOF
26976 if ac_fn_cxx_try_compile "$LINENO"; then :
26977   ac_compiler_gnu=yes
26978 else
26979   ac_compiler_gnu=no
26980 fi
26981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26982 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
26983
26984 fi
26985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
26986 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
26987 if test $ac_compiler_gnu = yes; then
26988   GXX=yes
26989 else
26990   GXX=
26991 fi
26992 ac_test_CXXFLAGS=${CXXFLAGS+set}
26993 ac_save_CXXFLAGS=$CXXFLAGS
26994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
26995 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
26996 if ${ac_cv_prog_cxx_g+:} false; then :
26997   $as_echo_n "(cached) " >&6
26998 else
26999   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
27000    ac_cxx_werror_flag=yes
27001    ac_cv_prog_cxx_g=no
27002    CXXFLAGS="-g"
27003    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27004 /* end confdefs.h.  */
27005
27006 int
27007 main ()
27008 {
27009
27010   ;
27011   return 0;
27012 }
27013 _ACEOF
27014 if ac_fn_cxx_try_compile "$LINENO"; then :
27015   ac_cv_prog_cxx_g=yes
27016 else
27017   CXXFLAGS=""
27018       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27019 /* end confdefs.h.  */
27020
27021 int
27022 main ()
27023 {
27024
27025   ;
27026   return 0;
27027 }
27028 _ACEOF
27029 if ac_fn_cxx_try_compile "$LINENO"; then :
27030
27031 else
27032   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
27033          CXXFLAGS="-g"
27034          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27035 /* end confdefs.h.  */
27036
27037 int
27038 main ()
27039 {
27040
27041   ;
27042   return 0;
27043 }
27044 _ACEOF
27045 if ac_fn_cxx_try_compile "$LINENO"; then :
27046   ac_cv_prog_cxx_g=yes
27047 fi
27048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27049 fi
27050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27051 fi
27052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27053    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
27054 fi
27055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
27056 $as_echo "$ac_cv_prog_cxx_g" >&6; }
27057 if test "$ac_test_CXXFLAGS" = set; then
27058   CXXFLAGS=$ac_save_CXXFLAGS
27059 elif test $ac_cv_prog_cxx_g = yes; then
27060   if test "$GXX" = yes; then
27061     CXXFLAGS="-g -O2"
27062   else
27063     CXXFLAGS="-g"
27064   fi
27065 else
27066   if test "$GXX" = yes; then
27067     CXXFLAGS="-O2"
27068   else
27069     CXXFLAGS=
27070   fi
27071 fi
27072 ac_ext=c
27073 ac_cpp='$CPP $CPPFLAGS'
27074 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27075 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27076 ac_compiler_gnu=$ac_cv_c_compiler_gnu
27077
27078 depcc="$CXX"  am_compiler_list=
27079
27080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
27081 $as_echo_n "checking dependency style of $depcc... " >&6; }
27082 if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
27083   $as_echo_n "(cached) " >&6
27084 else
27085   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
27086   # We make a subdir and do the tests there.  Otherwise we can end up
27087   # making bogus files that we don't know about and never remove.  For
27088   # instance it was reported that on HP-UX the gcc test will end up
27089   # making a dummy file named 'D' -- because '-MD' means "put the output
27090   # in D".
27091   rm -rf conftest.dir
27092   mkdir conftest.dir
27093   # Copy depcomp to subdir because otherwise we won't find it if we're
27094   # using a relative directory.
27095   cp "$am_depcomp" conftest.dir
27096   cd conftest.dir
27097   # We will build objects and dependencies in a subdirectory because
27098   # it helps to detect inapplicable dependency modes.  For instance
27099   # both Tru64's cc and ICC support -MD to output dependencies as a
27100   # side effect of compilation, but ICC will put the dependencies in
27101   # the current directory while Tru64 will put them in the object
27102   # directory.
27103   mkdir sub
27104
27105   am_cv_CXX_dependencies_compiler_type=none
27106   if test "$am_compiler_list" = ""; then
27107      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
27108   fi
27109   am__universal=false
27110   case " $depcc " in #(
27111      *\ -arch\ *\ -arch\ *) am__universal=true ;;
27112      esac
27113
27114   for depmode in $am_compiler_list; do
27115     # Setup a source with many dependencies, because some compilers
27116     # like to wrap large dependency lists on column 80 (with \), and
27117     # we should not choose a depcomp mode which is confused by this.
27118     #
27119     # We need to recreate these files for each test, as the compiler may
27120     # overwrite some of them when testing with obscure command lines.
27121     # This happens at least with the AIX C compiler.
27122     : > sub/conftest.c
27123     for i in 1 2 3 4 5 6; do
27124       echo '#include "conftst'$i'.h"' >> sub/conftest.c
27125       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
27126       # Solaris 10 /bin/sh.
27127       echo '/* dummy */' > sub/conftst$i.h
27128     done
27129     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
27130
27131     # We check with '-c' and '-o' for the sake of the "dashmstdout"
27132     # mode.  It turns out that the SunPro C++ compiler does not properly
27133     # handle '-M -o', and we need to detect this.  Also, some Intel
27134     # versions had trouble with output in subdirs.
27135     am__obj=sub/conftest.${OBJEXT-o}
27136     am__minus_obj="-o $am__obj"
27137     case $depmode in
27138     gcc)
27139       # This depmode causes a compiler race in universal mode.
27140       test "$am__universal" = false || continue
27141       ;;
27142     nosideeffect)
27143       # After this tag, mechanisms are not by side-effect, so they'll
27144       # only be used when explicitly requested.
27145       if test "x$enable_dependency_tracking" = xyes; then
27146         continue
27147       else
27148         break
27149       fi
27150       ;;
27151     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
27152       # This compiler won't grok '-c -o', but also, the minuso test has
27153       # not run yet.  These depmodes are late enough in the game, and
27154       # so weak that their functioning should not be impacted.
27155       am__obj=conftest.${OBJEXT-o}
27156       am__minus_obj=
27157       ;;
27158     none) break ;;
27159     esac
27160     if depmode=$depmode \
27161        source=sub/conftest.c object=$am__obj \
27162        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
27163        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
27164          >/dev/null 2>conftest.err &&
27165        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
27166        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
27167        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
27168        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
27169       # icc doesn't choke on unknown options, it will just issue warnings
27170       # or remarks (even with -Werror).  So we grep stderr for any message
27171       # that says an option was ignored or not supported.
27172       # When given -MP, icc 7.0 and 7.1 complain thusly:
27173       #   icc: Command line warning: ignoring option '-M'; no argument required
27174       # The diagnosis changed in icc 8.0:
27175       #   icc: Command line remark: option '-MP' not supported
27176       if (grep 'ignoring option' conftest.err ||
27177           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
27178         am_cv_CXX_dependencies_compiler_type=$depmode
27179         break
27180       fi
27181     fi
27182   done
27183
27184   cd ..
27185   rm -rf conftest.dir
27186 else
27187   am_cv_CXX_dependencies_compiler_type=none
27188 fi
27189
27190 fi
27191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
27192 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
27193 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
27194
27195  if
27196   test "x$enable_dependency_tracking" != xno \
27197   && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
27198   am__fastdepCXX_TRUE=
27199   am__fastdepCXX_FALSE='#'
27200 else
27201   am__fastdepCXX_TRUE='#'
27202   am__fastdepCXX_FALSE=
27203 fi
27204
27205
27206
27207
27208 func_stripname_cnf ()
27209 {
27210   case ${2} in
27211   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
27212   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
27213   esac
27214 } # func_stripname_cnf
27215
27216       if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
27217     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
27218     (test "X$CXX" != "Xg++"))) ; then
27219   ac_ext=cpp
27220 ac_cpp='$CXXCPP $CPPFLAGS'
27221 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27222 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27223 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
27225 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
27226 if test -z "$CXXCPP"; then
27227   if ${ac_cv_prog_CXXCPP+:} false; then :
27228   $as_echo_n "(cached) " >&6
27229 else
27230       # Double quotes because CXXCPP needs to be expanded
27231     for CXXCPP in "$CXX -E" "/lib/cpp"
27232     do
27233       ac_preproc_ok=false
27234 for ac_cxx_preproc_warn_flag in '' yes
27235 do
27236   # Use a header file that comes with gcc, so configuring glibc
27237   # with a fresh cross-compiler works.
27238   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27239   # <limits.h> exists even on freestanding compilers.
27240   # On the NeXT, cc -E runs the code through the compiler's parser,
27241   # not just through cpp. "Syntax error" is here to catch this case.
27242   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27243 /* end confdefs.h.  */
27244 #ifdef __STDC__
27245 # include <limits.h>
27246 #else
27247 # include <assert.h>
27248 #endif
27249                      Syntax error
27250 _ACEOF
27251 if ac_fn_cxx_try_cpp "$LINENO"; then :
27252
27253 else
27254   # Broken: fails on valid input.
27255 continue
27256 fi
27257 rm -f conftest.err conftest.i conftest.$ac_ext
27258
27259   # OK, works on sane cases.  Now check whether nonexistent headers
27260   # can be detected and how.
27261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27262 /* end confdefs.h.  */
27263 #include <ac_nonexistent.h>
27264 _ACEOF
27265 if ac_fn_cxx_try_cpp "$LINENO"; then :
27266   # Broken: success on invalid input.
27267 continue
27268 else
27269   # Passes both tests.
27270 ac_preproc_ok=:
27271 break
27272 fi
27273 rm -f conftest.err conftest.i conftest.$ac_ext
27274
27275 done
27276 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
27277 rm -f conftest.i conftest.err conftest.$ac_ext
27278 if $ac_preproc_ok; then :
27279   break
27280 fi
27281
27282     done
27283     ac_cv_prog_CXXCPP=$CXXCPP
27284
27285 fi
27286   CXXCPP=$ac_cv_prog_CXXCPP
27287 else
27288   ac_cv_prog_CXXCPP=$CXXCPP
27289 fi
27290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
27291 $as_echo "$CXXCPP" >&6; }
27292 ac_preproc_ok=false
27293 for ac_cxx_preproc_warn_flag in '' yes
27294 do
27295   # Use a header file that comes with gcc, so configuring glibc
27296   # with a fresh cross-compiler works.
27297   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27298   # <limits.h> exists even on freestanding compilers.
27299   # On the NeXT, cc -E runs the code through the compiler's parser,
27300   # not just through cpp. "Syntax error" is here to catch this case.
27301   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27302 /* end confdefs.h.  */
27303 #ifdef __STDC__
27304 # include <limits.h>
27305 #else
27306 # include <assert.h>
27307 #endif
27308                      Syntax error
27309 _ACEOF
27310 if ac_fn_cxx_try_cpp "$LINENO"; then :
27311
27312 else
27313   # Broken: fails on valid input.
27314 continue
27315 fi
27316 rm -f conftest.err conftest.i conftest.$ac_ext
27317
27318   # OK, works on sane cases.  Now check whether nonexistent headers
27319   # can be detected and how.
27320   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27321 /* end confdefs.h.  */
27322 #include <ac_nonexistent.h>
27323 _ACEOF
27324 if ac_fn_cxx_try_cpp "$LINENO"; then :
27325   # Broken: success on invalid input.
27326 continue
27327 else
27328   # Passes both tests.
27329 ac_preproc_ok=:
27330 break
27331 fi
27332 rm -f conftest.err conftest.i conftest.$ac_ext
27333
27334 done
27335 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
27336 rm -f conftest.i conftest.err conftest.$ac_ext
27337 if $ac_preproc_ok; then :
27338
27339 else
27340   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27341 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27342 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
27343 See \`config.log' for more details" "$LINENO" 5; }
27344 fi
27345
27346 ac_ext=c
27347 ac_cpp='$CPP $CPPFLAGS'
27348 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27349 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27350 ac_compiler_gnu=$ac_cv_c_compiler_gnu
27351
27352 else
27353   _lt_caught_CXX_error=yes
27354 fi
27355
27356 ac_ext=cpp
27357 ac_cpp='$CXXCPP $CPPFLAGS'
27358 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27359 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27360 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27361
27362 archive_cmds_need_lc_CXX=no
27363 allow_undefined_flag_CXX=
27364 always_export_symbols_CXX=no
27365 archive_expsym_cmds_CXX=
27366 compiler_needs_object_CXX=no
27367 export_dynamic_flag_spec_CXX=
27368 hardcode_direct_CXX=no
27369 hardcode_direct_absolute_CXX=no
27370 hardcode_libdir_flag_spec_CXX=
27371 hardcode_libdir_flag_spec_ld_CXX=
27372 hardcode_libdir_separator_CXX=
27373 hardcode_minus_L_CXX=no
27374 hardcode_shlibpath_var_CXX=unsupported
27375 hardcode_automatic_CXX=no
27376 inherit_rpath_CXX=no
27377 module_cmds_CXX=
27378 module_expsym_cmds_CXX=
27379 link_all_deplibs_CXX=unknown
27380 old_archive_cmds_CXX=$old_archive_cmds
27381 reload_flag_CXX=$reload_flag
27382 reload_cmds_CXX=$reload_cmds
27383 no_undefined_flag_CXX=
27384 whole_archive_flag_spec_CXX=
27385 enable_shared_with_static_runtimes_CXX=no
27386
27387 # Source file extension for C++ test sources.
27388 ac_ext=cpp
27389
27390 # Object file extension for compiled C++ test sources.
27391 objext=o
27392 objext_CXX=$objext
27393
27394 # No sense in running all these tests if we already determined that
27395 # the CXX compiler isn't working.  Some variables (like enable_shared)
27396 # are currently assumed to apply to all compilers on this platform,
27397 # and will be corrupted by setting them based on a non-working compiler.
27398 if test "$_lt_caught_CXX_error" != yes; then
27399   # Code to be used in simple compile tests
27400   lt_simple_compile_test_code="int some_variable = 0;"
27401
27402   # Code to be used in simple link tests
27403   lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
27404
27405   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
27406
27407
27408
27409
27410
27411
27412 # If no C compiler was specified, use CC.
27413 LTCC=${LTCC-"$CC"}
27414
27415 # If no C compiler flags were specified, use CFLAGS.
27416 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
27417
27418 # Allow CC to be a program name with arguments.
27419 compiler=$CC
27420
27421
27422   # save warnings/boilerplate of simple test code
27423   ac_outfile=conftest.$ac_objext
27424 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
27425 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
27426 _lt_compiler_boilerplate=`cat conftest.err`
27427 $RM conftest*
27428
27429   ac_outfile=conftest.$ac_objext
27430 echo "$lt_simple_link_test_code" >conftest.$ac_ext
27431 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
27432 _lt_linker_boilerplate=`cat conftest.err`
27433 $RM -r conftest*
27434
27435
27436   # Allow CC to be a program name with arguments.
27437   lt_save_CC=$CC
27438   lt_save_CFLAGS=$CFLAGS
27439   lt_save_LD=$LD
27440   lt_save_GCC=$GCC
27441   GCC=$GXX
27442   lt_save_with_gnu_ld=$with_gnu_ld
27443   lt_save_path_LD=$lt_cv_path_LD
27444   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
27445     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
27446   else
27447     $as_unset lt_cv_prog_gnu_ld
27448   fi
27449   if test -n "${lt_cv_path_LDCXX+set}"; then
27450     lt_cv_path_LD=$lt_cv_path_LDCXX
27451   else
27452     $as_unset lt_cv_path_LD
27453   fi
27454   test -z "${LDCXX+set}" || LD=$LDCXX
27455   CC=${CXX-"c++"}
27456   CFLAGS=$CXXFLAGS
27457   compiler=$CC
27458   compiler_CXX=$CC
27459   for cc_temp in $compiler""; do
27460   case $cc_temp in
27461     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
27462     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
27463     \-*) ;;
27464     *) break;;
27465   esac
27466 done
27467 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
27468
27469
27470   if test -n "$compiler"; then
27471     # We don't want -fno-exception when compiling C++ code, so set the
27472     # no_builtin_flag separately
27473     if test "$GXX" = yes; then
27474       lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
27475     else
27476       lt_prog_compiler_no_builtin_flag_CXX=
27477     fi
27478
27479     if test "$GXX" = yes; then
27480       # Set up default GNU C++ configuration
27481
27482
27483
27484 # Check whether --with-gnu-ld was given.
27485 if test "${with_gnu_ld+set}" = set; then :
27486   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
27487 else
27488   with_gnu_ld=no
27489 fi
27490
27491 ac_prog=ld
27492 if test "$GCC" = yes; then
27493   # Check if gcc -print-prog-name=ld gives a path.
27494   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
27495 $as_echo_n "checking for ld used by $CC... " >&6; }
27496   case $host in
27497   *-*-mingw*)
27498     # gcc leaves a trailing carriage return which upsets mingw
27499     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
27500   *)
27501     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
27502   esac
27503   case $ac_prog in
27504     # Accept absolute paths.
27505     [\\/]* | ?:[\\/]*)
27506       re_direlt='/[^/][^/]*/\.\./'
27507       # Canonicalize the pathname of ld
27508       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
27509       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
27510         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
27511       done
27512       test -z "$LD" && LD="$ac_prog"
27513       ;;
27514   "")
27515     # If it fails, then pretend we aren't using GCC.
27516     ac_prog=ld
27517     ;;
27518   *)
27519     # If it is relative, then search for the first ld in PATH.
27520     with_gnu_ld=unknown
27521     ;;
27522   esac
27523 elif test "$with_gnu_ld" = yes; then
27524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
27525 $as_echo_n "checking for GNU ld... " >&6; }
27526 else
27527   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
27528 $as_echo_n "checking for non-GNU ld... " >&6; }
27529 fi
27530 if ${lt_cv_path_LD+:} false; then :
27531   $as_echo_n "(cached) " >&6
27532 else
27533   if test -z "$LD"; then
27534   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
27535   for ac_dir in $PATH; do
27536     IFS="$lt_save_ifs"
27537     test -z "$ac_dir" && ac_dir=.
27538     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
27539       lt_cv_path_LD="$ac_dir/$ac_prog"
27540       # Check to see if the program is GNU ld.  I'd rather use --version,
27541       # but apparently some variants of GNU ld only accept -v.
27542       # Break only if it was the GNU/non-GNU ld that we prefer.
27543       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
27544       *GNU* | *'with BFD'*)
27545         test "$with_gnu_ld" != no && break
27546         ;;
27547       *)
27548         test "$with_gnu_ld" != yes && break
27549         ;;
27550       esac
27551     fi
27552   done
27553   IFS="$lt_save_ifs"
27554 else
27555   lt_cv_path_LD="$LD" # Let the user override the test with a path.
27556 fi
27557 fi
27558
27559 LD="$lt_cv_path_LD"
27560 if test -n "$LD"; then
27561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
27562 $as_echo "$LD" >&6; }
27563 else
27564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27565 $as_echo "no" >&6; }
27566 fi
27567 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
27568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
27569 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
27570 if ${lt_cv_prog_gnu_ld+:} false; then :
27571   $as_echo_n "(cached) " >&6
27572 else
27573   # I'd rather use --version here, but apparently some GNU lds only accept -v.
27574 case `$LD -v 2>&1 </dev/null` in
27575 *GNU* | *'with BFD'*)
27576   lt_cv_prog_gnu_ld=yes
27577   ;;
27578 *)
27579   lt_cv_prog_gnu_ld=no
27580   ;;
27581 esac
27582 fi
27583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
27584 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
27585 with_gnu_ld=$lt_cv_prog_gnu_ld
27586
27587
27588
27589
27590
27591
27592
27593       # Check if GNU C++ uses GNU ld as the underlying linker, since the
27594       # archiving commands below assume that GNU ld is being used.
27595       if test "$with_gnu_ld" = yes; then
27596         archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
27597         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'
27598
27599         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
27600         export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
27601
27602         # If archive_cmds runs LD, not CC, wlarc should be empty
27603         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
27604         #     investigate it a little bit more. (MM)
27605         wlarc='${wl}'
27606
27607         # ancient GNU ld didn't support --whole-archive et. al.
27608         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
27609           $GREP 'no-whole-archive' > /dev/null; then
27610           whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
27611         else
27612           whole_archive_flag_spec_CXX=
27613         fi
27614       else
27615         with_gnu_ld=no
27616         wlarc=
27617
27618         # A generic and very simple default shared library creation
27619         # command for GNU C++ for the case where it uses the native
27620         # linker, instead of GNU ld.  If possible, this setting should
27621         # overridden to take advantage of the native linker features on
27622         # the platform it is being used on.
27623         archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
27624       fi
27625
27626       # Commands to make compiler produce verbose output that lists
27627       # what "hidden" libraries, object files and flags are used when
27628       # linking a shared library.
27629       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
27630
27631     else
27632       GXX=no
27633       with_gnu_ld=no
27634       wlarc=
27635     fi
27636
27637     # PORTME: fill in a description of your system's C++ link characteristics
27638     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
27639 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
27640     ld_shlibs_CXX=yes
27641     case $host_os in
27642       aix3*)
27643         # FIXME: insert proper C++ library support
27644         ld_shlibs_CXX=no
27645         ;;
27646       aix[4-9]*)
27647         if test "$host_cpu" = ia64; then
27648           # On IA64, the linker does run time linking by default, so we don't
27649           # have to do anything special.
27650           aix_use_runtimelinking=no
27651           exp_sym_flag='-Bexport'
27652           no_entry_flag=""
27653         else
27654           aix_use_runtimelinking=no
27655
27656           # Test if we are trying to use run time linking or normal
27657           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
27658           # need to do runtime linking.
27659           case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
27660             for ld_flag in $LDFLAGS; do
27661               case $ld_flag in
27662               *-brtl*)
27663                 aix_use_runtimelinking=yes
27664                 break
27665                 ;;
27666               esac
27667             done
27668             ;;
27669           esac
27670
27671           exp_sym_flag='-bexport'
27672           no_entry_flag='-bnoentry'
27673         fi
27674
27675         # When large executables or shared objects are built, AIX ld can
27676         # have problems creating the table of contents.  If linking a library
27677         # or program results in "error TOC overflow" add -mminimal-toc to
27678         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
27679         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
27680
27681         archive_cmds_CXX=''
27682         hardcode_direct_CXX=yes
27683         hardcode_direct_absolute_CXX=yes
27684         hardcode_libdir_separator_CXX=':'
27685         link_all_deplibs_CXX=yes
27686         file_list_spec_CXX='${wl}-f,'
27687
27688         if test "$GXX" = yes; then
27689           case $host_os in aix4.[012]|aix4.[012].*)
27690           # We only want to do this on AIX 4.2 and lower, the check
27691           # below for broken collect2 doesn't work under 4.3+
27692           collect2name=`${CC} -print-prog-name=collect2`
27693           if test -f "$collect2name" &&
27694              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
27695           then
27696             # We have reworked collect2
27697             :
27698           else
27699             # We have old collect2
27700             hardcode_direct_CXX=unsupported
27701             # It fails to find uninstalled libraries when the uninstalled
27702             # path is not listed in the libpath.  Setting hardcode_minus_L
27703             # to unsupported forces relinking
27704             hardcode_minus_L_CXX=yes
27705             hardcode_libdir_flag_spec_CXX='-L$libdir'
27706             hardcode_libdir_separator_CXX=
27707           fi
27708           esac
27709           shared_flag='-shared'
27710           if test "$aix_use_runtimelinking" = yes; then
27711             shared_flag="$shared_flag "'${wl}-G'
27712           fi
27713         else
27714           # not using gcc
27715           if test "$host_cpu" = ia64; then
27716           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
27717           # chokes on -Wl,-G. The following line is correct:
27718           shared_flag='-G'
27719           else
27720             if test "$aix_use_runtimelinking" = yes; then
27721               shared_flag='${wl}-G'
27722             else
27723               shared_flag='${wl}-bM:SRE'
27724             fi
27725           fi
27726         fi
27727
27728         export_dynamic_flag_spec_CXX='${wl}-bexpall'
27729         # It seems that -bexpall does not export symbols beginning with
27730         # underscore (_), so it is better to generate a list of symbols to
27731         # export.
27732         always_export_symbols_CXX=yes
27733         if test "$aix_use_runtimelinking" = yes; then
27734           # Warning - without using the other runtime loading flags (-brtl),
27735           # -berok will link without error, but may produce a broken library.
27736           allow_undefined_flag_CXX='-berok'
27737           # Determine the default libpath from the value encoded in an empty
27738           # executable.
27739           if test "${lt_cv_aix_libpath+set}" = set; then
27740   aix_libpath=$lt_cv_aix_libpath
27741 else
27742   if ${lt_cv_aix_libpath__CXX+:} false; then :
27743   $as_echo_n "(cached) " >&6
27744 else
27745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27746 /* end confdefs.h.  */
27747
27748 int
27749 main ()
27750 {
27751
27752   ;
27753   return 0;
27754 }
27755 _ACEOF
27756 if ac_fn_cxx_try_link "$LINENO"; then :
27757
27758   lt_aix_libpath_sed='
27759       /Import File Strings/,/^$/ {
27760           /^0/ {
27761               s/^0  *\([^ ]*\) *$/\1/
27762               p
27763           }
27764       }'
27765   lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
27766   # Check for a 64-bit object if we didn't find anything.
27767   if test -z "$lt_cv_aix_libpath__CXX"; then
27768     lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
27769   fi
27770 fi
27771 rm -f core conftest.err conftest.$ac_objext \
27772     conftest$ac_exeext conftest.$ac_ext
27773   if test -z "$lt_cv_aix_libpath__CXX"; then
27774     lt_cv_aix_libpath__CXX="/usr/lib:/lib"
27775   fi
27776
27777 fi
27778
27779   aix_libpath=$lt_cv_aix_libpath__CXX
27780 fi
27781
27782           hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
27783
27784           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"
27785         else
27786           if test "$host_cpu" = ia64; then
27787             hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
27788             allow_undefined_flag_CXX="-z nodefs"
27789             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"
27790           else
27791             # Determine the default libpath from the value encoded in an
27792             # empty executable.
27793             if test "${lt_cv_aix_libpath+set}" = set; then
27794   aix_libpath=$lt_cv_aix_libpath
27795 else
27796   if ${lt_cv_aix_libpath__CXX+:} false; then :
27797   $as_echo_n "(cached) " >&6
27798 else
27799   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27800 /* end confdefs.h.  */
27801
27802 int
27803 main ()
27804 {
27805
27806   ;
27807   return 0;
27808 }
27809 _ACEOF
27810 if ac_fn_cxx_try_link "$LINENO"; then :
27811
27812   lt_aix_libpath_sed='
27813       /Import File Strings/,/^$/ {
27814           /^0/ {
27815               s/^0  *\([^ ]*\) *$/\1/
27816               p
27817           }
27818       }'
27819   lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
27820   # Check for a 64-bit object if we didn't find anything.
27821   if test -z "$lt_cv_aix_libpath__CXX"; then
27822     lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
27823   fi
27824 fi
27825 rm -f core conftest.err conftest.$ac_objext \
27826     conftest$ac_exeext conftest.$ac_ext
27827   if test -z "$lt_cv_aix_libpath__CXX"; then
27828     lt_cv_aix_libpath__CXX="/usr/lib:/lib"
27829   fi
27830
27831 fi
27832
27833   aix_libpath=$lt_cv_aix_libpath__CXX
27834 fi
27835
27836             hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
27837             # Warning - without using the other run time loading flags,
27838             # -berok will link without error, but may produce a broken library.
27839             no_undefined_flag_CXX=' ${wl}-bernotok'
27840             allow_undefined_flag_CXX=' ${wl}-berok'
27841             if test "$with_gnu_ld" = yes; then
27842               # We only use this code for GNU lds that support --whole-archive.
27843               whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
27844             else
27845               # Exported symbols can be pulled into shared objects from archives
27846               whole_archive_flag_spec_CXX='$convenience'
27847             fi
27848             archive_cmds_need_lc_CXX=yes
27849             # This is similar to how AIX traditionally builds its shared
27850             # libraries.
27851             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'
27852           fi
27853         fi
27854         ;;
27855
27856       beos*)
27857         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
27858           allow_undefined_flag_CXX=unsupported
27859           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
27860           # support --undefined.  This deserves some investigation.  FIXME
27861           archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
27862         else
27863           ld_shlibs_CXX=no
27864         fi
27865         ;;
27866
27867       chorus*)
27868         case $cc_basename in
27869           *)
27870           # FIXME: insert proper C++ library support
27871           ld_shlibs_CXX=no
27872           ;;
27873         esac
27874         ;;
27875
27876       cygwin* | mingw* | pw32* | cegcc*)
27877         case $GXX,$cc_basename in
27878         ,cl* | no,cl*)
27879           # Native MSVC
27880           # hardcode_libdir_flag_spec is actually meaningless, as there is
27881           # no search path for DLLs.
27882           hardcode_libdir_flag_spec_CXX=' '
27883           allow_undefined_flag_CXX=unsupported
27884           always_export_symbols_CXX=yes
27885           file_list_spec_CXX='@'
27886           # Tell ltmain to make .lib files, not .a files.
27887           libext=lib
27888           # Tell ltmain to make .dll files, not .so files.
27889           shrext_cmds=".dll"
27890           # FIXME: Setting linknames here is a bad hack.
27891           archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
27892           archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
27893               $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
27894             else
27895               $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
27896             fi~
27897             $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
27898             linknames='
27899           # The linker will not automatically build a static lib if we build a DLL.
27900           # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
27901           enable_shared_with_static_runtimes_CXX=yes
27902           # Don't use ranlib
27903           old_postinstall_cmds_CXX='chmod 644 $oldlib'
27904           postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
27905             lt_tool_outputfile="@TOOL_OUTPUT@"~
27906             case $lt_outputfile in
27907               *.exe|*.EXE) ;;
27908               *)
27909                 lt_outputfile="$lt_outputfile.exe"
27910                 lt_tool_outputfile="$lt_tool_outputfile.exe"
27911                 ;;
27912             esac~
27913             func_to_tool_file "$lt_outputfile"~
27914             if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
27915               $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
27916               $RM "$lt_outputfile.manifest";
27917             fi'
27918           ;;
27919         *)
27920           # g++
27921           # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
27922           # as there is no search path for DLLs.
27923           hardcode_libdir_flag_spec_CXX='-L$libdir'
27924           export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
27925           allow_undefined_flag_CXX=unsupported
27926           always_export_symbols_CXX=no
27927           enable_shared_with_static_runtimes_CXX=yes
27928
27929           if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
27930             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'
27931             # If the export-symbols file already is a .def file (1st line
27932             # is EXPORTS), use it as is; otherwise, prepend...
27933             archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
27934               cp $export_symbols $output_objdir/$soname.def;
27935             else
27936               echo EXPORTS > $output_objdir/$soname.def;
27937               cat $export_symbols >> $output_objdir/$soname.def;
27938             fi~
27939             $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'
27940           else
27941             ld_shlibs_CXX=no
27942           fi
27943           ;;
27944         esac
27945         ;;
27946       darwin* | rhapsody*)
27947
27948
27949   archive_cmds_need_lc_CXX=no
27950   hardcode_direct_CXX=no
27951   hardcode_automatic_CXX=yes
27952   hardcode_shlibpath_var_CXX=unsupported
27953   if test "$lt_cv_ld_force_load" = "yes"; then
27954     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\"`'
27955   else
27956     whole_archive_flag_spec_CXX=''
27957   fi
27958   link_all_deplibs_CXX=yes
27959   allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
27960   case $cc_basename in
27961      ifort*) _lt_dar_can_shared=yes ;;
27962      *) _lt_dar_can_shared=$GCC ;;
27963   esac
27964   if test "$_lt_dar_can_shared" = "yes"; then
27965     output_verbose_link_cmd=func_echo_all
27966     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}"
27967     module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
27968     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}"
27969     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}"
27970        if test "$lt_cv_apple_cc_single_mod" != "yes"; then
27971       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}"
27972       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}"
27973     fi
27974
27975   else
27976   ld_shlibs_CXX=no
27977   fi
27978
27979         ;;
27980
27981       dgux*)
27982         case $cc_basename in
27983           ec++*)
27984             # FIXME: insert proper C++ library support
27985             ld_shlibs_CXX=no
27986             ;;
27987           ghcx*)
27988             # Green Hills C++ Compiler
27989             # FIXME: insert proper C++ library support
27990             ld_shlibs_CXX=no
27991             ;;
27992           *)
27993             # FIXME: insert proper C++ library support
27994             ld_shlibs_CXX=no
27995             ;;
27996         esac
27997         ;;
27998
27999       freebsd[12]*)
28000         # C++ shared libraries reported to be fairly broken before
28001         # switch to ELF
28002         ld_shlibs_CXX=no
28003         ;;
28004
28005       freebsd-elf*)
28006         archive_cmds_need_lc_CXX=no
28007         ;;
28008
28009       freebsd* | dragonfly*)
28010         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
28011         # conventions
28012         ld_shlibs_CXX=yes
28013         ;;
28014
28015       gnu*)
28016         ;;
28017
28018       haiku*)
28019         archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28020         link_all_deplibs_CXX=yes
28021         ;;
28022
28023       hpux9*)
28024         hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
28025         hardcode_libdir_separator_CXX=:
28026         export_dynamic_flag_spec_CXX='${wl}-E'
28027         hardcode_direct_CXX=yes
28028         hardcode_minus_L_CXX=yes # Not in the search PATH,
28029                                              # but as the default
28030                                              # location of the library.
28031
28032         case $cc_basename in
28033           CC*)
28034             # FIXME: insert proper C++ library support
28035             ld_shlibs_CXX=no
28036             ;;
28037           aCC*)
28038             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'
28039             # Commands to make compiler produce verbose output that lists
28040             # what "hidden" libraries, object files and flags are used when
28041             # linking a shared library.
28042             #
28043             # There doesn't appear to be a way to prevent this compiler from
28044             # explicitly linking system object files so we need to strip them
28045             # from the output so that they don't get included in the library
28046             # dependencies.
28047             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"'
28048             ;;
28049           *)
28050             if test "$GXX" = yes; then
28051               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'
28052             else
28053               # FIXME: insert proper C++ library support
28054               ld_shlibs_CXX=no
28055             fi
28056             ;;
28057         esac
28058         ;;
28059
28060       hpux10*|hpux11*)
28061         if test $with_gnu_ld = no; then
28062           hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
28063           hardcode_libdir_separator_CXX=:
28064
28065           case $host_cpu in
28066             hppa*64*|ia64*)
28067               ;;
28068             *)
28069               export_dynamic_flag_spec_CXX='${wl}-E'
28070               ;;
28071           esac
28072         fi
28073         case $host_cpu in
28074           hppa*64*|ia64*)
28075             hardcode_direct_CXX=no
28076             hardcode_shlibpath_var_CXX=no
28077             ;;
28078           *)
28079             hardcode_direct_CXX=yes
28080             hardcode_direct_absolute_CXX=yes
28081             hardcode_minus_L_CXX=yes # Not in the search PATH,
28082                                                  # but as the default
28083                                                  # location of the library.
28084             ;;
28085         esac
28086
28087         case $cc_basename in
28088           CC*)
28089             # FIXME: insert proper C++ library support
28090             ld_shlibs_CXX=no
28091             ;;
28092           aCC*)
28093             case $host_cpu in
28094               hppa*64*)
28095                 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28096                 ;;
28097               ia64*)
28098                 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28099                 ;;
28100               *)
28101                 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28102                 ;;
28103             esac
28104             # Commands to make compiler produce verbose output that lists
28105             # what "hidden" libraries, object files and flags are used when
28106             # linking a shared library.
28107             #
28108             # There doesn't appear to be a way to prevent this compiler from
28109             # explicitly linking system object files so we need to strip them
28110             # from the output so that they don't get included in the library
28111             # dependencies.
28112             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"'
28113             ;;
28114           *)
28115             if test "$GXX" = yes; then
28116               if test $with_gnu_ld = no; then
28117                 case $host_cpu in
28118                   hppa*64*)
28119                     archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28120                     ;;
28121                   ia64*)
28122                     archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28123                     ;;
28124                   *)
28125                     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'
28126                     ;;
28127                 esac
28128               fi
28129             else
28130               # FIXME: insert proper C++ library support
28131               ld_shlibs_CXX=no
28132             fi
28133             ;;
28134         esac
28135         ;;
28136
28137       interix[3-9]*)
28138         hardcode_direct_CXX=no
28139         hardcode_shlibpath_var_CXX=no
28140         hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28141         export_dynamic_flag_spec_CXX='${wl}-E'
28142         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
28143         # Instead, shared libraries are loaded at an image base (0x10000000 by
28144         # default) and relocated if they conflict, which is a slow very memory
28145         # consuming and fragmenting process.  To avoid this, we pick a random,
28146         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
28147         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
28148         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'
28149         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'
28150         ;;
28151       irix5* | irix6*)
28152         case $cc_basename in
28153           CC*)
28154             # SGI C++
28155             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'
28156
28157             # Archives containing C++ object files must be created using
28158             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
28159             # necessary to make sure instantiated templates are included
28160             # in the archive.
28161             old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
28162             ;;
28163           *)
28164             if test "$GXX" = yes; then
28165               if test "$with_gnu_ld" = no; then
28166                 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'
28167               else
28168                 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'
28169               fi
28170             fi
28171             link_all_deplibs_CXX=yes
28172             ;;
28173         esac
28174         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
28175         hardcode_libdir_separator_CXX=:
28176         inherit_rpath_CXX=yes
28177         ;;
28178
28179       linux* | k*bsd*-gnu | kopensolaris*-gnu)
28180         case $cc_basename in
28181           KCC*)
28182             # Kuck and Associates, Inc. (KAI) C++ Compiler
28183
28184             # KCC will only create a shared library if the output file
28185             # ends with ".so" (or ".sl" for HP-UX), so rename the library
28186             # to its proper name (with version) after linking.
28187             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'
28188             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'
28189             # Commands to make compiler produce verbose output that lists
28190             # what "hidden" libraries, object files and flags are used when
28191             # linking a shared library.
28192             #
28193             # There doesn't appear to be a way to prevent this compiler from
28194             # explicitly linking system object files so we need to strip them
28195             # from the output so that they don't get included in the library
28196             # dependencies.
28197             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"'
28198
28199             hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28200             export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
28201
28202             # Archives containing C++ object files must be created using
28203             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
28204             old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
28205             ;;
28206           icpc* | ecpc* )
28207             # Intel C++
28208             with_gnu_ld=yes
28209             # version 8.0 and above of icpc choke on multiply defined symbols
28210             # if we add $predep_objects and $postdep_objects, however 7.1 and
28211             # earlier do not add the objects themselves.
28212             case `$CC -V 2>&1` in
28213               *"Version 7."*)
28214                 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
28215                 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'
28216                 ;;
28217               *)  # Version 8.0 or newer
28218                 tmp_idyn=
28219                 case $host_cpu in
28220                   ia64*) tmp_idyn=' -i_dynamic';;
28221                 esac
28222                 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28223                 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'
28224                 ;;
28225             esac
28226             archive_cmds_need_lc_CXX=no
28227             hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28228             export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
28229             whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
28230             ;;
28231           pgCC* | pgcpp*)
28232             # Portland Group C++ compiler
28233             case `$CC -V` in
28234             *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
28235               prelink_cmds_CXX='tpldir=Template.dir~
28236                 rm -rf $tpldir~
28237                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
28238                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
28239               old_archive_cmds_CXX='tpldir=Template.dir~
28240                 rm -rf $tpldir~
28241                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
28242                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
28243                 $RANLIB $oldlib'
28244               archive_cmds_CXX='tpldir=Template.dir~
28245                 rm -rf $tpldir~
28246                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
28247                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
28248               archive_expsym_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 ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
28252               ;;
28253             *) # Version 6 and above use weak symbols
28254               archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
28255               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'
28256               ;;
28257             esac
28258
28259             hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
28260             export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
28261             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'
28262             ;;
28263           cxx*)
28264             # Compaq C++
28265             archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
28266             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'
28267
28268             runpath_var=LD_RUN_PATH
28269             hardcode_libdir_flag_spec_CXX='-rpath $libdir'
28270             hardcode_libdir_separator_CXX=:
28271
28272             # Commands to make compiler produce verbose output that lists
28273             # what "hidden" libraries, object files and flags are used when
28274             # linking a shared library.
28275             #
28276             # There doesn't appear to be a way to prevent this compiler from
28277             # explicitly linking system object files so we need to strip them
28278             # from the output so that they don't get included in the library
28279             # dependencies.
28280             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'
28281             ;;
28282           xl* | mpixl* | bgxl*)
28283             # IBM XL 8.0 on PPC, with GNU ld
28284             hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
28285             export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
28286             archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
28287             if test "x$supports_anon_versioning" = xyes; then
28288               archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
28289                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
28290                 echo "local: *; };" >> $output_objdir/$libname.ver~
28291                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
28292             fi
28293             ;;
28294           *)
28295             case `$CC -V 2>&1 | sed 5q` in
28296             *Sun\ C*)
28297               # Sun C++ 5.9
28298               no_undefined_flag_CXX=' -zdefs'
28299               archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28300               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'
28301               hardcode_libdir_flag_spec_CXX='-R$libdir'
28302               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'
28303               compiler_needs_object_CXX=yes
28304
28305               # Not sure whether something based on
28306               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
28307               # would be better.
28308               output_verbose_link_cmd='func_echo_all'
28309
28310               # Archives containing C++ object files must be created using
28311               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
28312               # necessary to make sure instantiated templates are included
28313               # in the archive.
28314               old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
28315               ;;
28316             esac
28317             ;;
28318         esac
28319         ;;
28320
28321       lynxos*)
28322         # FIXME: insert proper C++ library support
28323         ld_shlibs_CXX=no
28324         ;;
28325
28326       m88k*)
28327         # FIXME: insert proper C++ library support
28328         ld_shlibs_CXX=no
28329         ;;
28330
28331       mvs*)
28332         case $cc_basename in
28333           cxx*)
28334             # FIXME: insert proper C++ library support
28335             ld_shlibs_CXX=no
28336             ;;
28337           *)
28338             # FIXME: insert proper C++ library support
28339             ld_shlibs_CXX=no
28340             ;;
28341         esac
28342         ;;
28343
28344       netbsd*)
28345         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
28346           archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
28347           wlarc=
28348           hardcode_libdir_flag_spec_CXX='-R$libdir'
28349           hardcode_direct_CXX=yes
28350           hardcode_shlibpath_var_CXX=no
28351         fi
28352         # Workaround some broken pre-1.5 toolchains
28353         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
28354         ;;
28355
28356       *nto* | *qnx*)
28357         ld_shlibs_CXX=yes
28358         ;;
28359
28360       openbsd2*)
28361         # C++ shared libraries are fairly broken
28362         ld_shlibs_CXX=no
28363         ;;
28364
28365       openbsd*)
28366         if test -f /usr/libexec/ld.so; then
28367           hardcode_direct_CXX=yes
28368           hardcode_shlibpath_var_CXX=no
28369           hardcode_direct_absolute_CXX=yes
28370           archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
28371           hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28372           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
28373             archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
28374             export_dynamic_flag_spec_CXX='${wl}-E'
28375             whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
28376           fi
28377           output_verbose_link_cmd=func_echo_all
28378         else
28379           ld_shlibs_CXX=no
28380         fi
28381         ;;
28382
28383       osf3* | osf4* | osf5*)
28384         case $cc_basename in
28385           KCC*)
28386             # Kuck and Associates, Inc. (KAI) C++ Compiler
28387
28388             # KCC will only create a shared library if the output file
28389             # ends with ".so" (or ".sl" for HP-UX), so rename the library
28390             # to its proper name (with version) after linking.
28391             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'
28392
28393             hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
28394             hardcode_libdir_separator_CXX=:
28395
28396             # Archives containing C++ object files must be created using
28397             # the KAI C++ compiler.
28398             case $host in
28399               osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
28400               *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
28401             esac
28402             ;;
28403           RCC*)
28404             # Rational C++ 2.4.1
28405             # FIXME: insert proper C++ library support
28406             ld_shlibs_CXX=no
28407             ;;
28408           cxx*)
28409             case $host in
28410               osf3*)
28411                 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
28412                 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'
28413                 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
28414                 ;;
28415               *)
28416                 allow_undefined_flag_CXX=' -expect_unresolved \*'
28417                 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'
28418                 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
28419                   echo "-hidden">> $lib.exp~
28420                   $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~
28421                   $RM $lib.exp'
28422                 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
28423                 ;;
28424             esac
28425
28426             hardcode_libdir_separator_CXX=:
28427
28428             # Commands to make compiler produce verbose output that lists
28429             # what "hidden" libraries, object files and flags are used when
28430             # linking a shared library.
28431             #
28432             # There doesn't appear to be a way to prevent this compiler from
28433             # explicitly linking system object files so we need to strip them
28434             # from the output so that they don't get included in the library
28435             # dependencies.
28436             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"'
28437             ;;
28438           *)
28439             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
28440               allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
28441               case $host in
28442                 osf3*)
28443                   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'
28444                   ;;
28445                 *)
28446                   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'
28447                   ;;
28448               esac
28449
28450               hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
28451               hardcode_libdir_separator_CXX=:
28452
28453               # Commands to make compiler produce verbose output that lists
28454               # what "hidden" libraries, object files and flags are used when
28455               # linking a shared library.
28456               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
28457
28458             else
28459               # FIXME: insert proper C++ library support
28460               ld_shlibs_CXX=no
28461             fi
28462             ;;
28463         esac
28464         ;;
28465
28466       psos*)
28467         # FIXME: insert proper C++ library support
28468         ld_shlibs_CXX=no
28469         ;;
28470
28471       sunos4*)
28472         case $cc_basename in
28473           CC*)
28474             # Sun C++ 4.x
28475             # FIXME: insert proper C++ library support
28476             ld_shlibs_CXX=no
28477             ;;
28478           lcc*)
28479             # Lucid
28480             # FIXME: insert proper C++ library support
28481             ld_shlibs_CXX=no
28482             ;;
28483           *)
28484             # FIXME: insert proper C++ library support
28485             ld_shlibs_CXX=no
28486             ;;
28487         esac
28488         ;;
28489
28490       solaris*)
28491         case $cc_basename in
28492           CC* | sunCC*)
28493             # Sun C++ 4.2, 5.x and Centerline C++
28494             archive_cmds_need_lc_CXX=yes
28495             no_undefined_flag_CXX=' -zdefs'
28496             archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
28497             archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
28498               $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'
28499
28500             hardcode_libdir_flag_spec_CXX='-R$libdir'
28501             hardcode_shlibpath_var_CXX=no
28502             case $host_os in
28503               solaris2.[0-5] | solaris2.[0-5].*) ;;
28504               *)
28505                 # The compiler driver will combine and reorder linker options,
28506                 # but understands `-z linker_flag'.
28507                 # Supported since Solaris 2.6 (maybe 2.5.1?)
28508                 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
28509                 ;;
28510             esac
28511             link_all_deplibs_CXX=yes
28512
28513             output_verbose_link_cmd='func_echo_all'
28514
28515             # Archives containing C++ object files must be created using
28516             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
28517             # necessary to make sure instantiated templates are included
28518             # in the archive.
28519             old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
28520             ;;
28521           gcx*)
28522             # Green Hills C++ Compiler
28523             archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
28524
28525             # The C++ compiler must be used to create the archive.
28526             old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
28527             ;;
28528           *)
28529             # GNU C++ compiler with Solaris linker
28530             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
28531               no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
28532               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
28533                 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
28534                 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
28535                   $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
28536
28537                 # Commands to make compiler produce verbose output that lists
28538                 # what "hidden" libraries, object files and flags are used when
28539                 # linking a shared library.
28540                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
28541               else
28542                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
28543                 # platform.
28544                 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
28545                 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
28546                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
28547
28548                 # Commands to make compiler produce verbose output that lists
28549                 # what "hidden" libraries, object files and flags are used when
28550                 # linking a shared library.
28551                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
28552               fi
28553
28554               hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
28555               case $host_os in
28556                 solaris2.[0-5] | solaris2.[0-5].*) ;;
28557                 *)
28558                   whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
28559                   ;;
28560               esac
28561             fi
28562             ;;
28563         esac
28564         ;;
28565
28566     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
28567       no_undefined_flag_CXX='${wl}-z,text'
28568       archive_cmds_need_lc_CXX=no
28569       hardcode_shlibpath_var_CXX=no
28570       runpath_var='LD_RUN_PATH'
28571
28572       case $cc_basename in
28573         CC*)
28574           archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28575           archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28576           ;;
28577         *)
28578           archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28579           archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28580           ;;
28581       esac
28582       ;;
28583
28584       sysv5* | sco3.2v5* | sco5v6*)
28585         # Note: We can NOT use -z defs as we might desire, because we do not
28586         # link with -lc, and that would cause any symbols used from libc to
28587         # always be unresolved, which means just about no library would
28588         # ever link correctly.  If we're not using GNU ld we use -z text
28589         # though, which does catch some bad symbols but isn't as heavy-handed
28590         # as -z defs.
28591         no_undefined_flag_CXX='${wl}-z,text'
28592         allow_undefined_flag_CXX='${wl}-z,nodefs'
28593         archive_cmds_need_lc_CXX=no
28594         hardcode_shlibpath_var_CXX=no
28595         hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
28596         hardcode_libdir_separator_CXX=':'
28597         link_all_deplibs_CXX=yes
28598         export_dynamic_flag_spec_CXX='${wl}-Bexport'
28599         runpath_var='LD_RUN_PATH'
28600
28601         case $cc_basename in
28602           CC*)
28603             archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28604             archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28605             old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
28606               '"$old_archive_cmds_CXX"
28607             reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
28608               '"$reload_cmds_CXX"
28609             ;;
28610           *)
28611             archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28612             archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
28613             ;;
28614         esac
28615       ;;
28616
28617       tandem*)
28618         case $cc_basename in
28619           NCC*)
28620             # NonStop-UX NCC 3.20
28621             # FIXME: insert proper C++ library support
28622             ld_shlibs_CXX=no
28623             ;;
28624           *)
28625             # FIXME: insert proper C++ library support
28626             ld_shlibs_CXX=no
28627             ;;
28628         esac
28629         ;;
28630
28631       vxworks*)
28632         # FIXME: insert proper C++ library support
28633         ld_shlibs_CXX=no
28634         ;;
28635
28636       *)
28637         # FIXME: insert proper C++ library support
28638         ld_shlibs_CXX=no
28639         ;;
28640     esac
28641
28642     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
28643 $as_echo "$ld_shlibs_CXX" >&6; }
28644     test "$ld_shlibs_CXX" = no && can_build_shared=no
28645
28646     GCC_CXX="$GXX"
28647     LD_CXX="$LD"
28648
28649     ## CAVEAT EMPTOR:
28650     ## There is no encapsulation within the following macros, do not change
28651     ## the running order or otherwise move them around unless you know exactly
28652     ## what you are doing...
28653     # Dependencies to place before and after the object being linked:
28654 predep_objects_CXX=
28655 postdep_objects_CXX=
28656 predeps_CXX=
28657 postdeps_CXX=
28658 compiler_lib_search_path_CXX=
28659
28660 cat > conftest.$ac_ext <<_LT_EOF
28661 class Foo
28662 {
28663 public:
28664   Foo (void) { a = 0; }
28665 private:
28666   int a;
28667 };
28668 _LT_EOF
28669
28670
28671 _lt_libdeps_save_CFLAGS=$CFLAGS
28672 case "$CC $CFLAGS " in #(
28673 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
28674 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
28675 esac
28676
28677 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
28678   (eval $ac_compile) 2>&5
28679   ac_status=$?
28680   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28681   test $ac_status = 0; }; then
28682   # Parse the compiler output and extract the necessary
28683   # objects, libraries and library flags.
28684
28685   # Sentinel used to keep track of whether or not we are before
28686   # the conftest object file.
28687   pre_test_object_deps_done=no
28688
28689   for p in `eval "$output_verbose_link_cmd"`; do
28690     case ${prev}${p} in
28691
28692     -L* | -R* | -l*)
28693        # Some compilers place space between "-{L,R}" and the path.
28694        # Remove the space.
28695        if test $p = "-L" ||
28696           test $p = "-R"; then
28697          prev=$p
28698          continue
28699        fi
28700
28701        # Expand the sysroot to ease extracting the directories later.
28702        if test -z "$prev"; then
28703          case $p in
28704          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
28705          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
28706          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
28707          esac
28708        fi
28709        case $p in
28710        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
28711        esac
28712        if test "$pre_test_object_deps_done" = no; then
28713          case ${prev} in
28714          -L | -R)
28715            # Internal compiler library paths should come after those
28716            # provided the user.  The postdeps already come after the
28717            # user supplied libs so there is no need to process them.
28718            if test -z "$compiler_lib_search_path_CXX"; then
28719              compiler_lib_search_path_CXX="${prev}${p}"
28720            else
28721              compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
28722            fi
28723            ;;
28724          # The "-l" case would never come before the object being
28725          # linked, so don't bother handling this case.
28726          esac
28727        else
28728          if test -z "$postdeps_CXX"; then
28729            postdeps_CXX="${prev}${p}"
28730          else
28731            postdeps_CXX="${postdeps_CXX} ${prev}${p}"
28732          fi
28733        fi
28734        prev=
28735        ;;
28736
28737     *.lto.$objext) ;; # Ignore GCC LTO objects
28738     *.$objext)
28739        # This assumes that the test object file only shows up
28740        # once in the compiler output.
28741        if test "$p" = "conftest.$objext"; then
28742          pre_test_object_deps_done=yes
28743          continue
28744        fi
28745
28746        if test "$pre_test_object_deps_done" = no; then
28747          if test -z "$predep_objects_CXX"; then
28748            predep_objects_CXX="$p"
28749          else
28750            predep_objects_CXX="$predep_objects_CXX $p"
28751          fi
28752        else
28753          if test -z "$postdep_objects_CXX"; then
28754            postdep_objects_CXX="$p"
28755          else
28756            postdep_objects_CXX="$postdep_objects_CXX $p"
28757          fi
28758        fi
28759        ;;
28760
28761     *) ;; # Ignore the rest.
28762
28763     esac
28764   done
28765
28766   # Clean up.
28767   rm -f a.out a.exe
28768 else
28769   echo "libtool.m4: error: problem compiling CXX test program"
28770 fi
28771
28772 $RM -f confest.$objext
28773 CFLAGS=$_lt_libdeps_save_CFLAGS
28774
28775 # PORTME: override above test on systems where it is broken
28776 case $host_os in
28777 interix[3-9]*)
28778   # Interix 3.5 installs completely hosed .la files for C++, so rather than
28779   # hack all around it, let's just trust "g++" to DTRT.
28780   predep_objects_CXX=
28781   postdep_objects_CXX=
28782   postdeps_CXX=
28783   ;;
28784
28785 linux*)
28786   case `$CC -V 2>&1 | sed 5q` in
28787   *Sun\ C*)
28788     # Sun C++ 5.9
28789
28790     # The more standards-conforming stlport4 library is
28791     # incompatible with the Cstd library. Avoid specifying
28792     # it if it's in CXXFLAGS. Ignore libCrun as
28793     # -library=stlport4 depends on it.
28794     case " $CXX $CXXFLAGS " in
28795     *" -library=stlport4 "*)
28796       solaris_use_stlport4=yes
28797       ;;
28798     esac
28799
28800     if test "$solaris_use_stlport4" != yes; then
28801       postdeps_CXX='-library=Cstd -library=Crun'
28802     fi
28803     ;;
28804   esac
28805   ;;
28806
28807 solaris*)
28808   case $cc_basename in
28809   CC* | sunCC*)
28810     # The more standards-conforming stlport4 library is
28811     # incompatible with the Cstd library. Avoid specifying
28812     # it if it's in CXXFLAGS. Ignore libCrun as
28813     # -library=stlport4 depends on it.
28814     case " $CXX $CXXFLAGS " in
28815     *" -library=stlport4 "*)
28816       solaris_use_stlport4=yes
28817       ;;
28818     esac
28819
28820     # Adding this requires a known-good setup of shared libraries for
28821     # Sun compiler versions before 5.6, else PIC objects from an old
28822     # archive will be linked into the output, leading to subtle bugs.
28823     if test "$solaris_use_stlport4" != yes; then
28824       postdeps_CXX='-library=Cstd -library=Crun'
28825     fi
28826     ;;
28827   esac
28828   ;;
28829 esac
28830
28831
28832 case " $postdeps_CXX " in
28833 *" -lc "*) archive_cmds_need_lc_CXX=no ;;
28834 esac
28835  compiler_lib_search_dirs_CXX=
28836 if test -n "${compiler_lib_search_path_CXX}"; then
28837  compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
28838 fi
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870     lt_prog_compiler_wl_CXX=
28871 lt_prog_compiler_pic_CXX=
28872 lt_prog_compiler_static_CXX=
28873
28874
28875   # C++ specific cases for pic, static, wl, etc.
28876   if test "$GXX" = yes; then
28877     lt_prog_compiler_wl_CXX='-Wl,'
28878     lt_prog_compiler_static_CXX='-static'
28879
28880     case $host_os in
28881     aix*)
28882       # All AIX code is PIC.
28883       if test "$host_cpu" = ia64; then
28884         # AIX 5 now supports IA64 processor
28885         lt_prog_compiler_static_CXX='-Bstatic'
28886       fi
28887       ;;
28888
28889     amigaos*)
28890       case $host_cpu in
28891       powerpc)
28892             # see comment about AmigaOS4 .so support
28893             lt_prog_compiler_pic_CXX='-fPIC'
28894         ;;
28895       m68k)
28896             # FIXME: we need at least 68020 code to build shared libraries, but
28897             # adding the `-m68020' flag to GCC prevents building anything better,
28898             # like `-m68040'.
28899             lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
28900         ;;
28901       esac
28902       ;;
28903
28904     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
28905       # PIC is the default for these OSes.
28906       ;;
28907     mingw* | cygwin* | os2* | pw32* | cegcc*)
28908       # This hack is so that the source file can tell whether it is being
28909       # built for inclusion in a dll (and should export symbols for example).
28910       # Although the cygwin gcc ignores -fPIC, still need this for old-style
28911       # (--disable-auto-import) libraries
28912       lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
28913       ;;
28914     darwin* | rhapsody*)
28915       # PIC is the default on this platform
28916       # Common symbols not allowed in MH_DYLIB files
28917       lt_prog_compiler_pic_CXX='-fno-common'
28918       ;;
28919     *djgpp*)
28920       # DJGPP does not support shared libraries at all
28921       lt_prog_compiler_pic_CXX=
28922       ;;
28923     haiku*)
28924       # PIC is the default for Haiku.
28925       # The "-static" flag exists, but is broken.
28926       lt_prog_compiler_static_CXX=
28927       ;;
28928     interix[3-9]*)
28929       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
28930       # Instead, we relocate shared libraries at runtime.
28931       ;;
28932     sysv4*MP*)
28933       if test -d /usr/nec; then
28934         lt_prog_compiler_pic_CXX=-Kconform_pic
28935       fi
28936       ;;
28937     hpux*)
28938       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
28939       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
28940       # sets the default TLS model and affects inlining.
28941       case $host_cpu in
28942       hppa*64*)
28943         ;;
28944       *)
28945         lt_prog_compiler_pic_CXX='-fPIC'
28946         ;;
28947       esac
28948       ;;
28949     *qnx* | *nto*)
28950       # QNX uses GNU C++, but need to define -shared option too, otherwise
28951       # it will coredump.
28952       lt_prog_compiler_pic_CXX='-fPIC -shared'
28953       ;;
28954     *)
28955       lt_prog_compiler_pic_CXX='-fPIC'
28956       ;;
28957     esac
28958   else
28959     case $host_os in
28960       aix[4-9]*)
28961         # All AIX code is PIC.
28962         if test "$host_cpu" = ia64; then
28963           # AIX 5 now supports IA64 processor
28964           lt_prog_compiler_static_CXX='-Bstatic'
28965         else
28966           lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
28967         fi
28968         ;;
28969       chorus*)
28970         case $cc_basename in
28971         cxch68*)
28972           # Green Hills C++ Compiler
28973           # _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"
28974           ;;
28975         esac
28976         ;;
28977       mingw* | cygwin* | os2* | pw32* | cegcc*)
28978         # This hack is so that the source file can tell whether it is being
28979         # built for inclusion in a dll (and should export symbols for example).
28980         lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
28981         ;;
28982       dgux*)
28983         case $cc_basename in
28984           ec++*)
28985             lt_prog_compiler_pic_CXX='-KPIC'
28986             ;;
28987           ghcx*)
28988             # Green Hills C++ Compiler
28989             lt_prog_compiler_pic_CXX='-pic'
28990             ;;
28991           *)
28992             ;;
28993         esac
28994         ;;
28995       freebsd* | dragonfly*)
28996         # FreeBSD uses GNU C++
28997         ;;
28998       hpux9* | hpux10* | hpux11*)
28999         case $cc_basename in
29000           CC*)
29001             lt_prog_compiler_wl_CXX='-Wl,'
29002             lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
29003             if test "$host_cpu" != ia64; then
29004               lt_prog_compiler_pic_CXX='+Z'
29005             fi
29006             ;;
29007           aCC*)
29008             lt_prog_compiler_wl_CXX='-Wl,'
29009             lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
29010             case $host_cpu in
29011             hppa*64*|ia64*)
29012               # +Z the default
29013               ;;
29014             *)
29015               lt_prog_compiler_pic_CXX='+Z'
29016               ;;
29017             esac
29018             ;;
29019           *)
29020             ;;
29021         esac
29022         ;;
29023       interix*)
29024         # This is c89, which is MS Visual C++ (no shared libs)
29025         # Anyone wants to do a port?
29026         ;;
29027       irix5* | irix6* | nonstopux*)
29028         case $cc_basename in
29029           CC*)
29030             lt_prog_compiler_wl_CXX='-Wl,'
29031             lt_prog_compiler_static_CXX='-non_shared'
29032             # CC pic flag -KPIC is the default.
29033             ;;
29034           *)
29035             ;;
29036         esac
29037         ;;
29038       linux* | k*bsd*-gnu | kopensolaris*-gnu)
29039         case $cc_basename in
29040           KCC*)
29041             # KAI C++ Compiler
29042             lt_prog_compiler_wl_CXX='--backend -Wl,'
29043             lt_prog_compiler_pic_CXX='-fPIC'
29044             ;;
29045           ecpc* )
29046             # old Intel C++ for x86_64 which still supported -KPIC.
29047             lt_prog_compiler_wl_CXX='-Wl,'
29048             lt_prog_compiler_pic_CXX='-KPIC'
29049             lt_prog_compiler_static_CXX='-static'
29050             ;;
29051           icpc* )
29052             # Intel C++, used to be incompatible with GCC.
29053             # ICC 10 doesn't accept -KPIC any more.
29054             lt_prog_compiler_wl_CXX='-Wl,'
29055             lt_prog_compiler_pic_CXX='-fPIC'
29056             lt_prog_compiler_static_CXX='-static'
29057             ;;
29058           pgCC* | pgcpp*)
29059             # Portland Group C++ compiler
29060             lt_prog_compiler_wl_CXX='-Wl,'
29061             lt_prog_compiler_pic_CXX='-fpic'
29062             lt_prog_compiler_static_CXX='-Bstatic'
29063             ;;
29064           cxx*)
29065             # Compaq C++
29066             # Make sure the PIC flag is empty.  It appears that all Alpha
29067             # Linux and Compaq Tru64 Unix objects are PIC.
29068             lt_prog_compiler_pic_CXX=
29069             lt_prog_compiler_static_CXX='-non_shared'
29070             ;;
29071           xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
29072             # IBM XL 8.0, 9.0 on PPC and BlueGene
29073             lt_prog_compiler_wl_CXX='-Wl,'
29074             lt_prog_compiler_pic_CXX='-qpic'
29075             lt_prog_compiler_static_CXX='-qstaticlink'
29076             ;;
29077           *)
29078             case `$CC -V 2>&1 | sed 5q` in
29079             *Sun\ C*)
29080               # Sun C++ 5.9
29081               lt_prog_compiler_pic_CXX='-KPIC'
29082               lt_prog_compiler_static_CXX='-Bstatic'
29083               lt_prog_compiler_wl_CXX='-Qoption ld '
29084               ;;
29085             esac
29086             ;;
29087         esac
29088         ;;
29089       lynxos*)
29090         ;;
29091       m88k*)
29092         ;;
29093       mvs*)
29094         case $cc_basename in
29095           cxx*)
29096             lt_prog_compiler_pic_CXX='-W c,exportall'
29097             ;;
29098           *)
29099             ;;
29100         esac
29101         ;;
29102       netbsd*)
29103         ;;
29104       *qnx* | *nto*)
29105         # QNX uses GNU C++, but need to define -shared option too, otherwise
29106         # it will coredump.
29107         lt_prog_compiler_pic_CXX='-fPIC -shared'
29108         ;;
29109       osf3* | osf4* | osf5*)
29110         case $cc_basename in
29111           KCC*)
29112             lt_prog_compiler_wl_CXX='--backend -Wl,'
29113             ;;
29114           RCC*)
29115             # Rational C++ 2.4.1
29116             lt_prog_compiler_pic_CXX='-pic'
29117             ;;
29118           cxx*)
29119             # Digital/Compaq C++
29120             lt_prog_compiler_wl_CXX='-Wl,'
29121             # Make sure the PIC flag is empty.  It appears that all Alpha
29122             # Linux and Compaq Tru64 Unix objects are PIC.
29123             lt_prog_compiler_pic_CXX=
29124             lt_prog_compiler_static_CXX='-non_shared'
29125             ;;
29126           *)
29127             ;;
29128         esac
29129         ;;
29130       psos*)
29131         ;;
29132       solaris*)
29133         case $cc_basename in
29134           CC* | sunCC*)
29135             # Sun C++ 4.2, 5.x and Centerline C++
29136             lt_prog_compiler_pic_CXX='-KPIC'
29137             lt_prog_compiler_static_CXX='-Bstatic'
29138             lt_prog_compiler_wl_CXX='-Qoption ld '
29139             ;;
29140           gcx*)
29141             # Green Hills C++ Compiler
29142             lt_prog_compiler_pic_CXX='-PIC'
29143             ;;
29144           *)
29145             ;;
29146         esac
29147         ;;
29148       sunos4*)
29149         case $cc_basename in
29150           CC*)
29151             # Sun C++ 4.x
29152             lt_prog_compiler_pic_CXX='-pic'
29153             lt_prog_compiler_static_CXX='-Bstatic'
29154             ;;
29155           lcc*)
29156             # Lucid
29157             lt_prog_compiler_pic_CXX='-pic'
29158             ;;
29159           *)
29160             ;;
29161         esac
29162         ;;
29163       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
29164         case $cc_basename in
29165           CC*)
29166             lt_prog_compiler_wl_CXX='-Wl,'
29167             lt_prog_compiler_pic_CXX='-KPIC'
29168             lt_prog_compiler_static_CXX='-Bstatic'
29169             ;;
29170         esac
29171         ;;
29172       tandem*)
29173         case $cc_basename in
29174           NCC*)
29175             # NonStop-UX NCC 3.20
29176             lt_prog_compiler_pic_CXX='-KPIC'
29177             ;;
29178           *)
29179             ;;
29180         esac
29181         ;;
29182       vxworks*)
29183         ;;
29184       *)
29185         lt_prog_compiler_can_build_shared_CXX=no
29186         ;;
29187     esac
29188   fi
29189
29190 case $host_os in
29191   # For platforms which do not support PIC, -DPIC is meaningless:
29192   *djgpp*)
29193     lt_prog_compiler_pic_CXX=
29194     ;;
29195   *)
29196     lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
29197     ;;
29198 esac
29199
29200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
29201 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
29202 if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
29203   $as_echo_n "(cached) " >&6
29204 else
29205   lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
29206 fi
29207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
29208 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
29209 lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
29210
29211 #
29212 # Check to make sure the PIC flag actually works.
29213 #
29214 if test -n "$lt_prog_compiler_pic_CXX"; then
29215   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
29216 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
29217 if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
29218   $as_echo_n "(cached) " >&6
29219 else
29220   lt_cv_prog_compiler_pic_works_CXX=no
29221    ac_outfile=conftest.$ac_objext
29222    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
29223    lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
29224    # Insert the option either (1) after the last *FLAGS variable, or
29225    # (2) before a word containing "conftest.", or (3) at the end.
29226    # Note that $ac_compile itself does not contain backslashes and begins
29227    # with a dollar sign (not a hyphen), so the echo should work correctly.
29228    # The option is referenced via a variable to avoid confusing sed.
29229    lt_compile=`echo "$ac_compile" | $SED \
29230    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
29231    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
29232    -e 's:$: $lt_compiler_flag:'`
29233    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
29234    (eval "$lt_compile" 2>conftest.err)
29235    ac_status=$?
29236    cat conftest.err >&5
29237    echo "$as_me:$LINENO: \$? = $ac_status" >&5
29238    if (exit $ac_status) && test -s "$ac_outfile"; then
29239      # The compiler can only warn and ignore the option if not recognized
29240      # So say no if there are warnings other than the usual output.
29241      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
29242      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
29243      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
29244        lt_cv_prog_compiler_pic_works_CXX=yes
29245      fi
29246    fi
29247    $RM conftest*
29248
29249 fi
29250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
29251 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
29252
29253 if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
29254     case $lt_prog_compiler_pic_CXX in
29255      "" | " "*) ;;
29256      *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
29257      esac
29258 else
29259     lt_prog_compiler_pic_CXX=
29260      lt_prog_compiler_can_build_shared_CXX=no
29261 fi
29262
29263 fi
29264
29265
29266
29267
29268
29269 #
29270 # Check to make sure the static flag actually works.
29271 #
29272 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
29273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
29274 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
29275 if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
29276   $as_echo_n "(cached) " >&6
29277 else
29278   lt_cv_prog_compiler_static_works_CXX=no
29279    save_LDFLAGS="$LDFLAGS"
29280    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
29281    echo "$lt_simple_link_test_code" > conftest.$ac_ext
29282    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
29283      # The linker can only warn and ignore the option if not recognized
29284      # So say no if there are warnings
29285      if test -s conftest.err; then
29286        # Append any errors to the config.log.
29287        cat conftest.err 1>&5
29288        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
29289        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
29290        if diff conftest.exp conftest.er2 >/dev/null; then
29291          lt_cv_prog_compiler_static_works_CXX=yes
29292        fi
29293      else
29294        lt_cv_prog_compiler_static_works_CXX=yes
29295      fi
29296    fi
29297    $RM -r conftest*
29298    LDFLAGS="$save_LDFLAGS"
29299
29300 fi
29301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
29302 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
29303
29304 if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
29305     :
29306 else
29307     lt_prog_compiler_static_CXX=
29308 fi
29309
29310
29311
29312
29313     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
29314 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
29315 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
29316   $as_echo_n "(cached) " >&6
29317 else
29318   lt_cv_prog_compiler_c_o_CXX=no
29319    $RM -r conftest 2>/dev/null
29320    mkdir conftest
29321    cd conftest
29322    mkdir out
29323    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
29324
29325    lt_compiler_flag="-o out/conftest2.$ac_objext"
29326    # Insert the option either (1) after the last *FLAGS variable, or
29327    # (2) before a word containing "conftest.", or (3) at the end.
29328    # Note that $ac_compile itself does not contain backslashes and begins
29329    # with a dollar sign (not a hyphen), so the echo should work correctly.
29330    lt_compile=`echo "$ac_compile" | $SED \
29331    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
29332    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
29333    -e 's:$: $lt_compiler_flag:'`
29334    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
29335    (eval "$lt_compile" 2>out/conftest.err)
29336    ac_status=$?
29337    cat out/conftest.err >&5
29338    echo "$as_me:$LINENO: \$? = $ac_status" >&5
29339    if (exit $ac_status) && test -s out/conftest2.$ac_objext
29340    then
29341      # The compiler can only warn and ignore the option if not recognized
29342      # So say no if there are warnings
29343      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
29344      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
29345      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
29346        lt_cv_prog_compiler_c_o_CXX=yes
29347      fi
29348    fi
29349    chmod u+w . 2>&5
29350    $RM conftest*
29351    # SGI C++ compiler will create directory out/ii_files/ for
29352    # template instantiation
29353    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
29354    $RM out/* && rmdir out
29355    cd ..
29356    $RM -r conftest
29357    $RM conftest*
29358
29359 fi
29360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
29361 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
29362
29363
29364
29365     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
29366 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
29367 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
29368   $as_echo_n "(cached) " >&6
29369 else
29370   lt_cv_prog_compiler_c_o_CXX=no
29371    $RM -r conftest 2>/dev/null
29372    mkdir conftest
29373    cd conftest
29374    mkdir out
29375    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
29376
29377    lt_compiler_flag="-o out/conftest2.$ac_objext"
29378    # Insert the option either (1) after the last *FLAGS variable, or
29379    # (2) before a word containing "conftest.", or (3) at the end.
29380    # Note that $ac_compile itself does not contain backslashes and begins
29381    # with a dollar sign (not a hyphen), so the echo should work correctly.
29382    lt_compile=`echo "$ac_compile" | $SED \
29383    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
29384    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
29385    -e 's:$: $lt_compiler_flag:'`
29386    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
29387    (eval "$lt_compile" 2>out/conftest.err)
29388    ac_status=$?
29389    cat out/conftest.err >&5
29390    echo "$as_me:$LINENO: \$? = $ac_status" >&5
29391    if (exit $ac_status) && test -s out/conftest2.$ac_objext
29392    then
29393      # The compiler can only warn and ignore the option if not recognized
29394      # So say no if there are warnings
29395      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
29396      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
29397      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
29398        lt_cv_prog_compiler_c_o_CXX=yes
29399      fi
29400    fi
29401    chmod u+w . 2>&5
29402    $RM conftest*
29403    # SGI C++ compiler will create directory out/ii_files/ for
29404    # template instantiation
29405    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
29406    $RM out/* && rmdir out
29407    cd ..
29408    $RM -r conftest
29409    $RM conftest*
29410
29411 fi
29412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
29413 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
29414
29415
29416
29417
29418 hard_links="nottested"
29419 if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
29420   # do not overwrite the value of need_locks provided by the user
29421   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
29422 $as_echo_n "checking if we can lock with hard links... " >&6; }
29423   hard_links=yes
29424   $RM conftest*
29425   ln conftest.a conftest.b 2>/dev/null && hard_links=no
29426   touch conftest.a
29427   ln conftest.a conftest.b 2>&5 || hard_links=no
29428   ln conftest.a conftest.b 2>/dev/null && hard_links=no
29429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
29430 $as_echo "$hard_links" >&6; }
29431   if test "$hard_links" = no; then
29432     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
29433 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
29434     need_locks=warn
29435   fi
29436 else
29437   need_locks=no
29438 fi
29439
29440
29441
29442     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
29443 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
29444
29445   export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
29446   exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
29447   case $host_os in
29448   aix[4-9]*)
29449     # If we're using GNU nm, then we don't want the "-C" option.
29450     # -C means demangle to AIX nm, but means don't demangle with GNU nm
29451     # Also, AIX nm treats weak defined symbols like other global defined
29452     # symbols, whereas GNU nm marks them as "W".
29453     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
29454       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'
29455     else
29456       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'
29457     fi
29458     ;;
29459   pw32*)
29460     export_symbols_cmds_CXX="$ltdll_cmds"
29461     ;;
29462   cygwin* | mingw* | cegcc*)
29463     case $cc_basename in
29464     cl*) ;;
29465     *)
29466       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'
29467       exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
29468       ;;
29469     esac
29470     ;;
29471   *)
29472     export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
29473     ;;
29474   esac
29475
29476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
29477 $as_echo "$ld_shlibs_CXX" >&6; }
29478 test "$ld_shlibs_CXX" = no && can_build_shared=no
29479
29480 with_gnu_ld_CXX=$with_gnu_ld
29481
29482
29483
29484
29485
29486
29487 #
29488 # Do we need to explicitly link libc?
29489 #
29490 case "x$archive_cmds_need_lc_CXX" in
29491 x|xyes)
29492   # Assume -lc should be added
29493   archive_cmds_need_lc_CXX=yes
29494
29495   if test "$enable_shared" = yes && test "$GCC" = yes; then
29496     case $archive_cmds_CXX in
29497     *'~'*)
29498       # FIXME: we may have to deal with multi-command sequences.
29499       ;;
29500     '$CC '*)
29501       # Test whether the compiler implicitly links with -lc since on some
29502       # systems, -lgcc has to come before -lc. If gcc already passes -lc
29503       # to ld, don't add -lc before -lgcc.
29504       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
29505 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
29506 if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
29507   $as_echo_n "(cached) " >&6
29508 else
29509   $RM conftest*
29510         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
29511
29512         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
29513   (eval $ac_compile) 2>&5
29514   ac_status=$?
29515   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29516   test $ac_status = 0; } 2>conftest.err; then
29517           soname=conftest
29518           lib=conftest
29519           libobjs=conftest.$ac_objext
29520           deplibs=
29521           wl=$lt_prog_compiler_wl_CXX
29522           pic_flag=$lt_prog_compiler_pic_CXX
29523           compiler_flags=-v
29524           linker_flags=-v
29525           verstring=
29526           output_objdir=.
29527           libname=conftest
29528           lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
29529           allow_undefined_flag_CXX=
29530           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
29531   (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
29532   ac_status=$?
29533   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29534   test $ac_status = 0; }
29535           then
29536             lt_cv_archive_cmds_need_lc_CXX=no
29537           else
29538             lt_cv_archive_cmds_need_lc_CXX=yes
29539           fi
29540           allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
29541         else
29542           cat conftest.err 1>&5
29543         fi
29544         $RM conftest*
29545
29546 fi
29547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
29548 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
29549       archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
29550       ;;
29551     esac
29552   fi
29553   ;;
29554 esac
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564
29565
29566
29567
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578
29579
29580
29581
29582
29583
29584
29585
29586
29587
29588
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619     { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
29620 $as_echo_n "checking dynamic linker characteristics... " >&6; }
29621
29622 library_names_spec=
29623 libname_spec='lib$name'
29624 soname_spec=
29625 shrext_cmds=".so"
29626 postinstall_cmds=
29627 postuninstall_cmds=
29628 finish_cmds=
29629 finish_eval=
29630 shlibpath_var=
29631 shlibpath_overrides_runpath=unknown
29632 version_type=none
29633 dynamic_linker="$host_os ld.so"
29634 sys_lib_dlsearch_path_spec="/lib /usr/lib"
29635 need_lib_prefix=unknown
29636 hardcode_into_libs=no
29637
29638 # when you set need_version to no, make sure it does not cause -set_version
29639 # flags to be left without arguments
29640 need_version=unknown
29641
29642 case $host_os in
29643 aix3*)
29644   version_type=linux
29645   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
29646   shlibpath_var=LIBPATH
29647
29648   # AIX 3 has no versioning support, so we append a major version to the name.
29649   soname_spec='${libname}${release}${shared_ext}$major'
29650   ;;
29651
29652 aix[4-9]*)
29653   version_type=linux
29654   need_lib_prefix=no
29655   need_version=no
29656   hardcode_into_libs=yes
29657   if test "$host_cpu" = ia64; then
29658     # AIX 5 supports IA64
29659     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
29660     shlibpath_var=LD_LIBRARY_PATH
29661   else
29662     # With GCC up to 2.95.x, collect2 would create an import file
29663     # for dependence libraries.  The import file would start with
29664     # the line `#! .'.  This would cause the generated library to
29665     # depend on `.', always an invalid library.  This was fixed in
29666     # development snapshots of GCC prior to 3.0.
29667     case $host_os in
29668       aix4 | aix4.[01] | aix4.[01].*)
29669       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
29670            echo ' yes '
29671            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
29672         :
29673       else
29674         can_build_shared=no
29675       fi
29676       ;;
29677     esac
29678     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
29679     # soname into executable. Probably we can add versioning support to
29680     # collect2, so additional links can be useful in future.
29681     if test "$aix_use_runtimelinking" = yes; then
29682       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
29683       # instead of lib<name>.a to let people know that these are not
29684       # typical AIX shared libraries.
29685       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29686     else
29687       # We preserve .a as extension for shared libraries through AIX4.2
29688       # and later when we are not doing run time linking.
29689       library_names_spec='${libname}${release}.a $libname.a'
29690       soname_spec='${libname}${release}${shared_ext}$major'
29691     fi
29692     shlibpath_var=LIBPATH
29693   fi
29694   ;;
29695
29696 amigaos*)
29697   case $host_cpu in
29698   powerpc)
29699     # Since July 2007 AmigaOS4 officially supports .so libraries.
29700     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
29701     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29702     ;;
29703   m68k)
29704     library_names_spec='$libname.ixlibrary $libname.a'
29705     # Create ${libname}_ixlibrary.a entries in /sys/libs.
29706     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'
29707     ;;
29708   esac
29709   ;;
29710
29711 beos*)
29712   library_names_spec='${libname}${shared_ext}'
29713   dynamic_linker="$host_os ld.so"
29714   shlibpath_var=LIBRARY_PATH
29715   ;;
29716
29717 bsdi[45]*)
29718   version_type=linux
29719   need_version=no
29720   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29721   soname_spec='${libname}${release}${shared_ext}$major'
29722   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
29723   shlibpath_var=LD_LIBRARY_PATH
29724   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
29725   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
29726   # the default ld.so.conf also contains /usr/contrib/lib and
29727   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
29728   # libtool to hard-code these into programs
29729   ;;
29730
29731 cygwin* | mingw* | pw32* | cegcc*)
29732   version_type=windows
29733   shrext_cmds=".dll"
29734   need_version=no
29735   need_lib_prefix=no
29736
29737   case $GCC,$cc_basename in
29738   yes,*)
29739     # gcc
29740     library_names_spec='$libname.dll.a'
29741     # DLL is installed to $(libdir)/../bin by postinstall_cmds
29742     postinstall_cmds='base_file=`basename \${file}`~
29743       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
29744       dldir=$destdir/`dirname \$dlpath`~
29745       test -d \$dldir || mkdir -p \$dldir~
29746       $install_prog $dir/$dlname \$dldir/$dlname~
29747       chmod a+x \$dldir/$dlname~
29748       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
29749         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
29750       fi'
29751     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
29752       dlpath=$dir/\$dldll~
29753        $RM \$dlpath'
29754     shlibpath_overrides_runpath=yes
29755
29756     case $host_os in
29757     cygwin*)
29758       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
29759       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
29760
29761       ;;
29762     mingw* | cegcc*)
29763       # MinGW DLLs use traditional 'lib' prefix
29764       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
29765       ;;
29766     pw32*)
29767       # pw32 DLLs use 'pw' prefix rather than 'lib'
29768       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
29769       ;;
29770     esac
29771     dynamic_linker='Win32 ld.exe'
29772     ;;
29773
29774   *,cl*)
29775     # Native MSVC
29776     libname_spec='$name'
29777     soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
29778     library_names_spec='${libname}.dll.lib'
29779
29780     case $build_os in
29781     mingw*)
29782       sys_lib_search_path_spec=
29783       lt_save_ifs=$IFS
29784       IFS=';'
29785       for lt_path in $LIB
29786       do
29787         IFS=$lt_save_ifs
29788         # Let DOS variable expansion print the short 8.3 style file name.
29789         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
29790         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
29791       done
29792       IFS=$lt_save_ifs
29793       # Convert to MSYS style.
29794       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
29795       ;;
29796     cygwin*)
29797       # Convert to unix form, then to dos form, then back to unix form
29798       # but this time dos style (no spaces!) so that the unix form looks
29799       # like /cygdrive/c/PROGRA~1:/cygdr...
29800       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
29801       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
29802       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
29803       ;;
29804     *)
29805       sys_lib_search_path_spec="$LIB"
29806       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
29807         # It is most probably a Windows format PATH.
29808         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
29809       else
29810         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
29811       fi
29812       # FIXME: find the short name or the path components, as spaces are
29813       # common. (e.g. "Program Files" -> "PROGRA~1")
29814       ;;
29815     esac
29816
29817     # DLL is installed to $(libdir)/../bin by postinstall_cmds
29818     postinstall_cmds='base_file=`basename \${file}`~
29819       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
29820       dldir=$destdir/`dirname \$dlpath`~
29821       test -d \$dldir || mkdir -p \$dldir~
29822       $install_prog $dir/$dlname \$dldir/$dlname'
29823     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
29824       dlpath=$dir/\$dldll~
29825        $RM \$dlpath'
29826     shlibpath_overrides_runpath=yes
29827     dynamic_linker='Win32 link.exe'
29828     ;;
29829
29830   *)
29831     # Assume MSVC wrapper
29832     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
29833     dynamic_linker='Win32 ld.exe'
29834     ;;
29835   esac
29836   # FIXME: first we should search . and the directory the executable is in
29837   shlibpath_var=PATH
29838   ;;
29839
29840 darwin* | rhapsody*)
29841   dynamic_linker="$host_os dyld"
29842   version_type=darwin
29843   need_lib_prefix=no
29844   need_version=no
29845   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
29846   soname_spec='${libname}${release}${major}$shared_ext'
29847   shlibpath_overrides_runpath=yes
29848   shlibpath_var=DYLD_LIBRARY_PATH
29849   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
29850
29851   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
29852   ;;
29853
29854 dgux*)
29855   version_type=linux
29856   need_lib_prefix=no
29857   need_version=no
29858   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
29859   soname_spec='${libname}${release}${shared_ext}$major'
29860   shlibpath_var=LD_LIBRARY_PATH
29861   ;;
29862
29863 freebsd1*)
29864   dynamic_linker=no
29865   ;;
29866
29867 freebsd* | dragonfly*)
29868   # DragonFly does not have aout.  When/if they implement a new
29869   # versioning mechanism, adjust this.
29870   if test -x /usr/bin/objformat; then
29871     objformat=`/usr/bin/objformat`
29872   else
29873     case $host_os in
29874     freebsd[123]*) objformat=aout ;;
29875     *) objformat=elf ;;
29876     esac
29877   fi
29878   version_type=freebsd-$objformat
29879   case $version_type in
29880     freebsd-elf*)
29881       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
29882       need_version=no
29883       need_lib_prefix=no
29884       ;;
29885     freebsd-*)
29886       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
29887       need_version=yes
29888       ;;
29889   esac
29890   shlibpath_var=LD_LIBRARY_PATH
29891   case $host_os in
29892   freebsd2*)
29893     shlibpath_overrides_runpath=yes
29894     ;;
29895   freebsd3.[01]* | freebsdelf3.[01]*)
29896     shlibpath_overrides_runpath=yes
29897     hardcode_into_libs=yes
29898     ;;
29899   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
29900   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
29901     shlibpath_overrides_runpath=no
29902     hardcode_into_libs=yes
29903     ;;
29904   *) # from 4.6 on, and DragonFly
29905     shlibpath_overrides_runpath=yes
29906     hardcode_into_libs=yes
29907     ;;
29908   esac
29909   ;;
29910
29911 gnu*)
29912   version_type=linux
29913   need_lib_prefix=no
29914   need_version=no
29915   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
29916   soname_spec='${libname}${release}${shared_ext}$major'
29917   shlibpath_var=LD_LIBRARY_PATH
29918   hardcode_into_libs=yes
29919   ;;
29920
29921 haiku*)
29922   version_type=linux
29923   need_lib_prefix=no
29924   need_version=no
29925   dynamic_linker="$host_os runtime_loader"
29926   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
29927   soname_spec='${libname}${release}${shared_ext}$major'
29928   shlibpath_var=LIBRARY_PATH
29929   shlibpath_overrides_runpath=yes
29930   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
29931   hardcode_into_libs=yes
29932   ;;
29933
29934 hpux9* | hpux10* | hpux11*)
29935   # Give a soname corresponding to the major version so that dld.sl refuses to
29936   # link against other versions.
29937   version_type=sunos
29938   need_lib_prefix=no
29939   need_version=no
29940   case $host_cpu in
29941   ia64*)
29942     shrext_cmds='.so'
29943     hardcode_into_libs=yes
29944     dynamic_linker="$host_os dld.so"
29945     shlibpath_var=LD_LIBRARY_PATH
29946     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
29947     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29948     soname_spec='${libname}${release}${shared_ext}$major'
29949     if test "X$HPUX_IA64_MODE" = X32; then
29950       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
29951     else
29952       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
29953     fi
29954     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
29955     ;;
29956   hppa*64*)
29957     shrext_cmds='.sl'
29958     hardcode_into_libs=yes
29959     dynamic_linker="$host_os dld.sl"
29960     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
29961     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
29962     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29963     soname_spec='${libname}${release}${shared_ext}$major'
29964     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
29965     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
29966     ;;
29967   *)
29968     shrext_cmds='.sl'
29969     dynamic_linker="$host_os dld.sl"
29970     shlibpath_var=SHLIB_PATH
29971     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
29972     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
29973     soname_spec='${libname}${release}${shared_ext}$major'
29974     ;;
29975   esac
29976   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
29977   postinstall_cmds='chmod 555 $lib'
29978   # or fails outright, so override atomically:
29979   install_override_mode=555
29980   ;;
29981
29982 interix[3-9]*)
29983   version_type=linux
29984   need_lib_prefix=no
29985   need_version=no
29986   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
29987   soname_spec='${libname}${release}${shared_ext}$major'
29988   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
29989   shlibpath_var=LD_LIBRARY_PATH
29990   shlibpath_overrides_runpath=no
29991   hardcode_into_libs=yes
29992   ;;
29993
29994 irix5* | irix6* | nonstopux*)
29995   case $host_os in
29996     nonstopux*) version_type=nonstopux ;;
29997     *)
29998         if test "$lt_cv_prog_gnu_ld" = yes; then
29999                 version_type=linux
30000         else
30001                 version_type=irix
30002         fi ;;
30003   esac
30004   need_lib_prefix=no
30005   need_version=no
30006   soname_spec='${libname}${release}${shared_ext}$major'
30007   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
30008   case $host_os in
30009   irix5* | nonstopux*)
30010     libsuff= shlibsuff=
30011     ;;
30012   *)
30013     case $LD in # libtool.m4 will add one of these switches to LD
30014     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
30015       libsuff= shlibsuff= libmagic=32-bit;;
30016     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
30017       libsuff=32 shlibsuff=N32 libmagic=N32;;
30018     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
30019       libsuff=64 shlibsuff=64 libmagic=64-bit;;
30020     *) libsuff= shlibsuff= libmagic=never-match;;
30021     esac
30022     ;;
30023   esac
30024   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
30025   shlibpath_overrides_runpath=no
30026   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
30027   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
30028   hardcode_into_libs=yes
30029   ;;
30030
30031 # No shared lib support for Linux oldld, aout, or coff.
30032 linux*oldld* | linux*aout* | linux*coff*)
30033   dynamic_linker=no
30034   ;;
30035
30036 # This must be Linux ELF.
30037 linux* | k*bsd*-gnu | kopensolaris*-gnu)
30038   version_type=linux
30039   need_lib_prefix=no
30040   need_version=no
30041   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30042   soname_spec='${libname}${release}${shared_ext}$major'
30043   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
30044   shlibpath_var=LD_LIBRARY_PATH
30045   shlibpath_overrides_runpath=no
30046
30047   # Some binutils ld are patched to set DT_RUNPATH
30048   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
30049   $as_echo_n "(cached) " >&6
30050 else
30051   lt_cv_shlibpath_overrides_runpath=no
30052     save_LDFLAGS=$LDFLAGS
30053     save_libdir=$libdir
30054     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
30055          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
30056     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30057 /* end confdefs.h.  */
30058
30059 int
30060 main ()
30061 {
30062
30063   ;
30064   return 0;
30065 }
30066 _ACEOF
30067 if ac_fn_cxx_try_link "$LINENO"; then :
30068   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
30069   lt_cv_shlibpath_overrides_runpath=yes
30070 fi
30071 fi
30072 rm -f core conftest.err conftest.$ac_objext \
30073     conftest$ac_exeext conftest.$ac_ext
30074     LDFLAGS=$save_LDFLAGS
30075     libdir=$save_libdir
30076
30077 fi
30078
30079   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
30080
30081   # This implies no fast_install, which is unacceptable.
30082   # Some rework will be needed to allow for fast_install
30083   # before this can be enabled.
30084   hardcode_into_libs=yes
30085
30086   # Append ld.so.conf contents to the search path
30087   if test -f /etc/ld.so.conf; then
30088     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' ' '`
30089     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
30090   fi
30091
30092   # We used to test for /lib/ld.so.1 and disable shared libraries on
30093   # powerpc, because MkLinux only supported shared libraries with the
30094   # GNU dynamic linker.  Since this was broken with cross compilers,
30095   # most powerpc-linux boxes support dynamic linking these days and
30096   # people can always --disable-shared, the test was removed, and we
30097   # assume the GNU/Linux dynamic linker is in use.
30098   dynamic_linker='GNU/Linux ld.so'
30099   ;;
30100
30101 netbsd*)
30102   version_type=sunos
30103   need_lib_prefix=no
30104   need_version=no
30105   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
30106     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
30107     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
30108     dynamic_linker='NetBSD (a.out) ld.so'
30109   else
30110     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
30111     soname_spec='${libname}${release}${shared_ext}$major'
30112     dynamic_linker='NetBSD ld.elf_so'
30113   fi
30114   shlibpath_var=LD_LIBRARY_PATH
30115   shlibpath_overrides_runpath=yes
30116   hardcode_into_libs=yes
30117   ;;
30118
30119 newsos6)
30120   version_type=linux
30121   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30122   shlibpath_var=LD_LIBRARY_PATH
30123   shlibpath_overrides_runpath=yes
30124   ;;
30125
30126 *nto* | *qnx*)
30127   version_type=qnx
30128   need_lib_prefix=no
30129   need_version=no
30130   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30131   soname_spec='${libname}${release}${shared_ext}$major'
30132   shlibpath_var=LD_LIBRARY_PATH
30133   shlibpath_overrides_runpath=no
30134   hardcode_into_libs=yes
30135   dynamic_linker='ldqnx.so'
30136   ;;
30137
30138 openbsd*)
30139   version_type=sunos
30140   sys_lib_dlsearch_path_spec="/usr/lib"
30141   need_lib_prefix=no
30142   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
30143   case $host_os in
30144     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
30145     *)                          need_version=no  ;;
30146   esac
30147   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
30148   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
30149   shlibpath_var=LD_LIBRARY_PATH
30150   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
30151     case $host_os in
30152       openbsd2.[89] | openbsd2.[89].*)
30153         shlibpath_overrides_runpath=no
30154         ;;
30155       *)
30156         shlibpath_overrides_runpath=yes
30157         ;;
30158       esac
30159   else
30160     shlibpath_overrides_runpath=yes
30161   fi
30162   ;;
30163
30164 os2*)
30165   libname_spec='$name'
30166   shrext_cmds=".dll"
30167   need_lib_prefix=no
30168   library_names_spec='$libname${shared_ext} $libname.a'
30169   dynamic_linker='OS/2 ld.exe'
30170   shlibpath_var=LIBPATH
30171   ;;
30172
30173 osf3* | osf4* | osf5*)
30174   version_type=osf
30175   need_lib_prefix=no
30176   need_version=no
30177   soname_spec='${libname}${release}${shared_ext}$major'
30178   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30179   shlibpath_var=LD_LIBRARY_PATH
30180   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
30181   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
30182   ;;
30183
30184 rdos*)
30185   dynamic_linker=no
30186   ;;
30187
30188 solaris*)
30189   version_type=linux
30190   need_lib_prefix=no
30191   need_version=no
30192   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30193   soname_spec='${libname}${release}${shared_ext}$major'
30194   shlibpath_var=LD_LIBRARY_PATH
30195   shlibpath_overrides_runpath=yes
30196   hardcode_into_libs=yes
30197   # ldd complains unless libraries are executable
30198   postinstall_cmds='chmod +x $lib'
30199   ;;
30200
30201 sunos4*)
30202   version_type=sunos
30203   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
30204   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
30205   shlibpath_var=LD_LIBRARY_PATH
30206   shlibpath_overrides_runpath=yes
30207   if test "$with_gnu_ld" = yes; then
30208     need_lib_prefix=no
30209   fi
30210   need_version=yes
30211   ;;
30212
30213 sysv4 | sysv4.3*)
30214   version_type=linux
30215   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30216   soname_spec='${libname}${release}${shared_ext}$major'
30217   shlibpath_var=LD_LIBRARY_PATH
30218   case $host_vendor in
30219     sni)
30220       shlibpath_overrides_runpath=no
30221       need_lib_prefix=no
30222       runpath_var=LD_RUN_PATH
30223       ;;
30224     siemens)
30225       need_lib_prefix=no
30226       ;;
30227     motorola)
30228       need_lib_prefix=no
30229       need_version=no
30230       shlibpath_overrides_runpath=no
30231       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
30232       ;;
30233   esac
30234   ;;
30235
30236 sysv4*MP*)
30237   if test -d /usr/nec ;then
30238     version_type=linux
30239     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
30240     soname_spec='$libname${shared_ext}.$major'
30241     shlibpath_var=LD_LIBRARY_PATH
30242   fi
30243   ;;
30244
30245 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
30246   version_type=freebsd-elf
30247   need_lib_prefix=no
30248   need_version=no
30249   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
30250   soname_spec='${libname}${release}${shared_ext}$major'
30251   shlibpath_var=LD_LIBRARY_PATH
30252   shlibpath_overrides_runpath=yes
30253   hardcode_into_libs=yes
30254   if test "$with_gnu_ld" = yes; then
30255     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
30256   else
30257     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
30258     case $host_os in
30259       sco3.2v5*)
30260         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
30261         ;;
30262     esac
30263   fi
30264   sys_lib_dlsearch_path_spec='/usr/lib'
30265   ;;
30266
30267 tpf*)
30268   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
30269   version_type=linux
30270   need_lib_prefix=no
30271   need_version=no
30272   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30273   shlibpath_var=LD_LIBRARY_PATH
30274   shlibpath_overrides_runpath=no
30275   hardcode_into_libs=yes
30276   ;;
30277
30278 uts4*)
30279   version_type=linux
30280   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
30281   soname_spec='${libname}${release}${shared_ext}$major'
30282   shlibpath_var=LD_LIBRARY_PATH
30283   ;;
30284
30285 *)
30286   dynamic_linker=no
30287   ;;
30288 esac
30289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
30290 $as_echo "$dynamic_linker" >&6; }
30291 test "$dynamic_linker" = no && can_build_shared=no
30292
30293 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
30294 if test "$GCC" = yes; then
30295   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
30296 fi
30297
30298 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
30299   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
30300 fi
30301 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
30302   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
30303 fi
30304
30305
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
30325
30326
30327
30328
30329
30330
30331
30332
30333
30334
30335
30336
30337
30338
30339
30340
30341
30342     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
30343 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
30344 hardcode_action_CXX=
30345 if test -n "$hardcode_libdir_flag_spec_CXX" ||
30346    test -n "$runpath_var_CXX" ||
30347    test "X$hardcode_automatic_CXX" = "Xyes" ; then
30348
30349   # We can hardcode non-existent directories.
30350   if test "$hardcode_direct_CXX" != no &&
30351      # If the only mechanism to avoid hardcoding is shlibpath_var, we
30352      # have to relink, otherwise we might link with an installed library
30353      # when we should be linking with a yet-to-be-installed one
30354      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
30355      test "$hardcode_minus_L_CXX" != no; then
30356     # Linking always hardcodes the temporary library directory.
30357     hardcode_action_CXX=relink
30358   else
30359     # We can link without hardcoding, and we can hardcode nonexisting dirs.
30360     hardcode_action_CXX=immediate
30361   fi
30362 else
30363   # We cannot hardcode anything, or else we can only hardcode existing
30364   # directories.
30365   hardcode_action_CXX=unsupported
30366 fi
30367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
30368 $as_echo "$hardcode_action_CXX" >&6; }
30369
30370 if test "$hardcode_action_CXX" = relink ||
30371    test "$inherit_rpath_CXX" = yes; then
30372   # Fast installation is not supported
30373   enable_fast_install=no
30374 elif test "$shlibpath_overrides_runpath" = yes ||
30375      test "$enable_shared" = no; then
30376   # Fast installation is not necessary
30377   enable_fast_install=needless
30378 fi
30379
30380
30381
30382
30383
30384
30385
30386   fi # test -n "$compiler"
30387
30388   CC=$lt_save_CC
30389   CFLAGS=$lt_save_CFLAGS
30390   LDCXX=$LD
30391   LD=$lt_save_LD
30392   GCC=$lt_save_GCC
30393   with_gnu_ld=$lt_save_with_gnu_ld
30394   lt_cv_path_LDCXX=$lt_cv_path_LD
30395   lt_cv_path_LD=$lt_save_path_LD
30396   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
30397   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
30398 fi # test "$_lt_caught_CXX_error" != yes
30399
30400 ac_ext=c
30401 ac_cpp='$CPP $CPPFLAGS'
30402 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30403 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30404 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30405
30406
30407
30408 gta=false
30409
30410 # Check whether --with-gtest was given.
30411 if test "${with_gtest+set}" = set; then :
30412   withval=$with_gtest; try_gtest=$withval
30413 else
30414   try_gtest=yes
30415
30416 fi
30417
30418 case "$try_gtest" in
30419  yes)
30420     # Extract the first word of "gtest-config", so it can be a program name with args.
30421 set dummy gtest-config; ac_word=$2
30422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30423 $as_echo_n "checking for $ac_word... " >&6; }
30424 if ${ac_cv_path_GTEST_CONFIG+:} false; then :
30425   $as_echo_n "(cached) " >&6
30426 else
30427   case $GTEST_CONFIG in
30428   [\\/]* | ?:[\\/]*)
30429   ac_cv_path_GTEST_CONFIG="$GTEST_CONFIG" # Let the user override the test with a path.
30430   ;;
30431   *)
30432   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30433 for as_dir in $PATH
30434 do
30435   IFS=$as_save_IFS
30436   test -z "$as_dir" && as_dir=.
30437     for ac_exec_ext in '' $ac_executable_extensions; do
30438   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30439     ac_cv_path_GTEST_CONFIG="$as_dir/$ac_word$ac_exec_ext"
30440     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30441     break 2
30442   fi
30443 done
30444   done
30445 IFS=$as_save_IFS
30446
30447   ;;
30448 esac
30449 fi
30450 GTEST_CONFIG=$ac_cv_path_GTEST_CONFIG
30451 if test -n "$GTEST_CONFIG"; then
30452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTEST_CONFIG" >&5
30453 $as_echo "$GTEST_CONFIG" >&6; }
30454 else
30455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30456 $as_echo "no" >&6; }
30457 fi
30458
30459
30460     { ac_cv_path_GTEST_CONFIG=; unset ac_cv_path_GTEST_CONFIG;}
30461     case x${GTEST_CONFIG} in
30462      x) ;;
30463      *)
30464         { $as_echo "$as_me:${as_lineno-$LINENO}: checking gtest version" >&5
30465 $as_echo_n "checking gtest version... " >&6; }
30466         gtest_version_test=`$GTEST_CONFIG --min-version=1.5 || echo toolow`
30467         case "$gtest_version_test" in
30468          toolow*)
30469             ;;
30470          *)
30471             GTEST_LDFLAGS=`$GTEST_CONFIG --ldflags`
30472             GTEST_LIBS=`$GTEST_CONFIG --libs`
30473             GTEST_CXXFLAGS=`$GTEST_CONFIG --cxxflags`
30474             GTEST_CPPFLAGS=`$GTEST_CONFIG --cppflags`
30475
30476
30477
30478
30479             gta=true
30480             ;;
30481         esac
30482         gtest_version=`$GTEST_CONFIG --version`
30483         case "$gta" in
30484          true)
30485             { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($gtest_version) ok" >&5
30486 $as_echo "($gtest_version) ok" >&6; }
30487             ;;
30488          *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($gtest_version) not ok" >&5
30489 $as_echo "($gtest_version) not ok" >&6; }
30490             ;;
30491         esac
30492         { gtest_version_test=; unset gtest_version_test;}
30493         { gtest_version=; unset gtest_version;}
30494     esac
30495 esac
30496  if $gta; then
30497   GTEST_AVAILABLE_TRUE=
30498   GTEST_AVAILABLE_FALSE='#'
30499 else
30500   GTEST_AVAILABLE_TRUE='#'
30501   GTEST_AVAILABLE_FALSE=
30502 fi
30503
30504
30505
30506
30507 # All libraries should be in various LIB_* variables now.
30508 #LIBS=
30509 # Sadly not.  There is a gettext() check somewhere, and on Solaris this pulls
30510 # in -lintl -lgen, outside our "scope".
30511
30512 ac_config_files="$ac_config_files Makefile"
30513
30514 ac_config_files="$ac_config_files include/Makefile"
30515
30516 ac_config_files="$ac_config_files scripts/Makefile"
30517
30518 ac_config_files="$ac_config_files tests/Makefile"
30519
30520 ac_config_files="$ac_config_files tests/fileHandlingTest.h"
30521
30522 ac_config_files="$ac_config_files unity/Makefile"
30523
30524
30525 cat >confcache <<\_ACEOF
30526 # This file is a shell script that caches the results of configure
30527 # tests run on this system so they can be shared between configure
30528 # scripts and configure runs, see configure's option --config-cache.
30529 # It is not useful on other systems.  If it contains results you don't
30530 # want to keep, you may remove or edit it.
30531 #
30532 # config.status only pays attention to the cache file if you give it
30533 # the --recheck option to rerun configure.
30534 #
30535 # `ac_cv_env_foo' variables (set or unset) will be overridden when
30536 # loading this file, other *unset* `ac_cv_foo' will be assigned the
30537 # following values.
30538
30539 _ACEOF
30540
30541 # The following way of writing the cache mishandles newlines in values,
30542 # but we know of no workaround that is simple, portable, and efficient.
30543 # So, we kill variables containing newlines.
30544 # Ultrix sh set writes to stderr and can't be redirected directly,
30545 # and sets the high bit in the cache file unless we assign to the vars.
30546 (
30547   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
30548     eval ac_val=\$$ac_var
30549     case $ac_val in #(
30550     *${as_nl}*)
30551       case $ac_var in #(
30552       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
30553 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
30554       esac
30555       case $ac_var in #(
30556       _ | IFS | as_nl) ;; #(
30557       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
30558       *) { eval $ac_var=; unset $ac_var;} ;;
30559       esac ;;
30560     esac
30561   done
30562
30563   (set) 2>&1 |
30564     case $as_nl`(ac_space=' '; set) 2>&1` in #(
30565     *${as_nl}ac_space=\ *)
30566       # `set' does not quote correctly, so add quotes: double-quote
30567       # substitution turns \\\\ into \\, and sed turns \\ into \.
30568       sed -n \
30569         "s/'/'\\\\''/g;
30570           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
30571       ;; #(
30572     *)
30573       # `set' quotes correctly as required by POSIX, so do not add quotes.
30574       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
30575       ;;
30576     esac |
30577     sort
30578 ) |
30579   sed '
30580      /^ac_cv_env_/b end
30581      t clear
30582      :clear
30583      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
30584      t end
30585      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
30586      :end' >>confcache
30587 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
30588   if test -w "$cache_file"; then
30589     if test "x$cache_file" != "x/dev/null"; then
30590       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
30591 $as_echo "$as_me: updating cache $cache_file" >&6;}
30592       if test ! -f "$cache_file" || test -h "$cache_file"; then
30593         cat confcache >"$cache_file"
30594       else
30595         case $cache_file in #(
30596         */* | ?:*)
30597           mv -f confcache "$cache_file"$$ &&
30598           mv -f "$cache_file"$$ "$cache_file" ;; #(
30599         *)
30600           mv -f confcache "$cache_file" ;;
30601         esac
30602       fi
30603     fi
30604   else
30605     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
30606 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
30607   fi
30608 fi
30609 rm -f confcache
30610
30611 test "x$prefix" = xNONE && prefix=$ac_default_prefix
30612 # Let make expand exec_prefix.
30613 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
30614
30615 DEFS=-DHAVE_CONFIG_H
30616
30617 ac_libobjs=
30618 ac_ltlibobjs=
30619 U=
30620 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
30621   # 1. Remove the extension, and $U if already installed.
30622   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
30623   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
30624   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
30625   #    will be set to the directory where LIBOBJS objects are built.
30626   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
30627   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
30628 done
30629 LIBOBJS=$ac_libobjs
30630
30631 LTLIBOBJS=$ac_ltlibobjs
30632
30633
30634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
30635 $as_echo_n "checking that generated files are newer than configure... " >&6; }
30636    if test -n "$am_sleep_pid"; then
30637      # Hide warnings about reused PIDs.
30638      wait $am_sleep_pid 2>/dev/null
30639    fi
30640    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
30641 $as_echo "done" >&6; }
30642  if test -n "$EXEEXT"; then
30643   am__EXEEXT_TRUE=
30644   am__EXEEXT_FALSE='#'
30645 else
30646   am__EXEEXT_TRUE='#'
30647   am__EXEEXT_FALSE=
30648 fi
30649
30650 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
30651   as_fn_error $? "conditional \"AMDEP\" was never defined.
30652 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30653 fi
30654 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
30655   as_fn_error $? "conditional \"am__fastdepCC\" 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
30663 if test -z "${WANT_CALC_TICKADJ_MS_TRUE}" && test -z "${WANT_CALC_TICKADJ_MS_FALSE}"; then
30664   as_fn_error $? "conditional \"WANT_CALC_TICKADJ_MS\" was never defined.
30665 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30666 fi
30667 if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; then
30668   as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
30669 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30670 fi
30671 if test -z "${INSTALL_UPDATE_LEAP_TRUE}" && test -z "${INSTALL_UPDATE_LEAP_FALSE}"; then
30672   as_fn_error $? "conditional \"INSTALL_UPDATE_LEAP\" was never defined.
30673 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30674 fi
30675 if test -z "${NTP_CROSSCOMPILE_TRUE}" && test -z "${NTP_CROSSCOMPILE_FALSE}"; then
30676   as_fn_error $? "conditional \"NTP_CROSSCOMPILE\" was never defined.
30677 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30678 fi
30679 if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
30680   as_fn_error $? "conditional \"PTHREADS\" was never defined.
30681 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30682 fi
30683 if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then
30684   as_fn_error $? "conditional \"BUILD_SNTP\" was never defined.
30685 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30686 fi
30687 if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
30688   as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
30689 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30690 fi
30691 if test -z "${INSTALL_LIBOPTS_TRUE}" && test -z "${INSTALL_LIBOPTS_FALSE}"; then
30692   as_fn_error $? "conditional \"INSTALL_LIBOPTS\" was never defined.
30693 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30694 fi
30695 if test -z "${NEED_LIBOPTS_TRUE}" && test -z "${NEED_LIBOPTS_FALSE}"; then
30696   as_fn_error $? "conditional \"NEED_LIBOPTS\" was never defined.
30697 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30698 fi
30699 if test -z "${BUILD_LIBEVENT_TRUE}" && test -z "${BUILD_LIBEVENT_FALSE}"; then
30700   as_fn_error $? "conditional \"BUILD_LIBEVENT\" was never defined.
30701 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30702 fi
30703 if test -z "${UNITYBUILD_AVAILABLE_TRUE}" && test -z "${UNITYBUILD_AVAILABLE_FALSE}"; then
30704   as_fn_error $? "conditional \"UNITYBUILD_AVAILABLE\" was never defined.
30705 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30706 fi
30707 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
30708   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
30709 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30710 fi
30711 if test -z "${GTEST_AVAILABLE_TRUE}" && test -z "${GTEST_AVAILABLE_FALSE}"; then
30712   as_fn_error $? "conditional \"GTEST_AVAILABLE\" was never defined.
30713 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30714 fi
30715
30716 : "${CONFIG_STATUS=./config.status}"
30717 ac_write_fail=0
30718 ac_clean_files_save=$ac_clean_files
30719 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
30720 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
30721 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
30722 as_write_fail=0
30723 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
30724 #! $SHELL
30725 # Generated by $as_me.
30726 # Run this file to recreate the current configuration.
30727 # Compiler output produced by configure, useful for debugging
30728 # configure, is in config.log if it exists.
30729
30730 debug=false
30731 ac_cs_recheck=false
30732 ac_cs_silent=false
30733
30734 SHELL=\${CONFIG_SHELL-$SHELL}
30735 export SHELL
30736 _ASEOF
30737 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
30738 ## -------------------- ##
30739 ## M4sh Initialization. ##
30740 ## -------------------- ##
30741
30742 # Be more Bourne compatible
30743 DUALCASE=1; export DUALCASE # for MKS sh
30744 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
30745   emulate sh
30746   NULLCMD=:
30747   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
30748   # is contrary to our usage.  Disable this feature.
30749   alias -g '${1+"$@"}'='"$@"'
30750   setopt NO_GLOB_SUBST
30751 else
30752   case `(set -o) 2>/dev/null` in #(
30753   *posix*) :
30754     set -o posix ;; #(
30755   *) :
30756      ;;
30757 esac
30758 fi
30759
30760
30761 as_nl='
30762 '
30763 export as_nl
30764 # Printing a long string crashes Solaris 7 /usr/bin/printf.
30765 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
30766 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
30767 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
30768 # Prefer a ksh shell builtin over an external printf program on Solaris,
30769 # but without wasting forks for bash or zsh.
30770 if test -z "$BASH_VERSION$ZSH_VERSION" \
30771     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
30772   as_echo='print -r --'
30773   as_echo_n='print -rn --'
30774 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
30775   as_echo='printf %s\n'
30776   as_echo_n='printf %s'
30777 else
30778   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
30779     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
30780     as_echo_n='/usr/ucb/echo -n'
30781   else
30782     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
30783     as_echo_n_body='eval
30784       arg=$1;
30785       case $arg in #(
30786       *"$as_nl"*)
30787         expr "X$arg" : "X\\(.*\\)$as_nl";
30788         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
30789       esac;
30790       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
30791     '
30792     export as_echo_n_body
30793     as_echo_n='sh -c $as_echo_n_body as_echo'
30794   fi
30795   export as_echo_body
30796   as_echo='sh -c $as_echo_body as_echo'
30797 fi
30798
30799 # The user is always right.
30800 if test "${PATH_SEPARATOR+set}" != set; then
30801   PATH_SEPARATOR=:
30802   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
30803     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
30804       PATH_SEPARATOR=';'
30805   }
30806 fi
30807
30808
30809 # IFS
30810 # We need space, tab and new line, in precisely that order.  Quoting is
30811 # there to prevent editors from complaining about space-tab.
30812 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
30813 # splitting by setting IFS to empty value.)
30814 IFS=" ""        $as_nl"
30815
30816 # Find who we are.  Look in the path if we contain no directory separator.
30817 as_myself=
30818 case $0 in #((
30819   *[\\/]* ) as_myself=$0 ;;
30820   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30821 for as_dir in $PATH
30822 do
30823   IFS=$as_save_IFS
30824   test -z "$as_dir" && as_dir=.
30825     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
30826   done
30827 IFS=$as_save_IFS
30828
30829      ;;
30830 esac
30831 # We did not find ourselves, most probably we were run as `sh COMMAND'
30832 # in which case we are not to be found in the path.
30833 if test "x$as_myself" = x; then
30834   as_myself=$0
30835 fi
30836 if test ! -f "$as_myself"; then
30837   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
30838   exit 1
30839 fi
30840
30841 # Unset variables that we do not need and which cause bugs (e.g. in
30842 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
30843 # suppresses any "Segmentation fault" message there.  '((' could
30844 # trigger a bug in pdksh 5.2.14.
30845 for as_var in BASH_ENV ENV MAIL MAILPATH
30846 do eval test x\${$as_var+set} = xset \
30847   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
30848 done
30849 PS1='$ '
30850 PS2='> '
30851 PS4='+ '
30852
30853 # NLS nuisances.
30854 LC_ALL=C
30855 export LC_ALL
30856 LANGUAGE=C
30857 export LANGUAGE
30858
30859 # CDPATH.
30860 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
30861
30862
30863 # as_fn_error STATUS ERROR [LINENO LOG_FD]
30864 # ----------------------------------------
30865 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
30866 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
30867 # script with STATUS, using 1 if that was 0.
30868 as_fn_error ()
30869 {
30870   as_status=$1; test $as_status -eq 0 && as_status=1
30871   if test "$4"; then
30872     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
30873     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
30874   fi
30875   $as_echo "$as_me: error: $2" >&2
30876   as_fn_exit $as_status
30877 } # as_fn_error
30878
30879
30880 # as_fn_set_status STATUS
30881 # -----------------------
30882 # Set $? to STATUS, without forking.
30883 as_fn_set_status ()
30884 {
30885   return $1
30886 } # as_fn_set_status
30887
30888 # as_fn_exit STATUS
30889 # -----------------
30890 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
30891 as_fn_exit ()
30892 {
30893   set +e
30894   as_fn_set_status $1
30895   exit $1
30896 } # as_fn_exit
30897
30898 # as_fn_unset VAR
30899 # ---------------
30900 # Portably unset VAR.
30901 as_fn_unset ()
30902 {
30903   { eval $1=; unset $1;}
30904 }
30905 as_unset=as_fn_unset
30906 # as_fn_append VAR VALUE
30907 # ----------------------
30908 # Append the text in VALUE to the end of the definition contained in VAR. Take
30909 # advantage of any shell optimizations that allow amortized linear growth over
30910 # repeated appends, instead of the typical quadratic growth present in naive
30911 # implementations.
30912 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
30913   eval 'as_fn_append ()
30914   {
30915     eval $1+=\$2
30916   }'
30917 else
30918   as_fn_append ()
30919   {
30920     eval $1=\$$1\$2
30921   }
30922 fi # as_fn_append
30923
30924 # as_fn_arith ARG...
30925 # ------------------
30926 # Perform arithmetic evaluation on the ARGs, and store the result in the
30927 # global $as_val. Take advantage of shells that can avoid forks. The arguments
30928 # must be portable across $(()) and expr.
30929 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
30930   eval 'as_fn_arith ()
30931   {
30932     as_val=$(( $* ))
30933   }'
30934 else
30935   as_fn_arith ()
30936   {
30937     as_val=`expr "$@" || test $? -eq 1`
30938   }
30939 fi # as_fn_arith
30940
30941
30942 if expr a : '\(a\)' >/dev/null 2>&1 &&
30943    test "X`expr 00001 : '.*\(...\)'`" = X001; then
30944   as_expr=expr
30945 else
30946   as_expr=false
30947 fi
30948
30949 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
30950   as_basename=basename
30951 else
30952   as_basename=false
30953 fi
30954
30955 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
30956   as_dirname=dirname
30957 else
30958   as_dirname=false
30959 fi
30960
30961 as_me=`$as_basename -- "$0" ||
30962 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
30963          X"$0" : 'X\(//\)$' \| \
30964          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
30965 $as_echo X/"$0" |
30966     sed '/^.*\/\([^/][^/]*\)\/*$/{
30967             s//\1/
30968             q
30969           }
30970           /^X\/\(\/\/\)$/{
30971             s//\1/
30972             q
30973           }
30974           /^X\/\(\/\).*/{
30975             s//\1/
30976             q
30977           }
30978           s/.*/./; q'`
30979
30980 # Avoid depending upon Character Ranges.
30981 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
30982 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
30983 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
30984 as_cr_digits='0123456789'
30985 as_cr_alnum=$as_cr_Letters$as_cr_digits
30986
30987 ECHO_C= ECHO_N= ECHO_T=
30988 case `echo -n x` in #(((((
30989 -n*)
30990   case `echo 'xy\c'` in
30991   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
30992   xy)  ECHO_C='\c';;
30993   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
30994        ECHO_T=' ';;
30995   esac;;
30996 *)
30997   ECHO_N='-n';;
30998 esac
30999
31000 rm -f conf$$ conf$$.exe conf$$.file
31001 if test -d conf$$.dir; then
31002   rm -f conf$$.dir/conf$$.file
31003 else
31004   rm -f conf$$.dir
31005   mkdir conf$$.dir 2>/dev/null
31006 fi
31007 if (echo >conf$$.file) 2>/dev/null; then
31008   if ln -s conf$$.file conf$$ 2>/dev/null; then
31009     as_ln_s='ln -s'
31010     # ... but there are two gotchas:
31011     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
31012     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
31013     # In both cases, we have to default to `cp -pR'.
31014     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
31015       as_ln_s='cp -pR'
31016   elif ln conf$$.file conf$$ 2>/dev/null; then
31017     as_ln_s=ln
31018   else
31019     as_ln_s='cp -pR'
31020   fi
31021 else
31022   as_ln_s='cp -pR'
31023 fi
31024 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
31025 rmdir conf$$.dir 2>/dev/null
31026
31027
31028 # as_fn_mkdir_p
31029 # -------------
31030 # Create "$as_dir" as a directory, including parents if necessary.
31031 as_fn_mkdir_p ()
31032 {
31033
31034   case $as_dir in #(
31035   -*) as_dir=./$as_dir;;
31036   esac
31037   test -d "$as_dir" || eval $as_mkdir_p || {
31038     as_dirs=
31039     while :; do
31040       case $as_dir in #(
31041       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
31042       *) as_qdir=$as_dir;;
31043       esac
31044       as_dirs="'$as_qdir' $as_dirs"
31045       as_dir=`$as_dirname -- "$as_dir" ||
31046 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31047          X"$as_dir" : 'X\(//\)[^/]' \| \
31048          X"$as_dir" : 'X\(//\)$' \| \
31049          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31050 $as_echo X"$as_dir" |
31051     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31052             s//\1/
31053             q
31054           }
31055           /^X\(\/\/\)[^/].*/{
31056             s//\1/
31057             q
31058           }
31059           /^X\(\/\/\)$/{
31060             s//\1/
31061             q
31062           }
31063           /^X\(\/\).*/{
31064             s//\1/
31065             q
31066           }
31067           s/.*/./; q'`
31068       test -d "$as_dir" && break
31069     done
31070     test -z "$as_dirs" || eval "mkdir $as_dirs"
31071   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
31072
31073
31074 } # as_fn_mkdir_p
31075 if mkdir -p . 2>/dev/null; then
31076   as_mkdir_p='mkdir -p "$as_dir"'
31077 else
31078   test -d ./-p && rmdir ./-p
31079   as_mkdir_p=false
31080 fi
31081
31082
31083 # as_fn_executable_p FILE
31084 # -----------------------
31085 # Test if FILE is an executable regular file.
31086 as_fn_executable_p ()
31087 {
31088   test -f "$1" && test -x "$1"
31089 } # as_fn_executable_p
31090 as_test_x='test -x'
31091 as_executable_p=as_fn_executable_p
31092
31093 # Sed expression to map a string onto a valid CPP name.
31094 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
31095
31096 # Sed expression to map a string onto a valid variable name.
31097 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
31098
31099
31100 exec 6>&1
31101 ## ----------------------------------- ##
31102 ## Main body of $CONFIG_STATUS script. ##
31103 ## ----------------------------------- ##
31104 _ASEOF
31105 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
31106
31107 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31108 # Save the log message, to keep $0 and so on meaningful, and to
31109 # report actual input values of CONFIG_FILES etc. instead of their
31110 # values after options handling.
31111 ac_log="
31112 This file was extended by sntp $as_me 4.2.8p4, which was
31113 generated by GNU Autoconf 2.69.  Invocation command line was
31114
31115   CONFIG_FILES    = $CONFIG_FILES
31116   CONFIG_HEADERS  = $CONFIG_HEADERS
31117   CONFIG_LINKS    = $CONFIG_LINKS
31118   CONFIG_COMMANDS = $CONFIG_COMMANDS
31119   $ $0 $@
31120
31121 on `(hostname || uname -n) 2>/dev/null | sed 1q`
31122 "
31123
31124 _ACEOF
31125
31126 case $ac_config_files in *"
31127 "*) set x $ac_config_files; shift; ac_config_files=$*;;
31128 esac
31129
31130 case $ac_config_headers in *"
31131 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
31132 esac
31133
31134
31135 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31136 # Files that config.status was made for.
31137 config_files="$ac_config_files"
31138 config_headers="$ac_config_headers"
31139 config_commands="$ac_config_commands"
31140
31141 _ACEOF
31142
31143 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31144 ac_cs_usage="\
31145 \`$as_me' instantiates files and other configuration actions
31146 from templates according to the current configuration.  Unless the files
31147 and actions are specified as TAGs, all are instantiated by default.
31148
31149 Usage: $0 [OPTION]... [TAG]...
31150
31151   -h, --help       print this help, then exit
31152   -V, --version    print version number and configuration settings, then exit
31153       --config     print configuration, then exit
31154   -q, --quiet, --silent
31155                    do not print progress messages
31156   -d, --debug      don't remove temporary files
31157       --recheck    update $as_me by reconfiguring in the same conditions
31158       --file=FILE[:TEMPLATE]
31159                    instantiate the configuration file FILE
31160       --header=FILE[:TEMPLATE]
31161                    instantiate the configuration header FILE
31162
31163 Configuration files:
31164 $config_files
31165
31166 Configuration headers:
31167 $config_headers
31168
31169 Configuration commands:
31170 $config_commands
31171
31172 Report bugs to <http://bugs.ntp.org./>.
31173 sntp home page: <http://www.ntp.org./>."
31174
31175 _ACEOF
31176 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31177 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31178 ac_cs_version="\\
31179 sntp config.status 4.2.8p4
31180 configured by $0, generated by GNU Autoconf 2.69,
31181   with options \\"\$ac_cs_config\\"
31182
31183 Copyright (C) 2012 Free Software Foundation, Inc.
31184 This config.status script is free software; the Free Software Foundation
31185 gives unlimited permission to copy, distribute and modify it."
31186
31187 ac_pwd='$ac_pwd'
31188 srcdir='$srcdir'
31189 INSTALL='$INSTALL'
31190 MKDIR_P='$MKDIR_P'
31191 AWK='$AWK'
31192 test -n "\$AWK" || AWK=awk
31193 _ACEOF
31194
31195 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31196 # The default lists apply if the user does not specify any file.
31197 ac_need_defaults=:
31198 while test $# != 0
31199 do
31200   case $1 in
31201   --*=?*)
31202     ac_option=`expr "X$1" : 'X\([^=]*\)='`
31203     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31204     ac_shift=:
31205     ;;
31206   --*=)
31207     ac_option=`expr "X$1" : 'X\([^=]*\)='`
31208     ac_optarg=
31209     ac_shift=:
31210     ;;
31211   *)
31212     ac_option=$1
31213     ac_optarg=$2
31214     ac_shift=shift
31215     ;;
31216   esac
31217
31218   case $ac_option in
31219   # Handling of the options.
31220   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31221     ac_cs_recheck=: ;;
31222   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31223     $as_echo "$ac_cs_version"; exit ;;
31224   --config | --confi | --conf | --con | --co | --c )
31225     $as_echo "$ac_cs_config"; exit ;;
31226   --debug | --debu | --deb | --de | --d | -d )
31227     debug=: ;;
31228   --file | --fil | --fi | --f )
31229     $ac_shift
31230     case $ac_optarg in
31231     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31232     '') as_fn_error $? "missing file argument" ;;
31233     esac
31234     as_fn_append CONFIG_FILES " '$ac_optarg'"
31235     ac_need_defaults=false;;
31236   --header | --heade | --head | --hea )
31237     $ac_shift
31238     case $ac_optarg in
31239     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31240     esac
31241     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31242     ac_need_defaults=false;;
31243   --he | --h)
31244     # Conflict between --help and --header
31245     as_fn_error $? "ambiguous option: \`$1'
31246 Try \`$0 --help' for more information.";;
31247   --help | --hel | -h )
31248     $as_echo "$ac_cs_usage"; exit ;;
31249   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31250   | -silent | --silent | --silen | --sile | --sil | --si | --s)
31251     ac_cs_silent=: ;;
31252
31253   # This is an error.
31254   -*) as_fn_error $? "unrecognized option: \`$1'
31255 Try \`$0 --help' for more information." ;;
31256
31257   *) as_fn_append ac_config_targets " $1"
31258      ac_need_defaults=false ;;
31259
31260   esac
31261   shift
31262 done
31263
31264 ac_configure_extra_args=
31265
31266 if $ac_cs_silent; then
31267   exec 6>/dev/null
31268   ac_configure_extra_args="$ac_configure_extra_args --silent"
31269 fi
31270
31271 _ACEOF
31272 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31273 if \$ac_cs_recheck; then
31274   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31275   shift
31276   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
31277   CONFIG_SHELL='$SHELL'
31278   export CONFIG_SHELL
31279   exec "\$@"
31280 fi
31281
31282 _ACEOF
31283 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31284 exec 5>>config.log
31285 {
31286   echo
31287   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31288 ## Running $as_me. ##
31289 _ASBOX
31290   $as_echo "$ac_log"
31291 } >&5
31292
31293 _ACEOF
31294 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31295 #
31296 # INIT-COMMANDS
31297 #
31298 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
31299
31300
31301 # The HP-UX ksh and POSIX shell print the target directory to stdout
31302 # if CDPATH is set.
31303 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31304
31305 sed_quote_subst='$sed_quote_subst'
31306 double_quote_subst='$double_quote_subst'
31307 delay_variable_subst='$delay_variable_subst'
31308 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
31309 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
31310 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
31311 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
31312 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
31313 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
31314 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
31315 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
31316 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
31317 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
31318 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
31319 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
31320 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
31321 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
31322 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
31323 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
31324 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
31325 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
31326 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
31327 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
31328 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
31329 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
31330 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
31331 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
31332 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
31333 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
31334 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
31335 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
31336 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
31337 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
31338 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
31339 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
31340 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
31341 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
31342 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
31343 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
31344 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
31345 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
31346 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
31347 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
31348 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
31349 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
31350 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
31351 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
31352 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
31353 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
31354 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
31355 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
31356 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
31357 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
31358 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
31359 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
31360 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
31361 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
31362 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
31363 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"`'
31364 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
31365 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
31366 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
31367 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
31368 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
31369 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
31370 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
31371 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
31372 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
31373 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
31374 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
31375 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
31376 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
31377 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
31378 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
31379 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
31380 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
31381 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
31382 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
31383 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
31384 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
31385 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
31386 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
31387 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
31388 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
31389 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
31390 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
31391 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
31392 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
31393 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
31394 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
31395 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
31396 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
31397 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
31398 hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
31399 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
31400 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
31401 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
31402 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
31403 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
31404 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
31405 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
31406 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
31407 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
31408 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
31409 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
31410 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
31411 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
31412 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
31413 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
31414 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
31415 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
31416 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
31417 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
31418 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
31419 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
31420 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
31421 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
31422 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
31423 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
31424 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
31425 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
31426 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
31427 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
31428 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
31429 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
31430 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
31431 sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
31432 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
31433 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
31434 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
31435 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
31436 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
31437 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
31438 compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
31439 predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
31440 postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
31441 predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
31442 postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
31443 compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
31444 LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
31445 reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
31446 reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31447 old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31448 compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
31449 GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
31450 lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
31451 lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
31452 lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
31453 lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
31454 lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
31455 archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
31456 enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
31457 export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
31458 whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
31459 compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
31460 old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31461 old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31462 archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31463 archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31464 module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31465 module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31466 with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
31467 allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
31468 no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
31469 hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
31470 hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`'
31471 hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
31472 hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
31473 hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
31474 hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
31475 hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
31476 hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
31477 inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
31478 link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
31479 always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
31480 export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31481 exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
31482 include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
31483 prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31484 postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
31485 file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
31486 hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
31487 compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
31488 predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
31489 postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
31490 predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
31491 postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
31492 compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
31493
31494 LTCC='$LTCC'
31495 LTCFLAGS='$LTCFLAGS'
31496 compiler='$compiler_DEFAULT'
31497
31498 # A function that is used when there is no print builtin or printf.
31499 func_fallback_echo ()
31500 {
31501   eval 'cat <<_LTECHO_EOF
31502 \$1
31503 _LTECHO_EOF'
31504 }
31505
31506 # Quote evaled strings.
31507 for var in SED \
31508 GREP \
31509 EGREP \
31510 FGREP \
31511 SHELL \
31512 ECHO \
31513 LD \
31514 NM \
31515 LN_S \
31516 lt_SP2NL \
31517 lt_NL2SP \
31518 reload_flag \
31519 OBJDUMP \
31520 deplibs_check_method \
31521 file_magic_cmd \
31522 file_magic_glob \
31523 want_nocaseglob \
31524 DLLTOOL \
31525 sharedlib_from_linklib_cmd \
31526 AR \
31527 AR_FLAGS \
31528 archiver_list_spec \
31529 STRIP \
31530 RANLIB \
31531 CC \
31532 CFLAGS \
31533 compiler \
31534 lt_cv_sys_global_symbol_pipe \
31535 lt_cv_sys_global_symbol_to_cdecl \
31536 lt_cv_sys_global_symbol_to_c_name_address \
31537 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
31538 nm_file_list_spec \
31539 lt_prog_compiler_no_builtin_flag \
31540 lt_prog_compiler_pic \
31541 lt_prog_compiler_wl \
31542 lt_prog_compiler_static \
31543 lt_cv_prog_compiler_c_o \
31544 need_locks \
31545 MANIFEST_TOOL \
31546 DSYMUTIL \
31547 NMEDIT \
31548 LIPO \
31549 OTOOL \
31550 OTOOL64 \
31551 shrext_cmds \
31552 export_dynamic_flag_spec \
31553 whole_archive_flag_spec \
31554 compiler_needs_object \
31555 with_gnu_ld \
31556 allow_undefined_flag \
31557 no_undefined_flag \
31558 hardcode_libdir_flag_spec \
31559 hardcode_libdir_flag_spec_ld \
31560 hardcode_libdir_separator \
31561 exclude_expsyms \
31562 include_expsyms \
31563 file_list_spec \
31564 variables_saved_for_relink \
31565 libname_spec \
31566 library_names_spec \
31567 soname_spec \
31568 install_override_mode \
31569 finish_eval \
31570 old_striplib \
31571 striplib \
31572 compiler_lib_search_dirs \
31573 predep_objects \
31574 postdep_objects \
31575 predeps \
31576 postdeps \
31577 compiler_lib_search_path \
31578 LD_CXX \
31579 reload_flag_CXX \
31580 compiler_CXX \
31581 lt_prog_compiler_no_builtin_flag_CXX \
31582 lt_prog_compiler_pic_CXX \
31583 lt_prog_compiler_wl_CXX \
31584 lt_prog_compiler_static_CXX \
31585 lt_cv_prog_compiler_c_o_CXX \
31586 export_dynamic_flag_spec_CXX \
31587 whole_archive_flag_spec_CXX \
31588 compiler_needs_object_CXX \
31589 with_gnu_ld_CXX \
31590 allow_undefined_flag_CXX \
31591 no_undefined_flag_CXX \
31592 hardcode_libdir_flag_spec_CXX \
31593 hardcode_libdir_flag_spec_ld_CXX \
31594 hardcode_libdir_separator_CXX \
31595 exclude_expsyms_CXX \
31596 include_expsyms_CXX \
31597 file_list_spec_CXX \
31598 compiler_lib_search_dirs_CXX \
31599 predep_objects_CXX \
31600 postdep_objects_CXX \
31601 predeps_CXX \
31602 postdeps_CXX \
31603 compiler_lib_search_path_CXX; do
31604     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
31605     *[\\\\\\\`\\"\\\$]*)
31606       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
31607       ;;
31608     *)
31609       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
31610       ;;
31611     esac
31612 done
31613
31614 # Double-quote double-evaled strings.
31615 for var in reload_cmds \
31616 old_postinstall_cmds \
31617 old_postuninstall_cmds \
31618 old_archive_cmds \
31619 extract_expsyms_cmds \
31620 old_archive_from_new_cmds \
31621 old_archive_from_expsyms_cmds \
31622 archive_cmds \
31623 archive_expsym_cmds \
31624 module_cmds \
31625 module_expsym_cmds \
31626 export_symbols_cmds \
31627 prelink_cmds \
31628 postlink_cmds \
31629 postinstall_cmds \
31630 postuninstall_cmds \
31631 finish_cmds \
31632 sys_lib_search_path_spec \
31633 sys_lib_dlsearch_path_spec \
31634 reload_cmds_CXX \
31635 old_archive_cmds_CXX \
31636 old_archive_from_new_cmds_CXX \
31637 old_archive_from_expsyms_cmds_CXX \
31638 archive_cmds_CXX \
31639 archive_expsym_cmds_CXX \
31640 module_cmds_CXX \
31641 module_expsym_cmds_CXX \
31642 export_symbols_cmds_CXX \
31643 prelink_cmds_CXX \
31644 postlink_cmds_CXX; do
31645     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
31646     *[\\\\\\\`\\"\\\$]*)
31647       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
31648       ;;
31649     *)
31650       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
31651       ;;
31652     esac
31653 done
31654
31655 ac_aux_dir='$ac_aux_dir'
31656 xsi_shell='$xsi_shell'
31657 lt_shell_append='$lt_shell_append'
31658
31659 # See if we are running on zsh, and set the options which allow our
31660 # commands through without removal of \ escapes INIT.
31661 if test -n "\${ZSH_VERSION+set}" ; then
31662    setopt NO_GLOB_SUBST
31663 fi
31664
31665
31666     PACKAGE='$PACKAGE'
31667     VERSION='$VERSION'
31668     TIMESTAMP='$TIMESTAMP'
31669     RM='$RM'
31670     ofile='$ofile'
31671
31672
31673
31674
31675
31676
31677 _ACEOF
31678
31679 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31680
31681 # Handling of arguments.
31682 for ac_config_target in $ac_config_targets
31683 do
31684   case $ac_config_target in
31685     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
31686     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
31687     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
31688     "libopts/Makefile") CONFIG_FILES="$CONFIG_FILES libopts/Makefile" ;;
31689     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
31690     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
31691     "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
31692     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
31693     "tests/fileHandlingTest.h") CONFIG_FILES="$CONFIG_FILES tests/fileHandlingTest.h" ;;
31694     "unity/Makefile") CONFIG_FILES="$CONFIG_FILES unity/Makefile" ;;
31695
31696   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
31697   esac
31698 done
31699
31700
31701 # If the user did not use the arguments to specify the items to instantiate,
31702 # then the envvar interface is used.  Set only those that are not.
31703 # We use the long form for the default assignment because of an extremely
31704 # bizarre bug on SunOS 4.1.3.
31705 if $ac_need_defaults; then
31706   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
31707   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
31708   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
31709 fi
31710
31711 # Have a temporary directory for convenience.  Make it in the build tree
31712 # simply because there is no reason against having it here, and in addition,
31713 # creating and moving files from /tmp can sometimes cause problems.
31714 # Hook for its removal unless debugging.
31715 # Note that there is a small window in which the directory will not be cleaned:
31716 # after its creation but before its name has been assigned to `$tmp'.
31717 $debug ||
31718 {
31719   tmp= ac_tmp=
31720   trap 'exit_status=$?
31721   : "${ac_tmp:=$tmp}"
31722   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
31723 ' 0
31724   trap 'as_fn_exit 1' 1 2 13 15
31725 }
31726 # Create a (secure) tmp directory for tmp files.
31727
31728 {
31729   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31730   test -d "$tmp"
31731 }  ||
31732 {
31733   tmp=./conf$$-$RANDOM
31734   (umask 077 && mkdir "$tmp")
31735 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31736 ac_tmp=$tmp
31737
31738 # Set up the scripts for CONFIG_FILES section.
31739 # No need to generate them if there are no CONFIG_FILES.
31740 # This happens for instance with `./config.status config.h'.
31741 if test -n "$CONFIG_FILES"; then
31742
31743
31744 ac_cr=`echo X | tr X '\015'`
31745 # On cygwin, bash can eat \r inside `` if the user requested igncr.
31746 # But we know of no other shell where ac_cr would be empty at this
31747 # point, so we can use a bashism as a fallback.
31748 if test "x$ac_cr" = x; then
31749   eval ac_cr=\$\'\\r\'
31750 fi
31751 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31752 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31753   ac_cs_awk_cr='\\r'
31754 else
31755   ac_cs_awk_cr=$ac_cr
31756 fi
31757
31758 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
31759 _ACEOF
31760
31761
31762 {
31763   echo "cat >conf$$subs.awk <<_ACEOF" &&
31764   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31765   echo "_ACEOF"
31766 } >conf$$subs.sh ||
31767   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31768 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
31769 ac_delim='%!_!# '
31770 for ac_last_try in false false false false false :; do
31771   . ./conf$$subs.sh ||
31772     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31773
31774   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31775   if test $ac_delim_n = $ac_delim_num; then
31776     break
31777   elif $ac_last_try; then
31778     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31779   else
31780     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31781   fi
31782 done
31783 rm -f conf$$subs.sh
31784
31785 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31786 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
31787 _ACEOF
31788 sed -n '
31789 h
31790 s/^/S["/; s/!.*/"]=/
31791 p
31792 g
31793 s/^[^!]*!//
31794 :repl
31795 t repl
31796 s/'"$ac_delim"'$//
31797 t delim
31798 :nl
31799 h
31800 s/\(.\{148\}\)..*/\1/
31801 t more1
31802 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31803 p
31804 n
31805 b repl
31806 :more1
31807 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31808 p
31809 g
31810 s/.\{148\}//
31811 t nl
31812 :delim
31813 h
31814 s/\(.\{148\}\)..*/\1/
31815 t more2
31816 s/["\\]/\\&/g; s/^/"/; s/$/"/
31817 p
31818 b
31819 :more2
31820 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31821 p
31822 g
31823 s/.\{148\}//
31824 t delim
31825 ' <conf$$subs.awk | sed '
31826 /^[^""]/{
31827   N
31828   s/\n//
31829 }
31830 ' >>$CONFIG_STATUS || ac_write_fail=1
31831 rm -f conf$$subs.awk
31832 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31833 _ACAWK
31834 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
31835   for (key in S) S_is_set[key] = 1
31836   FS = "\a"
31837
31838 }
31839 {
31840   line = $ 0
31841   nfields = split(line, field, "@")
31842   substed = 0
31843   len = length(field[1])
31844   for (i = 2; i < nfields; i++) {
31845     key = field[i]
31846     keylen = length(key)
31847     if (S_is_set[key]) {
31848       value = S[key]
31849       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31850       len += length(value) + length(field[++i])
31851       substed = 1
31852     } else
31853       len += 1 + keylen
31854   }
31855
31856   print line
31857 }
31858
31859 _ACAWK
31860 _ACEOF
31861 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31862 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31863   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31864 else
31865   cat
31866 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
31867   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
31868 _ACEOF
31869
31870 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
31871 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
31872 # trailing colons and then remove the whole line if VPATH becomes empty
31873 # (actually we leave an empty line to preserve line numbers).
31874 if test "x$srcdir" = x.; then
31875   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
31876 h
31877 s///
31878 s/^/:/
31879 s/[      ]*$/:/
31880 s/:\$(srcdir):/:/g
31881 s/:\${srcdir}:/:/g
31882 s/:@srcdir@:/:/g
31883 s/^:*//
31884 s/:*$//
31885 x
31886 s/\(=[   ]*\).*/\1/
31887 G
31888 s/\n//
31889 s/^[^=]*=[       ]*$//
31890 }'
31891 fi
31892
31893 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31894 fi # test -n "$CONFIG_FILES"
31895
31896 # Set up the scripts for CONFIG_HEADERS section.
31897 # No need to generate them if there are no CONFIG_HEADERS.
31898 # This happens for instance with `./config.status Makefile'.
31899 if test -n "$CONFIG_HEADERS"; then
31900 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
31901 BEGIN {
31902 _ACEOF
31903
31904 # Transform confdefs.h into an awk script `defines.awk', embedded as
31905 # here-document in config.status, that substitutes the proper values into
31906 # config.h.in to produce config.h.
31907
31908 # Create a delimiter string that does not exist in confdefs.h, to ease
31909 # handling of long lines.
31910 ac_delim='%!_!# '
31911 for ac_last_try in false false :; do
31912   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
31913   if test -z "$ac_tt"; then
31914     break
31915   elif $ac_last_try; then
31916     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
31917   else
31918     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31919   fi
31920 done
31921
31922 # For the awk script, D is an array of macro values keyed by name,
31923 # likewise P contains macro parameters if any.  Preserve backslash
31924 # newline sequences.
31925
31926 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31927 sed -n '
31928 s/.\{148\}/&'"$ac_delim"'/g
31929 t rset
31930 :rset
31931 s/^[     ]*#[    ]*define[       ][      ]*/ /
31932 t def
31933 d
31934 :def
31935 s/\\$//
31936 t bsnl
31937 s/["\\]/\\&/g
31938 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
31939 D["\1"]=" \3"/p
31940 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
31941 d
31942 :bsnl
31943 s/["\\]/\\&/g
31944 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
31945 D["\1"]=" \3\\\\\\n"\\/p
31946 t cont
31947 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
31948 t cont
31949 d
31950 :cont
31951 n
31952 s/.\{148\}/&'"$ac_delim"'/g
31953 t clear
31954 :clear
31955 s/\\$//
31956 t bsnlc
31957 s/["\\]/\\&/g; s/^/"/; s/$/"/p
31958 d
31959 :bsnlc
31960 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
31961 b cont
31962 ' <confdefs.h | sed '
31963 s/'"$ac_delim"'/"\\\
31964 "/g' >>$CONFIG_STATUS || ac_write_fail=1
31965
31966 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31967   for (key in D) D_is_set[key] = 1
31968   FS = "\a"
31969 }
31970 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
31971   line = \$ 0
31972   split(line, arg, " ")
31973   if (arg[1] == "#") {
31974     defundef = arg[2]
31975     mac1 = arg[3]
31976   } else {
31977     defundef = substr(arg[1], 2)
31978     mac1 = arg[2]
31979   }
31980   split(mac1, mac2, "(") #)
31981   macro = mac2[1]
31982   prefix = substr(line, 1, index(line, defundef) - 1)
31983   if (D_is_set[macro]) {
31984     # Preserve the white space surrounding the "#".
31985     print prefix "define", macro P[macro] D[macro]
31986     next
31987   } else {
31988     # Replace #undef with comments.  This is necessary, for example,
31989     # in the case of _POSIX_SOURCE, which is predefined and required
31990     # on some systems where configure will not decide to define it.
31991     if (defundef == "undef") {
31992       print "/*", prefix defundef, macro, "*/"
31993       next
31994     }
31995   }
31996 }
31997 { print }
31998 _ACAWK
31999 _ACEOF
32000 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32001   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32002 fi # test -n "$CONFIG_HEADERS"
32003
32004
32005 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
32006 shift
32007 for ac_tag
32008 do
32009   case $ac_tag in
32010   :[FHLC]) ac_mode=$ac_tag; continue;;
32011   esac
32012   case $ac_mode$ac_tag in
32013   :[FHL]*:*);;
32014   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
32015   :[FH]-) ac_tag=-:-;;
32016   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32017   esac
32018   ac_save_IFS=$IFS
32019   IFS=:
32020   set x $ac_tag
32021   IFS=$ac_save_IFS
32022   shift
32023   ac_file=$1
32024   shift
32025
32026   case $ac_mode in
32027   :L) ac_source=$1;;
32028   :[FH])
32029     ac_file_inputs=
32030     for ac_f
32031     do
32032       case $ac_f in
32033       -) ac_f="$ac_tmp/stdin";;
32034       *) # Look for the file first in the build tree, then in the source tree
32035          # (if the path is not absolute).  The absolute path cannot be DOS-style,
32036          # because $ac_f cannot contain `:'.
32037          test -f "$ac_f" ||
32038            case $ac_f in
32039            [\\/$]*) false;;
32040            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32041            esac ||
32042            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
32043       esac
32044       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32045       as_fn_append ac_file_inputs " '$ac_f'"
32046     done
32047
32048     # Let's still pretend it is `configure' which instantiates (i.e., don't
32049     # use $as_me), people would be surprised to read:
32050     #    /* config.h.  Generated by config.status.  */
32051     configure_input='Generated from '`
32052           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32053         `' by configure.'
32054     if test x"$ac_file" != x-; then
32055       configure_input="$ac_file.  $configure_input"
32056       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32057 $as_echo "$as_me: creating $ac_file" >&6;}
32058     fi
32059     # Neutralize special characters interpreted by sed in replacement strings.
32060     case $configure_input in #(
32061     *\&* | *\|* | *\\* )
32062        ac_sed_conf_input=`$as_echo "$configure_input" |
32063        sed 's/[\\\\&|]/\\\\&/g'`;; #(
32064     *) ac_sed_conf_input=$configure_input;;
32065     esac
32066
32067     case $ac_tag in
32068     *:-:* | *:-) cat >"$ac_tmp/stdin" \
32069       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
32070     esac
32071     ;;
32072   esac
32073
32074   ac_dir=`$as_dirname -- "$ac_file" ||
32075 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32076          X"$ac_file" : 'X\(//\)[^/]' \| \
32077          X"$ac_file" : 'X\(//\)$' \| \
32078          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32079 $as_echo X"$ac_file" |
32080     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32081             s//\1/
32082             q
32083           }
32084           /^X\(\/\/\)[^/].*/{
32085             s//\1/
32086             q
32087           }
32088           /^X\(\/\/\)$/{
32089             s//\1/
32090             q
32091           }
32092           /^X\(\/\).*/{
32093             s//\1/
32094             q
32095           }
32096           s/.*/./; q'`
32097   as_dir="$ac_dir"; as_fn_mkdir_p
32098   ac_builddir=.
32099
32100 case "$ac_dir" in
32101 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32102 *)
32103   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32104   # A ".." for each directory in $ac_dir_suffix.
32105   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32106   case $ac_top_builddir_sub in
32107   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32108   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32109   esac ;;
32110 esac
32111 ac_abs_top_builddir=$ac_pwd
32112 ac_abs_builddir=$ac_pwd$ac_dir_suffix
32113 # for backward compatibility:
32114 ac_top_builddir=$ac_top_build_prefix
32115
32116 case $srcdir in
32117   .)  # We are building in place.
32118     ac_srcdir=.
32119     ac_top_srcdir=$ac_top_builddir_sub
32120     ac_abs_top_srcdir=$ac_pwd ;;
32121   [\\/]* | ?:[\\/]* )  # Absolute name.
32122     ac_srcdir=$srcdir$ac_dir_suffix;
32123     ac_top_srcdir=$srcdir
32124     ac_abs_top_srcdir=$srcdir ;;
32125   *) # Relative name.
32126     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32127     ac_top_srcdir=$ac_top_build_prefix$srcdir
32128     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32129 esac
32130 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32131
32132
32133   case $ac_mode in
32134   :F)
32135   #
32136   # CONFIG_FILE
32137   #
32138
32139   case $INSTALL in
32140   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
32141   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
32142   esac
32143   ac_MKDIR_P=$MKDIR_P
32144   case $MKDIR_P in
32145   [\\/$]* | ?:[\\/]* ) ;;
32146   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
32147   esac
32148 _ACEOF
32149
32150 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32151 # If the template does not know about datarootdir, expand it.
32152 # FIXME: This hack should be removed a few years after 2.60.
32153 ac_datarootdir_hack=; ac_datarootdir_seen=
32154 ac_sed_dataroot='
32155 /datarootdir/ {
32156   p
32157   q
32158 }
32159 /@datadir@/p
32160 /@docdir@/p
32161 /@infodir@/p
32162 /@localedir@/p
32163 /@mandir@/p'
32164 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32165 *datarootdir*) ac_datarootdir_seen=yes;;
32166 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32167   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32168 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32169 _ACEOF
32170 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32171   ac_datarootdir_hack='
32172   s&@datadir@&$datadir&g
32173   s&@docdir@&$docdir&g
32174   s&@infodir@&$infodir&g
32175   s&@localedir@&$localedir&g
32176   s&@mandir@&$mandir&g
32177   s&\\\${datarootdir}&$datarootdir&g' ;;
32178 esac
32179 _ACEOF
32180
32181 # Neutralize VPATH when `$srcdir' = `.'.
32182 # Shell code in configure.ac might set extrasub.
32183 # FIXME: do we really want to maintain this feature?
32184 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32185 ac_sed_extra="$ac_vpsub
32186 $extrasub
32187 _ACEOF
32188 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32189 :t
32190 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32191 s|@configure_input@|$ac_sed_conf_input|;t t
32192 s&@top_builddir@&$ac_top_builddir_sub&;t t
32193 s&@top_build_prefix@&$ac_top_build_prefix&;t t
32194 s&@srcdir@&$ac_srcdir&;t t
32195 s&@abs_srcdir@&$ac_abs_srcdir&;t t
32196 s&@top_srcdir@&$ac_top_srcdir&;t t
32197 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32198 s&@builddir@&$ac_builddir&;t t
32199 s&@abs_builddir@&$ac_abs_builddir&;t t
32200 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32201 s&@INSTALL@&$ac_INSTALL&;t t
32202 s&@MKDIR_P@&$ac_MKDIR_P&;t t
32203 $ac_datarootdir_hack
32204 "
32205 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
32206   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32207
32208 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32209   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
32210   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
32211       "$ac_tmp/out"`; test -z "$ac_out"; } &&
32212   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32213 which seems to be undefined.  Please make sure it is defined" >&5
32214 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32215 which seems to be undefined.  Please make sure it is defined" >&2;}
32216
32217   rm -f "$ac_tmp/stdin"
32218   case $ac_file in
32219   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
32220   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
32221   esac \
32222   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32223  ;;
32224   :H)
32225   #
32226   # CONFIG_HEADER
32227   #
32228   if test x"$ac_file" != x-; then
32229     {
32230       $as_echo "/* $configure_input  */" \
32231       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
32232     } >"$ac_tmp/config.h" \
32233       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32234     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
32235       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32236 $as_echo "$as_me: $ac_file is unchanged" >&6;}
32237     else
32238       rm -f "$ac_file"
32239       mv "$ac_tmp/config.h" "$ac_file" \
32240         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32241     fi
32242   else
32243     $as_echo "/* $configure_input  */" \
32244       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
32245       || as_fn_error $? "could not create -" "$LINENO" 5
32246   fi
32247 # Compute "$ac_file"'s index in $config_headers.
32248 _am_arg="$ac_file"
32249 _am_stamp_count=1
32250 for _am_header in $config_headers :; do
32251   case $_am_header in
32252     $_am_arg | $_am_arg:* )
32253       break ;;
32254     * )
32255       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
32256   esac
32257 done
32258 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
32259 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32260          X"$_am_arg" : 'X\(//\)[^/]' \| \
32261          X"$_am_arg" : 'X\(//\)$' \| \
32262          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
32263 $as_echo X"$_am_arg" |
32264     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32265             s//\1/
32266             q
32267           }
32268           /^X\(\/\/\)[^/].*/{
32269             s//\1/
32270             q
32271           }
32272           /^X\(\/\/\)$/{
32273             s//\1/
32274             q
32275           }
32276           /^X\(\/\).*/{
32277             s//\1/
32278             q
32279           }
32280           s/.*/./; q'`/stamp-h$_am_stamp_count
32281  ;;
32282
32283   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
32284 $as_echo "$as_me: executing $ac_file commands" >&6;}
32285  ;;
32286   esac
32287
32288
32289   case $ac_file$ac_mode in
32290     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
32291   # Older Autoconf quotes --file arguments for eval, but not when files
32292   # are listed without --file.  Let's play safe and only enable the eval
32293   # if we detect the quoting.
32294   case $CONFIG_FILES in
32295   *\'*) eval set x "$CONFIG_FILES" ;;
32296   *)   set x $CONFIG_FILES ;;
32297   esac
32298   shift
32299   for mf
32300   do
32301     # Strip MF so we end up with the name of the file.
32302     mf=`echo "$mf" | sed -e 's/:.*$//'`
32303     # Check whether this is an Automake generated Makefile or not.
32304     # We used to match only the files named 'Makefile.in', but
32305     # some people rename them; so instead we look at the file content.
32306     # Grep'ing the first line is not enough: some people post-process
32307     # each Makefile.in and add a new line on top of each file to say so.
32308     # Grep'ing the whole file is not good either: AIX grep has a line
32309     # limit of 2048, but all sed's we know have understand at least 4000.
32310     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
32311       dirpart=`$as_dirname -- "$mf" ||
32312 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32313          X"$mf" : 'X\(//\)[^/]' \| \
32314          X"$mf" : 'X\(//\)$' \| \
32315          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
32316 $as_echo X"$mf" |
32317     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32318             s//\1/
32319             q
32320           }
32321           /^X\(\/\/\)[^/].*/{
32322             s//\1/
32323             q
32324           }
32325           /^X\(\/\/\)$/{
32326             s//\1/
32327             q
32328           }
32329           /^X\(\/\).*/{
32330             s//\1/
32331             q
32332           }
32333           s/.*/./; q'`
32334     else
32335       continue
32336     fi
32337     # Extract the definition of DEPDIR, am__include, and am__quote
32338     # from the Makefile without running 'make'.
32339     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
32340     test -z "$DEPDIR" && continue
32341     am__include=`sed -n 's/^am__include = //p' < "$mf"`
32342     test -z "$am__include" && continue
32343     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
32344     # Find all dependency output files, they are included files with
32345     # $(DEPDIR) in their names.  We invoke sed twice because it is the
32346     # simplest approach to changing $(DEPDIR) to its actual value in the
32347     # expansion.
32348     for file in `sed -n "
32349       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
32350          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
32351       # Make sure the directory exists.
32352       test -f "$dirpart/$file" && continue
32353       fdir=`$as_dirname -- "$file" ||
32354 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32355          X"$file" : 'X\(//\)[^/]' \| \
32356          X"$file" : 'X\(//\)$' \| \
32357          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
32358 $as_echo X"$file" |
32359     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32360             s//\1/
32361             q
32362           }
32363           /^X\(\/\/\)[^/].*/{
32364             s//\1/
32365             q
32366           }
32367           /^X\(\/\/\)$/{
32368             s//\1/
32369             q
32370           }
32371           /^X\(\/\).*/{
32372             s//\1/
32373             q
32374           }
32375           s/.*/./; q'`
32376       as_dir=$dirpart/$fdir; as_fn_mkdir_p
32377       # echo "creating $dirpart/$file"
32378       echo '# dummy' > "$dirpart/$file"
32379     done
32380   done
32381 }
32382  ;;
32383     "libtool":C)
32384
32385     # See if we are running on zsh, and set the options which allow our
32386     # commands through without removal of \ escapes.
32387     if test -n "${ZSH_VERSION+set}" ; then
32388       setopt NO_GLOB_SUBST
32389     fi
32390
32391     cfgfile="${ofile}T"
32392     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
32393     $RM "$cfgfile"
32394
32395     cat <<_LT_EOF >> "$cfgfile"
32396 #! $SHELL
32397
32398 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
32399 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
32400 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
32401 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
32402 #
32403 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
32404 #                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
32405 #                 Inc.
32406 #   Written by Gordon Matzigkeit, 1996
32407 #
32408 #   This file is part of GNU Libtool.
32409 #
32410 # GNU Libtool is free software; you can redistribute it and/or
32411 # modify it under the terms of the GNU General Public License as
32412 # published by the Free Software Foundation; either version 2 of
32413 # the License, or (at your option) any later version.
32414 #
32415 # As a special exception to the GNU General Public License,
32416 # if you distribute this file as part of a program or library that
32417 # is built using GNU Libtool, you may include this file under the
32418 # same distribution terms that you use for the rest of that program.
32419 #
32420 # GNU Libtool is distributed in the hope that it will be useful,
32421 # but WITHOUT ANY WARRANTY; without even the implied warranty of
32422 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
32423 # GNU General Public License for more details.
32424 #
32425 # You should have received a copy of the GNU General Public License
32426 # along with GNU Libtool; see the file COPYING.  If not, a copy
32427 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
32428 # obtained by writing to the Free Software Foundation, Inc.,
32429 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
32430
32431
32432 # The names of the tagged configurations supported by this script.
32433 available_tags="CXX "
32434
32435 # ### BEGIN LIBTOOL CONFIG
32436
32437 # A sed program that does not truncate output.
32438 SED=$lt_SED
32439
32440 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
32441 Xsed="\$SED -e 1s/^X//"
32442
32443 # A grep program that handles long lines.
32444 GREP=$lt_GREP
32445
32446 # An ERE matcher.
32447 EGREP=$lt_EGREP
32448
32449 # A literal string matcher.
32450 FGREP=$lt_FGREP
32451
32452 # Shell to use when invoking shell scripts.
32453 SHELL=$lt_SHELL
32454
32455 # An echo program that protects backslashes.
32456 ECHO=$lt_ECHO
32457
32458 # Whether or not to build shared libraries.
32459 build_libtool_libs=$enable_shared
32460
32461 # Which release of libtool.m4 was used?
32462 macro_version=$macro_version
32463 macro_revision=$macro_revision
32464
32465 # Whether or not to build static libraries.
32466 build_old_libs=$enable_static
32467
32468 # What type of objects to build.
32469 pic_mode=$pic_mode
32470
32471 # Whether or not to optimize for fast installation.
32472 fast_install=$enable_fast_install
32473
32474 # The host system.
32475 host_alias=$host_alias
32476 host=$host
32477 host_os=$host_os
32478
32479 # The build system.
32480 build_alias=$build_alias
32481 build=$build
32482 build_os=$build_os
32483
32484 # A BSD- or MS-compatible name lister.
32485 NM=$lt_NM
32486
32487 # Whether we need soft or hard links.
32488 LN_S=$lt_LN_S
32489
32490 # What is the maximum length of a command?
32491 max_cmd_len=$max_cmd_len
32492
32493 # Object file suffix (normally "o").
32494 objext=$ac_objext
32495
32496 # Executable file suffix (normally "").
32497 exeext=$exeext
32498
32499 # whether the shell understands "unset".
32500 lt_unset=$lt_unset
32501
32502 # turn spaces into newlines.
32503 SP2NL=$lt_lt_SP2NL
32504
32505 # turn newlines into spaces.
32506 NL2SP=$lt_lt_NL2SP
32507
32508 # convert \$build file names to \$host format.
32509 to_host_file_cmd=$lt_cv_to_host_file_cmd
32510
32511 # convert \$build files to toolchain format.
32512 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
32513
32514 # An object symbol dumper.
32515 OBJDUMP=$lt_OBJDUMP
32516
32517 # Method to check whether dependent libraries are shared objects.
32518 deplibs_check_method=$lt_deplibs_check_method
32519
32520 # Command to use when deplibs_check_method = "file_magic".
32521 file_magic_cmd=$lt_file_magic_cmd
32522
32523 # How to find potential files when deplibs_check_method = "file_magic".
32524 file_magic_glob=$lt_file_magic_glob
32525
32526 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
32527 want_nocaseglob=$lt_want_nocaseglob
32528
32529 # DLL creation program.
32530 DLLTOOL=$lt_DLLTOOL
32531
32532 # Command to associate shared and link libraries.
32533 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
32534
32535 # The archiver.
32536 AR=$lt_AR
32537
32538 # Flags to create an archive.
32539 AR_FLAGS=$lt_AR_FLAGS
32540
32541 # How to feed a file listing to the archiver.
32542 archiver_list_spec=$lt_archiver_list_spec
32543
32544 # A symbol stripping program.
32545 STRIP=$lt_STRIP
32546
32547 # Commands used to install an old-style archive.
32548 RANLIB=$lt_RANLIB
32549 old_postinstall_cmds=$lt_old_postinstall_cmds
32550 old_postuninstall_cmds=$lt_old_postuninstall_cmds
32551
32552 # Whether to use a lock for old archive extraction.
32553 lock_old_archive_extraction=$lock_old_archive_extraction
32554
32555 # A C compiler.
32556 LTCC=$lt_CC
32557
32558 # LTCC compiler flags.
32559 LTCFLAGS=$lt_CFLAGS
32560
32561 # Take the output of nm and produce a listing of raw symbols and C names.
32562 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
32563
32564 # Transform the output of nm in a proper C declaration.
32565 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
32566
32567 # Transform the output of nm in a C name address pair.
32568 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
32569
32570 # Transform the output of nm in a C name address pair when lib prefix is needed.
32571 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
32572
32573 # Specify filename containing input files for \$NM.
32574 nm_file_list_spec=$lt_nm_file_list_spec
32575
32576 # The root where to search for dependent libraries,and in which our libraries should be installed.
32577 lt_sysroot=$lt_sysroot
32578
32579 # The name of the directory that contains temporary libtool files.
32580 objdir=$objdir
32581
32582 # Used to examine libraries when file_magic_cmd begins with "file".
32583 MAGIC_CMD=$MAGIC_CMD
32584
32585 # Must we lock files when doing compilation?
32586 need_locks=$lt_need_locks
32587
32588 # Manifest tool.
32589 MANIFEST_TOOL=$lt_MANIFEST_TOOL
32590
32591 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
32592 DSYMUTIL=$lt_DSYMUTIL
32593
32594 # Tool to change global to local symbols on Mac OS X.
32595 NMEDIT=$lt_NMEDIT
32596
32597 # Tool to manipulate fat objects and archives on Mac OS X.
32598 LIPO=$lt_LIPO
32599
32600 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
32601 OTOOL=$lt_OTOOL
32602
32603 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
32604 OTOOL64=$lt_OTOOL64
32605
32606 # Old archive suffix (normally "a").
32607 libext=$libext
32608
32609 # Shared library suffix (normally ".so").
32610 shrext_cmds=$lt_shrext_cmds
32611
32612 # The commands to extract the exported symbol list from a shared archive.
32613 extract_expsyms_cmds=$lt_extract_expsyms_cmds
32614
32615 # Variables whose values should be saved in libtool wrapper scripts and
32616 # restored at link time.
32617 variables_saved_for_relink=$lt_variables_saved_for_relink
32618
32619 # Do we need the "lib" prefix for modules?
32620 need_lib_prefix=$need_lib_prefix
32621
32622 # Do we need a version for libraries?
32623 need_version=$need_version
32624
32625 # Library versioning type.
32626 version_type=$version_type
32627
32628 # Shared library runtime path variable.
32629 runpath_var=$runpath_var
32630
32631 # Shared library path variable.
32632 shlibpath_var=$shlibpath_var
32633
32634 # Is shlibpath searched before the hard-coded library search path?
32635 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
32636
32637 # Format of library name prefix.
32638 libname_spec=$lt_libname_spec
32639
32640 # List of archive names.  First name is the real one, the rest are links.
32641 # The last name is the one that the linker finds with -lNAME
32642 library_names_spec=$lt_library_names_spec
32643
32644 # The coded name of the library, if different from the real name.
32645 soname_spec=$lt_soname_spec
32646
32647 # Permission mode override for installation of shared libraries.
32648 install_override_mode=$lt_install_override_mode
32649
32650 # Command to use after installation of a shared archive.
32651 postinstall_cmds=$lt_postinstall_cmds
32652
32653 # Command to use after uninstallation of a shared archive.
32654 postuninstall_cmds=$lt_postuninstall_cmds
32655
32656 # Commands used to finish a libtool library installation in a directory.
32657 finish_cmds=$lt_finish_cmds
32658
32659 # As "finish_cmds", except a single script fragment to be evaled but
32660 # not shown.
32661 finish_eval=$lt_finish_eval
32662
32663 # Whether we should hardcode library paths into libraries.
32664 hardcode_into_libs=$hardcode_into_libs
32665
32666 # Compile-time system search path for libraries.
32667 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
32668
32669 # Run-time system search path for libraries.
32670 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
32671
32672 # Whether dlopen is supported.
32673 dlopen_support=$enable_dlopen
32674
32675 # Whether dlopen of programs is supported.
32676 dlopen_self=$enable_dlopen_self
32677
32678 # Whether dlopen of statically linked programs is supported.
32679 dlopen_self_static=$enable_dlopen_self_static
32680
32681 # Commands to strip libraries.
32682 old_striplib=$lt_old_striplib
32683 striplib=$lt_striplib
32684
32685
32686 # The linker used to build libraries.
32687 LD=$lt_LD
32688
32689 # How to create reloadable object files.
32690 reload_flag=$lt_reload_flag
32691 reload_cmds=$lt_reload_cmds
32692
32693 # Commands used to build an old-style archive.
32694 old_archive_cmds=$lt_old_archive_cmds
32695
32696 # A language specific compiler.
32697 CC=$lt_compiler
32698
32699 # Is the compiler the GNU compiler?
32700 with_gcc=$GCC
32701
32702 # Compiler flag to turn off builtin functions.
32703 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
32704
32705 # Additional compiler flags for building library objects.
32706 pic_flag=$lt_lt_prog_compiler_pic
32707
32708 # How to pass a linker flag through the compiler.
32709 wl=$lt_lt_prog_compiler_wl
32710
32711 # Compiler flag to prevent dynamic linking.
32712 link_static_flag=$lt_lt_prog_compiler_static
32713
32714 # Does compiler simultaneously support -c and -o options?
32715 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
32716
32717 # Whether or not to add -lc for building shared libraries.
32718 build_libtool_need_lc=$archive_cmds_need_lc
32719
32720 # Whether or not to disallow shared libs when runtime libs are static.
32721 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
32722
32723 # Compiler flag to allow reflexive dlopens.
32724 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
32725
32726 # Compiler flag to generate shared objects directly from archives.
32727 whole_archive_flag_spec=$lt_whole_archive_flag_spec
32728
32729 # Whether the compiler copes with passing no objects directly.
32730 compiler_needs_object=$lt_compiler_needs_object
32731
32732 # Create an old-style archive from a shared archive.
32733 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
32734
32735 # Create a temporary old-style archive to link instead of a shared archive.
32736 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
32737
32738 # Commands used to build a shared archive.
32739 archive_cmds=$lt_archive_cmds
32740 archive_expsym_cmds=$lt_archive_expsym_cmds
32741
32742 # Commands used to build a loadable module if different from building
32743 # a shared archive.
32744 module_cmds=$lt_module_cmds
32745 module_expsym_cmds=$lt_module_expsym_cmds
32746
32747 # Whether we are building with GNU ld or not.
32748 with_gnu_ld=$lt_with_gnu_ld
32749
32750 # Flag that allows shared libraries with undefined symbols to be built.
32751 allow_undefined_flag=$lt_allow_undefined_flag
32752
32753 # Flag that enforces no undefined symbols.
32754 no_undefined_flag=$lt_no_undefined_flag
32755
32756 # Flag to hardcode \$libdir into a binary during linking.
32757 # This must work even if \$libdir does not exist
32758 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
32759
32760 # If ld is used when linking, flag to hardcode \$libdir into a binary
32761 # during linking.  This must work even if \$libdir does not exist.
32762 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
32763
32764 # Whether we need a single "-rpath" flag with a separated argument.
32765 hardcode_libdir_separator=$lt_hardcode_libdir_separator
32766
32767 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
32768 # DIR into the resulting binary.
32769 hardcode_direct=$hardcode_direct
32770
32771 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
32772 # DIR into the resulting binary and the resulting library dependency is
32773 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
32774 # library is relocated.
32775 hardcode_direct_absolute=$hardcode_direct_absolute
32776
32777 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
32778 # into the resulting binary.
32779 hardcode_minus_L=$hardcode_minus_L
32780
32781 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
32782 # into the resulting binary.
32783 hardcode_shlibpath_var=$hardcode_shlibpath_var
32784
32785 # Set to "yes" if building a shared library automatically hardcodes DIR
32786 # into the library and all subsequent libraries and executables linked
32787 # against it.
32788 hardcode_automatic=$hardcode_automatic
32789
32790 # Set to yes if linker adds runtime paths of dependent libraries
32791 # to runtime path list.
32792 inherit_rpath=$inherit_rpath
32793
32794 # Whether libtool must link a program against all its dependency libraries.
32795 link_all_deplibs=$link_all_deplibs
32796
32797 # Set to "yes" if exported symbols are required.
32798 always_export_symbols=$always_export_symbols
32799
32800 # The commands to list exported symbols.
32801 export_symbols_cmds=$lt_export_symbols_cmds
32802
32803 # Symbols that should not be listed in the preloaded symbols.
32804 exclude_expsyms=$lt_exclude_expsyms
32805
32806 # Symbols that must always be exported.
32807 include_expsyms=$lt_include_expsyms
32808
32809 # Commands necessary for linking programs (against libraries) with templates.
32810 prelink_cmds=$lt_prelink_cmds
32811
32812 # Commands necessary for finishing linking programs.
32813 postlink_cmds=$lt_postlink_cmds
32814
32815 # Specify filename containing input files.
32816 file_list_spec=$lt_file_list_spec
32817
32818 # How to hardcode a shared library path into an executable.
32819 hardcode_action=$hardcode_action
32820
32821 # The directories searched by this compiler when creating a shared library.
32822 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
32823
32824 # Dependencies to place before and after the objects being linked to
32825 # create a shared library.
32826 predep_objects=$lt_predep_objects
32827 postdep_objects=$lt_postdep_objects
32828 predeps=$lt_predeps
32829 postdeps=$lt_postdeps
32830
32831 # The library search path used internally by the compiler when linking
32832 # a shared library.
32833 compiler_lib_search_path=$lt_compiler_lib_search_path
32834
32835 # ### END LIBTOOL CONFIG
32836
32837 _LT_EOF
32838
32839   case $host_os in
32840   aix3*)
32841     cat <<\_LT_EOF >> "$cfgfile"
32842 # AIX sometimes has problems with the GCC collect2 program.  For some
32843 # reason, if we set the COLLECT_NAMES environment variable, the problems
32844 # vanish in a puff of smoke.
32845 if test "X${COLLECT_NAMES+set}" != Xset; then
32846   COLLECT_NAMES=
32847   export COLLECT_NAMES
32848 fi
32849 _LT_EOF
32850     ;;
32851   esac
32852
32853
32854 ltmain="$ac_aux_dir/ltmain.sh"
32855
32856
32857   # We use sed instead of cat because bash on DJGPP gets confused if
32858   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
32859   # text mode, it properly converts lines to CR/LF.  This bash problem
32860   # is reportedly fixed, but why not run on old versions too?
32861   sed '$q' "$ltmain" >> "$cfgfile" \
32862      || (rm -f "$cfgfile"; exit 1)
32863
32864   if test x"$xsi_shell" = xyes; then
32865   sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
32866 func_dirname ()\
32867 {\
32868 \    case ${1} in\
32869 \      */*) func_dirname_result="${1%/*}${2}" ;;\
32870 \      *  ) func_dirname_result="${3}" ;;\
32871 \    esac\
32872 } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
32873   && mv -f "$cfgfile.tmp" "$cfgfile" \
32874     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32875 test 0 -eq $? || _lt_function_replace_fail=:
32876
32877
32878   sed -e '/^func_basename ()$/,/^} # func_basename /c\
32879 func_basename ()\
32880 {\
32881 \    func_basename_result="${1##*/}"\
32882 } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
32883   && mv -f "$cfgfile.tmp" "$cfgfile" \
32884     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32885 test 0 -eq $? || _lt_function_replace_fail=:
32886
32887
32888   sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
32889 func_dirname_and_basename ()\
32890 {\
32891 \    case ${1} in\
32892 \      */*) func_dirname_result="${1%/*}${2}" ;;\
32893 \      *  ) func_dirname_result="${3}" ;;\
32894 \    esac\
32895 \    func_basename_result="${1##*/}"\
32896 } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
32897   && mv -f "$cfgfile.tmp" "$cfgfile" \
32898     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32899 test 0 -eq $? || _lt_function_replace_fail=:
32900
32901
32902   sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
32903 func_stripname ()\
32904 {\
32905 \    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
32906 \    # positional parameters, so assign one to ordinary parameter first.\
32907 \    func_stripname_result=${3}\
32908 \    func_stripname_result=${func_stripname_result#"${1}"}\
32909 \    func_stripname_result=${func_stripname_result%"${2}"}\
32910 } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
32911   && mv -f "$cfgfile.tmp" "$cfgfile" \
32912     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32913 test 0 -eq $? || _lt_function_replace_fail=:
32914
32915
32916   sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
32917 func_split_long_opt ()\
32918 {\
32919 \    func_split_long_opt_name=${1%%=*}\
32920 \    func_split_long_opt_arg=${1#*=}\
32921 } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
32922   && mv -f "$cfgfile.tmp" "$cfgfile" \
32923     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32924 test 0 -eq $? || _lt_function_replace_fail=:
32925
32926
32927   sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
32928 func_split_short_opt ()\
32929 {\
32930 \    func_split_short_opt_arg=${1#??}\
32931 \    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
32932 } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
32933   && mv -f "$cfgfile.tmp" "$cfgfile" \
32934     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32935 test 0 -eq $? || _lt_function_replace_fail=:
32936
32937
32938   sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
32939 func_lo2o ()\
32940 {\
32941 \    case ${1} in\
32942 \      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
32943 \      *)    func_lo2o_result=${1} ;;\
32944 \    esac\
32945 } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
32946   && mv -f "$cfgfile.tmp" "$cfgfile" \
32947     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32948 test 0 -eq $? || _lt_function_replace_fail=:
32949
32950
32951   sed -e '/^func_xform ()$/,/^} # func_xform /c\
32952 func_xform ()\
32953 {\
32954     func_xform_result=${1%.*}.lo\
32955 } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
32956   && mv -f "$cfgfile.tmp" "$cfgfile" \
32957     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32958 test 0 -eq $? || _lt_function_replace_fail=:
32959
32960
32961   sed -e '/^func_arith ()$/,/^} # func_arith /c\
32962 func_arith ()\
32963 {\
32964     func_arith_result=$(( $* ))\
32965 } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
32966   && mv -f "$cfgfile.tmp" "$cfgfile" \
32967     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32968 test 0 -eq $? || _lt_function_replace_fail=:
32969
32970
32971   sed -e '/^func_len ()$/,/^} # func_len /c\
32972 func_len ()\
32973 {\
32974     func_len_result=${#1}\
32975 } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
32976   && mv -f "$cfgfile.tmp" "$cfgfile" \
32977     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32978 test 0 -eq $? || _lt_function_replace_fail=:
32979
32980 fi
32981
32982 if test x"$lt_shell_append" = xyes; then
32983   sed -e '/^func_append ()$/,/^} # func_append /c\
32984 func_append ()\
32985 {\
32986     eval "${1}+=\\${2}"\
32987 } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
32988   && mv -f "$cfgfile.tmp" "$cfgfile" \
32989     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
32990 test 0 -eq $? || _lt_function_replace_fail=:
32991
32992
32993   sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
32994 func_append_quoted ()\
32995 {\
32996 \    func_quote_for_eval "${2}"\
32997 \    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
32998 } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
32999   && mv -f "$cfgfile.tmp" "$cfgfile" \
33000     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33001 test 0 -eq $? || _lt_function_replace_fail=:
33002
33003
33004   # Save a `func_append' function call where possible by direct use of '+='
33005   sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
33006     && mv -f "$cfgfile.tmp" "$cfgfile" \
33007       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33008   test 0 -eq $? || _lt_function_replace_fail=:
33009 else
33010   # Save a `func_append' function call even when '+=' is not available
33011   sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
33012     && mv -f "$cfgfile.tmp" "$cfgfile" \
33013       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
33014   test 0 -eq $? || _lt_function_replace_fail=:
33015 fi
33016
33017 if test x"$_lt_function_replace_fail" = x":"; then
33018   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
33019 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
33020 fi
33021
33022
33023    mv -f "$cfgfile" "$ofile" ||
33024     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
33025   chmod +x "$ofile"
33026
33027
33028     cat <<_LT_EOF >> "$ofile"
33029
33030 # ### BEGIN LIBTOOL TAG CONFIG: CXX
33031
33032 # The linker used to build libraries.
33033 LD=$lt_LD_CXX
33034
33035 # How to create reloadable object files.
33036 reload_flag=$lt_reload_flag_CXX
33037 reload_cmds=$lt_reload_cmds_CXX
33038
33039 # Commands used to build an old-style archive.
33040 old_archive_cmds=$lt_old_archive_cmds_CXX
33041
33042 # A language specific compiler.
33043 CC=$lt_compiler_CXX
33044
33045 # Is the compiler the GNU compiler?
33046 with_gcc=$GCC_CXX
33047
33048 # Compiler flag to turn off builtin functions.
33049 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
33050
33051 # Additional compiler flags for building library objects.
33052 pic_flag=$lt_lt_prog_compiler_pic_CXX
33053
33054 # How to pass a linker flag through the compiler.
33055 wl=$lt_lt_prog_compiler_wl_CXX
33056
33057 # Compiler flag to prevent dynamic linking.
33058 link_static_flag=$lt_lt_prog_compiler_static_CXX
33059
33060 # Does compiler simultaneously support -c and -o options?
33061 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
33062
33063 # Whether or not to add -lc for building shared libraries.
33064 build_libtool_need_lc=$archive_cmds_need_lc_CXX
33065
33066 # Whether or not to disallow shared libs when runtime libs are static.
33067 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
33068
33069 # Compiler flag to allow reflexive dlopens.
33070 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
33071
33072 # Compiler flag to generate shared objects directly from archives.
33073 whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
33074
33075 # Whether the compiler copes with passing no objects directly.
33076 compiler_needs_object=$lt_compiler_needs_object_CXX
33077
33078 # Create an old-style archive from a shared archive.
33079 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
33080
33081 # Create a temporary old-style archive to link instead of a shared archive.
33082 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
33083
33084 # Commands used to build a shared archive.
33085 archive_cmds=$lt_archive_cmds_CXX
33086 archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
33087
33088 # Commands used to build a loadable module if different from building
33089 # a shared archive.
33090 module_cmds=$lt_module_cmds_CXX
33091 module_expsym_cmds=$lt_module_expsym_cmds_CXX
33092
33093 # Whether we are building with GNU ld or not.
33094 with_gnu_ld=$lt_with_gnu_ld_CXX
33095
33096 # Flag that allows shared libraries with undefined symbols to be built.
33097 allow_undefined_flag=$lt_allow_undefined_flag_CXX
33098
33099 # Flag that enforces no undefined symbols.
33100 no_undefined_flag=$lt_no_undefined_flag_CXX
33101
33102 # Flag to hardcode \$libdir into a binary during linking.
33103 # This must work even if \$libdir does not exist
33104 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
33105
33106 # If ld is used when linking, flag to hardcode \$libdir into a binary
33107 # during linking.  This must work even if \$libdir does not exist.
33108 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
33109
33110 # Whether we need a single "-rpath" flag with a separated argument.
33111 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
33112
33113 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
33114 # DIR into the resulting binary.
33115 hardcode_direct=$hardcode_direct_CXX
33116
33117 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
33118 # DIR into the resulting binary and the resulting library dependency is
33119 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
33120 # library is relocated.
33121 hardcode_direct_absolute=$hardcode_direct_absolute_CXX
33122
33123 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
33124 # into the resulting binary.
33125 hardcode_minus_L=$hardcode_minus_L_CXX
33126
33127 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
33128 # into the resulting binary.
33129 hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
33130
33131 # Set to "yes" if building a shared library automatically hardcodes DIR
33132 # into the library and all subsequent libraries and executables linked
33133 # against it.
33134 hardcode_automatic=$hardcode_automatic_CXX
33135
33136 # Set to yes if linker adds runtime paths of dependent libraries
33137 # to runtime path list.
33138 inherit_rpath=$inherit_rpath_CXX
33139
33140 # Whether libtool must link a program against all its dependency libraries.
33141 link_all_deplibs=$link_all_deplibs_CXX
33142
33143 # Set to "yes" if exported symbols are required.
33144 always_export_symbols=$always_export_symbols_CXX
33145
33146 # The commands to list exported symbols.
33147 export_symbols_cmds=$lt_export_symbols_cmds_CXX
33148
33149 # Symbols that should not be listed in the preloaded symbols.
33150 exclude_expsyms=$lt_exclude_expsyms_CXX
33151
33152 # Symbols that must always be exported.
33153 include_expsyms=$lt_include_expsyms_CXX
33154
33155 # Commands necessary for linking programs (against libraries) with templates.
33156 prelink_cmds=$lt_prelink_cmds_CXX
33157
33158 # Commands necessary for finishing linking programs.
33159 postlink_cmds=$lt_postlink_cmds_CXX
33160
33161 # Specify filename containing input files.
33162 file_list_spec=$lt_file_list_spec_CXX
33163
33164 # How to hardcode a shared library path into an executable.
33165 hardcode_action=$hardcode_action_CXX
33166
33167 # The directories searched by this compiler when creating a shared library.
33168 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
33169
33170 # Dependencies to place before and after the objects being linked to
33171 # create a shared library.
33172 predep_objects=$lt_predep_objects_CXX
33173 postdep_objects=$lt_postdep_objects_CXX
33174 predeps=$lt_predeps_CXX
33175 postdeps=$lt_postdeps_CXX
33176
33177 # The library search path used internally by the compiler when linking
33178 # a shared library.
33179 compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
33180
33181 # ### END LIBTOOL TAG CONFIG: CXX
33182 _LT_EOF
33183
33184  ;;
33185
33186   esac
33187 done # for ac_tag
33188
33189
33190 as_fn_exit 0
33191 _ACEOF
33192 ac_clean_files=$ac_clean_files_save
33193
33194 test $ac_write_fail = 0 ||
33195   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33196
33197
33198 # configure is writing to config.log, and then calls config.status.
33199 # config.status does its own redirection, appending to config.log.
33200 # Unfortunately, on DOS this fails, as config.log is still kept open
33201 # by configure, so config.status won't be able to write to it; its
33202 # output is simply discarded.  So we exec the FD to /dev/null,
33203 # effectively closing config.log, so it can be properly (re)opened and
33204 # appended to by config.status.  When coming back to configure, we
33205 # need to make the FD available again.
33206 if test "$no_create" != yes; then
33207   ac_cs_success=:
33208   ac_config_status_args=
33209   test "$silent" = yes &&
33210     ac_config_status_args="$ac_config_status_args --quiet"
33211   exec 5>/dev/null
33212   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33213   exec 5>>config.log
33214   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33215   # would make configure fail if this is the last instruction.
33216   $ac_cs_success || as_fn_exit 1
33217 fi
33218
33219 #
33220 # CONFIG_SUBDIRS section.
33221 #
33222 if test "$no_recursion" != yes; then
33223
33224   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
33225   # so they do not pile up.
33226   ac_sub_configure_args=
33227   ac_prev=
33228   eval "set x $ac_configure_args"
33229   shift
33230   for ac_arg
33231   do
33232     if test -n "$ac_prev"; then
33233       ac_prev=
33234       continue
33235     fi
33236     case $ac_arg in
33237     -cache-file | --cache-file | --cache-fil | --cache-fi \
33238     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
33239       ac_prev=cache_file ;;
33240     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
33241     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
33242     | --c=*)
33243       ;;
33244     --config-cache | -C)
33245       ;;
33246     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
33247       ac_prev=srcdir ;;
33248     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
33249       ;;
33250     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
33251       ac_prev=prefix ;;
33252     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
33253       ;;
33254     --disable-option-checking)
33255       ;;
33256     *)
33257       case $ac_arg in
33258       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
33259       esac
33260       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
33261     esac
33262   done
33263
33264   # Always prepend --prefix to ensure using the same prefix
33265   # in subdir configurations.
33266   ac_arg="--prefix=$prefix"
33267   case $ac_arg in
33268   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
33269   esac
33270   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
33271
33272   # Pass --silent
33273   if test "$silent" = yes; then
33274     ac_sub_configure_args="--silent $ac_sub_configure_args"
33275   fi
33276
33277   # Always prepend --disable-option-checking to silence warnings, since
33278   # different subdirs can have different --enable and --with options.
33279   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
33280
33281   ac_popdir=`pwd`
33282   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
33283
33284     # Do not complain, so a configure script can configure whichever
33285     # parts of a large source tree are present.
33286     test -d "$srcdir/$ac_dir" || continue
33287
33288     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
33289     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
33290     $as_echo "$ac_msg" >&6
33291     as_dir="$ac_dir"; as_fn_mkdir_p
33292     ac_builddir=.
33293
33294 case "$ac_dir" in
33295 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33296 *)
33297   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33298   # A ".." for each directory in $ac_dir_suffix.
33299   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33300   case $ac_top_builddir_sub in
33301   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33302   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33303   esac ;;
33304 esac
33305 ac_abs_top_builddir=$ac_pwd
33306 ac_abs_builddir=$ac_pwd$ac_dir_suffix
33307 # for backward compatibility:
33308 ac_top_builddir=$ac_top_build_prefix
33309
33310 case $srcdir in
33311   .)  # We are building in place.
33312     ac_srcdir=.
33313     ac_top_srcdir=$ac_top_builddir_sub
33314     ac_abs_top_srcdir=$ac_pwd ;;
33315   [\\/]* | ?:[\\/]* )  # Absolute name.
33316     ac_srcdir=$srcdir$ac_dir_suffix;
33317     ac_top_srcdir=$srcdir
33318     ac_abs_top_srcdir=$srcdir ;;
33319   *) # Relative name.
33320     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
33321     ac_top_srcdir=$ac_top_build_prefix$srcdir
33322     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
33323 esac
33324 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
33325
33326
33327     cd "$ac_dir"
33328
33329     # Check for guested configure; otherwise get Cygnus style configure.
33330     if test -f "$ac_srcdir/configure.gnu"; then
33331       ac_sub_configure=$ac_srcdir/configure.gnu
33332     elif test -f "$ac_srcdir/configure"; then
33333       ac_sub_configure=$ac_srcdir/configure
33334     elif test -f "$ac_srcdir/configure.in"; then
33335       # This should be Cygnus configure.
33336       ac_sub_configure=$ac_aux_dir/configure
33337     else
33338       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
33339 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
33340       ac_sub_configure=
33341     fi
33342
33343     # The recursion is here.
33344     if test -n "$ac_sub_configure"; then
33345       # Make the cache file name correct relative to the subdirectory.
33346       case $cache_file in
33347       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
33348       *) # Relative name.
33349         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
33350       esac
33351
33352       { $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
33353 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
33354       # The eval makes quoting arguments work.
33355       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
33356            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
33357         as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
33358     fi
33359
33360     cd "$ac_popdir"
33361   done
33362 fi
33363 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33364   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33365 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33366 fi
33367