]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/unbound/configure
Upgrade Unbound to 1.6.1. More to follow.
[FreeBSD/FreeBSD.git] / contrib / unbound / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for unbound 1.6.1.
4 #
5 # Report bugs to <unbound-bugs@nlnetlabs.nl>.
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: unbound-bugs@nlnetlabs.nl about your system, including
279 $0: any error possibly output before this message. Then
280 $0: install a modern shell, or manually run the script
281 $0: under such a 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='unbound'
592 PACKAGE_TARNAME='unbound'
593 PACKAGE_VERSION='1.6.1'
594 PACKAGE_STRING='unbound 1.6.1'
595 PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl'
596 PACKAGE_URL=''
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_subst_vars='LTLIBOBJS
635 date
636 version
637 INSTALLTARGET
638 ALLTARGET
639 SOURCEFILE
640 SOURCEDETERMINE
641 DNSTAP_OBJ
642 DNSTAP_SRC
643 opt_dnstap_socket_path
644 ENABLE_DNSTAP
645 PROTOC_C
646 UBSYMS
647 EXTRALINK
648 COMMON_OBJ_ALL_SYMBOLS
649 LIBOBJ_WITHOUT_CTIME
650 LIBOBJ_WITHOUT_CTIMEARC4
651 WIN_CHECKCONF_OBJ_LINK
652 WIN_CONTROL_OBJ_LINK
653 WIN_UBANCHOR_OBJ_LINK
654 WIN_HOST_OBJ_LINK
655 WIN_DAEMON_OBJ_LINK
656 WIN_DAEMON_OBJ
657 WIN_DAEMON_SRC
658 WINAPPS
659 WINDRES
660 CHECKLOCK_OBJ
661 USE_SYSTEMD_FALSE
662 USE_SYSTEMD_TRUE
663 SYSTEMD_DAEMON_LIBS
664 SYSTEMD_DAEMON_CFLAGS
665 SYSTEMD_LIBS
666 SYSTEMD_CFLAGS
667 PKG_CONFIG_LIBDIR
668 PKG_CONFIG_PATH
669 PKG_CONFIG
670 staticexe
671 PC_LIBEVENT_DEPENDENCY
672 UNBOUND_EVENT_UNINSTALL
673 UNBOUND_EVENT_INSTALL
674 SSLLIB
675 HAVE_SSL
676 CONFIG_DATE
677 NETBSD_LINTFLAGS
678 PYUNBOUND_UNINSTALL
679 PYUNBOUND_INSTALL
680 PYUNBOUND_TARGET
681 PYUNBOUND_OBJ
682 WITH_PYUNBOUND
683 PYTHONMOD_UNINSTALL
684 PYTHONMOD_INSTALL
685 PYTHONMOD_HEADER
686 PYTHONMOD_OBJ
687 WITH_PYTHONMODULE
688 swig
689 SWIG_LIB
690 SWIG
691 PC_PY_DEPENDENCY
692 PY_MAJOR_VERSION
693 PYTHON_SITE_PKG
694 PYTHON_LDFLAGS
695 PYTHON_CPPFLAGS
696 PYTHON
697 PYTHON_VERSION
698 PTHREAD_CFLAGS_ONLY
699 PTHREAD_CFLAGS
700 PTHREAD_LIBS
701 PTHREAD_CC
702 ax_pthread_config
703 RUNTIME_PATH
704 LIBOBJS
705 LT_SYS_LIBRARY_PATH
706 OTOOL64
707 OTOOL
708 LIPO
709 NMEDIT
710 DSYMUTIL
711 MANIFEST_TOOL
712 AWK
713 RANLIB
714 ac_ct_AR
715 DLLTOOL
716 OBJDUMP
717 LN_S
718 NM
719 ac_ct_DUMPBIN
720 DUMPBIN
721 LD
722 FGREP
723 SED
724 LIBTOOL
725 AR
726 host_os
727 host_vendor
728 host_cpu
729 host
730 build_os
731 build_vendor
732 build_cpu
733 build
734 libtool
735 STRIP
736 doxygen
737 YFLAGS
738 YACC
739 LEXLIB
740 LEX_OUTPUT_ROOT
741 LEX
742 debug_enabled
743 DEPFLAG
744 UNBOUND_USERNAME
745 UNBOUND_ROOTCERT_FILE
746 UNBOUND_ROOTKEY_FILE
747 UNBOUND_PIDFILE
748 UNBOUND_SHARE_DIR
749 UNBOUND_CHROOT_DIR
750 UNBOUND_RUN_DIR
751 ub_conf_dir
752 ub_conf_file
753 EGREP
754 GREP
755 CPP
756 OBJEXT
757 EXEEXT
758 ac_ct_CC
759 CPPFLAGS
760 LDFLAGS
761 CFLAGS
762 CC
763 LIBUNBOUND_AGE
764 LIBUNBOUND_REVISION
765 LIBUNBOUND_CURRENT
766 UNBOUND_VERSION_MICRO
767 UNBOUND_VERSION_MINOR
768 UNBOUND_VERSION_MAJOR
769 target_alias
770 host_alias
771 build_alias
772 LIBS
773 ECHO_T
774 ECHO_N
775 ECHO_C
776 DEFS
777 mandir
778 localedir
779 libdir
780 psdir
781 pdfdir
782 dvidir
783 htmldir
784 infodir
785 docdir
786 oldincludedir
787 includedir
788 localstatedir
789 sharedstatedir
790 sysconfdir
791 datadir
792 datarootdir
793 libexecdir
794 sbindir
795 bindir
796 program_transform_name
797 prefix
798 exec_prefix
799 PACKAGE_URL
800 PACKAGE_BUGREPORT
801 PACKAGE_STRING
802 PACKAGE_VERSION
803 PACKAGE_TARNAME
804 PACKAGE_NAME
805 PATH_SEPARATOR
806 SHELL'
807 ac_subst_files=''
808 ac_user_opts='
809 enable_option_checking
810 with_conf_file
811 with_run_dir
812 with_chroot_dir
813 with_share_dir
814 with_pidfile
815 with_rootkey_file
816 with_rootcert_file
817 with_username
818 enable_checking
819 enable_debug
820 enable_flto
821 enable_pie
822 enable_relro_now
823 enable_shared
824 enable_static
825 with_pic
826 enable_fast_install
827 with_aix_soname
828 with_gnu_ld
829 with_sysroot
830 enable_libtool_lock
831 enable_rpath
832 enable_largefile
833 enable_alloc_checks
834 enable_alloc_lite
835 enable_alloc_nonregional
836 with_pthreads
837 with_solaris_threads
838 with_pyunbound
839 with_pythonmodule
840 with_nss
841 with_nettle
842 with_ssl
843 enable_sha2
844 enable_gost
845 enable_ecdsa
846 enable_dsa
847 enable_event_api
848 enable_tfo_client
849 enable_tfo_server
850 with_libevent
851 with_libexpat
852 enable_static_exe
853 enable_systemd
854 enable_lock_checks
855 enable_allsymbols
856 enable_dnstap
857 with_dnstap_socket_path
858 with_protobuf_c
859 with_libfstrm
860 enable_cachedb
861 with_libunbound_only
862 '
863       ac_precious_vars='build_alias
864 host_alias
865 target_alias
866 CC
867 CFLAGS
868 LDFLAGS
869 LIBS
870 CPPFLAGS
871 CPP
872 YACC
873 YFLAGS
874 LT_SYS_LIBRARY_PATH
875 PYTHON_VERSION
876 PKG_CONFIG
877 PKG_CONFIG_PATH
878 PKG_CONFIG_LIBDIR
879 SYSTEMD_CFLAGS
880 SYSTEMD_LIBS
881 SYSTEMD_DAEMON_CFLAGS
882 SYSTEMD_DAEMON_LIBS'
883
884
885 # Initialize some variables set by options.
886 ac_init_help=
887 ac_init_version=false
888 ac_unrecognized_opts=
889 ac_unrecognized_sep=
890 # The variables have the same names as the options, with
891 # dashes changed to underlines.
892 cache_file=/dev/null
893 exec_prefix=NONE
894 no_create=
895 no_recursion=
896 prefix=NONE
897 program_prefix=NONE
898 program_suffix=NONE
899 program_transform_name=s,x,x,
900 silent=
901 site=
902 srcdir=
903 verbose=
904 x_includes=NONE
905 x_libraries=NONE
906
907 # Installation directory options.
908 # These are left unexpanded so users can "make install exec_prefix=/foo"
909 # and all the variables that are supposed to be based on exec_prefix
910 # by default will actually change.
911 # Use braces instead of parens because sh, perl, etc. also accept them.
912 # (The list follows the same order as the GNU Coding Standards.)
913 bindir='${exec_prefix}/bin'
914 sbindir='${exec_prefix}/sbin'
915 libexecdir='${exec_prefix}/libexec'
916 datarootdir='${prefix}/share'
917 datadir='${datarootdir}'
918 sysconfdir='${prefix}/etc'
919 sharedstatedir='${prefix}/com'
920 localstatedir='${prefix}/var'
921 includedir='${prefix}/include'
922 oldincludedir='/usr/include'
923 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
924 infodir='${datarootdir}/info'
925 htmldir='${docdir}'
926 dvidir='${docdir}'
927 pdfdir='${docdir}'
928 psdir='${docdir}'
929 libdir='${exec_prefix}/lib'
930 localedir='${datarootdir}/locale'
931 mandir='${datarootdir}/man'
932
933 ac_prev=
934 ac_dashdash=
935 for ac_option
936 do
937   # If the previous option needs an argument, assign it.
938   if test -n "$ac_prev"; then
939     eval $ac_prev=\$ac_option
940     ac_prev=
941     continue
942   fi
943
944   case $ac_option in
945   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
946   *=)   ac_optarg= ;;
947   *)    ac_optarg=yes ;;
948   esac
949
950   # Accept the important Cygnus configure options, so we can diagnose typos.
951
952   case $ac_dashdash$ac_option in
953   --)
954     ac_dashdash=yes ;;
955
956   -bindir | --bindir | --bindi | --bind | --bin | --bi)
957     ac_prev=bindir ;;
958   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
959     bindir=$ac_optarg ;;
960
961   -build | --build | --buil | --bui | --bu)
962     ac_prev=build_alias ;;
963   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
964     build_alias=$ac_optarg ;;
965
966   -cache-file | --cache-file | --cache-fil | --cache-fi \
967   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
968     ac_prev=cache_file ;;
969   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
970   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
971     cache_file=$ac_optarg ;;
972
973   --config-cache | -C)
974     cache_file=config.cache ;;
975
976   -datadir | --datadir | --datadi | --datad)
977     ac_prev=datadir ;;
978   -datadir=* | --datadir=* | --datadi=* | --datad=*)
979     datadir=$ac_optarg ;;
980
981   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
982   | --dataroo | --dataro | --datar)
983     ac_prev=datarootdir ;;
984   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
985   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
986     datarootdir=$ac_optarg ;;
987
988   -disable-* | --disable-*)
989     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
990     # Reject names that are not valid shell variable names.
991     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
992       as_fn_error $? "invalid feature name: $ac_useropt"
993     ac_useropt_orig=$ac_useropt
994     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
995     case $ac_user_opts in
996       *"
997 "enable_$ac_useropt"
998 "*) ;;
999       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1000          ac_unrecognized_sep=', ';;
1001     esac
1002     eval enable_$ac_useropt=no ;;
1003
1004   -docdir | --docdir | --docdi | --doc | --do)
1005     ac_prev=docdir ;;
1006   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1007     docdir=$ac_optarg ;;
1008
1009   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1010     ac_prev=dvidir ;;
1011   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1012     dvidir=$ac_optarg ;;
1013
1014   -enable-* | --enable-*)
1015     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1016     # Reject names that are not valid shell variable names.
1017     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1018       as_fn_error $? "invalid feature name: $ac_useropt"
1019     ac_useropt_orig=$ac_useropt
1020     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1021     case $ac_user_opts in
1022       *"
1023 "enable_$ac_useropt"
1024 "*) ;;
1025       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1026          ac_unrecognized_sep=', ';;
1027     esac
1028     eval enable_$ac_useropt=\$ac_optarg ;;
1029
1030   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1031   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1032   | --exec | --exe | --ex)
1033     ac_prev=exec_prefix ;;
1034   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1035   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1036   | --exec=* | --exe=* | --ex=*)
1037     exec_prefix=$ac_optarg ;;
1038
1039   -gas | --gas | --ga | --g)
1040     # Obsolete; use --with-gas.
1041     with_gas=yes ;;
1042
1043   -help | --help | --hel | --he | -h)
1044     ac_init_help=long ;;
1045   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1046     ac_init_help=recursive ;;
1047   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1048     ac_init_help=short ;;
1049
1050   -host | --host | --hos | --ho)
1051     ac_prev=host_alias ;;
1052   -host=* | --host=* | --hos=* | --ho=*)
1053     host_alias=$ac_optarg ;;
1054
1055   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1056     ac_prev=htmldir ;;
1057   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1058   | --ht=*)
1059     htmldir=$ac_optarg ;;
1060
1061   -includedir | --includedir | --includedi | --included | --include \
1062   | --includ | --inclu | --incl | --inc)
1063     ac_prev=includedir ;;
1064   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1065   | --includ=* | --inclu=* | --incl=* | --inc=*)
1066     includedir=$ac_optarg ;;
1067
1068   -infodir | --infodir | --infodi | --infod | --info | --inf)
1069     ac_prev=infodir ;;
1070   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1071     infodir=$ac_optarg ;;
1072
1073   -libdir | --libdir | --libdi | --libd)
1074     ac_prev=libdir ;;
1075   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1076     libdir=$ac_optarg ;;
1077
1078   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1079   | --libexe | --libex | --libe)
1080     ac_prev=libexecdir ;;
1081   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1082   | --libexe=* | --libex=* | --libe=*)
1083     libexecdir=$ac_optarg ;;
1084
1085   -localedir | --localedir | --localedi | --localed | --locale)
1086     ac_prev=localedir ;;
1087   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1088     localedir=$ac_optarg ;;
1089
1090   -localstatedir | --localstatedir | --localstatedi | --localstated \
1091   | --localstate | --localstat | --localsta | --localst | --locals)
1092     ac_prev=localstatedir ;;
1093   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1094   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1095     localstatedir=$ac_optarg ;;
1096
1097   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1098     ac_prev=mandir ;;
1099   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1100     mandir=$ac_optarg ;;
1101
1102   -nfp | --nfp | --nf)
1103     # Obsolete; use --without-fp.
1104     with_fp=no ;;
1105
1106   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1107   | --no-cr | --no-c | -n)
1108     no_create=yes ;;
1109
1110   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1111   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1112     no_recursion=yes ;;
1113
1114   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1115   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1116   | --oldin | --oldi | --old | --ol | --o)
1117     ac_prev=oldincludedir ;;
1118   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1119   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1120   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1121     oldincludedir=$ac_optarg ;;
1122
1123   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1124     ac_prev=prefix ;;
1125   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1126     prefix=$ac_optarg ;;
1127
1128   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1129   | --program-pre | --program-pr | --program-p)
1130     ac_prev=program_prefix ;;
1131   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1132   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1133     program_prefix=$ac_optarg ;;
1134
1135   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1136   | --program-suf | --program-su | --program-s)
1137     ac_prev=program_suffix ;;
1138   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1139   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1140     program_suffix=$ac_optarg ;;
1141
1142   -program-transform-name | --program-transform-name \
1143   | --program-transform-nam | --program-transform-na \
1144   | --program-transform-n | --program-transform- \
1145   | --program-transform | --program-transfor \
1146   | --program-transfo | --program-transf \
1147   | --program-trans | --program-tran \
1148   | --progr-tra | --program-tr | --program-t)
1149     ac_prev=program_transform_name ;;
1150   -program-transform-name=* | --program-transform-name=* \
1151   | --program-transform-nam=* | --program-transform-na=* \
1152   | --program-transform-n=* | --program-transform-=* \
1153   | --program-transform=* | --program-transfor=* \
1154   | --program-transfo=* | --program-transf=* \
1155   | --program-trans=* | --program-tran=* \
1156   | --progr-tra=* | --program-tr=* | --program-t=*)
1157     program_transform_name=$ac_optarg ;;
1158
1159   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1160     ac_prev=pdfdir ;;
1161   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1162     pdfdir=$ac_optarg ;;
1163
1164   -psdir | --psdir | --psdi | --psd | --ps)
1165     ac_prev=psdir ;;
1166   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1167     psdir=$ac_optarg ;;
1168
1169   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1170   | -silent | --silent | --silen | --sile | --sil)
1171     silent=yes ;;
1172
1173   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1174     ac_prev=sbindir ;;
1175   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1176   | --sbi=* | --sb=*)
1177     sbindir=$ac_optarg ;;
1178
1179   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1180   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1181   | --sharedst | --shareds | --shared | --share | --shar \
1182   | --sha | --sh)
1183     ac_prev=sharedstatedir ;;
1184   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1185   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1186   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1187   | --sha=* | --sh=*)
1188     sharedstatedir=$ac_optarg ;;
1189
1190   -site | --site | --sit)
1191     ac_prev=site ;;
1192   -site=* | --site=* | --sit=*)
1193     site=$ac_optarg ;;
1194
1195   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1196     ac_prev=srcdir ;;
1197   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1198     srcdir=$ac_optarg ;;
1199
1200   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1201   | --syscon | --sysco | --sysc | --sys | --sy)
1202     ac_prev=sysconfdir ;;
1203   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1204   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1205     sysconfdir=$ac_optarg ;;
1206
1207   -target | --target | --targe | --targ | --tar | --ta | --t)
1208     ac_prev=target_alias ;;
1209   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1210     target_alias=$ac_optarg ;;
1211
1212   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1213     verbose=yes ;;
1214
1215   -version | --version | --versio | --versi | --vers | -V)
1216     ac_init_version=: ;;
1217
1218   -with-* | --with-*)
1219     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1220     # Reject names that are not valid shell variable names.
1221     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1222       as_fn_error $? "invalid package name: $ac_useropt"
1223     ac_useropt_orig=$ac_useropt
1224     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1225     case $ac_user_opts in
1226       *"
1227 "with_$ac_useropt"
1228 "*) ;;
1229       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1230          ac_unrecognized_sep=', ';;
1231     esac
1232     eval with_$ac_useropt=\$ac_optarg ;;
1233
1234   -without-* | --without-*)
1235     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1236     # Reject names that are not valid shell variable names.
1237     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1238       as_fn_error $? "invalid package name: $ac_useropt"
1239     ac_useropt_orig=$ac_useropt
1240     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1241     case $ac_user_opts in
1242       *"
1243 "with_$ac_useropt"
1244 "*) ;;
1245       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1246          ac_unrecognized_sep=', ';;
1247     esac
1248     eval with_$ac_useropt=no ;;
1249
1250   --x)
1251     # Obsolete; use --with-x.
1252     with_x=yes ;;
1253
1254   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1255   | --x-incl | --x-inc | --x-in | --x-i)
1256     ac_prev=x_includes ;;
1257   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1258   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1259     x_includes=$ac_optarg ;;
1260
1261   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1262   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1263     ac_prev=x_libraries ;;
1264   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1265   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1266     x_libraries=$ac_optarg ;;
1267
1268   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1269 Try \`$0 --help' for more information"
1270     ;;
1271
1272   *=*)
1273     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1274     # Reject names that are not valid shell variable names.
1275     case $ac_envvar in #(
1276       '' | [0-9]* | *[!_$as_cr_alnum]* )
1277       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1278     esac
1279     eval $ac_envvar=\$ac_optarg
1280     export $ac_envvar ;;
1281
1282   *)
1283     # FIXME: should be removed in autoconf 3.0.
1284     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1285     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1286       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1287     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1288     ;;
1289
1290   esac
1291 done
1292
1293 if test -n "$ac_prev"; then
1294   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1295   as_fn_error $? "missing argument to $ac_option"
1296 fi
1297
1298 if test -n "$ac_unrecognized_opts"; then
1299   case $enable_option_checking in
1300     no) ;;
1301     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1302     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1303   esac
1304 fi
1305
1306 # Check all directory arguments for consistency.
1307 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1308                 datadir sysconfdir sharedstatedir localstatedir includedir \
1309                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1310                 libdir localedir mandir
1311 do
1312   eval ac_val=\$$ac_var
1313   # Remove trailing slashes.
1314   case $ac_val in
1315     */ )
1316       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1317       eval $ac_var=\$ac_val;;
1318   esac
1319   # Be sure to have absolute directory names.
1320   case $ac_val in
1321     [\\/$]* | ?:[\\/]* )  continue;;
1322     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1323   esac
1324   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1325 done
1326
1327 # There might be people who depend on the old broken behavior: `$host'
1328 # used to hold the argument of --host etc.
1329 # FIXME: To remove some day.
1330 build=$build_alias
1331 host=$host_alias
1332 target=$target_alias
1333
1334 # FIXME: To remove some day.
1335 if test "x$host_alias" != x; then
1336   if test "x$build_alias" = x; then
1337     cross_compiling=maybe
1338   elif test "x$build_alias" != "x$host_alias"; then
1339     cross_compiling=yes
1340   fi
1341 fi
1342
1343 ac_tool_prefix=
1344 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1345
1346 test "$silent" = yes && exec 6>/dev/null
1347
1348
1349 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1350 ac_ls_di=`ls -di .` &&
1351 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1352   as_fn_error $? "working directory cannot be determined"
1353 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1354   as_fn_error $? "pwd does not report name of working directory"
1355
1356
1357 # Find the source files, if location was not specified.
1358 if test -z "$srcdir"; then
1359   ac_srcdir_defaulted=yes
1360   # Try the directory containing this script, then the parent directory.
1361   ac_confdir=`$as_dirname -- "$as_myself" ||
1362 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1363          X"$as_myself" : 'X\(//\)[^/]' \| \
1364          X"$as_myself" : 'X\(//\)$' \| \
1365          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1366 $as_echo X"$as_myself" |
1367     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1368             s//\1/
1369             q
1370           }
1371           /^X\(\/\/\)[^/].*/{
1372             s//\1/
1373             q
1374           }
1375           /^X\(\/\/\)$/{
1376             s//\1/
1377             q
1378           }
1379           /^X\(\/\).*/{
1380             s//\1/
1381             q
1382           }
1383           s/.*/./; q'`
1384   srcdir=$ac_confdir
1385   if test ! -r "$srcdir/$ac_unique_file"; then
1386     srcdir=..
1387   fi
1388 else
1389   ac_srcdir_defaulted=no
1390 fi
1391 if test ! -r "$srcdir/$ac_unique_file"; then
1392   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1393   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1394 fi
1395 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1396 ac_abs_confdir=`(
1397         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1398         pwd)`
1399 # When building in place, set srcdir=.
1400 if test "$ac_abs_confdir" = "$ac_pwd"; then
1401   srcdir=.
1402 fi
1403 # Remove unnecessary trailing slashes from srcdir.
1404 # Double slashes in file names in object file debugging info
1405 # mess up M-x gdb in Emacs.
1406 case $srcdir in
1407 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1408 esac
1409 for ac_var in $ac_precious_vars; do
1410   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1411   eval ac_env_${ac_var}_value=\$${ac_var}
1412   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1413   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1414 done
1415
1416 #
1417 # Report the --help message.
1418 #
1419 if test "$ac_init_help" = "long"; then
1420   # Omit some internal or obsolete options to make the list less imposing.
1421   # This message is too long to be a string in the A/UX 3.1 sh.
1422   cat <<_ACEOF
1423 \`configure' configures unbound 1.6.1 to adapt to many kinds of systems.
1424
1425 Usage: $0 [OPTION]... [VAR=VALUE]...
1426
1427 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1428 VAR=VALUE.  See below for descriptions of some of the useful variables.
1429
1430 Defaults for the options are specified in brackets.
1431
1432 Configuration:
1433   -h, --help              display this help and exit
1434       --help=short        display options specific to this package
1435       --help=recursive    display the short help of all the included packages
1436   -V, --version           display version information and exit
1437   -q, --quiet, --silent   do not print \`checking ...' messages
1438       --cache-file=FILE   cache test results in FILE [disabled]
1439   -C, --config-cache      alias for \`--cache-file=config.cache'
1440   -n, --no-create         do not create output files
1441       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1442
1443 Installation directories:
1444   --prefix=PREFIX         install architecture-independent files in PREFIX
1445                           [$ac_default_prefix]
1446   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1447                           [PREFIX]
1448
1449 By default, \`make install' will install all the files in
1450 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1451 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1452 for instance \`--prefix=\$HOME'.
1453
1454 For better control, use the options below.
1455
1456 Fine tuning of the installation directories:
1457   --bindir=DIR            user executables [EPREFIX/bin]
1458   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1459   --libexecdir=DIR        program executables [EPREFIX/libexec]
1460   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1461   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1462   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1463   --libdir=DIR            object code libraries [EPREFIX/lib]
1464   --includedir=DIR        C header files [PREFIX/include]
1465   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1466   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1467   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1468   --infodir=DIR           info documentation [DATAROOTDIR/info]
1469   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1470   --mandir=DIR            man documentation [DATAROOTDIR/man]
1471   --docdir=DIR            documentation root [DATAROOTDIR/doc/unbound]
1472   --htmldir=DIR           html documentation [DOCDIR]
1473   --dvidir=DIR            dvi documentation [DOCDIR]
1474   --pdfdir=DIR            pdf documentation [DOCDIR]
1475   --psdir=DIR             ps documentation [DOCDIR]
1476 _ACEOF
1477
1478   cat <<\_ACEOF
1479
1480 System types:
1481   --build=BUILD     configure for building on BUILD [guessed]
1482   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1483 _ACEOF
1484 fi
1485
1486 if test -n "$ac_init_help"; then
1487   case $ac_init_help in
1488      short | recursive ) echo "Configuration of unbound 1.6.1:";;
1489    esac
1490   cat <<\_ACEOF
1491
1492 Optional Features:
1493   --disable-option-checking  ignore unrecognized --enable/--with options
1494   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1495   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1496   --enable-checking       Enable warnings, asserts, makefile-dependencies
1497   --enable-debug          same as enable-checking
1498   --disable-flto          Disable link-time optimization (gcc specific option)
1499   --enable-pie            Enable Position-Independent Executable (eg. to fully
1500                           benefit from ASLR, small performance penalty)
1501   --enable-relro-now      Enable full relocation binding at load-time (RELRO
1502                           NOW, to protect GOT and .dtor areas)
1503   --enable-shared[=PKGS]  build shared libraries [default=yes]
1504   --enable-static[=PKGS]  build static libraries [default=yes]
1505   --enable-fast-install[=PKGS]
1506                           optimize for fast installation [default=yes]
1507   --disable-libtool-lock  avoid locking (might break parallel builds)
1508   --disable-rpath         disable hardcoded rpath (default=enabled)
1509   --disable-largefile     omit support for large files
1510   --enable-alloc-checks   enable to memory allocation statistics, for debug
1511                           purposes
1512   --enable-alloc-lite     enable for lightweight alloc assertions, for debug
1513                           purposes
1514   --enable-alloc-nonregional
1515                           enable nonregional allocs, slow but exposes regional
1516                           allocations to other memory purifiers, for debug
1517                           purposes
1518   --disable-sha2          Disable SHA256 and SHA512 RRSIG support
1519   --disable-gost          Disable GOST support
1520   --disable-ecdsa         Disable ECDSA support
1521   --disable-dsa           Disable DSA support
1522   --enable-event-api      Enable (experimental) pluggable event base
1523                           libunbound API installed to unbound-event.h
1524   --enable-tfo-client     Enable TCP Fast Open for client mode
1525   --enable-tfo-server     Enable TCP Fast Open for server mode
1526   --enable-static-exe     enable to compile executables statically against
1527                           (event) libs, for debug purposes
1528   --enable-systemd        compile with systemd support
1529   --enable-lock-checks    enable to check lock and unlock calls, for debug
1530                           purposes
1531   --enable-allsymbols     export all symbols from libunbound and link binaries
1532                           to it, smaller install size but libunbound export
1533                           table is polluted by internal symbols
1534   --enable-dnstap         Enable dnstap support (requires fstrm, protobuf-c)
1535   --enable-cachedb        enable cachedb module that can use external cache
1536                           storage
1537
1538 Optional Packages:
1539   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1540   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1541   --with-conf-file=path   Pathname to the Unbound configuration file
1542   --with-run-dir=path     set default directory to chdir to (by default dir
1543                           part of cfg file)
1544   --with-chroot-dir=path  set default directory to chroot to (by default same
1545                           as run-dir)
1546   --with-share-dir=path   set default directory with shared data (by default
1547                           same as share/unbound)
1548   --with-pidfile=filename set default pathname to unbound pidfile (default
1549                           run-dir/unbound.pid)
1550   --with-rootkey-file=filename
1551                           set default pathname to root key file (default
1552                           run-dir/root.key). This file is read and written.
1553   --with-rootcert-file=filename
1554                           set default pathname to root update certificate file
1555                           (default run-dir/icannbundle.pem). This file need
1556                           not exist if you are content with the builtin.
1557   --with-username=user    set default user that unbound changes to (default
1558                           user is unbound)
1559   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1560                           both]
1561   --with-aix-soname=aix|svr4|both
1562                           shared library versioning (aka "SONAME") variant to
1563                           provide on AIX, [default=aix].
1564   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1565   --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1566                           compiler's sysroot if not specified).
1567   --with-pthreads         use pthreads library, or --without-pthreads to
1568                           disable threading support.
1569   --with-solaris-threads  use solaris native thread library.
1570   --with-pyunbound        build PyUnbound, or --without-pyunbound to skip it.
1571                           (default=no)
1572   --with-pythonmodule     build Python module, or --without-pythonmodule to
1573                           disable script engine. (default=no)
1574   --with-nss=path         use libnss instead of openssl, installed at path.
1575   --with-nettle=path      use libnettle as crypto library, installed at path.
1576   --with-ssl=pathname     enable SSL (will check /usr/local/ssl /usr/lib/ssl
1577                           /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw
1578                           /usr)
1579   --with-libevent=pathname
1580                           use libevent (will check /usr/local /opt/local
1581                           /usr/lib /usr/pkg /usr/sfw /usr or you can specify
1582                           an explicit path). Slower, but allows use of large
1583                           outgoing port ranges.
1584   --with-libexpat=path    specify explicit path for libexpat.
1585   --with-dnstap-socket-path=pathname
1586                           set default dnstap socket path
1587   --with-protobuf-c=path  Path where protobuf-c is installed, for dnstap
1588   --with-libfstrm=path    Path where libfstrm is installed, for dnstap
1589   --with-libunbound-only  do not build daemon and tool programs
1590
1591 Some influential environment variables:
1592   CC          C compiler command
1593   CFLAGS      C compiler flags
1594   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1595               nonstandard directory <lib dir>
1596   LIBS        libraries to pass to the linker, e.g. -l<library>
1597   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1598               you have headers in a nonstandard directory <include dir>
1599   CPP         C preprocessor
1600   YACC        The `Yet Another Compiler Compiler' implementation to use.
1601               Defaults to the first program found out of: `bison -y', `byacc',
1602               `yacc'.
1603   YFLAGS      The list of arguments that will be passed by default to $YACC.
1604               This script will default YFLAGS to the empty string to avoid a
1605               default value of `-d' given by some make applications.
1606   LT_SYS_LIBRARY_PATH
1607               User-defined run-time library search path.
1608   PYTHON_VERSION
1609               The installed Python version to use, for example '2.3'. This
1610               string will be appended to the Python interpreter canonical
1611               name.
1612   PKG_CONFIG  path to pkg-config utility
1613   PKG_CONFIG_PATH
1614               directories to add to pkg-config's search path
1615   PKG_CONFIG_LIBDIR
1616               path overriding pkg-config's built-in search path
1617   SYSTEMD_CFLAGS
1618               C compiler flags for SYSTEMD, overriding pkg-config
1619   SYSTEMD_LIBS
1620               linker flags for SYSTEMD, overriding pkg-config
1621   SYSTEMD_DAEMON_CFLAGS
1622               C compiler flags for SYSTEMD_DAEMON, overriding pkg-config
1623   SYSTEMD_DAEMON_LIBS
1624               linker flags for SYSTEMD_DAEMON, overriding pkg-config
1625
1626 Use these variables to override the choices made by `configure' or to help
1627 it to find libraries and programs with nonstandard names/locations.
1628
1629 Report bugs to <unbound-bugs@nlnetlabs.nl>.
1630 _ACEOF
1631 ac_status=$?
1632 fi
1633
1634 if test "$ac_init_help" = "recursive"; then
1635   # If there are subdirs, report their specific --help.
1636   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1637     test -d "$ac_dir" ||
1638       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1639       continue
1640     ac_builddir=.
1641
1642 case "$ac_dir" in
1643 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1644 *)
1645   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1646   # A ".." for each directory in $ac_dir_suffix.
1647   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1648   case $ac_top_builddir_sub in
1649   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1650   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1651   esac ;;
1652 esac
1653 ac_abs_top_builddir=$ac_pwd
1654 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1655 # for backward compatibility:
1656 ac_top_builddir=$ac_top_build_prefix
1657
1658 case $srcdir in
1659   .)  # We are building in place.
1660     ac_srcdir=.
1661     ac_top_srcdir=$ac_top_builddir_sub
1662     ac_abs_top_srcdir=$ac_pwd ;;
1663   [\\/]* | ?:[\\/]* )  # Absolute name.
1664     ac_srcdir=$srcdir$ac_dir_suffix;
1665     ac_top_srcdir=$srcdir
1666     ac_abs_top_srcdir=$srcdir ;;
1667   *) # Relative name.
1668     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1669     ac_top_srcdir=$ac_top_build_prefix$srcdir
1670     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1671 esac
1672 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1673
1674     cd "$ac_dir" || { ac_status=$?; continue; }
1675     # Check for guested configure.
1676     if test -f "$ac_srcdir/configure.gnu"; then
1677       echo &&
1678       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1679     elif test -f "$ac_srcdir/configure"; then
1680       echo &&
1681       $SHELL "$ac_srcdir/configure" --help=recursive
1682     else
1683       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1684     fi || ac_status=$?
1685     cd "$ac_pwd" || { ac_status=$?; break; }
1686   done
1687 fi
1688
1689 test -n "$ac_init_help" && exit $ac_status
1690 if $ac_init_version; then
1691   cat <<\_ACEOF
1692 unbound configure 1.6.1
1693 generated by GNU Autoconf 2.69
1694
1695 Copyright (C) 2012 Free Software Foundation, Inc.
1696 This configure script is free software; the Free Software Foundation
1697 gives unlimited permission to copy, distribute and modify it.
1698 _ACEOF
1699   exit
1700 fi
1701
1702 ## ------------------------ ##
1703 ## Autoconf initialization. ##
1704 ## ------------------------ ##
1705
1706 # ac_fn_c_try_compile LINENO
1707 # --------------------------
1708 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1709 ac_fn_c_try_compile ()
1710 {
1711   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1712   rm -f conftest.$ac_objext
1713   if { { ac_try="$ac_compile"
1714 case "(($ac_try" in
1715   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1716   *) ac_try_echo=$ac_try;;
1717 esac
1718 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1719 $as_echo "$ac_try_echo"; } >&5
1720   (eval "$ac_compile") 2>conftest.err
1721   ac_status=$?
1722   if test -s conftest.err; then
1723     grep -v '^ *+' conftest.err >conftest.er1
1724     cat conftest.er1 >&5
1725     mv -f conftest.er1 conftest.err
1726   fi
1727   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1728   test $ac_status = 0; } && {
1729          test -z "$ac_c_werror_flag" ||
1730          test ! -s conftest.err
1731        } && test -s conftest.$ac_objext; then :
1732   ac_retval=0
1733 else
1734   $as_echo "$as_me: failed program was:" >&5
1735 sed 's/^/| /' conftest.$ac_ext >&5
1736
1737         ac_retval=1
1738 fi
1739   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1740   as_fn_set_status $ac_retval
1741
1742 } # ac_fn_c_try_compile
1743
1744 # ac_fn_c_try_cpp LINENO
1745 # ----------------------
1746 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1747 ac_fn_c_try_cpp ()
1748 {
1749   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1750   if { { ac_try="$ac_cpp conftest.$ac_ext"
1751 case "(($ac_try" in
1752   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1753   *) ac_try_echo=$ac_try;;
1754 esac
1755 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1756 $as_echo "$ac_try_echo"; } >&5
1757   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1758   ac_status=$?
1759   if test -s conftest.err; then
1760     grep -v '^ *+' conftest.err >conftest.er1
1761     cat conftest.er1 >&5
1762     mv -f conftest.er1 conftest.err
1763   fi
1764   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1765   test $ac_status = 0; } > conftest.i && {
1766          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1767          test ! -s conftest.err
1768        }; then :
1769   ac_retval=0
1770 else
1771   $as_echo "$as_me: failed program was:" >&5
1772 sed 's/^/| /' conftest.$ac_ext >&5
1773
1774     ac_retval=1
1775 fi
1776   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1777   as_fn_set_status $ac_retval
1778
1779 } # ac_fn_c_try_cpp
1780
1781 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1782 # -------------------------------------------------------
1783 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1784 # the include files in INCLUDES and setting the cache variable VAR
1785 # accordingly.
1786 ac_fn_c_check_header_mongrel ()
1787 {
1788   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1789   if eval \${$3+:} false; then :
1790   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1791 $as_echo_n "checking for $2... " >&6; }
1792 if eval \${$3+:} false; then :
1793   $as_echo_n "(cached) " >&6
1794 fi
1795 eval ac_res=\$$3
1796                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1797 $as_echo "$ac_res" >&6; }
1798 else
1799   # Is the header compilable?
1800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1801 $as_echo_n "checking $2 usability... " >&6; }
1802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1803 /* end confdefs.h.  */
1804 $4
1805 #include <$2>
1806 _ACEOF
1807 if ac_fn_c_try_compile "$LINENO"; then :
1808   ac_header_compiler=yes
1809 else
1810   ac_header_compiler=no
1811 fi
1812 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1814 $as_echo "$ac_header_compiler" >&6; }
1815
1816 # Is the header present?
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1818 $as_echo_n "checking $2 presence... " >&6; }
1819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1820 /* end confdefs.h.  */
1821 #include <$2>
1822 _ACEOF
1823 if ac_fn_c_try_cpp "$LINENO"; then :
1824   ac_header_preproc=yes
1825 else
1826   ac_header_preproc=no
1827 fi
1828 rm -f conftest.err conftest.i conftest.$ac_ext
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1830 $as_echo "$ac_header_preproc" >&6; }
1831
1832 # So?  What about this header?
1833 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1834   yes:no: )
1835     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1836 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1837     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1838 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1839     ;;
1840   no:yes:* )
1841     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1842 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1843     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1844 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1845     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1846 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1847     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1848 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1849     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1850 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1851 ( $as_echo "## ---------------------------------------- ##
1852 ## Report this to unbound-bugs@nlnetlabs.nl ##
1853 ## ---------------------------------------- ##"
1854      ) | sed "s/^/$as_me: WARNING:     /" >&2
1855     ;;
1856 esac
1857   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1858 $as_echo_n "checking for $2... " >&6; }
1859 if eval \${$3+:} false; then :
1860   $as_echo_n "(cached) " >&6
1861 else
1862   eval "$3=\$ac_header_compiler"
1863 fi
1864 eval ac_res=\$$3
1865                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1866 $as_echo "$ac_res" >&6; }
1867 fi
1868   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1869
1870 } # ac_fn_c_check_header_mongrel
1871
1872 # ac_fn_c_try_run LINENO
1873 # ----------------------
1874 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1875 # that executables *can* be run.
1876 ac_fn_c_try_run ()
1877 {
1878   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1879   if { { ac_try="$ac_link"
1880 case "(($ac_try" in
1881   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1882   *) ac_try_echo=$ac_try;;
1883 esac
1884 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1885 $as_echo "$ac_try_echo"; } >&5
1886   (eval "$ac_link") 2>&5
1887   ac_status=$?
1888   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1889   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1890   { { case "(($ac_try" in
1891   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1892   *) ac_try_echo=$ac_try;;
1893 esac
1894 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1895 $as_echo "$ac_try_echo"; } >&5
1896   (eval "$ac_try") 2>&5
1897   ac_status=$?
1898   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1899   test $ac_status = 0; }; }; then :
1900   ac_retval=0
1901 else
1902   $as_echo "$as_me: program exited with status $ac_status" >&5
1903        $as_echo "$as_me: failed program was:" >&5
1904 sed 's/^/| /' conftest.$ac_ext >&5
1905
1906        ac_retval=$ac_status
1907 fi
1908   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1909   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1910   as_fn_set_status $ac_retval
1911
1912 } # ac_fn_c_try_run
1913
1914 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1915 # -------------------------------------------------------
1916 # Tests whether HEADER exists and can be compiled using the include files in
1917 # INCLUDES, setting the cache variable VAR accordingly.
1918 ac_fn_c_check_header_compile ()
1919 {
1920   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1921   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1922 $as_echo_n "checking for $2... " >&6; }
1923 if eval \${$3+:} false; then :
1924   $as_echo_n "(cached) " >&6
1925 else
1926   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1927 /* end confdefs.h.  */
1928 $4
1929 #include <$2>
1930 _ACEOF
1931 if ac_fn_c_try_compile "$LINENO"; then :
1932   eval "$3=yes"
1933 else
1934   eval "$3=no"
1935 fi
1936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1937 fi
1938 eval ac_res=\$$3
1939                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1940 $as_echo "$ac_res" >&6; }
1941   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1942
1943 } # ac_fn_c_check_header_compile
1944
1945 # ac_fn_c_try_link LINENO
1946 # -----------------------
1947 # Try to link conftest.$ac_ext, and return whether this succeeded.
1948 ac_fn_c_try_link ()
1949 {
1950   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1951   rm -f conftest.$ac_objext conftest$ac_exeext
1952   if { { ac_try="$ac_link"
1953 case "(($ac_try" in
1954   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1955   *) ac_try_echo=$ac_try;;
1956 esac
1957 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1958 $as_echo "$ac_try_echo"; } >&5
1959   (eval "$ac_link") 2>conftest.err
1960   ac_status=$?
1961   if test -s conftest.err; then
1962     grep -v '^ *+' conftest.err >conftest.er1
1963     cat conftest.er1 >&5
1964     mv -f conftest.er1 conftest.err
1965   fi
1966   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1967   test $ac_status = 0; } && {
1968          test -z "$ac_c_werror_flag" ||
1969          test ! -s conftest.err
1970        } && test -s conftest$ac_exeext && {
1971          test "$cross_compiling" = yes ||
1972          test -x conftest$ac_exeext
1973        }; then :
1974   ac_retval=0
1975 else
1976   $as_echo "$as_me: failed program was:" >&5
1977 sed 's/^/| /' conftest.$ac_ext >&5
1978
1979         ac_retval=1
1980 fi
1981   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1982   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1983   # interfere with the next link command; also delete a directory that is
1984   # left behind by Apple's compiler.  We do this before executing the actions.
1985   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1986   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1987   as_fn_set_status $ac_retval
1988
1989 } # ac_fn_c_try_link
1990
1991 # ac_fn_c_check_func LINENO FUNC VAR
1992 # ----------------------------------
1993 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1994 ac_fn_c_check_func ()
1995 {
1996   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1998 $as_echo_n "checking for $2... " >&6; }
1999 if eval \${$3+:} false; then :
2000   $as_echo_n "(cached) " >&6
2001 else
2002   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003 /* end confdefs.h.  */
2004 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2005    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2006 #define $2 innocuous_$2
2007
2008 /* System header to define __stub macros and hopefully few prototypes,
2009     which can conflict with char $2 (); below.
2010     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2011     <limits.h> exists even on freestanding compilers.  */
2012
2013 #ifdef __STDC__
2014 # include <limits.h>
2015 #else
2016 # include <assert.h>
2017 #endif
2018
2019 #undef $2
2020
2021 /* Override any GCC internal prototype to avoid an error.
2022    Use char because int might match the return type of a GCC
2023    builtin and then its argument prototype would still apply.  */
2024 #ifdef __cplusplus
2025 extern "C"
2026 #endif
2027 char $2 ();
2028 /* The GNU C library defines this for functions which it implements
2029     to always fail with ENOSYS.  Some functions are actually named
2030     something starting with __ and the normal name is an alias.  */
2031 #if defined __stub_$2 || defined __stub___$2
2032 choke me
2033 #endif
2034
2035 int
2036 main ()
2037 {
2038 return $2 ();
2039   ;
2040   return 0;
2041 }
2042 _ACEOF
2043 if ac_fn_c_try_link "$LINENO"; then :
2044   eval "$3=yes"
2045 else
2046   eval "$3=no"
2047 fi
2048 rm -f core conftest.err conftest.$ac_objext \
2049     conftest$ac_exeext conftest.$ac_ext
2050 fi
2051 eval ac_res=\$$3
2052                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2053 $as_echo "$ac_res" >&6; }
2054   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2055
2056 } # ac_fn_c_check_func
2057
2058 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2059 # -------------------------------------------
2060 # Tests whether TYPE exists after having included INCLUDES, setting cache
2061 # variable VAR accordingly.
2062 ac_fn_c_check_type ()
2063 {
2064   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2065   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2066 $as_echo_n "checking for $2... " >&6; }
2067 if eval \${$3+:} false; then :
2068   $as_echo_n "(cached) " >&6
2069 else
2070   eval "$3=no"
2071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072 /* end confdefs.h.  */
2073 $4
2074 int
2075 main ()
2076 {
2077 if (sizeof ($2))
2078          return 0;
2079   ;
2080   return 0;
2081 }
2082 _ACEOF
2083 if ac_fn_c_try_compile "$LINENO"; then :
2084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2085 /* end confdefs.h.  */
2086 $4
2087 int
2088 main ()
2089 {
2090 if (sizeof (($2)))
2091             return 0;
2092   ;
2093   return 0;
2094 }
2095 _ACEOF
2096 if ac_fn_c_try_compile "$LINENO"; then :
2097
2098 else
2099   eval "$3=yes"
2100 fi
2101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102 fi
2103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2104 fi
2105 eval ac_res=\$$3
2106                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2107 $as_echo "$ac_res" >&6; }
2108   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2109
2110 } # ac_fn_c_check_type
2111
2112 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2113 # --------------------------------------------
2114 # Tries to find the compile-time value of EXPR in a program that includes
2115 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2116 # computed
2117 ac_fn_c_compute_int ()
2118 {
2119   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2120   if test "$cross_compiling" = yes; then
2121     # Depending upon the size, compute the lo and hi bounds.
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123 /* end confdefs.h.  */
2124 $4
2125 int
2126 main ()
2127 {
2128 static int test_array [1 - 2 * !(($2) >= 0)];
2129 test_array [0] = 0;
2130 return test_array [0];
2131
2132   ;
2133   return 0;
2134 }
2135 _ACEOF
2136 if ac_fn_c_try_compile "$LINENO"; then :
2137   ac_lo=0 ac_mid=0
2138   while :; do
2139     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2140 /* end confdefs.h.  */
2141 $4
2142 int
2143 main ()
2144 {
2145 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2146 test_array [0] = 0;
2147 return test_array [0];
2148
2149   ;
2150   return 0;
2151 }
2152 _ACEOF
2153 if ac_fn_c_try_compile "$LINENO"; then :
2154   ac_hi=$ac_mid; break
2155 else
2156   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2157                         if test $ac_lo -le $ac_mid; then
2158                           ac_lo= ac_hi=
2159                           break
2160                         fi
2161                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2162 fi
2163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2164   done
2165 else
2166   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167 /* end confdefs.h.  */
2168 $4
2169 int
2170 main ()
2171 {
2172 static int test_array [1 - 2 * !(($2) < 0)];
2173 test_array [0] = 0;
2174 return test_array [0];
2175
2176   ;
2177   return 0;
2178 }
2179 _ACEOF
2180 if ac_fn_c_try_compile "$LINENO"; then :
2181   ac_hi=-1 ac_mid=-1
2182   while :; do
2183     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184 /* end confdefs.h.  */
2185 $4
2186 int
2187 main ()
2188 {
2189 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2190 test_array [0] = 0;
2191 return test_array [0];
2192
2193   ;
2194   return 0;
2195 }
2196 _ACEOF
2197 if ac_fn_c_try_compile "$LINENO"; then :
2198   ac_lo=$ac_mid; break
2199 else
2200   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2201                         if test $ac_mid -le $ac_hi; then
2202                           ac_lo= ac_hi=
2203                           break
2204                         fi
2205                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2206 fi
2207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208   done
2209 else
2210   ac_lo= ac_hi=
2211 fi
2212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2213 fi
2214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2215 # Binary search between lo and hi bounds.
2216 while test "x$ac_lo" != "x$ac_hi"; do
2217   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2218   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219 /* end confdefs.h.  */
2220 $4
2221 int
2222 main ()
2223 {
2224 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2225 test_array [0] = 0;
2226 return test_array [0];
2227
2228   ;
2229   return 0;
2230 }
2231 _ACEOF
2232 if ac_fn_c_try_compile "$LINENO"; then :
2233   ac_hi=$ac_mid
2234 else
2235   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2236 fi
2237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2238 done
2239 case $ac_lo in #((
2240 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2241 '') ac_retval=1 ;;
2242 esac
2243   else
2244     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245 /* end confdefs.h.  */
2246 $4
2247 static long int longval () { return $2; }
2248 static unsigned long int ulongval () { return $2; }
2249 #include <stdio.h>
2250 #include <stdlib.h>
2251 int
2252 main ()
2253 {
2254
2255   FILE *f = fopen ("conftest.val", "w");
2256   if (! f)
2257     return 1;
2258   if (($2) < 0)
2259     {
2260       long int i = longval ();
2261       if (i != ($2))
2262         return 1;
2263       fprintf (f, "%ld", i);
2264     }
2265   else
2266     {
2267       unsigned long int i = ulongval ();
2268       if (i != ($2))
2269         return 1;
2270       fprintf (f, "%lu", i);
2271     }
2272   /* Do not output a trailing newline, as this causes \r\n confusion
2273      on some platforms.  */
2274   return ferror (f) || fclose (f) != 0;
2275
2276   ;
2277   return 0;
2278 }
2279 _ACEOF
2280 if ac_fn_c_try_run "$LINENO"; then :
2281   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2282 else
2283   ac_retval=1
2284 fi
2285 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2286   conftest.$ac_objext conftest.beam conftest.$ac_ext
2287 rm -f conftest.val
2288
2289   fi
2290   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2291   as_fn_set_status $ac_retval
2292
2293 } # ac_fn_c_compute_int
2294
2295 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2296 # ---------------------------------------------
2297 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2298 # accordingly.
2299 ac_fn_c_check_decl ()
2300 {
2301   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2302   as_decl_name=`echo $2|sed 's/ *(.*//'`
2303   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2304   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2305 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2306 if eval \${$3+:} false; then :
2307   $as_echo_n "(cached) " >&6
2308 else
2309   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310 /* end confdefs.h.  */
2311 $4
2312 int
2313 main ()
2314 {
2315 #ifndef $as_decl_name
2316 #ifdef __cplusplus
2317   (void) $as_decl_use;
2318 #else
2319   (void) $as_decl_name;
2320 #endif
2321 #endif
2322
2323   ;
2324   return 0;
2325 }
2326 _ACEOF
2327 if ac_fn_c_try_compile "$LINENO"; then :
2328   eval "$3=yes"
2329 else
2330   eval "$3=no"
2331 fi
2332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333 fi
2334 eval ac_res=\$$3
2335                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336 $as_echo "$ac_res" >&6; }
2337   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2338
2339 } # ac_fn_c_check_decl
2340
2341 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2342 # ----------------------------------------------------
2343 # Tries to find if the field MEMBER exists in type AGGR, after including
2344 # INCLUDES, setting cache variable VAR accordingly.
2345 ac_fn_c_check_member ()
2346 {
2347   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2348   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2349 $as_echo_n "checking for $2.$3... " >&6; }
2350 if eval \${$4+:} false; then :
2351   $as_echo_n "(cached) " >&6
2352 else
2353   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354 /* end confdefs.h.  */
2355 $5
2356 int
2357 main ()
2358 {
2359 static $2 ac_aggr;
2360 if (ac_aggr.$3)
2361 return 0;
2362   ;
2363   return 0;
2364 }
2365 _ACEOF
2366 if ac_fn_c_try_compile "$LINENO"; then :
2367   eval "$4=yes"
2368 else
2369   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2370 /* end confdefs.h.  */
2371 $5
2372 int
2373 main ()
2374 {
2375 static $2 ac_aggr;
2376 if (sizeof ac_aggr.$3)
2377 return 0;
2378   ;
2379   return 0;
2380 }
2381 _ACEOF
2382 if ac_fn_c_try_compile "$LINENO"; then :
2383   eval "$4=yes"
2384 else
2385   eval "$4=no"
2386 fi
2387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2388 fi
2389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2390 fi
2391 eval ac_res=\$$4
2392                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2393 $as_echo "$ac_res" >&6; }
2394   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2395
2396 } # ac_fn_c_check_member
2397 cat >config.log <<_ACEOF
2398 This file contains any messages produced by compilers while
2399 running configure, to aid debugging if configure makes a mistake.
2400
2401 It was created by unbound $as_me 1.6.1, which was
2402 generated by GNU Autoconf 2.69.  Invocation command line was
2403
2404   $ $0 $@
2405
2406 _ACEOF
2407 exec 5>>config.log
2408 {
2409 cat <<_ASUNAME
2410 ## --------- ##
2411 ## Platform. ##
2412 ## --------- ##
2413
2414 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2415 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2416 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2417 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2418 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2419
2420 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2421 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2422
2423 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2424 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2425 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2426 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2427 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2428 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2429 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2430
2431 _ASUNAME
2432
2433 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2434 for as_dir in $PATH
2435 do
2436   IFS=$as_save_IFS
2437   test -z "$as_dir" && as_dir=.
2438     $as_echo "PATH: $as_dir"
2439   done
2440 IFS=$as_save_IFS
2441
2442 } >&5
2443
2444 cat >&5 <<_ACEOF
2445
2446
2447 ## ----------- ##
2448 ## Core tests. ##
2449 ## ----------- ##
2450
2451 _ACEOF
2452
2453
2454 # Keep a trace of the command line.
2455 # Strip out --no-create and --no-recursion so they do not pile up.
2456 # Strip out --silent because we don't want to record it for future runs.
2457 # Also quote any args containing shell meta-characters.
2458 # Make two passes to allow for proper duplicate-argument suppression.
2459 ac_configure_args=
2460 ac_configure_args0=
2461 ac_configure_args1=
2462 ac_must_keep_next=false
2463 for ac_pass in 1 2
2464 do
2465   for ac_arg
2466   do
2467     case $ac_arg in
2468     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2469     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2470     | -silent | --silent | --silen | --sile | --sil)
2471       continue ;;
2472     *\'*)
2473       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2474     esac
2475     case $ac_pass in
2476     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2477     2)
2478       as_fn_append ac_configure_args1 " '$ac_arg'"
2479       if test $ac_must_keep_next = true; then
2480         ac_must_keep_next=false # Got value, back to normal.
2481       else
2482         case $ac_arg in
2483           *=* | --config-cache | -C | -disable-* | --disable-* \
2484           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2485           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2486           | -with-* | --with-* | -without-* | --without-* | --x)
2487             case "$ac_configure_args0 " in
2488               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2489             esac
2490             ;;
2491           -* ) ac_must_keep_next=true ;;
2492         esac
2493       fi
2494       as_fn_append ac_configure_args " '$ac_arg'"
2495       ;;
2496     esac
2497   done
2498 done
2499 { ac_configure_args0=; unset ac_configure_args0;}
2500 { ac_configure_args1=; unset ac_configure_args1;}
2501
2502 # When interrupted or exit'd, cleanup temporary files, and complete
2503 # config.log.  We remove comments because anyway the quotes in there
2504 # would cause problems or look ugly.
2505 # WARNING: Use '\'' to represent an apostrophe within the trap.
2506 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2507 trap 'exit_status=$?
2508   # Save into config.log some information that might help in debugging.
2509   {
2510     echo
2511
2512     $as_echo "## ---------------- ##
2513 ## Cache variables. ##
2514 ## ---------------- ##"
2515     echo
2516     # The following way of writing the cache mishandles newlines in values,
2517 (
2518   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2519     eval ac_val=\$$ac_var
2520     case $ac_val in #(
2521     *${as_nl}*)
2522       case $ac_var in #(
2523       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2524 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2525       esac
2526       case $ac_var in #(
2527       _ | IFS | as_nl) ;; #(
2528       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2529       *) { eval $ac_var=; unset $ac_var;} ;;
2530       esac ;;
2531     esac
2532   done
2533   (set) 2>&1 |
2534     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2535     *${as_nl}ac_space=\ *)
2536       sed -n \
2537         "s/'\''/'\''\\\\'\'''\''/g;
2538           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2539       ;; #(
2540     *)
2541       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2542       ;;
2543     esac |
2544     sort
2545 )
2546     echo
2547
2548     $as_echo "## ----------------- ##
2549 ## Output variables. ##
2550 ## ----------------- ##"
2551     echo
2552     for ac_var in $ac_subst_vars
2553     do
2554       eval ac_val=\$$ac_var
2555       case $ac_val in
2556       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2557       esac
2558       $as_echo "$ac_var='\''$ac_val'\''"
2559     done | sort
2560     echo
2561
2562     if test -n "$ac_subst_files"; then
2563       $as_echo "## ------------------- ##
2564 ## File substitutions. ##
2565 ## ------------------- ##"
2566       echo
2567       for ac_var in $ac_subst_files
2568       do
2569         eval ac_val=\$$ac_var
2570         case $ac_val in
2571         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2572         esac
2573         $as_echo "$ac_var='\''$ac_val'\''"
2574       done | sort
2575       echo
2576     fi
2577
2578     if test -s confdefs.h; then
2579       $as_echo "## ----------- ##
2580 ## confdefs.h. ##
2581 ## ----------- ##"
2582       echo
2583       cat confdefs.h
2584       echo
2585     fi
2586     test "$ac_signal" != 0 &&
2587       $as_echo "$as_me: caught signal $ac_signal"
2588     $as_echo "$as_me: exit $exit_status"
2589   } >&5
2590   rm -f core *.core core.conftest.* &&
2591     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2592     exit $exit_status
2593 ' 0
2594 for ac_signal in 1 2 13 15; do
2595   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2596 done
2597 ac_signal=0
2598
2599 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2600 rm -f -r conftest* confdefs.h
2601
2602 $as_echo "/* confdefs.h */" > confdefs.h
2603
2604 # Predefined preprocessor variables.
2605
2606 cat >>confdefs.h <<_ACEOF
2607 #define PACKAGE_NAME "$PACKAGE_NAME"
2608 _ACEOF
2609
2610 cat >>confdefs.h <<_ACEOF
2611 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2612 _ACEOF
2613
2614 cat >>confdefs.h <<_ACEOF
2615 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2616 _ACEOF
2617
2618 cat >>confdefs.h <<_ACEOF
2619 #define PACKAGE_STRING "$PACKAGE_STRING"
2620 _ACEOF
2621
2622 cat >>confdefs.h <<_ACEOF
2623 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2624 _ACEOF
2625
2626 cat >>confdefs.h <<_ACEOF
2627 #define PACKAGE_URL "$PACKAGE_URL"
2628 _ACEOF
2629
2630
2631 # Let the site file select an alternate cache file if it wants to.
2632 # Prefer an explicitly selected file to automatically selected ones.
2633 ac_site_file1=NONE
2634 ac_site_file2=NONE
2635 if test -n "$CONFIG_SITE"; then
2636   # We do not want a PATH search for config.site.
2637   case $CONFIG_SITE in #((
2638     -*)  ac_site_file1=./$CONFIG_SITE;;
2639     */*) ac_site_file1=$CONFIG_SITE;;
2640     *)   ac_site_file1=./$CONFIG_SITE;;
2641   esac
2642 elif test "x$prefix" != xNONE; then
2643   ac_site_file1=$prefix/share/config.site
2644   ac_site_file2=$prefix/etc/config.site
2645 else
2646   ac_site_file1=$ac_default_prefix/share/config.site
2647   ac_site_file2=$ac_default_prefix/etc/config.site
2648 fi
2649 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2650 do
2651   test "x$ac_site_file" = xNONE && continue
2652   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2653     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2654 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2655     sed 's/^/| /' "$ac_site_file" >&5
2656     . "$ac_site_file" \
2657       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2658 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2659 as_fn_error $? "failed to load site script $ac_site_file
2660 See \`config.log' for more details" "$LINENO" 5; }
2661   fi
2662 done
2663
2664 if test -r "$cache_file"; then
2665   # Some versions of bash will fail to source /dev/null (special files
2666   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2667   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2668     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2669 $as_echo "$as_me: loading cache $cache_file" >&6;}
2670     case $cache_file in
2671       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2672       *)                      . "./$cache_file";;
2673     esac
2674   fi
2675 else
2676   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2677 $as_echo "$as_me: creating cache $cache_file" >&6;}
2678   >$cache_file
2679 fi
2680
2681 # Check that the precious variables saved in the cache have kept the same
2682 # value.
2683 ac_cache_corrupted=false
2684 for ac_var in $ac_precious_vars; do
2685   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2686   eval ac_new_set=\$ac_env_${ac_var}_set
2687   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2688   eval ac_new_val=\$ac_env_${ac_var}_value
2689   case $ac_old_set,$ac_new_set in
2690     set,)
2691       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2692 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2693       ac_cache_corrupted=: ;;
2694     ,set)
2695       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2696 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2697       ac_cache_corrupted=: ;;
2698     ,);;
2699     *)
2700       if test "x$ac_old_val" != "x$ac_new_val"; then
2701         # differences in whitespace do not lead to failure.
2702         ac_old_val_w=`echo x $ac_old_val`
2703         ac_new_val_w=`echo x $ac_new_val`
2704         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2705           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2706 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2707           ac_cache_corrupted=:
2708         else
2709           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2710 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2711           eval $ac_var=\$ac_old_val
2712         fi
2713         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2714 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2715         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2716 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2717       fi;;
2718   esac
2719   # Pass precious variables to config.status.
2720   if test "$ac_new_set" = set; then
2721     case $ac_new_val in
2722     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2723     *) ac_arg=$ac_var=$ac_new_val ;;
2724     esac
2725     case " $ac_configure_args " in
2726       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2727       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2728     esac
2729   fi
2730 done
2731 if $ac_cache_corrupted; then
2732   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2733 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2734   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2735 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2736   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2737 fi
2738 ## -------------------- ##
2739 ## Main body of script. ##
2740 ## -------------------- ##
2741
2742 ac_ext=c
2743 ac_cpp='$CPP $CPPFLAGS'
2744 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2745 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2746 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2747
2748
2749 UNBOUND_VERSION_MAJOR=1
2750
2751 UNBOUND_VERSION_MINOR=6
2752
2753 UNBOUND_VERSION_MICRO=1
2754
2755
2756 LIBUNBOUND_CURRENT=6
2757 LIBUNBOUND_REVISION=4
2758 LIBUNBOUND_AGE=4
2759 # 1.0.0 had 0:12:0
2760 # 1.0.1 had 0:13:0
2761 # 1.0.2 had 0:14:0
2762 # 1.1.0 had 0:15:0
2763 # 1.1.1 had 0:16:0
2764 # 1.2.0 had 0:17:0
2765 # 1.2.1 had 0:18:0
2766 # 1.3.0 had 1:0:0   # ub_cancel and -export-symbols.
2767 # 1.3.1 had 1:1:0
2768 # 1.3.2 had 1:2:0
2769 # 1.3.3 had 1:3:0
2770 # 1.3.4 had 1:4:0
2771 # 1.4.0-snapshots had 1:5:0
2772 # 1.4.0 had 1:5:0 (not 2:0:0)   # ub_result.why_bogus
2773 # 1.4.1 had 2:1:0
2774 # 1.4.2 had 2:2:0
2775 # 1.4.3 had 2:3:0
2776 # 1.4.4 had 2:4:0
2777 # 1.4.5 had 2:5:0
2778 # 1.4.6 had 2:6:0
2779 # 1.4.7 had 2:7:0
2780 # 1.4.8 had 2:8:0
2781 # 1.4.9 had 2:9:0
2782 # 1.4.10 had 2:10:0
2783 # 1.4.11 had 2:11:0
2784 # 1.4.12 had 2:12:0
2785 # 1.4.13 had 2:13:0
2786 # and 1.4.13p1 and 1.4.13.p2
2787 # 1.4.14 had 2:14:0
2788 # 1.4.15 had 3:0:1 # adds ub_version()
2789 # 1.4.16 had 3:1:1
2790 # 1.4.17 had 3:2:1
2791 # 1.4.18 had 3:3:1
2792 # 1.4.19 had 3:4:1
2793 # 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
2794 # 1.4.21 had 4:1:2
2795 # 1.4.22 had 4:1:2
2796 # 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr
2797 # 1.5.1 had 5:3:3
2798 # 1.5.2 had 5:5:3
2799 # 1.5.3 had 5:6:3
2800 # 1.5.4 had 5:7:3
2801 # 1.5.5 had 5:8:3
2802 # 1.5.6 had 5:9:3
2803 # 1.5.7 had 5:10:3
2804 # 1.5.8 had 6:0:4 # adds ub_ctx_set_stub
2805 # 1.5.9 had 6:1:4
2806 # 1.5.10 had 6:2:4
2807 # 1.6.0 had 6:3:4
2808 # 1.6.1 had 7:0:5 # ub_callback_t typedef renamed to ub_callback_type
2809
2810 #   Current  -- the number of the binary API that we're implementing
2811 #   Revision -- which iteration of the implementation of the binary
2812 #               API are we supplying?
2813 #   Age      -- How many previous binary API versions do we also
2814 #               support?
2815 #
2816 # If we release a new version that does not change the binary API,
2817 # increment Revision.
2818 #
2819 # If we release a new version that changes the binary API, but does
2820 # not break programs compiled against the old binary API, increment
2821 # Current and Age.  Set Revision to 0, since this is the first
2822 # implementation of the new API.
2823 #
2824 # Otherwise, we're changing the binary API and breaking bakward
2825 # compatibility with old binaries.  Increment Current.  Set Age to 0,
2826 # since we're backward compatible with no previous APIs.  Set Revision
2827 # to 0 too.
2828
2829
2830
2831
2832 CFLAGS="$CFLAGS"
2833 ac_ext=c
2834 ac_cpp='$CPP $CPPFLAGS'
2835 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2836 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2837 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2838 if test -n "$ac_tool_prefix"; then
2839   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2840 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2842 $as_echo_n "checking for $ac_word... " >&6; }
2843 if ${ac_cv_prog_CC+:} false; then :
2844   $as_echo_n "(cached) " >&6
2845 else
2846   if test -n "$CC"; then
2847   ac_cv_prog_CC="$CC" # Let the user override the test.
2848 else
2849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2850 for as_dir in $PATH
2851 do
2852   IFS=$as_save_IFS
2853   test -z "$as_dir" && as_dir=.
2854     for ac_exec_ext in '' $ac_executable_extensions; do
2855   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2856     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2857     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2858     break 2
2859   fi
2860 done
2861   done
2862 IFS=$as_save_IFS
2863
2864 fi
2865 fi
2866 CC=$ac_cv_prog_CC
2867 if test -n "$CC"; then
2868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2869 $as_echo "$CC" >&6; }
2870 else
2871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2872 $as_echo "no" >&6; }
2873 fi
2874
2875
2876 fi
2877 if test -z "$ac_cv_prog_CC"; then
2878   ac_ct_CC=$CC
2879   # Extract the first word of "gcc", so it can be a program name with args.
2880 set dummy gcc; ac_word=$2
2881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2882 $as_echo_n "checking for $ac_word... " >&6; }
2883 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2884   $as_echo_n "(cached) " >&6
2885 else
2886   if test -n "$ac_ct_CC"; then
2887   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2888 else
2889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2890 for as_dir in $PATH
2891 do
2892   IFS=$as_save_IFS
2893   test -z "$as_dir" && as_dir=.
2894     for ac_exec_ext in '' $ac_executable_extensions; do
2895   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2896     ac_cv_prog_ac_ct_CC="gcc"
2897     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2898     break 2
2899   fi
2900 done
2901   done
2902 IFS=$as_save_IFS
2903
2904 fi
2905 fi
2906 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2907 if test -n "$ac_ct_CC"; then
2908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2909 $as_echo "$ac_ct_CC" >&6; }
2910 else
2911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2912 $as_echo "no" >&6; }
2913 fi
2914
2915   if test "x$ac_ct_CC" = x; then
2916     CC=""
2917   else
2918     case $cross_compiling:$ac_tool_warned in
2919 yes:)
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2921 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2922 ac_tool_warned=yes ;;
2923 esac
2924     CC=$ac_ct_CC
2925   fi
2926 else
2927   CC="$ac_cv_prog_CC"
2928 fi
2929
2930 if test -z "$CC"; then
2931           if test -n "$ac_tool_prefix"; then
2932     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2933 set dummy ${ac_tool_prefix}cc; ac_word=$2
2934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2935 $as_echo_n "checking for $ac_word... " >&6; }
2936 if ${ac_cv_prog_CC+:} false; then :
2937   $as_echo_n "(cached) " >&6
2938 else
2939   if test -n "$CC"; then
2940   ac_cv_prog_CC="$CC" # Let the user override the test.
2941 else
2942 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2943 for as_dir in $PATH
2944 do
2945   IFS=$as_save_IFS
2946   test -z "$as_dir" && as_dir=.
2947     for ac_exec_ext in '' $ac_executable_extensions; do
2948   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2949     ac_cv_prog_CC="${ac_tool_prefix}cc"
2950     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2951     break 2
2952   fi
2953 done
2954   done
2955 IFS=$as_save_IFS
2956
2957 fi
2958 fi
2959 CC=$ac_cv_prog_CC
2960 if test -n "$CC"; then
2961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2962 $as_echo "$CC" >&6; }
2963 else
2964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2965 $as_echo "no" >&6; }
2966 fi
2967
2968
2969   fi
2970 fi
2971 if test -z "$CC"; then
2972   # Extract the first word of "cc", so it can be a program name with args.
2973 set dummy cc; ac_word=$2
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2975 $as_echo_n "checking for $ac_word... " >&6; }
2976 if ${ac_cv_prog_CC+:} false; then :
2977   $as_echo_n "(cached) " >&6
2978 else
2979   if test -n "$CC"; then
2980   ac_cv_prog_CC="$CC" # Let the user override the test.
2981 else
2982   ac_prog_rejected=no
2983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2984 for as_dir in $PATH
2985 do
2986   IFS=$as_save_IFS
2987   test -z "$as_dir" && as_dir=.
2988     for ac_exec_ext in '' $ac_executable_extensions; do
2989   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2990     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2991        ac_prog_rejected=yes
2992        continue
2993      fi
2994     ac_cv_prog_CC="cc"
2995     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2996     break 2
2997   fi
2998 done
2999   done
3000 IFS=$as_save_IFS
3001
3002 if test $ac_prog_rejected = yes; then
3003   # We found a bogon in the path, so make sure we never use it.
3004   set dummy $ac_cv_prog_CC
3005   shift
3006   if test $# != 0; then
3007     # We chose a different compiler from the bogus one.
3008     # However, it has the same basename, so the bogon will be chosen
3009     # first if we set CC to just the basename; use the full file name.
3010     shift
3011     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3012   fi
3013 fi
3014 fi
3015 fi
3016 CC=$ac_cv_prog_CC
3017 if test -n "$CC"; then
3018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3019 $as_echo "$CC" >&6; }
3020 else
3021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3022 $as_echo "no" >&6; }
3023 fi
3024
3025
3026 fi
3027 if test -z "$CC"; then
3028   if test -n "$ac_tool_prefix"; then
3029   for ac_prog in cl.exe
3030   do
3031     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3032 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3034 $as_echo_n "checking for $ac_word... " >&6; }
3035 if ${ac_cv_prog_CC+:} false; then :
3036   $as_echo_n "(cached) " >&6
3037 else
3038   if test -n "$CC"; then
3039   ac_cv_prog_CC="$CC" # Let the user override the test.
3040 else
3041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3042 for as_dir in $PATH
3043 do
3044   IFS=$as_save_IFS
3045   test -z "$as_dir" && as_dir=.
3046     for ac_exec_ext in '' $ac_executable_extensions; do
3047   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3048     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3049     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3050     break 2
3051   fi
3052 done
3053   done
3054 IFS=$as_save_IFS
3055
3056 fi
3057 fi
3058 CC=$ac_cv_prog_CC
3059 if test -n "$CC"; then
3060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3061 $as_echo "$CC" >&6; }
3062 else
3063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3064 $as_echo "no" >&6; }
3065 fi
3066
3067
3068     test -n "$CC" && break
3069   done
3070 fi
3071 if test -z "$CC"; then
3072   ac_ct_CC=$CC
3073   for ac_prog in cl.exe
3074 do
3075   # Extract the first word of "$ac_prog", so it can be a program name with args.
3076 set dummy $ac_prog; ac_word=$2
3077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3078 $as_echo_n "checking for $ac_word... " >&6; }
3079 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3080   $as_echo_n "(cached) " >&6
3081 else
3082   if test -n "$ac_ct_CC"; then
3083   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3084 else
3085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3086 for as_dir in $PATH
3087 do
3088   IFS=$as_save_IFS
3089   test -z "$as_dir" && as_dir=.
3090     for ac_exec_ext in '' $ac_executable_extensions; do
3091   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3092     ac_cv_prog_ac_ct_CC="$ac_prog"
3093     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3094     break 2
3095   fi
3096 done
3097   done
3098 IFS=$as_save_IFS
3099
3100 fi
3101 fi
3102 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3103 if test -n "$ac_ct_CC"; then
3104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3105 $as_echo "$ac_ct_CC" >&6; }
3106 else
3107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3108 $as_echo "no" >&6; }
3109 fi
3110
3111
3112   test -n "$ac_ct_CC" && break
3113 done
3114
3115   if test "x$ac_ct_CC" = x; then
3116     CC=""
3117   else
3118     case $cross_compiling:$ac_tool_warned in
3119 yes:)
3120 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3121 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3122 ac_tool_warned=yes ;;
3123 esac
3124     CC=$ac_ct_CC
3125   fi
3126 fi
3127
3128 fi
3129
3130
3131 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3132 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3133 as_fn_error $? "no acceptable C compiler found in \$PATH
3134 See \`config.log' for more details" "$LINENO" 5; }
3135
3136 # Provide some information about the compiler.
3137 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3138 set X $ac_compile
3139 ac_compiler=$2
3140 for ac_option in --version -v -V -qversion; do
3141   { { ac_try="$ac_compiler $ac_option >&5"
3142 case "(($ac_try" in
3143   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3144   *) ac_try_echo=$ac_try;;
3145 esac
3146 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3147 $as_echo "$ac_try_echo"; } >&5
3148   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3149   ac_status=$?
3150   if test -s conftest.err; then
3151     sed '10a\
3152 ... rest of stderr output deleted ...
3153          10q' conftest.err >conftest.er1
3154     cat conftest.er1 >&5
3155   fi
3156   rm -f conftest.er1 conftest.err
3157   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3158   test $ac_status = 0; }
3159 done
3160
3161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3162 /* end confdefs.h.  */
3163
3164 int
3165 main ()
3166 {
3167
3168   ;
3169   return 0;
3170 }
3171 _ACEOF
3172 ac_clean_files_save=$ac_clean_files
3173 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3174 # Try to create an executable without -o first, disregard a.out.
3175 # It will help us diagnose broken compilers, and finding out an intuition
3176 # of exeext.
3177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3178 $as_echo_n "checking whether the C compiler works... " >&6; }
3179 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3180
3181 # The possible output files:
3182 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3183
3184 ac_rmfiles=
3185 for ac_file in $ac_files
3186 do
3187   case $ac_file in
3188     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3189     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3190   esac
3191 done
3192 rm -f $ac_rmfiles
3193
3194 if { { ac_try="$ac_link_default"
3195 case "(($ac_try" in
3196   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3197   *) ac_try_echo=$ac_try;;
3198 esac
3199 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3200 $as_echo "$ac_try_echo"; } >&5
3201   (eval "$ac_link_default") 2>&5
3202   ac_status=$?
3203   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3204   test $ac_status = 0; }; then :
3205   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3206 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3207 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3208 # so that the user can short-circuit this test for compilers unknown to
3209 # Autoconf.
3210 for ac_file in $ac_files ''
3211 do
3212   test -f "$ac_file" || continue
3213   case $ac_file in
3214     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3215         ;;
3216     [ab].out )
3217         # We found the default executable, but exeext='' is most
3218         # certainly right.
3219         break;;
3220     *.* )
3221         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3222         then :; else
3223            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3224         fi
3225         # We set ac_cv_exeext here because the later test for it is not
3226         # safe: cross compilers may not add the suffix if given an `-o'
3227         # argument, so we may need to know it at that point already.
3228         # Even if this section looks crufty: it has the advantage of
3229         # actually working.
3230         break;;
3231     * )
3232         break;;
3233   esac
3234 done
3235 test "$ac_cv_exeext" = no && ac_cv_exeext=
3236
3237 else
3238   ac_file=''
3239 fi
3240 if test -z "$ac_file"; then :
3241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3242 $as_echo "no" >&6; }
3243 $as_echo "$as_me: failed program was:" >&5
3244 sed 's/^/| /' conftest.$ac_ext >&5
3245
3246 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3247 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3248 as_fn_error 77 "C compiler cannot create executables
3249 See \`config.log' for more details" "$LINENO" 5; }
3250 else
3251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3252 $as_echo "yes" >&6; }
3253 fi
3254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3255 $as_echo_n "checking for C compiler default output file name... " >&6; }
3256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3257 $as_echo "$ac_file" >&6; }
3258 ac_exeext=$ac_cv_exeext
3259
3260 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3261 ac_clean_files=$ac_clean_files_save
3262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3263 $as_echo_n "checking for suffix of executables... " >&6; }
3264 if { { ac_try="$ac_link"
3265 case "(($ac_try" in
3266   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3267   *) ac_try_echo=$ac_try;;
3268 esac
3269 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3270 $as_echo "$ac_try_echo"; } >&5
3271   (eval "$ac_link") 2>&5
3272   ac_status=$?
3273   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3274   test $ac_status = 0; }; then :
3275   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3276 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3277 # work properly (i.e., refer to `conftest.exe'), while it won't with
3278 # `rm'.
3279 for ac_file in conftest.exe conftest conftest.*; do
3280   test -f "$ac_file" || continue
3281   case $ac_file in
3282     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3283     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3284           break;;
3285     * ) break;;
3286   esac
3287 done
3288 else
3289   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3290 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3291 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3292 See \`config.log' for more details" "$LINENO" 5; }
3293 fi
3294 rm -f conftest conftest$ac_cv_exeext
3295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3296 $as_echo "$ac_cv_exeext" >&6; }
3297
3298 rm -f conftest.$ac_ext
3299 EXEEXT=$ac_cv_exeext
3300 ac_exeext=$EXEEXT
3301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3302 /* end confdefs.h.  */
3303 #include <stdio.h>
3304 int
3305 main ()
3306 {
3307 FILE *f = fopen ("conftest.out", "w");
3308  return ferror (f) || fclose (f) != 0;
3309
3310   ;
3311   return 0;
3312 }
3313 _ACEOF
3314 ac_clean_files="$ac_clean_files conftest.out"
3315 # Check that the compiler produces executables we can run.  If not, either
3316 # the compiler is broken, or we cross compile.
3317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3318 $as_echo_n "checking whether we are cross compiling... " >&6; }
3319 if test "$cross_compiling" != yes; then
3320   { { ac_try="$ac_link"
3321 case "(($ac_try" in
3322   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3323   *) ac_try_echo=$ac_try;;
3324 esac
3325 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3326 $as_echo "$ac_try_echo"; } >&5
3327   (eval "$ac_link") 2>&5
3328   ac_status=$?
3329   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3330   test $ac_status = 0; }
3331   if { ac_try='./conftest$ac_cv_exeext'
3332   { { case "(($ac_try" in
3333   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3334   *) ac_try_echo=$ac_try;;
3335 esac
3336 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3337 $as_echo "$ac_try_echo"; } >&5
3338   (eval "$ac_try") 2>&5
3339   ac_status=$?
3340   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3341   test $ac_status = 0; }; }; then
3342     cross_compiling=no
3343   else
3344     if test "$cross_compiling" = maybe; then
3345         cross_compiling=yes
3346     else
3347         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3348 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3349 as_fn_error $? "cannot run C compiled programs.
3350 If you meant to cross compile, use \`--host'.
3351 See \`config.log' for more details" "$LINENO" 5; }
3352     fi
3353   fi
3354 fi
3355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3356 $as_echo "$cross_compiling" >&6; }
3357
3358 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3359 ac_clean_files=$ac_clean_files_save
3360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3361 $as_echo_n "checking for suffix of object files... " >&6; }
3362 if ${ac_cv_objext+:} false; then :
3363   $as_echo_n "(cached) " >&6
3364 else
3365   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3366 /* end confdefs.h.  */
3367
3368 int
3369 main ()
3370 {
3371
3372   ;
3373   return 0;
3374 }
3375 _ACEOF
3376 rm -f conftest.o conftest.obj
3377 if { { ac_try="$ac_compile"
3378 case "(($ac_try" in
3379   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3380   *) ac_try_echo=$ac_try;;
3381 esac
3382 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3383 $as_echo "$ac_try_echo"; } >&5
3384   (eval "$ac_compile") 2>&5
3385   ac_status=$?
3386   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3387   test $ac_status = 0; }; then :
3388   for ac_file in conftest.o conftest.obj conftest.*; do
3389   test -f "$ac_file" || continue;
3390   case $ac_file in
3391     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3392     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3393        break;;
3394   esac
3395 done
3396 else
3397   $as_echo "$as_me: failed program was:" >&5
3398 sed 's/^/| /' conftest.$ac_ext >&5
3399
3400 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3401 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3402 as_fn_error $? "cannot compute suffix of object files: cannot compile
3403 See \`config.log' for more details" "$LINENO" 5; }
3404 fi
3405 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3406 fi
3407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3408 $as_echo "$ac_cv_objext" >&6; }
3409 OBJEXT=$ac_cv_objext
3410 ac_objext=$OBJEXT
3411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3412 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3413 if ${ac_cv_c_compiler_gnu+:} false; then :
3414   $as_echo_n "(cached) " >&6
3415 else
3416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3417 /* end confdefs.h.  */
3418
3419 int
3420 main ()
3421 {
3422 #ifndef __GNUC__
3423        choke me
3424 #endif
3425
3426   ;
3427   return 0;
3428 }
3429 _ACEOF
3430 if ac_fn_c_try_compile "$LINENO"; then :
3431   ac_compiler_gnu=yes
3432 else
3433   ac_compiler_gnu=no
3434 fi
3435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3436 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3437
3438 fi
3439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3440 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3441 if test $ac_compiler_gnu = yes; then
3442   GCC=yes
3443 else
3444   GCC=
3445 fi
3446 ac_test_CFLAGS=${CFLAGS+set}
3447 ac_save_CFLAGS=$CFLAGS
3448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3449 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3450 if ${ac_cv_prog_cc_g+:} false; then :
3451   $as_echo_n "(cached) " >&6
3452 else
3453   ac_save_c_werror_flag=$ac_c_werror_flag
3454    ac_c_werror_flag=yes
3455    ac_cv_prog_cc_g=no
3456    CFLAGS="-g"
3457    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3458 /* end confdefs.h.  */
3459
3460 int
3461 main ()
3462 {
3463
3464   ;
3465   return 0;
3466 }
3467 _ACEOF
3468 if ac_fn_c_try_compile "$LINENO"; then :
3469   ac_cv_prog_cc_g=yes
3470 else
3471   CFLAGS=""
3472       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3473 /* end confdefs.h.  */
3474
3475 int
3476 main ()
3477 {
3478
3479   ;
3480   return 0;
3481 }
3482 _ACEOF
3483 if ac_fn_c_try_compile "$LINENO"; then :
3484
3485 else
3486   ac_c_werror_flag=$ac_save_c_werror_flag
3487          CFLAGS="-g"
3488          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3489 /* end confdefs.h.  */
3490
3491 int
3492 main ()
3493 {
3494
3495   ;
3496   return 0;
3497 }
3498 _ACEOF
3499 if ac_fn_c_try_compile "$LINENO"; then :
3500   ac_cv_prog_cc_g=yes
3501 fi
3502 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3503 fi
3504 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3505 fi
3506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3507    ac_c_werror_flag=$ac_save_c_werror_flag
3508 fi
3509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3510 $as_echo "$ac_cv_prog_cc_g" >&6; }
3511 if test "$ac_test_CFLAGS" = set; then
3512   CFLAGS=$ac_save_CFLAGS
3513 elif test $ac_cv_prog_cc_g = yes; then
3514   if test "$GCC" = yes; then
3515     CFLAGS="-g -O2"
3516   else
3517     CFLAGS="-g"
3518   fi
3519 else
3520   if test "$GCC" = yes; then
3521     CFLAGS="-O2"
3522   else
3523     CFLAGS=
3524   fi
3525 fi
3526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3527 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3528 if ${ac_cv_prog_cc_c89+:} false; then :
3529   $as_echo_n "(cached) " >&6
3530 else
3531   ac_cv_prog_cc_c89=no
3532 ac_save_CC=$CC
3533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3534 /* end confdefs.h.  */
3535 #include <stdarg.h>
3536 #include <stdio.h>
3537 struct stat;
3538 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3539 struct buf { int x; };
3540 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3541 static char *e (p, i)
3542      char **p;
3543      int i;
3544 {
3545   return p[i];
3546 }
3547 static char *f (char * (*g) (char **, int), char **p, ...)
3548 {
3549   char *s;
3550   va_list v;
3551   va_start (v,p);
3552   s = g (p, va_arg (v,int));
3553   va_end (v);
3554   return s;
3555 }
3556
3557 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3558    function prototypes and stuff, but not '\xHH' hex character constants.
3559    These don't provoke an error unfortunately, instead are silently treated
3560    as 'x'.  The following induces an error, until -std is added to get
3561    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3562    array size at least.  It's necessary to write '\x00'==0 to get something
3563    that's true only with -std.  */
3564 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3565
3566 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3567    inside strings and character constants.  */
3568 #define FOO(x) 'x'
3569 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3570
3571 int test (int i, double x);
3572 struct s1 {int (*f) (int a);};
3573 struct s2 {int (*f) (double a);};
3574 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3575 int argc;
3576 char **argv;
3577 int
3578 main ()
3579 {
3580 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3581   ;
3582   return 0;
3583 }
3584 _ACEOF
3585 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3586         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3587 do
3588   CC="$ac_save_CC $ac_arg"
3589   if ac_fn_c_try_compile "$LINENO"; then :
3590   ac_cv_prog_cc_c89=$ac_arg
3591 fi
3592 rm -f core conftest.err conftest.$ac_objext
3593   test "x$ac_cv_prog_cc_c89" != "xno" && break
3594 done
3595 rm -f conftest.$ac_ext
3596 CC=$ac_save_CC
3597
3598 fi
3599 # AC_CACHE_VAL
3600 case "x$ac_cv_prog_cc_c89" in
3601   x)
3602     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3603 $as_echo "none needed" >&6; } ;;
3604   xno)
3605     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3606 $as_echo "unsupported" >&6; } ;;
3607   *)
3608     CC="$CC $ac_cv_prog_cc_c89"
3609     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3610 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3611 esac
3612 if test "x$ac_cv_prog_cc_c89" != xno; then :
3613
3614 fi
3615
3616 ac_ext=c
3617 ac_cpp='$CPP $CPPFLAGS'
3618 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3619 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3620 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3621
3622
3623 ac_ext=c
3624 ac_cpp='$CPP $CPPFLAGS'
3625 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3626 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3627 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3629 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3630 # On Suns, sometimes $CPP names a directory.
3631 if test -n "$CPP" && test -d "$CPP"; then
3632   CPP=
3633 fi
3634 if test -z "$CPP"; then
3635   if ${ac_cv_prog_CPP+:} false; then :
3636   $as_echo_n "(cached) " >&6
3637 else
3638       # Double quotes because CPP needs to be expanded
3639     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3640     do
3641       ac_preproc_ok=false
3642 for ac_c_preproc_warn_flag in '' yes
3643 do
3644   # Use a header file that comes with gcc, so configuring glibc
3645   # with a fresh cross-compiler works.
3646   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3647   # <limits.h> exists even on freestanding compilers.
3648   # On the NeXT, cc -E runs the code through the compiler's parser,
3649   # not just through cpp. "Syntax error" is here to catch this case.
3650   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3651 /* end confdefs.h.  */
3652 #ifdef __STDC__
3653 # include <limits.h>
3654 #else
3655 # include <assert.h>
3656 #endif
3657                      Syntax error
3658 _ACEOF
3659 if ac_fn_c_try_cpp "$LINENO"; then :
3660
3661 else
3662   # Broken: fails on valid input.
3663 continue
3664 fi
3665 rm -f conftest.err conftest.i conftest.$ac_ext
3666
3667   # OK, works on sane cases.  Now check whether nonexistent headers
3668   # can be detected and how.
3669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3670 /* end confdefs.h.  */
3671 #include <ac_nonexistent.h>
3672 _ACEOF
3673 if ac_fn_c_try_cpp "$LINENO"; then :
3674   # Broken: success on invalid input.
3675 continue
3676 else
3677   # Passes both tests.
3678 ac_preproc_ok=:
3679 break
3680 fi
3681 rm -f conftest.err conftest.i conftest.$ac_ext
3682
3683 done
3684 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3685 rm -f conftest.i conftest.err conftest.$ac_ext
3686 if $ac_preproc_ok; then :
3687   break
3688 fi
3689
3690     done
3691     ac_cv_prog_CPP=$CPP
3692
3693 fi
3694   CPP=$ac_cv_prog_CPP
3695 else
3696   ac_cv_prog_CPP=$CPP
3697 fi
3698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3699 $as_echo "$CPP" >&6; }
3700 ac_preproc_ok=false
3701 for ac_c_preproc_warn_flag in '' yes
3702 do
3703   # Use a header file that comes with gcc, so configuring glibc
3704   # with a fresh cross-compiler works.
3705   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3706   # <limits.h> exists even on freestanding compilers.
3707   # On the NeXT, cc -E runs the code through the compiler's parser,
3708   # not just through cpp. "Syntax error" is here to catch this case.
3709   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3710 /* end confdefs.h.  */
3711 #ifdef __STDC__
3712 # include <limits.h>
3713 #else
3714 # include <assert.h>
3715 #endif
3716                      Syntax error
3717 _ACEOF
3718 if ac_fn_c_try_cpp "$LINENO"; then :
3719
3720 else
3721   # Broken: fails on valid input.
3722 continue
3723 fi
3724 rm -f conftest.err conftest.i conftest.$ac_ext
3725
3726   # OK, works on sane cases.  Now check whether nonexistent headers
3727   # can be detected and how.
3728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3729 /* end confdefs.h.  */
3730 #include <ac_nonexistent.h>
3731 _ACEOF
3732 if ac_fn_c_try_cpp "$LINENO"; then :
3733   # Broken: success on invalid input.
3734 continue
3735 else
3736   # Passes both tests.
3737 ac_preproc_ok=:
3738 break
3739 fi
3740 rm -f conftest.err conftest.i conftest.$ac_ext
3741
3742 done
3743 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3744 rm -f conftest.i conftest.err conftest.$ac_ext
3745 if $ac_preproc_ok; then :
3746
3747 else
3748   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3749 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3750 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3751 See \`config.log' for more details" "$LINENO" 5; }
3752 fi
3753
3754 ac_ext=c
3755 ac_cpp='$CPP $CPPFLAGS'
3756 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3757 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3758 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3759
3760
3761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3762 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3763 if ${ac_cv_path_GREP+:} false; then :
3764   $as_echo_n "(cached) " >&6
3765 else
3766   if test -z "$GREP"; then
3767   ac_path_GREP_found=false
3768   # Loop through the user's path and test for each of PROGNAME-LIST
3769   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3770 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3771 do
3772   IFS=$as_save_IFS
3773   test -z "$as_dir" && as_dir=.
3774     for ac_prog in grep ggrep; do
3775     for ac_exec_ext in '' $ac_executable_extensions; do
3776       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3777       as_fn_executable_p "$ac_path_GREP" || continue
3778 # Check for GNU ac_path_GREP and select it if it is found.
3779   # Check for GNU $ac_path_GREP
3780 case `"$ac_path_GREP" --version 2>&1` in
3781 *GNU*)
3782   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3783 *)
3784   ac_count=0
3785   $as_echo_n 0123456789 >"conftest.in"
3786   while :
3787   do
3788     cat "conftest.in" "conftest.in" >"conftest.tmp"
3789     mv "conftest.tmp" "conftest.in"
3790     cp "conftest.in" "conftest.nl"
3791     $as_echo 'GREP' >> "conftest.nl"
3792     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3793     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3794     as_fn_arith $ac_count + 1 && ac_count=$as_val
3795     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3796       # Best one so far, save it but keep looking for a better one
3797       ac_cv_path_GREP="$ac_path_GREP"
3798       ac_path_GREP_max=$ac_count
3799     fi
3800     # 10*(2^10) chars as input seems more than enough
3801     test $ac_count -gt 10 && break
3802   done
3803   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3804 esac
3805
3806       $ac_path_GREP_found && break 3
3807     done
3808   done
3809   done
3810 IFS=$as_save_IFS
3811   if test -z "$ac_cv_path_GREP"; then
3812     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3813   fi
3814 else
3815   ac_cv_path_GREP=$GREP
3816 fi
3817
3818 fi
3819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3820 $as_echo "$ac_cv_path_GREP" >&6; }
3821  GREP="$ac_cv_path_GREP"
3822
3823
3824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3825 $as_echo_n "checking for egrep... " >&6; }
3826 if ${ac_cv_path_EGREP+:} false; then :
3827   $as_echo_n "(cached) " >&6
3828 else
3829   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3830    then ac_cv_path_EGREP="$GREP -E"
3831    else
3832      if test -z "$EGREP"; then
3833   ac_path_EGREP_found=false
3834   # Loop through the user's path and test for each of PROGNAME-LIST
3835   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3836 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3837 do
3838   IFS=$as_save_IFS
3839   test -z "$as_dir" && as_dir=.
3840     for ac_prog in egrep; do
3841     for ac_exec_ext in '' $ac_executable_extensions; do
3842       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3843       as_fn_executable_p "$ac_path_EGREP" || continue
3844 # Check for GNU ac_path_EGREP and select it if it is found.
3845   # Check for GNU $ac_path_EGREP
3846 case `"$ac_path_EGREP" --version 2>&1` in
3847 *GNU*)
3848   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3849 *)
3850   ac_count=0
3851   $as_echo_n 0123456789 >"conftest.in"
3852   while :
3853   do
3854     cat "conftest.in" "conftest.in" >"conftest.tmp"
3855     mv "conftest.tmp" "conftest.in"
3856     cp "conftest.in" "conftest.nl"
3857     $as_echo 'EGREP' >> "conftest.nl"
3858     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3859     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3860     as_fn_arith $ac_count + 1 && ac_count=$as_val
3861     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3862       # Best one so far, save it but keep looking for a better one
3863       ac_cv_path_EGREP="$ac_path_EGREP"
3864       ac_path_EGREP_max=$ac_count
3865     fi
3866     # 10*(2^10) chars as input seems more than enough
3867     test $ac_count -gt 10 && break
3868   done
3869   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3870 esac
3871
3872       $ac_path_EGREP_found && break 3
3873     done
3874   done
3875   done
3876 IFS=$as_save_IFS
3877   if test -z "$ac_cv_path_EGREP"; then
3878     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3879   fi
3880 else
3881   ac_cv_path_EGREP=$EGREP
3882 fi
3883
3884    fi
3885 fi
3886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3887 $as_echo "$ac_cv_path_EGREP" >&6; }
3888  EGREP="$ac_cv_path_EGREP"
3889
3890
3891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3892 $as_echo_n "checking for ANSI C header files... " >&6; }
3893 if ${ac_cv_header_stdc+:} false; then :
3894   $as_echo_n "(cached) " >&6
3895 else
3896   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3897 /* end confdefs.h.  */
3898 #include <stdlib.h>
3899 #include <stdarg.h>
3900 #include <string.h>
3901 #include <float.h>
3902
3903 int
3904 main ()
3905 {
3906
3907   ;
3908   return 0;
3909 }
3910 _ACEOF
3911 if ac_fn_c_try_compile "$LINENO"; then :
3912   ac_cv_header_stdc=yes
3913 else
3914   ac_cv_header_stdc=no
3915 fi
3916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3917
3918 if test $ac_cv_header_stdc = yes; then
3919   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3920   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3921 /* end confdefs.h.  */
3922 #include <string.h>
3923
3924 _ACEOF
3925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3926   $EGREP "memchr" >/dev/null 2>&1; then :
3927
3928 else
3929   ac_cv_header_stdc=no
3930 fi
3931 rm -f conftest*
3932
3933 fi
3934
3935 if test $ac_cv_header_stdc = yes; then
3936   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3938 /* end confdefs.h.  */
3939 #include <stdlib.h>
3940
3941 _ACEOF
3942 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3943   $EGREP "free" >/dev/null 2>&1; then :
3944
3945 else
3946   ac_cv_header_stdc=no
3947 fi
3948 rm -f conftest*
3949
3950 fi
3951
3952 if test $ac_cv_header_stdc = yes; then
3953   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3954   if test "$cross_compiling" = yes; then :
3955   :
3956 else
3957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3958 /* end confdefs.h.  */
3959 #include <ctype.h>
3960 #include <stdlib.h>
3961 #if ((' ' & 0x0FF) == 0x020)
3962 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3963 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3964 #else
3965 # define ISLOWER(c) \
3966                    (('a' <= (c) && (c) <= 'i') \
3967                      || ('j' <= (c) && (c) <= 'r') \
3968                      || ('s' <= (c) && (c) <= 'z'))
3969 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3970 #endif
3971
3972 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3973 int
3974 main ()
3975 {
3976   int i;
3977   for (i = 0; i < 256; i++)
3978     if (XOR (islower (i), ISLOWER (i))
3979         || toupper (i) != TOUPPER (i))
3980       return 2;
3981   return 0;
3982 }
3983 _ACEOF
3984 if ac_fn_c_try_run "$LINENO"; then :
3985
3986 else
3987   ac_cv_header_stdc=no
3988 fi
3989 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3990   conftest.$ac_objext conftest.beam conftest.$ac_ext
3991 fi
3992
3993 fi
3994 fi
3995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3996 $as_echo "$ac_cv_header_stdc" >&6; }
3997 if test $ac_cv_header_stdc = yes; then
3998
3999 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4000
4001 fi
4002
4003 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4004 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4005                   inttypes.h stdint.h unistd.h
4006 do :
4007   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4008 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4009 "
4010 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4011   cat >>confdefs.h <<_ACEOF
4012 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4013 _ACEOF
4014
4015 fi
4016
4017 done
4018
4019
4020
4021   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4022 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4023   MINIX=yes
4024 else
4025   MINIX=
4026 fi
4027
4028
4029   if test "$MINIX" = yes; then
4030
4031 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4032
4033
4034 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4035
4036
4037 $as_echo "#define _MINIX 1" >>confdefs.h
4038
4039   fi
4040
4041
4042   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4043 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4044 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4045   $as_echo_n "(cached) " >&6
4046 else
4047   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4048 /* end confdefs.h.  */
4049
4050 #         define __EXTENSIONS__ 1
4051           $ac_includes_default
4052 int
4053 main ()
4054 {
4055
4056   ;
4057   return 0;
4058 }
4059 _ACEOF
4060 if ac_fn_c_try_compile "$LINENO"; then :
4061   ac_cv_safe_to_define___extensions__=yes
4062 else
4063   ac_cv_safe_to_define___extensions__=no
4064 fi
4065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4066 fi
4067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4068 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4069   test $ac_cv_safe_to_define___extensions__ = yes &&
4070     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4071
4072   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4073
4074   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4075
4076   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4077
4078   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4079
4080
4081
4082 if test "$ac_cv_header_minix_config_h" = "yes"; then
4083
4084 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
4085
4086 fi
4087
4088 case "$prefix" in
4089         NONE)
4090                 prefix="/usr/local"
4091         ;;
4092 esac
4093
4094 # are we on MinGW?
4095 if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
4096 else
4097         if echo $host $target | grep mingw32 >/dev/null; then on_mingw="yes"
4098         else on_mingw="no"; fi
4099 fi
4100
4101 #
4102 # Determine configuration file
4103 # the eval is to evaluate shell expansion twice
4104 if test $on_mingw = "no"; then
4105   ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
4106 else
4107   ub_conf_file="C:\\Program Files (x86)\\Unbound\\service.conf"
4108 fi
4109
4110 # Check whether --with-conf_file was given.
4111 if test "${with_conf_file+set}" = set; then :
4112   withval=$with_conf_file; ub_conf_file="$withval"
4113 fi
4114
4115
4116 hdr_config="`echo $ub_conf_file | sed -e 's/\\\\/\\\\\\\\/g'`"
4117
4118
4119 cat >>confdefs.h <<_ACEOF
4120 #define CONFIGFILE "$hdr_config"
4121 _ACEOF
4122
4123 ub_conf_dir=`$as_dirname -- "$ub_conf_file" ||
4124 $as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4125          X"$ub_conf_file" : 'X\(//\)[^/]' \| \
4126          X"$ub_conf_file" : 'X\(//\)$' \| \
4127          X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null ||
4128 $as_echo X"$ub_conf_file" |
4129     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4130             s//\1/
4131             q
4132           }
4133           /^X\(\/\/\)[^/].*/{
4134             s//\1/
4135             q
4136           }
4137           /^X\(\/\/\)$/{
4138             s//\1/
4139             q
4140           }
4141           /^X\(\/\).*/{
4142             s//\1/
4143             q
4144           }
4145           s/.*/./; q'`
4146
4147
4148 # Determine run, chroot directory and pidfile locations
4149
4150 # Check whether --with-run-dir was given.
4151 if test "${with_run_dir+set}" = set; then :
4152   withval=$with_run_dir; UNBOUND_RUN_DIR="$withval"
4153 else
4154   if test $on_mingw = no; then
4155     UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
4156 else
4157     UNBOUND_RUN_DIR=""
4158 fi
4159
4160 fi
4161
4162
4163 hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4164
4165
4166 cat >>confdefs.h <<_ACEOF
4167 #define RUN_DIR "$hdr_run"
4168 _ACEOF
4169
4170
4171
4172 # Check whether --with-chroot-dir was given.
4173 if test "${with_chroot_dir+set}" = set; then :
4174   withval=$with_chroot_dir; UNBOUND_CHROOT_DIR="$withval"
4175 else
4176   if test $on_mingw = no; then
4177     UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
4178 else
4179     UNBOUND_CHROOT_DIR=""
4180 fi
4181
4182 fi
4183
4184
4185 hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
4186
4187
4188 cat >>confdefs.h <<_ACEOF
4189 #define CHROOT_DIR "$hdr_chroot"
4190 _ACEOF
4191
4192
4193
4194 # Check whether --with-share-dir was given.
4195 if test "${with_share_dir+set}" = set; then :
4196   withval=$with_share_dir; UNBOUND_SHARE_DIR="$withval"
4197 else
4198   UNBOUND_SHARE_DIR="$UNBOUND_RUN_DIR"
4199 fi
4200
4201
4202
4203 cat >>confdefs.h <<_ACEOF
4204 #define SHARE_DIR "$UNBOUND_SHARE_DIR"
4205 _ACEOF
4206
4207
4208
4209 # Check whether --with-pidfile was given.
4210 if test "${with_pidfile+set}" = set; then :
4211   withval=$with_pidfile; UNBOUND_PIDFILE="$withval"
4212 else
4213   if test $on_mingw = no; then
4214     UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
4215 else
4216     UNBOUND_PIDFILE=""
4217 fi
4218
4219 fi
4220
4221
4222 hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4223
4224
4225 cat >>confdefs.h <<_ACEOF
4226 #define PIDFILE "$hdr_pid"
4227 _ACEOF
4228
4229
4230
4231 # Check whether --with-rootkey-file was given.
4232 if test "${with_rootkey_file+set}" = set; then :
4233   withval=$with_rootkey_file; UNBOUND_ROOTKEY_FILE="$withval"
4234 else
4235   if test $on_mingw = no; then
4236     UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
4237 else
4238     UNBOUND_ROOTKEY_FILE="C:\\Program Files (x86)\\Unbound\\root.key"
4239 fi
4240
4241 fi
4242
4243
4244 hdr_rkey="`echo $UNBOUND_ROOTKEY_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4245
4246
4247 cat >>confdefs.h <<_ACEOF
4248 #define ROOT_ANCHOR_FILE "$hdr_rkey"
4249 _ACEOF
4250
4251
4252
4253 # Check whether --with-rootcert-file was given.
4254 if test "${with_rootcert_file+set}" = set; then :
4255   withval=$with_rootcert_file; UNBOUND_ROOTCERT_FILE="$withval"
4256 else
4257   if test $on_mingw = no; then
4258     UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
4259 else
4260     UNBOUND_ROOTCERT_FILE="C:\\Program Files (x86)\\Unbound\\icannbundle.pem"
4261 fi
4262
4263 fi
4264
4265
4266 hdr_rpem="`echo $UNBOUND_ROOTCERT_FILE | sed -e 's/\\\\/\\\\\\\\/g'`"
4267
4268
4269 cat >>confdefs.h <<_ACEOF
4270 #define ROOT_CERT_FILE "$hdr_rpem"
4271 _ACEOF
4272
4273
4274
4275 # Check whether --with-username was given.
4276 if test "${with_username+set}" = set; then :
4277   withval=$with_username; UNBOUND_USERNAME="$withval"
4278 else
4279   UNBOUND_USERNAME="unbound"
4280 fi
4281
4282
4283
4284 cat >>confdefs.h <<_ACEOF
4285 #define UB_USERNAME "$UNBOUND_USERNAME"
4286 _ACEOF
4287
4288
4289
4290 $as_echo "#define WINVER 0x0502" >>confdefs.h
4291
4292 wnvs=`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9]*$/\1,\2,\3,0/' `
4293
4294
4295 cat >>confdefs.h <<_ACEOF
4296 #define RSRC_PACKAGE_VERSION $wnvs
4297 _ACEOF
4298
4299
4300 # Checks for typedefs, structures, and compiler characteristics.
4301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4302 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4303 if ${ac_cv_c_const+:} false; then :
4304   $as_echo_n "(cached) " >&6
4305 else
4306   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4307 /* end confdefs.h.  */
4308
4309 int
4310 main ()
4311 {
4312
4313 #ifndef __cplusplus
4314   /* Ultrix mips cc rejects this sort of thing.  */
4315   typedef int charset[2];
4316   const charset cs = { 0, 0 };
4317   /* SunOS 4.1.1 cc rejects this.  */
4318   char const *const *pcpcc;
4319   char **ppc;
4320   /* NEC SVR4.0.2 mips cc rejects this.  */
4321   struct point {int x, y;};
4322   static struct point const zero = {0,0};
4323   /* AIX XL C 1.02.0.0 rejects this.
4324      It does not let you subtract one const X* pointer from another in
4325      an arm of an if-expression whose if-part is not a constant
4326      expression */
4327   const char *g = "string";
4328   pcpcc = &g + (g ? g-g : 0);
4329   /* HPUX 7.0 cc rejects these. */
4330   ++pcpcc;
4331   ppc = (char**) pcpcc;
4332   pcpcc = (char const *const *) ppc;
4333   { /* SCO 3.2v4 cc rejects this sort of thing.  */
4334     char tx;
4335     char *t = &tx;
4336     char const *s = 0 ? (char *) 0 : (char const *) 0;
4337
4338     *t++ = 0;
4339     if (s) return 0;
4340   }
4341   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4342     int x[] = {25, 17};
4343     const int *foo = &x[0];
4344     ++foo;
4345   }
4346   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4347     typedef const int *iptr;
4348     iptr p = 0;
4349     ++p;
4350   }
4351   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4352        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4353     struct s { int j; const int *ap[3]; } bx;
4354     struct s *b = &bx; b->j = 5;
4355   }
4356   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4357     const int foo = 10;
4358     if (!foo) return 0;
4359   }
4360   return !cs[0] && !zero.x;
4361 #endif
4362
4363   ;
4364   return 0;
4365 }
4366 _ACEOF
4367 if ac_fn_c_try_compile "$LINENO"; then :
4368   ac_cv_c_const=yes
4369 else
4370   ac_cv_c_const=no
4371 fi
4372 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4373 fi
4374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4375 $as_echo "$ac_cv_c_const" >&6; }
4376 if test $ac_cv_c_const = no; then
4377
4378 $as_echo "#define const /**/" >>confdefs.h
4379
4380 fi
4381
4382 ac_ext=c
4383 ac_cpp='$CPP $CPPFLAGS'
4384 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4385 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4386 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4387
4388 # allow user to override the -g -O2 flags.
4389 if test "x$CFLAGS" = "x" ; then
4390
4391
4392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -g" >&5
4393 $as_echo_n "checking whether $CC supports -g... " >&6; }
4394 cache=`echo g | sed 'y%.=/+-%___p_%'`
4395 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4396   $as_echo_n "(cached) " >&6
4397 else
4398
4399 echo 'void f(void){}' >conftest.c
4400 if test -z "`$CC $CPPFLAGS $CFLAGS -g -c conftest.c 2>&1`"; then
4401 eval "cv_prog_cc_flag_$cache=yes"
4402 else
4403 eval "cv_prog_cc_flag_$cache=no"
4404 fi
4405 rm -f conftest conftest.o conftest.c
4406
4407 fi
4408
4409 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4411 $as_echo "yes" >&6; }
4412 :
4413 CFLAGS="$CFLAGS -g"
4414 else
4415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4416 $as_echo "no" >&6; }
4417 :
4418
4419 fi
4420
4421
4422
4423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -O2" >&5
4424 $as_echo_n "checking whether $CC supports -O2... " >&6; }
4425 cache=`echo O2 | sed 'y%.=/+-%___p_%'`
4426 if eval \${cv_prog_cc_flag_$cache+:} false; then :
4427   $as_echo_n "(cached) " >&6
4428 else
4429
4430 echo 'void f(void){}' >conftest.c
4431 if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
4432 eval "cv_prog_cc_flag_$cache=yes"
4433 else
4434 eval "cv_prog_cc_flag_$cache=no"
4435 fi
4436 rm -f conftest conftest.o conftest.c
4437
4438 fi
4439
4440 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
4441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4442 $as_echo "yes" >&6; }
4443 :
4444 CFLAGS="$CFLAGS -O2"
4445 else
4446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4447 $as_echo "no" >&6; }
4448 :
4449
4450 fi
4451
4452 fi
4453 ac_ext=c
4454 ac_cpp='$CPP $CPPFLAGS'
4455 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4456 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4457 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4458 if test -n "$ac_tool_prefix"; then
4459   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4460 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4462 $as_echo_n "checking for $ac_word... " >&6; }
4463 if ${ac_cv_prog_CC+:} false; then :
4464   $as_echo_n "(cached) " >&6
4465 else
4466   if test -n "$CC"; then
4467   ac_cv_prog_CC="$CC" # Let the user override the test.
4468 else
4469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4470 for as_dir in $PATH
4471 do
4472   IFS=$as_save_IFS
4473   test -z "$as_dir" && as_dir=.
4474     for ac_exec_ext in '' $ac_executable_extensions; do
4475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4476     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4478     break 2
4479   fi
4480 done
4481   done
4482 IFS=$as_save_IFS
4483
4484 fi
4485 fi
4486 CC=$ac_cv_prog_CC
4487 if test -n "$CC"; then
4488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4489 $as_echo "$CC" >&6; }
4490 else
4491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4492 $as_echo "no" >&6; }
4493 fi
4494
4495
4496 fi
4497 if test -z "$ac_cv_prog_CC"; then
4498   ac_ct_CC=$CC
4499   # Extract the first word of "gcc", so it can be a program name with args.
4500 set dummy gcc; ac_word=$2
4501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4502 $as_echo_n "checking for $ac_word... " >&6; }
4503 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4504   $as_echo_n "(cached) " >&6
4505 else
4506   if test -n "$ac_ct_CC"; then
4507   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4508 else
4509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4510 for as_dir in $PATH
4511 do
4512   IFS=$as_save_IFS
4513   test -z "$as_dir" && as_dir=.
4514     for ac_exec_ext in '' $ac_executable_extensions; do
4515   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4516     ac_cv_prog_ac_ct_CC="gcc"
4517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4518     break 2
4519   fi
4520 done
4521   done
4522 IFS=$as_save_IFS
4523
4524 fi
4525 fi
4526 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4527 if test -n "$ac_ct_CC"; then
4528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4529 $as_echo "$ac_ct_CC" >&6; }
4530 else
4531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4532 $as_echo "no" >&6; }
4533 fi
4534
4535   if test "x$ac_ct_CC" = x; then
4536     CC=""
4537   else
4538     case $cross_compiling:$ac_tool_warned in
4539 yes:)
4540 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4541 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4542 ac_tool_warned=yes ;;
4543 esac
4544     CC=$ac_ct_CC
4545   fi
4546 else
4547   CC="$ac_cv_prog_CC"
4548 fi
4549
4550 if test -z "$CC"; then
4551           if test -n "$ac_tool_prefix"; then
4552     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4553 set dummy ${ac_tool_prefix}cc; ac_word=$2
4554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4555 $as_echo_n "checking for $ac_word... " >&6; }
4556 if ${ac_cv_prog_CC+:} false; then :
4557   $as_echo_n "(cached) " >&6
4558 else
4559   if test -n "$CC"; then
4560   ac_cv_prog_CC="$CC" # Let the user override the test.
4561 else
4562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4563 for as_dir in $PATH
4564 do
4565   IFS=$as_save_IFS
4566   test -z "$as_dir" && as_dir=.
4567     for ac_exec_ext in '' $ac_executable_extensions; do
4568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4569     ac_cv_prog_CC="${ac_tool_prefix}cc"
4570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4571     break 2
4572   fi
4573 done
4574   done
4575 IFS=$as_save_IFS
4576
4577 fi
4578 fi
4579 CC=$ac_cv_prog_CC
4580 if test -n "$CC"; then
4581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4582 $as_echo "$CC" >&6; }
4583 else
4584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4585 $as_echo "no" >&6; }
4586 fi
4587
4588
4589   fi
4590 fi
4591 if test -z "$CC"; then
4592   # Extract the first word of "cc", so it can be a program name with args.
4593 set dummy cc; ac_word=$2
4594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4595 $as_echo_n "checking for $ac_word... " >&6; }
4596 if ${ac_cv_prog_CC+:} false; then :
4597   $as_echo_n "(cached) " >&6
4598 else
4599   if test -n "$CC"; then
4600   ac_cv_prog_CC="$CC" # Let the user override the test.
4601 else
4602   ac_prog_rejected=no
4603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4604 for as_dir in $PATH
4605 do
4606   IFS=$as_save_IFS
4607   test -z "$as_dir" && as_dir=.
4608     for ac_exec_ext in '' $ac_executable_extensions; do
4609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4610     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4611        ac_prog_rejected=yes
4612        continue
4613      fi
4614     ac_cv_prog_CC="cc"
4615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4616     break 2
4617   fi
4618 done
4619   done
4620 IFS=$as_save_IFS
4621
4622 if test $ac_prog_rejected = yes; then
4623   # We found a bogon in the path, so make sure we never use it.
4624   set dummy $ac_cv_prog_CC
4625   shift
4626   if test $# != 0; then
4627     # We chose a different compiler from the bogus one.
4628     # However, it has the same basename, so the bogon will be chosen
4629     # first if we set CC to just the basename; use the full file name.
4630     shift
4631     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4632   fi
4633 fi
4634 fi
4635 fi
4636 CC=$ac_cv_prog_CC
4637 if test -n "$CC"; then
4638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4639 $as_echo "$CC" >&6; }
4640 else
4641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4642 $as_echo "no" >&6; }
4643 fi
4644
4645
4646 fi
4647 if test -z "$CC"; then
4648   if test -n "$ac_tool_prefix"; then
4649   for ac_prog in cl.exe
4650   do
4651     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4652 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4654 $as_echo_n "checking for $ac_word... " >&6; }
4655 if ${ac_cv_prog_CC+:} false; then :
4656   $as_echo_n "(cached) " >&6
4657 else
4658   if test -n "$CC"; then
4659   ac_cv_prog_CC="$CC" # Let the user override the test.
4660 else
4661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4662 for as_dir in $PATH
4663 do
4664   IFS=$as_save_IFS
4665   test -z "$as_dir" && as_dir=.
4666     for ac_exec_ext in '' $ac_executable_extensions; do
4667   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4668     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4669     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4670     break 2
4671   fi
4672 done
4673   done
4674 IFS=$as_save_IFS
4675
4676 fi
4677 fi
4678 CC=$ac_cv_prog_CC
4679 if test -n "$CC"; then
4680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4681 $as_echo "$CC" >&6; }
4682 else
4683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4684 $as_echo "no" >&6; }
4685 fi
4686
4687
4688     test -n "$CC" && break
4689   done
4690 fi
4691 if test -z "$CC"; then
4692   ac_ct_CC=$CC
4693   for ac_prog in cl.exe
4694 do
4695   # Extract the first word of "$ac_prog", so it can be a program name with args.
4696 set dummy $ac_prog; ac_word=$2
4697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4698 $as_echo_n "checking for $ac_word... " >&6; }
4699 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4700   $as_echo_n "(cached) " >&6
4701 else
4702   if test -n "$ac_ct_CC"; then
4703   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4704 else
4705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4706 for as_dir in $PATH
4707 do
4708   IFS=$as_save_IFS
4709   test -z "$as_dir" && as_dir=.
4710     for ac_exec_ext in '' $ac_executable_extensions; do
4711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4712     ac_cv_prog_ac_ct_CC="$ac_prog"
4713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4714     break 2
4715   fi
4716 done
4717   done
4718 IFS=$as_save_IFS
4719
4720 fi
4721 fi
4722 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4723 if test -n "$ac_ct_CC"; then
4724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4725 $as_echo "$ac_ct_CC" >&6; }
4726 else
4727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4728 $as_echo "no" >&6; }
4729 fi
4730
4731
4732   test -n "$ac_ct_CC" && break
4733 done
4734
4735   if test "x$ac_ct_CC" = x; then
4736     CC=""
4737   else
4738     case $cross_compiling:$ac_tool_warned in
4739 yes:)
4740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4741 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4742 ac_tool_warned=yes ;;
4743 esac
4744     CC=$ac_ct_CC
4745   fi
4746 fi
4747
4748 fi
4749
4750
4751 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4752 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4753 as_fn_error $? "no acceptable C compiler found in \$PATH
4754 See \`config.log' for more details" "$LINENO" 5; }
4755
4756 # Provide some information about the compiler.
4757 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4758 set X $ac_compile
4759 ac_compiler=$2
4760 for ac_option in --version -v -V -qversion; do
4761   { { ac_try="$ac_compiler $ac_option >&5"
4762 case "(($ac_try" in
4763   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4764   *) ac_try_echo=$ac_try;;
4765 esac
4766 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4767 $as_echo "$ac_try_echo"; } >&5
4768   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4769   ac_status=$?
4770   if test -s conftest.err; then
4771     sed '10a\
4772 ... rest of stderr output deleted ...
4773          10q' conftest.err >conftest.er1
4774     cat conftest.er1 >&5
4775   fi
4776   rm -f conftest.er1 conftest.err
4777   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4778   test $ac_status = 0; }
4779 done
4780
4781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4782 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4783 if ${ac_cv_c_compiler_gnu+:} false; then :
4784   $as_echo_n "(cached) " >&6
4785 else
4786   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4787 /* end confdefs.h.  */
4788
4789 int
4790 main ()
4791 {
4792 #ifndef __GNUC__
4793        choke me
4794 #endif
4795
4796   ;
4797   return 0;
4798 }
4799 _ACEOF
4800 if ac_fn_c_try_compile "$LINENO"; then :
4801   ac_compiler_gnu=yes
4802 else
4803   ac_compiler_gnu=no
4804 fi
4805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4806 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4807
4808 fi
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4810 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4811 if test $ac_compiler_gnu = yes; then
4812   GCC=yes
4813 else
4814   GCC=
4815 fi
4816 ac_test_CFLAGS=${CFLAGS+set}
4817 ac_save_CFLAGS=$CFLAGS
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4819 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4820 if ${ac_cv_prog_cc_g+:} false; then :
4821   $as_echo_n "(cached) " >&6
4822 else
4823   ac_save_c_werror_flag=$ac_c_werror_flag
4824    ac_c_werror_flag=yes
4825    ac_cv_prog_cc_g=no
4826    CFLAGS="-g"
4827    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4828 /* end confdefs.h.  */
4829
4830 int
4831 main ()
4832 {
4833
4834   ;
4835   return 0;
4836 }
4837 _ACEOF
4838 if ac_fn_c_try_compile "$LINENO"; then :
4839   ac_cv_prog_cc_g=yes
4840 else
4841   CFLAGS=""
4842       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4843 /* end confdefs.h.  */
4844
4845 int
4846 main ()
4847 {
4848
4849   ;
4850   return 0;
4851 }
4852 _ACEOF
4853 if ac_fn_c_try_compile "$LINENO"; then :
4854
4855 else
4856   ac_c_werror_flag=$ac_save_c_werror_flag
4857          CFLAGS="-g"
4858          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4859 /* end confdefs.h.  */
4860
4861 int
4862 main ()
4863 {
4864
4865   ;
4866   return 0;
4867 }
4868 _ACEOF
4869 if ac_fn_c_try_compile "$LINENO"; then :
4870   ac_cv_prog_cc_g=yes
4871 fi
4872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4873 fi
4874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4875 fi
4876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4877    ac_c_werror_flag=$ac_save_c_werror_flag
4878 fi
4879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4880 $as_echo "$ac_cv_prog_cc_g" >&6; }
4881 if test "$ac_test_CFLAGS" = set; then
4882   CFLAGS=$ac_save_CFLAGS
4883 elif test $ac_cv_prog_cc_g = yes; then
4884   if test "$GCC" = yes; then
4885     CFLAGS="-g -O2"
4886   else
4887     CFLAGS="-g"
4888   fi
4889 else
4890   if test "$GCC" = yes; then
4891     CFLAGS="-O2"
4892   else
4893     CFLAGS=
4894   fi
4895 fi
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4897 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4898 if ${ac_cv_prog_cc_c89+:} false; then :
4899   $as_echo_n "(cached) " >&6
4900 else
4901   ac_cv_prog_cc_c89=no
4902 ac_save_CC=$CC
4903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4904 /* end confdefs.h.  */
4905 #include <stdarg.h>
4906 #include <stdio.h>
4907 struct stat;
4908 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4909 struct buf { int x; };
4910 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4911 static char *e (p, i)
4912      char **p;
4913      int i;
4914 {
4915   return p[i];
4916 }
4917 static char *f (char * (*g) (char **, int), char **p, ...)
4918 {
4919   char *s;
4920   va_list v;
4921   va_start (v,p);
4922   s = g (p, va_arg (v,int));
4923   va_end (v);
4924   return s;
4925 }
4926
4927 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4928    function prototypes and stuff, but not '\xHH' hex character constants.
4929    These don't provoke an error unfortunately, instead are silently treated
4930    as 'x'.  The following induces an error, until -std is added to get
4931    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4932    array size at least.  It's necessary to write '\x00'==0 to get something
4933    that's true only with -std.  */
4934 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4935
4936 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4937    inside strings and character constants.  */
4938 #define FOO(x) 'x'
4939 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4940
4941 int test (int i, double x);
4942 struct s1 {int (*f) (int a);};
4943 struct s2 {int (*f) (double a);};
4944 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4945 int argc;
4946 char **argv;
4947 int
4948 main ()
4949 {
4950 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4951   ;
4952   return 0;
4953 }
4954 _ACEOF
4955 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4956         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4957 do
4958   CC="$ac_save_CC $ac_arg"
4959   if ac_fn_c_try_compile "$LINENO"; then :
4960   ac_cv_prog_cc_c89=$ac_arg
4961 fi
4962 rm -f core conftest.err conftest.$ac_objext
4963   test "x$ac_cv_prog_cc_c89" != "xno" && break
4964 done
4965 rm -f conftest.$ac_ext
4966 CC=$ac_save_CC
4967
4968 fi
4969 # AC_CACHE_VAL
4970 case "x$ac_cv_prog_cc_c89" in
4971   x)
4972     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4973 $as_echo "none needed" >&6; } ;;
4974   xno)
4975     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4976 $as_echo "unsupported" >&6; } ;;
4977   *)
4978     CC="$CC $ac_cv_prog_cc_c89"
4979     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4980 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4981 esac
4982 if test "x$ac_cv_prog_cc_c89" != xno; then :
4983
4984 fi
4985
4986 ac_ext=c
4987 ac_cpp='$CPP $CPPFLAGS'
4988 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4989 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4990 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4991
4992
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC dependency flag" >&5
4994 $as_echo_n "checking $CC dependency flag... " >&6; }
4995 echo 'void f(){}' >conftest.c
4996 if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then
4997         DEPFLAG="-MM"
4998 else
4999   if test "`$CC -xM1 conftest.c 2>&1`" = "conftest.o: conftest.c"; then
5000         DEPFLAG="-xM1"
5001   else
5002         DEPFLAG="-MM"  # dunno do something
5003   fi
5004 fi
5005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPFLAG" >&5
5006 $as_echo "$DEPFLAG" >&6; }
5007 rm -f conftest.c
5008
5009
5010
5011
5012
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
5014 $as_echo_n "checking whether $CC supports -Werror... " >&6; }
5015 cache=`echo Werror | sed 'y%.=/+-%___p_%'`
5016 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5017   $as_echo_n "(cached) " >&6
5018 else
5019
5020 echo 'void f(void){}' >conftest.c
5021 if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
5022 eval "cv_prog_cc_flag_$cache=yes"
5023 else
5024 eval "cv_prog_cc_flag_$cache=no"
5025 fi
5026 rm -f conftest conftest.o conftest.c
5027
5028 fi
5029
5030 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5032 $as_echo "yes" >&6; }
5033 :
5034 ERRFLAG="-Werror"
5035 else
5036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5037 $as_echo "no" >&6; }
5038 :
5039 ERRFLAG="-errwarn"
5040 fi
5041
5042
5043
5044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5045 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5046 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5047 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5048   $as_echo_n "(cached) " >&6
5049 else
5050
5051 echo 'void f(void){}' >conftest.c
5052 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5053 eval "cv_prog_cc_flag_$cache=yes"
5054 else
5055 eval "cv_prog_cc_flag_$cache=no"
5056 fi
5057 rm -f conftest conftest.o conftest.c
5058
5059 fi
5060
5061 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5063 $as_echo "yes" >&6; }
5064 :
5065 ERRFLAG="$ERRFLAG -Wall"
5066 else
5067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5068 $as_echo "no" >&6; }
5069 :
5070 ERRFLAG="$ERRFLAG -errfmt"
5071 fi
5072
5073
5074
5075
5076
5077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c99" >&5
5078 $as_echo_n "checking whether $CC supports -std=c99... " >&6; }
5079 cache=`echo std=c99 | sed 'y%.=/+-%___p_%'`
5080 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5081   $as_echo_n "(cached) " >&6
5082 else
5083
5084 echo 'void f(void){}' >conftest.c
5085 if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
5086 eval "cv_prog_cc_flag_$cache=yes"
5087 else
5088 eval "cv_prog_cc_flag_$cache=no"
5089 fi
5090 rm -f conftest conftest.o conftest.c
5091
5092 fi
5093
5094 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5096 $as_echo "yes" >&6; }
5097 :
5098 C99FLAG="-std=c99"
5099 else
5100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5101 $as_echo "no" >&6; }
5102 :
5103
5104 fi
5105
5106
5107
5108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -xc99" >&5
5109 $as_echo_n "checking whether $CC supports -xc99... " >&6; }
5110 cache=`echo xc99 | sed 'y%.=/+-%___p_%'`
5111 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5112   $as_echo_n "(cached) " >&6
5113 else
5114
5115 echo 'void f(void){}' >conftest.c
5116 if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
5117 eval "cv_prog_cc_flag_$cache=yes"
5118 else
5119 eval "cv_prog_cc_flag_$cache=no"
5120 fi
5121 rm -f conftest conftest.o conftest.c
5122
5123 fi
5124
5125 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5127 $as_echo "yes" >&6; }
5128 :
5129 C99FLAG="-xc99"
5130 else
5131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5132 $as_echo "no" >&6; }
5133 :
5134
5135 fi
5136
5137
5138 for ac_header in getopt.h time.h
5139 do :
5140   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5141 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5142 "
5143 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5144   cat >>confdefs.h <<_ACEOF
5145 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5146 _ACEOF
5147
5148 fi
5149
5150 done
5151
5152
5153
5154
5155
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC" >&5
5157 $as_echo_n "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE as a flag for $CC... " >&6; }
5158 cache=`$as_echo "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE" | $as_tr_sh`
5159 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5160   $as_echo_n "(cached) " >&6
5161 else
5162
5163 echo '
5164 #include "confdefs.h"
5165 #include <stdlib.h>
5166 #include <ctype.h>
5167 #include <sys/time.h>
5168 #ifdef HAVE_TIME_H
5169 #include <time.h>
5170 #endif
5171 #include <unistd.h>
5172 #include <netdb.h>
5173 #ifdef HAVE_GETOPT_H
5174 #include <getopt.h>
5175 #endif
5176
5177 int test() {
5178         int a;
5179         char **opts = NULL;
5180         struct timeval tv;
5181         char *t;
5182         time_t time = 0;
5183         char *buf = NULL;
5184         const char* str = NULL;
5185         struct msghdr msg;
5186         msg.msg_control = 0;
5187         t = ctime_r(&time, buf);
5188         tv.tv_usec = 10;
5189         srandom(32);
5190         a = getopt(2, opts, "a");
5191         a = isascii(32);
5192         str = gai_strerror(0);
5193         if(str && t && tv.tv_usec && msg.msg_control)
5194                 a = 0;
5195         return a;
5196 }
5197 ' > conftest.c
5198 echo 'void f(){}' >>conftest.c
5199 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5200 eval "cv_prog_cc_flag_needed_$cache=no"
5201 else
5202
5203 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5204 eval "cv_prog_cc_flag_needed_$cache=yes"
5205 else
5206 eval "cv_prog_cc_flag_needed_$cache=fail"
5207 #echo 'Test with flag fails too!'
5208 #cat conftest.c
5209 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5210 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5211 #exit 1
5212 fi
5213
5214 fi
5215 rm -f conftest conftest.c conftest.o
5216
5217 fi
5218
5219 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5221 $as_echo "yes" >&6; }
5222 :
5223 CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE"
5224 else
5225 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5227 $as_echo "no" >&6; }
5228 #echo 'Test with flag is no!'
5229 #cat conftest.c
5230 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5231 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5232 #exit 1
5233 :
5234
5235 else
5236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5237 $as_echo "failed" >&6; }
5238 :
5239
5240 fi
5241 fi
5242
5243
5244
5245
5246
5247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC" >&5
5248 $as_echo_n "checking whether we need $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE as a flag for $CC... " >&6; }
5249 cache=`$as_echo "$C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE" | $as_tr_sh`
5250 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5251   $as_echo_n "(cached) " >&6
5252 else
5253
5254 echo '
5255 #include "confdefs.h"
5256 #include <stdlib.h>
5257 #include <ctype.h>
5258 #include <sys/time.h>
5259 #ifdef HAVE_TIME_H
5260 #include <time.h>
5261 #endif
5262 #include <unistd.h>
5263 #include <netdb.h>
5264 #ifdef HAVE_GETOPT_H
5265 #include <getopt.h>
5266 #endif
5267
5268 int test() {
5269         int a;
5270         char **opts = NULL;
5271         struct timeval tv;
5272         char *t;
5273         time_t time = 0;
5274         char *buf = NULL;
5275         const char* str = NULL;
5276         struct msghdr msg;
5277         msg.msg_control = 0;
5278         t = ctime_r(&time, buf);
5279         tv.tv_usec = 10;
5280         srandom(32);
5281         a = getopt(2, opts, "a");
5282         a = isascii(32);
5283         str = gai_strerror(0);
5284         if(str && t && tv.tv_usec && msg.msg_control)
5285                 a = 0;
5286         return a;
5287 }
5288 ' > conftest.c
5289 echo 'void f(){}' >>conftest.c
5290 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5291 eval "cv_prog_cc_flag_needed_$cache=no"
5292 else
5293
5294 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5295 eval "cv_prog_cc_flag_needed_$cache=yes"
5296 else
5297 eval "cv_prog_cc_flag_needed_$cache=fail"
5298 #echo 'Test with flag fails too!'
5299 #cat conftest.c
5300 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5301 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5302 #exit 1
5303 fi
5304
5305 fi
5306 rm -f conftest conftest.c conftest.o
5307
5308 fi
5309
5310 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5312 $as_echo "yes" >&6; }
5313 :
5314 CFLAGS="$CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE"
5315 else
5316 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5318 $as_echo "no" >&6; }
5319 #echo 'Test with flag is no!'
5320 #cat conftest.c
5321 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1"
5322 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ALL_SOURCE $ERRFLAG -c conftest.c 2>&1`
5323 #exit 1
5324 :
5325
5326 else
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5328 $as_echo "failed" >&6; }
5329 :
5330
5331 fi
5332 fi
5333
5334
5335
5336
5337
5338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need $C99FLAG as a flag for $CC" >&5
5339 $as_echo_n "checking whether we need $C99FLAG as a flag for $CC... " >&6; }
5340 cache=`$as_echo "$C99FLAG" | $as_tr_sh`
5341 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5342   $as_echo_n "(cached) " >&6
5343 else
5344
5345 echo '
5346 #include <stdbool.h>
5347 #include <ctype.h>
5348 int test() {
5349         int a = 0;
5350         return a;
5351 }
5352 ' > conftest.c
5353 echo 'void f(){}' >>conftest.c
5354 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5355 eval "cv_prog_cc_flag_needed_$cache=no"
5356 else
5357
5358 if test -z "`$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`"; then
5359 eval "cv_prog_cc_flag_needed_$cache=yes"
5360 else
5361 eval "cv_prog_cc_flag_needed_$cache=fail"
5362 #echo 'Test with flag fails too!'
5363 #cat conftest.c
5364 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5365 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5366 #exit 1
5367 fi
5368
5369 fi
5370 rm -f conftest conftest.c conftest.o
5371
5372 fi
5373
5374 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5376 $as_echo "yes" >&6; }
5377 :
5378 CFLAGS="$CFLAGS $C99FLAG"
5379 else
5380 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5382 $as_echo "no" >&6; }
5383 #echo 'Test with flag is no!'
5384 #cat conftest.c
5385 #echo "$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1"
5386 #echo `$CC $CPPFLAGS $CFLAGS $C99FLAG $ERRFLAG -c conftest.c 2>&1`
5387 #exit 1
5388 :
5389
5390 else
5391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5392 $as_echo "failed" >&6; }
5393 :
5394
5395 fi
5396 fi
5397
5398
5399
5400
5401
5402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC" >&5
5403 $as_echo_n "checking whether we need -D_BSD_SOURCE -D_DEFAULT_SOURCE as a flag for $CC... " >&6; }
5404 cache=_D_BSD_SOURCE__D_DEFAULT_SOURCE
5405 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5406   $as_echo_n "(cached) " >&6
5407 else
5408
5409 echo '
5410 #include <ctype.h>
5411
5412 int test() {
5413         int a;
5414         a = isascii(32);
5415         return a;
5416 }
5417 ' > conftest.c
5418 echo 'void f(){}' >>conftest.c
5419 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5420 eval "cv_prog_cc_flag_needed_$cache=no"
5421 else
5422
5423 if test -z "`$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5424 eval "cv_prog_cc_flag_needed_$cache=yes"
5425 else
5426 eval "cv_prog_cc_flag_needed_$cache=fail"
5427 #echo 'Test with flag fails too!'
5428 #cat conftest.c
5429 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5430 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5431 #exit 1
5432 fi
5433
5434 fi
5435 rm -f conftest conftest.c conftest.o
5436
5437 fi
5438
5439 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5441 $as_echo "yes" >&6; }
5442 :
5443 CFLAGS="$CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE"
5444 else
5445 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5447 $as_echo "no" >&6; }
5448 #echo 'Test with flag is no!'
5449 #cat conftest.c
5450 #echo "$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1"
5451 #echo `$CC $CPPFLAGS $CFLAGS -D_BSD_SOURCE -D_DEFAULT_SOURCE $ERRFLAG -c conftest.c 2>&1`
5452 #exit 1
5453 :
5454
5455 else
5456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5457 $as_echo "failed" >&6; }
5458 :
5459
5460 fi
5461 fi
5462
5463
5464
5465
5466
5467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE as a flag for $CC" >&5
5468 $as_echo_n "checking whether we need -D_GNU_SOURCE as a flag for $CC... " >&6; }
5469 cache=_D_GNU_SOURCE
5470 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5471   $as_echo_n "(cached) " >&6
5472 else
5473
5474 echo '
5475 #include <netinet/in.h>
5476
5477 int test() {
5478         struct in6_pktinfo inf;
5479         int a = (int)sizeof(inf);
5480         return a;
5481 }
5482 ' > conftest.c
5483 echo 'void f(){}' >>conftest.c
5484 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5485 eval "cv_prog_cc_flag_needed_$cache=no"
5486 else
5487
5488 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`"; then
5489 eval "cv_prog_cc_flag_needed_$cache=yes"
5490 else
5491 eval "cv_prog_cc_flag_needed_$cache=fail"
5492 #echo 'Test with flag fails too!'
5493 #cat conftest.c
5494 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5495 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5496 #exit 1
5497 fi
5498
5499 fi
5500 rm -f conftest conftest.c conftest.o
5501
5502 fi
5503
5504 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5506 $as_echo "yes" >&6; }
5507 :
5508 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5509 else
5510 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5512 $as_echo "no" >&6; }
5513 #echo 'Test with flag is no!'
5514 #cat conftest.c
5515 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1"
5516 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE $ERRFLAG -c conftest.c 2>&1`
5517 #exit 1
5518 :
5519
5520 else
5521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5522 $as_echo "failed" >&6; }
5523 :
5524
5525 fi
5526 fi
5527
5528
5529 # check again for GNU_SOURCE for setresgid. May fail if setresgid
5530 # is not available at all. -D_FRSRESGID is to make this check unique.
5531 # otherwise we would get the previous cached result.
5532
5533
5534
5535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC" >&5
5536 $as_echo_n "checking whether we need -D_GNU_SOURCE -D_FRSRESGID as a flag for $CC... " >&6; }
5537 cache=_D_GNU_SOURCE__D_FRSRESGID
5538 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5539   $as_echo_n "(cached) " >&6
5540 else
5541
5542 echo '
5543 #include <unistd.h>
5544
5545 int test() {
5546         int a = setresgid(0,0,0);
5547         a = setresuid(0,0,0);
5548         return a;
5549 }
5550 ' > conftest.c
5551 echo 'void f(){}' >>conftest.c
5552 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5553 eval "cv_prog_cc_flag_needed_$cache=no"
5554 else
5555
5556 if test -z "`$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`"; then
5557 eval "cv_prog_cc_flag_needed_$cache=yes"
5558 else
5559 eval "cv_prog_cc_flag_needed_$cache=fail"
5560 #echo 'Test with flag fails too!'
5561 #cat conftest.c
5562 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5563 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5564 #exit 1
5565 fi
5566
5567 fi
5568 rm -f conftest conftest.c conftest.o
5569
5570 fi
5571
5572 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5574 $as_echo "yes" >&6; }
5575 :
5576 CFLAGS="$CFLAGS -D_GNU_SOURCE"
5577 else
5578 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5580 $as_echo "no" >&6; }
5581 #echo 'Test with flag is no!'
5582 #cat conftest.c
5583 #echo "$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1"
5584 #echo `$CC $CPPFLAGS $CFLAGS -D_GNU_SOURCE -D_FRSRESGID $ERRFLAG -c conftest.c 2>&1`
5585 #exit 1
5586 :
5587
5588 else
5589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5590 $as_echo "failed" >&6; }
5591 :
5592
5593 fi
5594 fi
5595
5596
5597
5598
5599
5600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC" >&5
5601 $as_echo_n "checking whether we need -D_POSIX_C_SOURCE=200112 as a flag for $CC... " >&6; }
5602 cache=_D_POSIX_C_SOURCE_200112
5603 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5604   $as_echo_n "(cached) " >&6
5605 else
5606
5607 echo '
5608 #include "confdefs.h"
5609 #ifdef HAVE_TIME_H
5610 #include <time.h>
5611 #endif
5612 #include <netdb.h>
5613
5614 int test() {
5615         int a = 0;
5616         char *t;
5617         time_t time = 0;
5618         char *buf = NULL;
5619         const char* str = NULL;
5620         t = ctime_r(&time, buf);
5621         str = gai_strerror(0);
5622         if(t && str)
5623                 a = 0;
5624         return a;
5625 }
5626 ' > conftest.c
5627 echo 'void f(){}' >>conftest.c
5628 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5629 eval "cv_prog_cc_flag_needed_$cache=no"
5630 else
5631
5632 if test -z "`$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`"; then
5633 eval "cv_prog_cc_flag_needed_$cache=yes"
5634 else
5635 eval "cv_prog_cc_flag_needed_$cache=fail"
5636 #echo 'Test with flag fails too!'
5637 #cat conftest.c
5638 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5639 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5640 #exit 1
5641 fi
5642
5643 fi
5644 rm -f conftest conftest.c conftest.o
5645
5646 fi
5647
5648 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5650 $as_echo "yes" >&6; }
5651 :
5652 CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112"
5653 else
5654 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5656 $as_echo "no" >&6; }
5657 #echo 'Test with flag is no!'
5658 #cat conftest.c
5659 #echo "$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1"
5660 #echo `$CC $CPPFLAGS $CFLAGS -D_POSIX_C_SOURCE=200112 $ERRFLAG -c conftest.c 2>&1`
5661 #exit 1
5662 :
5663
5664 else
5665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5666 $as_echo "failed" >&6; }
5667 :
5668
5669 fi
5670 fi
5671
5672
5673
5674
5675
5676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D__EXTENSIONS__ as a flag for $CC" >&5
5677 $as_echo_n "checking whether we need -D__EXTENSIONS__ as a flag for $CC... " >&6; }
5678 cache=_D__EXTENSIONS__
5679 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
5680   $as_echo_n "(cached) " >&6
5681 else
5682
5683 echo '
5684 #include "confdefs.h"
5685 #include <stdlib.h>
5686 #include <ctype.h>
5687 #include <sys/time.h>
5688 #ifdef HAVE_TIME_H
5689 #include <time.h>
5690 #endif
5691 #include <unistd.h>
5692 #ifdef HAVE_GETOPT_H
5693 #include <getopt.h>
5694 #endif
5695
5696 int test() {
5697         int a;
5698         char **opts = NULL;
5699         struct timeval tv;
5700         tv.tv_usec = 10;
5701         srandom(32);
5702         a = getopt(2, opts, "a");
5703         a = isascii(32);
5704         if(tv.tv_usec)
5705                 a = 0;
5706         return a;
5707 }
5708 ' > conftest.c
5709 echo 'void f(){}' >>conftest.c
5710 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
5711 eval "cv_prog_cc_flag_needed_$cache=no"
5712 else
5713
5714 if test -z "`$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`"; then
5715 eval "cv_prog_cc_flag_needed_$cache=yes"
5716 else
5717 eval "cv_prog_cc_flag_needed_$cache=fail"
5718 #echo 'Test with flag fails too!'
5719 #cat conftest.c
5720 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5721 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5722 #exit 1
5723 fi
5724
5725 fi
5726 rm -f conftest conftest.c conftest.o
5727
5728 fi
5729
5730 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
5731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5732 $as_echo "yes" >&6; }
5733 :
5734 CFLAGS="$CFLAGS -D__EXTENSIONS__"
5735 else
5736 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5738 $as_echo "no" >&6; }
5739 #echo 'Test with flag is no!'
5740 #cat conftest.c
5741 #echo "$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1"
5742 #echo `$CC $CPPFLAGS $CFLAGS -D__EXTENSIONS__ $ERRFLAG -c conftest.c 2>&1`
5743 #exit 1
5744 :
5745
5746 else
5747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
5748 $as_echo "failed" >&6; }
5749 :
5750
5751 fi
5752 fi
5753
5754
5755
5756
5757 # debug mode flags warnings
5758 # Check whether --enable-checking was given.
5759 if test "${enable_checking+set}" = set; then :
5760   enableval=$enable_checking;
5761 fi
5762
5763 # Check whether --enable-debug was given.
5764 if test "${enable_debug+set}" = set; then :
5765   enableval=$enable_debug;
5766 fi
5767
5768 if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
5769 else debug_enabled="$enable_checking"; fi
5770
5771 case "$debug_enabled" in
5772         yes)
5773
5774
5775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -W" >&5
5776 $as_echo_n "checking whether $CC supports -W... " >&6; }
5777 cache=`echo W | sed 'y%.=/+-%___p_%'`
5778 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5779   $as_echo_n "(cached) " >&6
5780 else
5781
5782 echo 'void f(void){}' >conftest.c
5783 if test -z "`$CC $CPPFLAGS $CFLAGS -W -c conftest.c 2>&1`"; then
5784 eval "cv_prog_cc_flag_$cache=yes"
5785 else
5786 eval "cv_prog_cc_flag_$cache=no"
5787 fi
5788 rm -f conftest conftest.o conftest.c
5789
5790 fi
5791
5792 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5794 $as_echo "yes" >&6; }
5795 :
5796 CFLAGS="$CFLAGS -W"
5797 else
5798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5799 $as_echo "no" >&6; }
5800 :
5801
5802 fi
5803
5804
5805
5806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wall" >&5
5807 $as_echo_n "checking whether $CC supports -Wall... " >&6; }
5808 cache=`echo Wall | sed 'y%.=/+-%___p_%'`
5809 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5810   $as_echo_n "(cached) " >&6
5811 else
5812
5813 echo 'void f(void){}' >conftest.c
5814 if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
5815 eval "cv_prog_cc_flag_$cache=yes"
5816 else
5817 eval "cv_prog_cc_flag_$cache=no"
5818 fi
5819 rm -f conftest conftest.o conftest.c
5820
5821 fi
5822
5823 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5825 $as_echo "yes" >&6; }
5826 :
5827 CFLAGS="$CFLAGS -Wall"
5828 else
5829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5830 $as_echo "no" >&6; }
5831 :
5832
5833 fi
5834
5835
5836
5837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wextra" >&5
5838 $as_echo_n "checking whether $CC supports -Wextra... " >&6; }
5839 cache=`echo Wextra | sed 'y%.=/+-%___p_%'`
5840 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5841   $as_echo_n "(cached) " >&6
5842 else
5843
5844 echo 'void f(void){}' >conftest.c
5845 if test -z "`$CC $CPPFLAGS $CFLAGS -Wextra -c conftest.c 2>&1`"; then
5846 eval "cv_prog_cc_flag_$cache=yes"
5847 else
5848 eval "cv_prog_cc_flag_$cache=no"
5849 fi
5850 rm -f conftest conftest.o conftest.c
5851
5852 fi
5853
5854 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5856 $as_echo "yes" >&6; }
5857 :
5858 CFLAGS="$CFLAGS -Wextra"
5859 else
5860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5861 $as_echo "no" >&6; }
5862 :
5863
5864 fi
5865
5866
5867
5868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
5869 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
5870 cache=`echo Wdeclaration-after-statement | sed 'y%.=/+-%___p_%'`
5871 if eval \${cv_prog_cc_flag_$cache+:} false; then :
5872   $as_echo_n "(cached) " >&6
5873 else
5874
5875 echo 'void f(void){}' >conftest.c
5876 if test -z "`$CC $CPPFLAGS $CFLAGS -Wdeclaration-after-statement -c conftest.c 2>&1`"; then
5877 eval "cv_prog_cc_flag_$cache=yes"
5878 else
5879 eval "cv_prog_cc_flag_$cache=no"
5880 fi
5881 rm -f conftest conftest.o conftest.c
5882
5883 fi
5884
5885 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
5886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5887 $as_echo "yes" >&6; }
5888 :
5889 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
5890 else
5891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5892 $as_echo "no" >&6; }
5893 :
5894
5895 fi
5896
5897
5898 $as_echo "#define UNBOUND_DEBUG /**/" >>confdefs.h
5899
5900                 ;;
5901         no|*)
5902                 # nothing to do.
5903                 ;;
5904 esac
5905
5906     # Check whether --enable-flto was given.
5907 if test "${enable_flto+set}" = set; then :
5908   enableval=$enable_flto;
5909 fi
5910
5911     if test "x$enable_flto" != "xno"; then :
5912
5913         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -flto" >&5
5914 $as_echo_n "checking if $CC supports -flto... " >&6; }
5915         BAKCFLAGS="$CFLAGS"
5916         CFLAGS="$CFLAGS -flto"
5917         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5918 /* end confdefs.h.  */
5919
5920 int
5921 main ()
5922 {
5923
5924   ;
5925   return 0;
5926 }
5927 _ACEOF
5928 if ac_fn_c_try_link "$LINENO"; then :
5929
5930             if $CC $CFLAGS -o conftest conftest.c 2>&1 | $GREP -e "warning: no debug symbols in executable" -e "warning: object" >/dev/null; then
5931                 CFLAGS="$BAKCFLAGS"
5932                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5933 $as_echo "no" >&6; }
5934             else
5935                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5936 $as_echo "yes" >&6; }
5937             fi
5938             rm -f conftest conftest.c conftest.o
5939
5940 else
5941   CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5942 $as_echo "no" >&6; }
5943 fi
5944 rm -f core conftest.err conftest.$ac_objext \
5945     conftest$ac_exeext conftest.$ac_ext
5946
5947 fi
5948
5949
5950     # Check whether --enable-pie was given.
5951 if test "${enable_pie+set}" = set; then :
5952   enableval=$enable_pie;
5953 fi
5954
5955     if test "x$enable_pie" = "xyes"; then :
5956
5957         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports PIE" >&5
5958 $as_echo_n "checking if $CC supports PIE... " >&6; }
5959         BAKLDFLAGS="$LDFLAGS"
5960         BAKCFLAGS="$CFLAGS"
5961         LDFLAGS="$LDFLAGS -pie"
5962         CFLAGS="$CFLAGS -fPIE"
5963         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5964 /* end confdefs.h.  */
5965
5966 int
5967 main ()
5968 {
5969
5970   ;
5971   return 0;
5972 }
5973 _ACEOF
5974 if ac_fn_c_try_link "$LINENO"; then :
5975
5976             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
5977                 LDFLAGS="$BAKLDFLAGS"
5978                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5979 $as_echo "no" >&6; }
5980             else
5981                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5982 $as_echo "yes" >&6; }
5983             fi
5984             rm -f conftest conftest.c conftest.o
5985
5986 else
5987   LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5988 $as_echo "no" >&6; }
5989 fi
5990 rm -f core conftest.err conftest.$ac_objext \
5991     conftest$ac_exeext conftest.$ac_ext
5992
5993 fi
5994
5995
5996     # Check whether --enable-relro_now was given.
5997 if test "${enable_relro_now+set}" = set; then :
5998   enableval=$enable_relro_now;
5999 fi
6000
6001     if test "x$enable_relro_now" = "xyes"; then :
6002
6003         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wl,-z,relro,-z,now" >&5
6004 $as_echo_n "checking if $CC supports -Wl,-z,relro,-z,now... " >&6; }
6005         BAKLDFLAGS="$LDFLAGS"
6006         LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
6007         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6008 /* end confdefs.h.  */
6009
6010 int
6011 main ()
6012 {
6013
6014   ;
6015   return 0;
6016 }
6017 _ACEOF
6018 if ac_fn_c_try_link "$LINENO"; then :
6019
6020             if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
6021                 LDFLAGS="$BAKLDFLAGS"
6022                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6023 $as_echo "no" >&6; }
6024             else
6025                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6026 $as_echo "yes" >&6; }
6027             fi
6028             rm -f conftest conftest.c conftest.o
6029
6030 else
6031   LDFLAGS="$BAKLDFLAGS" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6032 $as_echo "no" >&6; }
6033 fi
6034 rm -f core conftest.err conftest.$ac_objext \
6035     conftest$ac_exeext conftest.$ac_ext
6036
6037 fi
6038
6039
6040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6041 $as_echo_n "checking for inline... " >&6; }
6042 if ${ac_cv_c_inline+:} false; then :
6043   $as_echo_n "(cached) " >&6
6044 else
6045   ac_cv_c_inline=no
6046 for ac_kw in inline __inline__ __inline; do
6047   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6048 /* end confdefs.h.  */
6049 #ifndef __cplusplus
6050 typedef int foo_t;
6051 static $ac_kw foo_t static_foo () {return 0; }
6052 $ac_kw foo_t foo () {return 0; }
6053 #endif
6054
6055 _ACEOF
6056 if ac_fn_c_try_compile "$LINENO"; then :
6057   ac_cv_c_inline=$ac_kw
6058 fi
6059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6060   test "$ac_cv_c_inline" != no && break
6061 done
6062
6063 fi
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6065 $as_echo "$ac_cv_c_inline" >&6; }
6066
6067 case $ac_cv_c_inline in
6068   inline | yes) ;;
6069   *)
6070     case $ac_cv_c_inline in
6071       no) ac_val=;;
6072       *) ac_val=$ac_cv_c_inline;;
6073     esac
6074     cat >>confdefs.h <<_ACEOF
6075 #ifndef __cplusplus
6076 #define inline $ac_val
6077 #endif
6078 _ACEOF
6079     ;;
6080 esac
6081
6082
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute" >&5
6084 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"format\" attribute... " >&6; }
6085 if ${ac_cv_c_format_attribute+:} false; then :
6086   $as_echo_n "(cached) " >&6
6087 else
6088   ac_cv_c_format_attribute=no
6089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6090 /* end confdefs.h.  */
6091 #include <stdio.h>
6092 void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6093 void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
6094
6095 int
6096 main ()
6097 {
6098
6099    f ("%s", "str");
6100
6101   ;
6102   return 0;
6103 }
6104 _ACEOF
6105 if ac_fn_c_try_compile "$LINENO"; then :
6106   ac_cv_c_format_attribute="yes"
6107 else
6108   ac_cv_c_format_attribute="no"
6109 fi
6110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6111
6112 fi
6113
6114
6115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_format_attribute" >&5
6116 $as_echo "$ac_cv_c_format_attribute" >&6; }
6117 if test $ac_cv_c_format_attribute = yes; then
6118
6119 $as_echo "#define HAVE_ATTR_FORMAT 1" >>confdefs.h
6120
6121 fi
6122
6123
6124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute" >&5
6125 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"unused\" attribute... " >&6; }
6126 if ${ac_cv_c_unused_attribute+:} false; then :
6127   $as_echo_n "(cached) " >&6
6128 else
6129   ac_cv_c_unused_attribute=no
6130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6131 /* end confdefs.h.  */
6132 #include <stdio.h>
6133 void f (char *u __attribute__((unused)));
6134
6135 int
6136 main ()
6137 {
6138
6139    f ("x");
6140
6141   ;
6142   return 0;
6143 }
6144 _ACEOF
6145 if ac_fn_c_try_compile "$LINENO"; then :
6146   ac_cv_c_unused_attribute="yes"
6147 else
6148   ac_cv_c_unused_attribute="no"
6149 fi
6150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6151
6152 fi
6153
6154
6155
6156
6157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_unused_attribute" >&5
6158 $as_echo "$ac_cv_c_unused_attribute" >&6; }
6159 if test $ac_cv_c_unused_attribute = yes; then
6160
6161 $as_echo "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
6162
6163 fi
6164
6165
6166
6167
6168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
6169 $as_echo_n "checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute... " >&6; }
6170 if ${ac_cv_c_weak_attribute+:} false; then :
6171   $as_echo_n "(cached) " >&6
6172 else
6173   ac_cv_c_weak_attribute=no
6174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6175 /* end confdefs.h.  */
6176  #include <stdio.h>
6177 __attribute__((weak)) void f(int x) { printf("%d", x); }
6178
6179 int
6180 main ()
6181 {
6182
6183    f(1);
6184
6185   ;
6186   return 0;
6187 }
6188 _ACEOF
6189 if ac_fn_c_try_compile "$LINENO"; then :
6190   ac_cv_c_weak_attribute="yes"
6191 else
6192   ac_cv_c_weak_attribute="no"
6193 fi
6194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6195
6196 fi
6197
6198
6199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_weak_attribute" >&5
6200 $as_echo "$ac_cv_c_weak_attribute" >&6; }
6201 if test $ac_cv_c_weak_attribute = yes; then
6202
6203 $as_echo "#define HAVE_ATTR_WEAK 1" >>confdefs.h
6204
6205 fi
6206
6207
6208 if test "$srcdir" != "."; then
6209         CPPFLAGS="$CPPFLAGS -I$srcdir"
6210 fi
6211
6212
6213
6214 for ac_prog in flex lex
6215 do
6216   # Extract the first word of "$ac_prog", so it can be a program name with args.
6217 set dummy $ac_prog; ac_word=$2
6218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6219 $as_echo_n "checking for $ac_word... " >&6; }
6220 if ${ac_cv_prog_LEX+:} false; then :
6221   $as_echo_n "(cached) " >&6
6222 else
6223   if test -n "$LEX"; then
6224   ac_cv_prog_LEX="$LEX" # Let the user override the test.
6225 else
6226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6227 for as_dir in $PATH
6228 do
6229   IFS=$as_save_IFS
6230   test -z "$as_dir" && as_dir=.
6231     for ac_exec_ext in '' $ac_executable_extensions; do
6232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6233     ac_cv_prog_LEX="$ac_prog"
6234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6235     break 2
6236   fi
6237 done
6238   done
6239 IFS=$as_save_IFS
6240
6241 fi
6242 fi
6243 LEX=$ac_cv_prog_LEX
6244 if test -n "$LEX"; then
6245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
6246 $as_echo "$LEX" >&6; }
6247 else
6248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6249 $as_echo "no" >&6; }
6250 fi
6251
6252
6253   test -n "$LEX" && break
6254 done
6255 test -n "$LEX" || LEX=":"
6256
6257 if test "x$LEX" != "x:"; then
6258   cat >conftest.l <<_ACEOF
6259 %%
6260 a { ECHO; }
6261 b { REJECT; }
6262 c { yymore (); }
6263 d { yyless (1); }
6264 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
6265     yyless ((input () != 0)); }
6266 f { unput (yytext[0]); }
6267 . { BEGIN INITIAL; }
6268 %%
6269 #ifdef YYTEXT_POINTER
6270 extern char *yytext;
6271 #endif
6272 int
6273 main (void)
6274 {
6275   return ! yylex () + ! yywrap ();
6276 }
6277 _ACEOF
6278 { { ac_try="$LEX conftest.l"
6279 case "(($ac_try" in
6280   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6281   *) ac_try_echo=$ac_try;;
6282 esac
6283 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6284 $as_echo "$ac_try_echo"; } >&5
6285   (eval "$LEX conftest.l") 2>&5
6286   ac_status=$?
6287   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6288   test $ac_status = 0; }
6289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
6290 $as_echo_n "checking lex output file root... " >&6; }
6291 if ${ac_cv_prog_lex_root+:} false; then :
6292   $as_echo_n "(cached) " >&6
6293 else
6294
6295 if test -f lex.yy.c; then
6296   ac_cv_prog_lex_root=lex.yy
6297 elif test -f lexyy.c; then
6298   ac_cv_prog_lex_root=lexyy
6299 else
6300   as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
6301 fi
6302 fi
6303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
6304 $as_echo "$ac_cv_prog_lex_root" >&6; }
6305 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
6306
6307 if test -z "${LEXLIB+set}"; then
6308   { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
6309 $as_echo_n "checking lex library... " >&6; }
6310 if ${ac_cv_lib_lex+:} false; then :
6311   $as_echo_n "(cached) " >&6
6312 else
6313
6314     ac_save_LIBS=$LIBS
6315     ac_cv_lib_lex='none needed'
6316     for ac_lib in '' -lfl -ll; do
6317       LIBS="$ac_lib $ac_save_LIBS"
6318       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6319 /* end confdefs.h.  */
6320 `cat $LEX_OUTPUT_ROOT.c`
6321 _ACEOF
6322 if ac_fn_c_try_link "$LINENO"; then :
6323   ac_cv_lib_lex=$ac_lib
6324 fi
6325 rm -f core conftest.err conftest.$ac_objext \
6326     conftest$ac_exeext conftest.$ac_ext
6327       test "$ac_cv_lib_lex" != 'none needed' && break
6328     done
6329     LIBS=$ac_save_LIBS
6330
6331 fi
6332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
6333 $as_echo "$ac_cv_lib_lex" >&6; }
6334   test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
6335 fi
6336
6337
6338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
6339 $as_echo_n "checking whether yytext is a pointer... " >&6; }
6340 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
6341   $as_echo_n "(cached) " >&6
6342 else
6343   # POSIX says lex can declare yytext either as a pointer or an array; the
6344 # default is implementation-dependent.  Figure out which it is, since
6345 # not all implementations provide the %pointer and %array declarations.
6346 ac_cv_prog_lex_yytext_pointer=no
6347 ac_save_LIBS=$LIBS
6348 LIBS="$LEXLIB $ac_save_LIBS"
6349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6350 /* end confdefs.h.  */
6351
6352   #define YYTEXT_POINTER 1
6353 `cat $LEX_OUTPUT_ROOT.c`
6354 _ACEOF
6355 if ac_fn_c_try_link "$LINENO"; then :
6356   ac_cv_prog_lex_yytext_pointer=yes
6357 fi
6358 rm -f core conftest.err conftest.$ac_objext \
6359     conftest$ac_exeext conftest.$ac_ext
6360 LIBS=$ac_save_LIBS
6361
6362 fi
6363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
6364 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
6365 if test $ac_cv_prog_lex_yytext_pointer = yes; then
6366
6367 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
6368
6369 fi
6370 rm -f conftest.l $LEX_OUTPUT_ROOT.c
6371
6372 fi
6373
6374         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yylex_destroy" >&5
6375 $as_echo_n "checking for yylex_destroy... " >&6; }
6376         if echo %% | $LEX -t 2>&1 | grep yylex_destroy >/dev/null 2>&1; then
6377
6378 $as_echo "#define LEX_HAS_YYLEX_DESTROY 1" >>confdefs.h
6379
6380                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6381 $as_echo "yes" >&6; }
6382         else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6383 $as_echo "no" >&6; }; fi
6384
6385 for ac_prog in 'bison -y' byacc
6386 do
6387   # Extract the first word of "$ac_prog", so it can be a program name with args.
6388 set dummy $ac_prog; ac_word=$2
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6390 $as_echo_n "checking for $ac_word... " >&6; }
6391 if ${ac_cv_prog_YACC+:} false; then :
6392   $as_echo_n "(cached) " >&6
6393 else
6394   if test -n "$YACC"; then
6395   ac_cv_prog_YACC="$YACC" # Let the user override the test.
6396 else
6397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6398 for as_dir in $PATH
6399 do
6400   IFS=$as_save_IFS
6401   test -z "$as_dir" && as_dir=.
6402     for ac_exec_ext in '' $ac_executable_extensions; do
6403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6404     ac_cv_prog_YACC="$ac_prog"
6405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6406     break 2
6407   fi
6408 done
6409   done
6410 IFS=$as_save_IFS
6411
6412 fi
6413 fi
6414 YACC=$ac_cv_prog_YACC
6415 if test -n "$YACC"; then
6416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6417 $as_echo "$YACC" >&6; }
6418 else
6419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6420 $as_echo "no" >&6; }
6421 fi
6422
6423
6424   test -n "$YACC" && break
6425 done
6426 test -n "$YACC" || YACC="yacc"
6427
6428 # Extract the first word of "doxygen", so it can be a program name with args.
6429 set dummy doxygen; ac_word=$2
6430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6431 $as_echo_n "checking for $ac_word... " >&6; }
6432 if ${ac_cv_prog_doxygen+:} false; then :
6433   $as_echo_n "(cached) " >&6
6434 else
6435   if test -n "$doxygen"; then
6436   ac_cv_prog_doxygen="$doxygen" # Let the user override the test.
6437 else
6438 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6439 for as_dir in $PATH
6440 do
6441   IFS=$as_save_IFS
6442   test -z "$as_dir" && as_dir=.
6443     for ac_exec_ext in '' $ac_executable_extensions; do
6444   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6445     ac_cv_prog_doxygen="doxygen"
6446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6447     break 2
6448   fi
6449 done
6450   done
6451 IFS=$as_save_IFS
6452
6453 fi
6454 fi
6455 doxygen=$ac_cv_prog_doxygen
6456 if test -n "$doxygen"; then
6457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doxygen" >&5
6458 $as_echo "$doxygen" >&6; }
6459 else
6460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6461 $as_echo "no" >&6; }
6462 fi
6463
6464
6465 if test -n "$ac_tool_prefix"; then
6466   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6467 set dummy ${ac_tool_prefix}strip; ac_word=$2
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6469 $as_echo_n "checking for $ac_word... " >&6; }
6470 if ${ac_cv_prog_STRIP+:} false; then :
6471   $as_echo_n "(cached) " >&6
6472 else
6473   if test -n "$STRIP"; then
6474   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6475 else
6476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6477 for as_dir in $PATH
6478 do
6479   IFS=$as_save_IFS
6480   test -z "$as_dir" && as_dir=.
6481     for ac_exec_ext in '' $ac_executable_extensions; do
6482   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6483     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6485     break 2
6486   fi
6487 done
6488   done
6489 IFS=$as_save_IFS
6490
6491 fi
6492 fi
6493 STRIP=$ac_cv_prog_STRIP
6494 if test -n "$STRIP"; then
6495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6496 $as_echo "$STRIP" >&6; }
6497 else
6498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499 $as_echo "no" >&6; }
6500 fi
6501
6502
6503 fi
6504 if test -z "$ac_cv_prog_STRIP"; then
6505   ac_ct_STRIP=$STRIP
6506   # Extract the first word of "strip", so it can be a program name with args.
6507 set dummy strip; ac_word=$2
6508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6509 $as_echo_n "checking for $ac_word... " >&6; }
6510 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6511   $as_echo_n "(cached) " >&6
6512 else
6513   if test -n "$ac_ct_STRIP"; then
6514   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6515 else
6516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6517 for as_dir in $PATH
6518 do
6519   IFS=$as_save_IFS
6520   test -z "$as_dir" && as_dir=.
6521     for ac_exec_ext in '' $ac_executable_extensions; do
6522   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6523     ac_cv_prog_ac_ct_STRIP="strip"
6524     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6525     break 2
6526   fi
6527 done
6528   done
6529 IFS=$as_save_IFS
6530
6531 fi
6532 fi
6533 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6534 if test -n "$ac_ct_STRIP"; then
6535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6536 $as_echo "$ac_ct_STRIP" >&6; }
6537 else
6538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6539 $as_echo "no" >&6; }
6540 fi
6541
6542   if test "x$ac_ct_STRIP" = x; then
6543     STRIP=""
6544   else
6545     case $cross_compiling:$ac_tool_warned in
6546 yes:)
6547 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6548 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6549 ac_tool_warned=yes ;;
6550 esac
6551     STRIP=$ac_ct_STRIP
6552   fi
6553 else
6554   STRIP="$ac_cv_prog_STRIP"
6555 fi
6556
6557 ac_aux_dir=
6558 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
6559   if test -f "$ac_dir/install-sh"; then
6560     ac_aux_dir=$ac_dir
6561     ac_install_sh="$ac_aux_dir/install-sh -c"
6562     break
6563   elif test -f "$ac_dir/install.sh"; then
6564     ac_aux_dir=$ac_dir
6565     ac_install_sh="$ac_aux_dir/install.sh -c"
6566     break
6567   elif test -f "$ac_dir/shtool"; then
6568     ac_aux_dir=$ac_dir
6569     ac_install_sh="$ac_aux_dir/shtool install -c"
6570     break
6571   fi
6572 done
6573 if test -z "$ac_aux_dir"; then
6574   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
6575 fi
6576
6577 # These three variables are undocumented and unsupported,
6578 # and are intended to be withdrawn in a future Autoconf release.
6579 # They can cause serious problems if a builder's source tree is in a directory
6580 # whose full name contains unusual characters.
6581 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
6582 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
6583 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
6584
6585
6586 # Make sure we can run config.sub.
6587 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6588   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6589
6590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6591 $as_echo_n "checking build system type... " >&6; }
6592 if ${ac_cv_build+:} false; then :
6593   $as_echo_n "(cached) " >&6
6594 else
6595   ac_build_alias=$build_alias
6596 test "x$ac_build_alias" = x &&
6597   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6598 test "x$ac_build_alias" = x &&
6599   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6600 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6601   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6602
6603 fi
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6605 $as_echo "$ac_cv_build" >&6; }
6606 case $ac_cv_build in
6607 *-*-*) ;;
6608 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6609 esac
6610 build=$ac_cv_build
6611 ac_save_IFS=$IFS; IFS='-'
6612 set x $ac_cv_build
6613 shift
6614 build_cpu=$1
6615 build_vendor=$2
6616 shift; shift
6617 # Remember, the first character of IFS is used to create $*,
6618 # except with old shells:
6619 build_os=$*
6620 IFS=$ac_save_IFS
6621 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6622
6623
6624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6625 $as_echo_n "checking host system type... " >&6; }
6626 if ${ac_cv_host+:} false; then :
6627   $as_echo_n "(cached) " >&6
6628 else
6629   if test "x$host_alias" = x; then
6630   ac_cv_host=$ac_cv_build
6631 else
6632   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6633     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6634 fi
6635
6636 fi
6637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6638 $as_echo "$ac_cv_host" >&6; }
6639 case $ac_cv_host in
6640 *-*-*) ;;
6641 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6642 esac
6643 host=$ac_cv_host
6644 ac_save_IFS=$IFS; IFS='-'
6645 set x $ac_cv_host
6646 shift
6647 host_cpu=$1
6648 host_vendor=$2
6649 shift; shift
6650 # Remember, the first character of IFS is used to create $*,
6651 # except with old shells:
6652 host_os=$*
6653 IFS=$ac_save_IFS
6654 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6655
6656
6657
6658 # skip these tests, we do not need them.
6659
6660
6661
6662
6663
6664
6665
6666
6667 # always use ./libtool unless override from commandline (libtool=mylibtool)
6668 if test -z "$libtool"; then
6669         libtool="./libtool"
6670 fi
6671
6672 # avoid libtool max commandline length test on systems that fork slowly.
6673
6674 if echo "$host_os" | grep "sunos4" >/dev/null; then
6675         lt_cv_sys_max_cmd_len=32750;
6676 fi
6677 if test -n "$ac_tool_prefix"; then
6678   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6679 set dummy ${ac_tool_prefix}ar; ac_word=$2
6680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6681 $as_echo_n "checking for $ac_word... " >&6; }
6682 if ${ac_cv_path_AR+:} false; then :
6683   $as_echo_n "(cached) " >&6
6684 else
6685   case $AR in
6686   [\\/]* | ?:[\\/]*)
6687   ac_cv_path_AR="$AR" # Let the user override the test with a path.
6688   ;;
6689   *)
6690   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6691 for as_dir in $PATH
6692 do
6693   IFS=$as_save_IFS
6694   test -z "$as_dir" && as_dir=.
6695     for ac_exec_ext in '' $ac_executable_extensions; do
6696   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6697     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
6698     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6699     break 2
6700   fi
6701 done
6702   done
6703 IFS=$as_save_IFS
6704
6705   ;;
6706 esac
6707 fi
6708 AR=$ac_cv_path_AR
6709 if test -n "$AR"; then
6710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6711 $as_echo "$AR" >&6; }
6712 else
6713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6714 $as_echo "no" >&6; }
6715 fi
6716
6717
6718 fi
6719 if test -z "$ac_cv_path_AR"; then
6720   ac_pt_AR=$AR
6721   # Extract the first word of "ar", so it can be a program name with args.
6722 set dummy ar; ac_word=$2
6723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6724 $as_echo_n "checking for $ac_word... " >&6; }
6725 if ${ac_cv_path_ac_pt_AR+:} false; then :
6726   $as_echo_n "(cached) " >&6
6727 else
6728   case $ac_pt_AR in
6729   [\\/]* | ?:[\\/]*)
6730   ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path.
6731   ;;
6732   *)
6733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6734 for as_dir in $PATH
6735 do
6736   IFS=$as_save_IFS
6737   test -z "$as_dir" && as_dir=.
6738     for ac_exec_ext in '' $ac_executable_extensions; do
6739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6740     ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
6741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6742     break 2
6743   fi
6744 done
6745   done
6746 IFS=$as_save_IFS
6747
6748   ;;
6749 esac
6750 fi
6751 ac_pt_AR=$ac_cv_path_ac_pt_AR
6752 if test -n "$ac_pt_AR"; then
6753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5
6754 $as_echo "$ac_pt_AR" >&6; }
6755 else
6756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6757 $as_echo "no" >&6; }
6758 fi
6759
6760   if test "x$ac_pt_AR" = x; then
6761     AR="false"
6762   else
6763     case $cross_compiling:$ac_tool_warned in
6764 yes:)
6765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6766 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6767 ac_tool_warned=yes ;;
6768 esac
6769     AR=$ac_pt_AR
6770   fi
6771 else
6772   AR="$ac_cv_path_AR"
6773 fi
6774
6775 if test $AR = false; then
6776         as_fn_error $? "Cannot find 'ar', please extend PATH to include it" "$LINENO" 5
6777 fi
6778
6779 case `pwd` in
6780   *\ * | *\     *)
6781     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6782 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6783 esac
6784
6785
6786
6787 macro_version='2.4.6'
6788 macro_revision='2.4.6'
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802 ltmain=$ac_aux_dir/ltmain.sh
6803
6804 # Backslashify metacharacters that are still active within
6805 # double-quoted strings.
6806 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6807
6808 # Same as above, but do not quote variable references.
6809 double_quote_subst='s/\(["`\\]\)/\\\1/g'
6810
6811 # Sed substitution to delay expansion of an escaped shell variable in a
6812 # double_quote_subst'ed string.
6813 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6814
6815 # Sed substitution to delay expansion of an escaped single quote.
6816 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6817
6818 # Sed substitution to avoid accidental globbing in evaled expressions
6819 no_glob_subst='s/\*/\\\*/g'
6820
6821 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6822 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6823 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6824
6825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6826 $as_echo_n "checking how to print strings... " >&6; }
6827 # Test print first, because it will be a builtin if present.
6828 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6829    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6830   ECHO='print -r --'
6831 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6832   ECHO='printf %s\n'
6833 else
6834   # Use this function as a fallback that always works.
6835   func_fallback_echo ()
6836   {
6837     eval 'cat <<_LTECHO_EOF
6838 $1
6839 _LTECHO_EOF'
6840   }
6841   ECHO='func_fallback_echo'
6842 fi
6843
6844 # func_echo_all arg...
6845 # Invoke $ECHO with all args, space-separated.
6846 func_echo_all ()
6847 {
6848     $ECHO ""
6849 }
6850
6851 case $ECHO in
6852   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6853 $as_echo "printf" >&6; } ;;
6854   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6855 $as_echo "print -r" >&6; } ;;
6856   *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6857 $as_echo "cat" >&6; } ;;
6858 esac
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6874 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6875 if ${ac_cv_path_SED+:} false; then :
6876   $as_echo_n "(cached) " >&6
6877 else
6878             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6879      for ac_i in 1 2 3 4 5 6 7; do
6880        ac_script="$ac_script$as_nl$ac_script"
6881      done
6882      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6883      { ac_script=; unset ac_script;}
6884      if test -z "$SED"; then
6885   ac_path_SED_found=false
6886   # Loop through the user's path and test for each of PROGNAME-LIST
6887   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6888 for as_dir in $PATH
6889 do
6890   IFS=$as_save_IFS
6891   test -z "$as_dir" && as_dir=.
6892     for ac_prog in sed gsed; do
6893     for ac_exec_ext in '' $ac_executable_extensions; do
6894       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6895       as_fn_executable_p "$ac_path_SED" || continue
6896 # Check for GNU ac_path_SED and select it if it is found.
6897   # Check for GNU $ac_path_SED
6898 case `"$ac_path_SED" --version 2>&1` in
6899 *GNU*)
6900   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6901 *)
6902   ac_count=0
6903   $as_echo_n 0123456789 >"conftest.in"
6904   while :
6905   do
6906     cat "conftest.in" "conftest.in" >"conftest.tmp"
6907     mv "conftest.tmp" "conftest.in"
6908     cp "conftest.in" "conftest.nl"
6909     $as_echo '' >> "conftest.nl"
6910     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6911     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6912     as_fn_arith $ac_count + 1 && ac_count=$as_val
6913     if test $ac_count -gt ${ac_path_SED_max-0}; then
6914       # Best one so far, save it but keep looking for a better one
6915       ac_cv_path_SED="$ac_path_SED"
6916       ac_path_SED_max=$ac_count
6917     fi
6918     # 10*(2^10) chars as input seems more than enough
6919     test $ac_count -gt 10 && break
6920   done
6921   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6922 esac
6923
6924       $ac_path_SED_found && break 3
6925     done
6926   done
6927   done
6928 IFS=$as_save_IFS
6929   if test -z "$ac_cv_path_SED"; then
6930     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6931   fi
6932 else
6933   ac_cv_path_SED=$SED
6934 fi
6935
6936 fi
6937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6938 $as_echo "$ac_cv_path_SED" >&6; }
6939  SED="$ac_cv_path_SED"
6940   rm -f conftest.sed
6941
6942 test -z "$SED" && SED=sed
6943 Xsed="$SED -e 1s/^X//"
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6956 $as_echo_n "checking for fgrep... " >&6; }
6957 if ${ac_cv_path_FGREP+:} false; then :
6958   $as_echo_n "(cached) " >&6
6959 else
6960   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6961    then ac_cv_path_FGREP="$GREP -F"
6962    else
6963      if test -z "$FGREP"; then
6964   ac_path_FGREP_found=false
6965   # Loop through the user's path and test for each of PROGNAME-LIST
6966   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6967 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6968 do
6969   IFS=$as_save_IFS
6970   test -z "$as_dir" && as_dir=.
6971     for ac_prog in fgrep; do
6972     for ac_exec_ext in '' $ac_executable_extensions; do
6973       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6974       as_fn_executable_p "$ac_path_FGREP" || continue
6975 # Check for GNU ac_path_FGREP and select it if it is found.
6976   # Check for GNU $ac_path_FGREP
6977 case `"$ac_path_FGREP" --version 2>&1` in
6978 *GNU*)
6979   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6980 *)
6981   ac_count=0
6982   $as_echo_n 0123456789 >"conftest.in"
6983   while :
6984   do
6985     cat "conftest.in" "conftest.in" >"conftest.tmp"
6986     mv "conftest.tmp" "conftest.in"
6987     cp "conftest.in" "conftest.nl"
6988     $as_echo 'FGREP' >> "conftest.nl"
6989     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6990     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6991     as_fn_arith $ac_count + 1 && ac_count=$as_val
6992     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6993       # Best one so far, save it but keep looking for a better one
6994       ac_cv_path_FGREP="$ac_path_FGREP"
6995       ac_path_FGREP_max=$ac_count
6996     fi
6997     # 10*(2^10) chars as input seems more than enough
6998     test $ac_count -gt 10 && break
6999   done
7000   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7001 esac
7002
7003       $ac_path_FGREP_found && break 3
7004     done
7005   done
7006   done
7007 IFS=$as_save_IFS
7008   if test -z "$ac_cv_path_FGREP"; then
7009     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7010   fi
7011 else
7012   ac_cv_path_FGREP=$FGREP
7013 fi
7014
7015    fi
7016 fi
7017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7018 $as_echo "$ac_cv_path_FGREP" >&6; }
7019  FGREP="$ac_cv_path_FGREP"
7020
7021
7022 test -z "$GREP" && GREP=grep
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042 # Check whether --with-gnu-ld was given.
7043 if test "${with_gnu_ld+set}" = set; then :
7044   withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7045 else
7046   with_gnu_ld=no
7047 fi
7048
7049 ac_prog=ld
7050 if test yes = "$GCC"; then
7051   # Check if gcc -print-prog-name=ld gives a path.
7052   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7053 $as_echo_n "checking for ld used by $CC... " >&6; }
7054   case $host in
7055   *-*-mingw*)
7056     # gcc leaves a trailing carriage return, which upsets mingw
7057     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7058   *)
7059     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7060   esac
7061   case $ac_prog in
7062     # Accept absolute paths.
7063     [\\/]* | ?:[\\/]*)
7064       re_direlt='/[^/][^/]*/\.\./'
7065       # Canonicalize the pathname of ld
7066       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7067       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7068         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7069       done
7070       test -z "$LD" && LD=$ac_prog
7071       ;;
7072   "")
7073     # If it fails, then pretend we aren't using GCC.
7074     ac_prog=ld
7075     ;;
7076   *)
7077     # If it is relative, then search for the first ld in PATH.
7078     with_gnu_ld=unknown
7079     ;;
7080   esac
7081 elif test yes = "$with_gnu_ld"; then
7082   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7083 $as_echo_n "checking for GNU ld... " >&6; }
7084 else
7085   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7086 $as_echo_n "checking for non-GNU ld... " >&6; }
7087 fi
7088 if ${lt_cv_path_LD+:} false; then :
7089   $as_echo_n "(cached) " >&6
7090 else
7091   if test -z "$LD"; then
7092   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7093   for ac_dir in $PATH; do
7094     IFS=$lt_save_ifs
7095     test -z "$ac_dir" && ac_dir=.
7096     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7097       lt_cv_path_LD=$ac_dir/$ac_prog
7098       # Check to see if the program is GNU ld.  I'd rather use --version,
7099       # but apparently some variants of GNU ld only accept -v.
7100       # Break only if it was the GNU/non-GNU ld that we prefer.
7101       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7102       *GNU* | *'with BFD'*)
7103         test no != "$with_gnu_ld" && break
7104         ;;
7105       *)
7106         test yes != "$with_gnu_ld" && break
7107         ;;
7108       esac
7109     fi
7110   done
7111   IFS=$lt_save_ifs
7112 else
7113   lt_cv_path_LD=$LD # Let the user override the test with a path.
7114 fi
7115 fi
7116
7117 LD=$lt_cv_path_LD
7118 if test -n "$LD"; then
7119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7120 $as_echo "$LD" >&6; }
7121 else
7122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7123 $as_echo "no" >&6; }
7124 fi
7125 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7127 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7128 if ${lt_cv_prog_gnu_ld+:} false; then :
7129   $as_echo_n "(cached) " >&6
7130 else
7131   # I'd rather use --version here, but apparently some GNU lds only accept -v.
7132 case `$LD -v 2>&1 </dev/null` in
7133 *GNU* | *'with BFD'*)
7134   lt_cv_prog_gnu_ld=yes
7135   ;;
7136 *)
7137   lt_cv_prog_gnu_ld=no
7138   ;;
7139 esac
7140 fi
7141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7142 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
7143 with_gnu_ld=$lt_cv_prog_gnu_ld
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7154 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7155 if ${lt_cv_path_NM+:} false; then :
7156   $as_echo_n "(cached) " >&6
7157 else
7158   if test -n "$NM"; then
7159   # Let the user override the test.
7160   lt_cv_path_NM=$NM
7161 else
7162   lt_nm_to_check=${ac_tool_prefix}nm
7163   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7164     lt_nm_to_check="$lt_nm_to_check nm"
7165   fi
7166   for lt_tmp_nm in $lt_nm_to_check; do
7167     lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7168     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7169       IFS=$lt_save_ifs
7170       test -z "$ac_dir" && ac_dir=.
7171       tmp_nm=$ac_dir/$lt_tmp_nm
7172       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7173         # Check to see if the nm accepts a BSD-compat flag.
7174         # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7175         #   nm: unknown option "B" ignored
7176         # Tru64's nm complains that /dev/null is an invalid object file
7177         # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7178         case $build_os in
7179         mingw*) lt_bad_file=conftest.nm/nofile ;;
7180         *) lt_bad_file=/dev/null ;;
7181         esac
7182         case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7183         *$lt_bad_file* | *'Invalid file or object type'*)
7184           lt_cv_path_NM="$tmp_nm -B"
7185           break 2
7186           ;;
7187         *)
7188           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7189           */dev/null*)
7190             lt_cv_path_NM="$tmp_nm -p"
7191             break 2
7192             ;;
7193           *)
7194             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7195             continue # so that we can try to find one that supports BSD flags
7196             ;;
7197           esac
7198           ;;
7199         esac
7200       fi
7201     done
7202     IFS=$lt_save_ifs
7203   done
7204   : ${lt_cv_path_NM=no}
7205 fi
7206 fi
7207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7208 $as_echo "$lt_cv_path_NM" >&6; }
7209 if test no != "$lt_cv_path_NM"; then
7210   NM=$lt_cv_path_NM
7211 else
7212   # Didn't find any BSD compatible name lister, look for dumpbin.
7213   if test -n "$DUMPBIN"; then :
7214     # Let the user override the test.
7215   else
7216     if test -n "$ac_tool_prefix"; then
7217   for ac_prog in dumpbin "link -dump"
7218   do
7219     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7220 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7222 $as_echo_n "checking for $ac_word... " >&6; }
7223 if ${ac_cv_prog_DUMPBIN+:} false; then :
7224   $as_echo_n "(cached) " >&6
7225 else
7226   if test -n "$DUMPBIN"; then
7227   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7228 else
7229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7230 for as_dir in $PATH
7231 do
7232   IFS=$as_save_IFS
7233   test -z "$as_dir" && as_dir=.
7234     for ac_exec_ext in '' $ac_executable_extensions; do
7235   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7236     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7237     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7238     break 2
7239   fi
7240 done
7241   done
7242 IFS=$as_save_IFS
7243
7244 fi
7245 fi
7246 DUMPBIN=$ac_cv_prog_DUMPBIN
7247 if test -n "$DUMPBIN"; then
7248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7249 $as_echo "$DUMPBIN" >&6; }
7250 else
7251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7252 $as_echo "no" >&6; }
7253 fi
7254
7255
7256     test -n "$DUMPBIN" && break
7257   done
7258 fi
7259 if test -z "$DUMPBIN"; then
7260   ac_ct_DUMPBIN=$DUMPBIN
7261   for ac_prog in dumpbin "link -dump"
7262 do
7263   # Extract the first word of "$ac_prog", so it can be a program name with args.
7264 set dummy $ac_prog; ac_word=$2
7265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7266 $as_echo_n "checking for $ac_word... " >&6; }
7267 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
7268   $as_echo_n "(cached) " >&6
7269 else
7270   if test -n "$ac_ct_DUMPBIN"; then
7271   ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7272 else
7273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7274 for as_dir in $PATH
7275 do
7276   IFS=$as_save_IFS
7277   test -z "$as_dir" && as_dir=.
7278     for ac_exec_ext in '' $ac_executable_extensions; do
7279   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7280     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7281     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7282     break 2
7283   fi
7284 done
7285   done
7286 IFS=$as_save_IFS
7287
7288 fi
7289 fi
7290 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7291 if test -n "$ac_ct_DUMPBIN"; then
7292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7293 $as_echo "$ac_ct_DUMPBIN" >&6; }
7294 else
7295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7296 $as_echo "no" >&6; }
7297 fi
7298
7299
7300   test -n "$ac_ct_DUMPBIN" && break
7301 done
7302
7303   if test "x$ac_ct_DUMPBIN" = x; then
7304     DUMPBIN=":"
7305   else
7306     case $cross_compiling:$ac_tool_warned in
7307 yes:)
7308 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7309 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7310 ac_tool_warned=yes ;;
7311 esac
7312     DUMPBIN=$ac_ct_DUMPBIN
7313   fi
7314 fi
7315
7316     case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7317     *COFF*)
7318       DUMPBIN="$DUMPBIN -symbols -headers"
7319       ;;
7320     *)
7321       DUMPBIN=:
7322       ;;
7323     esac
7324   fi
7325
7326   if test : != "$DUMPBIN"; then
7327     NM=$DUMPBIN
7328   fi
7329 fi
7330 test -z "$NM" && NM=nm
7331
7332
7333
7334
7335
7336
7337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7338 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
7339 if ${lt_cv_nm_interface+:} false; then :
7340   $as_echo_n "(cached) " >&6
7341 else
7342   lt_cv_nm_interface="BSD nm"
7343   echo "int some_variable = 0;" > conftest.$ac_ext
7344   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7345   (eval "$ac_compile" 2>conftest.err)
7346   cat conftest.err >&5
7347   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7348   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7349   cat conftest.err >&5
7350   (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7351   cat conftest.out >&5
7352   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7353     lt_cv_nm_interface="MS dumpbin"
7354   fi
7355   rm -f conftest*
7356 fi
7357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7358 $as_echo "$lt_cv_nm_interface" >&6; }
7359
7360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7361 $as_echo_n "checking whether ln -s works... " >&6; }
7362 LN_S=$as_ln_s
7363 if test "$LN_S" = "ln -s"; then
7364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7365 $as_echo "yes" >&6; }
7366 else
7367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7368 $as_echo "no, using $LN_S" >&6; }
7369 fi
7370
7371 # find the maximum length of command line arguments
7372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7373 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7374 if ${lt_cv_sys_max_cmd_len+:} false; then :
7375   $as_echo_n "(cached) " >&6
7376 else
7377     i=0
7378   teststring=ABCD
7379
7380   case $build_os in
7381   msdosdjgpp*)
7382     # On DJGPP, this test can blow up pretty badly due to problems in libc
7383     # (any single argument exceeding 2000 bytes causes a buffer overrun
7384     # during glob expansion).  Even if it were fixed, the result of this
7385     # check would be larger than it should be.
7386     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7387     ;;
7388
7389   gnu*)
7390     # Under GNU Hurd, this test is not required because there is
7391     # no limit to the length of command line arguments.
7392     # Libtool will interpret -1 as no limit whatsoever
7393     lt_cv_sys_max_cmd_len=-1;
7394     ;;
7395
7396   cygwin* | mingw* | cegcc*)
7397     # On Win9x/ME, this test blows up -- it succeeds, but takes
7398     # about 5 minutes as the teststring grows exponentially.
7399     # Worse, since 9x/ME are not pre-emptively multitasking,
7400     # you end up with a "frozen" computer, even though with patience
7401     # the test eventually succeeds (with a max line length of 256k).
7402     # Instead, let's just punt: use the minimum linelength reported by
7403     # all of the supported platforms: 8192 (on NT/2K/XP).
7404     lt_cv_sys_max_cmd_len=8192;
7405     ;;
7406
7407   mint*)
7408     # On MiNT this can take a long time and run out of memory.
7409     lt_cv_sys_max_cmd_len=8192;
7410     ;;
7411
7412   amigaos*)
7413     # On AmigaOS with pdksh, this test takes hours, literally.
7414     # So we just punt and use a minimum line length of 8192.
7415     lt_cv_sys_max_cmd_len=8192;
7416     ;;
7417
7418   bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7419     # This has been around since 386BSD, at least.  Likely further.
7420     if test -x /sbin/sysctl; then
7421       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7422     elif test -x /usr/sbin/sysctl; then
7423       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7424     else
7425       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7426     fi
7427     # And add a safety zone
7428     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7429     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7430     ;;
7431
7432   interix*)
7433     # We know the value 262144 and hardcode it with a safety zone (like BSD)
7434     lt_cv_sys_max_cmd_len=196608
7435     ;;
7436
7437   os2*)
7438     # The test takes a long time on OS/2.
7439     lt_cv_sys_max_cmd_len=8192
7440     ;;
7441
7442   osf*)
7443     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7444     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7445     # nice to cause kernel panics so lets avoid the loop below.
7446     # First set a reasonable default.
7447     lt_cv_sys_max_cmd_len=16384
7448     #
7449     if test -x /sbin/sysconfig; then
7450       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7451         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7452       esac
7453     fi
7454     ;;
7455   sco3.2v5*)
7456     lt_cv_sys_max_cmd_len=102400
7457     ;;
7458   sysv5* | sco5v6* | sysv4.2uw2*)
7459     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7460     if test -n "$kargmax"; then
7461       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[  ]//'`
7462     else
7463       lt_cv_sys_max_cmd_len=32768
7464     fi
7465     ;;
7466   *)
7467     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7468     if test -n "$lt_cv_sys_max_cmd_len" && \
7469        test undefined != "$lt_cv_sys_max_cmd_len"; then
7470       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7471       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7472     else
7473       # Make teststring a little bigger before we do anything with it.
7474       # a 1K string should be a reasonable start.
7475       for i in 1 2 3 4 5 6 7 8; do
7476         teststring=$teststring$teststring
7477       done
7478       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7479       # If test is not a shell built-in, we'll probably end up computing a
7480       # maximum length that is only half of the actual maximum length, but
7481       # we can't tell.
7482       while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7483                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7484               test 17 != "$i" # 1/2 MB should be enough
7485       do
7486         i=`expr $i + 1`
7487         teststring=$teststring$teststring
7488       done
7489       # Only check the string length outside the loop.
7490       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7491       teststring=
7492       # Add a significant safety factor because C++ compilers can tack on
7493       # massive amounts of additional arguments before passing them to the
7494       # linker.  It appears as though 1/2 is a usable value.
7495       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7496     fi
7497     ;;
7498   esac
7499
7500 fi
7501
7502 if test -n "$lt_cv_sys_max_cmd_len"; then
7503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7504 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7505 else
7506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7507 $as_echo "none" >&6; }
7508 fi
7509 max_cmd_len=$lt_cv_sys_max_cmd_len
7510
7511
7512
7513
7514
7515
7516 : ${CP="cp -f"}
7517 : ${MV="mv -f"}
7518 : ${RM="rm -f"}
7519
7520 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7521   lt_unset=unset
7522 else
7523   lt_unset=false
7524 fi
7525
7526
7527
7528
7529
7530 # test EBCDIC or ASCII
7531 case `echo X|tr X '\101'` in
7532  A) # ASCII based system
7533     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7534   lt_SP2NL='tr \040 \012'
7535   lt_NL2SP='tr \015\012 \040\040'
7536   ;;
7537  *) # EBCDIC based system
7538   lt_SP2NL='tr \100 \n'
7539   lt_NL2SP='tr \r\n \100\100'
7540   ;;
7541 esac
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7552 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
7553 if ${lt_cv_to_host_file_cmd+:} false; then :
7554   $as_echo_n "(cached) " >&6
7555 else
7556   case $host in
7557   *-*-mingw* )
7558     case $build in
7559       *-*-mingw* ) # actually msys
7560         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7561         ;;
7562       *-*-cygwin* )
7563         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7564         ;;
7565       * ) # otherwise, assume *nix
7566         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7567         ;;
7568     esac
7569     ;;
7570   *-*-cygwin* )
7571     case $build in
7572       *-*-mingw* ) # actually msys
7573         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7574         ;;
7575       *-*-cygwin* )
7576         lt_cv_to_host_file_cmd=func_convert_file_noop
7577         ;;
7578       * ) # otherwise, assume *nix
7579         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7580         ;;
7581     esac
7582     ;;
7583   * ) # unhandled hosts (and "normal" native builds)
7584     lt_cv_to_host_file_cmd=func_convert_file_noop
7585     ;;
7586 esac
7587
7588 fi
7589
7590 to_host_file_cmd=$lt_cv_to_host_file_cmd
7591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7592 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
7593
7594
7595
7596
7597
7598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7599 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
7600 if ${lt_cv_to_tool_file_cmd+:} false; then :
7601   $as_echo_n "(cached) " >&6
7602 else
7603   #assume ordinary cross tools, or native build.
7604 lt_cv_to_tool_file_cmd=func_convert_file_noop
7605 case $host in
7606   *-*-mingw* )
7607     case $build in
7608       *-*-mingw* ) # actually msys
7609         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7610         ;;
7611     esac
7612     ;;
7613 esac
7614
7615 fi
7616
7617 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7619 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
7620
7621
7622
7623
7624
7625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7626 $as_echo_n "checking for $LD option to reload object files... " >&6; }
7627 if ${lt_cv_ld_reload_flag+:} false; then :
7628   $as_echo_n "(cached) " >&6
7629 else
7630   lt_cv_ld_reload_flag='-r'
7631 fi
7632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7633 $as_echo "$lt_cv_ld_reload_flag" >&6; }
7634 reload_flag=$lt_cv_ld_reload_flag
7635 case $reload_flag in
7636 "" | " "*) ;;
7637 *) reload_flag=" $reload_flag" ;;
7638 esac
7639 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7640 case $host_os in
7641   cygwin* | mingw* | pw32* | cegcc*)
7642     if test yes != "$GCC"; then
7643       reload_cmds=false
7644     fi
7645     ;;
7646   darwin*)
7647     if test yes = "$GCC"; then
7648       reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7649     else
7650       reload_cmds='$LD$reload_flag -o $output$reload_objs'
7651     fi
7652     ;;
7653 esac
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663 if test -n "$ac_tool_prefix"; then
7664   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7665 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7667 $as_echo_n "checking for $ac_word... " >&6; }
7668 if ${ac_cv_prog_OBJDUMP+:} false; then :
7669   $as_echo_n "(cached) " >&6
7670 else
7671   if test -n "$OBJDUMP"; then
7672   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7673 else
7674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7675 for as_dir in $PATH
7676 do
7677   IFS=$as_save_IFS
7678   test -z "$as_dir" && as_dir=.
7679     for ac_exec_ext in '' $ac_executable_extensions; do
7680   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7681     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7682     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7683     break 2
7684   fi
7685 done
7686   done
7687 IFS=$as_save_IFS
7688
7689 fi
7690 fi
7691 OBJDUMP=$ac_cv_prog_OBJDUMP
7692 if test -n "$OBJDUMP"; then
7693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7694 $as_echo "$OBJDUMP" >&6; }
7695 else
7696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7697 $as_echo "no" >&6; }
7698 fi
7699
7700
7701 fi
7702 if test -z "$ac_cv_prog_OBJDUMP"; then
7703   ac_ct_OBJDUMP=$OBJDUMP
7704   # Extract the first word of "objdump", so it can be a program name with args.
7705 set dummy objdump; ac_word=$2
7706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7707 $as_echo_n "checking for $ac_word... " >&6; }
7708 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7709   $as_echo_n "(cached) " >&6
7710 else
7711   if test -n "$ac_ct_OBJDUMP"; then
7712   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7713 else
7714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7715 for as_dir in $PATH
7716 do
7717   IFS=$as_save_IFS
7718   test -z "$as_dir" && as_dir=.
7719     for ac_exec_ext in '' $ac_executable_extensions; do
7720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7721     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7723     break 2
7724   fi
7725 done
7726   done
7727 IFS=$as_save_IFS
7728
7729 fi
7730 fi
7731 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7732 if test -n "$ac_ct_OBJDUMP"; then
7733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7734 $as_echo "$ac_ct_OBJDUMP" >&6; }
7735 else
7736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7737 $as_echo "no" >&6; }
7738 fi
7739
7740   if test "x$ac_ct_OBJDUMP" = x; then
7741     OBJDUMP="false"
7742   else
7743     case $cross_compiling:$ac_tool_warned in
7744 yes:)
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7746 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7747 ac_tool_warned=yes ;;
7748 esac
7749     OBJDUMP=$ac_ct_OBJDUMP
7750   fi
7751 else
7752   OBJDUMP="$ac_cv_prog_OBJDUMP"
7753 fi
7754
7755 test -z "$OBJDUMP" && OBJDUMP=objdump
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7766 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
7767 if ${lt_cv_deplibs_check_method+:} false; then :
7768   $as_echo_n "(cached) " >&6
7769 else
7770   lt_cv_file_magic_cmd='$MAGIC_CMD'
7771 lt_cv_file_magic_test_file=
7772 lt_cv_deplibs_check_method='unknown'
7773 # Need to set the preceding variable on all platforms that support
7774 # interlibrary dependencies.
7775 # 'none' -- dependencies not supported.
7776 # 'unknown' -- same as none, but documents that we really don't know.
7777 # 'pass_all' -- all dependencies passed with no checks.
7778 # 'test_compile' -- check by making test program.
7779 # 'file_magic [[regex]]' -- check by looking for files in library path
7780 # that responds to the $file_magic_cmd with a given extended regex.
7781 # If you have 'file' or equivalent on your system and you're not sure
7782 # whether 'pass_all' will *always* work, you probably want this one.
7783
7784 case $host_os in
7785 aix[4-9]*)
7786   lt_cv_deplibs_check_method=pass_all
7787   ;;
7788
7789 beos*)
7790   lt_cv_deplibs_check_method=pass_all
7791   ;;
7792
7793 bsdi[45]*)
7794   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
7795   lt_cv_file_magic_cmd='/usr/bin/file -L'
7796   lt_cv_file_magic_test_file=/shlib/libc.so
7797   ;;
7798
7799 cygwin*)
7800   # func_win32_libid is a shell function defined in ltmain.sh
7801   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7802   lt_cv_file_magic_cmd='func_win32_libid'
7803   ;;
7804
7805 mingw* | pw32*)
7806   # Base MSYS/MinGW do not provide the 'file' command needed by
7807   # func_win32_libid shell function, so use a weaker test based on 'objdump',
7808   # unless we find 'file', for example because we are cross-compiling.
7809   if ( file / ) >/dev/null 2>&1; then
7810     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7811     lt_cv_file_magic_cmd='func_win32_libid'
7812   else
7813     # Keep this pattern in sync with the one in func_win32_libid.
7814     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
7815     lt_cv_file_magic_cmd='$OBJDUMP -f'
7816   fi
7817   ;;
7818
7819 cegcc*)
7820   # use the weaker test based on 'objdump'. See mingw*.
7821   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
7822   lt_cv_file_magic_cmd='$OBJDUMP -f'
7823   ;;
7824
7825 darwin* | rhapsody*)
7826   lt_cv_deplibs_check_method=pass_all
7827   ;;
7828
7829 freebsd* | dragonfly*)
7830   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7831     case $host_cpu in
7832     i*86 )
7833       # Not sure whether the presence of OpenBSD here was a mistake.
7834       # Let's accept both of them until this is cleared up.
7835       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
7836       lt_cv_file_magic_cmd=/usr/bin/file
7837       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7838       ;;
7839     esac
7840   else
7841     lt_cv_deplibs_check_method=pass_all
7842   fi
7843   ;;
7844
7845 haiku*)
7846   lt_cv_deplibs_check_method=pass_all
7847   ;;
7848
7849 hpux10.20* | hpux11*)
7850   lt_cv_file_magic_cmd=/usr/bin/file
7851   case $host_cpu in
7852   ia64*)
7853     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
7854     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7855     ;;
7856   hppa*64*)
7857     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]'
7858     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7859     ;;
7860   *)
7861     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
7862     lt_cv_file_magic_test_file=/usr/lib/libc.sl
7863     ;;
7864   esac
7865   ;;
7866
7867 interix[3-9]*)
7868   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
7869   lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
7870   ;;
7871
7872 irix5* | irix6* | nonstopux*)
7873   case $LD in
7874   *-32|*"-32 ") libmagic=32-bit;;
7875   *-n32|*"-n32 ") libmagic=N32;;
7876   *-64|*"-64 ") libmagic=64-bit;;
7877   *) libmagic=never-match;;
7878   esac
7879   lt_cv_deplibs_check_method=pass_all
7880   ;;
7881
7882 # This must be glibc/ELF.
7883 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7884   lt_cv_deplibs_check_method=pass_all
7885   ;;
7886
7887 netbsd*)
7888   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7889     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7890   else
7891     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
7892   fi
7893   ;;
7894
7895 newos6*)
7896   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
7897   lt_cv_file_magic_cmd=/usr/bin/file
7898   lt_cv_file_magic_test_file=/usr/lib/libnls.so
7899   ;;
7900
7901 *nto* | *qnx*)
7902   lt_cv_deplibs_check_method=pass_all
7903   ;;
7904
7905 openbsd* | bitrig*)
7906   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
7907     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
7908   else
7909     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
7910   fi
7911   ;;
7912
7913 osf3* | osf4* | osf5*)
7914   lt_cv_deplibs_check_method=pass_all
7915   ;;
7916
7917 rdos*)
7918   lt_cv_deplibs_check_method=pass_all
7919   ;;
7920
7921 solaris*)
7922   lt_cv_deplibs_check_method=pass_all
7923   ;;
7924
7925 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7926   lt_cv_deplibs_check_method=pass_all
7927   ;;
7928
7929 sysv4 | sysv4.3*)
7930   case $host_vendor in
7931   motorola)
7932     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]'
7933     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7934     ;;
7935   ncr)
7936     lt_cv_deplibs_check_method=pass_all
7937     ;;
7938   sequent)
7939     lt_cv_file_magic_cmd='/bin/file'
7940     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
7941     ;;
7942   sni)
7943     lt_cv_file_magic_cmd='/bin/file'
7944     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
7945     lt_cv_file_magic_test_file=/lib/libc.so
7946     ;;
7947   siemens)
7948     lt_cv_deplibs_check_method=pass_all
7949     ;;
7950   pc)
7951     lt_cv_deplibs_check_method=pass_all
7952     ;;
7953   esac
7954   ;;
7955
7956 tpf*)
7957   lt_cv_deplibs_check_method=pass_all
7958   ;;
7959 os2*)
7960   lt_cv_deplibs_check_method=pass_all
7961   ;;
7962 esac
7963
7964 fi
7965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
7966 $as_echo "$lt_cv_deplibs_check_method" >&6; }
7967
7968 file_magic_glob=
7969 want_nocaseglob=no
7970 if test "$build" = "$host"; then
7971   case $host_os in
7972   mingw* | pw32*)
7973     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
7974       want_nocaseglob=yes
7975     else
7976       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
7977     fi
7978     ;;
7979   esac
7980 fi
7981
7982 file_magic_cmd=$lt_cv_file_magic_cmd
7983 deplibs_check_method=$lt_cv_deplibs_check_method
7984 test -z "$deplibs_check_method" && deplibs_check_method=unknown
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007 if test -n "$ac_tool_prefix"; then
8008   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8009 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8011 $as_echo_n "checking for $ac_word... " >&6; }
8012 if ${ac_cv_prog_DLLTOOL+:} false; then :
8013   $as_echo_n "(cached) " >&6
8014 else
8015   if test -n "$DLLTOOL"; then
8016   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8017 else
8018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8019 for as_dir in $PATH
8020 do
8021   IFS=$as_save_IFS
8022   test -z "$as_dir" && as_dir=.
8023     for ac_exec_ext in '' $ac_executable_extensions; do
8024   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8025     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8026     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8027     break 2
8028   fi
8029 done
8030   done
8031 IFS=$as_save_IFS
8032
8033 fi
8034 fi
8035 DLLTOOL=$ac_cv_prog_DLLTOOL
8036 if test -n "$DLLTOOL"; then
8037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8038 $as_echo "$DLLTOOL" >&6; }
8039 else
8040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8041 $as_echo "no" >&6; }
8042 fi
8043
8044
8045 fi
8046 if test -z "$ac_cv_prog_DLLTOOL"; then
8047   ac_ct_DLLTOOL=$DLLTOOL
8048   # Extract the first word of "dlltool", so it can be a program name with args.
8049 set dummy dlltool; ac_word=$2
8050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8051 $as_echo_n "checking for $ac_word... " >&6; }
8052 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8053   $as_echo_n "(cached) " >&6
8054 else
8055   if test -n "$ac_ct_DLLTOOL"; then
8056   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8057 else
8058 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8059 for as_dir in $PATH
8060 do
8061   IFS=$as_save_IFS
8062   test -z "$as_dir" && as_dir=.
8063     for ac_exec_ext in '' $ac_executable_extensions; do
8064   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8065     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8067     break 2
8068   fi
8069 done
8070   done
8071 IFS=$as_save_IFS
8072
8073 fi
8074 fi
8075 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8076 if test -n "$ac_ct_DLLTOOL"; then
8077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8078 $as_echo "$ac_ct_DLLTOOL" >&6; }
8079 else
8080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8081 $as_echo "no" >&6; }
8082 fi
8083
8084   if test "x$ac_ct_DLLTOOL" = x; then
8085     DLLTOOL="false"
8086   else
8087     case $cross_compiling:$ac_tool_warned in
8088 yes:)
8089 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8090 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8091 ac_tool_warned=yes ;;
8092 esac
8093     DLLTOOL=$ac_ct_DLLTOOL
8094   fi
8095 else
8096   DLLTOOL="$ac_cv_prog_DLLTOOL"
8097 fi
8098
8099 test -z "$DLLTOOL" && DLLTOOL=dlltool
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8111 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
8112 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
8113   $as_echo_n "(cached) " >&6
8114 else
8115   lt_cv_sharedlib_from_linklib_cmd='unknown'
8116
8117 case $host_os in
8118 cygwin* | mingw* | pw32* | cegcc*)
8119   # two different shell functions defined in ltmain.sh;
8120   # decide which one to use based on capabilities of $DLLTOOL
8121   case `$DLLTOOL --help 2>&1` in
8122   *--identify-strict*)
8123     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8124     ;;
8125   *)
8126     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8127     ;;
8128   esac
8129   ;;
8130 *)
8131   # fallback: assume linklib IS sharedlib
8132   lt_cv_sharedlib_from_linklib_cmd=$ECHO
8133   ;;
8134 esac
8135
8136 fi
8137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8138 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8139 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8140 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8141
8142
8143
8144
8145
8146
8147
8148 if test -n "$ac_tool_prefix"; then
8149   for ac_prog in ar
8150   do
8151     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8152 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8154 $as_echo_n "checking for $ac_word... " >&6; }
8155 if ${ac_cv_prog_AR+:} false; then :
8156   $as_echo_n "(cached) " >&6
8157 else
8158   if test -n "$AR"; then
8159   ac_cv_prog_AR="$AR" # Let the user override the test.
8160 else
8161 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8162 for as_dir in $PATH
8163 do
8164   IFS=$as_save_IFS
8165   test -z "$as_dir" && as_dir=.
8166     for ac_exec_ext in '' $ac_executable_extensions; do
8167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8168     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8170     break 2
8171   fi
8172 done
8173   done
8174 IFS=$as_save_IFS
8175
8176 fi
8177 fi
8178 AR=$ac_cv_prog_AR
8179 if test -n "$AR"; then
8180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8181 $as_echo "$AR" >&6; }
8182 else
8183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8184 $as_echo "no" >&6; }
8185 fi
8186
8187
8188     test -n "$AR" && break
8189   done
8190 fi
8191 if test -z "$AR"; then
8192   ac_ct_AR=$AR
8193   for ac_prog in ar
8194 do
8195   # Extract the first word of "$ac_prog", so it can be a program name with args.
8196 set dummy $ac_prog; ac_word=$2
8197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8198 $as_echo_n "checking for $ac_word... " >&6; }
8199 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8200   $as_echo_n "(cached) " >&6
8201 else
8202   if test -n "$ac_ct_AR"; then
8203   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8204 else
8205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8206 for as_dir in $PATH
8207 do
8208   IFS=$as_save_IFS
8209   test -z "$as_dir" && as_dir=.
8210     for ac_exec_ext in '' $ac_executable_extensions; do
8211   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8212     ac_cv_prog_ac_ct_AR="$ac_prog"
8213     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8214     break 2
8215   fi
8216 done
8217   done
8218 IFS=$as_save_IFS
8219
8220 fi
8221 fi
8222 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8223 if test -n "$ac_ct_AR"; then
8224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8225 $as_echo "$ac_ct_AR" >&6; }
8226 else
8227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8228 $as_echo "no" >&6; }
8229 fi
8230
8231
8232   test -n "$ac_ct_AR" && break
8233 done
8234
8235   if test "x$ac_ct_AR" = x; then
8236     AR="false"
8237   else
8238     case $cross_compiling:$ac_tool_warned in
8239 yes:)
8240 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8241 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8242 ac_tool_warned=yes ;;
8243 esac
8244     AR=$ac_ct_AR
8245   fi
8246 fi
8247
8248 : ${AR=ar}
8249 : ${AR_FLAGS=cru}
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8262 $as_echo_n "checking for archiver @FILE support... " >&6; }
8263 if ${lt_cv_ar_at_file+:} false; then :
8264   $as_echo_n "(cached) " >&6
8265 else
8266   lt_cv_ar_at_file=no
8267    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8268 /* end confdefs.h.  */
8269
8270 int
8271 main ()
8272 {
8273
8274   ;
8275   return 0;
8276 }
8277 _ACEOF
8278 if ac_fn_c_try_compile "$LINENO"; then :
8279   echo conftest.$ac_objext > conftest.lst
8280       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8281       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8282   (eval $lt_ar_try) 2>&5
8283   ac_status=$?
8284   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8285   test $ac_status = 0; }
8286       if test 0 -eq "$ac_status"; then
8287         # Ensure the archiver fails upon bogus file names.
8288         rm -f conftest.$ac_objext libconftest.a
8289         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8290   (eval $lt_ar_try) 2>&5
8291   ac_status=$?
8292   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8293   test $ac_status = 0; }
8294         if test 0 -ne "$ac_status"; then
8295           lt_cv_ar_at_file=@
8296         fi
8297       fi
8298       rm -f conftest.* libconftest.a
8299
8300 fi
8301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8302
8303 fi
8304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8305 $as_echo "$lt_cv_ar_at_file" >&6; }
8306
8307 if test no = "$lt_cv_ar_at_file"; then
8308   archiver_list_spec=
8309 else
8310   archiver_list_spec=$lt_cv_ar_at_file
8311 fi
8312
8313
8314
8315
8316
8317
8318
8319 if test -n "$ac_tool_prefix"; then
8320   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8321 set dummy ${ac_tool_prefix}strip; ac_word=$2
8322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8323 $as_echo_n "checking for $ac_word... " >&6; }
8324 if ${ac_cv_prog_STRIP+:} false; then :
8325   $as_echo_n "(cached) " >&6
8326 else
8327   if test -n "$STRIP"; then
8328   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8329 else
8330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8331 for as_dir in $PATH
8332 do
8333   IFS=$as_save_IFS
8334   test -z "$as_dir" && as_dir=.
8335     for ac_exec_ext in '' $ac_executable_extensions; do
8336   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8337     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8338     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8339     break 2
8340   fi
8341 done
8342   done
8343 IFS=$as_save_IFS
8344
8345 fi
8346 fi
8347 STRIP=$ac_cv_prog_STRIP
8348 if test -n "$STRIP"; then
8349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8350 $as_echo "$STRIP" >&6; }
8351 else
8352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8353 $as_echo "no" >&6; }
8354 fi
8355
8356
8357 fi
8358 if test -z "$ac_cv_prog_STRIP"; then
8359   ac_ct_STRIP=$STRIP
8360   # Extract the first word of "strip", so it can be a program name with args.
8361 set dummy strip; ac_word=$2
8362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8363 $as_echo_n "checking for $ac_word... " >&6; }
8364 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8365   $as_echo_n "(cached) " >&6
8366 else
8367   if test -n "$ac_ct_STRIP"; then
8368   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8369 else
8370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8371 for as_dir in $PATH
8372 do
8373   IFS=$as_save_IFS
8374   test -z "$as_dir" && as_dir=.
8375     for ac_exec_ext in '' $ac_executable_extensions; do
8376   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8377     ac_cv_prog_ac_ct_STRIP="strip"
8378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8379     break 2
8380   fi
8381 done
8382   done
8383 IFS=$as_save_IFS
8384
8385 fi
8386 fi
8387 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8388 if test -n "$ac_ct_STRIP"; then
8389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8390 $as_echo "$ac_ct_STRIP" >&6; }
8391 else
8392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8393 $as_echo "no" >&6; }
8394 fi
8395
8396   if test "x$ac_ct_STRIP" = x; then
8397     STRIP=":"
8398   else
8399     case $cross_compiling:$ac_tool_warned in
8400 yes:)
8401 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8402 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8403 ac_tool_warned=yes ;;
8404 esac
8405     STRIP=$ac_ct_STRIP
8406   fi
8407 else
8408   STRIP="$ac_cv_prog_STRIP"
8409 fi
8410
8411 test -z "$STRIP" && STRIP=:
8412
8413
8414
8415
8416
8417
8418 if test -n "$ac_tool_prefix"; then
8419   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8420 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8422 $as_echo_n "checking for $ac_word... " >&6; }
8423 if ${ac_cv_prog_RANLIB+:} false; then :
8424   $as_echo_n "(cached) " >&6
8425 else
8426   if test -n "$RANLIB"; then
8427   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8428 else
8429 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8430 for as_dir in $PATH
8431 do
8432   IFS=$as_save_IFS
8433   test -z "$as_dir" && as_dir=.
8434     for ac_exec_ext in '' $ac_executable_extensions; do
8435   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8436     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8437     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8438     break 2
8439   fi
8440 done
8441   done
8442 IFS=$as_save_IFS
8443
8444 fi
8445 fi
8446 RANLIB=$ac_cv_prog_RANLIB
8447 if test -n "$RANLIB"; then
8448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8449 $as_echo "$RANLIB" >&6; }
8450 else
8451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8452 $as_echo "no" >&6; }
8453 fi
8454
8455
8456 fi
8457 if test -z "$ac_cv_prog_RANLIB"; then
8458   ac_ct_RANLIB=$RANLIB
8459   # Extract the first word of "ranlib", so it can be a program name with args.
8460 set dummy ranlib; ac_word=$2
8461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8462 $as_echo_n "checking for $ac_word... " >&6; }
8463 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8464   $as_echo_n "(cached) " >&6
8465 else
8466   if test -n "$ac_ct_RANLIB"; then
8467   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8468 else
8469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8470 for as_dir in $PATH
8471 do
8472   IFS=$as_save_IFS
8473   test -z "$as_dir" && as_dir=.
8474     for ac_exec_ext in '' $ac_executable_extensions; do
8475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8476     ac_cv_prog_ac_ct_RANLIB="ranlib"
8477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8478     break 2
8479   fi
8480 done
8481   done
8482 IFS=$as_save_IFS
8483
8484 fi
8485 fi
8486 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8487 if test -n "$ac_ct_RANLIB"; then
8488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8489 $as_echo "$ac_ct_RANLIB" >&6; }
8490 else
8491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8492 $as_echo "no" >&6; }
8493 fi
8494
8495   if test "x$ac_ct_RANLIB" = x; then
8496     RANLIB=":"
8497   else
8498     case $cross_compiling:$ac_tool_warned in
8499 yes:)
8500 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8501 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8502 ac_tool_warned=yes ;;
8503 esac
8504     RANLIB=$ac_ct_RANLIB
8505   fi
8506 else
8507   RANLIB="$ac_cv_prog_RANLIB"
8508 fi
8509
8510 test -z "$RANLIB" && RANLIB=:
8511
8512
8513
8514
8515
8516
8517 # Determine commands to create old-style static archives.
8518 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8519 old_postinstall_cmds='chmod 644 $oldlib'
8520 old_postuninstall_cmds=
8521
8522 if test -n "$RANLIB"; then
8523   case $host_os in
8524   bitrig* | openbsd*)
8525     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8526     ;;
8527   *)
8528     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8529     ;;
8530   esac
8531   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8532 fi
8533
8534 case $host_os in
8535   darwin*)
8536     lock_old_archive_extraction=yes ;;
8537   *)
8538     lock_old_archive_extraction=no ;;
8539 esac
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561 for ac_prog in gawk mawk nawk awk
8562 do
8563   # Extract the first word of "$ac_prog", so it can be a program name with args.
8564 set dummy $ac_prog; ac_word=$2
8565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8566 $as_echo_n "checking for $ac_word... " >&6; }
8567 if ${ac_cv_prog_AWK+:} false; then :
8568   $as_echo_n "(cached) " >&6
8569 else
8570   if test -n "$AWK"; then
8571   ac_cv_prog_AWK="$AWK" # Let the user override the test.
8572 else
8573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8574 for as_dir in $PATH
8575 do
8576   IFS=$as_save_IFS
8577   test -z "$as_dir" && as_dir=.
8578     for ac_exec_ext in '' $ac_executable_extensions; do
8579   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8580     ac_cv_prog_AWK="$ac_prog"
8581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8582     break 2
8583   fi
8584 done
8585   done
8586 IFS=$as_save_IFS
8587
8588 fi
8589 fi
8590 AWK=$ac_cv_prog_AWK
8591 if test -n "$AWK"; then
8592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8593 $as_echo "$AWK" >&6; }
8594 else
8595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8596 $as_echo "no" >&6; }
8597 fi
8598
8599
8600   test -n "$AWK" && break
8601 done
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621 # If no C compiler was specified, use CC.
8622 LTCC=${LTCC-"$CC"}
8623
8624 # If no C compiler flags were specified, use CFLAGS.
8625 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8626
8627 # Allow CC to be a program name with arguments.
8628 compiler=$CC
8629
8630
8631 # Check for command to grab the raw symbol name followed by C symbol from nm.
8632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8633 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
8634 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
8635   $as_echo_n "(cached) " >&6
8636 else
8637
8638 # These are sane defaults that work on at least a few old systems.
8639 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8640
8641 # Character class describing NM global symbol codes.
8642 symcode='[BCDEGRST]'
8643
8644 # Regexp to match symbols that can be accessed directly from C.
8645 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8646
8647 # Define system-specific variables.
8648 case $host_os in
8649 aix*)
8650   symcode='[BCDT]'
8651   ;;
8652 cygwin* | mingw* | pw32* | cegcc*)
8653   symcode='[ABCDGISTW]'
8654   ;;
8655 hpux*)
8656   if test ia64 = "$host_cpu"; then
8657     symcode='[ABCDEGRST]'
8658   fi
8659   ;;
8660 irix* | nonstopux*)
8661   symcode='[BCDEGRST]'
8662   ;;
8663 osf*)
8664   symcode='[BCDEGQRST]'
8665   ;;
8666 solaris*)
8667   symcode='[BDRT]'
8668   ;;
8669 sco3.2v5*)
8670   symcode='[DT]'
8671   ;;
8672 sysv4.2uw2*)
8673   symcode='[DT]'
8674   ;;
8675 sysv5* | sco5v6* | unixware* | OpenUNIX*)
8676   symcode='[ABDT]'
8677   ;;
8678 sysv4)
8679   symcode='[DFNSTU]'
8680   ;;
8681 esac
8682
8683 # If we're using GNU nm, then use its standard symbol codes.
8684 case `$NM -V 2>&1` in
8685 *GNU* | *'with BFD'*)
8686   symcode='[ABCDGIRSTW]' ;;
8687 esac
8688
8689 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8690   # Gets list of data symbols to import.
8691   lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8692   # Adjust the below global symbol transforms to fixup imported variables.
8693   lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8694   lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8695   lt_c_name_lib_hook="\
8696   -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8697   -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8698 else
8699   # Disable hooks by default.
8700   lt_cv_sys_global_symbol_to_import=
8701   lt_cdecl_hook=
8702   lt_c_name_hook=
8703   lt_c_name_lib_hook=
8704 fi
8705
8706 # Transform an extracted symbol line into a proper C declaration.
8707 # Some systems (esp. on ia64) link data and code symbols differently,
8708 # so use this general approach.
8709 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8710 $lt_cdecl_hook\
8711 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8712 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8713
8714 # Transform an extracted symbol line into symbol name and symbol address
8715 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8716 $lt_c_name_hook\
8717 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8718 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8719
8720 # Transform an extracted symbol line into symbol name with lib prefix and
8721 # symbol address.
8722 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8723 $lt_c_name_lib_hook\
8724 " -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8725 " -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8726 " -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8727
8728 # Handle CRLF in mingw tool chain
8729 opt_cr=
8730 case $build_os in
8731 mingw*)
8732   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8733   ;;
8734 esac
8735
8736 # Try without a prefix underscore, then with it.
8737 for ac_symprfx in "" "_"; do
8738
8739   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8740   symxfrm="\\1 $ac_symprfx\\2 \\2"
8741
8742   # Write the raw and C identifiers.
8743   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8744     # Fake it for dumpbin and say T for any non-static function,
8745     # D for any global variable and I for any imported variable.
8746     # Also find C++ and __fastcall symbols from MSVC++,
8747     # which start with @ or ?.
8748     lt_cv_sys_global_symbol_pipe="$AWK '"\
8749 "     {last_section=section; section=\$ 3};"\
8750 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8751 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8752 "     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8753 "     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8754 "     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8755 "     \$ 0!~/External *\|/{next};"\
8756 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8757 "     {if(hide[section]) next};"\
8758 "     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8759 "     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8760 "     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8761 "     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8762 "     ' prfx=^$ac_symprfx"
8763   else
8764     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8765   fi
8766   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8767
8768   # Check to see that the pipe works correctly.
8769   pipe_works=no
8770
8771   rm -f conftest*
8772   cat > conftest.$ac_ext <<_LT_EOF
8773 #ifdef __cplusplus
8774 extern "C" {
8775 #endif
8776 char nm_test_var;
8777 void nm_test_func(void);
8778 void nm_test_func(void){}
8779 #ifdef __cplusplus
8780 }
8781 #endif
8782 int main(){nm_test_var='a';nm_test_func();return(0);}
8783 _LT_EOF
8784
8785   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8786   (eval $ac_compile) 2>&5
8787   ac_status=$?
8788   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8789   test $ac_status = 0; }; then
8790     # Now try to grab the symbols.
8791     nlist=conftest.nm
8792     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
8793   (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
8794   ac_status=$?
8795   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8796   test $ac_status = 0; } && test -s "$nlist"; then
8797       # Try sorting and uniquifying the output.
8798       if sort "$nlist" | uniq > "$nlist"T; then
8799         mv -f "$nlist"T "$nlist"
8800       else
8801         rm -f "$nlist"T
8802       fi
8803
8804       # Make sure that we snagged all the symbols we need.
8805       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
8806         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
8807           cat <<_LT_EOF > conftest.$ac_ext
8808 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
8809 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
8810 /* DATA imports from DLLs on WIN32 can't be const, because runtime
8811    relocations are performed -- see ld's documentation on pseudo-relocs.  */
8812 # define LT_DLSYM_CONST
8813 #elif defined __osf__
8814 /* This system does not cope well with relocations in const data.  */
8815 # define LT_DLSYM_CONST
8816 #else
8817 # define LT_DLSYM_CONST const
8818 #endif
8819
8820 #ifdef __cplusplus
8821 extern "C" {
8822 #endif
8823
8824 _LT_EOF
8825           # Now generate the symbol file.
8826           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
8827
8828           cat <<_LT_EOF >> conftest.$ac_ext
8829
8830 /* The mapping between symbol names and symbols.  */
8831 LT_DLSYM_CONST struct {
8832   const char *name;
8833   void       *address;
8834 }
8835 lt__PROGRAM__LTX_preloaded_symbols[] =
8836 {
8837   { "@PROGRAM@", (void *) 0 },
8838 _LT_EOF
8839           $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
8840           cat <<\_LT_EOF >> conftest.$ac_ext
8841   {0, (void *) 0}
8842 };
8843
8844 /* This works around a problem in FreeBSD linker */
8845 #ifdef FREEBSD_WORKAROUND
8846 static const void *lt_preloaded_setup() {
8847   return lt__PROGRAM__LTX_preloaded_symbols;
8848 }
8849 #endif
8850
8851 #ifdef __cplusplus
8852 }
8853 #endif
8854 _LT_EOF
8855           # Now try linking the two files.
8856           mv conftest.$ac_objext conftstm.$ac_objext
8857           lt_globsym_save_LIBS=$LIBS
8858           lt_globsym_save_CFLAGS=$CFLAGS
8859           LIBS=conftstm.$ac_objext
8860           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
8861           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8862   (eval $ac_link) 2>&5
8863   ac_status=$?
8864   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8865   test $ac_status = 0; } && test -s conftest$ac_exeext; then
8866             pipe_works=yes
8867           fi
8868           LIBS=$lt_globsym_save_LIBS
8869           CFLAGS=$lt_globsym_save_CFLAGS
8870         else
8871           echo "cannot find nm_test_func in $nlist" >&5
8872         fi
8873       else
8874         echo "cannot find nm_test_var in $nlist" >&5
8875       fi
8876     else
8877       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
8878     fi
8879   else
8880     echo "$progname: failed program was:" >&5
8881     cat conftest.$ac_ext >&5
8882   fi
8883   rm -rf conftest* conftst*
8884
8885   # Do not use the global_symbol_pipe unless it works.
8886   if test yes = "$pipe_works"; then
8887     break
8888   else
8889     lt_cv_sys_global_symbol_pipe=
8890   fi
8891 done
8892
8893 fi
8894
8895 if test -z "$lt_cv_sys_global_symbol_pipe"; then
8896   lt_cv_sys_global_symbol_to_cdecl=
8897 fi
8898 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
8899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
8900 $as_echo "failed" >&6; }
8901 else
8902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
8903 $as_echo "ok" >&6; }
8904 fi
8905
8906 # Response file support.
8907 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8908   nm_file_list_spec='@'
8909 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
8910   nm_file_list_spec='@'
8911 fi
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
8950 $as_echo_n "checking for sysroot... " >&6; }
8951
8952 # Check whether --with-sysroot was given.
8953 if test "${with_sysroot+set}" = set; then :
8954   withval=$with_sysroot;
8955 else
8956   with_sysroot=no
8957 fi
8958
8959
8960 lt_sysroot=
8961 case $with_sysroot in #(
8962  yes)
8963    if test yes = "$GCC"; then
8964      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
8965    fi
8966    ;; #(
8967  /*)
8968    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
8969    ;; #(
8970  no|'')
8971    ;; #(
8972  *)
8973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
8974 $as_echo "$with_sysroot" >&6; }
8975    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
8976    ;;
8977 esac
8978
8979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
8980 $as_echo "${lt_sysroot:-no}" >&6; }
8981
8982
8983
8984
8985
8986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
8987 $as_echo_n "checking for a working dd... " >&6; }
8988 if ${ac_cv_path_lt_DD+:} false; then :
8989   $as_echo_n "(cached) " >&6
8990 else
8991   printf 0123456789abcdef0123456789abcdef >conftest.i
8992 cat conftest.i conftest.i >conftest2.i
8993 : ${lt_DD:=$DD}
8994 if test -z "$lt_DD"; then
8995   ac_path_lt_DD_found=false
8996   # Loop through the user's path and test for each of PROGNAME-LIST
8997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8998 for as_dir in $PATH
8999 do
9000   IFS=$as_save_IFS
9001   test -z "$as_dir" && as_dir=.
9002     for ac_prog in dd; do
9003     for ac_exec_ext in '' $ac_executable_extensions; do
9004       ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
9005       as_fn_executable_p "$ac_path_lt_DD" || continue
9006 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9007   cmp -s conftest.i conftest.out \
9008   && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9009 fi
9010       $ac_path_lt_DD_found && break 3
9011     done
9012   done
9013   done
9014 IFS=$as_save_IFS
9015   if test -z "$ac_cv_path_lt_DD"; then
9016     :
9017   fi
9018 else
9019   ac_cv_path_lt_DD=$lt_DD
9020 fi
9021
9022 rm -f conftest.i conftest2.i conftest.out
9023 fi
9024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9025 $as_echo "$ac_cv_path_lt_DD" >&6; }
9026
9027
9028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9029 $as_echo_n "checking how to truncate binary pipes... " >&6; }
9030 if ${lt_cv_truncate_bin+:} false; then :
9031   $as_echo_n "(cached) " >&6
9032 else
9033   printf 0123456789abcdef0123456789abcdef >conftest.i
9034 cat conftest.i conftest.i >conftest2.i
9035 lt_cv_truncate_bin=
9036 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9037   cmp -s conftest.i conftest.out \
9038   && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9039 fi
9040 rm -f conftest.i conftest2.i conftest.out
9041 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9042 fi
9043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9044 $as_echo "$lt_cv_truncate_bin" >&6; }
9045
9046
9047
9048
9049
9050
9051
9052 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
9053 func_cc_basename ()
9054 {
9055     for cc_temp in $*""; do
9056       case $cc_temp in
9057         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9058         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9059         \-*) ;;
9060         *) break;;
9061       esac
9062     done
9063     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9064 }
9065
9066 # Check whether --enable-libtool-lock was given.
9067 if test "${enable_libtool_lock+set}" = set; then :
9068   enableval=$enable_libtool_lock;
9069 fi
9070
9071 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9072
9073 # Some flags need to be propagated to the compiler or linker for good
9074 # libtool support.
9075 case $host in
9076 ia64-*-hpux*)
9077   # Find out what ABI is being produced by ac_compile, and set mode
9078   # options accordingly.
9079   echo 'int i;' > conftest.$ac_ext
9080   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9081   (eval $ac_compile) 2>&5
9082   ac_status=$?
9083   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9084   test $ac_status = 0; }; then
9085     case `/usr/bin/file conftest.$ac_objext` in
9086       *ELF-32*)
9087         HPUX_IA64_MODE=32
9088         ;;
9089       *ELF-64*)
9090         HPUX_IA64_MODE=64
9091         ;;
9092     esac
9093   fi
9094   rm -rf conftest*
9095   ;;
9096 *-*-irix6*)
9097   # Find out what ABI is being produced by ac_compile, and set linker
9098   # options accordingly.
9099   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9100   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9101   (eval $ac_compile) 2>&5
9102   ac_status=$?
9103   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9104   test $ac_status = 0; }; then
9105     if test yes = "$lt_cv_prog_gnu_ld"; then
9106       case `/usr/bin/file conftest.$ac_objext` in
9107         *32-bit*)
9108           LD="${LD-ld} -melf32bsmip"
9109           ;;
9110         *N32*)
9111           LD="${LD-ld} -melf32bmipn32"
9112           ;;
9113         *64-bit*)
9114           LD="${LD-ld} -melf64bmip"
9115         ;;
9116       esac
9117     else
9118       case `/usr/bin/file conftest.$ac_objext` in
9119         *32-bit*)
9120           LD="${LD-ld} -32"
9121           ;;
9122         *N32*)
9123           LD="${LD-ld} -n32"
9124           ;;
9125         *64-bit*)
9126           LD="${LD-ld} -64"
9127           ;;
9128       esac
9129     fi
9130   fi
9131   rm -rf conftest*
9132   ;;
9133
9134 mips64*-*linux*)
9135   # Find out what ABI is being produced by ac_compile, and set linker
9136   # options accordingly.
9137   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9138   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9139   (eval $ac_compile) 2>&5
9140   ac_status=$?
9141   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9142   test $ac_status = 0; }; then
9143     emul=elf
9144     case `/usr/bin/file conftest.$ac_objext` in
9145       *32-bit*)
9146         emul="${emul}32"
9147         ;;
9148       *64-bit*)
9149         emul="${emul}64"
9150         ;;
9151     esac
9152     case `/usr/bin/file conftest.$ac_objext` in
9153       *MSB*)
9154         emul="${emul}btsmip"
9155         ;;
9156       *LSB*)
9157         emul="${emul}ltsmip"
9158         ;;
9159     esac
9160     case `/usr/bin/file conftest.$ac_objext` in
9161       *N32*)
9162         emul="${emul}n32"
9163         ;;
9164     esac
9165     LD="${LD-ld} -m $emul"
9166   fi
9167   rm -rf conftest*
9168   ;;
9169
9170 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9171 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9172   # Find out what ABI is being produced by ac_compile, and set linker
9173   # options accordingly.  Note that the listed cases only cover the
9174   # situations where additional linker options are needed (such as when
9175   # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9176   # vice versa); the common cases where no linker options are needed do
9177   # not appear in the list.
9178   echo 'int i;' > conftest.$ac_ext
9179   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9180   (eval $ac_compile) 2>&5
9181   ac_status=$?
9182   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9183   test $ac_status = 0; }; then
9184     case `/usr/bin/file conftest.o` in
9185       *32-bit*)
9186         case $host in
9187           x86_64-*kfreebsd*-gnu)
9188             LD="${LD-ld} -m elf_i386_fbsd"
9189             ;;
9190           x86_64-*linux*)
9191             case `/usr/bin/file conftest.o` in
9192               *x86-64*)
9193                 LD="${LD-ld} -m elf32_x86_64"
9194                 ;;
9195               *)
9196                 LD="${LD-ld} -m elf_i386"
9197                 ;;
9198             esac
9199             ;;
9200           powerpc64le-*linux*)
9201             LD="${LD-ld} -m elf32lppclinux"
9202             ;;
9203           powerpc64-*linux*)
9204             LD="${LD-ld} -m elf32ppclinux"
9205             ;;
9206           s390x-*linux*)
9207             LD="${LD-ld} -m elf_s390"
9208             ;;
9209           sparc64-*linux*)
9210             LD="${LD-ld} -m elf32_sparc"
9211             ;;
9212         esac
9213         ;;
9214       *64-bit*)
9215         case $host in
9216           x86_64-*kfreebsd*-gnu)
9217             LD="${LD-ld} -m elf_x86_64_fbsd"
9218             ;;
9219           x86_64-*linux*)
9220             LD="${LD-ld} -m elf_x86_64"
9221             ;;
9222           powerpcle-*linux*)
9223             LD="${LD-ld} -m elf64lppc"
9224             ;;
9225           powerpc-*linux*)
9226             LD="${LD-ld} -m elf64ppc"
9227             ;;
9228           s390*-*linux*|s390*-*tpf*)
9229             LD="${LD-ld} -m elf64_s390"
9230             ;;
9231           sparc*-*linux*)
9232             LD="${LD-ld} -m elf64_sparc"
9233             ;;
9234         esac
9235         ;;
9236     esac
9237   fi
9238   rm -rf conftest*
9239   ;;
9240
9241 *-*-sco3.2v5*)
9242   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9243   SAVE_CFLAGS=$CFLAGS
9244   CFLAGS="$CFLAGS -belf"
9245   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9246 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
9247 if ${lt_cv_cc_needs_belf+:} false; then :
9248   $as_echo_n "(cached) " >&6
9249 else
9250   ac_ext=c
9251 ac_cpp='$CPP $CPPFLAGS'
9252 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9253 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9254 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9255
9256      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9257 /* end confdefs.h.  */
9258
9259 int
9260 main ()
9261 {
9262
9263   ;
9264   return 0;
9265 }
9266 _ACEOF
9267 if ac_fn_c_try_link "$LINENO"; then :
9268   lt_cv_cc_needs_belf=yes
9269 else
9270   lt_cv_cc_needs_belf=no
9271 fi
9272 rm -f core conftest.err conftest.$ac_objext \
9273     conftest$ac_exeext conftest.$ac_ext
9274      ac_ext=c
9275 ac_cpp='$CPP $CPPFLAGS'
9276 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9277 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9278 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9279
9280 fi
9281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9282 $as_echo "$lt_cv_cc_needs_belf" >&6; }
9283   if test yes != "$lt_cv_cc_needs_belf"; then
9284     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9285     CFLAGS=$SAVE_CFLAGS
9286   fi
9287   ;;
9288 *-*solaris*)
9289   # Find out what ABI is being produced by ac_compile, and set linker
9290   # options accordingly.
9291   echo 'int i;' > conftest.$ac_ext
9292   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9293   (eval $ac_compile) 2>&5
9294   ac_status=$?
9295   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9296   test $ac_status = 0; }; then
9297     case `/usr/bin/file conftest.o` in
9298     *64-bit*)
9299       case $lt_cv_prog_gnu_ld in
9300       yes*)
9301         case $host in
9302         i?86-*-solaris*|x86_64-*-solaris*)
9303           LD="${LD-ld} -m elf_x86_64"
9304           ;;
9305         sparc*-*-solaris*)
9306           LD="${LD-ld} -m elf64_sparc"
9307           ;;
9308         esac
9309         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9310         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9311           LD=${LD-ld}_sol2
9312         fi
9313         ;;
9314       *)
9315         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9316           LD="${LD-ld} -64"
9317         fi
9318         ;;
9319       esac
9320       ;;
9321     esac
9322   fi
9323   rm -rf conftest*
9324   ;;
9325 esac
9326
9327 need_locks=$enable_libtool_lock
9328
9329 if test -n "$ac_tool_prefix"; then
9330   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9331 set dummy ${ac_tool_prefix}mt; ac_word=$2
9332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9333 $as_echo_n "checking for $ac_word... " >&6; }
9334 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
9335   $as_echo_n "(cached) " >&6
9336 else
9337   if test -n "$MANIFEST_TOOL"; then
9338   ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9339 else
9340 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9341 for as_dir in $PATH
9342 do
9343   IFS=$as_save_IFS
9344   test -z "$as_dir" && as_dir=.
9345     for ac_exec_ext in '' $ac_executable_extensions; do
9346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9347     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9349     break 2
9350   fi
9351 done
9352   done
9353 IFS=$as_save_IFS
9354
9355 fi
9356 fi
9357 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9358 if test -n "$MANIFEST_TOOL"; then
9359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9360 $as_echo "$MANIFEST_TOOL" >&6; }
9361 else
9362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9363 $as_echo "no" >&6; }
9364 fi
9365
9366
9367 fi
9368 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9369   ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9370   # Extract the first word of "mt", so it can be a program name with args.
9371 set dummy mt; ac_word=$2
9372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9373 $as_echo_n "checking for $ac_word... " >&6; }
9374 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
9375   $as_echo_n "(cached) " >&6
9376 else
9377   if test -n "$ac_ct_MANIFEST_TOOL"; then
9378   ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9379 else
9380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9381 for as_dir in $PATH
9382 do
9383   IFS=$as_save_IFS
9384   test -z "$as_dir" && as_dir=.
9385     for ac_exec_ext in '' $ac_executable_extensions; do
9386   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9387     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9389     break 2
9390   fi
9391 done
9392   done
9393 IFS=$as_save_IFS
9394
9395 fi
9396 fi
9397 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9398 if test -n "$ac_ct_MANIFEST_TOOL"; then
9399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9400 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
9401 else
9402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9403 $as_echo "no" >&6; }
9404 fi
9405
9406   if test "x$ac_ct_MANIFEST_TOOL" = x; then
9407     MANIFEST_TOOL=":"
9408   else
9409     case $cross_compiling:$ac_tool_warned in
9410 yes:)
9411 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9412 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9413 ac_tool_warned=yes ;;
9414 esac
9415     MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9416   fi
9417 else
9418   MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9419 fi
9420
9421 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9423 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9424 if ${lt_cv_path_mainfest_tool+:} false; then :
9425   $as_echo_n "(cached) " >&6
9426 else
9427   lt_cv_path_mainfest_tool=no
9428   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9429   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9430   cat conftest.err >&5
9431   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9432     lt_cv_path_mainfest_tool=yes
9433   fi
9434   rm -f conftest*
9435 fi
9436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9437 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
9438 if test yes != "$lt_cv_path_mainfest_tool"; then
9439   MANIFEST_TOOL=:
9440 fi
9441
9442
9443
9444
9445
9446
9447   case $host_os in
9448     rhapsody* | darwin*)
9449     if test -n "$ac_tool_prefix"; then
9450   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9451 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9453 $as_echo_n "checking for $ac_word... " >&6; }
9454 if ${ac_cv_prog_DSYMUTIL+:} false; then :
9455   $as_echo_n "(cached) " >&6
9456 else
9457   if test -n "$DSYMUTIL"; then
9458   ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9459 else
9460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9461 for as_dir in $PATH
9462 do
9463   IFS=$as_save_IFS
9464   test -z "$as_dir" && as_dir=.
9465     for ac_exec_ext in '' $ac_executable_extensions; do
9466   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9467     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9468     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9469     break 2
9470   fi
9471 done
9472   done
9473 IFS=$as_save_IFS
9474
9475 fi
9476 fi
9477 DSYMUTIL=$ac_cv_prog_DSYMUTIL
9478 if test -n "$DSYMUTIL"; then
9479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9480 $as_echo "$DSYMUTIL" >&6; }
9481 else
9482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9483 $as_echo "no" >&6; }
9484 fi
9485
9486
9487 fi
9488 if test -z "$ac_cv_prog_DSYMUTIL"; then
9489   ac_ct_DSYMUTIL=$DSYMUTIL
9490   # Extract the first word of "dsymutil", so it can be a program name with args.
9491 set dummy dsymutil; ac_word=$2
9492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9493 $as_echo_n "checking for $ac_word... " >&6; }
9494 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
9495   $as_echo_n "(cached) " >&6
9496 else
9497   if test -n "$ac_ct_DSYMUTIL"; then
9498   ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9499 else
9500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9501 for as_dir in $PATH
9502 do
9503   IFS=$as_save_IFS
9504   test -z "$as_dir" && as_dir=.
9505     for ac_exec_ext in '' $ac_executable_extensions; do
9506   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9507     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9508     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9509     break 2
9510   fi
9511 done
9512   done
9513 IFS=$as_save_IFS
9514
9515 fi
9516 fi
9517 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9518 if test -n "$ac_ct_DSYMUTIL"; then
9519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9520 $as_echo "$ac_ct_DSYMUTIL" >&6; }
9521 else
9522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9523 $as_echo "no" >&6; }
9524 fi
9525
9526   if test "x$ac_ct_DSYMUTIL" = x; then
9527     DSYMUTIL=":"
9528   else
9529     case $cross_compiling:$ac_tool_warned in
9530 yes:)
9531 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9532 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9533 ac_tool_warned=yes ;;
9534 esac
9535     DSYMUTIL=$ac_ct_DSYMUTIL
9536   fi
9537 else
9538   DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9539 fi
9540
9541     if test -n "$ac_tool_prefix"; then
9542   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9543 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9545 $as_echo_n "checking for $ac_word... " >&6; }
9546 if ${ac_cv_prog_NMEDIT+:} false; then :
9547   $as_echo_n "(cached) " >&6
9548 else
9549   if test -n "$NMEDIT"; then
9550   ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9551 else
9552 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9553 for as_dir in $PATH
9554 do
9555   IFS=$as_save_IFS
9556   test -z "$as_dir" && as_dir=.
9557     for ac_exec_ext in '' $ac_executable_extensions; do
9558   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9559     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9560     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9561     break 2
9562   fi
9563 done
9564   done
9565 IFS=$as_save_IFS
9566
9567 fi
9568 fi
9569 NMEDIT=$ac_cv_prog_NMEDIT
9570 if test -n "$NMEDIT"; then
9571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9572 $as_echo "$NMEDIT" >&6; }
9573 else
9574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9575 $as_echo "no" >&6; }
9576 fi
9577
9578
9579 fi
9580 if test -z "$ac_cv_prog_NMEDIT"; then
9581   ac_ct_NMEDIT=$NMEDIT
9582   # Extract the first word of "nmedit", so it can be a program name with args.
9583 set dummy nmedit; ac_word=$2
9584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9585 $as_echo_n "checking for $ac_word... " >&6; }
9586 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
9587   $as_echo_n "(cached) " >&6
9588 else
9589   if test -n "$ac_ct_NMEDIT"; then
9590   ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9591 else
9592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9593 for as_dir in $PATH
9594 do
9595   IFS=$as_save_IFS
9596   test -z "$as_dir" && as_dir=.
9597     for ac_exec_ext in '' $ac_executable_extensions; do
9598   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9599     ac_cv_prog_ac_ct_NMEDIT="nmedit"
9600     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9601     break 2
9602   fi
9603 done
9604   done
9605 IFS=$as_save_IFS
9606
9607 fi
9608 fi
9609 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9610 if test -n "$ac_ct_NMEDIT"; then
9611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9612 $as_echo "$ac_ct_NMEDIT" >&6; }
9613 else
9614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9615 $as_echo "no" >&6; }
9616 fi
9617
9618   if test "x$ac_ct_NMEDIT" = x; then
9619     NMEDIT=":"
9620   else
9621     case $cross_compiling:$ac_tool_warned in
9622 yes:)
9623 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9624 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9625 ac_tool_warned=yes ;;
9626 esac
9627     NMEDIT=$ac_ct_NMEDIT
9628   fi
9629 else
9630   NMEDIT="$ac_cv_prog_NMEDIT"
9631 fi
9632
9633     if test -n "$ac_tool_prefix"; then
9634   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9635 set dummy ${ac_tool_prefix}lipo; ac_word=$2
9636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9637 $as_echo_n "checking for $ac_word... " >&6; }
9638 if ${ac_cv_prog_LIPO+:} false; then :
9639   $as_echo_n "(cached) " >&6
9640 else
9641   if test -n "$LIPO"; then
9642   ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9643 else
9644 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9645 for as_dir in $PATH
9646 do
9647   IFS=$as_save_IFS
9648   test -z "$as_dir" && as_dir=.
9649     for ac_exec_ext in '' $ac_executable_extensions; do
9650   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9651     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9652     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9653     break 2
9654   fi
9655 done
9656   done
9657 IFS=$as_save_IFS
9658
9659 fi
9660 fi
9661 LIPO=$ac_cv_prog_LIPO
9662 if test -n "$LIPO"; then
9663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9664 $as_echo "$LIPO" >&6; }
9665 else
9666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9667 $as_echo "no" >&6; }
9668 fi
9669
9670
9671 fi
9672 if test -z "$ac_cv_prog_LIPO"; then
9673   ac_ct_LIPO=$LIPO
9674   # Extract the first word of "lipo", so it can be a program name with args.
9675 set dummy lipo; ac_word=$2
9676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9677 $as_echo_n "checking for $ac_word... " >&6; }
9678 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
9679   $as_echo_n "(cached) " >&6
9680 else
9681   if test -n "$ac_ct_LIPO"; then
9682   ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9683 else
9684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9685 for as_dir in $PATH
9686 do
9687   IFS=$as_save_IFS
9688   test -z "$as_dir" && as_dir=.
9689     for ac_exec_ext in '' $ac_executable_extensions; do
9690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9691     ac_cv_prog_ac_ct_LIPO="lipo"
9692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9693     break 2
9694   fi
9695 done
9696   done
9697 IFS=$as_save_IFS
9698
9699 fi
9700 fi
9701 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9702 if test -n "$ac_ct_LIPO"; then
9703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9704 $as_echo "$ac_ct_LIPO" >&6; }
9705 else
9706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9707 $as_echo "no" >&6; }
9708 fi
9709
9710   if test "x$ac_ct_LIPO" = x; then
9711     LIPO=":"
9712   else
9713     case $cross_compiling:$ac_tool_warned in
9714 yes:)
9715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9716 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9717 ac_tool_warned=yes ;;
9718 esac
9719     LIPO=$ac_ct_LIPO
9720   fi
9721 else
9722   LIPO="$ac_cv_prog_LIPO"
9723 fi
9724
9725     if test -n "$ac_tool_prefix"; then
9726   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
9727 set dummy ${ac_tool_prefix}otool; ac_word=$2
9728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9729 $as_echo_n "checking for $ac_word... " >&6; }
9730 if ${ac_cv_prog_OTOOL+:} false; then :
9731   $as_echo_n "(cached) " >&6
9732 else
9733   if test -n "$OTOOL"; then
9734   ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
9735 else
9736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9737 for as_dir in $PATH
9738 do
9739   IFS=$as_save_IFS
9740   test -z "$as_dir" && as_dir=.
9741     for ac_exec_ext in '' $ac_executable_extensions; do
9742   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9743     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
9744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9745     break 2
9746   fi
9747 done
9748   done
9749 IFS=$as_save_IFS
9750
9751 fi
9752 fi
9753 OTOOL=$ac_cv_prog_OTOOL
9754 if test -n "$OTOOL"; then
9755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9756 $as_echo "$OTOOL" >&6; }
9757 else
9758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9759 $as_echo "no" >&6; }
9760 fi
9761
9762
9763 fi
9764 if test -z "$ac_cv_prog_OTOOL"; then
9765   ac_ct_OTOOL=$OTOOL
9766   # Extract the first word of "otool", so it can be a program name with args.
9767 set dummy otool; ac_word=$2
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9769 $as_echo_n "checking for $ac_word... " >&6; }
9770 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
9771   $as_echo_n "(cached) " >&6
9772 else
9773   if test -n "$ac_ct_OTOOL"; then
9774   ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
9775 else
9776 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9777 for as_dir in $PATH
9778 do
9779   IFS=$as_save_IFS
9780   test -z "$as_dir" && as_dir=.
9781     for ac_exec_ext in '' $ac_executable_extensions; do
9782   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9783     ac_cv_prog_ac_ct_OTOOL="otool"
9784     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9785     break 2
9786   fi
9787 done
9788   done
9789 IFS=$as_save_IFS
9790
9791 fi
9792 fi
9793 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
9794 if test -n "$ac_ct_OTOOL"; then
9795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
9796 $as_echo "$ac_ct_OTOOL" >&6; }
9797 else
9798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9799 $as_echo "no" >&6; }
9800 fi
9801
9802   if test "x$ac_ct_OTOOL" = x; then
9803     OTOOL=":"
9804   else
9805     case $cross_compiling:$ac_tool_warned in
9806 yes:)
9807 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9808 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9809 ac_tool_warned=yes ;;
9810 esac
9811     OTOOL=$ac_ct_OTOOL
9812   fi
9813 else
9814   OTOOL="$ac_cv_prog_OTOOL"
9815 fi
9816
9817     if test -n "$ac_tool_prefix"; then
9818   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
9819 set dummy ${ac_tool_prefix}otool64; ac_word=$2
9820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9821 $as_echo_n "checking for $ac_word... " >&6; }
9822 if ${ac_cv_prog_OTOOL64+:} false; then :
9823   $as_echo_n "(cached) " >&6
9824 else
9825   if test -n "$OTOOL64"; then
9826   ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
9827 else
9828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9829 for as_dir in $PATH
9830 do
9831   IFS=$as_save_IFS
9832   test -z "$as_dir" && as_dir=.
9833     for ac_exec_ext in '' $ac_executable_extensions; do
9834   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9835     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
9836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9837     break 2
9838   fi
9839 done
9840   done
9841 IFS=$as_save_IFS
9842
9843 fi
9844 fi
9845 OTOOL64=$ac_cv_prog_OTOOL64
9846 if test -n "$OTOOL64"; then
9847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
9848 $as_echo "$OTOOL64" >&6; }
9849 else
9850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9851 $as_echo "no" >&6; }
9852 fi
9853
9854
9855 fi
9856 if test -z "$ac_cv_prog_OTOOL64"; then
9857   ac_ct_OTOOL64=$OTOOL64
9858   # Extract the first word of "otool64", so it can be a program name with args.
9859 set dummy otool64; ac_word=$2
9860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9861 $as_echo_n "checking for $ac_word... " >&6; }
9862 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
9863   $as_echo_n "(cached) " >&6
9864 else
9865   if test -n "$ac_ct_OTOOL64"; then
9866   ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
9867 else
9868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9869 for as_dir in $PATH
9870 do
9871   IFS=$as_save_IFS
9872   test -z "$as_dir" && as_dir=.
9873     for ac_exec_ext in '' $ac_executable_extensions; do
9874   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9875     ac_cv_prog_ac_ct_OTOOL64="otool64"
9876     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9877     break 2
9878   fi
9879 done
9880   done
9881 IFS=$as_save_IFS
9882
9883 fi
9884 fi
9885 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
9886 if test -n "$ac_ct_OTOOL64"; then
9887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
9888 $as_echo "$ac_ct_OTOOL64" >&6; }
9889 else
9890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9891 $as_echo "no" >&6; }
9892 fi
9893
9894   if test "x$ac_ct_OTOOL64" = x; then
9895     OTOOL64=":"
9896   else
9897     case $cross_compiling:$ac_tool_warned in
9898 yes:)
9899 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9900 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9901 ac_tool_warned=yes ;;
9902 esac
9903     OTOOL64=$ac_ct_OTOOL64
9904   fi
9905 else
9906   OTOOL64="$ac_cv_prog_OTOOL64"
9907 fi
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
9936 $as_echo_n "checking for -single_module linker flag... " >&6; }
9937 if ${lt_cv_apple_cc_single_mod+:} false; then :
9938   $as_echo_n "(cached) " >&6
9939 else
9940   lt_cv_apple_cc_single_mod=no
9941       if test -z "$LT_MULTI_MODULE"; then
9942         # By default we will add the -single_module flag. You can override
9943         # by either setting the environment variable LT_MULTI_MODULE
9944         # non-empty at configure time, or by adding -multi_module to the
9945         # link flags.
9946         rm -rf libconftest.dylib*
9947         echo "int foo(void){return 1;}" > conftest.c
9948         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9949 -dynamiclib -Wl,-single_module conftest.c" >&5
9950         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9951           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
9952         _lt_result=$?
9953         # If there is a non-empty error log, and "single_module"
9954         # appears in it, assume the flag caused a linker warning
9955         if test -s conftest.err && $GREP single_module conftest.err; then
9956           cat conftest.err >&5
9957         # Otherwise, if the output was created with a 0 exit code from
9958         # the compiler, it worked.
9959         elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
9960           lt_cv_apple_cc_single_mod=yes
9961         else
9962           cat conftest.err >&5
9963         fi
9964         rm -rf libconftest.dylib*
9965         rm -f conftest.*
9966       fi
9967 fi
9968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
9969 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
9970
9971     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
9972 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
9973 if ${lt_cv_ld_exported_symbols_list+:} false; then :
9974   $as_echo_n "(cached) " >&6
9975 else
9976   lt_cv_ld_exported_symbols_list=no
9977       save_LDFLAGS=$LDFLAGS
9978       echo "_main" > conftest.sym
9979       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
9980       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9981 /* end confdefs.h.  */
9982
9983 int
9984 main ()
9985 {
9986
9987   ;
9988   return 0;
9989 }
9990 _ACEOF
9991 if ac_fn_c_try_link "$LINENO"; then :
9992   lt_cv_ld_exported_symbols_list=yes
9993 else
9994   lt_cv_ld_exported_symbols_list=no
9995 fi
9996 rm -f core conftest.err conftest.$ac_objext \
9997     conftest$ac_exeext conftest.$ac_ext
9998         LDFLAGS=$save_LDFLAGS
9999
10000 fi
10001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10002 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
10003
10004     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10005 $as_echo_n "checking for -force_load linker flag... " >&6; }
10006 if ${lt_cv_ld_force_load+:} false; then :
10007   $as_echo_n "(cached) " >&6
10008 else
10009   lt_cv_ld_force_load=no
10010       cat > conftest.c << _LT_EOF
10011 int forced_loaded() { return 2;}
10012 _LT_EOF
10013       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10014       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10015       echo "$AR cru libconftest.a conftest.o" >&5
10016       $AR cru libconftest.a conftest.o 2>&5
10017       echo "$RANLIB libconftest.a" >&5
10018       $RANLIB libconftest.a 2>&5
10019       cat > conftest.c << _LT_EOF
10020 int main() { return 0;}
10021 _LT_EOF
10022       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10023       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10024       _lt_result=$?
10025       if test -s conftest.err && $GREP force_load conftest.err; then
10026         cat conftest.err >&5
10027       elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10028         lt_cv_ld_force_load=yes
10029       else
10030         cat conftest.err >&5
10031       fi
10032         rm -f conftest.err libconftest.a conftest conftest.c
10033         rm -rf conftest.dSYM
10034
10035 fi
10036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10037 $as_echo "$lt_cv_ld_force_load" >&6; }
10038     case $host_os in
10039     rhapsody* | darwin1.[012])
10040       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10041     darwin1.*)
10042       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10043     darwin*) # darwin 5.x on
10044       # if running on 10.5 or later, the deployment target defaults
10045       # to the OS version, if on x86, and 10.4, the deployment
10046       # target defaults to 10.4. Don't you love it?
10047       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10048         10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10049           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10050         10.[012][,.]*)
10051           _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10052         10.*)
10053           _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10054       esac
10055     ;;
10056   esac
10057     if test yes = "$lt_cv_apple_cc_single_mod"; then
10058       _lt_dar_single_mod='$single_module'
10059     fi
10060     if test yes = "$lt_cv_ld_exported_symbols_list"; then
10061       _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10062     else
10063       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10064     fi
10065     if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10066       _lt_dsymutil='~$DSYMUTIL $lib || :'
10067     else
10068       _lt_dsymutil=
10069     fi
10070     ;;
10071   esac
10072
10073 # func_munge_path_list VARIABLE PATH
10074 # -----------------------------------
10075 # VARIABLE is name of variable containing _space_ separated list of
10076 # directories to be munged by the contents of PATH, which is string
10077 # having a format:
10078 # "DIR[:DIR]:"
10079 #       string "DIR[ DIR]" will be prepended to VARIABLE
10080 # ":DIR[:DIR]"
10081 #       string "DIR[ DIR]" will be appended to VARIABLE
10082 # "DIRP[:DIRP]::[DIRA:]DIRA"
10083 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10084 #       "DIRA[ DIRA]" will be appended to VARIABLE
10085 # "DIR[:DIR]"
10086 #       VARIABLE will be replaced by "DIR[ DIR]"
10087 func_munge_path_list ()
10088 {
10089     case x$2 in
10090     x)
10091         ;;
10092     *:)
10093         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10094         ;;
10095     x:*)
10096         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10097         ;;
10098     *::*)
10099         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10100         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10101         ;;
10102     *)
10103         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10104         ;;
10105     esac
10106 }
10107
10108 for ac_header in dlfcn.h
10109 do :
10110   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10111 "
10112 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
10113   cat >>confdefs.h <<_ACEOF
10114 #define HAVE_DLFCN_H 1
10115 _ACEOF
10116
10117 fi
10118
10119 done
10120
10121
10122
10123
10124
10125
10126
10127 # Set options
10128
10129
10130
10131         enable_dlopen=no
10132
10133
10134   enable_win32_dll=no
10135
10136
10137             # Check whether --enable-shared was given.
10138 if test "${enable_shared+set}" = set; then :
10139   enableval=$enable_shared; p=${PACKAGE-default}
10140     case $enableval in
10141     yes) enable_shared=yes ;;
10142     no) enable_shared=no ;;
10143     *)
10144       enable_shared=no
10145       # Look at the argument we got.  We use all the common list separators.
10146       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10147       for pkg in $enableval; do
10148         IFS=$lt_save_ifs
10149         if test "X$pkg" = "X$p"; then
10150           enable_shared=yes
10151         fi
10152       done
10153       IFS=$lt_save_ifs
10154       ;;
10155     esac
10156 else
10157   enable_shared=yes
10158 fi
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168   # Check whether --enable-static was given.
10169 if test "${enable_static+set}" = set; then :
10170   enableval=$enable_static; p=${PACKAGE-default}
10171     case $enableval in
10172     yes) enable_static=yes ;;
10173     no) enable_static=no ;;
10174     *)
10175      enable_static=no
10176       # Look at the argument we got.  We use all the common list separators.
10177       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10178       for pkg in $enableval; do
10179         IFS=$lt_save_ifs
10180         if test "X$pkg" = "X$p"; then
10181           enable_static=yes
10182         fi
10183       done
10184       IFS=$lt_save_ifs
10185       ;;
10186     esac
10187 else
10188   enable_static=yes
10189 fi
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200 # Check whether --with-pic was given.
10201 if test "${with_pic+set}" = set; then :
10202   withval=$with_pic; lt_p=${PACKAGE-default}
10203     case $withval in
10204     yes|no) pic_mode=$withval ;;
10205     *)
10206       pic_mode=default
10207       # Look at the argument we got.  We use all the common list separators.
10208       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10209       for lt_pkg in $withval; do
10210         IFS=$lt_save_ifs
10211         if test "X$lt_pkg" = "X$lt_p"; then
10212           pic_mode=yes
10213         fi
10214       done
10215       IFS=$lt_save_ifs
10216       ;;
10217     esac
10218 else
10219   pic_mode=default
10220 fi
10221
10222
10223
10224
10225
10226
10227
10228
10229   # Check whether --enable-fast-install was given.
10230 if test "${enable_fast_install+set}" = set; then :
10231   enableval=$enable_fast_install; p=${PACKAGE-default}
10232     case $enableval in
10233     yes) enable_fast_install=yes ;;
10234     no) enable_fast_install=no ;;
10235     *)
10236       enable_fast_install=no
10237       # Look at the argument we got.  We use all the common list separators.
10238       lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10239       for pkg in $enableval; do
10240         IFS=$lt_save_ifs
10241         if test "X$pkg" = "X$p"; then
10242           enable_fast_install=yes
10243         fi
10244       done
10245       IFS=$lt_save_ifs
10246       ;;
10247     esac
10248 else
10249   enable_fast_install=yes
10250 fi
10251
10252
10253
10254
10255
10256
10257
10258
10259   shared_archive_member_spec=
10260 case $host,$enable_shared in
10261 power*-*-aix[5-9]*,yes)
10262   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10263 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10264
10265 # Check whether --with-aix-soname was given.
10266 if test "${with_aix_soname+set}" = set; then :
10267   withval=$with_aix_soname; case $withval in
10268     aix|svr4|both)
10269       ;;
10270     *)
10271       as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10272       ;;
10273     esac
10274     lt_cv_with_aix_soname=$with_aix_soname
10275 else
10276   if ${lt_cv_with_aix_soname+:} false; then :
10277   $as_echo_n "(cached) " >&6
10278 else
10279   lt_cv_with_aix_soname=aix
10280 fi
10281
10282     with_aix_soname=$lt_cv_with_aix_soname
10283 fi
10284
10285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10286 $as_echo "$with_aix_soname" >&6; }
10287   if test aix != "$with_aix_soname"; then
10288     # For the AIX way of multilib, we name the shared archive member
10289     # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10290     # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10291     # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10292     # the AIX toolchain works better with OBJECT_MODE set (default 32).
10293     if test 64 = "${OBJECT_MODE-32}"; then
10294       shared_archive_member_spec=shr_64
10295     else
10296       shared_archive_member_spec=shr
10297     fi
10298   fi
10299   ;;
10300 *)
10301   with_aix_soname=aix
10302   ;;
10303 esac
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314 # This can be used to rebuild libtool when needed
10315 LIBTOOL_DEPS=$ltmain
10316
10317 # Always use our own libtool.
10318 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349 test -z "$LN_S" && LN_S="ln -s"
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364 if test -n "${ZSH_VERSION+set}"; then
10365    setopt NO_GLOB_SUBST
10366 fi
10367
10368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10369 $as_echo_n "checking for objdir... " >&6; }
10370 if ${lt_cv_objdir+:} false; then :
10371   $as_echo_n "(cached) " >&6
10372 else
10373   rm -f .libs 2>/dev/null
10374 mkdir .libs 2>/dev/null
10375 if test -d .libs; then
10376   lt_cv_objdir=.libs
10377 else
10378   # MS-DOS does not allow filenames that begin with a dot.
10379   lt_cv_objdir=_libs
10380 fi
10381 rmdir .libs 2>/dev/null
10382 fi
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10384 $as_echo "$lt_cv_objdir" >&6; }
10385 objdir=$lt_cv_objdir
10386
10387
10388
10389
10390
10391 cat >>confdefs.h <<_ACEOF
10392 #define LT_OBJDIR "$lt_cv_objdir/"
10393 _ACEOF
10394
10395
10396
10397
10398 case $host_os in
10399 aix3*)
10400   # AIX sometimes has problems with the GCC collect2 program.  For some
10401   # reason, if we set the COLLECT_NAMES environment variable, the problems
10402   # vanish in a puff of smoke.
10403   if test set != "${COLLECT_NAMES+set}"; then
10404     COLLECT_NAMES=
10405     export COLLECT_NAMES
10406   fi
10407   ;;
10408 esac
10409
10410 # Global variables:
10411 ofile=libtool
10412 can_build_shared=yes
10413
10414 # All known linkers require a '.a' archive for static linking (except MSVC,
10415 # which needs '.lib').
10416 libext=a
10417
10418 with_gnu_ld=$lt_cv_prog_gnu_ld
10419
10420 old_CC=$CC
10421 old_CFLAGS=$CFLAGS
10422
10423 # Set sane defaults for various variables
10424 test -z "$CC" && CC=cc
10425 test -z "$LTCC" && LTCC=$CC
10426 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10427 test -z "$LD" && LD=ld
10428 test -z "$ac_objext" && ac_objext=o
10429
10430 func_cc_basename $compiler
10431 cc_basename=$func_cc_basename_result
10432
10433
10434 # Only perform the check for file, if the check method requires it
10435 test -z "$MAGIC_CMD" && MAGIC_CMD=file
10436 case $deplibs_check_method in
10437 file_magic*)
10438   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10439     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10440 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
10441 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10442   $as_echo_n "(cached) " >&6
10443 else
10444   case $MAGIC_CMD in
10445 [\\/*] |  ?:[\\/]*)
10446   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10447   ;;
10448 *)
10449   lt_save_MAGIC_CMD=$MAGIC_CMD
10450   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10451   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10452   for ac_dir in $ac_dummy; do
10453     IFS=$lt_save_ifs
10454     test -z "$ac_dir" && ac_dir=.
10455     if test -f "$ac_dir/${ac_tool_prefix}file"; then
10456       lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10457       if test -n "$file_magic_test_file"; then
10458         case $deplibs_check_method in
10459         "file_magic "*)
10460           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10461           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10462           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10463             $EGREP "$file_magic_regex" > /dev/null; then
10464             :
10465           else
10466             cat <<_LT_EOF 1>&2
10467
10468 *** Warning: the command libtool uses to detect shared libraries,
10469 *** $file_magic_cmd, produces output that libtool cannot recognize.
10470 *** The result is that libtool may fail to recognize shared libraries
10471 *** as such.  This will affect the creation of libtool libraries that
10472 *** depend on shared libraries, but programs linked with such libtool
10473 *** libraries will work regardless of this problem.  Nevertheless, you
10474 *** may want to report the problem to your system manager and/or to
10475 *** bug-libtool@gnu.org
10476
10477 _LT_EOF
10478           fi ;;
10479         esac
10480       fi
10481       break
10482     fi
10483   done
10484   IFS=$lt_save_ifs
10485   MAGIC_CMD=$lt_save_MAGIC_CMD
10486   ;;
10487 esac
10488 fi
10489
10490 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10491 if test -n "$MAGIC_CMD"; then
10492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10493 $as_echo "$MAGIC_CMD" >&6; }
10494 else
10495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10496 $as_echo "no" >&6; }
10497 fi
10498
10499
10500
10501
10502
10503 if test -z "$lt_cv_path_MAGIC_CMD"; then
10504   if test -n "$ac_tool_prefix"; then
10505     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10506 $as_echo_n "checking for file... " >&6; }
10507 if ${lt_cv_path_MAGIC_CMD+:} false; then :
10508   $as_echo_n "(cached) " >&6
10509 else
10510   case $MAGIC_CMD in
10511 [\\/*] |  ?:[\\/]*)
10512   lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10513   ;;
10514 *)
10515   lt_save_MAGIC_CMD=$MAGIC_CMD
10516   lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10517   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10518   for ac_dir in $ac_dummy; do
10519     IFS=$lt_save_ifs
10520     test -z "$ac_dir" && ac_dir=.
10521     if test -f "$ac_dir/file"; then
10522       lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10523       if test -n "$file_magic_test_file"; then
10524         case $deplibs_check_method in
10525         "file_magic "*)
10526           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10527           MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10528           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10529             $EGREP "$file_magic_regex" > /dev/null; then
10530             :
10531           else
10532             cat <<_LT_EOF 1>&2
10533
10534 *** Warning: the command libtool uses to detect shared libraries,
10535 *** $file_magic_cmd, produces output that libtool cannot recognize.
10536 *** The result is that libtool may fail to recognize shared libraries
10537 *** as such.  This will affect the creation of libtool libraries that
10538 *** depend on shared libraries, but programs linked with such libtool
10539 *** libraries will work regardless of this problem.  Nevertheless, you
10540 *** may want to report the problem to your system manager and/or to
10541 *** bug-libtool@gnu.org
10542
10543 _LT_EOF
10544           fi ;;
10545         esac
10546       fi
10547       break
10548     fi
10549   done
10550   IFS=$lt_save_ifs
10551   MAGIC_CMD=$lt_save_MAGIC_CMD
10552   ;;
10553 esac
10554 fi
10555
10556 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10557 if test -n "$MAGIC_CMD"; then
10558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10559 $as_echo "$MAGIC_CMD" >&6; }
10560 else
10561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10562 $as_echo "no" >&6; }
10563 fi
10564
10565
10566   else
10567     MAGIC_CMD=:
10568   fi
10569 fi
10570
10571   fi
10572   ;;
10573 esac
10574
10575 # Use C for the default configuration in the libtool script
10576
10577 lt_save_CC=$CC
10578 ac_ext=c
10579 ac_cpp='$CPP $CPPFLAGS'
10580 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10581 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10582 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10583
10584
10585 # Source file extension for C test sources.
10586 ac_ext=c
10587
10588 # Object file extension for compiled C test sources.
10589 objext=o
10590 objext=$objext
10591
10592 # Code to be used in simple compile tests
10593 lt_simple_compile_test_code="int some_variable = 0;"
10594
10595 # Code to be used in simple link tests
10596 lt_simple_link_test_code='int main(){return(0);}'
10597
10598
10599
10600
10601
10602
10603
10604 # If no C compiler was specified, use CC.
10605 LTCC=${LTCC-"$CC"}
10606
10607 # If no C compiler flags were specified, use CFLAGS.
10608 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10609
10610 # Allow CC to be a program name with arguments.
10611 compiler=$CC
10612
10613 # Save the default compiler, since it gets overwritten when the other
10614 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10615 compiler_DEFAULT=$CC
10616
10617 # save warnings/boilerplate of simple test code
10618 ac_outfile=conftest.$ac_objext
10619 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10620 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10621 _lt_compiler_boilerplate=`cat conftest.err`
10622 $RM conftest*
10623
10624 ac_outfile=conftest.$ac_objext
10625 echo "$lt_simple_link_test_code" >conftest.$ac_ext
10626 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10627 _lt_linker_boilerplate=`cat conftest.err`
10628 $RM -r conftest*
10629
10630
10631 if test -n "$compiler"; then
10632
10633 lt_prog_compiler_no_builtin_flag=
10634
10635 if test yes = "$GCC"; then
10636   case $cc_basename in
10637   nvcc*)
10638     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10639   *)
10640     lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10641   esac
10642
10643   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10644 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10645 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
10646   $as_echo_n "(cached) " >&6
10647 else
10648   lt_cv_prog_compiler_rtti_exceptions=no
10649    ac_outfile=conftest.$ac_objext
10650    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10651    lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10652    # Insert the option either (1) after the last *FLAGS variable, or
10653    # (2) before a word containing "conftest.", or (3) at the end.
10654    # Note that $ac_compile itself does not contain backslashes and begins
10655    # with a dollar sign (not a hyphen), so the echo should work correctly.
10656    # The option is referenced via a variable to avoid confusing sed.
10657    lt_compile=`echo "$ac_compile" | $SED \
10658    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10659    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10660    -e 's:$: $lt_compiler_flag:'`
10661    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10662    (eval "$lt_compile" 2>conftest.err)
10663    ac_status=$?
10664    cat conftest.err >&5
10665    echo "$as_me:$LINENO: \$? = $ac_status" >&5
10666    if (exit $ac_status) && test -s "$ac_outfile"; then
10667      # The compiler can only warn and ignore the option if not recognized
10668      # So say no if there are warnings other than the usual output.
10669      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10670      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10671      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10672        lt_cv_prog_compiler_rtti_exceptions=yes
10673      fi
10674    fi
10675    $RM conftest*
10676
10677 fi
10678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10679 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10680
10681 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10682     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10683 else
10684     :
10685 fi
10686
10687 fi
10688
10689
10690
10691
10692
10693
10694   lt_prog_compiler_wl=
10695 lt_prog_compiler_pic=
10696 lt_prog_compiler_static=
10697
10698
10699   if test yes = "$GCC"; then
10700     lt_prog_compiler_wl='-Wl,'
10701     lt_prog_compiler_static='-static'
10702
10703     case $host_os in
10704       aix*)
10705       # All AIX code is PIC.
10706       if test ia64 = "$host_cpu"; then
10707         # AIX 5 now supports IA64 processor
10708         lt_prog_compiler_static='-Bstatic'
10709       fi
10710       lt_prog_compiler_pic='-fPIC'
10711       ;;
10712
10713     amigaos*)
10714       case $host_cpu in
10715       powerpc)
10716             # see comment about AmigaOS4 .so support
10717             lt_prog_compiler_pic='-fPIC'
10718         ;;
10719       m68k)
10720             # FIXME: we need at least 68020 code to build shared libraries, but
10721             # adding the '-m68020' flag to GCC prevents building anything better,
10722             # like '-m68040'.
10723             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10724         ;;
10725       esac
10726       ;;
10727
10728     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10729       # PIC is the default for these OSes.
10730       ;;
10731
10732     mingw* | cygwin* | pw32* | os2* | cegcc*)
10733       # This hack is so that the source file can tell whether it is being
10734       # built for inclusion in a dll (and should export symbols for example).
10735       # Although the cygwin gcc ignores -fPIC, still need this for old-style
10736       # (--disable-auto-import) libraries
10737       lt_prog_compiler_pic='-DDLL_EXPORT'
10738       case $host_os in
10739       os2*)
10740         lt_prog_compiler_static='$wl-static'
10741         ;;
10742       esac
10743       ;;
10744
10745     darwin* | rhapsody*)
10746       # PIC is the default on this platform
10747       # Common symbols not allowed in MH_DYLIB files
10748       lt_prog_compiler_pic='-fno-common'
10749       ;;
10750
10751     haiku*)
10752       # PIC is the default for Haiku.
10753       # The "-static" flag exists, but is broken.
10754       lt_prog_compiler_static=
10755       ;;
10756
10757     hpux*)
10758       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10759       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
10760       # sets the default TLS model and affects inlining.
10761       case $host_cpu in
10762       hppa*64*)
10763         # +Z the default
10764         ;;
10765       *)
10766         lt_prog_compiler_pic='-fPIC'
10767         ;;
10768       esac
10769       ;;
10770
10771     interix[3-9]*)
10772       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10773       # Instead, we relocate shared libraries at runtime.
10774       ;;
10775
10776     msdosdjgpp*)
10777       # Just because we use GCC doesn't mean we suddenly get shared libraries
10778       # on systems that don't support them.
10779       lt_prog_compiler_can_build_shared=no
10780       enable_shared=no
10781       ;;
10782
10783     *nto* | *qnx*)
10784       # QNX uses GNU C++, but need to define -shared option too, otherwise
10785       # it will coredump.
10786       lt_prog_compiler_pic='-fPIC -shared'
10787       ;;
10788
10789     sysv4*MP*)
10790       if test -d /usr/nec; then
10791         lt_prog_compiler_pic=-Kconform_pic
10792       fi
10793       ;;
10794
10795     *)
10796       lt_prog_compiler_pic='-fPIC'
10797       ;;
10798     esac
10799
10800     case $cc_basename in
10801     nvcc*) # Cuda Compiler Driver 2.2
10802       lt_prog_compiler_wl='-Xlinker '
10803       if test -n "$lt_prog_compiler_pic"; then
10804         lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10805       fi
10806       ;;
10807     esac
10808   else
10809     # PORTME Check for flag to pass linker flags through the system compiler.
10810     case $host_os in
10811     aix*)
10812       lt_prog_compiler_wl='-Wl,'
10813       if test ia64 = "$host_cpu"; then
10814         # AIX 5 now supports IA64 processor
10815         lt_prog_compiler_static='-Bstatic'
10816       else
10817         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
10818       fi
10819       ;;
10820
10821     darwin* | rhapsody*)
10822       # PIC is the default on this platform
10823       # Common symbols not allowed in MH_DYLIB files
10824       lt_prog_compiler_pic='-fno-common'
10825       case $cc_basename in
10826       nagfor*)
10827         # NAG Fortran compiler
10828         lt_prog_compiler_wl='-Wl,-Wl,,'
10829         lt_prog_compiler_pic='-PIC'
10830         lt_prog_compiler_static='-Bstatic'
10831         ;;
10832       esac
10833       ;;
10834
10835     mingw* | cygwin* | pw32* | os2* | cegcc*)
10836       # This hack is so that the source file can tell whether it is being
10837       # built for inclusion in a dll (and should export symbols for example).
10838       lt_prog_compiler_pic='-DDLL_EXPORT'
10839       case $host_os in
10840       os2*)
10841         lt_prog_compiler_static='$wl-static'
10842         ;;
10843       esac
10844       ;;
10845
10846     hpux9* | hpux10* | hpux11*)
10847       lt_prog_compiler_wl='-Wl,'
10848       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10849       # not for PA HP-UX.
10850       case $host_cpu in
10851       hppa*64*|ia64*)
10852         # +Z the default
10853         ;;
10854       *)
10855         lt_prog_compiler_pic='+Z'
10856         ;;
10857       esac
10858       # Is there a better lt_prog_compiler_static that works with the bundled CC?
10859       lt_prog_compiler_static='$wl-a ${wl}archive'
10860       ;;
10861
10862     irix5* | irix6* | nonstopux*)
10863       lt_prog_compiler_wl='-Wl,'
10864       # PIC (with -KPIC) is the default.
10865       lt_prog_compiler_static='-non_shared'
10866       ;;
10867
10868     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
10869       case $cc_basename in
10870       # old Intel for x86_64, which still supported -KPIC.
10871       ecc*)
10872         lt_prog_compiler_wl='-Wl,'
10873         lt_prog_compiler_pic='-KPIC'
10874         lt_prog_compiler_static='-static'
10875         ;;
10876       # icc used to be incompatible with GCC.
10877       # ICC 10 doesn't accept -KPIC any more.
10878       icc* | ifort*)
10879         lt_prog_compiler_wl='-Wl,'
10880         lt_prog_compiler_pic='-fPIC'
10881         lt_prog_compiler_static='-static'
10882         ;;
10883       # Lahey Fortran 8.1.
10884       lf95*)
10885         lt_prog_compiler_wl='-Wl,'
10886         lt_prog_compiler_pic='--shared'
10887         lt_prog_compiler_static='--static'
10888         ;;
10889       nagfor*)
10890         # NAG Fortran compiler
10891         lt_prog_compiler_wl='-Wl,-Wl,,'
10892         lt_prog_compiler_pic='-PIC'
10893         lt_prog_compiler_static='-Bstatic'
10894         ;;
10895       tcc*)
10896         # Fabrice Bellard et al's Tiny C Compiler
10897         lt_prog_compiler_wl='-Wl,'
10898         lt_prog_compiler_pic='-fPIC'
10899         lt_prog_compiler_static='-static'
10900         ;;
10901       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
10902         # Portland Group compilers (*not* the Pentium gcc compiler,
10903         # which looks to be a dead project)
10904         lt_prog_compiler_wl='-Wl,'
10905         lt_prog_compiler_pic='-fpic'
10906         lt_prog_compiler_static='-Bstatic'
10907         ;;
10908       ccc*)
10909         lt_prog_compiler_wl='-Wl,'
10910         # All Alpha code is PIC.
10911         lt_prog_compiler_static='-non_shared'
10912         ;;
10913       xl* | bgxl* | bgf* | mpixl*)
10914         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
10915         lt_prog_compiler_wl='-Wl,'
10916         lt_prog_compiler_pic='-qpic'
10917         lt_prog_compiler_static='-qstaticlink'
10918         ;;
10919       *)
10920         case `$CC -V 2>&1 | sed 5q` in
10921         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
10922           # Sun Fortran 8.3 passes all unrecognized flags to the linker
10923           lt_prog_compiler_pic='-KPIC'
10924           lt_prog_compiler_static='-Bstatic'
10925           lt_prog_compiler_wl=''
10926           ;;
10927         *Sun\ F* | *Sun*Fortran*)
10928           lt_prog_compiler_pic='-KPIC'
10929           lt_prog_compiler_static='-Bstatic'
10930           lt_prog_compiler_wl='-Qoption ld '
10931           ;;
10932         *Sun\ C*)
10933           # Sun C 5.9
10934           lt_prog_compiler_pic='-KPIC'
10935           lt_prog_compiler_static='-Bstatic'
10936           lt_prog_compiler_wl='-Wl,'
10937           ;;
10938         *Intel*\ [CF]*Compiler*)
10939           lt_prog_compiler_wl='-Wl,'
10940           lt_prog_compiler_pic='-fPIC'
10941           lt_prog_compiler_static='-static'
10942           ;;
10943         *Portland\ Group*)
10944           lt_prog_compiler_wl='-Wl,'
10945           lt_prog_compiler_pic='-fpic'
10946           lt_prog_compiler_static='-Bstatic'
10947           ;;
10948         esac
10949         ;;
10950       esac
10951       ;;
10952
10953     newsos6)
10954       lt_prog_compiler_pic='-KPIC'
10955       lt_prog_compiler_static='-Bstatic'
10956       ;;
10957
10958     *nto* | *qnx*)
10959       # QNX uses GNU C++, but need to define -shared option too, otherwise
10960       # it will coredump.
10961       lt_prog_compiler_pic='-fPIC -shared'
10962       ;;
10963
10964     osf3* | osf4* | osf5*)
10965       lt_prog_compiler_wl='-Wl,'
10966       # All OSF/1 code is PIC.
10967       lt_prog_compiler_static='-non_shared'
10968       ;;
10969
10970     rdos*)
10971       lt_prog_compiler_static='-non_shared'
10972       ;;
10973
10974     solaris*)
10975       lt_prog_compiler_pic='-KPIC'
10976       lt_prog_compiler_static='-Bstatic'
10977       case $cc_basename in
10978       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
10979         lt_prog_compiler_wl='-Qoption ld ';;
10980       *)
10981         lt_prog_compiler_wl='-Wl,';;
10982       esac
10983       ;;
10984
10985     sunos4*)
10986       lt_prog_compiler_wl='-Qoption ld '
10987       lt_prog_compiler_pic='-PIC'
10988       lt_prog_compiler_static='-Bstatic'
10989       ;;
10990
10991     sysv4 | sysv4.2uw2* | sysv4.3*)
10992       lt_prog_compiler_wl='-Wl,'
10993       lt_prog_compiler_pic='-KPIC'
10994       lt_prog_compiler_static='-Bstatic'
10995       ;;
10996
10997     sysv4*MP*)
10998       if test -d /usr/nec; then
10999         lt_prog_compiler_pic='-Kconform_pic'
11000         lt_prog_compiler_static='-Bstatic'
11001       fi
11002       ;;
11003
11004     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11005       lt_prog_compiler_wl='-Wl,'
11006       lt_prog_compiler_pic='-KPIC'
11007       lt_prog_compiler_static='-Bstatic'
11008       ;;
11009
11010     unicos*)
11011       lt_prog_compiler_wl='-Wl,'
11012       lt_prog_compiler_can_build_shared=no
11013       ;;
11014
11015     uts4*)
11016       lt_prog_compiler_pic='-pic'
11017       lt_prog_compiler_static='-Bstatic'
11018       ;;
11019
11020     *)
11021       lt_prog_compiler_can_build_shared=no
11022       ;;
11023     esac
11024   fi
11025
11026 case $host_os in
11027   # For platforms that do not support PIC, -DPIC is meaningless:
11028   *djgpp*)
11029     lt_prog_compiler_pic=
11030     ;;
11031   *)
11032     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11033     ;;
11034 esac
11035
11036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11037 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
11038 if ${lt_cv_prog_compiler_pic+:} false; then :
11039   $as_echo_n "(cached) " >&6
11040 else
11041   lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11042 fi
11043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11044 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
11045 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11046
11047 #
11048 # Check to make sure the PIC flag actually works.
11049 #
11050 if test -n "$lt_prog_compiler_pic"; then
11051   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11052 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11053 if ${lt_cv_prog_compiler_pic_works+:} false; then :
11054   $as_echo_n "(cached) " >&6
11055 else
11056   lt_cv_prog_compiler_pic_works=no
11057    ac_outfile=conftest.$ac_objext
11058    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11059    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
11060    # Insert the option either (1) after the last *FLAGS variable, or
11061    # (2) before a word containing "conftest.", or (3) at the end.
11062    # Note that $ac_compile itself does not contain backslashes and begins
11063    # with a dollar sign (not a hyphen), so the echo should work correctly.
11064    # The option is referenced via a variable to avoid confusing sed.
11065    lt_compile=`echo "$ac_compile" | $SED \
11066    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11067    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11068    -e 's:$: $lt_compiler_flag:'`
11069    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11070    (eval "$lt_compile" 2>conftest.err)
11071    ac_status=$?
11072    cat conftest.err >&5
11073    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11074    if (exit $ac_status) && test -s "$ac_outfile"; then
11075      # The compiler can only warn and ignore the option if not recognized
11076      # So say no if there are warnings other than the usual output.
11077      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11078      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11079      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11080        lt_cv_prog_compiler_pic_works=yes
11081      fi
11082    fi
11083    $RM conftest*
11084
11085 fi
11086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11087 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
11088
11089 if test yes = "$lt_cv_prog_compiler_pic_works"; then
11090     case $lt_prog_compiler_pic in
11091      "" | " "*) ;;
11092      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11093      esac
11094 else
11095     lt_prog_compiler_pic=
11096      lt_prog_compiler_can_build_shared=no
11097 fi
11098
11099 fi
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111 #
11112 # Check to make sure the static flag actually works.
11113 #
11114 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11116 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11117 if ${lt_cv_prog_compiler_static_works+:} false; then :
11118   $as_echo_n "(cached) " >&6
11119 else
11120   lt_cv_prog_compiler_static_works=no
11121    save_LDFLAGS=$LDFLAGS
11122    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11123    echo "$lt_simple_link_test_code" > conftest.$ac_ext
11124    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11125      # The linker can only warn and ignore the option if not recognized
11126      # So say no if there are warnings
11127      if test -s conftest.err; then
11128        # Append any errors to the config.log.
11129        cat conftest.err 1>&5
11130        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11131        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11132        if diff conftest.exp conftest.er2 >/dev/null; then
11133          lt_cv_prog_compiler_static_works=yes
11134        fi
11135      else
11136        lt_cv_prog_compiler_static_works=yes
11137      fi
11138    fi
11139    $RM -r conftest*
11140    LDFLAGS=$save_LDFLAGS
11141
11142 fi
11143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11144 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
11145
11146 if test yes = "$lt_cv_prog_compiler_static_works"; then
11147     :
11148 else
11149     lt_prog_compiler_static=
11150 fi
11151
11152
11153
11154
11155
11156
11157
11158   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11159 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11160 if ${lt_cv_prog_compiler_c_o+:} false; then :
11161   $as_echo_n "(cached) " >&6
11162 else
11163   lt_cv_prog_compiler_c_o=no
11164    $RM -r conftest 2>/dev/null
11165    mkdir conftest
11166    cd conftest
11167    mkdir out
11168    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11169
11170    lt_compiler_flag="-o out/conftest2.$ac_objext"
11171    # Insert the option either (1) after the last *FLAGS variable, or
11172    # (2) before a word containing "conftest.", or (3) at the end.
11173    # Note that $ac_compile itself does not contain backslashes and begins
11174    # with a dollar sign (not a hyphen), so the echo should work correctly.
11175    lt_compile=`echo "$ac_compile" | $SED \
11176    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11177    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11178    -e 's:$: $lt_compiler_flag:'`
11179    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11180    (eval "$lt_compile" 2>out/conftest.err)
11181    ac_status=$?
11182    cat out/conftest.err >&5
11183    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11184    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11185    then
11186      # The compiler can only warn and ignore the option if not recognized
11187      # So say no if there are warnings
11188      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11189      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11190      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11191        lt_cv_prog_compiler_c_o=yes
11192      fi
11193    fi
11194    chmod u+w . 2>&5
11195    $RM conftest*
11196    # SGI C++ compiler will create directory out/ii_files/ for
11197    # template instantiation
11198    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11199    $RM out/* && rmdir out
11200    cd ..
11201    $RM -r conftest
11202    $RM conftest*
11203
11204 fi
11205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11206 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11207
11208
11209
11210
11211
11212
11213   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11214 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11215 if ${lt_cv_prog_compiler_c_o+:} false; then :
11216   $as_echo_n "(cached) " >&6
11217 else
11218   lt_cv_prog_compiler_c_o=no
11219    $RM -r conftest 2>/dev/null
11220    mkdir conftest
11221    cd conftest
11222    mkdir out
11223    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11224
11225    lt_compiler_flag="-o out/conftest2.$ac_objext"
11226    # Insert the option either (1) after the last *FLAGS variable, or
11227    # (2) before a word containing "conftest.", or (3) at the end.
11228    # Note that $ac_compile itself does not contain backslashes and begins
11229    # with a dollar sign (not a hyphen), so the echo should work correctly.
11230    lt_compile=`echo "$ac_compile" | $SED \
11231    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11232    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11233    -e 's:$: $lt_compiler_flag:'`
11234    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11235    (eval "$lt_compile" 2>out/conftest.err)
11236    ac_status=$?
11237    cat out/conftest.err >&5
11238    echo "$as_me:$LINENO: \$? = $ac_status" >&5
11239    if (exit $ac_status) && test -s out/conftest2.$ac_objext
11240    then
11241      # The compiler can only warn and ignore the option if not recognized
11242      # So say no if there are warnings
11243      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11244      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11245      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11246        lt_cv_prog_compiler_c_o=yes
11247      fi
11248    fi
11249    chmod u+w . 2>&5
11250    $RM conftest*
11251    # SGI C++ compiler will create directory out/ii_files/ for
11252    # template instantiation
11253    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11254    $RM out/* && rmdir out
11255    cd ..
11256    $RM -r conftest
11257    $RM conftest*
11258
11259 fi
11260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11261 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
11262
11263
11264
11265
11266 hard_links=nottested
11267 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11268   # do not overwrite the value of need_locks provided by the user
11269   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11270 $as_echo_n "checking if we can lock with hard links... " >&6; }
11271   hard_links=yes
11272   $RM conftest*
11273   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11274   touch conftest.a
11275   ln conftest.a conftest.b 2>&5 || hard_links=no
11276   ln conftest.a conftest.b 2>/dev/null && hard_links=no
11277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11278 $as_echo "$hard_links" >&6; }
11279   if test no = "$hard_links"; then
11280     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11281 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11282     need_locks=warn
11283   fi
11284 else
11285   need_locks=no
11286 fi
11287
11288
11289
11290
11291
11292
11293   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11294 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11295
11296   runpath_var=
11297   allow_undefined_flag=
11298   always_export_symbols=no
11299   archive_cmds=
11300   archive_expsym_cmds=
11301   compiler_needs_object=no
11302   enable_shared_with_static_runtimes=no
11303   export_dynamic_flag_spec=
11304   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11305   hardcode_automatic=no
11306   hardcode_direct=no
11307   hardcode_direct_absolute=no
11308   hardcode_libdir_flag_spec=
11309   hardcode_libdir_separator=
11310   hardcode_minus_L=no
11311   hardcode_shlibpath_var=unsupported
11312   inherit_rpath=no
11313   link_all_deplibs=unknown
11314   module_cmds=
11315   module_expsym_cmds=
11316   old_archive_from_new_cmds=
11317   old_archive_from_expsyms_cmds=
11318   thread_safe_flag_spec=
11319   whole_archive_flag_spec=
11320   # include_expsyms should be a list of space-separated symbols to be *always*
11321   # included in the symbol list
11322   include_expsyms=
11323   # exclude_expsyms can be an extended regexp of symbols to exclude
11324   # it will be wrapped by ' (' and ')$', so one must not match beginning or
11325   # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11326   # as well as any symbol that contains 'd'.
11327   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11328   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11329   # platforms (ab)use it in PIC code, but their linkers get confused if
11330   # the symbol is explicitly referenced.  Since portable code cannot
11331   # rely on this symbol name, it's probably fine to never include it in
11332   # preloaded symbol tables.
11333   # Exclude shared library initialization/finalization symbols.
11334   extract_expsyms_cmds=
11335
11336   case $host_os in
11337   cygwin* | mingw* | pw32* | cegcc*)
11338     # FIXME: the MSVC++ port hasn't been tested in a loooong time
11339     # When not using gcc, we currently assume that we are using
11340     # Microsoft Visual C++.
11341     if test yes != "$GCC"; then
11342       with_gnu_ld=no
11343     fi
11344     ;;
11345   interix*)
11346     # we just hope/assume this is gcc and not c89 (= MSVC++)
11347     with_gnu_ld=yes
11348     ;;
11349   openbsd* | bitrig*)
11350     with_gnu_ld=no
11351     ;;
11352   esac
11353
11354   ld_shlibs=yes
11355
11356   # On some targets, GNU ld is compatible enough with the native linker
11357   # that we're better off using the native interface for both.
11358   lt_use_gnu_ld_interface=no
11359   if test yes = "$with_gnu_ld"; then
11360     case $host_os in
11361       aix*)
11362         # The AIX port of GNU ld has always aspired to compatibility
11363         # with the native linker.  However, as the warning in the GNU ld
11364         # block says, versions before 2.19.5* couldn't really create working
11365         # shared libraries, regardless of the interface used.
11366         case `$LD -v 2>&1` in
11367           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11368           *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11369           *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11370           *)
11371             lt_use_gnu_ld_interface=yes
11372             ;;
11373         esac
11374         ;;
11375       *)
11376         lt_use_gnu_ld_interface=yes
11377         ;;
11378     esac
11379   fi
11380
11381   if test yes = "$lt_use_gnu_ld_interface"; then
11382     # If archive_cmds runs LD, not CC, wlarc should be empty
11383     wlarc='$wl'
11384
11385     # Set some defaults for GNU ld with shared library support. These
11386     # are reset later if shared libraries are not supported. Putting them
11387     # here allows them to be overridden if necessary.
11388     runpath_var=LD_RUN_PATH
11389     hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11390     export_dynamic_flag_spec='$wl--export-dynamic'
11391     # ancient GNU ld didn't support --whole-archive et. al.
11392     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11393       whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11394     else
11395       whole_archive_flag_spec=
11396     fi
11397     supports_anon_versioning=no
11398     case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11399       *GNU\ gold*) supports_anon_versioning=yes ;;
11400       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11401       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11402       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11403       *\ 2.11.*) ;; # other 2.11 versions
11404       *) supports_anon_versioning=yes ;;
11405     esac
11406
11407     # See if GNU ld supports shared libraries.
11408     case $host_os in
11409     aix[3-9]*)
11410       # On AIX/PPC, the GNU linker is very broken
11411       if test ia64 != "$host_cpu"; then
11412         ld_shlibs=no
11413         cat <<_LT_EOF 1>&2
11414
11415 *** Warning: the GNU linker, at least up to release 2.19, is reported
11416 *** to be unable to reliably create shared libraries on AIX.
11417 *** Therefore, libtool is disabling shared libraries support.  If you
11418 *** really care for shared libraries, you may want to install binutils
11419 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11420 *** You will then need to restart the configuration process.
11421
11422 _LT_EOF
11423       fi
11424       ;;
11425
11426     amigaos*)
11427       case $host_cpu in
11428       powerpc)
11429             # see comment about AmigaOS4 .so support
11430             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11431             archive_expsym_cmds=''
11432         ;;
11433       m68k)
11434             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)'
11435             hardcode_libdir_flag_spec='-L$libdir'
11436             hardcode_minus_L=yes
11437         ;;
11438       esac
11439       ;;
11440
11441     beos*)
11442       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11443         allow_undefined_flag=unsupported
11444         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11445         # support --undefined.  This deserves some investigation.  FIXME
11446         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11447       else
11448         ld_shlibs=no
11449       fi
11450       ;;
11451
11452     cygwin* | mingw* | pw32* | cegcc*)
11453       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11454       # as there is no search path for DLLs.
11455       hardcode_libdir_flag_spec='-L$libdir'
11456       export_dynamic_flag_spec='$wl--export-all-symbols'
11457       allow_undefined_flag=unsupported
11458       always_export_symbols=no
11459       enable_shared_with_static_runtimes=yes
11460       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'
11461       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11462
11463       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11464         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11465         # If the export-symbols file already is a .def file, use it as
11466         # is; otherwise, prepend EXPORTS...
11467         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11468           cp $export_symbols $output_objdir/$soname.def;
11469         else
11470           echo EXPORTS > $output_objdir/$soname.def;
11471           cat $export_symbols >> $output_objdir/$soname.def;
11472         fi~
11473         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11474       else
11475         ld_shlibs=no
11476       fi
11477       ;;
11478
11479     haiku*)
11480       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11481       link_all_deplibs=yes
11482       ;;
11483
11484     os2*)
11485       hardcode_libdir_flag_spec='-L$libdir'
11486       hardcode_minus_L=yes
11487       allow_undefined_flag=unsupported
11488       shrext_cmds=.dll
11489       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11490         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11491         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11492         $ECHO EXPORTS >> $output_objdir/$libname.def~
11493         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11494         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11495         emximp -o $lib $output_objdir/$libname.def'
11496       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11497         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11498         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11499         $ECHO EXPORTS >> $output_objdir/$libname.def~
11500         prefix_cmds="$SED"~
11501         if test EXPORTS = "`$SED 1q $export_symbols`"; then
11502           prefix_cmds="$prefix_cmds -e 1d";
11503         fi~
11504         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11505         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11506         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11507         emximp -o $lib $output_objdir/$libname.def'
11508       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11509       enable_shared_with_static_runtimes=yes
11510       ;;
11511
11512     interix[3-9]*)
11513       hardcode_direct=no
11514       hardcode_shlibpath_var=no
11515       hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11516       export_dynamic_flag_spec='$wl-E'
11517       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11518       # Instead, shared libraries are loaded at an image base (0x10000000 by
11519       # default) and relocated if they conflict, which is a slow very memory
11520       # consuming and fragmenting process.  To avoid this, we pick a random,
11521       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11522       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11523       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11524       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'
11525       ;;
11526
11527     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11528       tmp_diet=no
11529       if test linux-dietlibc = "$host_os"; then
11530         case $cc_basename in
11531           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
11532         esac
11533       fi
11534       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11535          && test no = "$tmp_diet"
11536       then
11537         tmp_addflag=' $pic_flag'
11538         tmp_sharedflag='-shared'
11539         case $cc_basename,$host_cpu in
11540         pgcc*)                          # Portland Group C compiler
11541           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'
11542           tmp_addflag=' $pic_flag'
11543           ;;
11544         pgf77* | pgf90* | pgf95* | pgfortran*)
11545                                         # Portland Group f77 and f90 compilers
11546           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'
11547           tmp_addflag=' $pic_flag -Mnomain' ;;
11548         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
11549           tmp_addflag=' -i_dynamic' ;;
11550         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
11551           tmp_addflag=' -i_dynamic -nofor_main' ;;
11552         ifc* | ifort*)                  # Intel Fortran compiler
11553           tmp_addflag=' -nofor_main' ;;
11554         lf95*)                          # Lahey Fortran 8.1
11555           whole_archive_flag_spec=
11556           tmp_sharedflag='--shared' ;;
11557         nagfor*)                        # NAGFOR 5.3
11558           tmp_sharedflag='-Wl,-shared' ;;
11559         xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11560           tmp_sharedflag='-qmkshrobj'
11561           tmp_addflag= ;;
11562         nvcc*)  # Cuda Compiler Driver 2.2
11563           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'
11564           compiler_needs_object=yes
11565           ;;
11566         esac
11567         case `$CC -V 2>&1 | sed 5q` in
11568         *Sun\ C*)                       # Sun C 5.9
11569           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'
11570           compiler_needs_object=yes
11571           tmp_sharedflag='-G' ;;
11572         *Sun\ F*)                       # Sun Fortran 8.3
11573           tmp_sharedflag='-G' ;;
11574         esac
11575         archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11576
11577         if test yes = "$supports_anon_versioning"; then
11578           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11579             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11580             echo "local: *; };" >> $output_objdir/$libname.ver~
11581             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11582         fi
11583
11584         case $cc_basename in
11585         tcc*)
11586           export_dynamic_flag_spec='-rdynamic'
11587           ;;
11588         xlf* | bgf* | bgxlf* | mpixlf*)
11589           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11590           whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11591           hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11592           archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11593           if test yes = "$supports_anon_versioning"; then
11594             archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11595               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11596               echo "local: *; };" >> $output_objdir/$libname.ver~
11597               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11598           fi
11599           ;;
11600         esac
11601       else
11602         ld_shlibs=no
11603       fi
11604       ;;
11605
11606     netbsd*)
11607       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11608         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11609         wlarc=
11610       else
11611         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11612         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11613       fi
11614       ;;
11615
11616     solaris*)
11617       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11618         ld_shlibs=no
11619         cat <<_LT_EOF 1>&2
11620
11621 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
11622 *** create shared libraries on Solaris systems.  Therefore, libtool
11623 *** is disabling shared libraries support.  We urge you to upgrade GNU
11624 *** binutils to release 2.9.1 or newer.  Another option is to modify
11625 *** your PATH or compiler configuration so that the native linker is
11626 *** used, and then restart.
11627
11628 _LT_EOF
11629       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11630         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11631         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11632       else
11633         ld_shlibs=no
11634       fi
11635       ;;
11636
11637     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11638       case `$LD -v 2>&1` in
11639         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11640         ld_shlibs=no
11641         cat <<_LT_EOF 1>&2
11642
11643 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11644 *** reliably create shared libraries on SCO systems.  Therefore, libtool
11645 *** is disabling shared libraries support.  We urge you to upgrade GNU
11646 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11647 *** your PATH or compiler configuration so that the native linker is
11648 *** used, and then restart.
11649
11650 _LT_EOF
11651         ;;
11652         *)
11653           # For security reasons, it is highly recommended that you always
11654           # use absolute paths for naming shared libraries, and exclude the
11655           # DT_RUNPATH tag from executables and libraries.  But doing so
11656           # requires that you compile everything twice, which is a pain.
11657           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11658             hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11659             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11660             archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11661           else
11662             ld_shlibs=no
11663           fi
11664         ;;
11665       esac
11666       ;;
11667
11668     sunos4*)
11669       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11670       wlarc=
11671       hardcode_direct=yes
11672       hardcode_shlibpath_var=no
11673       ;;
11674
11675     *)
11676       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11677         archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11678         archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11679       else
11680         ld_shlibs=no
11681       fi
11682       ;;
11683     esac
11684
11685     if test no = "$ld_shlibs"; then
11686       runpath_var=
11687       hardcode_libdir_flag_spec=
11688       export_dynamic_flag_spec=
11689       whole_archive_flag_spec=
11690     fi
11691   else
11692     # PORTME fill in a description of your system's linker (not GNU ld)
11693     case $host_os in
11694     aix3*)
11695       allow_undefined_flag=unsupported
11696       always_export_symbols=yes
11697       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'
11698       # Note: this linker hardcodes the directories in LIBPATH if there
11699       # are no directories specified by -L.
11700       hardcode_minus_L=yes
11701       if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11702         # Neither direct hardcoding nor static linking is supported with a
11703         # broken collect2.
11704         hardcode_direct=unsupported
11705       fi
11706       ;;
11707
11708     aix[4-9]*)
11709       if test ia64 = "$host_cpu"; then
11710         # On IA64, the linker does run time linking by default, so we don't
11711         # have to do anything special.
11712         aix_use_runtimelinking=no
11713         exp_sym_flag='-Bexport'
11714         no_entry_flag=
11715       else
11716         # If we're using GNU nm, then we don't want the "-C" option.
11717         # -C means demangle to GNU nm, but means don't demangle to AIX nm.
11718         # Without the "-l" option, or with the "-B" option, AIX nm treats
11719         # weak defined symbols like other global defined symbols, whereas
11720         # GNU nm marks them as "W".
11721         # While the 'weak' keyword is ignored in the Export File, we need
11722         # it in the Import File for the 'aix-soname' feature, so we have
11723         # to replace the "-B" option with "-P" for AIX nm.
11724         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11725           export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
11726         else
11727           export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
11728         fi
11729         aix_use_runtimelinking=no
11730
11731         # Test if we are trying to use run time linking or normal
11732         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11733         # have runtime linking enabled, and use it for executables.
11734         # For shared libraries, we enable/disable runtime linking
11735         # depending on the kind of the shared library created -
11736         # when "with_aix_soname,aix_use_runtimelinking" is:
11737         # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
11738         # "aix,yes"  lib.so          shared, rtl:yes, for executables
11739         #            lib.a           static archive
11740         # "both,no"  lib.so.V(shr.o) shared, rtl:yes
11741         #            lib.a(lib.so.V) shared, rtl:no,  for executables
11742         # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11743         #            lib.a(lib.so.V) shared, rtl:no
11744         # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
11745         #            lib.a           static archive
11746         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11747           for ld_flag in $LDFLAGS; do
11748           if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11749             aix_use_runtimelinking=yes
11750             break
11751           fi
11752           done
11753           if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11754             # With aix-soname=svr4, we create the lib.so.V shared archives only,
11755             # so we don't have lib.a shared libs to link our executables.
11756             # We have to force runtime linking in this case.
11757             aix_use_runtimelinking=yes
11758             LDFLAGS="$LDFLAGS -Wl,-brtl"
11759           fi
11760           ;;
11761         esac
11762
11763         exp_sym_flag='-bexport'
11764         no_entry_flag='-bnoentry'
11765       fi
11766
11767       # When large executables or shared objects are built, AIX ld can
11768       # have problems creating the table of contents.  If linking a library
11769       # or program results in "error TOC overflow" add -mminimal-toc to
11770       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11771       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11772
11773       archive_cmds=''
11774       hardcode_direct=yes
11775       hardcode_direct_absolute=yes
11776       hardcode_libdir_separator=':'
11777       link_all_deplibs=yes
11778       file_list_spec='$wl-f,'
11779       case $with_aix_soname,$aix_use_runtimelinking in
11780       aix,*) ;; # traditional, no import file
11781       svr4,* | *,yes) # use import file
11782         # The Import File defines what to hardcode.
11783         hardcode_direct=no
11784         hardcode_direct_absolute=no
11785         ;;
11786       esac
11787
11788       if test yes = "$GCC"; then
11789         case $host_os in aix4.[012]|aix4.[012].*)
11790         # We only want to do this on AIX 4.2 and lower, the check
11791         # below for broken collect2 doesn't work under 4.3+
11792           collect2name=`$CC -print-prog-name=collect2`
11793           if test -f "$collect2name" &&
11794            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11795           then
11796           # We have reworked collect2
11797           :
11798           else
11799           # We have old collect2
11800           hardcode_direct=unsupported
11801           # It fails to find uninstalled libraries when the uninstalled
11802           # path is not listed in the libpath.  Setting hardcode_minus_L
11803           # to unsupported forces relinking
11804           hardcode_minus_L=yes
11805           hardcode_libdir_flag_spec='-L$libdir'
11806           hardcode_libdir_separator=
11807           fi
11808           ;;
11809         esac
11810         shared_flag='-shared'
11811         if test yes = "$aix_use_runtimelinking"; then
11812           shared_flag="$shared_flag "'$wl-G'
11813         fi
11814         # Need to ensure runtime linking is disabled for the traditional
11815         # shared library, or the linker may eventually find shared libraries
11816         # /with/ Import File - we do not want to mix them.
11817         shared_flag_aix='-shared'
11818         shared_flag_svr4='-shared $wl-G'
11819       else
11820         # not using gcc
11821         if test ia64 = "$host_cpu"; then
11822         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11823         # chokes on -Wl,-G. The following line is correct:
11824           shared_flag='-G'
11825         else
11826           if test yes = "$aix_use_runtimelinking"; then
11827             shared_flag='$wl-G'
11828           else
11829             shared_flag='$wl-bM:SRE'
11830           fi
11831           shared_flag_aix='$wl-bM:SRE'
11832           shared_flag_svr4='$wl-G'
11833         fi
11834       fi
11835
11836       export_dynamic_flag_spec='$wl-bexpall'
11837       # It seems that -bexpall does not export symbols beginning with
11838       # underscore (_), so it is better to generate a list of symbols to export.
11839       always_export_symbols=yes
11840       if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
11841         # Warning - without using the other runtime loading flags (-brtl),
11842         # -berok will link without error, but may produce a broken library.
11843         allow_undefined_flag='-berok'
11844         # Determine the default libpath from the value encoded in an
11845         # empty executable.
11846         if test set = "${lt_cv_aix_libpath+set}"; then
11847   aix_libpath=$lt_cv_aix_libpath
11848 else
11849   if ${lt_cv_aix_libpath_+:} false; then :
11850   $as_echo_n "(cached) " >&6
11851 else
11852   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11853 /* end confdefs.h.  */
11854
11855 int
11856 main ()
11857 {
11858
11859   ;
11860   return 0;
11861 }
11862 _ACEOF
11863 if ac_fn_c_try_link "$LINENO"; then :
11864
11865   lt_aix_libpath_sed='
11866       /Import File Strings/,/^$/ {
11867           /^0/ {
11868               s/^0  *\([^ ]*\) *$/\1/
11869               p
11870           }
11871       }'
11872   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11873   # Check for a 64-bit object if we didn't find anything.
11874   if test -z "$lt_cv_aix_libpath_"; then
11875     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11876   fi
11877 fi
11878 rm -f core conftest.err conftest.$ac_objext \
11879     conftest$ac_exeext conftest.$ac_ext
11880   if test -z "$lt_cv_aix_libpath_"; then
11881     lt_cv_aix_libpath_=/usr/lib:/lib
11882   fi
11883
11884 fi
11885
11886   aix_libpath=$lt_cv_aix_libpath_
11887 fi
11888
11889         hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
11890         archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
11891       else
11892         if test ia64 = "$host_cpu"; then
11893           hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
11894           allow_undefined_flag="-z nodefs"
11895           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"
11896         else
11897          # Determine the default libpath from the value encoded in an
11898          # empty executable.
11899          if test set = "${lt_cv_aix_libpath+set}"; then
11900   aix_libpath=$lt_cv_aix_libpath
11901 else
11902   if ${lt_cv_aix_libpath_+:} false; then :
11903   $as_echo_n "(cached) " >&6
11904 else
11905   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11906 /* end confdefs.h.  */
11907
11908 int
11909 main ()
11910 {
11911
11912   ;
11913   return 0;
11914 }
11915 _ACEOF
11916 if ac_fn_c_try_link "$LINENO"; then :
11917
11918   lt_aix_libpath_sed='
11919       /Import File Strings/,/^$/ {
11920           /^0/ {
11921               s/^0  *\([^ ]*\) *$/\1/
11922               p
11923           }
11924       }'
11925   lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11926   # Check for a 64-bit object if we didn't find anything.
11927   if test -z "$lt_cv_aix_libpath_"; then
11928     lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11929   fi
11930 fi
11931 rm -f core conftest.err conftest.$ac_objext \
11932     conftest$ac_exeext conftest.$ac_ext
11933   if test -z "$lt_cv_aix_libpath_"; then
11934     lt_cv_aix_libpath_=/usr/lib:/lib
11935   fi
11936
11937 fi
11938
11939   aix_libpath=$lt_cv_aix_libpath_
11940 fi
11941
11942          hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
11943           # Warning - without using the other run time loading flags,
11944           # -berok will link without error, but may produce a broken library.
11945           no_undefined_flag=' $wl-bernotok'
11946           allow_undefined_flag=' $wl-berok'
11947           if test yes = "$with_gnu_ld"; then
11948             # We only use this code for GNU lds that support --whole-archive.
11949             whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
11950           else
11951             # Exported symbols can be pulled into shared objects from archives
11952             whole_archive_flag_spec='$convenience'
11953           fi
11954           archive_cmds_need_lc=yes
11955           archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
11956           # -brtl affects multiple linker settings, -berok does not and is overridden later
11957           compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
11958           if test svr4 != "$with_aix_soname"; then
11959             # This is similar to how AIX traditionally builds its shared libraries.
11960             archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
11961           fi
11962           if test aix != "$with_aix_soname"; then
11963             archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
11964           else
11965             # used by -dlpreopen to get the symbols
11966             archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
11967           fi
11968           archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
11969         fi
11970       fi
11971       ;;
11972
11973     amigaos*)
11974       case $host_cpu in
11975       powerpc)
11976             # see comment about AmigaOS4 .so support
11977             archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11978             archive_expsym_cmds=''
11979         ;;
11980       m68k)
11981             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)'
11982             hardcode_libdir_flag_spec='-L$libdir'
11983             hardcode_minus_L=yes
11984         ;;
11985       esac
11986       ;;
11987
11988     bsdi[45]*)
11989       export_dynamic_flag_spec=-rdynamic
11990       ;;
11991
11992     cygwin* | mingw* | pw32* | cegcc*)
11993       # When not using gcc, we currently assume that we are using
11994       # Microsoft Visual C++.
11995       # hardcode_libdir_flag_spec is actually meaningless, as there is
11996       # no search path for DLLs.
11997       case $cc_basename in
11998       cl*)
11999         # Native MSVC
12000         hardcode_libdir_flag_spec=' '
12001         allow_undefined_flag=unsupported
12002         always_export_symbols=yes
12003         file_list_spec='@'
12004         # Tell ltmain to make .lib files, not .a files.
12005         libext=lib
12006         # Tell ltmain to make .dll files, not .so files.
12007         shrext_cmds=.dll
12008         # FIXME: Setting linknames here is a bad hack.
12009         archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12010         archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12011             cp "$export_symbols" "$output_objdir/$soname.def";
12012             echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12013           else
12014             $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12015           fi~
12016           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12017           linknames='
12018         # The linker will not automatically build a static lib if we build a DLL.
12019         # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12020         enable_shared_with_static_runtimes=yes
12021         exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12022         export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12023         # Don't use ranlib
12024         old_postinstall_cmds='chmod 644 $oldlib'
12025         postlink_cmds='lt_outputfile="@OUTPUT@"~
12026           lt_tool_outputfile="@TOOL_OUTPUT@"~
12027           case $lt_outputfile in
12028             *.exe|*.EXE) ;;
12029             *)
12030               lt_outputfile=$lt_outputfile.exe
12031               lt_tool_outputfile=$lt_tool_outputfile.exe
12032               ;;
12033           esac~
12034           if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12035             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12036             $RM "$lt_outputfile.manifest";
12037           fi'
12038         ;;
12039       *)
12040         # Assume MSVC wrapper
12041         hardcode_libdir_flag_spec=' '
12042         allow_undefined_flag=unsupported
12043         # Tell ltmain to make .lib files, not .a files.
12044         libext=lib
12045         # Tell ltmain to make .dll files, not .so files.
12046         shrext_cmds=.dll
12047         # FIXME: Setting linknames here is a bad hack.
12048         archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12049         # The linker will automatically build a .lib file if we build a DLL.
12050         old_archive_from_new_cmds='true'
12051         # FIXME: Should let the user specify the lib program.
12052         old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12053         enable_shared_with_static_runtimes=yes
12054         ;;
12055       esac
12056       ;;
12057
12058     darwin* | rhapsody*)
12059
12060
12061   archive_cmds_need_lc=no
12062   hardcode_direct=no
12063   hardcode_automatic=yes
12064   hardcode_shlibpath_var=unsupported
12065   if test yes = "$lt_cv_ld_force_load"; then
12066     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\"`'
12067
12068   else
12069     whole_archive_flag_spec=''
12070   fi
12071   link_all_deplibs=yes
12072   allow_undefined_flag=$_lt_dar_allow_undefined
12073   case $cc_basename in
12074      ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12075      *) _lt_dar_can_shared=$GCC ;;
12076   esac
12077   if test yes = "$_lt_dar_can_shared"; then
12078     output_verbose_link_cmd=func_echo_all
12079     archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12080     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12081     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"
12082     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"
12083
12084   else
12085   ld_shlibs=no
12086   fi
12087
12088       ;;
12089
12090     dgux*)
12091       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12092       hardcode_libdir_flag_spec='-L$libdir'
12093       hardcode_shlibpath_var=no
12094       ;;
12095
12096     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12097     # support.  Future versions do this automatically, but an explicit c++rt0.o
12098     # does not break anything, and helps significantly (at the cost of a little
12099     # extra space).
12100     freebsd2.2*)
12101       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12102       hardcode_libdir_flag_spec='-R$libdir'
12103       hardcode_direct=yes
12104       hardcode_shlibpath_var=no
12105       ;;
12106
12107     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12108     freebsd2.*)
12109       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12110       hardcode_direct=yes
12111       hardcode_minus_L=yes
12112       hardcode_shlibpath_var=no
12113       ;;
12114
12115     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12116     freebsd* | dragonfly*)
12117       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12118       hardcode_libdir_flag_spec='-R$libdir'
12119       hardcode_direct=yes
12120       hardcode_shlibpath_var=no
12121       ;;
12122
12123     hpux9*)
12124       if test yes = "$GCC"; then
12125         archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
12126       else
12127         archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
12128       fi
12129       hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12130       hardcode_libdir_separator=:
12131       hardcode_direct=yes
12132
12133       # hardcode_minus_L: Not really in the search PATH,
12134       # but as the default location of the library.
12135       hardcode_minus_L=yes
12136       export_dynamic_flag_spec='$wl-E'
12137       ;;
12138
12139     hpux10*)
12140       if test yes,no = "$GCC,$with_gnu_ld"; then
12141         archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12142       else
12143         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12144       fi
12145       if test no = "$with_gnu_ld"; then
12146         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12147         hardcode_libdir_separator=:
12148         hardcode_direct=yes
12149         hardcode_direct_absolute=yes
12150         export_dynamic_flag_spec='$wl-E'
12151         # hardcode_minus_L: Not really in the search PATH,
12152         # but as the default location of the library.
12153         hardcode_minus_L=yes
12154       fi
12155       ;;
12156
12157     hpux11*)
12158       if test yes,no = "$GCC,$with_gnu_ld"; then
12159         case $host_cpu in
12160         hppa*64*)
12161           archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12162           ;;
12163         ia64*)
12164           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12165           ;;
12166         *)
12167           archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12168           ;;
12169         esac
12170       else
12171         case $host_cpu in
12172         hppa*64*)
12173           archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12174           ;;
12175         ia64*)
12176           archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12177           ;;
12178         *)
12179
12180           # Older versions of the 11.00 compiler do not understand -b yet
12181           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12182           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12183 $as_echo_n "checking if $CC understands -b... " >&6; }
12184 if ${lt_cv_prog_compiler__b+:} false; then :
12185   $as_echo_n "(cached) " >&6
12186 else
12187   lt_cv_prog_compiler__b=no
12188    save_LDFLAGS=$LDFLAGS
12189    LDFLAGS="$LDFLAGS -b"
12190    echo "$lt_simple_link_test_code" > conftest.$ac_ext
12191    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12192      # The linker can only warn and ignore the option if not recognized
12193      # So say no if there are warnings
12194      if test -s conftest.err; then
12195        # Append any errors to the config.log.
12196        cat conftest.err 1>&5
12197        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12198        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12199        if diff conftest.exp conftest.er2 >/dev/null; then
12200          lt_cv_prog_compiler__b=yes
12201        fi
12202      else
12203        lt_cv_prog_compiler__b=yes
12204      fi
12205    fi
12206    $RM -r conftest*
12207    LDFLAGS=$save_LDFLAGS
12208
12209 fi
12210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12211 $as_echo "$lt_cv_prog_compiler__b" >&6; }
12212
12213 if test yes = "$lt_cv_prog_compiler__b"; then
12214     archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12215 else
12216     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12217 fi
12218
12219           ;;
12220         esac
12221       fi
12222       if test no = "$with_gnu_ld"; then
12223         hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12224         hardcode_libdir_separator=:
12225
12226         case $host_cpu in
12227         hppa*64*|ia64*)
12228           hardcode_direct=no
12229           hardcode_shlibpath_var=no
12230           ;;
12231         *)
12232           hardcode_direct=yes
12233           hardcode_direct_absolute=yes
12234           export_dynamic_flag_spec='$wl-E'
12235
12236           # hardcode_minus_L: Not really in the search PATH,
12237           # but as the default location of the library.
12238           hardcode_minus_L=yes
12239           ;;
12240         esac
12241       fi
12242       ;;
12243
12244     irix5* | irix6* | nonstopux*)
12245       if test yes = "$GCC"; then
12246         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'
12247         # Try to use the -exported_symbol ld option, if it does not
12248         # work, assume that -exports_file does not work either and
12249         # implicitly export all symbols.
12250         # This should be the same for all languages, so no per-tag cache variable.
12251         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12252 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12253 if ${lt_cv_irix_exported_symbol+:} false; then :
12254   $as_echo_n "(cached) " >&6
12255 else
12256   save_LDFLAGS=$LDFLAGS
12257            LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12258            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12259 /* end confdefs.h.  */
12260 int foo (void) { return 0; }
12261 _ACEOF
12262 if ac_fn_c_try_link "$LINENO"; then :
12263   lt_cv_irix_exported_symbol=yes
12264 else
12265   lt_cv_irix_exported_symbol=no
12266 fi
12267 rm -f core conftest.err conftest.$ac_objext \
12268     conftest$ac_exeext conftest.$ac_ext
12269            LDFLAGS=$save_LDFLAGS
12270 fi
12271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12272 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
12273         if test yes = "$lt_cv_irix_exported_symbol"; then
12274           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'
12275         fi
12276       else
12277         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'
12278         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'
12279       fi
12280       archive_cmds_need_lc='no'
12281       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12282       hardcode_libdir_separator=:
12283       inherit_rpath=yes
12284       link_all_deplibs=yes
12285       ;;
12286
12287     linux*)
12288       case $cc_basename in
12289       tcc*)
12290         # Fabrice Bellard et al's Tiny C Compiler
12291         ld_shlibs=yes
12292         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12293         ;;
12294       esac
12295       ;;
12296
12297     netbsd*)
12298       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12299         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12300       else
12301         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12302       fi
12303       hardcode_libdir_flag_spec='-R$libdir'
12304       hardcode_direct=yes
12305       hardcode_shlibpath_var=no
12306       ;;
12307
12308     newsos6)
12309       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12310       hardcode_direct=yes
12311       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12312       hardcode_libdir_separator=:
12313       hardcode_shlibpath_var=no
12314       ;;
12315
12316     *nto* | *qnx*)
12317       ;;
12318
12319     openbsd* | bitrig*)
12320       if test -f /usr/libexec/ld.so; then
12321         hardcode_direct=yes
12322         hardcode_shlibpath_var=no
12323         hardcode_direct_absolute=yes
12324         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12325           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12326           archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12327           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12328           export_dynamic_flag_spec='$wl-E'
12329         else
12330           archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12331           hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12332         fi
12333       else
12334         ld_shlibs=no
12335       fi
12336       ;;
12337
12338     os2*)
12339       hardcode_libdir_flag_spec='-L$libdir'
12340       hardcode_minus_L=yes
12341       allow_undefined_flag=unsupported
12342       shrext_cmds=.dll
12343       archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12344         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12345         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12346         $ECHO EXPORTS >> $output_objdir/$libname.def~
12347         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12348         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12349         emximp -o $lib $output_objdir/$libname.def'
12350       archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12351         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12352         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12353         $ECHO EXPORTS >> $output_objdir/$libname.def~
12354         prefix_cmds="$SED"~
12355         if test EXPORTS = "`$SED 1q $export_symbols`"; then
12356           prefix_cmds="$prefix_cmds -e 1d";
12357         fi~
12358         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12359         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12360         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12361         emximp -o $lib $output_objdir/$libname.def'
12362       old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12363       enable_shared_with_static_runtimes=yes
12364       ;;
12365
12366     osf3*)
12367       if test yes = "$GCC"; then
12368         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12369         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'
12370       else
12371         allow_undefined_flag=' -expect_unresolved \*'
12372         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'
12373       fi
12374       archive_cmds_need_lc='no'
12375       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12376       hardcode_libdir_separator=:
12377       ;;
12378
12379     osf4* | osf5*)      # as osf3* with the addition of -msym flag
12380       if test yes = "$GCC"; then
12381         allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12382         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'
12383         hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12384       else
12385         allow_undefined_flag=' -expect_unresolved \*'
12386         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'
12387         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~
12388           $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'
12389
12390         # Both c and cxx compiler support -rpath directly
12391         hardcode_libdir_flag_spec='-rpath $libdir'
12392       fi
12393       archive_cmds_need_lc='no'
12394       hardcode_libdir_separator=:
12395       ;;
12396
12397     solaris*)
12398       no_undefined_flag=' -z defs'
12399       if test yes = "$GCC"; then
12400         wlarc='$wl'
12401         archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12402         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12403           $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'
12404       else
12405         case `$CC -V 2>&1` in
12406         *"Compilers 5.0"*)
12407           wlarc=''
12408           archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12409           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12410             $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12411           ;;
12412         *)
12413           wlarc='$wl'
12414           archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12415           archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12416             $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12417           ;;
12418         esac
12419       fi
12420       hardcode_libdir_flag_spec='-R$libdir'
12421       hardcode_shlibpath_var=no
12422       case $host_os in
12423       solaris2.[0-5] | solaris2.[0-5].*) ;;
12424       *)
12425         # The compiler driver will combine and reorder linker options,
12426         # but understands '-z linker_flag'.  GCC discards it without '$wl',
12427         # but is careful enough not to reorder.
12428         # Supported since Solaris 2.6 (maybe 2.5.1?)
12429         if test yes = "$GCC"; then
12430           whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12431         else
12432           whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12433         fi
12434         ;;
12435       esac
12436       link_all_deplibs=yes
12437       ;;
12438
12439     sunos4*)
12440       if test sequent = "$host_vendor"; then
12441         # Use $CC to link under sequent, because it throws in some extra .o
12442         # files that make .init and .fini sections work.
12443         archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12444       else
12445         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12446       fi
12447       hardcode_libdir_flag_spec='-L$libdir'
12448       hardcode_direct=yes
12449       hardcode_minus_L=yes
12450       hardcode_shlibpath_var=no
12451       ;;
12452
12453     sysv4)
12454       case $host_vendor in
12455         sni)
12456           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12457           hardcode_direct=yes # is this really true???
12458         ;;
12459         siemens)
12460           ## LD is ld it makes a PLAMLIB
12461           ## CC just makes a GrossModule.
12462           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12463           reload_cmds='$CC -r -o $output$reload_objs'
12464           hardcode_direct=no
12465         ;;
12466         motorola)
12467           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12468           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12469         ;;
12470       esac
12471       runpath_var='LD_RUN_PATH'
12472       hardcode_shlibpath_var=no
12473       ;;
12474
12475     sysv4.3*)
12476       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12477       hardcode_shlibpath_var=no
12478       export_dynamic_flag_spec='-Bexport'
12479       ;;
12480
12481     sysv4*MP*)
12482       if test -d /usr/nec; then
12483         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12484         hardcode_shlibpath_var=no
12485         runpath_var=LD_RUN_PATH
12486         hardcode_runpath_var=yes
12487         ld_shlibs=yes
12488       fi
12489       ;;
12490
12491     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12492       no_undefined_flag='$wl-z,text'
12493       archive_cmds_need_lc=no
12494       hardcode_shlibpath_var=no
12495       runpath_var='LD_RUN_PATH'
12496
12497       if test yes = "$GCC"; then
12498         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12499         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12500       else
12501         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12502         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12503       fi
12504       ;;
12505
12506     sysv5* | sco3.2v5* | sco5v6*)
12507       # Note: We CANNOT use -z defs as we might desire, because we do not
12508       # link with -lc, and that would cause any symbols used from libc to
12509       # always be unresolved, which means just about no library would
12510       # ever link correctly.  If we're not using GNU ld we use -z text
12511       # though, which does catch some bad symbols but isn't as heavy-handed
12512       # as -z defs.
12513       no_undefined_flag='$wl-z,text'
12514       allow_undefined_flag='$wl-z,nodefs'
12515       archive_cmds_need_lc=no
12516       hardcode_shlibpath_var=no
12517       hardcode_libdir_flag_spec='$wl-R,$libdir'
12518       hardcode_libdir_separator=':'
12519       link_all_deplibs=yes
12520       export_dynamic_flag_spec='$wl-Bexport'
12521       runpath_var='LD_RUN_PATH'
12522
12523       if test yes = "$GCC"; then
12524         archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12525         archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12526       else
12527         archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12528         archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12529       fi
12530       ;;
12531
12532     uts4*)
12533       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12534       hardcode_libdir_flag_spec='-L$libdir'
12535       hardcode_shlibpath_var=no
12536       ;;
12537
12538     *)
12539       ld_shlibs=no
12540       ;;
12541     esac
12542
12543     if test sni = "$host_vendor"; then
12544       case $host in
12545       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12546         export_dynamic_flag_spec='$wl-Blargedynsym'
12547         ;;
12548       esac
12549     fi
12550   fi
12551
12552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12553 $as_echo "$ld_shlibs" >&6; }
12554 test no = "$ld_shlibs" && can_build_shared=no
12555
12556 with_gnu_ld=$with_gnu_ld
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572 #
12573 # Do we need to explicitly link libc?
12574 #
12575 case "x$archive_cmds_need_lc" in
12576 x|xyes)
12577   # Assume -lc should be added
12578   archive_cmds_need_lc=yes
12579
12580   if test yes,yes = "$GCC,$enable_shared"; then
12581     case $archive_cmds in
12582     *'~'*)
12583       # FIXME: we may have to deal with multi-command sequences.
12584       ;;
12585     '$CC '*)
12586       # Test whether the compiler implicitly links with -lc since on some
12587       # systems, -lgcc has to come before -lc. If gcc already passes -lc
12588       # to ld, don't add -lc before -lgcc.
12589       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12590 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
12591 if ${lt_cv_archive_cmds_need_lc+:} false; then :
12592   $as_echo_n "(cached) " >&6
12593 else
12594   $RM conftest*
12595         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12596
12597         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12598   (eval $ac_compile) 2>&5
12599   ac_status=$?
12600   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12601   test $ac_status = 0; } 2>conftest.err; then
12602           soname=conftest
12603           lib=conftest
12604           libobjs=conftest.$ac_objext
12605           deplibs=
12606           wl=$lt_prog_compiler_wl
12607           pic_flag=$lt_prog_compiler_pic
12608           compiler_flags=-v
12609           linker_flags=-v
12610           verstring=
12611           output_objdir=.
12612           libname=conftest
12613           lt_save_allow_undefined_flag=$allow_undefined_flag
12614           allow_undefined_flag=
12615           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12616   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12617   ac_status=$?
12618   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12619   test $ac_status = 0; }
12620           then
12621             lt_cv_archive_cmds_need_lc=no
12622           else
12623             lt_cv_archive_cmds_need_lc=yes
12624           fi
12625           allow_undefined_flag=$lt_save_allow_undefined_flag
12626         else
12627           cat conftest.err 1>&5
12628         fi
12629         $RM conftest*
12630
12631 fi
12632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12633 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
12634       archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12635       ;;
12636     esac
12637   fi
12638   ;;
12639 esac
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12793 $as_echo_n "checking dynamic linker characteristics... " >&6; }
12794
12795 if test yes = "$GCC"; then
12796   case $host_os in
12797     darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
12798     *) lt_awk_arg='/^libraries:/' ;;
12799   esac
12800   case $host_os in
12801     mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
12802     *) lt_sed_strip_eq='s|=/|/|g' ;;
12803   esac
12804   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12805   case $lt_search_path_spec in
12806   *\;*)
12807     # if the path contains ";" then we assume it to be the separator
12808     # otherwise default to the standard path separator (i.e. ":") - it is
12809     # assumed that no part of a normal pathname contains ";" but that should
12810     # okay in the real world where ";" in dirpaths is itself problematic.
12811     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12812     ;;
12813   *)
12814     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
12815     ;;
12816   esac
12817   # Ok, now we have the path, separated by spaces, we can step through it
12818   # and add multilib dir if necessary...
12819   lt_tmp_lt_search_path_spec=
12820   lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12821   # ...but if some path component already ends with the multilib dir we assume
12822   # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
12823   case "$lt_multi_os_dir; $lt_search_path_spec " in
12824   "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
12825     lt_multi_os_dir=
12826     ;;
12827   esac
12828   for lt_sys_path in $lt_search_path_spec; do
12829     if test -d "$lt_sys_path$lt_multi_os_dir"; then
12830       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
12831     elif test -n "$lt_multi_os_dir"; then
12832       test -d "$lt_sys_path" && \
12833         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
12834     fi
12835   done
12836   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
12837 BEGIN {RS = " "; FS = "/|\n";} {
12838   lt_foo = "";
12839   lt_count = 0;
12840   for (lt_i = NF; lt_i > 0; lt_i--) {
12841     if ($lt_i != "" && $lt_i != ".") {
12842       if ($lt_i == "..") {
12843         lt_count++;
12844       } else {
12845         if (lt_count == 0) {
12846           lt_foo = "/" $lt_i lt_foo;
12847         } else {
12848           lt_count--;
12849         }
12850       }
12851     }
12852   }
12853   if (lt_foo != "") { lt_freq[lt_foo]++; }
12854   if (lt_freq[lt_foo] == 1) { print lt_foo; }
12855 }'`
12856   # AWK program above erroneously prepends '/' to C:/dos/paths
12857   # for these hosts.
12858   case $host_os in
12859     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
12860       $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
12861   esac
12862   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
12863 else
12864   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12865 fi
12866 library_names_spec=
12867 libname_spec='lib$name'
12868 soname_spec=
12869 shrext_cmds=.so
12870 postinstall_cmds=
12871 postuninstall_cmds=
12872 finish_cmds=
12873 finish_eval=
12874 shlibpath_var=
12875 shlibpath_overrides_runpath=unknown
12876 version_type=none
12877 dynamic_linker="$host_os ld.so"
12878 sys_lib_dlsearch_path_spec="/lib /usr/lib"
12879 need_lib_prefix=unknown
12880 hardcode_into_libs=no
12881
12882 # when you set need_version to no, make sure it does not cause -set_version
12883 # flags to be left without arguments
12884 need_version=unknown
12885
12886
12887
12888 case $host_os in
12889 aix3*)
12890   version_type=linux # correct to gnu/linux during the next big refactor
12891   library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
12892   shlibpath_var=LIBPATH
12893
12894   # AIX 3 has no versioning support, so we append a major version to the name.
12895   soname_spec='$libname$release$shared_ext$major'
12896   ;;
12897
12898 aix[4-9]*)
12899   version_type=linux # correct to gnu/linux during the next big refactor
12900   need_lib_prefix=no
12901   need_version=no
12902   hardcode_into_libs=yes
12903   if test ia64 = "$host_cpu"; then
12904     # AIX 5 supports IA64
12905     library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
12906     shlibpath_var=LD_LIBRARY_PATH
12907   else
12908     # With GCC up to 2.95.x, collect2 would create an import file
12909     # for dependence libraries.  The import file would start with
12910     # the line '#! .'.  This would cause the generated library to
12911     # depend on '.', always an invalid library.  This was fixed in
12912     # development snapshots of GCC prior to 3.0.
12913     case $host_os in
12914       aix4 | aix4.[01] | aix4.[01].*)
12915       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12916            echo ' yes '
12917            echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
12918         :
12919       else
12920         can_build_shared=no
12921       fi
12922       ;;
12923     esac
12924     # Using Import Files as archive members, it is possible to support
12925     # filename-based versioning of shared library archives on AIX. While
12926     # this would work for both with and without runtime linking, it will
12927     # prevent static linking of such archives. So we do filename-based
12928     # shared library versioning with .so extension only, which is used
12929     # when both runtime linking and shared linking is enabled.
12930     # Unfortunately, runtime linking may impact performance, so we do
12931     # not want this to be the default eventually. Also, we use the
12932     # versioned .so libs for executables only if there is the -brtl
12933     # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
12934     # To allow for filename-based versioning support, we need to create
12935     # libNAME.so.V as an archive file, containing:
12936     # *) an Import File, referring to the versioned filename of the
12937     #    archive as well as the shared archive member, telling the
12938     #    bitwidth (32 or 64) of that shared object, and providing the
12939     #    list of exported symbols of that shared object, eventually
12940     #    decorated with the 'weak' keyword
12941     # *) the shared object with the F_LOADONLY flag set, to really avoid
12942     #    it being seen by the linker.
12943     # At run time we better use the real file rather than another symlink,
12944     # but for link time we create the symlink libNAME.so -> libNAME.so.V
12945
12946     case $with_aix_soname,$aix_use_runtimelinking in
12947     # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
12948     # soname into executable. Probably we can add versioning support to
12949     # collect2, so additional links can be useful in future.
12950     aix,yes) # traditional libtool
12951       dynamic_linker='AIX unversionable lib.so'
12952       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
12953       # instead of lib<name>.a to let people know that these are not
12954       # typical AIX shared libraries.
12955       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12956       ;;
12957     aix,no) # traditional AIX only
12958       dynamic_linker='AIX lib.a(lib.so.V)'
12959       # We preserve .a as extension for shared libraries through AIX4.2
12960       # and later when we are not doing run time linking.
12961       library_names_spec='$libname$release.a $libname.a'
12962       soname_spec='$libname$release$shared_ext$major'
12963       ;;
12964     svr4,*) # full svr4 only
12965       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
12966       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
12967       # We do not specify a path in Import Files, so LIBPATH fires.
12968       shlibpath_overrides_runpath=yes
12969       ;;
12970     *,yes) # both, prefer svr4
12971       dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
12972       library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
12973       # unpreferred sharedlib libNAME.a needs extra handling
12974       postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
12975       postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
12976       # We do not specify a path in Import Files, so LIBPATH fires.
12977       shlibpath_overrides_runpath=yes
12978       ;;
12979     *,no) # both, prefer aix
12980       dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
12981       library_names_spec='$libname$release.a $libname.a'
12982       soname_spec='$libname$release$shared_ext$major'
12983       # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
12984       postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
12985       postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
12986       ;;
12987     esac
12988     shlibpath_var=LIBPATH
12989   fi
12990   ;;
12991
12992 amigaos*)
12993   case $host_cpu in
12994   powerpc)
12995     # Since July 2007 AmigaOS4 officially supports .so libraries.
12996     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
12997     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12998     ;;
12999   m68k)
13000     library_names_spec='$libname.ixlibrary $libname.a'
13001     # Create ${libname}_ixlibrary.a entries in /sys/libs.
13002     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
13003     ;;
13004   esac
13005   ;;
13006
13007 beos*)
13008   library_names_spec='$libname$shared_ext'
13009   dynamic_linker="$host_os ld.so"
13010   shlibpath_var=LIBRARY_PATH
13011   ;;
13012
13013 bsdi[45]*)
13014   version_type=linux # correct to gnu/linux during the next big refactor
13015   need_version=no
13016   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13017   soname_spec='$libname$release$shared_ext$major'
13018   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13019   shlibpath_var=LD_LIBRARY_PATH
13020   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13021   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13022   # the default ld.so.conf also contains /usr/contrib/lib and
13023   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13024   # libtool to hard-code these into programs
13025   ;;
13026
13027 cygwin* | mingw* | pw32* | cegcc*)
13028   version_type=windows
13029   shrext_cmds=.dll
13030   need_version=no
13031   need_lib_prefix=no
13032
13033   case $GCC,$cc_basename in
13034   yes,*)
13035     # gcc
13036     library_names_spec='$libname.dll.a'
13037     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13038     postinstall_cmds='base_file=`basename \$file`~
13039       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13040       dldir=$destdir/`dirname \$dlpath`~
13041       test -d \$dldir || mkdir -p \$dldir~
13042       $install_prog $dir/$dlname \$dldir/$dlname~
13043       chmod a+x \$dldir/$dlname~
13044       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13045         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13046       fi'
13047     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13048       dlpath=$dir/\$dldll~
13049        $RM \$dlpath'
13050     shlibpath_overrides_runpath=yes
13051
13052     case $host_os in
13053     cygwin*)
13054       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13055       soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13056
13057       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13058       ;;
13059     mingw* | cegcc*)
13060       # MinGW DLLs use traditional 'lib' prefix
13061       soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13062       ;;
13063     pw32*)
13064       # pw32 DLLs use 'pw' prefix rather than 'lib'
13065       library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13066       ;;
13067     esac
13068     dynamic_linker='Win32 ld.exe'
13069     ;;
13070
13071   *,cl*)
13072     # Native MSVC
13073     libname_spec='$name'
13074     soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13075     library_names_spec='$libname.dll.lib'
13076
13077     case $build_os in
13078     mingw*)
13079       sys_lib_search_path_spec=
13080       lt_save_ifs=$IFS
13081       IFS=';'
13082       for lt_path in $LIB
13083       do
13084         IFS=$lt_save_ifs
13085         # Let DOS variable expansion print the short 8.3 style file name.
13086         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13087         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13088       done
13089       IFS=$lt_save_ifs
13090       # Convert to MSYS style.
13091       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13092       ;;
13093     cygwin*)
13094       # Convert to unix form, then to dos form, then back to unix form
13095       # but this time dos style (no spaces!) so that the unix form looks
13096       # like /cygdrive/c/PROGRA~1:/cygdr...
13097       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13098       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13099       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13100       ;;
13101     *)
13102       sys_lib_search_path_spec=$LIB
13103       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13104         # It is most probably a Windows format PATH.
13105         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13106       else
13107         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13108       fi
13109       # FIXME: find the short name or the path components, as spaces are
13110       # common. (e.g. "Program Files" -> "PROGRA~1")
13111       ;;
13112     esac
13113
13114     # DLL is installed to $(libdir)/../bin by postinstall_cmds
13115     postinstall_cmds='base_file=`basename \$file`~
13116       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13117       dldir=$destdir/`dirname \$dlpath`~
13118       test -d \$dldir || mkdir -p \$dldir~
13119       $install_prog $dir/$dlname \$dldir/$dlname'
13120     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13121       dlpath=$dir/\$dldll~
13122        $RM \$dlpath'
13123     shlibpath_overrides_runpath=yes
13124     dynamic_linker='Win32 link.exe'
13125     ;;
13126
13127   *)
13128     # Assume MSVC wrapper
13129     library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13130     dynamic_linker='Win32 ld.exe'
13131     ;;
13132   esac
13133   # FIXME: first we should search . and the directory the executable is in
13134   shlibpath_var=PATH
13135   ;;
13136
13137 darwin* | rhapsody*)
13138   dynamic_linker="$host_os dyld"
13139   version_type=darwin
13140   need_lib_prefix=no
13141   need_version=no
13142   library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13143   soname_spec='$libname$release$major$shared_ext'
13144   shlibpath_overrides_runpath=yes
13145   shlibpath_var=DYLD_LIBRARY_PATH
13146   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13147
13148   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13149   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13150   ;;
13151
13152 dgux*)
13153   version_type=linux # correct to gnu/linux during the next big refactor
13154   need_lib_prefix=no
13155   need_version=no
13156   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13157   soname_spec='$libname$release$shared_ext$major'
13158   shlibpath_var=LD_LIBRARY_PATH
13159   ;;
13160
13161 freebsd* | dragonfly*)
13162   # DragonFly does not have aout.  When/if they implement a new
13163   # versioning mechanism, adjust this.
13164   if test -x /usr/bin/objformat; then
13165     objformat=`/usr/bin/objformat`
13166   else
13167     case $host_os in
13168     freebsd[23].*) objformat=aout ;;
13169     *) objformat=elf ;;
13170     esac
13171   fi
13172   version_type=freebsd-$objformat
13173   case $version_type in
13174     freebsd-elf*)
13175       library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13176       soname_spec='$libname$release$shared_ext$major'
13177       need_version=no
13178       need_lib_prefix=no
13179       ;;
13180     freebsd-*)
13181       library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13182       need_version=yes
13183       ;;
13184   esac
13185   shlibpath_var=LD_LIBRARY_PATH
13186   case $host_os in
13187   freebsd2.*)
13188     shlibpath_overrides_runpath=yes
13189     ;;
13190   freebsd3.[01]* | freebsdelf3.[01]*)
13191     shlibpath_overrides_runpath=yes
13192     hardcode_into_libs=yes
13193     ;;
13194   freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13195   freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13196     shlibpath_overrides_runpath=no
13197     hardcode_into_libs=yes
13198     ;;
13199   *) # from 4.6 on, and DragonFly
13200     shlibpath_overrides_runpath=yes
13201     hardcode_into_libs=yes
13202     ;;
13203   esac
13204   ;;
13205
13206 haiku*)
13207   version_type=linux # correct to gnu/linux during the next big refactor
13208   need_lib_prefix=no
13209   need_version=no
13210   dynamic_linker="$host_os runtime_loader"
13211   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13212   soname_spec='$libname$release$shared_ext$major'
13213   shlibpath_var=LIBRARY_PATH
13214   shlibpath_overrides_runpath=no
13215   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13216   hardcode_into_libs=yes
13217   ;;
13218
13219 hpux9* | hpux10* | hpux11*)
13220   # Give a soname corresponding to the major version so that dld.sl refuses to
13221   # link against other versions.
13222   version_type=sunos
13223   need_lib_prefix=no
13224   need_version=no
13225   case $host_cpu in
13226   ia64*)
13227     shrext_cmds='.so'
13228     hardcode_into_libs=yes
13229     dynamic_linker="$host_os dld.so"
13230     shlibpath_var=LD_LIBRARY_PATH
13231     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13232     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13233     soname_spec='$libname$release$shared_ext$major'
13234     if test 32 = "$HPUX_IA64_MODE"; then
13235       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13236       sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13237     else
13238       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13239       sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13240     fi
13241     ;;
13242   hppa*64*)
13243     shrext_cmds='.sl'
13244     hardcode_into_libs=yes
13245     dynamic_linker="$host_os dld.sl"
13246     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13247     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13248     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13249     soname_spec='$libname$release$shared_ext$major'
13250     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13251     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13252     ;;
13253   *)
13254     shrext_cmds='.sl'
13255     dynamic_linker="$host_os dld.sl"
13256     shlibpath_var=SHLIB_PATH
13257     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13258     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13259     soname_spec='$libname$release$shared_ext$major'
13260     ;;
13261   esac
13262   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13263   postinstall_cmds='chmod 555 $lib'
13264   # or fails outright, so override atomically:
13265   install_override_mode=555
13266   ;;
13267
13268 interix[3-9]*)
13269   version_type=linux # correct to gnu/linux during the next big refactor
13270   need_lib_prefix=no
13271   need_version=no
13272   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13273   soname_spec='$libname$release$shared_ext$major'
13274   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13275   shlibpath_var=LD_LIBRARY_PATH
13276   shlibpath_overrides_runpath=no
13277   hardcode_into_libs=yes
13278   ;;
13279
13280 irix5* | irix6* | nonstopux*)
13281   case $host_os in
13282     nonstopux*) version_type=nonstopux ;;
13283     *)
13284         if test yes = "$lt_cv_prog_gnu_ld"; then
13285                 version_type=linux # correct to gnu/linux during the next big refactor
13286         else
13287                 version_type=irix
13288         fi ;;
13289   esac
13290   need_lib_prefix=no
13291   need_version=no
13292   soname_spec='$libname$release$shared_ext$major'
13293   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13294   case $host_os in
13295   irix5* | nonstopux*)
13296     libsuff= shlibsuff=
13297     ;;
13298   *)
13299     case $LD in # libtool.m4 will add one of these switches to LD
13300     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13301       libsuff= shlibsuff= libmagic=32-bit;;
13302     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13303       libsuff=32 shlibsuff=N32 libmagic=N32;;
13304     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13305       libsuff=64 shlibsuff=64 libmagic=64-bit;;
13306     *) libsuff= shlibsuff= libmagic=never-match;;
13307     esac
13308     ;;
13309   esac
13310   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13311   shlibpath_overrides_runpath=no
13312   sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13313   sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13314   hardcode_into_libs=yes
13315   ;;
13316
13317 # No shared lib support for Linux oldld, aout, or coff.
13318 linux*oldld* | linux*aout* | linux*coff*)
13319   dynamic_linker=no
13320   ;;
13321
13322 linux*android*)
13323   version_type=none # Android doesn't support versioned libraries.
13324   need_lib_prefix=no
13325   need_version=no
13326   library_names_spec='$libname$release$shared_ext'
13327   soname_spec='$libname$release$shared_ext'
13328   finish_cmds=
13329   shlibpath_var=LD_LIBRARY_PATH
13330   shlibpath_overrides_runpath=yes
13331
13332   # This implies no fast_install, which is unacceptable.
13333   # Some rework will be needed to allow for fast_install
13334   # before this can be enabled.
13335   hardcode_into_libs=yes
13336
13337   dynamic_linker='Android linker'
13338   # Don't embed -rpath directories since the linker doesn't support them.
13339   hardcode_libdir_flag_spec='-L$libdir'
13340   ;;
13341
13342 # This must be glibc/ELF.
13343 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13344   version_type=linux # correct to gnu/linux during the next big refactor
13345   need_lib_prefix=no
13346   need_version=no
13347   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13348   soname_spec='$libname$release$shared_ext$major'
13349   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13350   shlibpath_var=LD_LIBRARY_PATH
13351   shlibpath_overrides_runpath=no
13352
13353   # Some binutils ld are patched to set DT_RUNPATH
13354   if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
13355   $as_echo_n "(cached) " >&6
13356 else
13357   lt_cv_shlibpath_overrides_runpath=no
13358     save_LDFLAGS=$LDFLAGS
13359     save_libdir=$libdir
13360     eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13361          LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13362     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13363 /* end confdefs.h.  */
13364
13365 int
13366 main ()
13367 {
13368
13369   ;
13370   return 0;
13371 }
13372 _ACEOF
13373 if ac_fn_c_try_link "$LINENO"; then :
13374   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
13375   lt_cv_shlibpath_overrides_runpath=yes
13376 fi
13377 fi
13378 rm -f core conftest.err conftest.$ac_objext \
13379     conftest$ac_exeext conftest.$ac_ext
13380     LDFLAGS=$save_LDFLAGS
13381     libdir=$save_libdir
13382
13383 fi
13384
13385   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13386
13387   # This implies no fast_install, which is unacceptable.
13388   # Some rework will be needed to allow for fast_install
13389   # before this can be enabled.
13390   hardcode_into_libs=yes
13391
13392   # Add ABI-specific directories to the system library path.
13393   sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
13394
13395   # Ideally, we could use ldconfig to report *all* directores which are
13396   # searched for libraries, however this is still not possible.  Aside from not
13397   # being certain /sbin/ldconfig is available, command
13398   # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13399   # even though it is searched at run-time.  Try to do the best guess by
13400   # appending ld.so.conf contents (and includes) to the search path.
13401   if test -f /etc/ld.so.conf; then
13402     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' ' '`
13403     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
13404   fi
13405
13406   # We used to test for /lib/ld.so.1 and disable shared libraries on
13407   # powerpc, because MkLinux only supported shared libraries with the
13408   # GNU dynamic linker.  Since this was broken with cross compilers,
13409   # most powerpc-linux boxes support dynamic linking these days and
13410   # people can always --disable-shared, the test was removed, and we
13411   # assume the GNU/Linux dynamic linker is in use.
13412   dynamic_linker='GNU/Linux ld.so'
13413   ;;
13414
13415 netbsd*)
13416   version_type=sunos
13417   need_lib_prefix=no
13418   need_version=no
13419   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13420     library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13421     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13422     dynamic_linker='NetBSD (a.out) ld.so'
13423   else
13424     library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13425     soname_spec='$libname$release$shared_ext$major'
13426     dynamic_linker='NetBSD ld.elf_so'
13427   fi
13428   shlibpath_var=LD_LIBRARY_PATH
13429   shlibpath_overrides_runpath=yes
13430   hardcode_into_libs=yes
13431   ;;
13432
13433 newsos6)
13434   version_type=linux # correct to gnu/linux during the next big refactor
13435   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13436   shlibpath_var=LD_LIBRARY_PATH
13437   shlibpath_overrides_runpath=yes
13438   ;;
13439
13440 *nto* | *qnx*)
13441   version_type=qnx
13442   need_lib_prefix=no
13443   need_version=no
13444   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13445   soname_spec='$libname$release$shared_ext$major'
13446   shlibpath_var=LD_LIBRARY_PATH
13447   shlibpath_overrides_runpath=no
13448   hardcode_into_libs=yes
13449   dynamic_linker='ldqnx.so'
13450   ;;
13451
13452 openbsd* | bitrig*)
13453   version_type=sunos
13454   sys_lib_dlsearch_path_spec=/usr/lib
13455   need_lib_prefix=no
13456   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13457     need_version=no
13458   else
13459     need_version=yes
13460   fi
13461   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13462   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13463   shlibpath_var=LD_LIBRARY_PATH
13464   shlibpath_overrides_runpath=yes
13465   ;;
13466
13467 os2*)
13468   libname_spec='$name'
13469   version_type=windows
13470   shrext_cmds=.dll
13471   need_version=no
13472   need_lib_prefix=no
13473   # OS/2 can only load a DLL with a base name of 8 characters or less.
13474   soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13475     v=$($ECHO $release$versuffix | tr -d .-);
13476     n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13477     $ECHO $n$v`$shared_ext'
13478   library_names_spec='${libname}_dll.$libext'
13479   dynamic_linker='OS/2 ld.exe'
13480   shlibpath_var=BEGINLIBPATH
13481   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13482   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13483   postinstall_cmds='base_file=`basename \$file`~
13484     dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13485     dldir=$destdir/`dirname \$dlpath`~
13486     test -d \$dldir || mkdir -p \$dldir~
13487     $install_prog $dir/$dlname \$dldir/$dlname~
13488     chmod a+x \$dldir/$dlname~
13489     if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13490       eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13491     fi'
13492   postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13493     dlpath=$dir/\$dldll~
13494     $RM \$dlpath'
13495   ;;
13496
13497 osf3* | osf4* | osf5*)
13498   version_type=osf
13499   need_lib_prefix=no
13500   need_version=no
13501   soname_spec='$libname$release$shared_ext$major'
13502   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13503   shlibpath_var=LD_LIBRARY_PATH
13504   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13505   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13506   ;;
13507
13508 rdos*)
13509   dynamic_linker=no
13510   ;;
13511
13512 solaris*)
13513   version_type=linux # correct to gnu/linux during the next big refactor
13514   need_lib_prefix=no
13515   need_version=no
13516   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13517   soname_spec='$libname$release$shared_ext$major'
13518   shlibpath_var=LD_LIBRARY_PATH
13519   shlibpath_overrides_runpath=yes
13520   hardcode_into_libs=yes
13521   # ldd complains unless libraries are executable
13522   postinstall_cmds='chmod +x $lib'
13523   ;;
13524
13525 sunos4*)
13526   version_type=sunos
13527   library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13528   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13529   shlibpath_var=LD_LIBRARY_PATH
13530   shlibpath_overrides_runpath=yes
13531   if test yes = "$with_gnu_ld"; then
13532     need_lib_prefix=no
13533   fi
13534   need_version=yes
13535   ;;
13536
13537 sysv4 | sysv4.3*)
13538   version_type=linux # correct to gnu/linux during the next big refactor
13539   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13540   soname_spec='$libname$release$shared_ext$major'
13541   shlibpath_var=LD_LIBRARY_PATH
13542   case $host_vendor in
13543     sni)
13544       shlibpath_overrides_runpath=no
13545       need_lib_prefix=no
13546       runpath_var=LD_RUN_PATH
13547       ;;
13548     siemens)
13549       need_lib_prefix=no
13550       ;;
13551     motorola)
13552       need_lib_prefix=no
13553       need_version=no
13554       shlibpath_overrides_runpath=no
13555       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13556       ;;
13557   esac
13558   ;;
13559
13560 sysv4*MP*)
13561   if test -d /usr/nec; then
13562     version_type=linux # correct to gnu/linux during the next big refactor
13563     library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13564     soname_spec='$libname$shared_ext.$major'
13565     shlibpath_var=LD_LIBRARY_PATH
13566   fi
13567   ;;
13568
13569 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13570   version_type=sco
13571   need_lib_prefix=no
13572   need_version=no
13573   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13574   soname_spec='$libname$release$shared_ext$major'
13575   shlibpath_var=LD_LIBRARY_PATH
13576   shlibpath_overrides_runpath=yes
13577   hardcode_into_libs=yes
13578   if test yes = "$with_gnu_ld"; then
13579     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13580   else
13581     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13582     case $host_os in
13583       sco3.2v5*)
13584         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13585         ;;
13586     esac
13587   fi
13588   sys_lib_dlsearch_path_spec='/usr/lib'
13589   ;;
13590
13591 tpf*)
13592   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13593   version_type=linux # correct to gnu/linux during the next big refactor
13594   need_lib_prefix=no
13595   need_version=no
13596   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13597   shlibpath_var=LD_LIBRARY_PATH
13598   shlibpath_overrides_runpath=no
13599   hardcode_into_libs=yes
13600   ;;
13601
13602 uts4*)
13603   version_type=linux # correct to gnu/linux during the next big refactor
13604   library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13605   soname_spec='$libname$release$shared_ext$major'
13606   shlibpath_var=LD_LIBRARY_PATH
13607   ;;
13608
13609 *)
13610   dynamic_linker=no
13611   ;;
13612 esac
13613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13614 $as_echo "$dynamic_linker" >&6; }
13615 test no = "$dynamic_linker" && can_build_shared=no
13616
13617 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13618 if test yes = "$GCC"; then
13619   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13620 fi
13621
13622 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13623   sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13624 fi
13625
13626 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13627   sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13628 fi
13629
13630 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13631 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13632
13633 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13634 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13635
13636 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13637 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13736 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
13737 hardcode_action=
13738 if test -n "$hardcode_libdir_flag_spec" ||
13739    test -n "$runpath_var" ||
13740    test yes = "$hardcode_automatic"; then
13741
13742   # We can hardcode non-existent directories.
13743   if test no != "$hardcode_direct" &&
13744      # If the only mechanism to avoid hardcoding is shlibpath_var, we
13745      # have to relink, otherwise we might link with an installed library
13746      # when we should be linking with a yet-to-be-installed one
13747      ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13748      test no != "$hardcode_minus_L"; then
13749     # Linking always hardcodes the temporary library directory.
13750     hardcode_action=relink
13751   else
13752     # We can link without hardcoding, and we can hardcode nonexisting dirs.
13753     hardcode_action=immediate
13754   fi
13755 else
13756   # We cannot hardcode anything, or else we can only hardcode existing
13757   # directories.
13758   hardcode_action=unsupported
13759 fi
13760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13761 $as_echo "$hardcode_action" >&6; }
13762
13763 if test relink = "$hardcode_action" ||
13764    test yes = "$inherit_rpath"; then
13765   # Fast installation is not supported
13766   enable_fast_install=no
13767 elif test yes = "$shlibpath_overrides_runpath" ||
13768      test no = "$enable_shared"; then
13769   # Fast installation is not necessary
13770   enable_fast_install=needless
13771 fi
13772
13773
13774
13775
13776
13777
13778   if test yes != "$enable_dlopen"; then
13779   enable_dlopen=unknown
13780   enable_dlopen_self=unknown
13781   enable_dlopen_self_static=unknown
13782 else
13783   lt_cv_dlopen=no
13784   lt_cv_dlopen_libs=
13785
13786   case $host_os in
13787   beos*)
13788     lt_cv_dlopen=load_add_on
13789     lt_cv_dlopen_libs=
13790     lt_cv_dlopen_self=yes
13791     ;;
13792
13793   mingw* | pw32* | cegcc*)
13794     lt_cv_dlopen=LoadLibrary
13795     lt_cv_dlopen_libs=
13796     ;;
13797
13798   cygwin*)
13799     lt_cv_dlopen=dlopen
13800     lt_cv_dlopen_libs=
13801     ;;
13802
13803   darwin*)
13804     # if libdl is installed we need to link against it
13805     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13806 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13807 if ${ac_cv_lib_dl_dlopen+:} false; then :
13808   $as_echo_n "(cached) " >&6
13809 else
13810   ac_check_lib_save_LIBS=$LIBS
13811 LIBS="-ldl  $LIBS"
13812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13813 /* end confdefs.h.  */
13814
13815 /* Override any GCC internal prototype to avoid an error.
13816    Use char because int might match the return type of a GCC
13817    builtin and then its argument prototype would still apply.  */
13818 #ifdef __cplusplus
13819 extern "C"
13820 #endif
13821 char dlopen ();
13822 int
13823 main ()
13824 {
13825 return dlopen ();
13826   ;
13827   return 0;
13828 }
13829 _ACEOF
13830 if ac_fn_c_try_link "$LINENO"; then :
13831   ac_cv_lib_dl_dlopen=yes
13832 else
13833   ac_cv_lib_dl_dlopen=no
13834 fi
13835 rm -f core conftest.err conftest.$ac_objext \
13836     conftest$ac_exeext conftest.$ac_ext
13837 LIBS=$ac_check_lib_save_LIBS
13838 fi
13839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13840 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13841 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13842   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13843 else
13844
13845     lt_cv_dlopen=dyld
13846     lt_cv_dlopen_libs=
13847     lt_cv_dlopen_self=yes
13848
13849 fi
13850
13851     ;;
13852
13853   tpf*)
13854     # Don't try to run any link tests for TPF.  We know it's impossible
13855     # because TPF is a cross-compiler, and we know how we open DSOs.
13856     lt_cv_dlopen=dlopen
13857     lt_cv_dlopen_libs=
13858     lt_cv_dlopen_self=no
13859     ;;
13860
13861   *)
13862     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
13863 if test "x$ac_cv_func_shl_load" = xyes; then :
13864   lt_cv_dlopen=shl_load
13865 else
13866   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
13867 $as_echo_n "checking for shl_load in -ldld... " >&6; }
13868 if ${ac_cv_lib_dld_shl_load+:} false; then :
13869   $as_echo_n "(cached) " >&6
13870 else
13871   ac_check_lib_save_LIBS=$LIBS
13872 LIBS="-ldld  $LIBS"
13873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13874 /* end confdefs.h.  */
13875
13876 /* Override any GCC internal prototype to avoid an error.
13877    Use char because int might match the return type of a GCC
13878    builtin and then its argument prototype would still apply.  */
13879 #ifdef __cplusplus
13880 extern "C"
13881 #endif
13882 char shl_load ();
13883 int
13884 main ()
13885 {
13886 return shl_load ();
13887   ;
13888   return 0;
13889 }
13890 _ACEOF
13891 if ac_fn_c_try_link "$LINENO"; then :
13892   ac_cv_lib_dld_shl_load=yes
13893 else
13894   ac_cv_lib_dld_shl_load=no
13895 fi
13896 rm -f core conftest.err conftest.$ac_objext \
13897     conftest$ac_exeext conftest.$ac_ext
13898 LIBS=$ac_check_lib_save_LIBS
13899 fi
13900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
13901 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
13902 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
13903   lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
13904 else
13905   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
13906 if test "x$ac_cv_func_dlopen" = xyes; then :
13907   lt_cv_dlopen=dlopen
13908 else
13909   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13910 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13911 if ${ac_cv_lib_dl_dlopen+:} false; then :
13912   $as_echo_n "(cached) " >&6
13913 else
13914   ac_check_lib_save_LIBS=$LIBS
13915 LIBS="-ldl  $LIBS"
13916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13917 /* end confdefs.h.  */
13918
13919 /* Override any GCC internal prototype to avoid an error.
13920    Use char because int might match the return type of a GCC
13921    builtin and then its argument prototype would still apply.  */
13922 #ifdef __cplusplus
13923 extern "C"
13924 #endif
13925 char dlopen ();
13926 int
13927 main ()
13928 {
13929 return dlopen ();
13930   ;
13931   return 0;
13932 }
13933 _ACEOF
13934 if ac_fn_c_try_link "$LINENO"; then :
13935   ac_cv_lib_dl_dlopen=yes
13936 else
13937   ac_cv_lib_dl_dlopen=no
13938 fi
13939 rm -f core conftest.err conftest.$ac_objext \
13940     conftest$ac_exeext conftest.$ac_ext
13941 LIBS=$ac_check_lib_save_LIBS
13942 fi
13943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13944 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13945 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13946   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13947 else
13948   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
13949 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
13950 if ${ac_cv_lib_svld_dlopen+:} false; then :
13951   $as_echo_n "(cached) " >&6
13952 else
13953   ac_check_lib_save_LIBS=$LIBS
13954 LIBS="-lsvld  $LIBS"
13955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13956 /* end confdefs.h.  */
13957
13958 /* Override any GCC internal prototype to avoid an error.
13959    Use char because int might match the return type of a GCC
13960    builtin and then its argument prototype would still apply.  */
13961 #ifdef __cplusplus
13962 extern "C"
13963 #endif
13964 char dlopen ();
13965 int
13966 main ()
13967 {
13968 return dlopen ();
13969   ;
13970   return 0;
13971 }
13972 _ACEOF
13973 if ac_fn_c_try_link "$LINENO"; then :
13974   ac_cv_lib_svld_dlopen=yes
13975 else
13976   ac_cv_lib_svld_dlopen=no
13977 fi
13978 rm -f core conftest.err conftest.$ac_objext \
13979     conftest$ac_exeext conftest.$ac_ext
13980 LIBS=$ac_check_lib_save_LIBS
13981 fi
13982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
13983 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
13984 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
13985   lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
13986 else
13987   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
13988 $as_echo_n "checking for dld_link in -ldld... " >&6; }
13989 if ${ac_cv_lib_dld_dld_link+:} false; then :
13990   $as_echo_n "(cached) " >&6
13991 else
13992   ac_check_lib_save_LIBS=$LIBS
13993 LIBS="-ldld  $LIBS"
13994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13995 /* end confdefs.h.  */
13996
13997 /* Override any GCC internal prototype to avoid an error.
13998    Use char because int might match the return type of a GCC
13999    builtin and then its argument prototype would still apply.  */
14000 #ifdef __cplusplus
14001 extern "C"
14002 #endif
14003 char dld_link ();
14004 int
14005 main ()
14006 {
14007 return dld_link ();
14008   ;
14009   return 0;
14010 }
14011 _ACEOF
14012 if ac_fn_c_try_link "$LINENO"; then :
14013   ac_cv_lib_dld_dld_link=yes
14014 else
14015   ac_cv_lib_dld_dld_link=no
14016 fi
14017 rm -f core conftest.err conftest.$ac_objext \
14018     conftest$ac_exeext conftest.$ac_ext
14019 LIBS=$ac_check_lib_save_LIBS
14020 fi
14021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14022 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
14023 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
14024   lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14025 fi
14026
14027
14028 fi
14029
14030
14031 fi
14032
14033
14034 fi
14035
14036
14037 fi
14038
14039
14040 fi
14041
14042     ;;
14043   esac
14044
14045   if test no = "$lt_cv_dlopen"; then
14046     enable_dlopen=no
14047   else
14048     enable_dlopen=yes
14049   fi
14050
14051   case $lt_cv_dlopen in
14052   dlopen)
14053     save_CPPFLAGS=$CPPFLAGS
14054     test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14055
14056     save_LDFLAGS=$LDFLAGS
14057     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14058
14059     save_LIBS=$LIBS
14060     LIBS="$lt_cv_dlopen_libs $LIBS"
14061
14062     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14063 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
14064 if ${lt_cv_dlopen_self+:} false; then :
14065   $as_echo_n "(cached) " >&6
14066 else
14067           if test yes = "$cross_compiling"; then :
14068   lt_cv_dlopen_self=cross
14069 else
14070   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14071   lt_status=$lt_dlunknown
14072   cat > conftest.$ac_ext <<_LT_EOF
14073 #line $LINENO "configure"
14074 #include "confdefs.h"
14075
14076 #if HAVE_DLFCN_H
14077 #include <dlfcn.h>
14078 #endif
14079
14080 #include <stdio.h>
14081
14082 #ifdef RTLD_GLOBAL
14083 #  define LT_DLGLOBAL           RTLD_GLOBAL
14084 #else
14085 #  ifdef DL_GLOBAL
14086 #    define LT_DLGLOBAL         DL_GLOBAL
14087 #  else
14088 #    define LT_DLGLOBAL         0
14089 #  endif
14090 #endif
14091
14092 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14093    find out it does not work in some platform. */
14094 #ifndef LT_DLLAZY_OR_NOW
14095 #  ifdef RTLD_LAZY
14096 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14097 #  else
14098 #    ifdef DL_LAZY
14099 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14100 #    else
14101 #      ifdef RTLD_NOW
14102 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14103 #      else
14104 #        ifdef DL_NOW
14105 #          define LT_DLLAZY_OR_NOW      DL_NOW
14106 #        else
14107 #          define LT_DLLAZY_OR_NOW      0
14108 #        endif
14109 #      endif
14110 #    endif
14111 #  endif
14112 #endif
14113
14114 /* When -fvisibility=hidden is used, assume the code has been annotated
14115    correspondingly for the symbols needed.  */
14116 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14117 int fnord () __attribute__((visibility("default")));
14118 #endif
14119
14120 int fnord () { return 42; }
14121 int main ()
14122 {
14123   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14124   int status = $lt_dlunknown;
14125
14126   if (self)
14127     {
14128       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14129       else
14130         {
14131           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14132           else puts (dlerror ());
14133         }
14134       /* dlclose (self); */
14135     }
14136   else
14137     puts (dlerror ());
14138
14139   return status;
14140 }
14141 _LT_EOF
14142   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14143   (eval $ac_link) 2>&5
14144   ac_status=$?
14145   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14146   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14147     (./conftest; exit; ) >&5 2>/dev/null
14148     lt_status=$?
14149     case x$lt_status in
14150       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14151       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14152       x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14153     esac
14154   else :
14155     # compilation failed
14156     lt_cv_dlopen_self=no
14157   fi
14158 fi
14159 rm -fr conftest*
14160
14161
14162 fi
14163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14164 $as_echo "$lt_cv_dlopen_self" >&6; }
14165
14166     if test yes = "$lt_cv_dlopen_self"; then
14167       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14168       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14169 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
14170 if ${lt_cv_dlopen_self_static+:} false; then :
14171   $as_echo_n "(cached) " >&6
14172 else
14173           if test yes = "$cross_compiling"; then :
14174   lt_cv_dlopen_self_static=cross
14175 else
14176   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14177   lt_status=$lt_dlunknown
14178   cat > conftest.$ac_ext <<_LT_EOF
14179 #line $LINENO "configure"
14180 #include "confdefs.h"
14181
14182 #if HAVE_DLFCN_H
14183 #include <dlfcn.h>
14184 #endif
14185
14186 #include <stdio.h>
14187
14188 #ifdef RTLD_GLOBAL
14189 #  define LT_DLGLOBAL           RTLD_GLOBAL
14190 #else
14191 #  ifdef DL_GLOBAL
14192 #    define LT_DLGLOBAL         DL_GLOBAL
14193 #  else
14194 #    define LT_DLGLOBAL         0
14195 #  endif
14196 #endif
14197
14198 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14199    find out it does not work in some platform. */
14200 #ifndef LT_DLLAZY_OR_NOW
14201 #  ifdef RTLD_LAZY
14202 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
14203 #  else
14204 #    ifdef DL_LAZY
14205 #      define LT_DLLAZY_OR_NOW          DL_LAZY
14206 #    else
14207 #      ifdef RTLD_NOW
14208 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
14209 #      else
14210 #        ifdef DL_NOW
14211 #          define LT_DLLAZY_OR_NOW      DL_NOW
14212 #        else
14213 #          define LT_DLLAZY_OR_NOW      0
14214 #        endif
14215 #      endif
14216 #    endif
14217 #  endif
14218 #endif
14219
14220 /* When -fvisibility=hidden is used, assume the code has been annotated
14221    correspondingly for the symbols needed.  */
14222 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14223 int fnord () __attribute__((visibility("default")));
14224 #endif
14225
14226 int fnord () { return 42; }
14227 int main ()
14228 {
14229   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14230   int status = $lt_dlunknown;
14231
14232   if (self)
14233     {
14234       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14235       else
14236         {
14237           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14238           else puts (dlerror ());
14239         }
14240       /* dlclose (self); */
14241     }
14242   else
14243     puts (dlerror ());
14244
14245   return status;
14246 }
14247 _LT_EOF
14248   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14249   (eval $ac_link) 2>&5
14250   ac_status=$?
14251   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14252   test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14253     (./conftest; exit; ) >&5 2>/dev/null
14254     lt_status=$?
14255     case x$lt_status in
14256       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14257       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14258       x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14259     esac
14260   else :
14261     # compilation failed
14262     lt_cv_dlopen_self_static=no
14263   fi
14264 fi
14265 rm -fr conftest*
14266
14267
14268 fi
14269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14270 $as_echo "$lt_cv_dlopen_self_static" >&6; }
14271     fi
14272
14273     CPPFLAGS=$save_CPPFLAGS
14274     LDFLAGS=$save_LDFLAGS
14275     LIBS=$save_LIBS
14276     ;;
14277   esac
14278
14279   case $lt_cv_dlopen_self in
14280   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14281   *) enable_dlopen_self=unknown ;;
14282   esac
14283
14284   case $lt_cv_dlopen_self_static in
14285   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14286   *) enable_dlopen_self_static=unknown ;;
14287   esac
14288 fi
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306 striplib=
14307 old_striplib=
14308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14309 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
14310 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14311   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14312   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14314 $as_echo "yes" >&6; }
14315 else
14316 # FIXME - insert some real tests, host_os isn't really good enough
14317   case $host_os in
14318   darwin*)
14319     if test -n "$STRIP"; then
14320       striplib="$STRIP -x"
14321       old_striplib="$STRIP -S"
14322       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14323 $as_echo "yes" >&6; }
14324     else
14325       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14326 $as_echo "no" >&6; }
14327     fi
14328     ;;
14329   *)
14330     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14331 $as_echo "no" >&6; }
14332     ;;
14333   esac
14334 fi
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347   # Report what library types will actually be built
14348   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14349 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
14350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14351 $as_echo "$can_build_shared" >&6; }
14352
14353   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14354 $as_echo_n "checking whether to build shared libraries... " >&6; }
14355   test no = "$can_build_shared" && enable_shared=no
14356
14357   # On AIX, shared libraries and static libraries use the same namespace, and
14358   # are all built from PIC.
14359   case $host_os in
14360   aix3*)
14361     test yes = "$enable_shared" && enable_static=no
14362     if test -n "$RANLIB"; then
14363       archive_cmds="$archive_cmds~\$RANLIB \$lib"
14364       postinstall_cmds='$RANLIB $lib'
14365     fi
14366     ;;
14367
14368   aix[4-9]*)
14369     if test ia64 != "$host_cpu"; then
14370       case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14371       yes,aix,yes) ;;                   # shared object as lib.so file only
14372       yes,svr4,*) ;;                    # shared object as lib.so archive member only
14373       yes,*) enable_static=no ;;        # shared object in lib.a archive as well
14374       esac
14375     fi
14376     ;;
14377   esac
14378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14379 $as_echo "$enable_shared" >&6; }
14380
14381   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14382 $as_echo_n "checking whether to build static libraries... " >&6; }
14383   # Make sure either enable_shared or enable_static is yes.
14384   test yes = "$enable_shared" || enable_static=yes
14385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14386 $as_echo "$enable_static" >&6; }
14387
14388
14389
14390
14391 fi
14392 ac_ext=c
14393 ac_cpp='$CPP $CPPFLAGS'
14394 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14395 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14396 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14397
14398 CC=$lt_save_CC
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414         ac_config_commands="$ac_config_commands libtool"
14415
14416
14417
14418
14419 # Only expand once:
14420
14421
14422
14423
14424 # Checks for header files.
14425 for ac_header in stdarg.h stdbool.h netinet/in.h netinet/tcp.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h
14426 do :
14427   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14428 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
14429 "
14430 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14431   cat >>confdefs.h <<_ACEOF
14432 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14433 _ACEOF
14434
14435 fi
14436
14437 done
14438
14439
14440 # check for types.
14441 # Using own tests for int64* because autoconf builtin only give 32bit.
14442 ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
14443 if test "x$ac_cv_type_int8_t" = xyes; then :
14444
14445 else
14446
14447 cat >>confdefs.h <<_ACEOF
14448 #define int8_t signed char
14449 _ACEOF
14450
14451 fi
14452
14453 ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
14454 if test "x$ac_cv_type_int16_t" = xyes; then :
14455
14456 else
14457
14458 cat >>confdefs.h <<_ACEOF
14459 #define int16_t short
14460 _ACEOF
14461
14462 fi
14463
14464 ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
14465 if test "x$ac_cv_type_int32_t" = xyes; then :
14466
14467 else
14468
14469 cat >>confdefs.h <<_ACEOF
14470 #define int32_t int
14471 _ACEOF
14472
14473 fi
14474
14475 ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
14476 if test "x$ac_cv_type_int64_t" = xyes; then :
14477
14478 else
14479
14480 cat >>confdefs.h <<_ACEOF
14481 #define int64_t long long
14482 _ACEOF
14483
14484 fi
14485
14486 ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
14487 if test "x$ac_cv_type_uint8_t" = xyes; then :
14488
14489 else
14490
14491 cat >>confdefs.h <<_ACEOF
14492 #define uint8_t unsigned char
14493 _ACEOF
14494
14495 fi
14496
14497 ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
14498 if test "x$ac_cv_type_uint16_t" = xyes; then :
14499
14500 else
14501
14502 cat >>confdefs.h <<_ACEOF
14503 #define uint16_t unsigned short
14504 _ACEOF
14505
14506 fi
14507
14508 ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
14509 if test "x$ac_cv_type_uint32_t" = xyes; then :
14510
14511 else
14512
14513 cat >>confdefs.h <<_ACEOF
14514 #define uint32_t unsigned int
14515 _ACEOF
14516
14517 fi
14518
14519 ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
14520 if test "x$ac_cv_type_uint64_t" = xyes; then :
14521
14522 else
14523
14524 cat >>confdefs.h <<_ACEOF
14525 #define uint64_t unsigned long long
14526 _ACEOF
14527
14528 fi
14529
14530 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14531 if test "x$ac_cv_type_size_t" = xyes; then :
14532
14533 else
14534
14535 cat >>confdefs.h <<_ACEOF
14536 #define size_t unsigned int
14537 _ACEOF
14538
14539 fi
14540
14541 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
14542 if test "x$ac_cv_type_ssize_t" = xyes; then :
14543
14544 else
14545
14546 cat >>confdefs.h <<_ACEOF
14547 #define ssize_t int
14548 _ACEOF
14549
14550 fi
14551
14552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14553 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
14554 if ${ac_cv_type_uid_t+:} false; then :
14555   $as_echo_n "(cached) " >&6
14556 else
14557   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14558 /* end confdefs.h.  */
14559 #include <sys/types.h>
14560
14561 _ACEOF
14562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14563   $EGREP "uid_t" >/dev/null 2>&1; then :
14564   ac_cv_type_uid_t=yes
14565 else
14566   ac_cv_type_uid_t=no
14567 fi
14568 rm -f conftest*
14569
14570 fi
14571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
14572 $as_echo "$ac_cv_type_uid_t" >&6; }
14573 if test $ac_cv_type_uid_t = no; then
14574
14575 $as_echo "#define uid_t int" >>confdefs.h
14576
14577
14578 $as_echo "#define gid_t int" >>confdefs.h
14579
14580 fi
14581
14582 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14583 if test "x$ac_cv_type_pid_t" = xyes; then :
14584
14585 else
14586
14587 cat >>confdefs.h <<_ACEOF
14588 #define pid_t int
14589 _ACEOF
14590
14591 fi
14592
14593 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
14594 if test "x$ac_cv_type_off_t" = xyes; then :
14595
14596 else
14597
14598 cat >>confdefs.h <<_ACEOF
14599 #define off_t long int
14600 _ACEOF
14601
14602 fi
14603
14604 ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "
14605 $ac_includes_default
14606 #ifdef HAVE_WINSOCK2_H
14607 #  include <winsock2.h>
14608 #endif
14609
14610 "
14611 if test "x$ac_cv_type_u_char" = xyes; then :
14612
14613 else
14614
14615 $as_echo "#define u_char unsigned char" >>confdefs.h
14616
14617 fi
14618
14619 ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "
14620 $ac_includes_default
14621 #ifdef HAVE_SYS_RESOURCE_H
14622 #  include <sys/resource.h>
14623 #endif
14624
14625 "
14626 if test "x$ac_cv_type_rlim_t" = xyes; then :
14627
14628 else
14629
14630 $as_echo "#define rlim_t unsigned long" >>confdefs.h
14631
14632 fi
14633
14634
14635 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
14636 $ac_includes_default
14637 #ifdef HAVE_SYS_SOCKET_H
14638 #  include <sys/socket.h>
14639 #endif
14640 #ifdef HAVE_WS2TCPIP_H
14641 #  include <ws2tcpip.h>
14642 #endif
14643
14644 "
14645 if test "x$ac_cv_type_socklen_t" = xyes; then :
14646
14647 else
14648
14649 $as_echo "#define socklen_t int" >>confdefs.h
14650
14651 fi
14652
14653  ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "
14654 $ac_includes_default
14655 #ifdef HAVE_SYS_TYPES_H
14656 # include <sys/types.h>
14657 #endif
14658 #ifdef HAVE_NETINET_IN_H
14659 # include <netinet/in.h>
14660 #endif
14661
14662 "
14663 if test "x$ac_cv_type_in_addr_t" = xyes; then :
14664
14665 else
14666
14667 $as_echo "#define in_addr_t uint32_t" >>confdefs.h
14668
14669 fi
14670
14671  ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "
14672 $ac_includes_default
14673 #ifdef HAVE_SYS_TYPES_H
14674 # include <sys/types.h>
14675 #endif
14676 #ifdef HAVE_NETINET_IN_H
14677 # include <netinet/in.h>
14678 #endif
14679
14680 "
14681 if test "x$ac_cv_type_in_port_t" = xyes; then :
14682
14683 else
14684
14685 $as_echo "#define in_port_t uint16_t" >>confdefs.h
14686
14687 fi
14688
14689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memcmp compares unsigned" >&5
14690 $as_echo_n "checking if memcmp compares unsigned... " >&6; }
14691 if test "$cross_compiling" = yes; then :
14692    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compile no" >&5
14693 $as_echo "cross-compile no" >&6; }
14694
14695 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14696
14697   case " $LIBOBJS " in
14698   *" memcmp.$ac_objext "* ) ;;
14699   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14700  ;;
14701 esac
14702
14703
14704 else
14705   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14706 /* end confdefs.h.  */
14707
14708 #include <stdio.h>
14709 #include <stdlib.h>
14710 #include <string.h>
14711 int main(void)
14712 {
14713         char a = 255, b = 0;
14714         if(memcmp(&a, &b, 1) < 0)
14715                 return 1;
14716         return 0;
14717 }
14718
14719 _ACEOF
14720 if ac_fn_c_try_run "$LINENO"; then :
14721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14722 $as_echo "yes" >&6; }
14723 else
14724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14725 $as_echo "no" >&6; }
14726
14727 $as_echo "#define MEMCMP_IS_BROKEN 1" >>confdefs.h
14728
14729   case " $LIBOBJS " in
14730   *" memcmp.$ac_objext "* ) ;;
14731   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
14732  ;;
14733 esac
14734
14735
14736 fi
14737 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14738   conftest.$ac_objext conftest.beam conftest.$ac_ext
14739 fi
14740
14741
14742 # The cast to long int works around a bug in the HP C Compiler
14743 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14744 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14745 # This bug is HP SR number 8606223364.
14746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
14747 $as_echo_n "checking size of time_t... " >&6; }
14748 if ${ac_cv_sizeof_time_t+:} false; then :
14749   $as_echo_n "(cached) " >&6
14750 else
14751   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "
14752 $ac_includes_default
14753 #ifdef TIME_WITH_SYS_TIME
14754 # include <sys/time.h>
14755 # include <time.h>
14756 #else
14757 # ifdef HAVE_SYS_TIME_H
14758 #  include <sys/time.h>
14759 # else
14760 #  include <time.h>
14761 # endif
14762 #endif
14763
14764 "; then :
14765
14766 else
14767   if test "$ac_cv_type_time_t" = yes; then
14768      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14769 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14770 as_fn_error 77 "cannot compute sizeof (time_t)
14771 See \`config.log' for more details" "$LINENO" 5; }
14772    else
14773      ac_cv_sizeof_time_t=0
14774    fi
14775 fi
14776
14777 fi
14778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
14779 $as_echo "$ac_cv_sizeof_time_t" >&6; }
14780
14781
14782
14783 cat >>confdefs.h <<_ACEOF
14784 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
14785 _ACEOF
14786
14787
14788
14789 # add option to disable the evil rpath
14790
14791 # Check whether --enable-rpath was given.
14792 if test "${enable_rpath+set}" = set; then :
14793   enableval=$enable_rpath; enable_rpath=$enableval
14794 else
14795   enable_rpath=yes
14796 fi
14797
14798 if test "x$enable_rpath" = xno; then
14799                 ac_config_commands="$ac_config_commands disable-rpath"
14800
14801 fi
14802
14803
14804
14805 # check to see if libraries are needed for these functions.
14806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
14807 $as_echo_n "checking for library containing inet_pton... " >&6; }
14808 if ${ac_cv_search_inet_pton+:} false; then :
14809   $as_echo_n "(cached) " >&6
14810 else
14811   ac_func_search_save_LIBS=$LIBS
14812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14813 /* end confdefs.h.  */
14814
14815 /* Override any GCC internal prototype to avoid an error.
14816    Use char because int might match the return type of a GCC
14817    builtin and then its argument prototype would still apply.  */
14818 #ifdef __cplusplus
14819 extern "C"
14820 #endif
14821 char inet_pton ();
14822 int
14823 main ()
14824 {
14825 return inet_pton ();
14826   ;
14827   return 0;
14828 }
14829 _ACEOF
14830 for ac_lib in '' nsl; do
14831   if test -z "$ac_lib"; then
14832     ac_res="none required"
14833   else
14834     ac_res=-l$ac_lib
14835     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14836   fi
14837   if ac_fn_c_try_link "$LINENO"; then :
14838   ac_cv_search_inet_pton=$ac_res
14839 fi
14840 rm -f core conftest.err conftest.$ac_objext \
14841     conftest$ac_exeext
14842   if ${ac_cv_search_inet_pton+:} false; then :
14843   break
14844 fi
14845 done
14846 if ${ac_cv_search_inet_pton+:} false; then :
14847
14848 else
14849   ac_cv_search_inet_pton=no
14850 fi
14851 rm conftest.$ac_ext
14852 LIBS=$ac_func_search_save_LIBS
14853 fi
14854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
14855 $as_echo "$ac_cv_search_inet_pton" >&6; }
14856 ac_res=$ac_cv_search_inet_pton
14857 if test "$ac_res" != no; then :
14858   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14859
14860 fi
14861
14862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
14863 $as_echo_n "checking for library containing socket... " >&6; }
14864 if ${ac_cv_search_socket+:} false; then :
14865   $as_echo_n "(cached) " >&6
14866 else
14867   ac_func_search_save_LIBS=$LIBS
14868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14869 /* end confdefs.h.  */
14870
14871 /* Override any GCC internal prototype to avoid an error.
14872    Use char because int might match the return type of a GCC
14873    builtin and then its argument prototype would still apply.  */
14874 #ifdef __cplusplus
14875 extern "C"
14876 #endif
14877 char socket ();
14878 int
14879 main ()
14880 {
14881 return socket ();
14882   ;
14883   return 0;
14884 }
14885 _ACEOF
14886 for ac_lib in '' socket; do
14887   if test -z "$ac_lib"; then
14888     ac_res="none required"
14889   else
14890     ac_res=-l$ac_lib
14891     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14892   fi
14893   if ac_fn_c_try_link "$LINENO"; then :
14894   ac_cv_search_socket=$ac_res
14895 fi
14896 rm -f core conftest.err conftest.$ac_objext \
14897     conftest$ac_exeext
14898   if ${ac_cv_search_socket+:} false; then :
14899   break
14900 fi
14901 done
14902 if ${ac_cv_search_socket+:} false; then :
14903
14904 else
14905   ac_cv_search_socket=no
14906 fi
14907 rm conftest.$ac_ext
14908 LIBS=$ac_func_search_save_LIBS
14909 fi
14910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
14911 $as_echo "$ac_cv_search_socket" >&6; }
14912 ac_res=$ac_cv_search_socket
14913 if test "$ac_res" != no; then :
14914   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14915
14916 fi
14917
14918
14919 # check wether strptime also works
14920
14921 # check some functions of the OS before linking libs (while still runnable).
14922 for ac_header in unistd.h
14923 do :
14924   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
14925 if test "x$ac_cv_header_unistd_h" = xyes; then :
14926   cat >>confdefs.h <<_ACEOF
14927 #define HAVE_UNISTD_H 1
14928 _ACEOF
14929
14930 fi
14931
14932 done
14933
14934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
14935 $as_echo_n "checking for working chown... " >&6; }
14936 if ${ac_cv_func_chown_works+:} false; then :
14937   $as_echo_n "(cached) " >&6
14938 else
14939   if test "$cross_compiling" = yes; then :
14940   ac_cv_func_chown_works=no
14941 else
14942   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14943 /* end confdefs.h.  */
14944 $ac_includes_default
14945 #include <fcntl.h>
14946
14947 int
14948 main ()
14949 {
14950   char *f = "conftest.chown";
14951   struct stat before, after;
14952
14953   if (creat (f, 0600) < 0)
14954     return 1;
14955   if (stat (f, &before) < 0)
14956     return 1;
14957   if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
14958     return 1;
14959   if (stat (f, &after) < 0)
14960     return 1;
14961   return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
14962
14963   ;
14964   return 0;
14965 }
14966 _ACEOF
14967 if ac_fn_c_try_run "$LINENO"; then :
14968   ac_cv_func_chown_works=yes
14969 else
14970   ac_cv_func_chown_works=no
14971 fi
14972 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14973   conftest.$ac_objext conftest.beam conftest.$ac_ext
14974 fi
14975
14976 rm -f conftest.chown
14977
14978 fi
14979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
14980 $as_echo "$ac_cv_func_chown_works" >&6; }
14981 if test $ac_cv_func_chown_works = yes; then
14982
14983 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
14984
14985 fi
14986
14987 for ac_header in vfork.h
14988 do :
14989   ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
14990 if test "x$ac_cv_header_vfork_h" = xyes; then :
14991   cat >>confdefs.h <<_ACEOF
14992 #define HAVE_VFORK_H 1
14993 _ACEOF
14994
14995 fi
14996
14997 done
14998
14999 for ac_func in fork vfork
15000 do :
15001   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15002 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15003 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15004   cat >>confdefs.h <<_ACEOF
15005 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15006 _ACEOF
15007
15008 fi
15009 done
15010
15011 if test "x$ac_cv_func_fork" = xyes; then
15012   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15013 $as_echo_n "checking for working fork... " >&6; }
15014 if ${ac_cv_func_fork_works+:} false; then :
15015   $as_echo_n "(cached) " >&6
15016 else
15017   if test "$cross_compiling" = yes; then :
15018   ac_cv_func_fork_works=cross
15019 else
15020   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15021 /* end confdefs.h.  */
15022 $ac_includes_default
15023 int
15024 main ()
15025 {
15026
15027           /* By Ruediger Kuhlmann. */
15028           return fork () < 0;
15029
15030   ;
15031   return 0;
15032 }
15033 _ACEOF
15034 if ac_fn_c_try_run "$LINENO"; then :
15035   ac_cv_func_fork_works=yes
15036 else
15037   ac_cv_func_fork_works=no
15038 fi
15039 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15040   conftest.$ac_objext conftest.beam conftest.$ac_ext
15041 fi
15042
15043 fi
15044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15045 $as_echo "$ac_cv_func_fork_works" >&6; }
15046
15047 else
15048   ac_cv_func_fork_works=$ac_cv_func_fork
15049 fi
15050 if test "x$ac_cv_func_fork_works" = xcross; then
15051   case $host in
15052     *-*-amigaos* | *-*-msdosdjgpp*)
15053       # Override, as these systems have only a dummy fork() stub
15054       ac_cv_func_fork_works=no
15055       ;;
15056     *)
15057       ac_cv_func_fork_works=yes
15058       ;;
15059   esac
15060   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15061 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15062 fi
15063 ac_cv_func_vfork_works=$ac_cv_func_vfork
15064 if test "x$ac_cv_func_vfork" = xyes; then
15065   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15066 $as_echo_n "checking for working vfork... " >&6; }
15067 if ${ac_cv_func_vfork_works+:} false; then :
15068   $as_echo_n "(cached) " >&6
15069 else
15070   if test "$cross_compiling" = yes; then :
15071   ac_cv_func_vfork_works=cross
15072 else
15073   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15074 /* end confdefs.h.  */
15075 /* Thanks to Paul Eggert for this test.  */
15076 $ac_includes_default
15077 #include <sys/wait.h>
15078 #ifdef HAVE_VFORK_H
15079 # include <vfork.h>
15080 #endif
15081 /* On some sparc systems, changes by the child to local and incoming
15082    argument registers are propagated back to the parent.  The compiler
15083    is told about this with #include <vfork.h>, but some compilers
15084    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15085    static variable whose address is put into a register that is
15086    clobbered by the vfork.  */
15087 static void
15088 #ifdef __cplusplus
15089 sparc_address_test (int arg)
15090 # else
15091 sparc_address_test (arg) int arg;
15092 #endif
15093 {
15094   static pid_t child;
15095   if (!child) {
15096     child = vfork ();
15097     if (child < 0) {
15098       perror ("vfork");
15099       _exit(2);
15100     }
15101     if (!child) {
15102       arg = getpid();
15103       write(-1, "", 0);
15104       _exit (arg);
15105     }
15106   }
15107 }
15108
15109 int
15110 main ()
15111 {
15112   pid_t parent = getpid ();
15113   pid_t child;
15114
15115   sparc_address_test (0);
15116
15117   child = vfork ();
15118
15119   if (child == 0) {
15120     /* Here is another test for sparc vfork register problems.  This
15121        test uses lots of local variables, at least as many local
15122        variables as main has allocated so far including compiler
15123        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15124        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15125        reuse the register of parent for one of the local variables,
15126        since it will think that parent can't possibly be used any more
15127        in this routine.  Assigning to the local variable will thus
15128        munge parent in the parent process.  */
15129     pid_t
15130       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15131       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15132     /* Convince the compiler that p..p7 are live; otherwise, it might
15133        use the same hardware register for all 8 local variables.  */
15134     if (p != p1 || p != p2 || p != p3 || p != p4
15135         || p != p5 || p != p6 || p != p7)
15136       _exit(1);
15137
15138     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15139        from child file descriptors.  If the child closes a descriptor
15140        before it execs or exits, this munges the parent's descriptor
15141        as well.  Test for this by closing stdout in the child.  */
15142     _exit(close(fileno(stdout)) != 0);
15143   } else {
15144     int status;
15145     struct stat st;
15146
15147     while (wait(&status) != child)
15148       ;
15149     return (
15150          /* Was there some problem with vforking?  */
15151          child < 0
15152
15153          /* Did the child fail?  (This shouldn't happen.)  */
15154          || status
15155
15156          /* Did the vfork/compiler bug occur?  */
15157          || parent != getpid()
15158
15159          /* Did the file descriptor bug occur?  */
15160          || fstat(fileno(stdout), &st) != 0
15161          );
15162   }
15163 }
15164 _ACEOF
15165 if ac_fn_c_try_run "$LINENO"; then :
15166   ac_cv_func_vfork_works=yes
15167 else
15168   ac_cv_func_vfork_works=no
15169 fi
15170 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15171   conftest.$ac_objext conftest.beam conftest.$ac_ext
15172 fi
15173
15174 fi
15175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15176 $as_echo "$ac_cv_func_vfork_works" >&6; }
15177
15178 fi;
15179 if test "x$ac_cv_func_fork_works" = xcross; then
15180   ac_cv_func_vfork_works=$ac_cv_func_vfork
15181   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15182 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15183 fi
15184
15185 if test "x$ac_cv_func_vfork_works" = xyes; then
15186
15187 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15188
15189 else
15190
15191 $as_echo "#define vfork fork" >>confdefs.h
15192
15193 fi
15194 if test "x$ac_cv_func_fork_works" = xyes; then
15195
15196 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
15197
15198 fi
15199
15200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
15201 $as_echo_n "checking return type of signal handlers... " >&6; }
15202 if ${ac_cv_type_signal+:} false; then :
15203   $as_echo_n "(cached) " >&6
15204 else
15205   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15206 /* end confdefs.h.  */
15207 #include <sys/types.h>
15208 #include <signal.h>
15209
15210 int
15211 main ()
15212 {
15213 return *(signal (0, 0)) (0) == 1;
15214   ;
15215   return 0;
15216 }
15217 _ACEOF
15218 if ac_fn_c_try_compile "$LINENO"; then :
15219   ac_cv_type_signal=int
15220 else
15221   ac_cv_type_signal=void
15222 fi
15223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15224 fi
15225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
15226 $as_echo "$ac_cv_type_signal" >&6; }
15227
15228 cat >>confdefs.h <<_ACEOF
15229 #define RETSIGTYPE $ac_cv_type_signal
15230 _ACEOF
15231
15232
15233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15234 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15235 if ${ac_cv_sys_largefile_source+:} false; then :
15236   $as_echo_n "(cached) " >&6
15237 else
15238   while :; do
15239   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15240 /* end confdefs.h.  */
15241 #include <sys/types.h> /* for off_t */
15242      #include <stdio.h>
15243 int
15244 main ()
15245 {
15246 int (*fp) (FILE *, off_t, int) = fseeko;
15247      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15248   ;
15249   return 0;
15250 }
15251 _ACEOF
15252 if ac_fn_c_try_link "$LINENO"; then :
15253   ac_cv_sys_largefile_source=no; break
15254 fi
15255 rm -f core conftest.err conftest.$ac_objext \
15256     conftest$ac_exeext conftest.$ac_ext
15257   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15258 /* end confdefs.h.  */
15259 #define _LARGEFILE_SOURCE 1
15260 #include <sys/types.h> /* for off_t */
15261      #include <stdio.h>
15262 int
15263 main ()
15264 {
15265 int (*fp) (FILE *, off_t, int) = fseeko;
15266      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15267   ;
15268   return 0;
15269 }
15270 _ACEOF
15271 if ac_fn_c_try_link "$LINENO"; then :
15272   ac_cv_sys_largefile_source=1; break
15273 fi
15274 rm -f core conftest.err conftest.$ac_objext \
15275     conftest$ac_exeext conftest.$ac_ext
15276   ac_cv_sys_largefile_source=unknown
15277   break
15278 done
15279 fi
15280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15281 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15282 case $ac_cv_sys_largefile_source in #(
15283   no | unknown) ;;
15284   *)
15285 cat >>confdefs.h <<_ACEOF
15286 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15287 _ACEOF
15288 ;;
15289 esac
15290 rm -rf conftest*
15291
15292 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15293 # in glibc 2.1.3, but that breaks too many other things.
15294 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15295 if test $ac_cv_sys_largefile_source != unknown; then
15296
15297 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15298
15299 fi
15300
15301
15302 # Check whether --enable-largefile was given.
15303 if test "${enable_largefile+set}" = set; then :
15304   enableval=$enable_largefile;
15305 fi
15306
15307 if test "$enable_largefile" != no; then
15308
15309   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15310 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15311 if ${ac_cv_sys_largefile_CC+:} false; then :
15312   $as_echo_n "(cached) " >&6
15313 else
15314   ac_cv_sys_largefile_CC=no
15315      if test "$GCC" != yes; then
15316        ac_save_CC=$CC
15317        while :; do
15318          # IRIX 6.2 and later do not support large files by default,
15319          # so use the C compiler's -n32 option if that helps.
15320          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15321 /* end confdefs.h.  */
15322 #include <sys/types.h>
15323  /* Check that off_t can represent 2**63 - 1 correctly.
15324     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15325     since some C++ compilers masquerading as C compilers
15326     incorrectly reject 9223372036854775807.  */
15327 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15328   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15329                        && LARGE_OFF_T % 2147483647 == 1)
15330                       ? 1 : -1];
15331 int
15332 main ()
15333 {
15334
15335   ;
15336   return 0;
15337 }
15338 _ACEOF
15339          if ac_fn_c_try_compile "$LINENO"; then :
15340   break
15341 fi
15342 rm -f core conftest.err conftest.$ac_objext
15343          CC="$CC -n32"
15344          if ac_fn_c_try_compile "$LINENO"; then :
15345   ac_cv_sys_largefile_CC=' -n32'; break
15346 fi
15347 rm -f core conftest.err conftest.$ac_objext
15348          break
15349        done
15350        CC=$ac_save_CC
15351        rm -f conftest.$ac_ext
15352     fi
15353 fi
15354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15355 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15356   if test "$ac_cv_sys_largefile_CC" != no; then
15357     CC=$CC$ac_cv_sys_largefile_CC
15358   fi
15359
15360   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15361 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15362 if ${ac_cv_sys_file_offset_bits+:} false; then :
15363   $as_echo_n "(cached) " >&6
15364 else
15365   while :; do
15366   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15367 /* end confdefs.h.  */
15368 #include <sys/types.h>
15369  /* Check that off_t can represent 2**63 - 1 correctly.
15370     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15371     since some C++ compilers masquerading as C compilers
15372     incorrectly reject 9223372036854775807.  */
15373 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15374   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15375                        && LARGE_OFF_T % 2147483647 == 1)
15376                       ? 1 : -1];
15377 int
15378 main ()
15379 {
15380
15381   ;
15382   return 0;
15383 }
15384 _ACEOF
15385 if ac_fn_c_try_compile "$LINENO"; then :
15386   ac_cv_sys_file_offset_bits=no; break
15387 fi
15388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15389   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15390 /* end confdefs.h.  */
15391 #define _FILE_OFFSET_BITS 64
15392 #include <sys/types.h>
15393  /* Check that off_t can represent 2**63 - 1 correctly.
15394     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15395     since some C++ compilers masquerading as C compilers
15396     incorrectly reject 9223372036854775807.  */
15397 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15398   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15399                        && LARGE_OFF_T % 2147483647 == 1)
15400                       ? 1 : -1];
15401 int
15402 main ()
15403 {
15404
15405   ;
15406   return 0;
15407 }
15408 _ACEOF
15409 if ac_fn_c_try_compile "$LINENO"; then :
15410   ac_cv_sys_file_offset_bits=64; break
15411 fi
15412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15413   ac_cv_sys_file_offset_bits=unknown
15414   break
15415 done
15416 fi
15417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15418 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15419 case $ac_cv_sys_file_offset_bits in #(
15420   no | unknown) ;;
15421   *)
15422 cat >>confdefs.h <<_ACEOF
15423 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15424 _ACEOF
15425 ;;
15426 esac
15427 rm -rf conftest*
15428   if test $ac_cv_sys_file_offset_bits = unknown; then
15429     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15430 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15431 if ${ac_cv_sys_large_files+:} false; then :
15432   $as_echo_n "(cached) " >&6
15433 else
15434   while :; do
15435   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15436 /* end confdefs.h.  */
15437 #include <sys/types.h>
15438  /* Check that off_t can represent 2**63 - 1 correctly.
15439     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15440     since some C++ compilers masquerading as C compilers
15441     incorrectly reject 9223372036854775807.  */
15442 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15443   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15444                        && LARGE_OFF_T % 2147483647 == 1)
15445                       ? 1 : -1];
15446 int
15447 main ()
15448 {
15449
15450   ;
15451   return 0;
15452 }
15453 _ACEOF
15454 if ac_fn_c_try_compile "$LINENO"; then :
15455   ac_cv_sys_large_files=no; break
15456 fi
15457 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15458   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15459 /* end confdefs.h.  */
15460 #define _LARGE_FILES 1
15461 #include <sys/types.h>
15462  /* Check that off_t can represent 2**63 - 1 correctly.
15463     We can't simply define LARGE_OFF_T to be 9223372036854775807,
15464     since some C++ compilers masquerading as C compilers
15465     incorrectly reject 9223372036854775807.  */
15466 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15467   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15468                        && LARGE_OFF_T % 2147483647 == 1)
15469                       ? 1 : -1];
15470 int
15471 main ()
15472 {
15473
15474   ;
15475   return 0;
15476 }
15477 _ACEOF
15478 if ac_fn_c_try_compile "$LINENO"; then :
15479   ac_cv_sys_large_files=1; break
15480 fi
15481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15482   ac_cv_sys_large_files=unknown
15483   break
15484 done
15485 fi
15486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15487 $as_echo "$ac_cv_sys_large_files" >&6; }
15488 case $ac_cv_sys_large_files in #(
15489   no | unknown) ;;
15490   *)
15491 cat >>confdefs.h <<_ACEOF
15492 #define _LARGE_FILES $ac_cv_sys_large_files
15493 _ACEOF
15494 ;;
15495 esac
15496 rm -rf conftest*
15497   fi
15498
15499
15500 fi
15501
15502
15503
15504
15505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC" >&5
15506 $as_echo_n "checking whether we need -D_LARGEFILE_SOURCE=1 as a flag for $CC... " >&6; }
15507 cache=_D_LARGEFILE_SOURCE_1
15508 if eval \${cv_prog_cc_flag_needed_$cache+:} false; then :
15509   $as_echo_n "(cached) " >&6
15510 else
15511
15512 echo '
15513 #include <stdio.h>
15514 int test() {
15515         int a = fseeko(stdin, 0, 0);
15516         return a;
15517 }
15518 ' > conftest.c
15519 echo 'void f(){}' >>conftest.c
15520 if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then
15521 eval "cv_prog_cc_flag_needed_$cache=no"
15522 else
15523
15524 if test -z "`$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`"; then
15525 eval "cv_prog_cc_flag_needed_$cache=yes"
15526 else
15527 eval "cv_prog_cc_flag_needed_$cache=fail"
15528 #echo 'Test with flag fails too!'
15529 #cat conftest.c
15530 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15531 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15532 #exit 1
15533 fi
15534
15535 fi
15536 rm -f conftest conftest.c conftest.o
15537
15538 fi
15539
15540 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
15541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15542 $as_echo "yes" >&6; }
15543 :
15544 CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE=1"
15545 else
15546 if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = no"; then
15547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15548 $as_echo "no" >&6; }
15549 #echo 'Test with flag is no!'
15550 #cat conftest.c
15551 #echo "$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1"
15552 #echo `$CC $CPPFLAGS $CFLAGS -D_LARGEFILE_SOURCE=1 $ERRFLAG -c conftest.c 2>&1`
15553 #exit 1
15554 :
15555
15556 else
15557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
15558 $as_echo "failed" >&6; }
15559 :
15560
15561 fi
15562 fi
15563
15564
15565
15566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nonblocking sockets work" >&5
15567 $as_echo_n "checking if nonblocking sockets work... " >&6; }
15568 if echo $target | grep mingw32 >/dev/null; then
15569         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (windows)" >&5
15570 $as_echo "no (windows)" >&6; }
15571
15572 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15573
15574 else
15575 if test "$cross_compiling" = yes; then :
15576
15577         { $as_echo "$as_me:${as_lineno-$LINENO}: result: crosscompile(yes)" >&5
15578 $as_echo "crosscompile(yes)" >&6; }
15579
15580 else
15581   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15582 /* end confdefs.h.  */
15583
15584
15585 #include <stdio.h>
15586 #include <string.h>
15587 #include <stdlib.h>
15588 #include <fcntl.h>
15589 #include <errno.h>
15590 #ifdef HAVE_SYS_TYPES_H
15591 #include <sys/types.h>
15592 #endif
15593 #ifdef HAVE_SYS_SOCKET_H
15594 #include <sys/socket.h>
15595 #endif
15596 #ifdef HAVE_NETINET_IN_H
15597 #include <netinet/in.h>
15598 #endif
15599 #ifdef HAVE_ARPA_INET_H
15600 #include <arpa/inet.h>
15601 #endif
15602 #ifdef HAVE_UNISTD_H
15603 #include <unistd.h>
15604 #endif
15605 #ifdef HAVE_TIME_H
15606 #include <time.h>
15607 #endif
15608
15609 int main(void)
15610 {
15611         int port;
15612         int sfd, cfd;
15613         int num = 10;
15614         int i, p;
15615         struct sockaddr_in a;
15616         /* test if select and nonblocking reads work well together */
15617         /* open port.
15618            fork child to send 10 messages.
15619            select to read.
15620            then try to nonblocking read the 10 messages
15621            then, nonblocking read must give EAGAIN
15622         */
15623
15624         port = 12345 + (time(0)%32);
15625         sfd = socket(PF_INET, SOCK_DGRAM, 0);
15626         if(sfd == -1) {
15627                 perror("socket");
15628                 return 1;
15629         }
15630         memset(&a, 0, sizeof(a));
15631         a.sin_family = AF_INET;
15632         a.sin_port = htons(port);
15633         a.sin_addr.s_addr = inet_addr("127.0.0.1");
15634         if(bind(sfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15635                 perror("bind");
15636                 return 1;
15637         }
15638         if(fcntl(sfd, F_SETFL, O_NONBLOCK) == -1) {
15639                 perror("fcntl");
15640                 return 1;
15641         }
15642
15643         cfd = socket(PF_INET, SOCK_DGRAM, 0);
15644         if(cfd == -1) {
15645                 perror("client socket");
15646                 return 1;
15647         }
15648         a.sin_port = 0;
15649         if(bind(cfd, (struct sockaddr*)&a, sizeof(a)) < 0) {
15650                 perror("client bind");
15651                 return 1;
15652         }
15653         a.sin_port = htons(port);
15654
15655         /* no handler, causes exit in 10 seconds */
15656         alarm(10);
15657
15658         /* send and receive on the socket */
15659         if((p=fork()) == 0) {
15660                 for(i=0; i<num; i++) {
15661                         if(sendto(cfd, &i, sizeof(i), 0,
15662                                 (struct sockaddr*)&a, sizeof(a)) < 0) {
15663                                 perror("sendto");
15664                                 return 1;
15665                         }
15666                 }
15667         } else {
15668                 /* parent */
15669                 fd_set rset;
15670                 int x;
15671                 if(p == -1) {
15672                         perror("fork");
15673                         return 1;
15674                 }
15675                 FD_ZERO(&rset);
15676                 FD_SET(sfd, &rset);
15677                 if(select(sfd+1, &rset, NULL, NULL, NULL) < 1) {
15678                         perror("select");
15679                         return 1;
15680                 }
15681                 i = 0;
15682                 while(i < num) {
15683                         if(recv(sfd, &x, sizeof(x), 0) != sizeof(x)) {
15684                                 if(errno == EAGAIN)
15685                                         continue;
15686                                 perror("recv");
15687                                 return 1;
15688                         }
15689                         i++;
15690                 }
15691                 /* now we want to get EAGAIN: nonblocking goodness */
15692                 errno = 0;
15693                 recv(sfd, &x, sizeof(x), 0);
15694                 if(errno != EAGAIN) {
15695                         perror("trying to recv again");
15696                         return 1;
15697                 }
15698                 /* EAGAIN encountered */
15699         }
15700
15701         close(sfd);
15702         close(cfd);
15703         return 0;
15704 }
15705
15706 _ACEOF
15707 if ac_fn_c_try_run "$LINENO"; then :
15708
15709         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15710 $as_echo "yes" >&6; }
15711
15712 else
15713
15714         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15715 $as_echo "no" >&6; }
15716
15717 $as_echo "#define NONBLOCKING_IS_BROKEN 1" >>confdefs.h
15718
15719
15720 fi
15721 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15722   conftest.$ac_objext conftest.beam conftest.$ac_ext
15723 fi
15724
15725 fi
15726
15727
15728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir has one arg" >&5
15729 $as_echo_n "checking whether mkdir has one arg... " >&6; }
15730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15731 /* end confdefs.h.  */
15732
15733 #include <stdio.h>
15734 #include <unistd.h>
15735 #ifdef HAVE_WINSOCK2_H
15736 #include <winsock2.h>
15737 #endif
15738 #ifdef HAVE_SYS_STAT_H
15739 #include <sys/stat.h>
15740 #endif
15741
15742 int
15743 main ()
15744 {
15745
15746         (void)mkdir("directory");
15747
15748   ;
15749   return 0;
15750 }
15751 _ACEOF
15752 if ac_fn_c_try_compile "$LINENO"; then :
15753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15754 $as_echo "yes" >&6; }
15755
15756 $as_echo "#define MKDIR_HAS_ONE_ARG 1" >>confdefs.h
15757
15758
15759 else
15760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15761 $as_echo "no" >&6; }
15762
15763 fi
15764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15765
15766 for ac_func in strptime
15767 do :
15768   ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
15769 if test "x$ac_cv_func_strptime" = xyes; then :
15770   cat >>confdefs.h <<_ACEOF
15771 #define HAVE_STRPTIME 1
15772 _ACEOF
15773
15774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strptime works" >&5
15775 $as_echo_n "checking whether strptime works... " >&6; }
15776 if test c${cross_compiling} = cno; then
15777 if test "$cross_compiling" = yes; then :
15778   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15779 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15780 as_fn_error $? "cannot run test program while cross compiling
15781 See \`config.log' for more details" "$LINENO" 5; }
15782 else
15783   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15784 /* end confdefs.h.  */
15785
15786 #define _XOPEN_SOURCE 600
15787 #include <time.h>
15788 int main(void) { struct tm tm; char *res;
15789 res = strptime("2010-07-15T00:00:00+00:00", "%t%Y%t-%t%m%t-%t%d%tT%t%H%t:%t%M%t:%t%S%t", &tm);
15790 if (!res) return 2;
15791 res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
15792 if (!res) return 1; return 0; }
15793
15794 _ACEOF
15795 if ac_fn_c_try_run "$LINENO"; then :
15796   eval "ac_cv_c_strptime_works=yes"
15797 else
15798   eval "ac_cv_c_strptime_works=no"
15799 fi
15800 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15801   conftest.$ac_objext conftest.beam conftest.$ac_ext
15802 fi
15803
15804 else
15805 eval "ac_cv_c_strptime_works=maybe"
15806 fi
15807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_strptime_works" >&5
15808 $as_echo "$ac_cv_c_strptime_works" >&6; }
15809 if test $ac_cv_c_strptime_works = no; then
15810 case " $LIBOBJS " in
15811   *" strptime.$ac_objext "* ) ;;
15812   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15813  ;;
15814 esac
15815
15816 else
15817
15818 cat >>confdefs.h <<_ACEOF
15819 #define STRPTIME_WORKS 1
15820 _ACEOF
15821
15822 fi
15823
15824 else
15825   case " $LIBOBJS " in
15826   *" strptime.$ac_objext "* ) ;;
15827   *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
15828  ;;
15829 esac
15830
15831 fi
15832 done
15833
15834
15835 # set memory allocation checking if requested
15836 # Check whether --enable-alloc-checks was given.
15837 if test "${enable_alloc_checks+set}" = set; then :
15838   enableval=$enable_alloc_checks;
15839 fi
15840
15841 # Check whether --enable-alloc-lite was given.
15842 if test "${enable_alloc_lite+set}" = set; then :
15843   enableval=$enable_alloc_lite;
15844 fi
15845
15846 # Check whether --enable-alloc-nonregional was given.
15847 if test "${enable_alloc_nonregional+set}" = set; then :
15848   enableval=$enable_alloc_nonregional;
15849 fi
15850
15851 if test x_$enable_alloc_nonregional = x_yes; then
15852
15853 $as_echo "#define UNBOUND_ALLOC_NONREGIONAL 1" >>confdefs.h
15854
15855 fi
15856 if test x_$enable_alloc_checks = x_yes; then
15857
15858 $as_echo "#define UNBOUND_ALLOC_STATS 1" >>confdefs.h
15859
15860 else
15861         if test x_$enable_alloc_lite = x_yes; then
15862
15863 $as_echo "#define UNBOUND_ALLOC_LITE 1" >>confdefs.h
15864
15865         else
15866
15867         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15868 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15869         if test "$cross_compiling" = yes; then :
15870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (crosscompile)" >&5
15871 $as_echo "no (crosscompile)" >&6; }
15872         case " $LIBOBJS " in
15873   *" malloc.$ac_objext "* ) ;;
15874   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15875  ;;
15876 esac
15877
15878
15879 cat >>confdefs.h <<_ACEOF
15880 #define malloc rpl_malloc_unbound
15881 _ACEOF
15882
15883 else
15884   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15885 /* end confdefs.h.  */
15886 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
15887 #include <stdlib.h>
15888 #else
15889 char *malloc ();
15890 #endif
15891
15892 int
15893 main ()
15894 {
15895  if(malloc(0) != 0) return 1;
15896   ;
15897   return 0;
15898 }
15899
15900 _ACEOF
15901 if ac_fn_c_try_run "$LINENO"; then :
15902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15903 $as_echo "no" >&6; }
15904         case " $LIBOBJS " in
15905   *" malloc.$ac_objext "* ) ;;
15906   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
15907  ;;
15908 esac
15909
15910
15911 cat >>confdefs.h <<_ACEOF
15912 #define malloc rpl_malloc_unbound
15913 _ACEOF
15914
15915 else
15916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15917 $as_echo "yes" >&6; }
15918
15919 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
15920
15921 fi
15922 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15923   conftest.$ac_objext conftest.beam conftest.$ac_ext
15924 fi
15925
15926
15927         fi
15928 fi
15929
15930 # check windows threads (we use them, not pthreads, on windows).
15931 if test "$on_mingw" = "yes"; then
15932 # check windows threads
15933         for ac_header in windows.h
15934 do :
15935   ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
15936 "
15937 if test "x$ac_cv_header_windows_h" = xyes; then :
15938   cat >>confdefs.h <<_ACEOF
15939 #define HAVE_WINDOWS_H 1
15940 _ACEOF
15941
15942 fi
15943
15944 done
15945
15946         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateThread" >&5
15947 $as_echo_n "checking for CreateThread... " >&6; }
15948         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15949 /* end confdefs.h.  */
15950
15951 #ifdef HAVE_WINDOWS_H
15952 #include <windows.h>
15953 #endif
15954
15955 int
15956 main ()
15957 {
15958
15959         HANDLE t = CreateThread(NULL, 0, NULL, NULL, 0, NULL);
15960
15961   ;
15962   return 0;
15963 }
15964 _ACEOF
15965 if ac_fn_c_try_compile "$LINENO"; then :
15966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15967 $as_echo "yes" >&6; }
15968
15969 $as_echo "#define HAVE_WINDOWS_THREADS 1" >>confdefs.h
15970
15971
15972 else
15973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15974 $as_echo "no" >&6; }
15975
15976 fi
15977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15978
15979 else
15980 # not on mingw, check thread libraries.
15981
15982 # check for thread library.
15983 # check this first, so that the pthread lib does not get linked in via
15984 # libssl or libpython, and thus distorts the tests, and we end up using
15985 # the non-threadsafe C libraries.
15986
15987 # Check whether --with-pthreads was given.
15988 if test "${with_pthreads+set}" = set; then :
15989   withval=$with_pthreads;
15990 else
15991    withval="yes"
15992 fi
15993
15994 ub_have_pthreads=no
15995 if test x_$withval != x_no; then
15996
15997
15998 ac_ext=c
15999 ac_cpp='$CPP $CPPFLAGS'
16000 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16001 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16002 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16003
16004 ax_pthread_ok=no
16005
16006 # We used to check for pthread.h first, but this fails if pthread.h
16007 # requires special compiler flags (e.g. on True64 or Sequent).
16008 # It gets checked for in the link test anyway.
16009
16010 # First of all, check if the user has set any of the PTHREAD_LIBS,
16011 # etcetera environment variables, and if threads linking works using
16012 # them:
16013 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16014         save_CFLAGS="$CFLAGS"
16015         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16016         save_LIBS="$LIBS"
16017         LIBS="$PTHREAD_LIBS $LIBS"
16018         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16019 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
16020         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16021 /* end confdefs.h.  */
16022
16023 /* Override any GCC internal prototype to avoid an error.
16024    Use char because int might match the return type of a GCC
16025    builtin and then its argument prototype would still apply.  */
16026 #ifdef __cplusplus
16027 extern "C"
16028 #endif
16029 char pthread_join ();
16030 int
16031 main ()
16032 {
16033 return pthread_join ();
16034   ;
16035   return 0;
16036 }
16037 _ACEOF
16038 if ac_fn_c_try_link "$LINENO"; then :
16039   ax_pthread_ok=yes
16040 fi
16041 rm -f core conftest.err conftest.$ac_objext \
16042     conftest$ac_exeext conftest.$ac_ext
16043         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16044 $as_echo "$ax_pthread_ok" >&6; }
16045         if test x"$ax_pthread_ok" = xno; then
16046                 PTHREAD_LIBS=""
16047                 PTHREAD_CFLAGS=""
16048         fi
16049         LIBS="$save_LIBS"
16050         CFLAGS="$save_CFLAGS"
16051 fi
16052
16053 # We must check for the threads library under a number of different
16054 # names; the ordering is very important because some systems
16055 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16056 # libraries is broken (non-POSIX).
16057
16058 # Create a list of thread flags to try.  Items starting with a "-" are
16059 # C compiler flags, and other items are library names, except for "none"
16060 # which indicates that we try without any flags at all, and "pthread-config"
16061 # which is a program returning the flags for the Pth emulation library.
16062
16063 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
16064
16065 # The ordering *is* (sometimes) important.  Some notes on the
16066 # individual items follow:
16067
16068 # pthreads: AIX (must check this before -lpthread)
16069 # none: in case threads are in libc; should be tried before -Kthread and
16070 #       other compiler flags to prevent continual compiler warnings
16071 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16072 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16073 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16074 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16075 # -pthreads: Solaris/gcc
16076 # -mthreads: Mingw32/gcc, Lynx/gcc
16077 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16078 #      doesn't hurt to check since this sometimes defines pthreads too;
16079 #      also defines -D_REENTRANT)
16080 #      ... -mt is also the pthreads flag for HP/aCC
16081 # pthread: Linux, etcetera
16082 # --thread-safe: KAI C++
16083 # pthread-config: use pthread-config program (for GNU Pth library)
16084
16085 case ${host_os} in
16086         solaris*)
16087
16088         # On Solaris (at least, for some versions), libc contains stubbed
16089         # (non-functional) versions of the pthreads routines, so link-based
16090         # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
16091         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16092         # a function called by this macro, so we could check for that, but
16093         # who knows whether they'll stub that too in a future libc.)  So,
16094         # we'll just look for -pthreads and -lpthread first:
16095
16096         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
16097         ;;
16098
16099         darwin*)
16100         ax_pthread_flags="-pthread $ax_pthread_flags"
16101         ;;
16102 esac
16103
16104 # Clang doesn't consider unrecognized options an error unless we specify
16105 # -Werror. We throw in some extra Clang-specific options to ensure that
16106 # this doesn't happen for GCC, which also accepts -Werror.
16107
16108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
16109 $as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
16110 save_CFLAGS="$CFLAGS"
16111 ax_pthread_extra_flags="-Werror"
16112 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
16113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16114 /* end confdefs.h.  */
16115 int foo(void);
16116 int
16117 main ()
16118 {
16119 foo()
16120   ;
16121   return 0;
16122 }
16123 _ACEOF
16124 if ac_fn_c_try_compile "$LINENO"; then :
16125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16126 $as_echo "yes" >&6; }
16127 else
16128   ax_pthread_extra_flags=
16129                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16130 $as_echo "no" >&6; }
16131 fi
16132 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16133 CFLAGS="$save_CFLAGS"
16134
16135 if test x"$ax_pthread_ok" = xno; then
16136 for flag in $ax_pthread_flags; do
16137
16138         case $flag in
16139                 none)
16140                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
16141 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
16142                 ;;
16143
16144                 -*)
16145                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
16146 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
16147                 PTHREAD_CFLAGS="$flag"
16148                 ;;
16149
16150                 pthread-config)
16151                 # Extract the first word of "pthread-config", so it can be a program name with args.
16152 set dummy pthread-config; ac_word=$2
16153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16154 $as_echo_n "checking for $ac_word... " >&6; }
16155 if ${ac_cv_prog_ax_pthread_config+:} false; then :
16156   $as_echo_n "(cached) " >&6
16157 else
16158   if test -n "$ax_pthread_config"; then
16159   ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
16160 else
16161 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16162 for as_dir in $PATH
16163 do
16164   IFS=$as_save_IFS
16165   test -z "$as_dir" && as_dir=.
16166     for ac_exec_ext in '' $ac_executable_extensions; do
16167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16168     ac_cv_prog_ax_pthread_config="yes"
16169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16170     break 2
16171   fi
16172 done
16173   done
16174 IFS=$as_save_IFS
16175
16176   test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
16177 fi
16178 fi
16179 ax_pthread_config=$ac_cv_prog_ax_pthread_config
16180 if test -n "$ax_pthread_config"; then
16181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
16182 $as_echo "$ax_pthread_config" >&6; }
16183 else
16184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16185 $as_echo "no" >&6; }
16186 fi
16187
16188
16189                 if test x"$ax_pthread_config" = xno; then continue; fi
16190                 PTHREAD_CFLAGS="`pthread-config --cflags`"
16191                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16192                 ;;
16193
16194                 *)
16195                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
16196 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
16197                 PTHREAD_LIBS="-l$flag"
16198                 ;;
16199         esac
16200
16201         save_LIBS="$LIBS"
16202         save_CFLAGS="$CFLAGS"
16203         LIBS="$PTHREAD_LIBS $LIBS"
16204         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
16205
16206         # Check for various functions.  We must include pthread.h,
16207         # since some functions may be macros.  (On the Sequent, we
16208         # need a special flag -Kthread to make this header compile.)
16209         # We check for pthread_join because it is in -lpthread on IRIX
16210         # while pthread_create is in libc.  We check for pthread_attr_init
16211         # due to DEC craziness with -lpthreads.  We check for
16212         # pthread_cleanup_push because it is one of the few pthread
16213         # functions on Solaris that doesn't have a non-functional libc stub.
16214         # We try pthread_create on general principles.
16215         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16216 /* end confdefs.h.  */
16217 #include <pthread.h>
16218                         static void routine(void *a) { *((int*)a) = 0; }
16219                         static void *start_routine(void *a) { return a; }
16220 int
16221 main ()
16222 {
16223 pthread_t th; pthread_attr_t attr;
16224                         pthread_create(&th, 0, start_routine, 0);
16225                         pthread_join(th, 0);
16226                         pthread_attr_init(&attr);
16227                         pthread_cleanup_push(routine, 0);
16228                         pthread_cleanup_pop(0) /* ; */
16229   ;
16230   return 0;
16231 }
16232 _ACEOF
16233 if ac_fn_c_try_link "$LINENO"; then :
16234   ax_pthread_ok=yes
16235 fi
16236 rm -f core conftest.err conftest.$ac_objext \
16237     conftest$ac_exeext conftest.$ac_ext
16238
16239         LIBS="$save_LIBS"
16240         CFLAGS="$save_CFLAGS"
16241
16242         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
16243 $as_echo "$ax_pthread_ok" >&6; }
16244         if test "x$ax_pthread_ok" = xyes; then
16245                 break;
16246         fi
16247
16248         PTHREAD_LIBS=""
16249         PTHREAD_CFLAGS=""
16250 done
16251 fi
16252
16253 # Various other checks:
16254 if test "x$ax_pthread_ok" = xyes; then
16255         save_LIBS="$LIBS"
16256         LIBS="$PTHREAD_LIBS $LIBS"
16257         save_CFLAGS="$CFLAGS"
16258         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16259
16260         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
16261         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
16262 $as_echo_n "checking for joinable pthread attribute... " >&6; }
16263         attr_name=unknown
16264         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
16265             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16266 /* end confdefs.h.  */
16267 #include <pthread.h>
16268 int
16269 main ()
16270 {
16271 int attr = $attr; return attr /* ; */
16272   ;
16273   return 0;
16274 }
16275 _ACEOF
16276 if ac_fn_c_try_link "$LINENO"; then :
16277   attr_name=$attr; break
16278 fi
16279 rm -f core conftest.err conftest.$ac_objext \
16280     conftest$ac_exeext conftest.$ac_ext
16281         done
16282         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
16283 $as_echo "$attr_name" >&6; }
16284         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
16285
16286 cat >>confdefs.h <<_ACEOF
16287 #define PTHREAD_CREATE_JOINABLE $attr_name
16288 _ACEOF
16289
16290         fi
16291
16292         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
16293 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
16294         flag=no
16295         case ${host_os} in
16296             aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
16297             osf* | hpux*) flag="-D_REENTRANT";;
16298             solaris*)
16299             if test "$GCC" = "yes"; then
16300                 flag="-D_REENTRANT"
16301             else
16302                 # TODO: What about Clang on Solaris?
16303                 flag="-mt -D_REENTRANT"
16304             fi
16305             ;;
16306         esac
16307         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
16308 $as_echo "$flag" >&6; }
16309         if test "x$flag" != xno; then
16310             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16311         fi
16312
16313         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
16314 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
16315 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
16316   $as_echo_n "(cached) " >&6
16317 else
16318
16319                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16320 /* end confdefs.h.  */
16321 #include <pthread.h>
16322 int
16323 main ()
16324 {
16325 int i = PTHREAD_PRIO_INHERIT;
16326   ;
16327   return 0;
16328 }
16329 _ACEOF
16330 if ac_fn_c_try_link "$LINENO"; then :
16331   ax_cv_PTHREAD_PRIO_INHERIT=yes
16332 else
16333   ax_cv_PTHREAD_PRIO_INHERIT=no
16334 fi
16335 rm -f core conftest.err conftest.$ac_objext \
16336     conftest$ac_exeext conftest.$ac_ext
16337
16338 fi
16339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
16340 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
16341         if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
16342
16343 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
16344
16345 fi
16346
16347         LIBS="$save_LIBS"
16348         CFLAGS="$save_CFLAGS"
16349
16350         # More AIX lossage: compile with *_r variant
16351         if test "x$GCC" != xyes; then
16352             case $host_os in
16353                 aix*)
16354                 case "x/$CC" in #(
16355   x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
16356     #handle absolute path differently from PATH based program lookup
16357                    case "x$CC" in #(
16358   x/*) :
16359     if as_fn_executable_p ${CC}_r; then :
16360   PTHREAD_CC="${CC}_r"
16361 fi ;; #(
16362   *) :
16363     for ac_prog in ${CC}_r
16364 do
16365   # Extract the first word of "$ac_prog", so it can be a program name with args.
16366 set dummy $ac_prog; ac_word=$2
16367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16368 $as_echo_n "checking for $ac_word... " >&6; }
16369 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
16370   $as_echo_n "(cached) " >&6
16371 else
16372   if test -n "$PTHREAD_CC"; then
16373   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16374 else
16375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16376 for as_dir in $PATH
16377 do
16378   IFS=$as_save_IFS
16379   test -z "$as_dir" && as_dir=.
16380     for ac_exec_ext in '' $ac_executable_extensions; do
16381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16382     ac_cv_prog_PTHREAD_CC="$ac_prog"
16383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16384     break 2
16385   fi
16386 done
16387   done
16388 IFS=$as_save_IFS
16389
16390 fi
16391 fi
16392 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16393 if test -n "$PTHREAD_CC"; then
16394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
16395 $as_echo "$PTHREAD_CC" >&6; }
16396 else
16397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16398 $as_echo "no" >&6; }
16399 fi
16400
16401
16402   test -n "$PTHREAD_CC" && break
16403 done
16404 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16405  ;;
16406 esac ;; #(
16407   *) :
16408      ;;
16409 esac
16410                 ;;
16411             esac
16412         fi
16413 fi
16414
16415 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
16416
16417
16418
16419
16420
16421 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16422 if test x"$ax_pthread_ok" = xyes; then
16423
16424
16425 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
16426
16427                 LIBS="$PTHREAD_LIBS $LIBS"
16428                 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16429                 CC="$PTHREAD_CC"
16430                 ub_have_pthreads=yes
16431                 ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "#include <pthread.h>
16432 "
16433 if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
16434
16435 cat >>confdefs.h <<_ACEOF
16436 #define HAVE_PTHREAD_SPINLOCK_T 1
16437 _ACEOF
16438
16439
16440 fi
16441 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
16442 "
16443 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
16444
16445 cat >>confdefs.h <<_ACEOF
16446 #define HAVE_PTHREAD_RWLOCK_T 1
16447 _ACEOF
16448
16449
16450 fi
16451
16452
16453                 if echo "$CFLAGS" | $GREP -e "-pthread" >/dev/null; then
16454                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread unused during linking" >&5
16455 $as_echo_n "checking if -pthread unused during linking... " >&6; }
16456                 # catch clang warning 'argument unused during compilation'
16457                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16458 /* end confdefs.h.  */
16459 $ac_includes_default
16460
16461 int main(void) {return 0;}
16462
16463 _ACEOF
16464                 pthread_unused="yes"
16465                 # first compile
16466                 echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&5
16467                 $CC $CFLAGS -c conftest.c -o conftest.o 2>&5 >&5
16468                 if test $? = 0; then
16469                         # then link
16470                         echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&5
16471                         $CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&5 >&5
16472                         if test $? -ne 0; then
16473                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16474 $as_echo "yes" >&6; }
16475                                 CFLAGS=`echo "$CFLAGS" | sed -e 's/-pthread//'`
16476                                 PTHREAD_CFLAGS_ONLY="-pthread"
16477
16478                         else
16479                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16480 $as_echo "no" >&6; }
16481                         fi
16482                 else
16483                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16484 $as_echo "no" >&6; }
16485                 fi # endif cc successful
16486                 rm -f conftest conftest.c conftest.o
16487                 fi # endif -pthread in CFLAGS
16488
16489
16490         :
16491 else
16492         ax_pthread_ok=no
16493
16494 fi
16495 ac_ext=c
16496 ac_cpp='$CPP $CPPFLAGS'
16497 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16498 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16499 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16500
16501
16502 fi
16503
16504 # check solaris thread library
16505
16506 # Check whether --with-solaris-threads was given.
16507 if test "${with_solaris_threads+set}" = set; then :
16508   withval=$with_solaris_threads;
16509 else
16510    withval="no"
16511 fi
16512
16513 ub_have_sol_threads=no
16514 if test x_$withval != x_no; then
16515         if test x_$ub_have_pthreads != x_no; then
16516             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&5
16517 $as_echo "$as_me: WARNING: Have pthreads already, ignoring --with-solaris-threads" >&2;}
16518         else
16519         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing thr_create" >&5
16520 $as_echo_n "checking for library containing thr_create... " >&6; }
16521 if ${ac_cv_search_thr_create+:} false; then :
16522   $as_echo_n "(cached) " >&6
16523 else
16524   ac_func_search_save_LIBS=$LIBS
16525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16526 /* end confdefs.h.  */
16527
16528 /* Override any GCC internal prototype to avoid an error.
16529    Use char because int might match the return type of a GCC
16530    builtin and then its argument prototype would still apply.  */
16531 #ifdef __cplusplus
16532 extern "C"
16533 #endif
16534 char thr_create ();
16535 int
16536 main ()
16537 {
16538 return thr_create ();
16539   ;
16540   return 0;
16541 }
16542 _ACEOF
16543 for ac_lib in '' thread; do
16544   if test -z "$ac_lib"; then
16545     ac_res="none required"
16546   else
16547     ac_res=-l$ac_lib
16548     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16549   fi
16550   if ac_fn_c_try_link "$LINENO"; then :
16551   ac_cv_search_thr_create=$ac_res
16552 fi
16553 rm -f core conftest.err conftest.$ac_objext \
16554     conftest$ac_exeext
16555   if ${ac_cv_search_thr_create+:} false; then :
16556   break
16557 fi
16558 done
16559 if ${ac_cv_search_thr_create+:} false; then :
16560
16561 else
16562   ac_cv_search_thr_create=no
16563 fi
16564 rm conftest.$ac_ext
16565 LIBS=$ac_func_search_save_LIBS
16566 fi
16567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_thr_create" >&5
16568 $as_echo "$ac_cv_search_thr_create" >&6; }
16569 ac_res=$ac_cv_search_thr_create
16570 if test "$ac_res" != no; then :
16571   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16572
16573
16574 $as_echo "#define HAVE_SOLARIS_THREADS 1" >>confdefs.h
16575
16576
16577
16578
16579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mt" >&5
16580 $as_echo_n "checking whether $CC supports -mt... " >&6; }
16581 cache=`echo mt | sed 'y%.=/+-%___p_%'`
16582 if eval \${cv_prog_cc_flag_$cache+:} false; then :
16583   $as_echo_n "(cached) " >&6
16584 else
16585
16586 echo 'void f(void){}' >conftest.c
16587 if test -z "`$CC $CPPFLAGS $CFLAGS -mt -c conftest.c 2>&1`"; then
16588 eval "cv_prog_cc_flag_$cache=yes"
16589 else
16590 eval "cv_prog_cc_flag_$cache=no"
16591 fi
16592 rm -f conftest conftest.o conftest.c
16593
16594 fi
16595
16596 if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
16597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16598 $as_echo "yes" >&6; }
16599 :
16600 CFLAGS="$CFLAGS -mt"
16601 else
16602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16603 $as_echo "no" >&6; }
16604 :
16605 CFLAGS="$CFLAGS -D_REENTRANT"
16606 fi
16607
16608                 ub_have_sol_threads=yes
16609
16610 else
16611
16612                 as_fn_error $? "no solaris threads found." "$LINENO" 5
16613
16614 fi
16615
16616         fi
16617 fi
16618
16619 fi # end of non-mingw check of thread libraries
16620
16621 # Check for PyUnbound
16622
16623 # Check whether --with-pyunbound was given.
16624 if test "${with_pyunbound+set}" = set; then :
16625   withval=$with_pyunbound;
16626 else
16627    withval="no"
16628 fi
16629
16630
16631 ub_test_python=no
16632 ub_with_pyunbound=no
16633 if test x_$withval != x_no; then
16634    ub_with_pyunbound=yes
16635    ub_test_python=yes
16636 fi
16637
16638 # Check for Python module
16639
16640 # Check whether --with-pythonmodule was given.
16641 if test "${with_pythonmodule+set}" = set; then :
16642   withval=$with_pythonmodule;
16643 else
16644    withval="no"
16645 fi
16646
16647
16648 ub_with_pythonmod=no
16649 if test x_$withval != x_no; then
16650    ub_with_pythonmod=yes
16651    ub_test_python=yes
16652 fi
16653
16654 # Check for Python & SWIG only on PyUnbound or PyModule
16655 if test x_$ub_test_python != x_no; then
16656
16657    # Check for Python
16658    ub_have_python=no
16659    ac_save_LIBS="$LIBS"
16660         #
16661         # Allow the use of a (user set) custom python version
16662         #
16663
16664
16665         # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
16666 set dummy python$PYTHON_VERSION; ac_word=$2
16667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16668 $as_echo_n "checking for $ac_word... " >&6; }
16669 if ${ac_cv_path_PYTHON+:} false; then :
16670   $as_echo_n "(cached) " >&6
16671 else
16672   case $PYTHON in
16673   [\\/]* | ?:[\\/]*)
16674   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
16675   ;;
16676   *)
16677   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16678 for as_dir in $PATH
16679 do
16680   IFS=$as_save_IFS
16681   test -z "$as_dir" && as_dir=.
16682     for ac_exec_ext in '' $ac_executable_extensions; do
16683   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16684     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
16685     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16686     break 2
16687   fi
16688 done
16689   done
16690 IFS=$as_save_IFS
16691
16692   ;;
16693 esac
16694 fi
16695 PYTHON=$ac_cv_path_PYTHON
16696 if test -n "$PYTHON"; then
16697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
16698 $as_echo "$PYTHON" >&6; }
16699 else
16700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16701 $as_echo "no" >&6; }
16702 fi
16703
16704
16705         if test -z "$PYTHON"; then
16706            as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
16707            PYTHON_VERSION=""
16708         fi
16709
16710         if test -z "$PYTHON_VERSION"; then
16711                 PYTHON_VERSION=`$PYTHON -c "import sys; \
16712                         print(sys.version.split()[0])"`
16713         fi
16714
16715         #
16716         # Check if you have distutils, else fail
16717         #
16718         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
16719 $as_echo_n "checking for the distutils Python package... " >&6; }
16720         ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
16721         if test -z "$ac_distutils_result"; then
16722                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16723 $as_echo "yes" >&6; }
16724         else
16725                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16726 $as_echo "no" >&6; }
16727                 as_fn_error $? "cannot import Python module \"distutils\".
16728 Please check your Python installation. The error was:
16729 $ac_distutils_result" "$LINENO" 5
16730                 PYTHON_VERSION=""
16731         fi
16732
16733         #
16734         # Check for Python include path
16735         #
16736         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
16737 $as_echo_n "checking for Python include path... " >&6; }
16738         if test -z "$PYTHON_CPPFLAGS"; then
16739                 python_path=`$PYTHON -c "import distutils.sysconfig; \
16740                         print(distutils.sysconfig.get_python_inc());"`
16741                 if test -n "${python_path}"; then
16742                         python_path="-I$python_path"
16743                 fi
16744                 PYTHON_CPPFLAGS=$python_path
16745         fi
16746         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
16747 $as_echo "$PYTHON_CPPFLAGS" >&6; }
16748
16749
16750         #
16751         # Check for Python library path
16752         #
16753         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
16754 $as_echo_n "checking for Python library path... " >&6; }
16755         if test -z "$PYTHON_LDFLAGS"; then
16756                 PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
16757                         print('-L'+get_config_var('LIBDIR')+' -L'+get_config_var('LIBDEST')+' '+get_config_var('BLDLIBRARY'));"`
16758         fi
16759         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
16760 $as_echo "$PYTHON_LDFLAGS" >&6; }
16761
16762
16763         #
16764         # Check for site packages
16765         #
16766         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
16767 $as_echo_n "checking for Python site-packages path... " >&6; }
16768         if test -z "$PYTHON_SITE_PKG"; then
16769                 PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
16770                         print(distutils.sysconfig.get_python_lib(1,0));"`
16771         fi
16772         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
16773 $as_echo "$PYTHON_SITE_PKG" >&6; }
16774
16775
16776         #
16777         # final check to see if everything compiles alright
16778         #
16779         { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
16780 $as_echo_n "checking consistency of all components of python development environment... " >&6; }
16781         ac_ext=c
16782 ac_cpp='$CPP $CPPFLAGS'
16783 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16784 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16785 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16786
16787         # save current global flags
16788         ac_save_LIBS="$LIBS"
16789         ac_save_CPPFLAGS="$CPPFLAGS"
16790
16791         LIBS="$LIBS $PYTHON_LDFLAGS"
16792         CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16793         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16794 /* end confdefs.h.  */
16795
16796                 #include <Python.h>
16797
16798 int
16799 main ()
16800 {
16801
16802                 Py_Initialize();
16803
16804   ;
16805   return 0;
16806 }
16807 _ACEOF
16808 if ac_fn_c_try_link "$LINENO"; then :
16809   pythonexists=yes
16810 else
16811   pythonexists=no
16812 fi
16813 rm -f core conftest.err conftest.$ac_objext \
16814     conftest$ac_exeext conftest.$ac_ext
16815
16816         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
16817 $as_echo "$pythonexists" >&6; }
16818
16819         if test ! "$pythonexists" = "yes"; then
16820            as_fn_error $? "
16821   Could not link test program to Python. Maybe the main Python library has been
16822   installed in some non-standard library path. If so, pass it to configure,
16823   via the LDFLAGS environment variable.
16824   Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
16825   ============================================================================
16826    ERROR!
16827    You probably have to install the development version of the Python package
16828    for your distribution.  The exact name of this package varies among them.
16829   ============================================================================
16830            " "$LINENO" 5
16831           PYTHON_VERSION=""
16832         fi
16833         ac_ext=c
16834 ac_cpp='$CPP $CPPFLAGS'
16835 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16836 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16837 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16838
16839         # turn back to default flags
16840         CPPFLAGS="$ac_save_CPPFLAGS"
16841         LIBS="$ac_save_LIBS"
16842
16843         #
16844         # all done!
16845         #
16846
16847    if test ! -z "$PYTHON_VERSION"; then
16848         if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then
16849                 as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5
16850         fi
16851
16852       PY_MAJOR_VERSION="`$PYTHON -c \"import sys; print(sys.version_info[0])\"`"
16853
16854       # Have Python
16855
16856 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
16857
16858       LIBS="$PYTHON_LDFLAGS $LIBS"
16859       CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16860       ub_have_python=yes
16861       PC_PY_DEPENDENCY="python"
16862
16863
16864       # Check for SWIG
16865       ub_have_swig=no
16866
16867         # Extract the first word of "swig", so it can be a program name with args.
16868 set dummy swig; ac_word=$2
16869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16870 $as_echo_n "checking for $ac_word... " >&6; }
16871 if ${ac_cv_path_SWIG+:} false; then :
16872   $as_echo_n "(cached) " >&6
16873 else
16874   case $SWIG in
16875   [\\/]* | ?:[\\/]*)
16876   ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
16877   ;;
16878   *)
16879   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16880 for as_dir in $PATH
16881 do
16882   IFS=$as_save_IFS
16883   test -z "$as_dir" && as_dir=.
16884     for ac_exec_ext in '' $ac_executable_extensions; do
16885   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16886     ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
16887     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16888     break 2
16889   fi
16890 done
16891   done
16892 IFS=$as_save_IFS
16893
16894   ;;
16895 esac
16896 fi
16897 SWIG=$ac_cv_path_SWIG
16898 if test -n "$SWIG"; then
16899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
16900 $as_echo "$SWIG" >&6; }
16901 else
16902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16903 $as_echo "no" >&6; }
16904 fi
16905
16906
16907         if test -z "$SWIG" ; then
16908                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
16909 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
16910                 SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
16911         elif test -n "" ; then
16912                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5
16913 $as_echo_n "checking for SWIG version... " >&6; }
16914                 swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`
16915                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
16916 $as_echo "$swig_version" >&6; }
16917                 if test -n "$swig_version" ; then
16918                         # Calculate the required version number components
16919                         required=
16920                         required_major=`echo $required | sed 's/[^0-9].*//'`
16921                         if test -z "$required_major" ; then
16922                                 required_major=0
16923                         fi
16924                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
16925                         required_minor=`echo $required | sed 's/[^0-9].*//'`
16926                         if test -z "$required_minor" ; then
16927                                 required_minor=0
16928                         fi
16929                         required=`echo $required | sed 's/[0-9]*[^0-9]//'`
16930                         required_patch=`echo $required | sed 's/[^0-9].*//'`
16931                         if test -z "$required_patch" ; then
16932                                 required_patch=0
16933                         fi
16934                         # Calculate the available version number components
16935                         available=$swig_version
16936                         available_major=`echo $available | sed 's/[^0-9].*//'`
16937                         if test -z "$available_major" ; then
16938                                 available_major=0
16939                         fi
16940                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
16941                         available_minor=`echo $available | sed 's/[^0-9].*//'`
16942                         if test -z "$available_minor" ; then
16943                                 available_minor=0
16944                         fi
16945                         available=`echo $available | sed 's/[0-9]*[^0-9]//'`
16946                         available_patch=`echo $available | sed 's/[^0-9].*//'`
16947                         if test -z "$available_patch" ; then
16948                                 available_patch=0
16949                         fi
16950                         if test $available_major -ne $required_major \
16951                                 -o $available_minor -ne $required_minor \
16952                                 -o $available_patch -lt $required_patch ; then
16953                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&5
16954 $as_echo "$as_me: WARNING: SWIG version >=  is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
16955                                 SWIG='echo "Error: SWIG version >=  is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
16956                         else
16957                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5
16958 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;}
16959                                 SWIG_LIB=`$SWIG -swiglib`
16960                                 { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5
16961 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
16962                         fi
16963                 else
16964                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
16965 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
16966                         SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
16967                 fi
16968         fi
16969
16970
16971       { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG" >&5
16972 $as_echo_n "checking SWIG... " >&6; }
16973       if test ! -x "$SWIG"; then
16974          as_fn_error $? "failed to find swig tool, install it, or do not build Python module and PyUnbound" "$LINENO" 5
16975       else
16976
16977 $as_echo "#define HAVE_SWIG 1" >>confdefs.h
16978
16979          swig="$SWIG"
16980
16981          { $as_echo "$as_me:${as_lineno-$LINENO}: result: present" >&5
16982 $as_echo "present" >&6; }
16983
16984          # If have Python & SWIG
16985          # Declare PythonMod
16986          if test x_$ub_with_pythonmod != x_no; then
16987
16988 $as_echo "#define WITH_PYTHONMODULE 1" >>confdefs.h
16989
16990             WITH_PYTHONMODULE=yes
16991
16992             PYTHONMOD_OBJ="pythonmod.lo pythonmod_utils.lo"
16993
16994             PYTHONMOD_HEADER='$(srcdir)/pythonmod/pythonmod.h'
16995
16996             PYTHONMOD_INSTALL=pythonmod-install
16997
16998             PYTHONMOD_UNINSTALL=pythonmod-uninstall
16999
17000          fi
17001
17002          # Declare PyUnbound
17003          if test x_$ub_with_pyunbound != x_no; then
17004
17005 $as_echo "#define WITH_PYUNBOUND 1" >>confdefs.h
17006
17007             WITH_PYUNBOUND=yes
17008
17009             PYUNBOUND_OBJ="libunbound_wrap.lo"
17010
17011             PYUNBOUND_TARGET="_unbound.la"
17012
17013             PYUNBOUND_INSTALL=pyunbound-install
17014
17015             PYUNBOUND_UNINSTALL=pyunbound-uninstall
17016
17017          fi
17018       fi
17019    else
17020       { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
17021 $as_echo "*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
17022       ub_with_pyunbound=no
17023       ub_with_pythonmod=no
17024    fi
17025 fi
17026
17027 if test "`uname`" = "NetBSD"; then
17028         NETBSD_LINTFLAGS='"-D__RENAME(x)=" -D_NETINET_IN_H_'
17029
17030 fi
17031 CONFIG_DATE=`date +%Y%m%d`
17032
17033
17034 # Checks for libraries.
17035
17036 # libnss
17037 USE_NSS="no"
17038
17039 # Check whether --with-nss was given.
17040 if test "${with_nss+set}" = set; then :
17041   withval=$with_nss;
17042         USE_NSS="yes"
17043
17044 $as_echo "#define HAVE_NSS 1" >>confdefs.h
17045
17046         if test "$withval" != "" -a "$withval" != "yes"; then
17047                 CPPFLAGS="$CPPFLAGS -I$withval/include/nss3"
17048                 LDFLAGS="$LDFLAGS -L$withval/lib"
17049
17050         if test "x$enable_rpath" = xyes; then
17051                 if echo "$withval/lib" | grep "^/" >/dev/null; then
17052                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17053                 fi
17054         fi
17055
17056                 CPPFLAGS="-I$withval/include/nspr4 $CPPFLAGS"
17057         else
17058                 CPPFLAGS="$CPPFLAGS -I/usr/include/nss3"
17059                 CPPFLAGS="-I/usr/include/nspr4 $CPPFLAGS"
17060         fi
17061         LIBS="$LIBS -lnss3 -lnspr4"
17062         SSLLIB=""
17063
17064
17065 fi
17066
17067
17068 # libnettle
17069 USE_NETTLE="no"
17070
17071 # Check whether --with-nettle was given.
17072 if test "${with_nettle+set}" = set; then :
17073   withval=$with_nettle;
17074         USE_NETTLE="yes"
17075
17076 $as_echo "#define HAVE_NETTLE 1" >>confdefs.h
17077
17078         for ac_header in nettle/dsa-compat.h
17079 do :
17080   ac_fn_c_check_header_compile "$LINENO" "nettle/dsa-compat.h" "ac_cv_header_nettle_dsa_compat_h" "$ac_includes_default
17081 "
17082 if test "x$ac_cv_header_nettle_dsa_compat_h" = xyes; then :
17083   cat >>confdefs.h <<_ACEOF
17084 #define HAVE_NETTLE_DSA_COMPAT_H 1
17085 _ACEOF
17086
17087 fi
17088
17089 done
17090
17091         if test "$withval" != "" -a "$withval" != "yes"; then
17092                 CPPFLAGS="$CPPFLAGS -I$withval/include/nettle"
17093                 LDFLAGS="$LDFLAGS -L$withval/lib"
17094
17095         if test "x$enable_rpath" = xyes; then
17096                 if echo "$withval/lib" | grep "^/" >/dev/null; then
17097                         RUNTIME_PATH="$RUNTIME_PATH -R$withval/lib"
17098                 fi
17099         fi
17100
17101         else
17102                 CPPFLAGS="$CPPFLAGS -I/usr/include/nettle"
17103         fi
17104         LIBS="$LIBS -lhogweed -lnettle -lgmp"
17105         SSLLIB=""
17106
17107
17108 fi
17109
17110
17111 # openssl
17112 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17113
17114
17115 # Check whether --with-ssl was given.
17116 if test "${with_ssl+set}" = set; then :
17117   withval=$with_ssl;
17118
17119 else
17120
17121             withval="yes"
17122
17123 fi
17124
17125     if test x_$withval = x_no; then
17126         as_fn_error $? "Need SSL library to do digital signature cryptography" "$LINENO" 5
17127     fi
17128
17129     withval=$withval
17130     if test x_$withval != x_no; then
17131         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
17132 $as_echo_n "checking for SSL... " >&6; }
17133         if test x_$withval = x_ -o x_$withval = x_yes; then
17134             withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
17135         fi
17136         for dir in $withval; do
17137             ssldir="$dir"
17138             if test -f "$dir/include/openssl/ssl.h"; then
17139                 found_ssl="yes"
17140
17141 cat >>confdefs.h <<_ACEOF
17142 #define HAVE_SSL /**/
17143 _ACEOF
17144
17145                                 if test "$ssldir" != "/usr"; then
17146                         CPPFLAGS="$CPPFLAGS -I$ssldir/include"
17147                         LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
17148                 fi
17149                 break;
17150             fi
17151         done
17152         if test x_$found_ssl != x_yes; then
17153             as_fn_error $? "Cannot find the SSL libraries in $withval" "$LINENO" 5
17154         else
17155             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5
17156 $as_echo "found in $ssldir" >&6; }
17157             HAVE_SSL=yes
17158                         if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
17159                 LDFLAGS="$LDFLAGS -L$ssldir/lib"
17160                 LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
17161
17162         if test "x$enable_rpath" = xyes; then
17163                 if echo "$ssldir/lib" | grep "^/" >/dev/null; then
17164                         RUNTIME_PATH="$RUNTIME_PATH -R$ssldir/lib"
17165                 fi
17166         fi
17167
17168             fi
17169
17170             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lcrypto" >&5
17171 $as_echo_n "checking for HMAC_Update in -lcrypto... " >&6; }
17172             LIBS="$LIBS -lcrypto"
17173             LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
17174             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17175 /* end confdefs.h.  */
17176
17177 int
17178 main ()
17179 {
17180
17181                 int HMAC_Update(void);
17182                 (void)HMAC_Update();
17183
17184   ;
17185   return 0;
17186 }
17187 _ACEOF
17188 if ac_fn_c_try_link "$LINENO"; then :
17189
17190                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17191 $as_echo "yes" >&6; }
17192
17193 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17194
17195
17196 else
17197
17198                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17199 $as_echo "no" >&6; }
17200                 # check if -lwsock32 or -lgdi32 are needed.
17201                 BAKLIBS="$LIBS"
17202                 BAKSSLLIBS="$LIBSSL_LIBS"
17203                 LIBS="$LIBS -lgdi32"
17204                 LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32"
17205                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
17206 $as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
17207                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17208 /* end confdefs.h.  */
17209
17210 int
17211 main ()
17212 {
17213
17214                     int HMAC_Update(void);
17215                     (void)HMAC_Update();
17216
17217   ;
17218   return 0;
17219 }
17220 _ACEOF
17221 if ac_fn_c_try_link "$LINENO"; then :
17222
17223
17224 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17225
17226                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17227 $as_echo "yes" >&6; }
17228
17229 else
17230
17231                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17232 $as_echo "no" >&6; }
17233                     LIBS="$BAKLIBS"
17234                     LIBSSL_LIBS="$BAKSSLLIBS"
17235                     LIBS="$LIBS -ldl"
17236                     LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
17237                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl" >&5
17238 $as_echo_n "checking if -lcrypto needs -ldl... " >&6; }
17239                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17240 /* end confdefs.h.  */
17241
17242 int
17243 main ()
17244 {
17245
17246                         int HMAC_Update(void);
17247                         (void)HMAC_Update();
17248
17249   ;
17250   return 0;
17251 }
17252 _ACEOF
17253 if ac_fn_c_try_link "$LINENO"; then :
17254
17255
17256 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17257
17258                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17259 $as_echo "yes" >&6; }
17260
17261 else
17262
17263                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17264 $as_echo "no" >&6; }
17265                         LIBS="$BAKLIBS"
17266                         LIBSSL_LIBS="$BAKSSLLIBS"
17267                         LIBS="$LIBS -ldl -pthread"
17268                         LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
17269                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
17270 $as_echo_n "checking if -lcrypto needs -ldl -pthread... " >&6; }
17271                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17272 /* end confdefs.h.  */
17273
17274 int
17275 main ()
17276 {
17277
17278                             int HMAC_Update(void);
17279                             (void)HMAC_Update();
17280
17281   ;
17282   return 0;
17283 }
17284 _ACEOF
17285 if ac_fn_c_try_link "$LINENO"; then :
17286
17287
17288 $as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
17289
17290                             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17291 $as_echo "yes" >&6; }
17292
17293 else
17294
17295                             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17296 $as_echo "no" >&6; }
17297                             as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
17298
17299 fi
17300 rm -f core conftest.err conftest.$ac_objext \
17301     conftest$ac_exeext conftest.$ac_ext
17302
17303 fi
17304 rm -f core conftest.err conftest.$ac_objext \
17305     conftest$ac_exeext conftest.$ac_ext
17306
17307 fi
17308 rm -f core conftest.err conftest.$ac_objext \
17309     conftest$ac_exeext conftest.$ac_ext
17310
17311 fi
17312 rm -f core conftest.err conftest.$ac_objext \
17313     conftest$ac_exeext conftest.$ac_ext
17314         fi
17315
17316
17317     fi
17318 for ac_header in openssl/ssl.h
17319 do :
17320   ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default
17321 "
17322 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
17323   cat >>confdefs.h <<_ACEOF
17324 #define HAVE_OPENSSL_SSL_H 1
17325 _ACEOF
17326
17327 fi
17328
17329 done
17330
17331 for ac_header in openssl/err.h
17332 do :
17333   ac_fn_c_check_header_compile "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default
17334 "
17335 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
17336   cat >>confdefs.h <<_ACEOF
17337 #define HAVE_OPENSSL_ERR_H 1
17338 _ACEOF
17339
17340 fi
17341
17342 done
17343
17344 for ac_header in openssl/rand.h
17345 do :
17346   ac_fn_c_check_header_compile "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default
17347 "
17348 if test "x$ac_cv_header_openssl_rand_h" = xyes; then :
17349   cat >>confdefs.h <<_ACEOF
17350 #define HAVE_OPENSSL_RAND_H 1
17351 _ACEOF
17352
17353 fi
17354
17355 done
17356
17357
17358
17359
17360 # check if libssl needs libdl
17361 BAKLIBS="$LIBS"
17362 LIBS="-lssl $LIBS"
17363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs libdl" >&5
17364 $as_echo_n "checking if libssl needs libdl... " >&6; }
17365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17366 /* end confdefs.h.  */
17367
17368 /* Override any GCC internal prototype to avoid an error.
17369    Use char because int might match the return type of a GCC
17370    builtin and then its argument prototype would still apply.  */
17371 #ifdef __cplusplus
17372 extern "C"
17373 #endif
17374 char SSL_CTX_new ();
17375 int
17376 main ()
17377 {
17378 return SSL_CTX_new ();
17379   ;
17380   return 0;
17381 }
17382 _ACEOF
17383 if ac_fn_c_try_link "$LINENO"; then :
17384
17385         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17386 $as_echo "no" >&6; }
17387         LIBS="$BAKLIBS"
17388
17389 else
17390
17391         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17392 $as_echo "yes" >&6; }
17393         LIBS="$BAKLIBS"
17394         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17395 $as_echo_n "checking for library containing dlopen... " >&6; }
17396 if ${ac_cv_search_dlopen+:} false; then :
17397   $as_echo_n "(cached) " >&6
17398 else
17399   ac_func_search_save_LIBS=$LIBS
17400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17401 /* end confdefs.h.  */
17402
17403 /* Override any GCC internal prototype to avoid an error.
17404    Use char because int might match the return type of a GCC
17405    builtin and then its argument prototype would still apply.  */
17406 #ifdef __cplusplus
17407 extern "C"
17408 #endif
17409 char dlopen ();
17410 int
17411 main ()
17412 {
17413 return dlopen ();
17414   ;
17415   return 0;
17416 }
17417 _ACEOF
17418 for ac_lib in '' dl; do
17419   if test -z "$ac_lib"; then
17420     ac_res="none required"
17421   else
17422     ac_res=-l$ac_lib
17423     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17424   fi
17425   if ac_fn_c_try_link "$LINENO"; then :
17426   ac_cv_search_dlopen=$ac_res
17427 fi
17428 rm -f core conftest.err conftest.$ac_objext \
17429     conftest$ac_exeext
17430   if ${ac_cv_search_dlopen+:} false; then :
17431   break
17432 fi
17433 done
17434 if ${ac_cv_search_dlopen+:} false; then :
17435
17436 else
17437   ac_cv_search_dlopen=no
17438 fi
17439 rm conftest.$ac_ext
17440 LIBS=$ac_func_search_save_LIBS
17441 fi
17442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17443 $as_echo "$ac_cv_search_dlopen" >&6; }
17444 ac_res=$ac_cv_search_dlopen
17445 if test "$ac_res" != no; then :
17446   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17447
17448 fi
17449
17450
17451 fi
17452 rm -f core conftest.err conftest.$ac_objext \
17453     conftest$ac_exeext conftest.$ac_ext
17454 SSLLIB="-lssl"
17455
17456 # check if -lcrypt32 is needed because CAPIENG needs that. (on windows)
17457 BAKLIBS="$LIBS"
17458 LIBS="-lssl $LIBS"
17459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5
17460 $as_echo_n "checking if libssl needs -lcrypt32... " >&6; }
17461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17462 /* end confdefs.h.  */
17463
17464 /* Override any GCC internal prototype to avoid an error.
17465    Use char because int might match the return type of a GCC
17466    builtin and then its argument prototype would still apply.  */
17467 #ifdef __cplusplus
17468 extern "C"
17469 #endif
17470 char HMAC_Update ();
17471 int
17472 main ()
17473 {
17474 return HMAC_Update ();
17475   ;
17476   return 0;
17477 }
17478 _ACEOF
17479 if ac_fn_c_try_link "$LINENO"; then :
17480
17481         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17482 $as_echo "no" >&6; }
17483         LIBS="$BAKLIBS"
17484
17485 else
17486
17487         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17488 $as_echo "yes" >&6; }
17489         LIBS="$BAKLIBS"
17490         LIBS="$LIBS -lcrypt32"
17491
17492 fi
17493 rm -f core conftest.err conftest.$ac_objext \
17494     conftest$ac_exeext conftest.$ac_ext
17495
17496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5
17497 $as_echo_n "checking for LibreSSL... " >&6; }
17498 if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then
17499         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17500 $as_echo "yes" >&6; }
17501
17502 $as_echo "#define HAVE_LIBRESSL 1" >>confdefs.h
17503
17504         # libressl provides these compat functions, but they may also be
17505         # declared by the OS in libc.  See if they have been declared.
17506         ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
17507 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
17508   ac_have_decl=1
17509 else
17510   ac_have_decl=0
17511 fi
17512
17513 cat >>confdefs.h <<_ACEOF
17514 #define HAVE_DECL_STRLCPY $ac_have_decl
17515 _ACEOF
17516 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
17517 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
17518   ac_have_decl=1
17519 else
17520   ac_have_decl=0
17521 fi
17522
17523 cat >>confdefs.h <<_ACEOF
17524 #define HAVE_DECL_STRLCAT $ac_have_decl
17525 _ACEOF
17526 ac_fn_c_check_decl "$LINENO" "arc4random" "ac_cv_have_decl_arc4random" "$ac_includes_default"
17527 if test "x$ac_cv_have_decl_arc4random" = xyes; then :
17528   ac_have_decl=1
17529 else
17530   ac_have_decl=0
17531 fi
17532
17533 cat >>confdefs.h <<_ACEOF
17534 #define HAVE_DECL_ARC4RANDOM $ac_have_decl
17535 _ACEOF
17536 ac_fn_c_check_decl "$LINENO" "arc4random_uniform" "ac_cv_have_decl_arc4random_uniform" "$ac_includes_default"
17537 if test "x$ac_cv_have_decl_arc4random_uniform" = xyes; then :
17538   ac_have_decl=1
17539 else
17540   ac_have_decl=0
17541 fi
17542
17543 cat >>confdefs.h <<_ACEOF
17544 #define HAVE_DECL_ARC4RANDOM_UNIFORM $ac_have_decl
17545 _ACEOF
17546 ac_fn_c_check_decl "$LINENO" "reallocarray" "ac_cv_have_decl_reallocarray" "$ac_includes_default"
17547 if test "x$ac_cv_have_decl_reallocarray" = xyes; then :
17548   ac_have_decl=1
17549 else
17550   ac_have_decl=0
17551 fi
17552
17553 cat >>confdefs.h <<_ACEOF
17554 #define HAVE_DECL_REALLOCARRAY $ac_have_decl
17555 _ACEOF
17556
17557 else
17558         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17559 $as_echo "no" >&6; }
17560 fi
17561 for ac_header in openssl/conf.h openssl/engine.h openssl/bn.h openssl/dh.h openssl/dsa.h openssl/rsa.h
17562 do :
17563   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17564 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
17565 "
17566 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17567   cat >>confdefs.h <<_ACEOF
17568 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17569 _ACEOF
17570
17571 fi
17572
17573 done
17574
17575 for ac_func in OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode EVP_MD_CTX_new OpenSSL_add_all_digests OPENSSL_init_crypto EVP_cleanup ERR_load_crypto_strings CRYPTO_cleanup_all_ex_data ERR_free_strings RAND_cleanup DSA_SIG_set0 EVP_dss1
17576 do :
17577   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17578 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17579 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17580   cat >>confdefs.h <<_ACEOF
17581 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17582 _ACEOF
17583
17584 fi
17585 done
17586
17587
17588 # these check_funcs need -lssl
17589 BAKLIBS="$LIBS"
17590 LIBS="-lssl $LIBS"
17591 for ac_func in OPENSSL_init_ssl SSL_CTX_set_security_level
17592 do :
17593   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17594 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17595 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17596   cat >>confdefs.h <<_ACEOF
17597 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17598 _ACEOF
17599
17600 fi
17601 done
17602
17603 LIBS="$BAKLIBS"
17604
17605 ac_fn_c_check_decl "$LINENO" "SSL_COMP_get_compression_methods" "ac_cv_have_decl_SSL_COMP_get_compression_methods" "
17606 $ac_includes_default
17607 #ifdef HAVE_OPENSSL_ERR_H
17608 #include <openssl/err.h>
17609 #endif
17610
17611 #ifdef HAVE_OPENSSL_RAND_H
17612 #include <openssl/rand.h>
17613 #endif
17614
17615 #ifdef HAVE_OPENSSL_CONF_H
17616 #include <openssl/conf.h>
17617 #endif
17618
17619 #ifdef HAVE_OPENSSL_ENGINE_H
17620 #include <openssl/engine.h>
17621 #endif
17622 #include <openssl/ssl.h>
17623 #include <openssl/evp.h>
17624
17625 "
17626 if test "x$ac_cv_have_decl_SSL_COMP_get_compression_methods" = xyes; then :
17627   ac_have_decl=1
17628 else
17629   ac_have_decl=0
17630 fi
17631
17632 cat >>confdefs.h <<_ACEOF
17633 #define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS $ac_have_decl
17634 _ACEOF
17635 ac_fn_c_check_decl "$LINENO" "sk_SSL_COMP_pop_free" "ac_cv_have_decl_sk_SSL_COMP_pop_free" "
17636 $ac_includes_default
17637 #ifdef HAVE_OPENSSL_ERR_H
17638 #include <openssl/err.h>
17639 #endif
17640
17641 #ifdef HAVE_OPENSSL_RAND_H
17642 #include <openssl/rand.h>
17643 #endif
17644
17645 #ifdef HAVE_OPENSSL_CONF_H
17646 #include <openssl/conf.h>
17647 #endif
17648
17649 #ifdef HAVE_OPENSSL_ENGINE_H
17650 #include <openssl/engine.h>
17651 #endif
17652 #include <openssl/ssl.h>
17653 #include <openssl/evp.h>
17654
17655 "
17656 if test "x$ac_cv_have_decl_sk_SSL_COMP_pop_free" = xyes; then :
17657   ac_have_decl=1
17658 else
17659   ac_have_decl=0
17660 fi
17661
17662 cat >>confdefs.h <<_ACEOF
17663 #define HAVE_DECL_SK_SSL_COMP_POP_FREE $ac_have_decl
17664 _ACEOF
17665 ac_fn_c_check_decl "$LINENO" "SSL_CTX_set_ecdh_auto" "ac_cv_have_decl_SSL_CTX_set_ecdh_auto" "
17666 $ac_includes_default
17667 #ifdef HAVE_OPENSSL_ERR_H
17668 #include <openssl/err.h>
17669 #endif
17670
17671 #ifdef HAVE_OPENSSL_RAND_H
17672 #include <openssl/rand.h>
17673 #endif
17674
17675 #ifdef HAVE_OPENSSL_CONF_H
17676 #include <openssl/conf.h>
17677 #endif
17678
17679 #ifdef HAVE_OPENSSL_ENGINE_H
17680 #include <openssl/engine.h>
17681 #endif
17682 #include <openssl/ssl.h>
17683 #include <openssl/evp.h>
17684
17685 "
17686 if test "x$ac_cv_have_decl_SSL_CTX_set_ecdh_auto" = xyes; then :
17687   ac_have_decl=1
17688 else
17689   ac_have_decl=0
17690 fi
17691
17692 cat >>confdefs.h <<_ACEOF
17693 #define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO $ac_have_decl
17694 _ACEOF
17695
17696 fi
17697
17698
17699
17700 # Check whether --enable-sha2 was given.
17701 if test "${enable_sha2+set}" = set; then :
17702   enableval=$enable_sha2;
17703 fi
17704
17705 case "$enable_sha2" in
17706         no)
17707         ;;
17708         yes|*)
17709
17710 $as_echo "#define USE_SHA2 1" >>confdefs.h
17711
17712         ;;
17713 esac
17714
17715 # check wether gost also works
17716
17717 # Check whether --enable-gost was given.
17718 if test "${enable_gost+set}" = set; then :
17719   enableval=$enable_gost;
17720 fi
17721
17722 use_gost="no"
17723 if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17724 case "$enable_gost" in
17725         no)
17726         ;;
17727         *)
17728         ac_fn_c_check_func "$LINENO" "EVP_PKEY_set_type_str" "ac_cv_func_EVP_PKEY_set_type_str"
17729 if test "x$ac_cv_func_EVP_PKEY_set_type_str" = xyes; then :
17730   :
17731 else
17732   as_fn_error $? "OpenSSL 1.0.0 is needed for GOST support" "$LINENO" 5
17733 fi
17734
17735         ac_fn_c_check_func "$LINENO" "EC_KEY_new" "ac_cv_func_EC_KEY_new"
17736 if test "x$ac_cv_func_EC_KEY_new" = xyes; then :
17737
17738 else
17739   as_fn_error $? "OpenSSL does not support ECC, needed for GOST support" "$LINENO" 5
17740 fi
17741
17742
17743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GOST works" >&5
17744 $as_echo_n "checking if GOST works... " >&6; }
17745 if test c${cross_compiling} = cno; then
17746 BAKCFLAGS="$CFLAGS"
17747 if test -n "$ssldir"; then
17748         CFLAGS="$CFLAGS -Wl,-rpath,$ssldir/lib"
17749 fi
17750 if test "$cross_compiling" = yes; then :
17751   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17752 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17753 as_fn_error $? "cannot run test program while cross compiling
17754 See \`config.log' for more details" "$LINENO" 5; }
17755 else
17756   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17757 /* end confdefs.h.  */
17758
17759 #include <string.h>
17760 #include <openssl/ssl.h>
17761 #include <openssl/evp.h>
17762 #include <openssl/engine.h>
17763 #include <openssl/conf.h>
17764 /* routine to load gost (from sldns) */
17765 int load_gost_id(void)
17766 {
17767         static int gost_id = 0;
17768         const EVP_PKEY_ASN1_METHOD* meth;
17769         ENGINE* e;
17770
17771         if(gost_id) return gost_id;
17772
17773         /* see if configuration loaded gost implementation from other engine*/
17774         meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
17775         if(meth) {
17776                 EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
17777                 return gost_id;
17778         }
17779
17780         /* see if engine can be loaded already */
17781         e = ENGINE_by_id("gost");
17782         if(!e) {
17783                 /* load it ourself, in case statically linked */
17784                 ENGINE_load_builtin_engines();
17785                 ENGINE_load_dynamic();
17786                 e = ENGINE_by_id("gost");
17787         }
17788         if(!e) {
17789                 /* no gost engine in openssl */
17790                 return 0;
17791         }
17792         if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
17793                 ENGINE_finish(e);
17794                 ENGINE_free(e);
17795                 return 0;
17796         }
17797
17798         meth = EVP_PKEY_asn1_find_str(&e, "gost2001", -1);
17799         if(!meth) {
17800                 /* algo not found */
17801                 ENGINE_finish(e);
17802                 ENGINE_free(e);
17803                 return 0;
17804         }
17805         EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
17806         return gost_id;
17807 }
17808 int main(void) {
17809         EVP_MD_CTX* ctx;
17810         const EVP_MD* md;
17811         unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
17812         const char* str = "Hello world";
17813         const unsigned char check[] = {
17814                 0x40 , 0xed , 0xf8 , 0x56 , 0x5a , 0xc5 , 0x36 , 0xe1 ,
17815                 0x33 , 0x7c , 0x7e , 0x87 , 0x62 , 0x1c , 0x42 , 0xe0 ,
17816                 0x17 , 0x1b , 0x5e , 0xce , 0xa8 , 0x46 , 0x65 , 0x4d ,
17817                 0x8d , 0x3e , 0x22 , 0x9b , 0xe1 , 0x30 , 0x19 , 0x9d
17818         };
17819         OPENSSL_config(NULL);
17820         (void)load_gost_id();
17821         md = EVP_get_digestbyname("md_gost94");
17822         if(!md) return 1;
17823         memset(digest, 0, sizeof(digest));
17824         ctx = EVP_MD_CTX_create();
17825         if(!ctx) return 2;
17826         if(!EVP_DigestInit_ex(ctx, md, NULL)) return 3;
17827         if(!EVP_DigestUpdate(ctx, str, 10)) return 4;
17828         if(!EVP_DigestFinal_ex(ctx, digest, NULL)) return 5;
17829         /* uncomment to see the hash calculated.
17830                 {int i;
17831                 for(i=0; i<32; i++)
17832                         printf(" %2.2x", (int)digest[i]);
17833                 printf("\n");}
17834         */
17835         if(memcmp(digest, check, sizeof(check)) != 0)
17836                 return 6;
17837         return 0;
17838 }
17839
17840 _ACEOF
17841 if ac_fn_c_try_run "$LINENO"; then :
17842   eval "ac_cv_c_gost_works=yes"
17843 else
17844   eval "ac_cv_c_gost_works=no"
17845 fi
17846 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17847   conftest.$ac_objext conftest.beam conftest.$ac_ext
17848 fi
17849
17850 CFLAGS="$BAKCFLAGS"
17851 else
17852 eval "ac_cv_c_gost_works=maybe"
17853 fi
17854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_gost_works" >&5
17855 $as_echo "$ac_cv_c_gost_works" >&6; }
17856
17857         if test "$ac_cv_c_gost_works" != no; then
17858                 use_gost="yes"
17859
17860 $as_echo "#define USE_GOST 1" >>confdefs.h
17861
17862         fi
17863         ;;
17864 esac
17865 fi
17866 # Check whether --enable-ecdsa was given.
17867 if test "${enable_ecdsa+set}" = set; then :
17868   enableval=$enable_ecdsa;
17869 fi
17870
17871 use_ecdsa="no"
17872 case "$enable_ecdsa" in
17873     no)
17874       ;;
17875     *)
17876       if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then
17877               ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
17878 if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
17879
17880 else
17881   as_fn_error $? "OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17882 fi
17883
17884               ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
17885 if test "x$ac_cv_func_SHA384_Init" = xyes; then :
17886
17887 else
17888   as_fn_error $? "OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17889 fi
17890
17891               ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
17892 #include <openssl/evp.h>
17893
17894 "
17895 if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
17896   ac_have_decl=1
17897 else
17898   ac_have_decl=0
17899 fi
17900
17901 cat >>confdefs.h <<_ACEOF
17902 #define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
17903 _ACEOF
17904 if test $ac_have_decl = 1; then :
17905
17906 else
17907   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17908 fi
17909 ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
17910 #include <openssl/evp.h>
17911
17912 "
17913 if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
17914   ac_have_decl=1
17915 else
17916   ac_have_decl=0
17917 fi
17918
17919 cat >>confdefs.h <<_ACEOF
17920 #define HAVE_DECL_NID_SECP384R1 $ac_have_decl
17921 _ACEOF
17922 if test $ac_have_decl = 1; then :
17923
17924 else
17925   as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa" "$LINENO" 5
17926 fi
17927
17928               # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
17929               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openssl supports SHA2 and ECDSA with EVP" >&5
17930 $as_echo_n "checking if openssl supports SHA2 and ECDSA with EVP... " >&6; }
17931               if grep OPENSSL_VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "OpenSSL" >/dev/null; then
17932                 if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
17933                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17934 $as_echo "no" >&6; }
17935
17936 cat >>confdefs.h <<_ACEOF
17937 #define USE_ECDSA_EVP_WORKAROUND 1
17938 _ACEOF
17939
17940                 else
17941                   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17942 $as_echo "yes" >&6; }
17943                 fi
17944               else
17945                 # not OpenSSL, thus likely LibreSSL, which supports it
17946                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17947 $as_echo "yes" >&6; }
17948               fi
17949       fi
17950       # we now know we have ECDSA and the required curves.
17951
17952 cat >>confdefs.h <<_ACEOF
17953 #define USE_ECDSA 1
17954 _ACEOF
17955
17956       use_ecdsa="yes"
17957       ;;
17958 esac
17959
17960 # Check whether --enable-dsa was given.
17961 if test "${enable_dsa+set}" = set; then :
17962   enableval=$enable_dsa;
17963 fi
17964
17965 use_dsa="no"
17966 case "$enable_dsa" in
17967     no)
17968       ;;
17969     *)
17970       # detect if DSA is supported, and turn it off if not.
17971       ac_fn_c_check_func "$LINENO" "DSA_SIG_new" "ac_cv_func_DSA_SIG_new"
17972 if test "x$ac_cv_func_DSA_SIG_new" = xyes; then :
17973
17974
17975 cat >>confdefs.h <<_ACEOF
17976 #define USE_DSA 1
17977 _ACEOF
17978
17979
17980 else
17981   if test "x$enable_dsa" = "xyes"; then as_fn_error $? "OpenSSL does not support DSA and you used --enable-dsa." "$LINENO" 5
17982                fi
17983 fi
17984
17985       ;;
17986 esac
17987
17988
17989 # Check whether --enable-event-api was given.
17990 if test "${enable_event_api+set}" = set; then :
17991   enableval=$enable_event_api;
17992 fi
17993
17994 case "$enable_event_api" in
17995     yes)
17996       UNBOUND_EVENT_INSTALL=unbound-event-install
17997
17998       UNBOUND_EVENT_UNINSTALL=unbound-event-uninstall
17999
18000       ;;
18001     *)
18002       ;;
18003 esac
18004
18005 # Check whether --enable-tfo-client was given.
18006 if test "${enable_tfo_client+set}" = set; then :
18007   enableval=$enable_tfo_client;
18008 fi
18009
18010 case "$enable_tfo_client" in
18011         yes)
18012                 case `uname` in
18013                         Linux) ac_fn_c_check_decl "$LINENO" "MSG_FASTOPEN" "ac_cv_have_decl_MSG_FASTOPEN" "$ac_includes_default
18014 #include <netinet/tcp.h>
18015
18016 "
18017 if test "x$ac_cv_have_decl_MSG_FASTOPEN" = xyes; then :
18018   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
18019 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
18020 else
18021   as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
18022 fi
18023
18024
18025 cat >>confdefs.h <<_ACEOF
18026 #define USE_MSG_FASTOPEN 1
18027 _ACEOF
18028
18029                           ;;
18030                         Darwin) ac_fn_c_check_decl "$LINENO" "CONNECT_RESUME_ON_READ_WRITE" "ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" "$ac_includes_default
18031 #include <sys/socket.h>
18032
18033 "
18034 if test "x$ac_cv_have_decl_CONNECT_RESUME_ON_READ_WRITE" = xyes; then :
18035   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&5
18036 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support client mode TFO" >&2;}
18037 else
18038   as_fn_error $? "TCP Fast Open is not available for client mode: please rerun without --enable-tfo-client" "$LINENO" 5
18039 fi
18040
18041
18042 cat >>confdefs.h <<_ACEOF
18043 #define USE_OSX_MSG_FASTOPEN 1
18044 _ACEOF
18045
18046                           ;;
18047                 esac
18048         ;;
18049         no|*)
18050                 ;;
18051 esac
18052
18053 # Check whether --enable-tfo-server was given.
18054 if test "${enable_tfo_server+set}" = set; then :
18055   enableval=$enable_tfo_server;
18056 fi
18057
18058 case "$enable_tfo_server" in
18059         yes)
18060               ac_fn_c_check_decl "$LINENO" "TCP_FASTOPEN" "ac_cv_have_decl_TCP_FASTOPEN" "$ac_includes_default
18061 #include <netinet/tcp.h>
18062
18063 "
18064 if test "x$ac_cv_have_decl_TCP_FASTOPEN" = xyes; then :
18065   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&5
18066 $as_echo "$as_me: WARNING: Check the platform specific TFO kernel parameters are correctly configured to support server mode TFO" >&2;}
18067 else
18068   as_fn_error $? "TCP Fast Open is not available for server mode: please rerun without --enable-tfo-server" "$LINENO" 5
18069 fi
18070
18071
18072 cat >>confdefs.h <<_ACEOF
18073 #define USE_TCP_FASTOPEN 1
18074 _ACEOF
18075
18076                 ;;
18077         no|*)
18078                 ;;
18079 esac
18080
18081 # check for libevent
18082
18083 # Check whether --with-libevent was given.
18084 if test "${with_libevent+set}" = set; then :
18085   withval=$with_libevent;
18086 else
18087    withval="no"
18088 fi
18089
18090 if test x_$withval = x_yes -o x_$withval != x_no; then
18091         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
18092 $as_echo_n "checking for libevent... " >&6; }
18093         if test x_$withval = x_ -o x_$withval = x_yes; then
18094             withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18095         fi
18096         for dir in $withval; do
18097             thedir="$dir"
18098             if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
18099                 found_libevent="yes"
18100                                 if test "$thedir" != "/usr"; then
18101                     CPPFLAGS="$CPPFLAGS -I$thedir/include"
18102                 fi
18103                 break;
18104             fi
18105         done
18106         if test x_$found_libevent != x_yes; then
18107                 if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
18108                         # libevent source directory
18109                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
18110 $as_echo "found in $thedir" >&6; }
18111                         CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
18112                         BAK_LDFLAGS_SET="1"
18113                         BAK_LDFLAGS="$LDFLAGS"
18114                         # remove evdns from linking
18115                         mkdir build >/dev/null 2>&1
18116                         mkdir build/libevent >/dev/null 2>&1
18117                         mkdir build/libevent/.libs >/dev/null 2>&1
18118                         ev_files_o=`ls $thedir/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
18119                         ev_files_lo=`ls $thedir/*.lo | grep -v evdns\.lo | grep -v bufferevent_openssl\.lo`
18120                         ev_files_libso=`ls $thedir/.libs/*.o | grep -v evdns\.o | grep -v bufferevent_openssl\.o`
18121                         cp $ev_files_o build/libevent
18122                         cp $ev_files_lo build/libevent
18123                         cp $ev_files_libso build/libevent/.libs
18124                         LATE_LDFLAGS="build/libevent/*.lo -lm"
18125                         LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
18126                 else
18127                         as_fn_error $? "Cannot find the libevent library in $withval
18128 You can restart ./configure --with-libevent=no to use a builtin alternative.
18129 Please note that this alternative is not as capable as libevent when using
18130 large outgoing port ranges.  " "$LINENO" 5
18131                 fi
18132         else
18133             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
18134 $as_echo "found in $thedir" >&6; }
18135                     if test ! -f $thedir/lib/libevent.a -a ! -f $thedir/lib/libevent.so -a -d "$thedir/lib/event2"; then
18136                     LDFLAGS="$LDFLAGS -L$thedir/lib/event2"
18137
18138         if test "x$enable_rpath" = xyes; then
18139                 if echo "$thedir/lib/event2" | grep "^/" >/dev/null; then
18140                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib/event2"
18141                 fi
18142         fi
18143
18144             else
18145                                     if test "$thedir" != "/usr" -a "$thedir" != ""; then
18146                         LDFLAGS="$LDFLAGS -L$thedir/lib"
18147
18148         if test "x$enable_rpath" = xyes; then
18149                 if echo "$thedir/lib" | grep "^/" >/dev/null; then
18150                         RUNTIME_PATH="$RUNTIME_PATH -R$thedir/lib"
18151                 fi
18152         fi
18153
18154                     fi
18155             fi
18156         fi
18157         # check for library used by libevent after 1.3c
18158         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18159 $as_echo_n "checking for library containing clock_gettime... " >&6; }
18160 if ${ac_cv_search_clock_gettime+:} false; then :
18161   $as_echo_n "(cached) " >&6
18162 else
18163   ac_func_search_save_LIBS=$LIBS
18164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18165 /* end confdefs.h.  */
18166
18167 /* Override any GCC internal prototype to avoid an error.
18168    Use char because int might match the return type of a GCC
18169    builtin and then its argument prototype would still apply.  */
18170 #ifdef __cplusplus
18171 extern "C"
18172 #endif
18173 char clock_gettime ();
18174 int
18175 main ()
18176 {
18177 return clock_gettime ();
18178   ;
18179   return 0;
18180 }
18181 _ACEOF
18182 for ac_lib in '' rt; do
18183   if test -z "$ac_lib"; then
18184     ac_res="none required"
18185   else
18186     ac_res=-l$ac_lib
18187     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18188   fi
18189   if ac_fn_c_try_link "$LINENO"; then :
18190   ac_cv_search_clock_gettime=$ac_res
18191 fi
18192 rm -f core conftest.err conftest.$ac_objext \
18193     conftest$ac_exeext
18194   if ${ac_cv_search_clock_gettime+:} false; then :
18195   break
18196 fi
18197 done
18198 if ${ac_cv_search_clock_gettime+:} false; then :
18199
18200 else
18201   ac_cv_search_clock_gettime=no
18202 fi
18203 rm conftest.$ac_ext
18204 LIBS=$ac_func_search_save_LIBS
18205 fi
18206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18207 $as_echo "$ac_cv_search_clock_gettime" >&6; }
18208 ac_res=$ac_cv_search_clock_gettime
18209 if test "$ac_res" != no; then :
18210   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18211
18212 fi
18213
18214
18215         # is the event.h header libev or libevent?
18216         for ac_header in event.h
18217 do :
18218   ac_fn_c_check_header_compile "$LINENO" "event.h" "ac_cv_header_event_h" "$ac_includes_default
18219 "
18220 if test "x$ac_cv_header_event_h" = xyes; then :
18221   cat >>confdefs.h <<_ACEOF
18222 #define HAVE_EVENT_H 1
18223 _ACEOF
18224
18225 fi
18226
18227 done
18228
18229         ac_fn_c_check_decl "$LINENO" "EV_VERSION_MAJOR" "ac_cv_have_decl_EV_VERSION_MAJOR" "$ac_includes_default
18230 #include <event.h>
18231
18232 "
18233 if test "x$ac_cv_have_decl_EV_VERSION_MAJOR" = xyes; then :
18234
18235                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18236 $as_echo_n "checking for library containing event_set... " >&6; }
18237 if ${ac_cv_search_event_set+:} false; then :
18238   $as_echo_n "(cached) " >&6
18239 else
18240   ac_func_search_save_LIBS=$LIBS
18241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18242 /* end confdefs.h.  */
18243
18244 /* Override any GCC internal prototype to avoid an error.
18245    Use char because int might match the return type of a GCC
18246    builtin and then its argument prototype would still apply.  */
18247 #ifdef __cplusplus
18248 extern "C"
18249 #endif
18250 char event_set ();
18251 int
18252 main ()
18253 {
18254 return event_set ();
18255   ;
18256   return 0;
18257 }
18258 _ACEOF
18259 for ac_lib in '' ev; do
18260   if test -z "$ac_lib"; then
18261     ac_res="none required"
18262   else
18263     ac_res=-l$ac_lib
18264     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18265   fi
18266   if ac_fn_c_try_link "$LINENO"; then :
18267   ac_cv_search_event_set=$ac_res
18268 fi
18269 rm -f core conftest.err conftest.$ac_objext \
18270     conftest$ac_exeext
18271   if ${ac_cv_search_event_set+:} false; then :
18272   break
18273 fi
18274 done
18275 if ${ac_cv_search_event_set+:} false; then :
18276
18277 else
18278   ac_cv_search_event_set=no
18279 fi
18280 rm conftest.$ac_ext
18281 LIBS=$ac_func_search_save_LIBS
18282 fi
18283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18284 $as_echo "$ac_cv_search_event_set" >&6; }
18285 ac_res=$ac_cv_search_event_set
18286 if test "$ac_res" != no; then :
18287   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18288
18289 fi
18290
18291
18292 else
18293
18294                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing event_set" >&5
18295 $as_echo_n "checking for library containing event_set... " >&6; }
18296 if ${ac_cv_search_event_set+:} false; then :
18297   $as_echo_n "(cached) " >&6
18298 else
18299   ac_func_search_save_LIBS=$LIBS
18300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18301 /* end confdefs.h.  */
18302
18303 /* Override any GCC internal prototype to avoid an error.
18304    Use char because int might match the return type of a GCC
18305    builtin and then its argument prototype would still apply.  */
18306 #ifdef __cplusplus
18307 extern "C"
18308 #endif
18309 char event_set ();
18310 int
18311 main ()
18312 {
18313 return event_set ();
18314   ;
18315   return 0;
18316 }
18317 _ACEOF
18318 for ac_lib in '' event; do
18319   if test -z "$ac_lib"; then
18320     ac_res="none required"
18321   else
18322     ac_res=-l$ac_lib
18323     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18324   fi
18325   if ac_fn_c_try_link "$LINENO"; then :
18326   ac_cv_search_event_set=$ac_res
18327 fi
18328 rm -f core conftest.err conftest.$ac_objext \
18329     conftest$ac_exeext
18330   if ${ac_cv_search_event_set+:} false; then :
18331   break
18332 fi
18333 done
18334 if ${ac_cv_search_event_set+:} false; then :
18335
18336 else
18337   ac_cv_search_event_set=no
18338 fi
18339 rm conftest.$ac_ext
18340 LIBS=$ac_func_search_save_LIBS
18341 fi
18342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_event_set" >&5
18343 $as_echo "$ac_cv_search_event_set" >&6; }
18344 ac_res=$ac_cv_search_event_set
18345 if test "$ac_res" != no; then :
18346   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18347
18348 fi
18349
18350
18351 fi
18352
18353         for ac_func in event_base_free
18354 do :
18355   ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
18356 if test "x$ac_cv_func_event_base_free" = xyes; then :
18357   cat >>confdefs.h <<_ACEOF
18358 #define HAVE_EVENT_BASE_FREE 1
18359 _ACEOF
18360
18361 fi
18362 done
18363  # only in libevent 1.2 and later
18364         for ac_func in event_base_once
18365 do :
18366   ac_fn_c_check_func "$LINENO" "event_base_once" "ac_cv_func_event_base_once"
18367 if test "x$ac_cv_func_event_base_once" = xyes; then :
18368   cat >>confdefs.h <<_ACEOF
18369 #define HAVE_EVENT_BASE_ONCE 1
18370 _ACEOF
18371
18372 fi
18373 done
18374  # only in libevent 1.4.1 and later
18375         for ac_func in event_base_new
18376 do :
18377   ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
18378 if test "x$ac_cv_func_event_base_new" = xyes; then :
18379   cat >>confdefs.h <<_ACEOF
18380 #define HAVE_EVENT_BASE_NEW 1
18381 _ACEOF
18382
18383 fi
18384 done
18385  # only in libevent 1.4.1 and later
18386         for ac_func in event_base_get_method
18387 do :
18388   ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
18389 if test "x$ac_cv_func_event_base_get_method" = xyes; then :
18390   cat >>confdefs.h <<_ACEOF
18391 #define HAVE_EVENT_BASE_GET_METHOD 1
18392 _ACEOF
18393
18394 fi
18395 done
18396  # only in libevent 1.4.3 and later
18397         for ac_func in ev_loop
18398 do :
18399   ac_fn_c_check_func "$LINENO" "ev_loop" "ac_cv_func_ev_loop"
18400 if test "x$ac_cv_func_ev_loop" = xyes; then :
18401   cat >>confdefs.h <<_ACEOF
18402 #define HAVE_EV_LOOP 1
18403 _ACEOF
18404
18405 fi
18406 done
18407  # only in libev. (tested on 3.51)
18408         for ac_func in ev_default_loop
18409 do :
18410   ac_fn_c_check_func "$LINENO" "ev_default_loop" "ac_cv_func_ev_default_loop"
18411 if test "x$ac_cv_func_ev_default_loop" = xyes; then :
18412   cat >>confdefs.h <<_ACEOF
18413 #define HAVE_EV_DEFAULT_LOOP 1
18414 _ACEOF
18415
18416 fi
18417 done
18418  # only in libev. (tested on 4.00)
18419         PC_LIBEVENT_DEPENDENCY="libevent"
18420
18421         if test -n "$BAK_LDFLAGS_SET"; then
18422                 LDFLAGS="$BAK_LDFLAGS"
18423         fi
18424 else
18425
18426 $as_echo "#define USE_MINI_EVENT 1" >>confdefs.h
18427
18428 fi
18429
18430 # check for libexpat
18431
18432 # Check whether --with-libexpat was given.
18433 if test "${with_libexpat+set}" = set; then :
18434   withval=$with_libexpat;
18435 else
18436    withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
18437 fi
18438
18439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
18440 $as_echo_n "checking for libexpat... " >&6; }
18441 found_libexpat="no"
18442 for dir in $withval ; do
18443             if test -f "$dir/include/expat.h"; then
18444                 found_libexpat="yes"
18445                                 if test "$dir" != "/usr"; then
18446                     CPPFLAGS="$CPPFLAGS -I$dir/include"
18447                     LDFLAGS="$LDFLAGS -L$dir/lib"
18448                 fi
18449                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
18450 $as_echo "found in $dir" >&6; }
18451                 break;
18452             fi
18453 done
18454 if test x_$found_libexpat != x_yes; then
18455         as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
18456 fi
18457 for ac_header in expat.h
18458 do :
18459   ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
18460 "
18461 if test "x$ac_cv_header_expat_h" = xyes; then :
18462   cat >>confdefs.h <<_ACEOF
18463 #define HAVE_EXPAT_H 1
18464 _ACEOF
18465
18466 fi
18467
18468 done
18469
18470 ac_fn_c_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
18471 #include <expat.h>
18472
18473 "
18474 if test "x$ac_cv_have_decl_XML_StopParser" = xyes; then :
18475   ac_have_decl=1
18476 else
18477   ac_have_decl=0
18478 fi
18479
18480 cat >>confdefs.h <<_ACEOF
18481 #define HAVE_DECL_XML_STOPPARSER $ac_have_decl
18482 _ACEOF
18483
18484
18485 # set static linking if requested
18486
18487 staticexe=""
18488 # Check whether --enable-static-exe was given.
18489 if test "${enable_static_exe+set}" = set; then :
18490   enableval=$enable_static_exe;
18491 fi
18492
18493 if test x_$enable_static_exe = x_yes; then
18494         staticexe="-static"
18495         if test "$on_mingw" = yes; then
18496                 staticexe="-all-static"
18497                 # for static compile, include gdi32 and zlib here.
18498                 LIBS="$LIBS -lgdi32 -lz"
18499         fi
18500 fi
18501
18502 # Include systemd.m4 - begin
18503 #   macros for configuring systemd
18504 #   Copyright 2015, Sami Kerola, CloudFlare.
18505 #   BSD licensed.
18506 # Check whether --enable-systemd was given.
18507 if test "${enable_systemd+set}" = set; then :
18508   enableval=$enable_systemd;
18509 else
18510   enable_systemd=no
18511 fi
18512
18513 have_systemd=no
18514
18515
18516
18517
18518
18519
18520
18521 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
18522         if test -n "$ac_tool_prefix"; then
18523   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
18524 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
18525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18526 $as_echo_n "checking for $ac_word... " >&6; }
18527 if ${ac_cv_path_PKG_CONFIG+:} false; then :
18528   $as_echo_n "(cached) " >&6
18529 else
18530   case $PKG_CONFIG in
18531   [\\/]* | ?:[\\/]*)
18532   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
18533   ;;
18534   *)
18535   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18536 for as_dir in $PATH
18537 do
18538   IFS=$as_save_IFS
18539   test -z "$as_dir" && as_dir=.
18540     for ac_exec_ext in '' $ac_executable_extensions; do
18541   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18542     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18543     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18544     break 2
18545   fi
18546 done
18547   done
18548 IFS=$as_save_IFS
18549
18550   ;;
18551 esac
18552 fi
18553 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
18554 if test -n "$PKG_CONFIG"; then
18555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
18556 $as_echo "$PKG_CONFIG" >&6; }
18557 else
18558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18559 $as_echo "no" >&6; }
18560 fi
18561
18562
18563 fi
18564 if test -z "$ac_cv_path_PKG_CONFIG"; then
18565   ac_pt_PKG_CONFIG=$PKG_CONFIG
18566   # Extract the first word of "pkg-config", so it can be a program name with args.
18567 set dummy pkg-config; ac_word=$2
18568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18569 $as_echo_n "checking for $ac_word... " >&6; }
18570 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
18571   $as_echo_n "(cached) " >&6
18572 else
18573   case $ac_pt_PKG_CONFIG in
18574   [\\/]* | ?:[\\/]*)
18575   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
18576   ;;
18577   *)
18578   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18579 for as_dir in $PATH
18580 do
18581   IFS=$as_save_IFS
18582   test -z "$as_dir" && as_dir=.
18583     for ac_exec_ext in '' $ac_executable_extensions; do
18584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18585     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18587     break 2
18588   fi
18589 done
18590   done
18591 IFS=$as_save_IFS
18592
18593   ;;
18594 esac
18595 fi
18596 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
18597 if test -n "$ac_pt_PKG_CONFIG"; then
18598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
18599 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
18600 else
18601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18602 $as_echo "no" >&6; }
18603 fi
18604
18605   if test "x$ac_pt_PKG_CONFIG" = x; then
18606     PKG_CONFIG=""
18607   else
18608     case $cross_compiling:$ac_tool_warned in
18609 yes:)
18610 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18611 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18612 ac_tool_warned=yes ;;
18613 esac
18614     PKG_CONFIG=$ac_pt_PKG_CONFIG
18615   fi
18616 else
18617   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
18618 fi
18619
18620 fi
18621 if test -n "$PKG_CONFIG"; then
18622         _pkg_min_version=0.9.0
18623         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
18624 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
18625         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
18626                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18627 $as_echo "yes" >&6; }
18628         else
18629                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18630 $as_echo "no" >&6; }
18631                 PKG_CONFIG=""
18632         fi
18633 fi
18634 if test "x$enable_systemd" != xno; then :
18635
18636
18637
18638 pkg_failed=no
18639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
18640 $as_echo_n "checking for SYSTEMD... " >&6; }
18641
18642 if test -n "$SYSTEMD_CFLAGS"; then
18643     pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
18644  elif test -n "$PKG_CONFIG"; then
18645     if test -n "$PKG_CONFIG" && \
18646     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
18647   ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
18648   ac_status=$?
18649   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18650   test $ac_status = 0; }; then
18651   pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
18652                       test "x$?" != "x0" && pkg_failed=yes
18653 else
18654   pkg_failed=yes
18655 fi
18656  else
18657     pkg_failed=untried
18658 fi
18659 if test -n "$SYSTEMD_LIBS"; then
18660     pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
18661  elif test -n "$PKG_CONFIG"; then
18662     if test -n "$PKG_CONFIG" && \
18663     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
18664   ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
18665   ac_status=$?
18666   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18667   test $ac_status = 0; }; then
18668   pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
18669                       test "x$?" != "x0" && pkg_failed=yes
18670 else
18671   pkg_failed=yes
18672 fi
18673  else
18674     pkg_failed=untried
18675 fi
18676
18677
18678
18679 if test $pkg_failed = yes; then
18680         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18681 $as_echo "no" >&6; }
18682
18683 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
18684         _pkg_short_errors_supported=yes
18685 else
18686         _pkg_short_errors_supported=no
18687 fi
18688         if test $_pkg_short_errors_supported = yes; then
18689                 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
18690         else
18691                 SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
18692         fi
18693         # Put the nasty error message in config.log where it belongs
18694         echo "$SYSTEMD_PKG_ERRORS" >&5
18695
18696         have_systemd=no
18697 elif test $pkg_failed = untried; then
18698         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18699 $as_echo "no" >&6; }
18700         have_systemd=no
18701 else
18702         SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
18703         SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
18704         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18705 $as_echo "yes" >&6; }
18706         have_systemd=yes
18707 fi
18708                 if test "x$have_systemd" != "xyes"; then :
18709
18710
18711 pkg_failed=no
18712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD_DAEMON" >&5
18713 $as_echo_n "checking for SYSTEMD_DAEMON... " >&6; }
18714
18715 if test -n "$SYSTEMD_DAEMON_CFLAGS"; then
18716     pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS"
18717  elif test -n "$PKG_CONFIG"; then
18718     if test -n "$PKG_CONFIG" && \
18719     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
18720   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
18721   ac_status=$?
18722   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18723   test $ac_status = 0; }; then
18724   pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null`
18725                       test "x$?" != "x0" && pkg_failed=yes
18726 else
18727   pkg_failed=yes
18728 fi
18729  else
18730     pkg_failed=untried
18731 fi
18732 if test -n "$SYSTEMD_DAEMON_LIBS"; then
18733     pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS"
18734  elif test -n "$PKG_CONFIG"; then
18735     if test -n "$PKG_CONFIG" && \
18736     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5
18737   ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5
18738   ac_status=$?
18739   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18740   test $ac_status = 0; }; then
18741   pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null`
18742                       test "x$?" != "x0" && pkg_failed=yes
18743 else
18744   pkg_failed=yes
18745 fi
18746  else
18747     pkg_failed=untried
18748 fi
18749
18750
18751
18752 if test $pkg_failed = yes; then
18753         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18754 $as_echo "no" >&6; }
18755
18756 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
18757         _pkg_short_errors_supported=yes
18758 else
18759         _pkg_short_errors_supported=no
18760 fi
18761         if test $_pkg_short_errors_supported = yes; then
18762                 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
18763         else
18764                 SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1`
18765         fi
18766         # Put the nasty error message in config.log where it belongs
18767         echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5
18768
18769         have_systemd_daemon=no
18770 elif test $pkg_failed = untried; then
18771         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18772 $as_echo "no" >&6; }
18773         have_systemd_daemon=no
18774 else
18775         SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS
18776         SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS
18777         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18778 $as_echo "yes" >&6; }
18779         have_systemd_daemon=yes
18780 fi
18781                 if test "x$have_systemd_daemon" = "xyes"; then :
18782   have_systemd=yes
18783 fi
18784
18785 fi
18786         case $enable_systemd:$have_systemd in #(
18787   yes:no) :
18788     as_fn_error $? "systemd enabled but libsystemd not found" "$LINENO" 5 ;; #(
18789   *:yes) :
18790
18791 $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
18792
18793                 LIBS="$LIBS $SYSTEMD_LIBS"
18794
18795          ;; #(
18796   *) :
18797      ;;
18798 esac
18799
18800
18801 fi
18802  if test "x$have_systemd" = xyes; then
18803   USE_SYSTEMD_TRUE=
18804   USE_SYSTEMD_FALSE='#'
18805 else
18806   USE_SYSTEMD_TRUE='#'
18807   USE_SYSTEMD_FALSE=
18808 fi
18809
18810
18811 # Include systemd.m4 - end
18812
18813 # set lock checking if requested
18814 # Check whether --enable-lock_checks was given.
18815 if test "${enable_lock_checks+set}" = set; then :
18816   enableval=$enable_lock_checks;
18817 fi
18818
18819 if test x_$enable_lock_checks = x_yes; then
18820
18821 $as_echo "#define ENABLE_LOCK_CHECKS 1" >>confdefs.h
18822
18823         CHECKLOCK_OBJ="checklocks.lo"
18824
18825 fi
18826
18827
18828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
18829 $as_echo_n "checking for getaddrinfo... " >&6; }
18830 ac_cv_func_getaddrinfo=no
18831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18832 /* end confdefs.h.  */
18833
18834 #ifdef __cplusplus
18835 extern "C"
18836 {
18837 #endif
18838 char* getaddrinfo();
18839 char* (*f) () = getaddrinfo;
18840 #ifdef __cplusplus
18841 }
18842 #endif
18843 int main() {
18844         ;
18845         return 0;
18846 }
18847
18848 _ACEOF
18849 if ac_fn_c_try_link "$LINENO"; then :
18850   ac_cv_func_getaddrinfo="yes"
18851 if test "$ac_cv_header_windows_h" = "yes"; then
18852
18853 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
18854
18855         USE_WINSOCK="1"
18856         LIBS="$LIBS -lws2_32"
18857 fi
18858
18859 else
18860   ORIGLIBS="$LIBS"
18861 LIBS="$LIBS -lws2_32"
18862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18863 /* end confdefs.h.  */
18864
18865 #ifdef HAVE_WS2TCPIP_H
18866 #include <ws2tcpip.h>
18867 #endif
18868
18869 int
18870 main ()
18871 {
18872
18873         (void)getaddrinfo(NULL, NULL, NULL, NULL);
18874
18875
18876   ;
18877   return 0;
18878 }
18879 _ACEOF
18880 if ac_fn_c_try_link "$LINENO"; then :
18881
18882 ac_cv_func_getaddrinfo="yes"
18883
18884 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
18885
18886 USE_WINSOCK="1"
18887
18888 else
18889
18890 ac_cv_func_getaddrinfo="no"
18891 LIBS="$ORIGLIBS"
18892
18893 fi
18894 rm -f core conftest.err conftest.$ac_objext \
18895     conftest$ac_exeext conftest.$ac_ext
18896
18897 fi
18898 rm -f core conftest.err conftest.$ac_objext \
18899     conftest$ac_exeext conftest.$ac_ext
18900
18901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
18902 $as_echo "$ac_cv_func_getaddrinfo" >&6; }
18903 if test $ac_cv_func_getaddrinfo = yes; then
18904
18905 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
18906
18907 fi
18908
18909 if test "$USE_WINSOCK" = 1; then
18910
18911 $as_echo "#define UB_ON_WINDOWS 1" >>confdefs.h
18912
18913         for ac_header in iphlpapi.h
18914 do :
18915   ac_fn_c_check_header_compile "$LINENO" "iphlpapi.h" "ac_cv_header_iphlpapi_h" "$ac_includes_default
18916 #include <windows.h>
18917
18918 "
18919 if test "x$ac_cv_header_iphlpapi_h" = xyes; then :
18920   cat >>confdefs.h <<_ACEOF
18921 #define HAVE_IPHLPAPI_H 1
18922 _ACEOF
18923
18924 fi
18925
18926 done
18927
18928         if test -n "$ac_tool_prefix"; then
18929   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
18930 set dummy ${ac_tool_prefix}windres; ac_word=$2
18931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18932 $as_echo_n "checking for $ac_word... " >&6; }
18933 if ${ac_cv_prog_WINDRES+:} false; then :
18934   $as_echo_n "(cached) " >&6
18935 else
18936   if test -n "$WINDRES"; then
18937   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
18938 else
18939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18940 for as_dir in $PATH
18941 do
18942   IFS=$as_save_IFS
18943   test -z "$as_dir" && as_dir=.
18944     for ac_exec_ext in '' $ac_executable_extensions; do
18945   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18946     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
18947     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18948     break 2
18949   fi
18950 done
18951   done
18952 IFS=$as_save_IFS
18953
18954 fi
18955 fi
18956 WINDRES=$ac_cv_prog_WINDRES
18957 if test -n "$WINDRES"; then
18958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
18959 $as_echo "$WINDRES" >&6; }
18960 else
18961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18962 $as_echo "no" >&6; }
18963 fi
18964
18965
18966 fi
18967 if test -z "$ac_cv_prog_WINDRES"; then
18968   ac_ct_WINDRES=$WINDRES
18969   # Extract the first word of "windres", so it can be a program name with args.
18970 set dummy windres; ac_word=$2
18971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18972 $as_echo_n "checking for $ac_word... " >&6; }
18973 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
18974   $as_echo_n "(cached) " >&6
18975 else
18976   if test -n "$ac_ct_WINDRES"; then
18977   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
18978 else
18979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18980 for as_dir in $PATH
18981 do
18982   IFS=$as_save_IFS
18983   test -z "$as_dir" && as_dir=.
18984     for ac_exec_ext in '' $ac_executable_extensions; do
18985   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18986     ac_cv_prog_ac_ct_WINDRES="windres"
18987     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18988     break 2
18989   fi
18990 done
18991   done
18992 IFS=$as_save_IFS
18993
18994 fi
18995 fi
18996 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
18997 if test -n "$ac_ct_WINDRES"; then
18998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
18999 $as_echo "$ac_ct_WINDRES" >&6; }
19000 else
19001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19002 $as_echo "no" >&6; }
19003 fi
19004
19005   if test "x$ac_ct_WINDRES" = x; then
19006     WINDRES=""
19007   else
19008     case $cross_compiling:$ac_tool_warned in
19009 yes:)
19010 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19011 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19012 ac_tool_warned=yes ;;
19013 esac
19014     WINDRES=$ac_ct_WINDRES
19015   fi
19016 else
19017   WINDRES="$ac_cv_prog_WINDRES"
19018 fi
19019
19020         LIBS="$LIBS -liphlpapi"
19021         WINAPPS="unbound-service-install.exe unbound-service-remove.exe anchor-update.exe"
19022
19023         WIN_DAEMON_SRC="winrc/win_svc.c winrc/w_inst.c"
19024
19025         WIN_DAEMON_OBJ="win_svc.lo w_inst.lo"
19026
19027         WIN_DAEMON_OBJ_LINK="rsrc_unbound.o"
19028
19029         WIN_HOST_OBJ_LINK="rsrc_unbound_host.o"
19030
19031         WIN_UBANCHOR_OBJ_LINK="rsrc_unbound_anchor.o log.lo locks.lo"
19032
19033         WIN_CONTROL_OBJ_LINK="rsrc_unbound_control.o"
19034
19035         WIN_CHECKCONF_OBJ_LINK="rsrc_unbound_checkconf.o"
19036
19037 fi
19038 if test $ac_cv_func_getaddrinfo = no; then
19039         case " $LIBOBJS " in
19040   *" fake-rfc2553.$ac_objext "* ) ;;
19041   *) LIBOBJS="$LIBOBJS fake-rfc2553.$ac_objext"
19042  ;;
19043 esac
19044
19045 fi
19046 # check after getaddrinfo for its libraries
19047
19048 # check ioctlsocket
19049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctlsocket" >&5
19050 $as_echo_n "checking for ioctlsocket... " >&6; }
19051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19052 /* end confdefs.h.  */
19053
19054 #ifdef HAVE_WINSOCK2_H
19055 #include <winsock2.h>
19056 #endif
19057
19058 int
19059 main ()
19060 {
19061
19062         (void)ioctlsocket(0, 0, NULL);
19063
19064   ;
19065   return 0;
19066 }
19067 _ACEOF
19068 if ac_fn_c_try_link "$LINENO"; then :
19069
19070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19071 $as_echo "yes" >&6; }
19072
19073 $as_echo "#define HAVE_IOCTLSOCKET 1" >>confdefs.h
19074
19075
19076 else
19077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19078 $as_echo "no" >&6; }
19079 fi
19080 rm -f core conftest.err conftest.$ac_objext \
19081     conftest$ac_exeext conftest.$ac_ext
19082
19083
19084 # see if daemon(3) exists, and if it is deprecated.
19085 for ac_func in daemon
19086 do :
19087   ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
19088 if test "x$ac_cv_func_daemon" = xyes; then :
19089   cat >>confdefs.h <<_ACEOF
19090 #define HAVE_DAEMON 1
19091 _ACEOF
19092
19093 fi
19094 done
19095
19096 if test $ac_cv_func_daemon = yes; then
19097
19098
19099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon is deprecated" >&5
19100 $as_echo_n "checking if daemon is deprecated... " >&6; }
19101 cache=`echo daemon | sed 'y%.=/+-%___p_%'`
19102 if eval \${cv_cc_deprecated_$cache+:} false; then :
19103   $as_echo_n "(cached) " >&6
19104 else
19105
19106 echo '
19107 #include <stdlib.h>
19108 ' >conftest.c
19109 echo 'void f(){ (void)daemon(0, 0); }' >>conftest.c
19110 if test -z "`$CC -c conftest.c 2>&1 | grep deprecated`"; then
19111 eval "cv_cc_deprecated_$cache=no"
19112 else
19113 eval "cv_cc_deprecated_$cache=yes"
19114 fi
19115 rm -f conftest conftest.o conftest.c
19116
19117 fi
19118
19119 if eval "test \"`echo '$cv_cc_deprecated_'$cache`\" = yes"; then
19120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19121 $as_echo "yes" >&6; }
19122
19123 cat >>confdefs.h <<_ACEOF
19124 #define DEPRECATED_DAEMON 1
19125 _ACEOF
19126
19127 :
19128
19129 else
19130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19131 $as_echo "no" >&6; }
19132 :
19133
19134 fi
19135
19136 fi
19137
19138 ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "
19139 $ac_includes_default
19140 #ifdef HAVE_SYS_UN_H
19141 #include <sys/un.h>
19142 #endif
19143
19144 "
19145 if test "x$ac_cv_member_struct_sockaddr_un_sun_len" = xyes; then :
19146
19147 cat >>confdefs.h <<_ACEOF
19148 #define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
19149 _ACEOF
19150
19151
19152 fi
19153
19154 ac_fn_c_check_member "$LINENO" "struct in_pktinfo" "ipi_spec_dst" "ac_cv_member_struct_in_pktinfo_ipi_spec_dst" "
19155 $ac_includes_default
19156 #if HAVE_SYS_PARAM_H
19157 #include <sys/param.h>
19158 #endif
19159
19160 #ifdef HAVE_SYS_SOCKET_H
19161 #include <sys/socket.h>
19162 #endif
19163
19164 #ifdef HAVE_SYS_UIO_H
19165 #include <sys/uio.h>
19166 #endif
19167
19168 #ifdef HAVE_NETINET_IN_H
19169 #include <netinet/in.h>
19170 #endif
19171
19172 #ifdef HAVE_NETINET_TCP_H
19173 #include <netinet/tcp.h>
19174 #endif
19175
19176 #ifdef HAVE_ARPA_INET_H
19177 #include <arpa/inet.h>
19178 #endif
19179
19180 #ifdef HAVE_WINSOCK2_H
19181 #include <winsock2.h>
19182 #endif
19183
19184 #ifdef HAVE_WS2TCPIP_H
19185 #include <ws2tcpip.h>
19186 #endif
19187
19188 "
19189 if test "x$ac_cv_member_struct_in_pktinfo_ipi_spec_dst" = xyes; then :
19190
19191 cat >>confdefs.h <<_ACEOF
19192 #define HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST 1
19193 _ACEOF
19194
19195
19196 fi
19197
19198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
19199 $as_echo_n "checking for library containing setusercontext... " >&6; }
19200 if ${ac_cv_search_setusercontext+:} false; then :
19201   $as_echo_n "(cached) " >&6
19202 else
19203   ac_func_search_save_LIBS=$LIBS
19204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19205 /* end confdefs.h.  */
19206
19207 /* Override any GCC internal prototype to avoid an error.
19208    Use char because int might match the return type of a GCC
19209    builtin and then its argument prototype would still apply.  */
19210 #ifdef __cplusplus
19211 extern "C"
19212 #endif
19213 char setusercontext ();
19214 int
19215 main ()
19216 {
19217 return setusercontext ();
19218   ;
19219   return 0;
19220 }
19221 _ACEOF
19222 for ac_lib in '' util; do
19223   if test -z "$ac_lib"; then
19224     ac_res="none required"
19225   else
19226     ac_res=-l$ac_lib
19227     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19228   fi
19229   if ac_fn_c_try_link "$LINENO"; then :
19230   ac_cv_search_setusercontext=$ac_res
19231 fi
19232 rm -f core conftest.err conftest.$ac_objext \
19233     conftest$ac_exeext
19234   if ${ac_cv_search_setusercontext+:} false; then :
19235   break
19236 fi
19237 done
19238 if ${ac_cv_search_setusercontext+:} false; then :
19239
19240 else
19241   ac_cv_search_setusercontext=no
19242 fi
19243 rm conftest.$ac_ext
19244 LIBS=$ac_func_search_save_LIBS
19245 fi
19246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setusercontext" >&5
19247 $as_echo "$ac_cv_search_setusercontext" >&6; }
19248 ac_res=$ac_cv_search_setusercontext
19249 if test "$ac_res" != no; then :
19250   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19251
19252 fi
19253
19254 for ac_func in tzset sigprocmask fcntl getpwnam endpwent getrlimit setrlimit setsid chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent fsync
19255 do :
19256   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19257 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19258 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19259   cat >>confdefs.h <<_ACEOF
19260 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19261 _ACEOF
19262
19263 fi
19264 done
19265
19266 for ac_func in setresuid
19267 do :
19268   ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
19269 if test "x$ac_cv_func_setresuid" = xyes; then :
19270   cat >>confdefs.h <<_ACEOF
19271 #define HAVE_SETRESUID 1
19272 _ACEOF
19273
19274 else
19275   for ac_func in setreuid
19276 do :
19277   ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid"
19278 if test "x$ac_cv_func_setreuid" = xyes; then :
19279   cat >>confdefs.h <<_ACEOF
19280 #define HAVE_SETREUID 1
19281 _ACEOF
19282
19283 fi
19284 done
19285
19286 fi
19287 done
19288
19289 for ac_func in setresgid
19290 do :
19291   ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
19292 if test "x$ac_cv_func_setresgid" = xyes; then :
19293   cat >>confdefs.h <<_ACEOF
19294 #define HAVE_SETRESGID 1
19295 _ACEOF
19296
19297 else
19298   for ac_func in setregid
19299 do :
19300   ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid"
19301 if test "x$ac_cv_func_setregid" = xyes; then :
19302   cat >>confdefs.h <<_ACEOF
19303 #define HAVE_SETREGID 1
19304 _ACEOF
19305
19306 fi
19307 done
19308
19309 fi
19310 done
19311
19312
19313 # check if setreuid en setregid fail, on MacOSX10.4(darwin8).
19314 if echo $build_os | grep darwin8 > /dev/null; then
19315
19316 $as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
19317
19318 fi
19319 ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
19320 $ac_includes_default
19321 #ifdef HAVE_NETINET_IN_H
19322 #include <netinet/in.h>
19323 #endif
19324
19325 #ifdef HAVE_NETINET_TCP_H
19326 #include <netinet/tcp.h>
19327 #endif
19328
19329 #ifdef HAVE_ARPA_INET_H
19330 #include <arpa/inet.h>
19331 #endif
19332
19333 #ifdef HAVE_WINSOCK2_H
19334 #include <winsock2.h>
19335 #endif
19336
19337 #ifdef HAVE_WS2TCPIP_H
19338 #include <ws2tcpip.h>
19339 #endif
19340
19341 "
19342 if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
19343   ac_have_decl=1
19344 else
19345   ac_have_decl=0
19346 fi
19347
19348 cat >>confdefs.h <<_ACEOF
19349 #define HAVE_DECL_INET_PTON $ac_have_decl
19350 _ACEOF
19351 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
19352 $ac_includes_default
19353 #ifdef HAVE_NETINET_IN_H
19354 #include <netinet/in.h>
19355 #endif
19356
19357 #ifdef HAVE_NETINET_TCP_H
19358 #include <netinet/tcp.h>
19359 #endif
19360
19361 #ifdef HAVE_ARPA_INET_H
19362 #include <arpa/inet.h>
19363 #endif
19364
19365 #ifdef HAVE_WINSOCK2_H
19366 #include <winsock2.h>
19367 #endif
19368
19369 #ifdef HAVE_WS2TCPIP_H
19370 #include <ws2tcpip.h>
19371 #endif
19372
19373 "
19374 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
19375   ac_have_decl=1
19376 else
19377   ac_have_decl=0
19378 fi
19379
19380 cat >>confdefs.h <<_ACEOF
19381 #define HAVE_DECL_INET_NTOP $ac_have_decl
19382 _ACEOF
19383
19384 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
19385 if test "x$ac_cv_func_inet_aton" = xyes; then :
19386   $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
19387
19388 else
19389   case " $LIBOBJS " in
19390   *" inet_aton.$ac_objext "* ) ;;
19391   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
19392  ;;
19393 esac
19394
19395 fi
19396
19397
19398 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
19399 if test "x$ac_cv_func_inet_pton" = xyes; then :
19400   $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
19401
19402 else
19403   case " $LIBOBJS " in
19404   *" inet_pton.$ac_objext "* ) ;;
19405   *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
19406  ;;
19407 esac
19408
19409 fi
19410
19411
19412 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
19413 if test "x$ac_cv_func_inet_ntop" = xyes; then :
19414   $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
19415
19416 else
19417   case " $LIBOBJS " in
19418   *" inet_ntop.$ac_objext "* ) ;;
19419   *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
19420  ;;
19421 esac
19422
19423 fi
19424
19425
19426 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
19427 if test "x$ac_cv_func_snprintf" = xyes; then :
19428   $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
19429
19430 else
19431   case " $LIBOBJS " in
19432   *" snprintf.$ac_objext "* ) ;;
19433   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
19434  ;;
19435 esac
19436
19437 fi
19438
19439
19440 # test if snprintf return the proper length
19441 if test "x$ac_cv_func_snprintf" = xyes; then
19442     if test c${cross_compiling} = cno; then
19443         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct snprintf return value" >&5
19444 $as_echo_n "checking for correct snprintf return value... " >&6; }
19445         if test "$cross_compiling" = yes; then :
19446   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19447 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19448 as_fn_error $? "cannot run test program while cross compiling
19449 See \`config.log' for more details" "$LINENO" 5; }
19450 else
19451   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19452 /* end confdefs.h.  */
19453 $ac_includes_default
19454
19455 int main(void) { return !(snprintf(NULL, 0, "test") == 4); }
19456
19457 _ACEOF
19458 if ac_fn_c_try_run "$LINENO"; then :
19459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19460 $as_echo "yes" >&6; }
19461 else
19462
19463                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19464 $as_echo "no" >&6; }
19465
19466 $as_echo "#define SNPRINTF_RET_BROKEN /**/" >>confdefs.h
19467
19468                 case " $LIBOBJS " in
19469   *" snprintf.$ac_objext "* ) ;;
19470   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
19471  ;;
19472 esac
19473
19474
19475 fi
19476 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19477   conftest.$ac_objext conftest.beam conftest.$ac_ext
19478 fi
19479
19480     fi
19481 fi
19482 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
19483 if test "x$ac_cv_func_strlcat" = xyes; then :
19484   $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
19485
19486 else
19487   case " $LIBOBJS " in
19488   *" strlcat.$ac_objext "* ) ;;
19489   *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
19490  ;;
19491 esac
19492
19493 fi
19494
19495
19496 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
19497 if test "x$ac_cv_func_strlcpy" = xyes; then :
19498   $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
19499
19500 else
19501   case " $LIBOBJS " in
19502   *" strlcpy.$ac_objext "* ) ;;
19503   *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
19504  ;;
19505 esac
19506
19507 fi
19508
19509
19510 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
19511 if test "x$ac_cv_func_memmove" = xyes; then :
19512   $as_echo "#define HAVE_MEMMOVE 1" >>confdefs.h
19513
19514 else
19515   case " $LIBOBJS " in
19516   *" memmove.$ac_objext "* ) ;;
19517   *) LIBOBJS="$LIBOBJS memmove.$ac_objext"
19518  ;;
19519 esac
19520
19521 fi
19522
19523
19524 ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r"
19525 if test "x$ac_cv_func_gmtime_r" = xyes; then :
19526   $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
19527
19528 else
19529   case " $LIBOBJS " in
19530   *" gmtime_r.$ac_objext "* ) ;;
19531   *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext"
19532  ;;
19533 esac
19534
19535 fi
19536
19537
19538 ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
19539 if test "x$ac_cv_func_isblank" = xyes; then :
19540   $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
19541
19542 else
19543   case " $LIBOBJS " in
19544   *" isblank.$ac_objext "* ) ;;
19545   *) LIBOBJS="$LIBOBJS isblank.$ac_objext"
19546  ;;
19547 esac
19548
19549 fi
19550
19551
19552 LIBOBJ_WITHOUT_CTIMEARC4="$LIBOBJS"
19553
19554 ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
19555 if test "x$ac_cv_func_reallocarray" = xyes; then :
19556   $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h
19557
19558 else
19559   case " $LIBOBJS " in
19560   *" reallocarray.$ac_objext "* ) ;;
19561   *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext"
19562  ;;
19563 esac
19564
19565 fi
19566
19567
19568 if test "$USE_NSS" = "no"; then
19569         ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
19570 if test "x$ac_cv_func_arc4random" = xyes; then :
19571   $as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
19572
19573 else
19574   case " $LIBOBJS " in
19575   *" arc4random.$ac_objext "* ) ;;
19576   *) LIBOBJS="$LIBOBJS arc4random.$ac_objext"
19577  ;;
19578 esac
19579
19580 fi
19581
19582
19583         ac_fn_c_check_func "$LINENO" "arc4random_uniform" "ac_cv_func_arc4random_uniform"
19584 if test "x$ac_cv_func_arc4random_uniform" = xyes; then :
19585   $as_echo "#define HAVE_ARC4RANDOM_UNIFORM 1" >>confdefs.h
19586
19587 else
19588   case " $LIBOBJS " in
19589   *" arc4random_uniform.$ac_objext "* ) ;;
19590   *) LIBOBJS="$LIBOBJS arc4random_uniform.$ac_objext"
19591  ;;
19592 esac
19593
19594 fi
19595
19596
19597         if test "$ac_cv_func_arc4random" = "no"; then
19598                 case " $LIBOBJS " in
19599   *" explicit_bzero.$ac_objext "* ) ;;
19600   *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
19601  ;;
19602 esac
19603
19604                 case " $LIBOBJS " in
19605   *" arc4_lock.$ac_objext "* ) ;;
19606   *) LIBOBJS="$LIBOBJS arc4_lock.$ac_objext"
19607  ;;
19608 esac
19609
19610                 for ac_func in getentropy
19611 do :
19612   ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
19613 if test "x$ac_cv_func_getentropy" = xyes; then :
19614   cat >>confdefs.h <<_ACEOF
19615 #define HAVE_GETENTROPY 1
19616 _ACEOF
19617
19618 else
19619
19620                     if test "$USE_WINSOCK" = 1; then
19621                         case " $LIBOBJS " in
19622   *" getentropy_win.$ac_objext "* ) ;;
19623   *) LIBOBJS="$LIBOBJS getentropy_win.$ac_objext"
19624  ;;
19625 esac
19626
19627                     else
19628                         case "$host" in
19629                         Darwin|*darwin*)
19630                                 case " $LIBOBJS " in
19631   *" getentropy_osx.$ac_objext "* ) ;;
19632   *) LIBOBJS="$LIBOBJS getentropy_osx.$ac_objext"
19633  ;;
19634 esac
19635
19636                         ;;
19637                         *solaris*|*sunos*|SunOS)
19638                                 case " $LIBOBJS " in
19639   *" getentropy_solaris.$ac_objext "* ) ;;
19640   *) LIBOBJS="$LIBOBJS getentropy_solaris.$ac_objext"
19641  ;;
19642 esac
19643
19644                                 for ac_header in sys/sha2.h
19645 do :
19646   ac_fn_c_check_header_compile "$LINENO" "sys/sha2.h" "ac_cv_header_sys_sha2_h" "$ac_includes_default
19647 "
19648 if test "x$ac_cv_header_sys_sha2_h" = xyes; then :
19649   cat >>confdefs.h <<_ACEOF
19650 #define HAVE_SYS_SHA2_H 1
19651 _ACEOF
19652
19653 else
19654
19655                                         for ac_func in SHA512_Update
19656 do :
19657   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
19658 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
19659   cat >>confdefs.h <<_ACEOF
19660 #define HAVE_SHA512_UPDATE 1
19661 _ACEOF
19662
19663 else
19664
19665                                                 case " $LIBOBJS " in
19666   *" sha512.$ac_objext "* ) ;;
19667   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
19668  ;;
19669 esac
19670
19671
19672 fi
19673 done
19674
19675
19676 fi
19677
19678 done
19679
19680                                 if test "$ac_cv_header_sys_sha2_h" = "yes"; then
19681                                         # this lib needed for sha2 on solaris
19682                                         LIBS="$LIBS -lmd"
19683                                 fi
19684                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19685 $as_echo_n "checking for library containing clock_gettime... " >&6; }
19686 if ${ac_cv_search_clock_gettime+:} false; then :
19687   $as_echo_n "(cached) " >&6
19688 else
19689   ac_func_search_save_LIBS=$LIBS
19690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19691 /* end confdefs.h.  */
19692
19693 /* Override any GCC internal prototype to avoid an error.
19694    Use char because int might match the return type of a GCC
19695    builtin and then its argument prototype would still apply.  */
19696 #ifdef __cplusplus
19697 extern "C"
19698 #endif
19699 char clock_gettime ();
19700 int
19701 main ()
19702 {
19703 return clock_gettime ();
19704   ;
19705   return 0;
19706 }
19707 _ACEOF
19708 for ac_lib in '' rt; do
19709   if test -z "$ac_lib"; then
19710     ac_res="none required"
19711   else
19712     ac_res=-l$ac_lib
19713     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19714   fi
19715   if ac_fn_c_try_link "$LINENO"; then :
19716   ac_cv_search_clock_gettime=$ac_res
19717 fi
19718 rm -f core conftest.err conftest.$ac_objext \
19719     conftest$ac_exeext
19720   if ${ac_cv_search_clock_gettime+:} false; then :
19721   break
19722 fi
19723 done
19724 if ${ac_cv_search_clock_gettime+:} false; then :
19725
19726 else
19727   ac_cv_search_clock_gettime=no
19728 fi
19729 rm conftest.$ac_ext
19730 LIBS=$ac_func_search_save_LIBS
19731 fi
19732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19733 $as_echo "$ac_cv_search_clock_gettime" >&6; }
19734 ac_res=$ac_cv_search_clock_gettime
19735 if test "$ac_res" != no; then :
19736   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19737
19738 fi
19739
19740                         ;;
19741                         *linux*|Linux|*)
19742                                 case " $LIBOBJS " in
19743   *" getentropy_linux.$ac_objext "* ) ;;
19744   *) LIBOBJS="$LIBOBJS getentropy_linux.$ac_objext"
19745  ;;
19746 esac
19747
19748                                 for ac_func in SHA512_Update
19749 do :
19750   ac_fn_c_check_func "$LINENO" "SHA512_Update" "ac_cv_func_SHA512_Update"
19751 if test "x$ac_cv_func_SHA512_Update" = xyes; then :
19752   cat >>confdefs.h <<_ACEOF
19753 #define HAVE_SHA512_UPDATE 1
19754 _ACEOF
19755
19756 else
19757
19758
19759 $as_echo "#define COMPAT_SHA512 1" >>confdefs.h
19760
19761                                         case " $LIBOBJS " in
19762   *" sha512.$ac_objext "* ) ;;
19763   *) LIBOBJS="$LIBOBJS sha512.$ac_objext"
19764  ;;
19765 esac
19766
19767
19768 fi
19769 done
19770
19771                                 for ac_header in sys/sysctl.h
19772 do :
19773   ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
19774 "
19775 if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
19776   cat >>confdefs.h <<_ACEOF
19777 #define HAVE_SYS_SYSCTL_H 1
19778 _ACEOF
19779
19780 fi
19781
19782 done
19783
19784                                 for ac_func in getauxval
19785 do :
19786   ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
19787 if test "x$ac_cv_func_getauxval" = xyes; then :
19788   cat >>confdefs.h <<_ACEOF
19789 #define HAVE_GETAUXVAL 1
19790 _ACEOF
19791
19792 fi
19793 done
19794
19795                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19796 $as_echo_n "checking for library containing clock_gettime... " >&6; }
19797 if ${ac_cv_search_clock_gettime+:} false; then :
19798   $as_echo_n "(cached) " >&6
19799 else
19800   ac_func_search_save_LIBS=$LIBS
19801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19802 /* end confdefs.h.  */
19803
19804 /* Override any GCC internal prototype to avoid an error.
19805    Use char because int might match the return type of a GCC
19806    builtin and then its argument prototype would still apply.  */
19807 #ifdef __cplusplus
19808 extern "C"
19809 #endif
19810 char clock_gettime ();
19811 int
19812 main ()
19813 {
19814 return clock_gettime ();
19815   ;
19816   return 0;
19817 }
19818 _ACEOF
19819 for ac_lib in '' rt; do
19820   if test -z "$ac_lib"; then
19821     ac_res="none required"
19822   else
19823     ac_res=-l$ac_lib
19824     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19825   fi
19826   if ac_fn_c_try_link "$LINENO"; then :
19827   ac_cv_search_clock_gettime=$ac_res
19828 fi
19829 rm -f core conftest.err conftest.$ac_objext \
19830     conftest$ac_exeext
19831   if ${ac_cv_search_clock_gettime+:} false; then :
19832   break
19833 fi
19834 done
19835 if ${ac_cv_search_clock_gettime+:} false; then :
19836
19837 else
19838   ac_cv_search_clock_gettime=no
19839 fi
19840 rm conftest.$ac_ext
19841 LIBS=$ac_func_search_save_LIBS
19842 fi
19843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19844 $as_echo "$ac_cv_search_clock_gettime" >&6; }
19845 ac_res=$ac_cv_search_clock_gettime
19846 if test "$ac_res" != no; then :
19847   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19848
19849 fi
19850
19851                         ;;
19852                         esac
19853                     fi
19854
19855 fi
19856 done
19857
19858         fi
19859 fi
19860 LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
19861
19862 ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r"
19863 if test "x$ac_cv_func_ctime_r" = xyes; then :
19864   $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h
19865
19866 else
19867   case " $LIBOBJS " in
19868   *" ctime_r.$ac_objext "* ) ;;
19869   *) LIBOBJS="$LIBOBJS ctime_r.$ac_objext"
19870  ;;
19871 esac
19872
19873 fi
19874
19875
19876 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
19877 if test "x$ac_cv_func_strsep" = xyes; then :
19878   $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
19879
19880 else
19881   case " $LIBOBJS " in
19882   *" strsep.$ac_objext "* ) ;;
19883   *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
19884  ;;
19885 esac
19886
19887 fi
19888
19889
19890
19891 # Check whether --enable-allsymbols was given.
19892 if test "${enable_allsymbols+set}" = set; then :
19893   enableval=$enable_allsymbols;
19894 fi
19895
19896 case "$enable_allsymbols" in
19897         yes)
19898         COMMON_OBJ_ALL_SYMBOLS=""
19899         UBSYMS=""
19900         EXTRALINK="-L. -L.libs -lunbound"
19901
19902 $as_echo "#define EXPORT_ALL_SYMBOLS 1" >>confdefs.h
19903
19904         ;;
19905         no|*)
19906         COMMON_OBJ_ALL_SYMBOLS='$(COMMON_OBJ)'
19907         UBSYMS='-export-symbols $(srcdir)/libunbound/ubsyms.def'
19908         EXTRALINK=""
19909         ;;
19910 esac
19911
19912
19913
19914 if test x_$enable_lock_checks = x_yes; then
19915         UBSYMS="-export-symbols clubsyms.def"
19916         cp ${srcdir}/libunbound/ubsyms.def clubsyms.def
19917         echo lock_protect >> clubsyms.def
19918         echo lock_unprotect >> clubsyms.def
19919         echo lock_get_mem >> clubsyms.def
19920         echo checklock_start >> clubsyms.def
19921         echo checklock_stop >> clubsyms.def
19922         echo checklock_lock >> clubsyms.def
19923         echo checklock_unlock >> clubsyms.def
19924         echo checklock_init >> clubsyms.def
19925         echo checklock_thrcreate >> clubsyms.def
19926         echo checklock_thrjoin >> clubsyms.def
19927 fi
19928
19929 # check for dnstap if requested
19930
19931   # Check whether --enable-dnstap was given.
19932 if test "${enable_dnstap+set}" = set; then :
19933   enableval=$enable_dnstap; opt_dnstap=$enableval
19934 else
19935   opt_dnstap=no
19936 fi
19937
19938
19939
19940 # Check whether --with-dnstap-socket-path was given.
19941 if test "${with_dnstap_socket_path+set}" = set; then :
19942   withval=$with_dnstap_socket_path; opt_dnstap_socket_path=$withval
19943 else
19944   opt_dnstap_socket_path="$UNBOUND_RUN_DIR/dnstap.sock"
19945 fi
19946
19947
19948   if test "x$opt_dnstap" != "xno"; then
19949     # Extract the first word of "protoc-c", so it can be a program name with args.
19950 set dummy protoc-c; ac_word=$2
19951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19952 $as_echo_n "checking for $ac_word... " >&6; }
19953 if ${ac_cv_path_PROTOC_C+:} false; then :
19954   $as_echo_n "(cached) " >&6
19955 else
19956   case $PROTOC_C in
19957   [\\/]* | ?:[\\/]*)
19958   ac_cv_path_PROTOC_C="$PROTOC_C" # Let the user override the test with a path.
19959   ;;
19960   *)
19961   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19962 for as_dir in $PATH
19963 do
19964   IFS=$as_save_IFS
19965   test -z "$as_dir" && as_dir=.
19966     for ac_exec_ext in '' $ac_executable_extensions; do
19967   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19968     ac_cv_path_PROTOC_C="$as_dir/$ac_word$ac_exec_ext"
19969     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19970     break 2
19971   fi
19972 done
19973   done
19974 IFS=$as_save_IFS
19975
19976   ;;
19977 esac
19978 fi
19979 PROTOC_C=$ac_cv_path_PROTOC_C
19980 if test -n "$PROTOC_C"; then
19981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC_C" >&5
19982 $as_echo "$PROTOC_C" >&6; }
19983 else
19984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19985 $as_echo "no" >&6; }
19986 fi
19987
19988
19989     if test -z "$PROTOC_C"; then
19990       as_fn_error $? "The protoc-c program was not found. Please install protobuf-c!" "$LINENO" 5
19991     fi
19992
19993 # Check whether --with-protobuf-c was given.
19994 if test "${with_protobuf_c+set}" = set; then :
19995   withval=$with_protobuf_c;
19996           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
19997           if test -f $withval/include/google/protobuf-c/protobuf-c.h; then
19998             CFLAGS="$CFLAGS -I$withval/include/google"
19999           else
20000             CFLAGS="$CFLAGS -I$withval/include"
20001           fi
20002           LDFLAGS="$LDFLAGS -L$withval/lib"
20003
20004 else
20005
20006           # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
20007           if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
20008             CFLAGS="$CFLAGS -I/usr/include/google"
20009           else
20010             if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
20011               CFLAGS="$CFLAGS -I/usr/local/include/google"
20012               LDFLAGS="$LDFLAGS -L/usr/local/lib"
20013             fi
20014           fi
20015
20016 fi
20017
20018
20019 # Check whether --with-libfstrm was given.
20020 if test "${with_libfstrm+set}" = set; then :
20021   withval=$with_libfstrm;
20022         CFLAGS="$CFLAGS -I$withval/include"
20023         LDFLAGS="$LDFLAGS -L$withval/lib"
20024
20025 fi
20026
20027     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5
20028 $as_echo_n "checking for library containing fstrm_iothr_init... " >&6; }
20029 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20030   $as_echo_n "(cached) " >&6
20031 else
20032   ac_func_search_save_LIBS=$LIBS
20033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20034 /* end confdefs.h.  */
20035
20036 /* Override any GCC internal prototype to avoid an error.
20037    Use char because int might match the return type of a GCC
20038    builtin and then its argument prototype would still apply.  */
20039 #ifdef __cplusplus
20040 extern "C"
20041 #endif
20042 char fstrm_iothr_init ();
20043 int
20044 main ()
20045 {
20046 return fstrm_iothr_init ();
20047   ;
20048   return 0;
20049 }
20050 _ACEOF
20051 for ac_lib in '' fstrm; do
20052   if test -z "$ac_lib"; then
20053     ac_res="none required"
20054   else
20055     ac_res=-l$ac_lib
20056     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20057   fi
20058   if ac_fn_c_try_link "$LINENO"; then :
20059   ac_cv_search_fstrm_iothr_init=$ac_res
20060 fi
20061 rm -f core conftest.err conftest.$ac_objext \
20062     conftest$ac_exeext
20063   if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20064   break
20065 fi
20066 done
20067 if ${ac_cv_search_fstrm_iothr_init+:} false; then :
20068
20069 else
20070   ac_cv_search_fstrm_iothr_init=no
20071 fi
20072 rm conftest.$ac_ext
20073 LIBS=$ac_func_search_save_LIBS
20074 fi
20075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fstrm_iothr_init" >&5
20076 $as_echo "$ac_cv_search_fstrm_iothr_init" >&6; }
20077 ac_res=$ac_cv_search_fstrm_iothr_init
20078 if test "$ac_res" != no; then :
20079   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20080
20081 else
20082   as_fn_error $? "The fstrm library was not found. Please install fstrm!" "$LINENO" 5
20083 fi
20084
20085     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
20086 $as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
20087 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20088   $as_echo_n "(cached) " >&6
20089 else
20090   ac_func_search_save_LIBS=$LIBS
20091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20092 /* end confdefs.h.  */
20093
20094 /* Override any GCC internal prototype to avoid an error.
20095    Use char because int might match the return type of a GCC
20096    builtin and then its argument prototype would still apply.  */
20097 #ifdef __cplusplus
20098 extern "C"
20099 #endif
20100 char protobuf_c_message_pack ();
20101 int
20102 main ()
20103 {
20104 return protobuf_c_message_pack ();
20105   ;
20106   return 0;
20107 }
20108 _ACEOF
20109 for ac_lib in '' protobuf-c; do
20110   if test -z "$ac_lib"; then
20111     ac_res="none required"
20112   else
20113     ac_res=-l$ac_lib
20114     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20115   fi
20116   if ac_fn_c_try_link "$LINENO"; then :
20117   ac_cv_search_protobuf_c_message_pack=$ac_res
20118 fi
20119 rm -f core conftest.err conftest.$ac_objext \
20120     conftest$ac_exeext
20121   if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20122   break
20123 fi
20124 done
20125 if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
20126
20127 else
20128   ac_cv_search_protobuf_c_message_pack=no
20129 fi
20130 rm conftest.$ac_ext
20131 LIBS=$ac_func_search_save_LIBS
20132 fi
20133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_protobuf_c_message_pack" >&5
20134 $as_echo "$ac_cv_search_protobuf_c_message_pack" >&6; }
20135 ac_res=$ac_cv_search_protobuf_c_message_pack
20136 if test "$ac_res" != no; then :
20137   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20138
20139 else
20140   as_fn_error $? "The protobuf-c library was not found. Please install protobuf-c!" "$LINENO" 5
20141 fi
20142
20143
20144
20145 $as_echo "#define USE_DNSTAP 1" >>confdefs.h
20146
20147         ENABLE_DNSTAP=1
20148
20149
20150
20151         hdr_dnstap_socket_path="`echo $opt_dnstap_socket_path | sed -e 's/\\\\/\\\\\\\\/g'`"
20152
20153
20154 cat >>confdefs.h <<_ACEOF
20155 #define DNSTAP_SOCKET_PATH "$hdr_dnstap_socket_path"
20156 _ACEOF
20157
20158
20159         DNSTAP_SRC="dnstap/dnstap.c dnstap/dnstap.pb-c.c"
20160
20161         DNSTAP_OBJ="dnstap.lo dnstap.pb-c.lo"
20162
20163
20164   else
20165
20166         ENABLE_DNSTAP=0
20167
20168
20169
20170   fi
20171
20172
20173 # check for cachedb if requested
20174 # Check whether --enable-cachedb was given.
20175 if test "${enable_cachedb+set}" = set; then :
20176   enableval=$enable_cachedb;
20177 fi
20178
20179 case "$enable_cachedb" in
20180     yes)
20181
20182 $as_echo "#define USE_CACHEDB 1" >>confdefs.h
20183
20184         ;;
20185     no|*)
20186         # nothing
20187         ;;
20188 esac
20189
20190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${MAKE:-make} supports $< with implicit rule in scope" >&5
20191 $as_echo_n "checking if ${MAKE:-make} supports $< with implicit rule in scope... " >&6; }
20192 # on openBSD, the implicit rule make $< work.
20193 # on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
20194 # gmake works.
20195 cat >conftest.make <<EOF
20196 all:    conftest.lo
20197
20198 conftest.lo foo.lo bla.lo:
20199         if test -f "\$<"; then touch \$@; fi
20200
20201 .SUFFIXES: .lo
20202 .c.lo:
20203         if test -f "\$<"; then touch \$@; fi
20204
20205 conftest.lo:        conftest.dir/conftest.c
20206 EOF
20207 mkdir conftest.dir
20208 touch conftest.dir/conftest.c
20209 rm -f conftest.lo conftest.c
20210 ${MAKE:-make} -f conftest.make >/dev/null
20211 rm -f conftest.make conftest.c conftest.dir/conftest.c
20212 rm -rf conftest.dir
20213 if test ! -f conftest.lo; then
20214         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20215 $as_echo "no" >&6; }
20216         SOURCEDETERMINE='echo "$^" | awk "-F " "{print \$$1;}" > .source'
20217         SOURCEFILE='`cat .source`'
20218 else
20219         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20220 $as_echo "yes" >&6; }
20221         SOURCEDETERMINE=':'
20222         SOURCEFILE='$<'
20223 fi
20224 rm -f conftest.lo
20225
20226
20227
20228 # see if we want to build the library or everything
20229 ALLTARGET="alltargets"
20230 INSTALLTARGET="install-all"
20231
20232 # Check whether --with-libunbound-only was given.
20233 if test "${with_libunbound_only+set}" = set; then :
20234   withval=$with_libunbound_only;
20235         if test "$withval" = "yes"; then
20236                 ALLTARGET="lib"
20237                 INSTALLTARGET="install-lib"
20238         fi
20239
20240 fi
20241
20242
20243
20244
20245
20246   { $as_echo "$as_me:${as_lineno-$LINENO}: Stripping extension flags..." >&5
20247 $as_echo "$as_me: Stripping extension flags..." >&6;}
20248
20249   if echo $CFLAGS | grep " -D_GNU_SOURCE" >/dev/null 2>&1; then
20250     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_GNU_SOURCE//g'`"
20251
20252 $as_echo "#define OMITTED__D_GNU_SOURCE 1" >>confdefs.h
20253
20254   fi
20255
20256
20257   if echo $CFLAGS | grep " -D_BSD_SOURCE" >/dev/null 2>&1; then
20258     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_BSD_SOURCE//g'`"
20259
20260 $as_echo "#define OMITTED__D_BSD_SOURCE 1" >>confdefs.h
20261
20262   fi
20263
20264
20265   if echo $CFLAGS | grep " -D_DEFAULT_SOURCE" >/dev/null 2>&1; then
20266     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_DEFAULT_SOURCE//g'`"
20267
20268 $as_echo "#define OMITTED__D_DEFAULT_SOURCE 1" >>confdefs.h
20269
20270   fi
20271
20272
20273   if echo $CFLAGS | grep " -D__EXTENSIONS__" >/dev/null 2>&1; then
20274     CFLAGS="`echo $CFLAGS | sed -e 's/ -D__EXTENSIONS__//g'`"
20275
20276 $as_echo "#define OMITTED__D__EXTENSIONS__ 1" >>confdefs.h
20277
20278   fi
20279
20280
20281   if echo $CFLAGS | grep " -D_POSIX_C_SOURCE=200112" >/dev/null 2>&1; then
20282     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_POSIX_C_SOURCE=200112//g'`"
20283
20284 $as_echo "#define OMITTED__D_POSIX_C_SOURCE_200112 1" >>confdefs.h
20285
20286   fi
20287
20288
20289   if echo $CFLAGS | grep " -D_XOPEN_SOURCE=600" >/dev/null 2>&1; then
20290     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE=600//g'`"
20291
20292 $as_echo "#define OMITTED__D_XOPEN_SOURCE_600 1" >>confdefs.h
20293
20294   fi
20295
20296
20297   if echo $CFLAGS | grep " -D_XOPEN_SOURCE_EXTENDED=1" >/dev/null 2>&1; then
20298     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_XOPEN_SOURCE_EXTENDED=1//g'`"
20299
20300 $as_echo "#define OMITTED__D_XOPEN_SOURCE_EXTENDED_1 1" >>confdefs.h
20301
20302   fi
20303
20304
20305   if echo $CFLAGS | grep " -D_ALL_SOURCE" >/dev/null 2>&1; then
20306     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_ALL_SOURCE//g'`"
20307
20308 $as_echo "#define OMITTED__D_ALL_SOURCE 1" >>confdefs.h
20309
20310   fi
20311
20312
20313   if echo $CFLAGS | grep " -D_LARGEFILE_SOURCE=1" >/dev/null 2>&1; then
20314     CFLAGS="`echo $CFLAGS | sed -e 's/ -D_LARGEFILE_SOURCE=1//g'`"
20315
20316 $as_echo "#define OMITTED__D_LARGEFILE_SOURCE_1 1" >>confdefs.h
20317
20318   fi
20319
20320
20321 LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
20322
20323
20324 cat >>confdefs.h <<_ACEOF
20325 #define MAXSYSLOGMSGLEN 10240
20326 _ACEOF
20327
20328
20329
20330
20331 version=1.6.1
20332
20333 date=`date +'%b %e, %Y'`
20334
20335
20336 ac_config_files="$ac_config_files Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 doc/unbound-host.1 smallapp/unbound-control-setup.sh dnstap/dnstap_config.h contrib/libunbound.pc contrib/unbound.socket contrib/unbound.service"
20337
20338 ac_config_headers="$ac_config_headers config.h"
20339
20340 cat >confcache <<\_ACEOF
20341 # This file is a shell script that caches the results of configure
20342 # tests run on this system so they can be shared between configure
20343 # scripts and configure runs, see configure's option --config-cache.
20344 # It is not useful on other systems.  If it contains results you don't
20345 # want to keep, you may remove or edit it.
20346 #
20347 # config.status only pays attention to the cache file if you give it
20348 # the --recheck option to rerun configure.
20349 #
20350 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20351 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20352 # following values.
20353
20354 _ACEOF
20355
20356 # The following way of writing the cache mishandles newlines in values,
20357 # but we know of no workaround that is simple, portable, and efficient.
20358 # So, we kill variables containing newlines.
20359 # Ultrix sh set writes to stderr and can't be redirected directly,
20360 # and sets the high bit in the cache file unless we assign to the vars.
20361 (
20362   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20363     eval ac_val=\$$ac_var
20364     case $ac_val in #(
20365     *${as_nl}*)
20366       case $ac_var in #(
20367       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20368 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
20369       esac
20370       case $ac_var in #(
20371       _ | IFS | as_nl) ;; #(
20372       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20373       *) { eval $ac_var=; unset $ac_var;} ;;
20374       esac ;;
20375     esac
20376   done
20377
20378   (set) 2>&1 |
20379     case $as_nl`(ac_space=' '; set) 2>&1` in #(
20380     *${as_nl}ac_space=\ *)
20381       # `set' does not quote correctly, so add quotes: double-quote
20382       # substitution turns \\\\ into \\, and sed turns \\ into \.
20383       sed -n \
20384         "s/'/'\\\\''/g;
20385           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20386       ;; #(
20387     *)
20388       # `set' quotes correctly as required by POSIX, so do not add quotes.
20389       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20390       ;;
20391     esac |
20392     sort
20393 ) |
20394   sed '
20395      /^ac_cv_env_/b end
20396      t clear
20397      :clear
20398      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20399      t end
20400      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20401      :end' >>confcache
20402 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20403   if test -w "$cache_file"; then
20404     if test "x$cache_file" != "x/dev/null"; then
20405       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
20406 $as_echo "$as_me: updating cache $cache_file" >&6;}
20407       if test ! -f "$cache_file" || test -h "$cache_file"; then
20408         cat confcache >"$cache_file"
20409       else
20410         case $cache_file in #(
20411         */* | ?:*)
20412           mv -f confcache "$cache_file"$$ &&
20413           mv -f "$cache_file"$$ "$cache_file" ;; #(
20414         *)
20415           mv -f confcache "$cache_file" ;;
20416         esac
20417       fi
20418     fi
20419   else
20420     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20421 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20422   fi
20423 fi
20424 rm -f confcache
20425
20426 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20427 # Let make expand exec_prefix.
20428 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20429
20430 DEFS=-DHAVE_CONFIG_H
20431
20432 ac_libobjs=
20433 ac_ltlibobjs=
20434 U=
20435 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20436   # 1. Remove the extension, and $U if already installed.
20437   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20438   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
20439   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
20440   #    will be set to the directory where LIBOBJS objects are built.
20441   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20442   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
20443 done
20444 LIBOBJS=$ac_libobjs
20445
20446 LTLIBOBJS=$ac_ltlibobjs
20447
20448
20449 if test -z "${USE_SYSTEMD_TRUE}" && test -z "${USE_SYSTEMD_FALSE}"; then
20450   as_fn_error $? "conditional \"USE_SYSTEMD\" was never defined.
20451 Usually this means the macro was only invoked conditionally." "$LINENO" 5
20452 fi
20453
20454 : "${CONFIG_STATUS=./config.status}"
20455 ac_write_fail=0
20456 ac_clean_files_save=$ac_clean_files
20457 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20458 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20459 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
20460 as_write_fail=0
20461 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
20462 #! $SHELL
20463 # Generated by $as_me.
20464 # Run this file to recreate the current configuration.
20465 # Compiler output produced by configure, useful for debugging
20466 # configure, is in config.log if it exists.
20467
20468 debug=false
20469 ac_cs_recheck=false
20470 ac_cs_silent=false
20471
20472 SHELL=\${CONFIG_SHELL-$SHELL}
20473 export SHELL
20474 _ASEOF
20475 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20476 ## -------------------- ##
20477 ## M4sh Initialization. ##
20478 ## -------------------- ##
20479
20480 # Be more Bourne compatible
20481 DUALCASE=1; export DUALCASE # for MKS sh
20482 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20483   emulate sh
20484   NULLCMD=:
20485   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20486   # is contrary to our usage.  Disable this feature.
20487   alias -g '${1+"$@"}'='"$@"'
20488   setopt NO_GLOB_SUBST
20489 else
20490   case `(set -o) 2>/dev/null` in #(
20491   *posix*) :
20492     set -o posix ;; #(
20493   *) :
20494      ;;
20495 esac
20496 fi
20497
20498
20499 as_nl='
20500 '
20501 export as_nl
20502 # Printing a long string crashes Solaris 7 /usr/bin/printf.
20503 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
20504 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
20505 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
20506 # Prefer a ksh shell builtin over an external printf program on Solaris,
20507 # but without wasting forks for bash or zsh.
20508 if test -z "$BASH_VERSION$ZSH_VERSION" \
20509     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
20510   as_echo='print -r --'
20511   as_echo_n='print -rn --'
20512 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
20513   as_echo='printf %s\n'
20514   as_echo_n='printf %s'
20515 else
20516   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
20517     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
20518     as_echo_n='/usr/ucb/echo -n'
20519   else
20520     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20521     as_echo_n_body='eval
20522       arg=$1;
20523       case $arg in #(
20524       *"$as_nl"*)
20525         expr "X$arg" : "X\\(.*\\)$as_nl";
20526         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20527       esac;
20528       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20529     '
20530     export as_echo_n_body
20531     as_echo_n='sh -c $as_echo_n_body as_echo'
20532   fi
20533   export as_echo_body
20534   as_echo='sh -c $as_echo_body as_echo'
20535 fi
20536
20537 # The user is always right.
20538 if test "${PATH_SEPARATOR+set}" != set; then
20539   PATH_SEPARATOR=:
20540   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20541     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20542       PATH_SEPARATOR=';'
20543   }
20544 fi
20545
20546
20547 # IFS
20548 # We need space, tab and new line, in precisely that order.  Quoting is
20549 # there to prevent editors from complaining about space-tab.
20550 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20551 # splitting by setting IFS to empty value.)
20552 IFS=" ""        $as_nl"
20553
20554 # Find who we are.  Look in the path if we contain no directory separator.
20555 as_myself=
20556 case $0 in #((
20557   *[\\/]* ) as_myself=$0 ;;
20558   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20559 for as_dir in $PATH
20560 do
20561   IFS=$as_save_IFS
20562   test -z "$as_dir" && as_dir=.
20563     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20564   done
20565 IFS=$as_save_IFS
20566
20567      ;;
20568 esac
20569 # We did not find ourselves, most probably we were run as `sh COMMAND'
20570 # in which case we are not to be found in the path.
20571 if test "x$as_myself" = x; then
20572   as_myself=$0
20573 fi
20574 if test ! -f "$as_myself"; then
20575   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20576   exit 1
20577 fi
20578
20579 # Unset variables that we do not need and which cause bugs (e.g. in
20580 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
20581 # suppresses any "Segmentation fault" message there.  '((' could
20582 # trigger a bug in pdksh 5.2.14.
20583 for as_var in BASH_ENV ENV MAIL MAILPATH
20584 do eval test x\${$as_var+set} = xset \
20585   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20586 done
20587 PS1='$ '
20588 PS2='> '
20589 PS4='+ '
20590
20591 # NLS nuisances.
20592 LC_ALL=C
20593 export LC_ALL
20594 LANGUAGE=C
20595 export LANGUAGE
20596
20597 # CDPATH.
20598 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20599
20600
20601 # as_fn_error STATUS ERROR [LINENO LOG_FD]
20602 # ----------------------------------------
20603 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20604 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20605 # script with STATUS, using 1 if that was 0.
20606 as_fn_error ()
20607 {
20608   as_status=$1; test $as_status -eq 0 && as_status=1
20609   if test "$4"; then
20610     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20611     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
20612   fi
20613   $as_echo "$as_me: error: $2" >&2
20614   as_fn_exit $as_status
20615 } # as_fn_error
20616
20617
20618 # as_fn_set_status STATUS
20619 # -----------------------
20620 # Set $? to STATUS, without forking.
20621 as_fn_set_status ()
20622 {
20623   return $1
20624 } # as_fn_set_status
20625
20626 # as_fn_exit STATUS
20627 # -----------------
20628 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20629 as_fn_exit ()
20630 {
20631   set +e
20632   as_fn_set_status $1
20633   exit $1
20634 } # as_fn_exit
20635
20636 # as_fn_unset VAR
20637 # ---------------
20638 # Portably unset VAR.
20639 as_fn_unset ()
20640 {
20641   { eval $1=; unset $1;}
20642 }
20643 as_unset=as_fn_unset
20644 # as_fn_append VAR VALUE
20645 # ----------------------
20646 # Append the text in VALUE to the end of the definition contained in VAR. Take
20647 # advantage of any shell optimizations that allow amortized linear growth over
20648 # repeated appends, instead of the typical quadratic growth present in naive
20649 # implementations.
20650 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20651   eval 'as_fn_append ()
20652   {
20653     eval $1+=\$2
20654   }'
20655 else
20656   as_fn_append ()
20657   {
20658     eval $1=\$$1\$2
20659   }
20660 fi # as_fn_append
20661
20662 # as_fn_arith ARG...
20663 # ------------------
20664 # Perform arithmetic evaluation on the ARGs, and store the result in the
20665 # global $as_val. Take advantage of shells that can avoid forks. The arguments
20666 # must be portable across $(()) and expr.
20667 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20668   eval 'as_fn_arith ()
20669   {
20670     as_val=$(( $* ))
20671   }'
20672 else
20673   as_fn_arith ()
20674   {
20675     as_val=`expr "$@" || test $? -eq 1`
20676   }
20677 fi # as_fn_arith
20678
20679
20680 if expr a : '\(a\)' >/dev/null 2>&1 &&
20681    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20682   as_expr=expr
20683 else
20684   as_expr=false
20685 fi
20686
20687 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20688   as_basename=basename
20689 else
20690   as_basename=false
20691 fi
20692
20693 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20694   as_dirname=dirname
20695 else
20696   as_dirname=false
20697 fi
20698
20699 as_me=`$as_basename -- "$0" ||
20700 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20701          X"$0" : 'X\(//\)$' \| \
20702          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20703 $as_echo X/"$0" |
20704     sed '/^.*\/\([^/][^/]*\)\/*$/{
20705             s//\1/
20706             q
20707           }
20708           /^X\/\(\/\/\)$/{
20709             s//\1/
20710             q
20711           }
20712           /^X\/\(\/\).*/{
20713             s//\1/
20714             q
20715           }
20716           s/.*/./; q'`
20717
20718 # Avoid depending upon Character Ranges.
20719 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20720 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20721 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20722 as_cr_digits='0123456789'
20723 as_cr_alnum=$as_cr_Letters$as_cr_digits
20724
20725 ECHO_C= ECHO_N= ECHO_T=
20726 case `echo -n x` in #(((((
20727 -n*)
20728   case `echo 'xy\c'` in
20729   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
20730   xy)  ECHO_C='\c';;
20731   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
20732        ECHO_T=' ';;
20733   esac;;
20734 *)
20735   ECHO_N='-n';;
20736 esac
20737
20738 rm -f conf$$ conf$$.exe conf$$.file
20739 if test -d conf$$.dir; then
20740   rm -f conf$$.dir/conf$$.file
20741 else
20742   rm -f conf$$.dir
20743   mkdir conf$$.dir 2>/dev/null
20744 fi
20745 if (echo >conf$$.file) 2>/dev/null; then
20746   if ln -s conf$$.file conf$$ 2>/dev/null; then
20747     as_ln_s='ln -s'
20748     # ... but there are two gotchas:
20749     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20750     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20751     # In both cases, we have to default to `cp -pR'.
20752     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20753       as_ln_s='cp -pR'
20754   elif ln conf$$.file conf$$ 2>/dev/null; then
20755     as_ln_s=ln
20756   else
20757     as_ln_s='cp -pR'
20758   fi
20759 else
20760   as_ln_s='cp -pR'
20761 fi
20762 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20763 rmdir conf$$.dir 2>/dev/null
20764
20765
20766 # as_fn_mkdir_p
20767 # -------------
20768 # Create "$as_dir" as a directory, including parents if necessary.
20769 as_fn_mkdir_p ()
20770 {
20771
20772   case $as_dir in #(
20773   -*) as_dir=./$as_dir;;
20774   esac
20775   test -d "$as_dir" || eval $as_mkdir_p || {
20776     as_dirs=
20777     while :; do
20778       case $as_dir in #(
20779       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20780       *) as_qdir=$as_dir;;
20781       esac
20782       as_dirs="'$as_qdir' $as_dirs"
20783       as_dir=`$as_dirname -- "$as_dir" ||
20784 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20785          X"$as_dir" : 'X\(//\)[^/]' \| \
20786          X"$as_dir" : 'X\(//\)$' \| \
20787          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20788 $as_echo X"$as_dir" |
20789     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20790             s//\1/
20791             q
20792           }
20793           /^X\(\/\/\)[^/].*/{
20794             s//\1/
20795             q
20796           }
20797           /^X\(\/\/\)$/{
20798             s//\1/
20799             q
20800           }
20801           /^X\(\/\).*/{
20802             s//\1/
20803             q
20804           }
20805           s/.*/./; q'`
20806       test -d "$as_dir" && break
20807     done
20808     test -z "$as_dirs" || eval "mkdir $as_dirs"
20809   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20810
20811
20812 } # as_fn_mkdir_p
20813 if mkdir -p . 2>/dev/null; then
20814   as_mkdir_p='mkdir -p "$as_dir"'
20815 else
20816   test -d ./-p && rmdir ./-p
20817   as_mkdir_p=false
20818 fi
20819
20820
20821 # as_fn_executable_p FILE
20822 # -----------------------
20823 # Test if FILE is an executable regular file.
20824 as_fn_executable_p ()
20825 {
20826   test -f "$1" && test -x "$1"
20827 } # as_fn_executable_p
20828 as_test_x='test -x'
20829 as_executable_p=as_fn_executable_p
20830
20831 # Sed expression to map a string onto a valid CPP name.
20832 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20833
20834 # Sed expression to map a string onto a valid variable name.
20835 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20836
20837
20838 exec 6>&1
20839 ## ----------------------------------- ##
20840 ## Main body of $CONFIG_STATUS script. ##
20841 ## ----------------------------------- ##
20842 _ASEOF
20843 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20844
20845 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20846 # Save the log message, to keep $0 and so on meaningful, and to
20847 # report actual input values of CONFIG_FILES etc. instead of their
20848 # values after options handling.
20849 ac_log="
20850 This file was extended by unbound $as_me 1.6.1, which was
20851 generated by GNU Autoconf 2.69.  Invocation command line was
20852
20853   CONFIG_FILES    = $CONFIG_FILES
20854   CONFIG_HEADERS  = $CONFIG_HEADERS
20855   CONFIG_LINKS    = $CONFIG_LINKS
20856   CONFIG_COMMANDS = $CONFIG_COMMANDS
20857   $ $0 $@
20858
20859 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20860 "
20861
20862 _ACEOF
20863
20864 case $ac_config_files in *"
20865 "*) set x $ac_config_files; shift; ac_config_files=$*;;
20866 esac
20867
20868 case $ac_config_headers in *"
20869 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20870 esac
20871
20872
20873 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20874 # Files that config.status was made for.
20875 config_files="$ac_config_files"
20876 config_headers="$ac_config_headers"
20877 config_commands="$ac_config_commands"
20878
20879 _ACEOF
20880
20881 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20882 ac_cs_usage="\
20883 \`$as_me' instantiates files and other configuration actions
20884 from templates according to the current configuration.  Unless the files
20885 and actions are specified as TAGs, all are instantiated by default.
20886
20887 Usage: $0 [OPTION]... [TAG]...
20888
20889   -h, --help       print this help, then exit
20890   -V, --version    print version number and configuration settings, then exit
20891       --config     print configuration, then exit
20892   -q, --quiet, --silent
20893                    do not print progress messages
20894   -d, --debug      don't remove temporary files
20895       --recheck    update $as_me by reconfiguring in the same conditions
20896       --file=FILE[:TEMPLATE]
20897                    instantiate the configuration file FILE
20898       --header=FILE[:TEMPLATE]
20899                    instantiate the configuration header FILE
20900
20901 Configuration files:
20902 $config_files
20903
20904 Configuration headers:
20905 $config_headers
20906
20907 Configuration commands:
20908 $config_commands
20909
20910 Report bugs to <unbound-bugs@nlnetlabs.nl>."
20911
20912 _ACEOF
20913 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20914 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20915 ac_cs_version="\\
20916 unbound config.status 1.6.1
20917 configured by $0, generated by GNU Autoconf 2.69,
20918   with options \\"\$ac_cs_config\\"
20919
20920 Copyright (C) 2012 Free Software Foundation, Inc.
20921 This config.status script is free software; the Free Software Foundation
20922 gives unlimited permission to copy, distribute and modify it."
20923
20924 ac_pwd='$ac_pwd'
20925 srcdir='$srcdir'
20926 AWK='$AWK'
20927 test -n "\$AWK" || AWK=awk
20928 _ACEOF
20929
20930 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20931 # The default lists apply if the user does not specify any file.
20932 ac_need_defaults=:
20933 while test $# != 0
20934 do
20935   case $1 in
20936   --*=?*)
20937     ac_option=`expr "X$1" : 'X\([^=]*\)='`
20938     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20939     ac_shift=:
20940     ;;
20941   --*=)
20942     ac_option=`expr "X$1" : 'X\([^=]*\)='`
20943     ac_optarg=
20944     ac_shift=:
20945     ;;
20946   *)
20947     ac_option=$1
20948     ac_optarg=$2
20949     ac_shift=shift
20950     ;;
20951   esac
20952
20953   case $ac_option in
20954   # Handling of the options.
20955   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20956     ac_cs_recheck=: ;;
20957   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20958     $as_echo "$ac_cs_version"; exit ;;
20959   --config | --confi | --conf | --con | --co | --c )
20960     $as_echo "$ac_cs_config"; exit ;;
20961   --debug | --debu | --deb | --de | --d | -d )
20962     debug=: ;;
20963   --file | --fil | --fi | --f )
20964     $ac_shift
20965     case $ac_optarg in
20966     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20967     '') as_fn_error $? "missing file argument" ;;
20968     esac
20969     as_fn_append CONFIG_FILES " '$ac_optarg'"
20970     ac_need_defaults=false;;
20971   --header | --heade | --head | --hea )
20972     $ac_shift
20973     case $ac_optarg in
20974     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20975     esac
20976     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20977     ac_need_defaults=false;;
20978   --he | --h)
20979     # Conflict between --help and --header
20980     as_fn_error $? "ambiguous option: \`$1'
20981 Try \`$0 --help' for more information.";;
20982   --help | --hel | -h )
20983     $as_echo "$ac_cs_usage"; exit ;;
20984   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20985   | -silent | --silent | --silen | --sile | --sil | --si | --s)
20986     ac_cs_silent=: ;;
20987
20988   # This is an error.
20989   -*) as_fn_error $? "unrecognized option: \`$1'
20990 Try \`$0 --help' for more information." ;;
20991
20992   *) as_fn_append ac_config_targets " $1"
20993      ac_need_defaults=false ;;
20994
20995   esac
20996   shift
20997 done
20998
20999 ac_configure_extra_args=
21000
21001 if $ac_cs_silent; then
21002   exec 6>/dev/null
21003   ac_configure_extra_args="$ac_configure_extra_args --silent"
21004 fi
21005
21006 _ACEOF
21007 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21008 if \$ac_cs_recheck; then
21009   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21010   shift
21011   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
21012   CONFIG_SHELL='$SHELL'
21013   export CONFIG_SHELL
21014   exec "\$@"
21015 fi
21016
21017 _ACEOF
21018 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21019 exec 5>>config.log
21020 {
21021   echo
21022   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21023 ## Running $as_me. ##
21024 _ASBOX
21025   $as_echo "$ac_log"
21026 } >&5
21027
21028 _ACEOF
21029 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21030 #
21031 # INIT-COMMANDS
21032 #
21033
21034
21035 # The HP-UX ksh and POSIX shell print the target directory to stdout
21036 # if CDPATH is set.
21037 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21038
21039 sed_quote_subst='$sed_quote_subst'
21040 double_quote_subst='$double_quote_subst'
21041 delay_variable_subst='$delay_variable_subst'
21042 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
21043 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
21044 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
21045 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
21046 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
21047 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
21048 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
21049 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
21050 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
21051 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
21052 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
21053 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
21054 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
21055 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
21056 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
21057 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
21058 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
21059 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
21060 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
21061 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
21062 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
21063 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
21064 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
21065 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
21066 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
21067 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
21068 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
21069 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
21070 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
21071 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
21072 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
21073 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
21074 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
21075 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
21076 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
21077 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
21078 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
21079 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
21080 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
21081 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
21082 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
21083 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
21084 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
21085 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
21086 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
21087 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
21088 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
21089 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
21090 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
21091 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
21092 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
21093 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
21094 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
21095 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
21096 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
21097 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
21098 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
21099 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
21100 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"`'
21101 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
21102 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
21103 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
21104 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
21105 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
21106 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
21107 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
21108 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
21109 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
21110 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
21111 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
21112 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
21113 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
21114 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
21115 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
21116 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
21117 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
21118 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
21119 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
21120 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
21121 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
21122 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
21123 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
21124 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
21125 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
21126 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
21127 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
21128 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
21129 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
21130 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
21131 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
21132 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
21133 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
21134 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
21135 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
21136 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
21137 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
21138 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
21139 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
21140 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
21141 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
21142 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
21143 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
21144 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
21145 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
21146 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
21147 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
21148 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
21149 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
21150 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
21151 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
21152 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
21153 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
21154 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
21155 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
21156 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
21157 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
21158 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
21159 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
21160 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
21161 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
21162 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
21163 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
21164 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
21165 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
21166 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
21167 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
21168 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
21169 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
21170 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
21171 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
21172 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
21173 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
21174 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
21175 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
21176 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
21177
21178 LTCC='$LTCC'
21179 LTCFLAGS='$LTCFLAGS'
21180 compiler='$compiler_DEFAULT'
21181
21182 # A function that is used when there is no print builtin or printf.
21183 func_fallback_echo ()
21184 {
21185   eval 'cat <<_LTECHO_EOF
21186 \$1
21187 _LTECHO_EOF'
21188 }
21189
21190 # Quote evaled strings.
21191 for var in SHELL \
21192 ECHO \
21193 PATH_SEPARATOR \
21194 SED \
21195 GREP \
21196 EGREP \
21197 FGREP \
21198 LD \
21199 NM \
21200 LN_S \
21201 lt_SP2NL \
21202 lt_NL2SP \
21203 reload_flag \
21204 OBJDUMP \
21205 deplibs_check_method \
21206 file_magic_cmd \
21207 file_magic_glob \
21208 want_nocaseglob \
21209 DLLTOOL \
21210 sharedlib_from_linklib_cmd \
21211 AR \
21212 AR_FLAGS \
21213 archiver_list_spec \
21214 STRIP \
21215 RANLIB \
21216 CC \
21217 CFLAGS \
21218 compiler \
21219 lt_cv_sys_global_symbol_pipe \
21220 lt_cv_sys_global_symbol_to_cdecl \
21221 lt_cv_sys_global_symbol_to_import \
21222 lt_cv_sys_global_symbol_to_c_name_address \
21223 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
21224 lt_cv_nm_interface \
21225 nm_file_list_spec \
21226 lt_cv_truncate_bin \
21227 lt_prog_compiler_no_builtin_flag \
21228 lt_prog_compiler_pic \
21229 lt_prog_compiler_wl \
21230 lt_prog_compiler_static \
21231 lt_cv_prog_compiler_c_o \
21232 need_locks \
21233 MANIFEST_TOOL \
21234 DSYMUTIL \
21235 NMEDIT \
21236 LIPO \
21237 OTOOL \
21238 OTOOL64 \
21239 shrext_cmds \
21240 export_dynamic_flag_spec \
21241 whole_archive_flag_spec \
21242 compiler_needs_object \
21243 with_gnu_ld \
21244 allow_undefined_flag \
21245 no_undefined_flag \
21246 hardcode_libdir_flag_spec \
21247 hardcode_libdir_separator \
21248 exclude_expsyms \
21249 include_expsyms \
21250 file_list_spec \
21251 variables_saved_for_relink \
21252 libname_spec \
21253 library_names_spec \
21254 soname_spec \
21255 install_override_mode \
21256 finish_eval \
21257 old_striplib \
21258 striplib; do
21259     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
21260     *[\\\\\\\`\\"\\\$]*)
21261       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
21262       ;;
21263     *)
21264       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
21265       ;;
21266     esac
21267 done
21268
21269 # Double-quote double-evaled strings.
21270 for var in reload_cmds \
21271 old_postinstall_cmds \
21272 old_postuninstall_cmds \
21273 old_archive_cmds \
21274 extract_expsyms_cmds \
21275 old_archive_from_new_cmds \
21276 old_archive_from_expsyms_cmds \
21277 archive_cmds \
21278 archive_expsym_cmds \
21279 module_cmds \
21280 module_expsym_cmds \
21281 export_symbols_cmds \
21282 prelink_cmds \
21283 postlink_cmds \
21284 postinstall_cmds \
21285 postuninstall_cmds \
21286 finish_cmds \
21287 sys_lib_search_path_spec \
21288 configure_time_dlsearch_path \
21289 configure_time_lt_sys_library_path; do
21290     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
21291     *[\\\\\\\`\\"\\\$]*)
21292       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
21293       ;;
21294     *)
21295       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
21296       ;;
21297     esac
21298 done
21299
21300 ac_aux_dir='$ac_aux_dir'
21301
21302 # See if we are running on zsh, and set the options that allow our
21303 # commands through without removal of \ escapes INIT.
21304 if test -n "\${ZSH_VERSION+set}"; then
21305    setopt NO_GLOB_SUBST
21306 fi
21307
21308
21309     PACKAGE='$PACKAGE'
21310     VERSION='$VERSION'
21311     RM='$RM'
21312     ofile='$ofile'
21313
21314
21315
21316
21317 _ACEOF
21318
21319 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21320
21321 # Handling of arguments.
21322 for ac_config_target in $ac_config_targets
21323 do
21324   case $ac_config_target in
21325     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
21326     "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
21327     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21328     "doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
21329     "doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
21330     "doc/unbound.8") CONFIG_FILES="$CONFIG_FILES doc/unbound.8" ;;
21331     "doc/unbound-anchor.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-anchor.8" ;;
21332     "doc/unbound-checkconf.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-checkconf.8" ;;
21333     "doc/unbound.conf.5") CONFIG_FILES="$CONFIG_FILES doc/unbound.conf.5" ;;
21334     "doc/unbound-control.8") CONFIG_FILES="$CONFIG_FILES doc/unbound-control.8" ;;
21335     "doc/unbound-host.1") CONFIG_FILES="$CONFIG_FILES doc/unbound-host.1" ;;
21336     "smallapp/unbound-control-setup.sh") CONFIG_FILES="$CONFIG_FILES smallapp/unbound-control-setup.sh" ;;
21337     "dnstap/dnstap_config.h") CONFIG_FILES="$CONFIG_FILES dnstap/dnstap_config.h" ;;
21338     "contrib/libunbound.pc") CONFIG_FILES="$CONFIG_FILES contrib/libunbound.pc" ;;
21339     "contrib/unbound.socket") CONFIG_FILES="$CONFIG_FILES contrib/unbound.socket" ;;
21340     "contrib/unbound.service") CONFIG_FILES="$CONFIG_FILES contrib/unbound.service" ;;
21341     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
21342
21343   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
21344   esac
21345 done
21346
21347
21348 # If the user did not use the arguments to specify the items to instantiate,
21349 # then the envvar interface is used.  Set only those that are not.
21350 # We use the long form for the default assignment because of an extremely
21351 # bizarre bug on SunOS 4.1.3.
21352 if $ac_need_defaults; then
21353   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21354   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21355   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21356 fi
21357
21358 # Have a temporary directory for convenience.  Make it in the build tree
21359 # simply because there is no reason against having it here, and in addition,
21360 # creating and moving files from /tmp can sometimes cause problems.
21361 # Hook for its removal unless debugging.
21362 # Note that there is a small window in which the directory will not be cleaned:
21363 # after its creation but before its name has been assigned to `$tmp'.
21364 $debug ||
21365 {
21366   tmp= ac_tmp=
21367   trap 'exit_status=$?
21368   : "${ac_tmp:=$tmp}"
21369   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
21370 ' 0
21371   trap 'as_fn_exit 1' 1 2 13 15
21372 }
21373 # Create a (secure) tmp directory for tmp files.
21374
21375 {
21376   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
21377   test -d "$tmp"
21378 }  ||
21379 {
21380   tmp=./conf$$-$RANDOM
21381   (umask 077 && mkdir "$tmp")
21382 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
21383 ac_tmp=$tmp
21384
21385 # Set up the scripts for CONFIG_FILES section.
21386 # No need to generate them if there are no CONFIG_FILES.
21387 # This happens for instance with `./config.status config.h'.
21388 if test -n "$CONFIG_FILES"; then
21389
21390
21391 ac_cr=`echo X | tr X '\015'`
21392 # On cygwin, bash can eat \r inside `` if the user requested igncr.
21393 # But we know of no other shell where ac_cr would be empty at this
21394 # point, so we can use a bashism as a fallback.
21395 if test "x$ac_cr" = x; then
21396   eval ac_cr=\$\'\\r\'
21397 fi
21398 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
21399 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
21400   ac_cs_awk_cr='\\r'
21401 else
21402   ac_cs_awk_cr=$ac_cr
21403 fi
21404
21405 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
21406 _ACEOF
21407
21408
21409 {
21410   echo "cat >conf$$subs.awk <<_ACEOF" &&
21411   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
21412   echo "_ACEOF"
21413 } >conf$$subs.sh ||
21414   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
21415 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
21416 ac_delim='%!_!# '
21417 for ac_last_try in false false false false false :; do
21418   . ./conf$$subs.sh ||
21419     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
21420
21421   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
21422   if test $ac_delim_n = $ac_delim_num; then
21423     break
21424   elif $ac_last_try; then
21425     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
21426   else
21427     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21428   fi
21429 done
21430 rm -f conf$$subs.sh
21431
21432 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21433 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
21434 _ACEOF
21435 sed -n '
21436 h
21437 s/^/S["/; s/!.*/"]=/
21438 p
21439 g
21440 s/^[^!]*!//
21441 :repl
21442 t repl
21443 s/'"$ac_delim"'$//
21444 t delim
21445 :nl
21446 h
21447 s/\(.\{148\}\)..*/\1/
21448 t more1
21449 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
21450 p
21451 n
21452 b repl
21453 :more1
21454 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21455 p
21456 g
21457 s/.\{148\}//
21458 t nl
21459 :delim
21460 h
21461 s/\(.\{148\}\)..*/\1/
21462 t more2
21463 s/["\\]/\\&/g; s/^/"/; s/$/"/
21464 p
21465 b
21466 :more2
21467 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21468 p
21469 g
21470 s/.\{148\}//
21471 t delim
21472 ' <conf$$subs.awk | sed '
21473 /^[^""]/{
21474   N
21475   s/\n//
21476 }
21477 ' >>$CONFIG_STATUS || ac_write_fail=1
21478 rm -f conf$$subs.awk
21479 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21480 _ACAWK
21481 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
21482   for (key in S) S_is_set[key] = 1
21483   FS = "\a"
21484
21485 }
21486 {
21487   line = $ 0
21488   nfields = split(line, field, "@")
21489   substed = 0
21490   len = length(field[1])
21491   for (i = 2; i < nfields; i++) {
21492     key = field[i]
21493     keylen = length(key)
21494     if (S_is_set[key]) {
21495       value = S[key]
21496       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
21497       len += length(value) + length(field[++i])
21498       substed = 1
21499     } else
21500       len += 1 + keylen
21501   }
21502
21503   print line
21504 }
21505
21506 _ACAWK
21507 _ACEOF
21508 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21509 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
21510   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
21511 else
21512   cat
21513 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
21514   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
21515 _ACEOF
21516
21517 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
21518 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
21519 # trailing colons and then remove the whole line if VPATH becomes empty
21520 # (actually we leave an empty line to preserve line numbers).
21521 if test "x$srcdir" = x.; then
21522   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
21523 h
21524 s///
21525 s/^/:/
21526 s/[      ]*$/:/
21527 s/:\$(srcdir):/:/g
21528 s/:\${srcdir}:/:/g
21529 s/:@srcdir@:/:/g
21530 s/^:*//
21531 s/:*$//
21532 x
21533 s/\(=[   ]*\).*/\1/
21534 G
21535 s/\n//
21536 s/^[^=]*=[       ]*$//
21537 }'
21538 fi
21539
21540 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21541 fi # test -n "$CONFIG_FILES"
21542
21543 # Set up the scripts for CONFIG_HEADERS section.
21544 # No need to generate them if there are no CONFIG_HEADERS.
21545 # This happens for instance with `./config.status Makefile'.
21546 if test -n "$CONFIG_HEADERS"; then
21547 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
21548 BEGIN {
21549 _ACEOF
21550
21551 # Transform confdefs.h into an awk script `defines.awk', embedded as
21552 # here-document in config.status, that substitutes the proper values into
21553 # config.h.in to produce config.h.
21554
21555 # Create a delimiter string that does not exist in confdefs.h, to ease
21556 # handling of long lines.
21557 ac_delim='%!_!# '
21558 for ac_last_try in false false :; do
21559   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
21560   if test -z "$ac_tt"; then
21561     break
21562   elif $ac_last_try; then
21563     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
21564   else
21565     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21566   fi
21567 done
21568
21569 # For the awk script, D is an array of macro values keyed by name,
21570 # likewise P contains macro parameters if any.  Preserve backslash
21571 # newline sequences.
21572
21573 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21574 sed -n '
21575 s/.\{148\}/&'"$ac_delim"'/g
21576 t rset
21577 :rset
21578 s/^[     ]*#[    ]*define[       ][      ]*/ /
21579 t def
21580 d
21581 :def
21582 s/\\$//
21583 t bsnl
21584 s/["\\]/\\&/g
21585 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
21586 D["\1"]=" \3"/p
21587 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
21588 d
21589 :bsnl
21590 s/["\\]/\\&/g
21591 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
21592 D["\1"]=" \3\\\\\\n"\\/p
21593 t cont
21594 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
21595 t cont
21596 d
21597 :cont
21598 n
21599 s/.\{148\}/&'"$ac_delim"'/g
21600 t clear
21601 :clear
21602 s/\\$//
21603 t bsnlc
21604 s/["\\]/\\&/g; s/^/"/; s/$/"/p
21605 d
21606 :bsnlc
21607 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
21608 b cont
21609 ' <confdefs.h | sed '
21610 s/'"$ac_delim"'/"\\\
21611 "/g' >>$CONFIG_STATUS || ac_write_fail=1
21612
21613 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21614   for (key in D) D_is_set[key] = 1
21615   FS = "\a"
21616 }
21617 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
21618   line = \$ 0
21619   split(line, arg, " ")
21620   if (arg[1] == "#") {
21621     defundef = arg[2]
21622     mac1 = arg[3]
21623   } else {
21624     defundef = substr(arg[1], 2)
21625     mac1 = arg[2]
21626   }
21627   split(mac1, mac2, "(") #)
21628   macro = mac2[1]
21629   prefix = substr(line, 1, index(line, defundef) - 1)
21630   if (D_is_set[macro]) {
21631     # Preserve the white space surrounding the "#".
21632     print prefix "define", macro P[macro] D[macro]
21633     next
21634   } else {
21635     # Replace #undef with comments.  This is necessary, for example,
21636     # in the case of _POSIX_SOURCE, which is predefined and required
21637     # on some systems where configure will not decide to define it.
21638     if (defundef == "undef") {
21639       print "/*", prefix defundef, macro, "*/"
21640       next
21641     }
21642   }
21643 }
21644 { print }
21645 _ACAWK
21646 _ACEOF
21647 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21648   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
21649 fi # test -n "$CONFIG_HEADERS"
21650
21651
21652 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
21653 shift
21654 for ac_tag
21655 do
21656   case $ac_tag in
21657   :[FHLC]) ac_mode=$ac_tag; continue;;
21658   esac
21659   case $ac_mode$ac_tag in
21660   :[FHL]*:*);;
21661   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
21662   :[FH]-) ac_tag=-:-;;
21663   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21664   esac
21665   ac_save_IFS=$IFS
21666   IFS=:
21667   set x $ac_tag
21668   IFS=$ac_save_IFS
21669   shift
21670   ac_file=$1
21671   shift
21672
21673   case $ac_mode in
21674   :L) ac_source=$1;;
21675   :[FH])
21676     ac_file_inputs=
21677     for ac_f
21678     do
21679       case $ac_f in
21680       -) ac_f="$ac_tmp/stdin";;
21681       *) # Look for the file first in the build tree, then in the source tree
21682          # (if the path is not absolute).  The absolute path cannot be DOS-style,
21683          # because $ac_f cannot contain `:'.
21684          test -f "$ac_f" ||
21685            case $ac_f in
21686            [\\/$]*) false;;
21687            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21688            esac ||
21689            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
21690       esac
21691       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
21692       as_fn_append ac_file_inputs " '$ac_f'"
21693     done
21694
21695     # Let's still pretend it is `configure' which instantiates (i.e., don't
21696     # use $as_me), people would be surprised to read:
21697     #    /* config.h.  Generated by config.status.  */
21698     configure_input='Generated from '`
21699           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
21700         `' by configure.'
21701     if test x"$ac_file" != x-; then
21702       configure_input="$ac_file.  $configure_input"
21703       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21704 $as_echo "$as_me: creating $ac_file" >&6;}
21705     fi
21706     # Neutralize special characters interpreted by sed in replacement strings.
21707     case $configure_input in #(
21708     *\&* | *\|* | *\\* )
21709        ac_sed_conf_input=`$as_echo "$configure_input" |
21710        sed 's/[\\\\&|]/\\\\&/g'`;; #(
21711     *) ac_sed_conf_input=$configure_input;;
21712     esac
21713
21714     case $ac_tag in
21715     *:-:* | *:-) cat >"$ac_tmp/stdin" \
21716       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
21717     esac
21718     ;;
21719   esac
21720
21721   ac_dir=`$as_dirname -- "$ac_file" ||
21722 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21723          X"$ac_file" : 'X\(//\)[^/]' \| \
21724          X"$ac_file" : 'X\(//\)$' \| \
21725          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21726 $as_echo X"$ac_file" |
21727     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21728             s//\1/
21729             q
21730           }
21731           /^X\(\/\/\)[^/].*/{
21732             s//\1/
21733             q
21734           }
21735           /^X\(\/\/\)$/{
21736             s//\1/
21737             q
21738           }
21739           /^X\(\/\).*/{
21740             s//\1/
21741             q
21742           }
21743           s/.*/./; q'`
21744   as_dir="$ac_dir"; as_fn_mkdir_p
21745   ac_builddir=.
21746
21747 case "$ac_dir" in
21748 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21749 *)
21750   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21751   # A ".." for each directory in $ac_dir_suffix.
21752   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21753   case $ac_top_builddir_sub in
21754   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21755   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21756   esac ;;
21757 esac
21758 ac_abs_top_builddir=$ac_pwd
21759 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21760 # for backward compatibility:
21761 ac_top_builddir=$ac_top_build_prefix
21762
21763 case $srcdir in
21764   .)  # We are building in place.
21765     ac_srcdir=.
21766     ac_top_srcdir=$ac_top_builddir_sub
21767     ac_abs_top_srcdir=$ac_pwd ;;
21768   [\\/]* | ?:[\\/]* )  # Absolute name.
21769     ac_srcdir=$srcdir$ac_dir_suffix;
21770     ac_top_srcdir=$srcdir
21771     ac_abs_top_srcdir=$srcdir ;;
21772   *) # Relative name.
21773     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21774     ac_top_srcdir=$ac_top_build_prefix$srcdir
21775     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21776 esac
21777 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21778
21779
21780   case $ac_mode in
21781   :F)
21782   #
21783   # CONFIG_FILE
21784   #
21785
21786 _ACEOF
21787
21788 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21789 # If the template does not know about datarootdir, expand it.
21790 # FIXME: This hack should be removed a few years after 2.60.
21791 ac_datarootdir_hack=; ac_datarootdir_seen=
21792 ac_sed_dataroot='
21793 /datarootdir/ {
21794   p
21795   q
21796 }
21797 /@datadir@/p
21798 /@docdir@/p
21799 /@infodir@/p
21800 /@localedir@/p
21801 /@mandir@/p'
21802 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21803 *datarootdir*) ac_datarootdir_seen=yes;;
21804 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21805   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21806 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21807 _ACEOF
21808 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21809   ac_datarootdir_hack='
21810   s&@datadir@&$datadir&g
21811   s&@docdir@&$docdir&g
21812   s&@infodir@&$infodir&g
21813   s&@localedir@&$localedir&g
21814   s&@mandir@&$mandir&g
21815   s&\\\${datarootdir}&$datarootdir&g' ;;
21816 esac
21817 _ACEOF
21818
21819 # Neutralize VPATH when `$srcdir' = `.'.
21820 # Shell code in configure.ac might set extrasub.
21821 # FIXME: do we really want to maintain this feature?
21822 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21823 ac_sed_extra="$ac_vpsub
21824 $extrasub
21825 _ACEOF
21826 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21827 :t
21828 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21829 s|@configure_input@|$ac_sed_conf_input|;t t
21830 s&@top_builddir@&$ac_top_builddir_sub&;t t
21831 s&@top_build_prefix@&$ac_top_build_prefix&;t t
21832 s&@srcdir@&$ac_srcdir&;t t
21833 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21834 s&@top_srcdir@&$ac_top_srcdir&;t t
21835 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21836 s&@builddir@&$ac_builddir&;t t
21837 s&@abs_builddir@&$ac_abs_builddir&;t t
21838 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21839 $ac_datarootdir_hack
21840 "
21841 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
21842   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21843
21844 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21845   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21846   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
21847       "$ac_tmp/out"`; test -z "$ac_out"; } &&
21848   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21849 which seems to be undefined.  Please make sure it is defined" >&5
21850 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21851 which seems to be undefined.  Please make sure it is defined" >&2;}
21852
21853   rm -f "$ac_tmp/stdin"
21854   case $ac_file in
21855   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21856   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
21857   esac \
21858   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21859  ;;
21860   :H)
21861   #
21862   # CONFIG_HEADER
21863   #
21864   if test x"$ac_file" != x-; then
21865     {
21866       $as_echo "/* $configure_input  */" \
21867       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21868     } >"$ac_tmp/config.h" \
21869       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21870     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
21871       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21872 $as_echo "$as_me: $ac_file is unchanged" >&6;}
21873     else
21874       rm -f "$ac_file"
21875       mv "$ac_tmp/config.h" "$ac_file" \
21876         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21877     fi
21878   else
21879     $as_echo "/* $configure_input  */" \
21880       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
21881       || as_fn_error $? "could not create -" "$LINENO" 5
21882   fi
21883  ;;
21884
21885   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
21886 $as_echo "$as_me: executing $ac_file commands" >&6;}
21887  ;;
21888   esac
21889
21890
21891   case $ac_file$ac_mode in
21892     "libtool":C)
21893
21894     # See if we are running on zsh, and set the options that allow our
21895     # commands through without removal of \ escapes.
21896     if test -n "${ZSH_VERSION+set}"; then
21897       setopt NO_GLOB_SUBST
21898     fi
21899
21900     cfgfile=${ofile}T
21901     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
21902     $RM "$cfgfile"
21903
21904     cat <<_LT_EOF >> "$cfgfile"
21905 #! $SHELL
21906 # Generated automatically by $as_me ($PACKAGE) $VERSION
21907 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
21908 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
21909
21910 # Provide generalized library-building support services.
21911 # Written by Gordon Matzigkeit, 1996
21912
21913 # Copyright (C) 2014 Free Software Foundation, Inc.
21914 # This is free software; see the source for copying conditions.  There is NO
21915 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21916
21917 # GNU Libtool is free software; you can redistribute it and/or modify
21918 # it under the terms of the GNU General Public License as published by
21919 # the Free Software Foundation; either version 2 of of the License, or
21920 # (at your option) any later version.
21921 #
21922 # As a special exception to the GNU General Public License, if you
21923 # distribute this file as part of a program or library that is built
21924 # using GNU Libtool, you may include this file under the  same
21925 # distribution terms that you use for the rest of that program.
21926 #
21927 # GNU Libtool is distributed in the hope that it will be useful, but
21928 # WITHOUT ANY WARRANTY; without even the implied warranty of
21929 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21930 # GNU General Public License for more details.
21931 #
21932 # You should have received a copy of the GNU General Public License
21933 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
21934
21935
21936 # The names of the tagged configurations supported by this script.
21937 available_tags=''
21938
21939 # Configured defaults for sys_lib_dlsearch_path munging.
21940 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
21941
21942 # ### BEGIN LIBTOOL CONFIG
21943
21944 # Which release of libtool.m4 was used?
21945 macro_version=$macro_version
21946 macro_revision=$macro_revision
21947
21948 # Whether or not to build shared libraries.
21949 build_libtool_libs=$enable_shared
21950
21951 # Whether or not to build static libraries.
21952 build_old_libs=$enable_static
21953
21954 # What type of objects to build.
21955 pic_mode=$pic_mode
21956
21957 # Whether or not to optimize for fast installation.
21958 fast_install=$enable_fast_install
21959
21960 # Shared archive member basename,for filename based shared library versioning on AIX.
21961 shared_archive_member_spec=$shared_archive_member_spec
21962
21963 # Shell to use when invoking shell scripts.
21964 SHELL=$lt_SHELL
21965
21966 # An echo program that protects backslashes.
21967 ECHO=$lt_ECHO
21968
21969 # The PATH separator for the build system.
21970 PATH_SEPARATOR=$lt_PATH_SEPARATOR
21971
21972 # The host system.
21973 host_alias=$host_alias
21974 host=$host
21975 host_os=$host_os
21976
21977 # The build system.
21978 build_alias=$build_alias
21979 build=$build
21980 build_os=$build_os
21981
21982 # A sed program that does not truncate output.
21983 SED=$lt_SED
21984
21985 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
21986 Xsed="\$SED -e 1s/^X//"
21987
21988 # A grep program that handles long lines.
21989 GREP=$lt_GREP
21990
21991 # An ERE matcher.
21992 EGREP=$lt_EGREP
21993
21994 # A literal string matcher.
21995 FGREP=$lt_FGREP
21996
21997 # A BSD- or MS-compatible name lister.
21998 NM=$lt_NM
21999
22000 # Whether we need soft or hard links.
22001 LN_S=$lt_LN_S
22002
22003 # What is the maximum length of a command?
22004 max_cmd_len=$max_cmd_len
22005
22006 # Object file suffix (normally "o").
22007 objext=$ac_objext
22008
22009 # Executable file suffix (normally "").
22010 exeext=$exeext
22011
22012 # whether the shell understands "unset".
22013 lt_unset=$lt_unset
22014
22015 # turn spaces into newlines.
22016 SP2NL=$lt_lt_SP2NL
22017
22018 # turn newlines into spaces.
22019 NL2SP=$lt_lt_NL2SP
22020
22021 # convert \$build file names to \$host format.
22022 to_host_file_cmd=$lt_cv_to_host_file_cmd
22023
22024 # convert \$build files to toolchain format.
22025 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
22026
22027 # An object symbol dumper.
22028 OBJDUMP=$lt_OBJDUMP
22029
22030 # Method to check whether dependent libraries are shared objects.
22031 deplibs_check_method=$lt_deplibs_check_method
22032
22033 # Command to use when deplibs_check_method = "file_magic".
22034 file_magic_cmd=$lt_file_magic_cmd
22035
22036 # How to find potential files when deplibs_check_method = "file_magic".
22037 file_magic_glob=$lt_file_magic_glob
22038
22039 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
22040 want_nocaseglob=$lt_want_nocaseglob
22041
22042 # DLL creation program.
22043 DLLTOOL=$lt_DLLTOOL
22044
22045 # Command to associate shared and link libraries.
22046 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
22047
22048 # The archiver.
22049 AR=$lt_AR
22050
22051 # Flags to create an archive.
22052 AR_FLAGS=$lt_AR_FLAGS
22053
22054 # How to feed a file listing to the archiver.
22055 archiver_list_spec=$lt_archiver_list_spec
22056
22057 # A symbol stripping program.
22058 STRIP=$lt_STRIP
22059
22060 # Commands used to install an old-style archive.
22061 RANLIB=$lt_RANLIB
22062 old_postinstall_cmds=$lt_old_postinstall_cmds
22063 old_postuninstall_cmds=$lt_old_postuninstall_cmds
22064
22065 # Whether to use a lock for old archive extraction.
22066 lock_old_archive_extraction=$lock_old_archive_extraction
22067
22068 # A C compiler.
22069 LTCC=$lt_CC
22070
22071 # LTCC compiler flags.
22072 LTCFLAGS=$lt_CFLAGS
22073
22074 # Take the output of nm and produce a listing of raw symbols and C names.
22075 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
22076
22077 # Transform the output of nm in a proper C declaration.
22078 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
22079
22080 # Transform the output of nm into a list of symbols to manually relocate.
22081 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
22082
22083 # Transform the output of nm in a C name address pair.
22084 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
22085
22086 # Transform the output of nm in a C name address pair when lib prefix is needed.
22087 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
22088
22089 # The name lister interface.
22090 nm_interface=$lt_lt_cv_nm_interface
22091
22092 # Specify filename containing input files for \$NM.
22093 nm_file_list_spec=$lt_nm_file_list_spec
22094
22095 # The root where to search for dependent libraries,and where our libraries should be installed.
22096 lt_sysroot=$lt_sysroot
22097
22098 # Command to truncate a binary pipe.
22099 lt_truncate_bin=$lt_lt_cv_truncate_bin
22100
22101 # The name of the directory that contains temporary libtool files.
22102 objdir=$objdir
22103
22104 # Used to examine libraries when file_magic_cmd begins with "file".
22105 MAGIC_CMD=$MAGIC_CMD
22106
22107 # Must we lock files when doing compilation?
22108 need_locks=$lt_need_locks
22109
22110 # Manifest tool.
22111 MANIFEST_TOOL=$lt_MANIFEST_TOOL
22112
22113 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
22114 DSYMUTIL=$lt_DSYMUTIL
22115
22116 # Tool to change global to local symbols on Mac OS X.
22117 NMEDIT=$lt_NMEDIT
22118
22119 # Tool to manipulate fat objects and archives on Mac OS X.
22120 LIPO=$lt_LIPO
22121
22122 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
22123 OTOOL=$lt_OTOOL
22124
22125 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
22126 OTOOL64=$lt_OTOOL64
22127
22128 # Old archive suffix (normally "a").
22129 libext=$libext
22130
22131 # Shared library suffix (normally ".so").
22132 shrext_cmds=$lt_shrext_cmds
22133
22134 # The commands to extract the exported symbol list from a shared archive.
22135 extract_expsyms_cmds=$lt_extract_expsyms_cmds
22136
22137 # Variables whose values should be saved in libtool wrapper scripts and
22138 # restored at link time.
22139 variables_saved_for_relink=$lt_variables_saved_for_relink
22140
22141 # Do we need the "lib" prefix for modules?
22142 need_lib_prefix=$need_lib_prefix
22143
22144 # Do we need a version for libraries?
22145 need_version=$need_version
22146
22147 # Library versioning type.
22148 version_type=$version_type
22149
22150 # Shared library runtime path variable.
22151 runpath_var=$runpath_var
22152
22153 # Shared library path variable.
22154 shlibpath_var=$shlibpath_var
22155
22156 # Is shlibpath searched before the hard-coded library search path?
22157 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
22158
22159 # Format of library name prefix.
22160 libname_spec=$lt_libname_spec
22161
22162 # List of archive names.  First name is the real one, the rest are links.
22163 # The last name is the one that the linker finds with -lNAME
22164 library_names_spec=$lt_library_names_spec
22165
22166 # The coded name of the library, if different from the real name.
22167 soname_spec=$lt_soname_spec
22168
22169 # Permission mode override for installation of shared libraries.
22170 install_override_mode=$lt_install_override_mode
22171
22172 # Command to use after installation of a shared archive.
22173 postinstall_cmds=$lt_postinstall_cmds
22174
22175 # Command to use after uninstallation of a shared archive.
22176 postuninstall_cmds=$lt_postuninstall_cmds
22177
22178 # Commands used to finish a libtool library installation in a directory.
22179 finish_cmds=$lt_finish_cmds
22180
22181 # As "finish_cmds", except a single script fragment to be evaled but
22182 # not shown.
22183 finish_eval=$lt_finish_eval
22184
22185 # Whether we should hardcode library paths into libraries.
22186 hardcode_into_libs=$hardcode_into_libs
22187
22188 # Compile-time system search path for libraries.
22189 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
22190
22191 # Detected run-time system search path for libraries.
22192 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
22193
22194 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
22195 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
22196
22197 # Whether dlopen is supported.
22198 dlopen_support=$enable_dlopen
22199
22200 # Whether dlopen of programs is supported.
22201 dlopen_self=$enable_dlopen_self
22202
22203 # Whether dlopen of statically linked programs is supported.
22204 dlopen_self_static=$enable_dlopen_self_static
22205
22206 # Commands to strip libraries.
22207 old_striplib=$lt_old_striplib
22208 striplib=$lt_striplib
22209
22210
22211 # The linker used to build libraries.
22212 LD=$lt_LD
22213
22214 # How to create reloadable object files.
22215 reload_flag=$lt_reload_flag
22216 reload_cmds=$lt_reload_cmds
22217
22218 # Commands used to build an old-style archive.
22219 old_archive_cmds=$lt_old_archive_cmds
22220
22221 # A language specific compiler.
22222 CC=$lt_compiler
22223
22224 # Is the compiler the GNU compiler?
22225 with_gcc=$GCC
22226
22227 # Compiler flag to turn off builtin functions.
22228 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
22229
22230 # Additional compiler flags for building library objects.
22231 pic_flag=$lt_lt_prog_compiler_pic
22232
22233 # How to pass a linker flag through the compiler.
22234 wl=$lt_lt_prog_compiler_wl
22235
22236 # Compiler flag to prevent dynamic linking.
22237 link_static_flag=$lt_lt_prog_compiler_static
22238
22239 # Does compiler simultaneously support -c and -o options?
22240 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
22241
22242 # Whether or not to add -lc for building shared libraries.
22243 build_libtool_need_lc=$archive_cmds_need_lc
22244
22245 # Whether or not to disallow shared libs when runtime libs are static.
22246 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
22247
22248 # Compiler flag to allow reflexive dlopens.
22249 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
22250
22251 # Compiler flag to generate shared objects directly from archives.
22252 whole_archive_flag_spec=$lt_whole_archive_flag_spec
22253
22254 # Whether the compiler copes with passing no objects directly.
22255 compiler_needs_object=$lt_compiler_needs_object
22256
22257 # Create an old-style archive from a shared archive.
22258 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
22259
22260 # Create a temporary old-style archive to link instead of a shared archive.
22261 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
22262
22263 # Commands used to build a shared archive.
22264 archive_cmds=$lt_archive_cmds
22265 archive_expsym_cmds=$lt_archive_expsym_cmds
22266
22267 # Commands used to build a loadable module if different from building
22268 # a shared archive.
22269 module_cmds=$lt_module_cmds
22270 module_expsym_cmds=$lt_module_expsym_cmds
22271
22272 # Whether we are building with GNU ld or not.
22273 with_gnu_ld=$lt_with_gnu_ld
22274
22275 # Flag that allows shared libraries with undefined symbols to be built.
22276 allow_undefined_flag=$lt_allow_undefined_flag
22277
22278 # Flag that enforces no undefined symbols.
22279 no_undefined_flag=$lt_no_undefined_flag
22280
22281 # Flag to hardcode \$libdir into a binary during linking.
22282 # This must work even if \$libdir does not exist
22283 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
22284
22285 # Whether we need a single "-rpath" flag with a separated argument.
22286 hardcode_libdir_separator=$lt_hardcode_libdir_separator
22287
22288 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
22289 # DIR into the resulting binary.
22290 hardcode_direct=$hardcode_direct
22291
22292 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
22293 # DIR into the resulting binary and the resulting library dependency is
22294 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
22295 # library is relocated.
22296 hardcode_direct_absolute=$hardcode_direct_absolute
22297
22298 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
22299 # into the resulting binary.
22300 hardcode_minus_L=$hardcode_minus_L
22301
22302 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
22303 # into the resulting binary.
22304 hardcode_shlibpath_var=$hardcode_shlibpath_var
22305
22306 # Set to "yes" if building a shared library automatically hardcodes DIR
22307 # into the library and all subsequent libraries and executables linked
22308 # against it.
22309 hardcode_automatic=$hardcode_automatic
22310
22311 # Set to yes if linker adds runtime paths of dependent libraries
22312 # to runtime path list.
22313 inherit_rpath=$inherit_rpath
22314
22315 # Whether libtool must link a program against all its dependency libraries.
22316 link_all_deplibs=$link_all_deplibs
22317
22318 # Set to "yes" if exported symbols are required.
22319 always_export_symbols=$always_export_symbols
22320
22321 # The commands to list exported symbols.
22322 export_symbols_cmds=$lt_export_symbols_cmds
22323
22324 # Symbols that should not be listed in the preloaded symbols.
22325 exclude_expsyms=$lt_exclude_expsyms
22326
22327 # Symbols that must always be exported.
22328 include_expsyms=$lt_include_expsyms
22329
22330 # Commands necessary for linking programs (against libraries) with templates.
22331 prelink_cmds=$lt_prelink_cmds
22332
22333 # Commands necessary for finishing linking programs.
22334 postlink_cmds=$lt_postlink_cmds
22335
22336 # Specify filename containing input files.
22337 file_list_spec=$lt_file_list_spec
22338
22339 # How to hardcode a shared library path into an executable.
22340 hardcode_action=$hardcode_action
22341
22342 # ### END LIBTOOL CONFIG
22343
22344 _LT_EOF
22345
22346     cat <<'_LT_EOF' >> "$cfgfile"
22347
22348 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
22349
22350 # func_munge_path_list VARIABLE PATH
22351 # -----------------------------------
22352 # VARIABLE is name of variable containing _space_ separated list of
22353 # directories to be munged by the contents of PATH, which is string
22354 # having a format:
22355 # "DIR[:DIR]:"
22356 #       string "DIR[ DIR]" will be prepended to VARIABLE
22357 # ":DIR[:DIR]"
22358 #       string "DIR[ DIR]" will be appended to VARIABLE
22359 # "DIRP[:DIRP]::[DIRA:]DIRA"
22360 #       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
22361 #       "DIRA[ DIRA]" will be appended to VARIABLE
22362 # "DIR[:DIR]"
22363 #       VARIABLE will be replaced by "DIR[ DIR]"
22364 func_munge_path_list ()
22365 {
22366     case x$2 in
22367     x)
22368         ;;
22369     *:)
22370         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
22371         ;;
22372     x:*)
22373         eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
22374         ;;
22375     *::*)
22376         eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
22377         eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
22378         ;;
22379     *)
22380         eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
22381         ;;
22382     esac
22383 }
22384
22385
22386 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
22387 func_cc_basename ()
22388 {
22389     for cc_temp in $*""; do
22390       case $cc_temp in
22391         compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
22392         distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
22393         \-*) ;;
22394         *) break;;
22395       esac
22396     done
22397     func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
22398 }
22399
22400
22401 # ### END FUNCTIONS SHARED WITH CONFIGURE
22402
22403 _LT_EOF
22404
22405   case $host_os in
22406   aix3*)
22407     cat <<\_LT_EOF >> "$cfgfile"
22408 # AIX sometimes has problems with the GCC collect2 program.  For some
22409 # reason, if we set the COLLECT_NAMES environment variable, the problems
22410 # vanish in a puff of smoke.
22411 if test set != "${COLLECT_NAMES+set}"; then
22412   COLLECT_NAMES=
22413   export COLLECT_NAMES
22414 fi
22415 _LT_EOF
22416     ;;
22417   esac
22418
22419
22420 ltmain=$ac_aux_dir/ltmain.sh
22421
22422
22423   # We use sed instead of cat because bash on DJGPP gets confused if
22424   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
22425   # text mode, it properly converts lines to CR/LF.  This bash problem
22426   # is reportedly fixed, but why not run on old versions too?
22427   sed '$q' "$ltmain" >> "$cfgfile" \
22428      || (rm -f "$cfgfile"; exit 1)
22429
22430    mv -f "$cfgfile" "$ofile" ||
22431     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
22432   chmod +x "$ofile"
22433
22434  ;;
22435     "disable-rpath":C)
22436         sed < libtool > libtool-2 \
22437         's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
22438         mv libtool-2 libtool
22439         chmod 755 libtool
22440         libtool="./libtool"
22441          ;;
22442
22443   esac
22444 done # for ac_tag
22445
22446
22447 as_fn_exit 0
22448 _ACEOF
22449 ac_clean_files=$ac_clean_files_save
22450
22451 test $ac_write_fail = 0 ||
22452   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
22453
22454
22455 # configure is writing to config.log, and then calls config.status.
22456 # config.status does its own redirection, appending to config.log.
22457 # Unfortunately, on DOS this fails, as config.log is still kept open
22458 # by configure, so config.status won't be able to write to it; its
22459 # output is simply discarded.  So we exec the FD to /dev/null,
22460 # effectively closing config.log, so it can be properly (re)opened and
22461 # appended to by config.status.  When coming back to configure, we
22462 # need to make the FD available again.
22463 if test "$no_create" != yes; then
22464   ac_cs_success=:
22465   ac_config_status_args=
22466   test "$silent" = yes &&
22467     ac_config_status_args="$ac_config_status_args --quiet"
22468   exec 5>/dev/null
22469   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
22470   exec 5>>config.log
22471   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22472   # would make configure fail if this is the last instruction.
22473   $ac_cs_success || as_fn_exit 1
22474 fi
22475 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
22476   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
22477 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
22478 fi
22479